@@ -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 | } |
@@ -103,6 +103,10 @@ |
||
103 | 103 | } |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @param string $name |
|
108 | + * @param \Closure $cast |
|
109 | + */ |
|
106 | 110 | private function setScalarValue($property, $value, $name, $cast) |
107 | 111 | { |
108 | 112 | $method = '__to' . $name; |
@@ -29,7 +29,6 @@ discard block |
||
29 | 29 | |
30 | 30 | /** |
31 | 31 | * @param object $object The object to access |
32 | - * @param ReflectionModel|null $reflect A reflection entity |
|
33 | 32 | */ |
34 | 33 | public function __construct($object) |
35 | 34 | { |
@@ -61,7 +60,7 @@ discard block |
||
61 | 60 | * permissions |
62 | 61 | * |
63 | 62 | * @param string $key The property to read |
64 | - * @return mixed The property's value |
|
63 | + * @return \Reflector The property's value |
|
65 | 64 | * @throws CannotReadPropertyException In the event the property |
66 | 65 | * does not exist |
67 | 66 | */ |
@@ -80,7 +79,7 @@ discard block |
||
80 | 79 | * Adds a value to a property, irrespective of access permissions |
81 | 80 | * |
82 | 81 | * @param string $key The property to write to |
83 | - * @param mixed $value The value to add |
|
82 | + * @param \Spaark\CompositeUtils\Model\Reflection\Reflector $value The value to add |
|
84 | 83 | * @throws CannotWritePropertyException In the event the property |
85 | 84 | * does not exist |
86 | 85 | */ |
@@ -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, |