| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function findTerminalBySlug(string $slug, $fetch = false): ?Terminal |
||
| 41 | { |
||
| 42 | /** @var Terminal $terminal */ |
||
| 43 | $terminal = $this->findOneBy([ |
||
| 44 | 'slug' => $slug, |
||
| 45 | ]); |
||
| 46 | |||
| 47 | if (!$terminal && $fetch) { |
||
| 48 | $this->sync(); |
||
| 49 | |||
| 50 | return $this->findTerminalBySlug($slug, false); |
||
| 51 | } |
||
| 52 | |||
| 53 | return $terminal; |
||
| 54 | } |
||
| 55 | |||
| 61 |