| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.432 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | public function equals(ScriptWitnessInterface $witness) |
||
| 15 | 51 | { |
|
| 16 | $nStack = count($this); |
||
| 17 | 51 | if ($nStack !== count($witness)) { |
|
| 18 | 51 | return false; |
|
| 19 | 22 | } |
|
| 20 | |||
| 21 | for ($i = 0; $i < $nStack; $i++) { |
||
| 22 | 22 | if (false === $this->offsetGet($i)->equals($witness->offsetGet($i))) { |
|
| 23 | 28 | return false; |
|
| 24 | 51 | } |
|
| 25 | } |
||
| 26 | |||
| 27 | return true; |
||
| 28 | } |
||
| 29 | |||
| 38 |