Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | final class PropertyChanged implements ClassBased |
||
16 | { |
||
17 | /** @var PropertyBased */ |
||
18 | private $checkProperty; |
||
19 | |||
20 | public function __construct(PropertyBased $checkProperty) |
||
21 | { |
||
22 | $this->checkProperty = $checkProperty; |
||
23 | } |
||
24 | |||
25 | public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
||
26 | { |
||
27 | return Changes::fromIterator($this->checkSymbols( |
||
28 | $fromClass->getProperties(), |
||
29 | $toClass->getProperties() |
||
30 | )); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param ReflectionProperty[] $from |
||
35 | * @param ReflectionProperty[] $to |
||
36 | * |
||
37 | * @return iterable|Change[] |
||
38 | */ |
||
39 | private function checkSymbols(array $from, array $to) : iterable |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 |