We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 19 | class KeyNested extends AbstractRelated |
||
| 20 | { |
||
| 21 | 13 | public function hasReference($input) |
|
| 31 | |||
| 32 | 9 | private function getReferencePieces() |
|
| 36 | |||
| 37 | 7 | private function getValueFromArray($array, $key) |
|
| 46 | |||
| 47 | 2 | private function getValueFromObject($object, $property) |
|
| 56 | |||
| 57 | 9 | private function getValue($value, $key) |
|
| 58 | { |
||
| 59 | 9 | if (is_array($value) || $value instanceof ArrayAccess) { |
|
| 60 | 7 | return $this->getValueFromArray($value, $key); |
|
| 61 | } |
||
| 62 | |||
| 63 | 2 | if (is_object($value)) { |
|
| 64 | 2 | return $this->getValueFromObject($value, $key); |
|
| 65 | } |
||
| 66 | |||
| 67 | $message = sprintf('Cannot select the property %s from the given data', $this->reference); |
||
| 68 | throw new ComponentException($message); |
||
| 69 | } |
||
| 70 | |||
| 71 | 13 | public function getReferenceValue($input) |
|
| 86 | } |
||
| 87 |