| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 7 | private function valueExists(NodeValueInterface $value, int $outerIndex): bool |
|
| 37 | { |
||
| 38 | 7 | foreach ($this->values as $innerIndex => $addedValue) { |
|
| 39 | 4 | if (!$addedValue->getPath()->equals($value->getPath())) { |
|
| 40 | 2 | continue; |
|
| 41 | } |
||
| 42 | 2 | $addedOuterIndex = $this->outerIndexes[$innerIndex]; |
|
| 43 | 2 | if ($outerIndex == $addedOuterIndex) { |
|
| 44 | 1 | return true; |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | throw new Exception\ValueInListWithAnotherOuterIndexException($value, $addedOuterIndex, $outerIndex); |
|
| 48 | } |
||
| 49 | |||
| 50 | 7 | return false; |
|
| 51 | } |
||
| 53 |