| @@ -39,7 +39,7 @@ | ||
| 39 | 39 |      { | 
| 40 | 40 | preg_match_all | 
| 41 | 41 | ( | 
| 42 | - '/^' | |
| 42 | + '/^' | |
| 43 | 43 | . '[ \t]*\*[ \t]*' | 
| 44 | 44 | . '@([a-zA-Z]+)' | 
| 45 | 45 | . '(.*)' | 
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | private function getScalar($value) | 
| 28 | 28 |      { | 
| 29 | 29 | return | 
| 30 | - (is_object($value) ? spl_object_hash($value) | |
| 30 | + (is_object($value) ? spl_object_hash($value) | |
| 31 | 31 | : (is_array($value) ? implode($value) | 
| 32 | 32 | : ( (string)$value))); | 
| 33 | 33 | } | 
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 |      { | 
| 11 | 11 | parent::__construct | 
| 12 | 12 | ( | 
| 13 | - 'Cannot ' . static::ACCESS_TYPE . ' non existent ' | |
| 13 | + 'Cannot ' . static::ACCESS_TYPE . ' non existent ' | |
| 14 | 14 | . 'property: ' . $class . '::$' . $property, | 
| 15 | 15 | 0, | 
| 16 | 16 | $previous | 
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | private function getScalar($value) | 
| 28 | 28 |      { | 
| 29 | 29 | return | 
| 30 | - (is_object($value) ? spl_object_hash($value) | |
| 30 | + (is_object($value) ? spl_object_hash($value) | |
| 31 | 31 | : (is_array($value) ? implode($value) | 
| 32 | 32 | : ( (string)$value))); | 
| 33 | 33 | } | 
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 |      { | 
| 18 | 18 | parent::__construct | 
| 19 | 19 | ( | 
| 20 | - 'Tried to set an illegal property type for ' | |
| 20 | + 'Tried to set an illegal property type for ' | |
| 21 | 21 | . $class .'::$' . $property . '. Excpected ' . $expected | 
| 22 | 22 | . ', got ' . $got, | 
| 23 | 23 | 0, | 
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 |      { | 
| 11 | 11 | parent::__construct | 
| 12 | 12 | ( | 
| 13 | - 'Tried to read unreadable property ' | |
| 13 | + 'Tried to read unreadable property ' | |
| 14 | 14 | . $class . '::$' . $property, | 
| 15 | 15 | 0, | 
| 16 | 16 | $previous | 
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 |      { | 
| 11 | 11 | parent::__construct | 
| 12 | 12 | ( | 
| 13 | - 'Tried to write to unwritable property ' | |
| 13 | + 'Tried to write to unwritable property ' | |
| 14 | 14 | . $class . '::$' . $property, | 
| 15 | 15 | 0, | 
| 16 | 16 | $previous | 
| @@ -32,6 +32,9 @@ discard block | ||
| 32 | 32 | */ | 
| 33 | 33 | protected $reflect; | 
| 34 | 34 | |
| 35 | + /** | |
| 36 | + * @param \Spaark\CompositeUtils\Traits\PropertyAccessTrait $object | |
| 37 | + */ | |
| 35 | 38 | public function __construct($object, ReflectionComposite $reflect) | 
| 36 | 39 |      { | 
| 37 | 40 | parent::__construct($object); | 
| @@ -127,6 +130,10 @@ discard block | ||
| 127 | 130 | } | 
| 128 | 131 | } | 
| 129 | 132 | |
| 133 | + /** | |
| 134 | + * @param string $name | |
| 135 | + * @param \Closure $cast | |
| 136 | + */ | |
| 130 | 137 | private function setScalarValue($property, $value, $name, $cast) | 
| 131 | 138 |      { | 
| 132 | 139 | $method = '__to' . $name; |