diff --git a/src/Hydrator/AbstractHydrator.php b/src/Hydrator/AbstractHydrator.php index 6d19ebb8c..4b320f18f 100644 --- a/src/Hydrator/AbstractHydrator.php +++ b/src/Hydrator/AbstractHydrator.php @@ -23,22 +23,22 @@ abstract class AbstractHydrator implements HydratorInterface, StrategyEnabledInt { /** * The list with strategies that this hydrator has. - * + * * @var ArrayObject */ protected $strategies; /** - * Initializes a new instance of this class. + * Initializes a new instance of this class. */ public function __construct() { $this->strategies = new ArrayObject(); } - + /** * Gets the strategy with the given name. - * + * * @param string $name The name of the strategy to get. * @return StrategyInterface */ @@ -46,10 +46,10 @@ public function getStrategy($name) { return $this->strategies[$name]; } - + /** * Checks if the strategy with the given name exists. - * + * * @param string $name The name of the strategy to check for. * @return bool */ @@ -57,10 +57,10 @@ public function hasStrategy($name) { return array_key_exists($name, $this->strategies); } - + /** * Adds the given strategy under the given name. - * + * * @param string $name The name of the strategy to register. * @param StrategyInterface $strategy The strategy to register. * @return HydratorInterface @@ -70,10 +70,10 @@ public function addStrategy($name, StrategyInterface $strategy) $this->strategies[$name] = $strategy; return $this; } - + /** * Removes the strategy with the given name. - * + * * @param string $name The name of the strategy to remove. * @return HydratorInterface */ @@ -82,10 +82,10 @@ public function removeStrategy($name) unset($this->strategies[$name]); return $this; } - + /** * Converts a value for extraction. If no strategy exists the plain value is returned. - * + * * @param string $name The name of the strategy to use. * @param mixed $value The value that should be converted. * @return mixed @@ -98,10 +98,10 @@ public function extractValue($name, $value) } return $value; } - + /** * Converts a value for hydration. If no strategy exists the plain value is returned. - * + * * @param string $name The name of the strategy to use. * @param mixed $value The value that should be converted. * @return mixed diff --git a/src/Hydrator/Reflection.php b/src/Hydrator/Reflection.php index 98588f6bb..22ff5569c 100644 --- a/src/Hydrator/Reflection.php +++ b/src/Hydrator/Reflection.php @@ -33,7 +33,7 @@ public function extract($object) $result = array(); foreach(self::getReflProperties($object) as $property) { $propertyName = $property->getName(); - + $value = $property->getValue($object); $result[$propertyName] = $this->extractValue($propertyName, $value); } diff --git a/src/Hydrator/Strategy/DefaultStrategy.php b/src/Hydrator/Strategy/DefaultStrategy.php index efd17e1d3..0bdc2e761 100644 --- a/src/Hydrator/Strategy/DefaultStrategy.php +++ b/src/Hydrator/Strategy/DefaultStrategy.php @@ -19,7 +19,7 @@ class DefaultStrategy implements StrategyInterface { /** * Converts the given value so that it can be extracted by the hydrator. - * + * * @param mixed $value The original value. * @return mixed Returns the value that should be extracted. */ @@ -30,7 +30,7 @@ public function extract($value) /** * Converts the given value so that it can be hydrated by the hydrator. - * + * * @param mixed $value The original value. * @return mixed Returns the value that should be hydrated. */ diff --git a/src/Hydrator/Strategy/StrategyInterface.php b/src/Hydrator/Strategy/StrategyInterface.php index 7f8fe8df4..56d576247 100644 --- a/src/Hydrator/Strategy/StrategyInterface.php +++ b/src/Hydrator/Strategy/StrategyInterface.php @@ -19,7 +19,7 @@ interface StrategyInterface { /** * Converts the given value so that it can be extracted by the hydrator. - * + * * @param mixed $value The original value. * @return mixed Returns the value that should be extracted. */ @@ -27,7 +27,7 @@ public function extract($value); /** * Converts the given value so that it can be hydrated by the hydrator. - * + * * @param mixed $value The original value. * @return mixed Returns the value that should be hydrated. */ diff --git a/src/Hydrator/StrategyEnabledInterface.php b/src/Hydrator/StrategyEnabledInterface.php index faff0abb8..413b48fe8 100644 --- a/src/Hydrator/StrategyEnabledInterface.php +++ b/src/Hydrator/StrategyEnabledInterface.php @@ -21,7 +21,7 @@ interface StrategyEnabledInterface { /** * Adds the given strategy under the given name. - * + * * @param string $name The name of the strategy to register. * @param StrategyInterface $strategy The strategy to register. * @return HydratorInterface @@ -30,7 +30,7 @@ public function addStrategy($name, StrategyInterface $strategy); /** * Gets the strategy with the given name. - * + * * @param string $name The name of the strategy to get. * @return StrategyInterface */ @@ -38,7 +38,7 @@ public function getStrategy($name); /** * Checks if the strategy with the given name exists. - * + * * @param string $name The name of the strategy to check for. * @return bool */ @@ -46,7 +46,7 @@ public function hasStrategy($name); /** * Removes the strategy with the given name. - * + * * @param string $name The name of the strategy to remove. * @return HydratorInterface */ diff --git a/test/TestAsset/HydratorStrategy.php b/test/TestAsset/HydratorStrategy.php index ba222ff59..abb7bf47e 100644 --- a/test/TestAsset/HydratorStrategy.php +++ b/test/TestAsset/HydratorStrategy.php @@ -16,11 +16,11 @@ class HydratorStrategy extends DefaultStrategy { /** * A simulated storage device which is just an array with Car objects. - * + * * @var array */ private $simulatedStorageDevice; - + public function __construct() { $this->simulatedStorageDevice = array(); @@ -28,7 +28,7 @@ public function __construct() $this->simulatedStorageDevice[] = new HydratorStrategyEntityB(222, 'BBB'); $this->simulatedStorageDevice[] = new HydratorStrategyEntityB(333, 'CCC'); } - + public function extract($value) { $result = array(); @@ -37,7 +37,7 @@ public function extract($value) } return $result; } - + public function hydrate($value) { $result = $value; @@ -49,7 +49,7 @@ public function hydrate($value) } return $result; } - + private function findEntity($field1) { $result = null; diff --git a/test/TestAsset/HydratorStrategyEntityA.php b/test/TestAsset/HydratorStrategyEntityA.php index 988cfa99a..641d44473 100644 --- a/test/TestAsset/HydratorStrategyEntityA.php +++ b/test/TestAsset/HydratorStrategyEntityA.php @@ -19,7 +19,7 @@ class HydratorStrategyEntityA implements InputFilterAwareInterface { public $entities; // public to make testing easier! private $inputFilter; // used to test forms - + public function __construct() { $this->entities = array(); @@ -46,14 +46,14 @@ public function getInputFilter() $input = new Input(); $input->setName('entities'); $input->setRequired(false); - + $this->inputFilter = new InputFilter(); $this->inputFilter->add($input); } return $this->inputFilter; } - + public function setInputFilter(InputFilterInterface $inputFilter) { $this->inputFilter = $inputFilter; diff --git a/test/TestAsset/HydratorStrategyEntityB.php b/test/TestAsset/HydratorStrategyEntityB.php index 273cb481d..e3be42ae1 100644 --- a/test/TestAsset/HydratorStrategyEntityB.php +++ b/test/TestAsset/HydratorStrategyEntityB.php @@ -16,29 +16,29 @@ class HydratorStrategyEntityB { private $field1; private $field2; - + public function __construct($field1, $field2) { $this->field1 = $field1; $this->field2 = $field2; } - + public function getField1() { return $this->field1; } - + public function getField2() { return $this->field2; } - + public function setField1($value) { $this->field1 = $value; return $this; } - + public function setField2($value) { $this->field2 = $value;