diff --git a/src/Listener/ConfigListener.php b/src/Listener/ConfigListener.php index 9e25bc3..595aaeb 100644 --- a/src/Listener/ConfigListener.php +++ b/src/Listener/ConfigListener.php @@ -286,10 +286,14 @@ protected function addConfigPaths($paths, $type) if (!is_array($paths)) { throw new Exception\InvalidArgumentException( - sprintf('Argument passed to %::%s() must be an array, ' - . 'implement the Traversable interface, or be an ' - . 'instance of Zend\Config\Config. %s given.', - __CLASS__, __METHOD__, gettype($paths)) + sprintf( + 'Argument passed to %::%s() must be an array, ' + . 'implement the Traversable interface, or be an ' + . 'instance of Zend\Config\Config. %s given.', + __CLASS__, + __METHOD__, + gettype($paths) + ) ); } @@ -310,8 +314,12 @@ protected function addConfigPath($path, $type) { if (!is_string($path)) { throw new Exception\InvalidArgumentException( - sprintf('Parameter to %s::%s() must be a string; %s given.', - __CLASS__, __METHOD__, gettype($path)) + sprintf( + 'Parameter to %s::%s() must be a string; %s given.', + __CLASS__, + __METHOD__, + gettype($path) + ) ); } $this->paths[] = array('type' => $type, 'path' => $path); @@ -332,9 +340,12 @@ protected function addConfig($key, $config) if (!is_array($config)) { throw new Exception\InvalidArgumentException( - sprintf('Config being merged must be an array, ' - . 'implement the Traversable interface, or be an ' - . 'instance of Zend\Config\Config. %s given.', gettype($config)) + sprintf( + 'Config being merged must be an array, ' + . 'implement the Traversable interface, or be an ' + . 'instance of Zend\Config\Config. %s given.', + gettype($config) + ) ); } diff --git a/src/Listener/ListenerOptions.php b/src/Listener/ListenerOptions.php index 5ee96c8..e0ae085 100644 --- a/src/Listener/ListenerOptions.php +++ b/src/Listener/ListenerOptions.php @@ -88,10 +88,14 @@ public function setModulePaths($modulePaths) { if (!is_array($modulePaths) && !$modulePaths instanceof Traversable) { throw new Exception\InvalidArgumentException( - sprintf('Argument passed to %s::%s() must be an array, ' - . 'implement the Traversable interface, or be an ' - . 'instance of Zend\Config\Config. %s given.', - __CLASS__, __METHOD__, gettype($modulePaths)) + sprintf( + 'Argument passed to %s::%s() must be an array, ' + . 'implement the Traversable interface, or be an ' + . 'instance of Zend\Config\Config. %s given.', + __CLASS__, + __METHOD__, + gettype($modulePaths) + ) ); } @@ -130,10 +134,14 @@ public function setConfigGlobPaths($configGlobPaths) { if (!is_array($configGlobPaths) && !$configGlobPaths instanceof Traversable) { throw new Exception\InvalidArgumentException( - sprintf('Argument passed to %s::%s() must be an array, ' - . 'implement the Traversable interface, or be an ' - . 'instance of Zend\Config\Config. %s given.', - __CLASS__, __METHOD__, gettype($configGlobPaths)) + sprintf( + 'Argument passed to %s::%s() must be an array, ' + . 'implement the Traversable interface, or be an ' + . 'instance of Zend\Config\Config. %s given.', + __CLASS__, + __METHOD__, + gettype($configGlobPaths) + ) ); } @@ -152,10 +160,14 @@ public function setConfigStaticPaths($configStaticPaths) { if (!is_array($configStaticPaths) && !$configStaticPaths instanceof Traversable) { throw new Exception\InvalidArgumentException( - sprintf('Argument passed to %s::%s() must be an array, ' - . 'implement the Traversable interface, or be an ' - . 'instance of Zend\Config\Config. %s given.', - __CLASS__, __METHOD__, gettype($configStaticPaths)) + sprintf( + 'Argument passed to %s::%s() must be an array, ' + . 'implement the Traversable interface, or be an ' + . 'instance of Zend\Config\Config. %s given.', + __CLASS__, + __METHOD__, + gettype($configStaticPaths) + ) ); } @@ -185,10 +197,14 @@ public function setExtraConfig($extraConfig) { if (!is_array($extraConfig) && !$extraConfig instanceof Traversable) { throw new Exception\InvalidArgumentException( - sprintf('Argument passed to %s::%s() must be an array, ' - . 'implement the Traversable interface, or be an ' - . 'instance of Zend\Config\Config. %s given.', - __CLASS__, __METHOD__, gettype($extraConfig)) + sprintf( + 'Argument passed to %s::%s() must be an array, ' + . 'implement the Traversable interface, or be an ' + . 'instance of Zend\Config\Config. %s given.', + __CLASS__, + __METHOD__, + gettype($extraConfig) + ) ); } diff --git a/src/ModuleEvent.php b/src/ModuleEvent.php index ccc39f3..8f51c25 100644 --- a/src/ModuleEvent.php +++ b/src/ModuleEvent.php @@ -61,10 +61,13 @@ public function getModuleName() public function setModuleName($moduleName) { if (!is_string($moduleName)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a string as an argument; %s provided' - ,__METHOD__, gettype($moduleName) - )); + throw new Exception\InvalidArgumentException( + sprintf( + '%s expects a string as an argument; %s provided', + __METHOD__, + gettype($moduleName) + ) + ); } // Performance tweak, don't add it as param. $this->moduleName = $moduleName; @@ -92,10 +95,13 @@ public function getModule() public function setModule($module) { if (!is_object($module)) { - throw new Exception\InvalidArgumentException(sprintf( - '%s expects a module object as an argument; %s provided' - ,__METHOD__, gettype($module) - )); + throw new Exception\InvalidArgumentException( + sprintf( + '%s expects a module object as an argument; %s provided', + __METHOD__, + gettype($module) + ) + ); } // Performance tweak, don't add it as param. $this->module = $module; diff --git a/src/ModuleManager.php b/src/ModuleManager.php index a1207e0..601491c 100644 --- a/src/ModuleManager.php +++ b/src/ModuleManager.php @@ -246,10 +246,13 @@ public function setModules($modules) if (is_array($modules) || $modules instanceof Traversable) { $this->modules = $modules; } else { - throw new Exception\InvalidArgumentException(sprintf( - 'Parameter to %s\'s %s method must be an array or implement the Traversable interface', - __CLASS__, __METHOD__ - )); + throw new Exception\InvalidArgumentException( + sprintf( + 'Parameter to %s\'s %s method must be an array or implement the Traversable interface', + __CLASS__, + __METHOD__ + ) + ); } return $this; }