| Conditions | 4 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | 39 | public function compile($negate = false) { |
|
| 50 | 39 | if (!$negate) { |
|
| 51 | return function(Node $n) { |
||
| 52 | 30 | return $n->type() == $this->id() |
|
| 53 | 30 | || $n->type() == $this->id()." reference"; |
|
| 54 | 31 | }; |
|
| 55 | } |
||
| 56 | else { |
||
| 57 | 9 | return function(Node $n) { |
|
| 58 | 9 | return $n->type() != $this->id() |
|
| 59 | 9 | && $n->type() != $this->id()." reference"; |
|
| 60 | 9 | }; |
|
| 61 | } |
||
| 62 | } |
||
| 63 | } |
||
| 65 |