| Conditions | 7 |
| Paths | 8 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 56 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function equals($target) { |
||
| 36 | if(!($target instanceof self) || count($this->operands) !== count($target->operands)) { |
||
| 37 | return false; |
||
| 38 | } |
||
| 39 | |||
| 40 | foreach($this->operands as $operand1) { |
||
| 41 | $matched = false; |
||
| 42 | foreach($this->operands as $operand2) { |
||
| 43 | if($operand1->equals($operand2)) { |
||
| 44 | $matched = true; |
||
| 45 | break; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | if(!$matched) { |
||
| 49 | return false; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | return true; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |