From 774aa59eb9e60f75c762b2b87d40483355231aba Mon Sep 17 00:00:00 2001 From: Chad Gray Date: Sun, 13 Jul 2014 08:01:54 -0400 Subject: [PATCH] PHPCS fixes for Zend\Server --- library/Zend/Server/Cache.php | 8 ++------ library/Zend/Server/Exception/BadMethodCallException.php | 4 +--- .../Zend/Server/Exception/InvalidArgumentException.php | 4 +--- library/Zend/Server/Exception/RuntimeException.php | 4 +--- library/Zend/Server/Reflection/AbstractFunction.php | 6 +++--- .../Reflection/Exception/BadMethodCallException.php | 4 +--- .../Reflection/Exception/InvalidArgumentException.php | 4 +--- .../Zend/Server/Reflection/Exception/RuntimeException.php | 4 +--- library/Zend/Server/Reflection/Node.php | 4 +--- 9 files changed, 12 insertions(+), 30 deletions(-) diff --git a/library/Zend/Server/Cache.php b/library/Zend/Server/Cache.php index c45f3940c03..f4f16e611fb 100644 --- a/library/Zend/Server/Cache.php +++ b/library/Zend/Server/Cache.php @@ -36,9 +36,7 @@ class Cache */ public static function save($filename, Server $server) { - if (!is_string($filename) - || (!file_exists($filename) && !is_writable(dirname($filename))) - ) { + if (!is_string($filename) || (!file_exists($filename) && !is_writable(dirname($filename)))) { return false; } @@ -98,9 +96,7 @@ public static function save($filename, Server $server) */ public static function get($filename, Server $server) { - if (!is_string($filename) - || !file_exists($filename) - || !is_readable($filename)) { + if (!is_string($filename) || !file_exists($filename) || !is_readable($filename)) { return false; } diff --git a/library/Zend/Server/Exception/BadMethodCallException.php b/library/Zend/Server/Exception/BadMethodCallException.php index 2ea3d550f93..fd84128dab2 100644 --- a/library/Zend/Server/Exception/BadMethodCallException.php +++ b/library/Zend/Server/Exception/BadMethodCallException.php @@ -9,8 +9,6 @@ namespace Zend\Server\Exception; -class BadMethodCallException - extends \BadMethodCallException - implements ExceptionInterface +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface { } diff --git a/library/Zend/Server/Exception/InvalidArgumentException.php b/library/Zend/Server/Exception/InvalidArgumentException.php index c3c0a0a98ef..f13d1b47461 100644 --- a/library/Zend/Server/Exception/InvalidArgumentException.php +++ b/library/Zend/Server/Exception/InvalidArgumentException.php @@ -9,8 +9,6 @@ namespace Zend\Server\Exception; -class InvalidArgumentException - extends \InvalidArgumentException - implements ExceptionInterface +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/library/Zend/Server/Exception/RuntimeException.php b/library/Zend/Server/Exception/RuntimeException.php index cc53b7eccc4..79cca5e3d65 100644 --- a/library/Zend/Server/Exception/RuntimeException.php +++ b/library/Zend/Server/Exception/RuntimeException.php @@ -9,8 +9,6 @@ namespace Zend\Server\Exception; -class RuntimeException - extends \RuntimeException - implements ExceptionInterface +class RuntimeException extends \RuntimeException implements ExceptionInterface { } diff --git a/library/Zend/Server/Reflection/AbstractFunction.php b/library/Zend/Server/Reflection/AbstractFunction.php index 1f288316d66..8bae5461383 100644 --- a/library/Zend/Server/Reflection/AbstractFunction.php +++ b/library/Zend/Server/Reflection/AbstractFunction.php @@ -282,8 +282,9 @@ protected function reflect() } } elseif ($nParamTypesTmp != $paramCount) { throw new Exception\RuntimeException( - 'Variable number of arguments is not supported for services (except optional parameters). ' - . 'Number of function arguments must correspond to actual number of arguments described in a docblock.'); + 'Variable number of arguments is not supported for services (except optional parameters). ' + . 'Number of function arguments must correspond to actual number of arguments described in a docblock.' + ); } $paramTypes = array(); @@ -297,7 +298,6 @@ protected function reflect() $this->buildSignatures($return, $returnDesc, $paramTypes, $paramDesc); } - /** * Proxy reflection calls * diff --git a/library/Zend/Server/Reflection/Exception/BadMethodCallException.php b/library/Zend/Server/Reflection/Exception/BadMethodCallException.php index eb4c152e91d..be60e4d61b4 100644 --- a/library/Zend/Server/Reflection/Exception/BadMethodCallException.php +++ b/library/Zend/Server/Reflection/Exception/BadMethodCallException.php @@ -11,8 +11,6 @@ use Zend\Server\Exception; -class BadMethodCallException - extends Exception\BadMethodCallException - implements ExceptionInterface +class BadMethodCallException extends Exception\BadMethodCallException implements ExceptionInterface { } diff --git a/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php b/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php index 2803eb24863..4a02a09a9dd 100644 --- a/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php +++ b/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php @@ -11,8 +11,6 @@ use Zend\Server\Exception; -class InvalidArgumentException - extends Exception\InvalidArgumentException - implements ExceptionInterface +class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface { } diff --git a/library/Zend/Server/Reflection/Exception/RuntimeException.php b/library/Zend/Server/Reflection/Exception/RuntimeException.php index be51f236bda..538c75289c8 100644 --- a/library/Zend/Server/Reflection/Exception/RuntimeException.php +++ b/library/Zend/Server/Reflection/Exception/RuntimeException.php @@ -11,8 +11,6 @@ use Zend\Server\Exception; -class RuntimeException - extends Exception\RuntimeException - implements ExceptionInterface +class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { } diff --git a/library/Zend/Server/Reflection/Node.php b/library/Zend/Server/Reflection/Node.php index e0f4268eddc..9770640d90d 100644 --- a/library/Zend/Server/Reflection/Node.php +++ b/library/Zend/Server/Reflection/Node.php @@ -168,9 +168,7 @@ public function getEndPoints() if (null === $value) { $endPoints[] = $this; - } elseif ((null !== $value) - && $child->hasChildren() - ) { + } elseif ((null !== $value) && $child->hasChildren()) { $childEndPoints = $child->getEndPoints(); if (!empty($childEndPoints)) { $endPoints = array_merge($endPoints, $childEndPoints);