| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function equals(ScriptWitnessInterface $witness): bool |
||
| 18 | { |
||
| 19 | $nStack = count($this); |
||
| 20 | if ($nStack !== count($witness)) { |
||
| 21 | return false; |
||
| 22 | } |
||
| 23 | |||
| 24 | for ($i = 0; $i < $nStack; $i++) { |
||
| 25 | if (false === $this->offsetGet($i)->equals($witness->offsetGet($i))) { |
||
| 26 | return false; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | return true; |
||
| 31 | } |
||
| 32 | |||
| 41 |