1 | <?php |
||
19 | class ValueObject implements ValueObjectInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var mixed |
||
23 | */ |
||
24 | protected $value; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $type; |
||
30 | |||
31 | /** |
||
32 | * Class Constructor |
||
33 | */ |
||
34 | 179 | public function __construct($value) |
|
39 | |||
40 | /** |
||
41 | * @param $field |
||
42 | * @param $value |
||
43 | * @throws \RuntimeException |
||
44 | * @return void |
||
|
|||
45 | */ |
||
46 | 1 | public function __set($field, $value) |
|
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | 31 | public function __toString() |
|
60 | |||
61 | /** |
||
62 | * @return string |
||
63 | */ |
||
64 | 11 | public function getType() |
|
68 | |||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | 1 | public function hash() |
|
77 | |||
78 | /** |
||
79 | * @param $object |
||
80 | * @return mixed |
||
81 | */ |
||
82 | 1 | public function cloneObject($object) |
|
86 | |||
87 | /** |
||
88 | * @param $string |
||
89 | * @return static |
||
90 | */ |
||
91 | 14 | public static function fromString($string) |
|
95 | |||
96 | /** |
||
97 | * @return mixed |
||
98 | */ |
||
99 | 147 | public function getValue() |
|
103 | |||
104 | /** |
||
105 | * @param ValueObject $object |
||
106 | * @return bool |
||
107 | */ |
||
108 | 2 | public function equals(ValueObject $object) |
|
112 | |||
113 | /** |
||
114 | * @inheritdoc |
||
115 | */ |
||
116 | 169 | public function __destruct() |
|
120 | |||
121 | /** |
||
122 | * @param ValueObject $object |
||
123 | * @return ValueObject |
||
124 | */ |
||
125 | 2 | public function diff(ValueObject $object) |
|
152 | |||
153 | 9 | public function count() |
|
173 | } |
||
174 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.