| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function findTerminalByTitle(string $title, $fetch = false): ?Terminal |
||
| 19 | { |
||
| 20 | /** @var Terminal $terminal */ |
||
| 21 | $terminal = $this->findOneBy([ |
||
| 22 | 'title' => $title, |
||
| 23 | ]); |
||
| 24 | |||
| 25 | if (!$terminal && $fetch) { |
||
| 26 | $this->sync(); |
||
| 27 | |||
| 28 | return $this->findTerminalByTitle($title, false); |
||
| 29 | } |
||
| 30 | |||
| 31 | return $terminal; |
||
| 32 | } |
||
| 33 | |||
| 61 |