Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | final class GetByPublicProperty implements GetterStrategy |
||
23 | { |
||
24 | /** |
||
25 | * The name of the property |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | public $propertyName; |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param string $propertyName |
||
35 | */ |
||
36 | 2 | public function __construct(string $propertyName) |
|
39 | 2 | } |
|
40 | |||
41 | /** |
||
42 | * Get value from object by public property |
||
43 | * |
||
44 | * @param object $object |
||
45 | * @return mixed |
||
46 | */ |
||
47 | 2 | public function get($object) |
|
52 |