We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
17 | class KeyNested extends AbstractRelated |
||
18 | { |
||
19 | 16 | public function hasReference($input) |
|
29 | |||
30 | 12 | private function getReferencePieces() |
|
34 | |||
35 | 10 | private function getValueFromArray($array, $key) |
|
44 | |||
45 | 4 | private function getValueFromObject($object, $property) |
|
54 | |||
55 | 12 | private function getValue($value, $key) |
|
56 | { |
||
57 | 12 | if (is_array($value) || $value instanceof ArrayAccess) { |
|
58 | 10 | return $this->getValueFromArray($value, $key); |
|
59 | } |
||
60 | |||
61 | 4 | if (is_object($value)) { |
|
62 | 4 | return $this->getValueFromObject($value, $key); |
|
63 | } |
||
64 | |||
65 | 1 | $message = sprintf('Cannot select the property %s from the given data', $this->reference); |
|
66 | 1 | throw new ComponentException($message); |
|
67 | } |
||
68 | |||
69 | 16 | public function getReferenceValue($input) |
|
84 | } |
||
85 |