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