Decrease indentation in HelperCollection constructor

This commit is contained in:
Dariusz Rumiński
2014-05-15 09:32:31 +02:00
parent 4353e7e2a4
commit 5ea8dc21e9
+4 -2
View File
@@ -27,7 +27,10 @@ class Mustache_HelperCollection
*/ */
public function __construct($helpers = null) public function __construct($helpers = null)
{ {
if ($helpers !== null) { if ($helpers === null) {
return;
}
if (!is_array($helpers) && !$helpers instanceof Traversable) { if (!is_array($helpers) && !$helpers instanceof Traversable) {
throw new Mustache_Exception_InvalidArgumentException('HelperCollection constructor expects an array of helpers'); throw new Mustache_Exception_InvalidArgumentException('HelperCollection constructor expects an array of helpers');
} }
@@ -36,7 +39,6 @@ class Mustache_HelperCollection
$this->add($name, $helper); $this->add($name, $helper);
} }
} }
}
/** /**
* Magic mutator. * Magic mutator.