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