diff --git a/src/DispatchableInterface.php b/src/DispatchableInterface.php index ab672fa13..296e1301a 100644 --- a/src/DispatchableInterface.php +++ b/src/DispatchableInterface.php @@ -9,17 +9,14 @@ namespace Zend\Stdlib; -use Zend\Stdlib\RequestInterface as Request; -use Zend\Stdlib\ResponseInterface as Response; - interface DispatchableInterface { /** * Dispatch a request * - * @param Request $request - * @param null|Response $response + * @param RequestInterface $request + * @param null|ResponseInterface $response * @return Response|mixed */ - public function dispatch(Request $request, Response $response = null); + public function dispatch(RequestInterface $request, ResponseInterface $response = null); } diff --git a/src/Hydrator/AbstractHydrator.php b/src/Hydrator/AbstractHydrator.php index 4cb9a4356..729260f91 100644 --- a/src/Hydrator/AbstractHydrator.php +++ b/src/Hydrator/AbstractHydrator.php @@ -149,7 +149,7 @@ public function getFilter() * * * $composite->addFilter("servicelocator", - * function($property) { + * function ($property) { * list($class, $method) = explode('::', $property); * if ($method === 'getServiceLocator') { * return false; diff --git a/src/Hydrator/ClassMethods.php b/src/Hydrator/ClassMethods.php index df1f2ea3e..a3d76ceff 100644 --- a/src/Hydrator/ClassMethods.php +++ b/src/Hydrator/ClassMethods.php @@ -183,7 +183,7 @@ public function hydrate(array $data, $object) foreach ($data as $property => $value) { $method = 'set' . ucfirst($property); if ($this->underscoreSeparatedKeys) { - $method = preg_replace_callback('/(_[a-z])/', $transform, $method); + $method = preg_replace_callback('/(_[a-z])/i', $transform, $method); } if (is_callable(array($object, $method))) { $value = $this->hydrateValue($property, $value, $data); diff --git a/src/Hydrator/Filter/FilterComposite.php b/src/Hydrator/Filter/FilterComposite.php index f5ce7e9c8..35bb437c0 100644 --- a/src/Hydrator/Filter/FilterComposite.php +++ b/src/Hydrator/Filter/FilterComposite.php @@ -41,7 +41,7 @@ class FilterComposite implements FilterInterface public function __construct($orFilter = array(), $andFilter = array()) { array_walk($orFilter, - function($value, $key) { + function ($value, $key) { if ( !is_callable($value) && !$value instanceof FilterInterface @@ -55,7 +55,7 @@ function($value, $key) { ); array_walk($andFilter, - function($value, $key) { + function ($value, $key) { if ( !is_callable($value) && !$value instanceof FilterInterface @@ -79,7 +79,7 @@ function($value, $key) { * This example will exclude all methods from the hydration, that starts with 'getService' * * $composite->addFilter('exclude', - * function($method) { + * function ($method) { * if (preg_match('/^getService/', $method) { * return false; * } diff --git a/src/Hydrator/Filter/OptionalParametersFilter.php b/src/Hydrator/Filter/OptionalParametersFilter.php index de9703780..9fa1de07e 100644 --- a/src/Hydrator/Filter/OptionalParametersFilter.php +++ b/src/Hydrator/Filter/OptionalParametersFilter.php @@ -32,8 +32,8 @@ class OptionalParametersFilter implements FilterInterface */ public function filter($property) { - if (isset(self::$propertiesCache[$property])) { - return self::$propertiesCache[$property]; + if (isset(static::$propertiesCache[$property])) { + return static::$propertiesCache[$property]; } try { @@ -49,6 +49,6 @@ function (ReflectionParameter $parameter) { } ); - return self::$propertiesCache[$property] = empty($mandatoryParameters); + return static::$propertiesCache[$property] = empty($mandatoryParameters); } } diff --git a/src/Hydrator/Reflection.php b/src/Hydrator/Reflection.php index 1c093c88b..fae361aab 100644 --- a/src/Hydrator/Reflection.php +++ b/src/Hydrator/Reflection.php @@ -64,8 +64,7 @@ public function hydrate(array $data, $object) * Get a reflection properties from in-memory cache and lazy-load if * class has not been loaded. * - * @static - * @param string|object $input + * @param string|object $input * @throws Exception\InvalidArgumentException * @return array */ @@ -77,14 +76,17 @@ protected static function getReflProperties($input) throw new Exception\InvalidArgumentException('Input must be a string or an object.'); } - if (!isset(static::$reflProperties[$input])) { - $reflClass = new ReflectionClass($input); - $reflProperties = $reflClass->getProperties(); + if (isset(static::$reflProperties[$input])) { + return static::$reflProperties[$input]; + } - foreach ($reflProperties as $property) { - $property->setAccessible(true); - static::$reflProperties[$input][$property->getName()] = $property; - } + static::$reflProperties[$input] = array(); + $reflClass = new ReflectionClass($input); + $reflProperties = $reflClass->getProperties(); + + foreach ($reflProperties as $property) { + $property->setAccessible(true); + static::$reflProperties[$input][$property->getName()] = $property; } return static::$reflProperties[$input]; diff --git a/src/Hydrator/Strategy/ClosureStrategy.php b/src/Hydrator/Strategy/ClosureStrategy.php index 1367b5c06..e2b32a640 100644 --- a/src/Hydrator/Strategy/ClosureStrategy.php +++ b/src/Hydrator/Strategy/ClosureStrategy.php @@ -13,7 +13,7 @@ class ClosureStrategy implements StrategyInterface { /** * Function, used in extract method, default: - * function($value) { + * function ($value) { * return $value; * }; * @var callable @@ -22,7 +22,7 @@ class ClosureStrategy implements StrategyInterface /** * Function, used in hydrate method, default: - * function($value) { + * function ($value) { * return $value; * }; * @var callable @@ -32,11 +32,11 @@ class ClosureStrategy implements StrategyInterface /** * You can describe how your values will extract and hydrate, like this: * $hydrator->addStrategy('category', new ClosureStrategy( - * function(Category $value) { - * return (int)$value->id; + * function (Category $value) { + * return (int) $value->id; * }, - * function($value) { - * return new Category((int)$value); + * function ($value) { + * return new Category((int) $value); * } * )); * @@ -54,7 +54,7 @@ public function __construct($extractFunc = null, $hydrateFunc = null) $this->extractFunc = $extractFunc; } else { - $this->extractFunc = function($value) { + $this->extractFunc = function ($value) { return $value; }; } @@ -66,7 +66,7 @@ public function __construct($extractFunc = null, $hydrateFunc = null) $this->hydrateFunc = $hydrateFunc; } else { - $this->hydrateFunc = function($value) { + $this->hydrateFunc = function ($value) { return $value; }; } diff --git a/src/PriorityQueue.php b/src/PriorityQueue.php index bf6a624ac..21cca340a 100644 --- a/src/PriorityQueue.php +++ b/src/PriorityQueue.php @@ -271,7 +271,7 @@ public function hasPriority($priority) /** * Get the inner priority queue instance * - * @throws \DomainException + * @throws Exception\DomainException * @return SplPriorityQueue */ protected function getQueue() @@ -279,7 +279,7 @@ protected function getQueue() if (null === $this->queue) { $this->queue = new $this->queueClass(); if (!$this->queue instanceof \SplPriorityQueue) { - throw new \DomainException(sprintf( + throw new Exception\DomainException(sprintf( 'PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"', get_class($this->queue) )); diff --git a/test/ArrayObjectTest.php b/test/ArrayObjectTest.php index 67fe014f1..09a695cfd 100644 --- a/test/ArrayObjectTest.php +++ b/test/ArrayObjectTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/ArrayUtilsTest.php b/test/ArrayUtilsTest.php index 20cb1a912..1ad2fc150 100644 --- a/test/ArrayUtilsTest.php +++ b/test/ArrayUtilsTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/CallbackHandlerTest.php b/test/CallbackHandlerTest.php index 1688ed4ce..2a05c94c7 100644 --- a/test/CallbackHandlerTest.php +++ b/test/CallbackHandlerTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -13,9 +12,6 @@ use Zend\Stdlib\CallbackHandler; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class CallbackHandlerTest extends \PHPUnit_Framework_TestCase diff --git a/test/DateTimeTest.php b/test/DateTimeTest.php index 7f4cfa00b..3aa542dae 100644 --- a/test/DateTimeTest.php +++ b/test/DateTimeTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -13,9 +12,6 @@ use Zend\Stdlib\DateTime; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class DateTimeTest extends \PHPUnit_Framework_TestCase diff --git a/test/ErrorHandlerTest.php b/test/ErrorHandlerTest.php index 363f464ac..3b8343622 100644 --- a/test/ErrorHandlerTest.php +++ b/test/ErrorHandlerTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/FilterTest.php b/test/FilterTest.php index 8a393b228..366357936 100644 --- a/test/FilterTest.php +++ b/test/FilterTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service */ namespace ZendTest\Stdlib; diff --git a/test/GlobTest.php b/test/GlobTest.php index 996c80e2e..a06651216 100644 --- a/test/GlobTest.php +++ b/test/GlobTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/Hydrator/ReflectionTest.php b/test/Hydrator/ReflectionTest.php new file mode 100644 index 000000000..90a7ceb5f --- /dev/null +++ b/test/Hydrator/ReflectionTest.php @@ -0,0 +1,47 @@ +hydrator = new Reflection(); + } + + public function testCanExtract() + { + $this->assertSame(array(), $this->hydrator->extract(new stdClass())); + } + + public function testCanHydrate() + { + $object = new stdClass(); + + $this->assertSame($object, $this->hydrator->hydrate(array('foo' => 'bar'), $object)); + } +} diff --git a/test/HydratorClosureStrategyTest.php b/test/HydratorClosureStrategyTest.php index ae4d227ef..5ff37c269 100644 --- a/test/HydratorClosureStrategyTest.php +++ b/test/HydratorClosureStrategyTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -14,9 +13,6 @@ use Zend\Stdlib\Hydrator\Strategy\ClosureStrategy; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class HydratorClosureStrategyTest extends \PHPUnit_Framework_TestCase @@ -77,13 +73,13 @@ public function testRetrieveStrategy() public function testExtractingObjects() { $this->hydrator->addStrategy('field1', new ClosureStrategy( - function($value) { + function ($value) { return sprintf('%s', $value); }, null )); $this->hydrator->addStrategy('field2', new ClosureStrategy( - function($value) { + function ($value) { return sprintf('hello, %s!', $value); }, null @@ -100,13 +96,13 @@ public function testHydratingObjects() { $this->hydrator->addStrategy('field2', new ClosureStrategy( null, - function($value) { + function ($value) { return sprintf('hello, %s!', $value); } )); $this->hydrator->addStrategy('field3', new ClosureStrategy( null, - function($value) { + function ($value) { return new TestAsset\HydratorClosureStrategyEntity($value, sprintf('111%s', $value)); } )); @@ -116,9 +112,9 @@ function($value) { $values = $this->hydrator->extract($entity); $values['field3'] = 333; - $this->assertCount(2, (array)$entity); + $this->assertCount(2, (array) $entity); $this->hydrator->hydrate($values, $entity); - $this->assertCount(3, (array)$entity); + $this->assertCount(3, (array) $entity); $this->assertInstanceOf('ZendTest\Stdlib\TestAsset\HydratorClosureStrategyEntity', $entity->field3); } diff --git a/test/HydratorObjectPropertyTest.php b/test/HydratorObjectPropertyTest.php index 8547e9ffa..4a1c6372e 100644 --- a/test/HydratorObjectPropertyTest.php +++ b/test/HydratorObjectPropertyTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/HydratorStrategyTest.php b/test/HydratorStrategyTest.php index 926cfbf3f..95e379250 100644 --- a/test/HydratorStrategyTest.php +++ b/test/HydratorStrategyTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -14,9 +13,6 @@ use Zend\Stdlib\Hydrator\ClassMethods; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class HydratorStrategyTest extends \PHPUnit_Framework_TestCase diff --git a/test/HydratorTest.php b/test/HydratorTest.php index bbccfe8c6..1e55c5942 100644 --- a/test/HydratorTest.php +++ b/test/HydratorTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -32,9 +31,6 @@ /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class HydratorTest extends \PHPUnit_Framework_TestCase @@ -156,8 +152,6 @@ public function testHydratorClassMethodsCamelCase() $this->assertEquals($test->hasBar(), false); } - - public function testHydratorClassMethodsTitleCase() { $hydrator = new ClassMethods(false); @@ -194,7 +188,6 @@ public function testHydratorClassMethodsTitleCase() $this->assertEquals($test->getHasBar(), false); } - public function testHydratorClassMethodsUnderscore() { $hydrator = new ClassMethods(true); @@ -235,6 +228,30 @@ public function testHydratorClassMethodsUnderscore() $this->assertEquals($test->hasBar(), false); } + public function testHydratorClassMethodsUnderscoreWithUnderscoreUpperCasedHydrateDataKeys() + { + $hydrator = new ClassMethods(true); + $datas = $hydrator->extract($this->classMethodsUnderscore); + $test = $hydrator->hydrate( + array( + 'FOO_BAR' => 'foo', + 'FOO_BAR_BAZ' => 'bar', + 'IS_FOO' => false, + 'IS_BAR' => false, + 'HAS_FOO' => false, + 'HAS_BAR' => false, + ), + $this->classMethodsUnderscore + ); + $this->assertSame($this->classMethodsUnderscore, $test); + $this->assertEquals($test->getFooBar(), 'foo'); + $this->assertEquals($test->getFooBarBaz(), 'bar'); + $this->assertEquals($test->getIsFoo(), false); + $this->assertEquals($test->isBar(), false); + $this->assertEquals($test->getHasFoo(), false); + $this->assertEquals($test->hasBar(), false); + } + public function testHydratorClassMethodsOptions() { $hydrator = new ClassMethods(); @@ -348,7 +365,7 @@ public function testHydratorClassMethodsWithCustomFilter() $hydrator = new ClassMethods(false); $datas = $hydrator->extract($this->classMethodsCamelCase); $hydrator->addFilter("exclude", - function($property) { + function ($property) { list($class, $method) = explode('::', $property); if ($method == 'getHasFoo') { @@ -378,7 +395,7 @@ public function testArraySerializableFilter($hydrator, $serializable) $hydrator->extract($serializable) ); - $hydrator->addFilter("foo", function($property) { + $hydrator->addFilter("foo", function ($property) { if ($property == "foo") { return false; } @@ -394,7 +411,7 @@ public function testArraySerializableFilter($hydrator, $serializable) $hydrator->extract($serializable) ); - $hydrator->addFilter("len", function($property) { + $hydrator->addFilter("len", function ($property) { if (strlen($property) !== 3) { return false; } diff --git a/test/MessageTest.php b/test/MessageTest.php index 2e2c1c296..29cf1058e 100644 --- a/test/MessageTest.php +++ b/test/MessageTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Http; diff --git a/test/OptionsTest.php b/test/OptionsTest.php index 51a4f429a..8d47f23fc 100644 --- a/test/OptionsTest.php +++ b/test/OptionsTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/ParametersTest.php b/test/ParametersTest.php index 52617fac0..86491e27a 100644 --- a/test/ParametersTest.php +++ b/test/ParametersTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/PriorityQueueTest.php b/test/PriorityQueueTest.php index 0dcfc18d5..649ee1ace 100644 --- a/test/PriorityQueueTest.php +++ b/test/PriorityQueueTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -13,9 +12,6 @@ use Zend\Stdlib\PriorityQueue; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class PriorityQueueTest extends \PHPUnit_Framework_TestCase diff --git a/test/SignalHandlers/InstanceMethod.php b/test/SignalHandlers/InstanceMethod.php index 00481467c..f28a9a8d1 100644 --- a/test/SignalHandlers/InstanceMethod.php +++ b/test/SignalHandlers/InstanceMethod.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\SignalHandlers; diff --git a/test/SignalHandlers/Invokable.php b/test/SignalHandlers/Invokable.php index f8c46d572..3e041eb3c 100644 --- a/test/SignalHandlers/Invokable.php +++ b/test/SignalHandlers/Invokable.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\SignalHandlers; diff --git a/test/SignalHandlers/ObjectCallback.php b/test/SignalHandlers/ObjectCallback.php index f4840f208..23392ed28 100644 --- a/test/SignalHandlers/ObjectCallback.php +++ b/test/SignalHandlers/ObjectCallback.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\SignalHandlers; diff --git a/test/SignalHandlers/Overloadable.php b/test/SignalHandlers/Overloadable.php index 23384ebd5..c43ead37f 100644 --- a/test/SignalHandlers/Overloadable.php +++ b/test/SignalHandlers/Overloadable.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\SignalHandlers; diff --git a/test/SplPriorityQueueTest.php b/test/SplPriorityQueueTest.php index e57f3f579..cfacb191a 100644 --- a/test/SplPriorityQueueTest.php +++ b/test/SplPriorityQueueTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -13,9 +12,6 @@ use Zend\Stdlib\SplPriorityQueue; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class SplPriorityQueueTest extends \PHPUnit_Framework_TestCase diff --git a/test/SplQueueTest.php b/test/SplQueueTest.php index 2ffca75ea..df42637d7 100644 --- a/test/SplQueueTest.php +++ b/test/SplQueueTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -13,9 +12,6 @@ use Zend\Stdlib\SplQueue; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class SplQueueTest extends \PHPUnit_Framework_TestCase diff --git a/test/SplStackTest.php b/test/SplStackTest.php index 663b46919..223e47bba 100644 --- a/test/SplStackTest.php +++ b/test/SplStackTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; @@ -13,9 +12,6 @@ use Zend\Stdlib\SplStack; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class SplStackTest extends \PHPUnit_Framework_TestCase diff --git a/test/Strategy/SerializableStrategyTest.php b/test/Strategy/SerializableStrategyTest.php index 5e221e640..4c5a85700 100644 --- a/test/Strategy/SerializableStrategyTest.php +++ b/test/Strategy/SerializableStrategyTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\Strategy; diff --git a/test/StringUtilsTest.php b/test/StringUtilsTest.php index 7d049eacd..e18d63bb6 100644 --- a/test/StringUtilsTest.php +++ b/test/StringUtilsTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib; diff --git a/test/StringWrapper/CommonStringWrapperTest.php b/test/StringWrapper/CommonStringWrapperTest.php index e88b2a841..a403ffd35 100644 --- a/test/StringWrapper/CommonStringWrapperTest.php +++ b/test/StringWrapper/CommonStringWrapperTest.php @@ -5,8 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib - * @subpackage StringWrapper */ namespace ZendTest\Stdlib\StringWrapper; diff --git a/test/StringWrapper/IconvTest.php b/test/StringWrapper/IconvTest.php index ec3b0db24..fa2cb2a7b 100644 --- a/test/StringWrapper/IconvTest.php +++ b/test/StringWrapper/IconvTest.php @@ -5,8 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib - * @subpackage StringWrapper */ namespace ZendTest\Stdlib\StringWrapper; diff --git a/test/StringWrapper/IntlTest.php b/test/StringWrapper/IntlTest.php index d3092f60b..eda586453 100644 --- a/test/StringWrapper/IntlTest.php +++ b/test/StringWrapper/IntlTest.php @@ -5,8 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib - * @subpackage StringWrapper */ namespace ZendTest\Stdlib\StringWrapper; diff --git a/test/StringWrapper/MbStringTest.php b/test/StringWrapper/MbStringTest.php index d024afaa6..01c9f8f41 100644 --- a/test/StringWrapper/MbStringTest.php +++ b/test/StringWrapper/MbStringTest.php @@ -5,8 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib - * @subpackage StringWrapper */ namespace ZendTest\Stdlib\StringWrapper; diff --git a/test/StringWrapper/NativeTest.php b/test/StringWrapper/NativeTest.php index b54e41daa..09ec62350 100644 --- a/test/StringWrapper/NativeTest.php +++ b/test/StringWrapper/NativeTest.php @@ -5,8 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib - * @subpackage StringWrapper */ namespace ZendTest\Stdlib\StringWrapper; diff --git a/test/TestAsset/AggregateObject.php b/test/TestAsset/AggregateObject.php index 41745a6af..d73b2c454 100644 --- a/test/TestAsset/AggregateObject.php +++ b/test/TestAsset/AggregateObject.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ArrayObjectIterator.php b/test/TestAsset/ArrayObjectIterator.php index f472b676d..5b2027a3a 100644 --- a/test/TestAsset/ArrayObjectIterator.php +++ b/test/TestAsset/ArrayObjectIterator.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ArrayObjectObjectVars.php b/test/TestAsset/ArrayObjectObjectVars.php index deb487670..8448588a1 100644 --- a/test/TestAsset/ArrayObjectObjectVars.php +++ b/test/TestAsset/ArrayObjectObjectVars.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ArraySerializable.php b/test/TestAsset/ArraySerializable.php index 96f1e74f9..389ea2910 100644 --- a/test/TestAsset/ArraySerializable.php +++ b/test/TestAsset/ArraySerializable.php @@ -5,15 +5,11 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class ArraySerializable implements \Zend\Stdlib\ArraySerializableInterface diff --git a/test/TestAsset/ClassMethodsCamelCase.php b/test/TestAsset/ClassMethodsCamelCase.php index f850aa43b..317b24600 100644 --- a/test/TestAsset/ClassMethodsCamelCase.php +++ b/test/TestAsset/ClassMethodsCamelCase.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsCamelCaseMissing.php b/test/TestAsset/ClassMethodsCamelCaseMissing.php index ed2f0363f..b140caf63 100644 --- a/test/TestAsset/ClassMethodsCamelCaseMissing.php +++ b/test/TestAsset/ClassMethodsCamelCaseMissing.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsFilterProviderInterface.php b/test/TestAsset/ClassMethodsFilterProviderInterface.php index b24b8210a..9e4e65cca 100644 --- a/test/TestAsset/ClassMethodsFilterProviderInterface.php +++ b/test/TestAsset/ClassMethodsFilterProviderInterface.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsInvalidParameter.php b/test/TestAsset/ClassMethodsInvalidParameter.php index cf9338865..2a760e0e6 100644 --- a/test/TestAsset/ClassMethodsInvalidParameter.php +++ b/test/TestAsset/ClassMethodsInvalidParameter.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsMagicMethodSetter.php b/test/TestAsset/ClassMethodsMagicMethodSetter.php index 8cf00a150..ff9cdd9b5 100644 --- a/test/TestAsset/ClassMethodsMagicMethodSetter.php +++ b/test/TestAsset/ClassMethodsMagicMethodSetter.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsOptionalParameters.php b/test/TestAsset/ClassMethodsOptionalParameters.php index 7ee946e38..f56af51b5 100644 --- a/test/TestAsset/ClassMethodsOptionalParameters.php +++ b/test/TestAsset/ClassMethodsOptionalParameters.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsProtectedSetter.php b/test/TestAsset/ClassMethodsProtectedSetter.php index 9f9085257..cff604b5d 100644 --- a/test/TestAsset/ClassMethodsProtectedSetter.php +++ b/test/TestAsset/ClassMethodsProtectedSetter.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsTitleCase.php b/test/TestAsset/ClassMethodsTitleCase.php index 8375e18a9..aca681331 100644 --- a/test/TestAsset/ClassMethodsTitleCase.php +++ b/test/TestAsset/ClassMethodsTitleCase.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ClassMethodsUnderscore.php b/test/TestAsset/ClassMethodsUnderscore.php index e44a06304..b5b083134 100644 --- a/test/TestAsset/ClassMethodsUnderscore.php +++ b/test/TestAsset/ClassMethodsUnderscore.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/FilterCompositeTest.php b/test/TestAsset/FilterCompositeTest.php index b16be6418..20b6c4305 100644 --- a/test/TestAsset/FilterCompositeTest.php +++ b/test/TestAsset/FilterCompositeTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service */ namespace ZendTest\Stdlib; @@ -25,7 +24,7 @@ public function testValidationAdd() { $this->assertTrue($this->filterComposite->filter("foo")); $this->filterComposite->addFilter("has", - function($property) { + function ($property) { return false; } ); @@ -35,7 +34,7 @@ function($property) { public function testValidationRemove() { $this->filterComposite->addFilter("has", - function($property) { + function ($property) { return false; } ); @@ -47,7 +46,7 @@ function($property) { public function testValidationHas() { $this->filterComposite->addFilter("has", - function($property) { + function ($property) { return false; } ); @@ -62,7 +61,7 @@ public function testComplexValidation() $this->filterComposite->addFilter("is", new \Zend\Stdlib\Hydrator\Filter\IsFilter()); $this->filterComposite->addFilter("exclude", - function($property) { + function ($property) { $method = substr($property, strpos($property, '::')); if ($method === 'getServiceLocator') { @@ -80,13 +79,13 @@ function($property) { public function testConstructorInjection() { $andCondition = array( - 'servicelocator' => function($property) { + 'servicelocator' => function ($property) { if ($property === 'getServiceLocator') { return false; } return true; }, - 'foobar' => function($property) { + 'foobar' => function ($property) { if ($property === 'getFooBar') { return false; } @@ -109,10 +108,10 @@ public function testConstructorInjection() public function testWithOnlyAndFiltersAdded() { $filter = new FilterComposite(); - $filter->addFilter("foobarbaz", function($property) { + $filter->addFilter("foobarbaz", function ($property) { return true; }, FilterComposite::CONDITION_AND); - $filter->addFilter("foobar", function($property) { + $filter->addFilter("foobar", function ($property) { return true; }, FilterComposite::CONDITION_AND); $this->assertTrue($filter->filter("foo")); @@ -121,10 +120,10 @@ public function testWithOnlyAndFiltersAdded() public function testWithOnlyOrFiltersAdded() { $filter = new FilterComposite(); - $filter->addFilter("foobarbaz", function($property) { + $filter->addFilter("foobarbaz", function ($property) { return true; }); - $filter->addFilter("foobar", function($property) { + $filter->addFilter("foobar", function ($property) { return false; }); $this->assertTrue($filter->filter("foo")); @@ -133,17 +132,17 @@ public function testWithOnlyOrFiltersAdded() public function testWithComplexCompositeAdded() { $filter1 = new FilterComposite(); - $filter1->addFilter("foobarbaz", function($property) { + $filter1->addFilter("foobarbaz", function ($property) { return true; }); - $filter1->addFilter("foobar", function($property) { + $filter1->addFilter("foobar", function ($property) { return false; }); $filter2 = new FilterComposite(); - $filter2->addFilter("bar", function($property) { + $filter2->addFilter("bar", function ($property) { return true; }, FilterComposite::CONDITION_AND); - $filter2->addFilter("barblubb", function($property) { + $filter2->addFilter("barblubb", function ($property) { return true; }, FilterComposite::CONDITION_AND); $this->assertTrue($filter1->filter("foo")); @@ -151,7 +150,7 @@ public function testWithComplexCompositeAdded() $filter1->addFilter("bar", $filter2); $this->assertTrue($filter1->filter("blubb")); - $filter1->addFilter("blubb", function($property) { return false; }, FilterComposite::CONDITION_AND); + $filter1->addFilter("blubb", function ($property) { return false; }, FilterComposite::CONDITION_AND); $this->assertFalse($filter1->filter("test")); } diff --git a/test/TestAsset/HydratorClosureStrategyEntity.php b/test/TestAsset/HydratorClosureStrategyEntity.php index bceaebb6b..0deea416d 100644 --- a/test/TestAsset/HydratorClosureStrategyEntity.php +++ b/test/TestAsset/HydratorClosureStrategyEntity.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/HydratorStrategy.php b/test/TestAsset/HydratorStrategy.php index af49c1b97..417d06b29 100644 --- a/test/TestAsset/HydratorStrategy.php +++ b/test/TestAsset/HydratorStrategy.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/HydratorStrategyEntityA.php b/test/TestAsset/HydratorStrategyEntityA.php index 602127e71..1e4f95054 100644 --- a/test/TestAsset/HydratorStrategyEntityA.php +++ b/test/TestAsset/HydratorStrategyEntityA.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/HydratorStrategyEntityB.php b/test/TestAsset/HydratorStrategyEntityB.php index 825d2a91e..adabe1fec 100644 --- a/test/TestAsset/HydratorStrategyEntityB.php +++ b/test/TestAsset/HydratorStrategyEntityB.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ObjectProperty.php b/test/TestAsset/ObjectProperty.php index 6f412078a..c873ddfa4 100644 --- a/test/TestAsset/ObjectProperty.php +++ b/test/TestAsset/ObjectProperty.php @@ -5,15 +5,11 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class ObjectProperty diff --git a/test/TestAsset/Reflection.php b/test/TestAsset/Reflection.php index dff9b1b01..f2d70184f 100644 --- a/test/TestAsset/Reflection.php +++ b/test/TestAsset/Reflection.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/ReflectionFilter.php b/test/TestAsset/ReflectionFilter.php index e74bb058e..071677d08 100644 --- a/test/TestAsset/ReflectionFilter.php +++ b/test/TestAsset/ReflectionFilter.php @@ -5,15 +5,11 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; /** - * @category Zend - * @package Zend_Stdlib - * @subpackage UnitTests * @group Zend_Stdlib */ class ReflectionFilter diff --git a/test/TestAsset/TestOptions.php b/test/TestAsset/TestOptions.php index d59177559..a2a254bfb 100644 --- a/test/TestAsset/TestOptions.php +++ b/test/TestAsset/TestOptions.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset; diff --git a/test/TestAsset/TestOptionsNoStrict.php b/test/TestAsset/TestOptionsNoStrict.php index 92e13e7fa..4de06ebaf 100644 --- a/test/TestAsset/TestOptionsNoStrict.php +++ b/test/TestAsset/TestOptionsNoStrict.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace ZendTest\Stdlib\TestAsset;