| Conditions | 4 |
| Paths | 4 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | protected function matchForVariable(string $variable, stdClass $data): bool |
||
| 28 | { |
||
| 29 | if (!empty($data->id)) { |
||
| 30 | $citationItem = CiteProc::getContext()->getCitationItemById($data->id); |
||
| 31 | return !empty($citationItem) && !empty($citationItem->label) && $citationItem->label === $variable; |
||
| 32 | } |
||
| 33 | return false; |
||
| 34 | } |
||
| 36 |