Conditions | 4 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
39 | 4 | protected function matchForVariable(string $variable, stdClass $data): bool |
|
40 | { |
||
41 | 4 | if (!empty($data->id)) { |
|
42 | 4 | $id = $data->id; |
|
43 | 4 | $citationItem = getCurrentById($this->citationItems, $id); |
|
44 | 4 | return !empty($citationItem) && !empty($citationItem->label) && $citationItem->label === $variable; |
|
45 | } |
||
46 | return false; |
||
47 | } |
||
49 |