Conditions | 2 |
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 ($fetch) { |
||
26 | $this->container->get('loevgaard_dandomain_altapay.terminal_synchronizer')->syncAll(); |
||
27 | |||
28 | return $this->findTerminalByTitle($title, false); |
||
29 | } |
||
30 | |||
31 | return $terminal; |
||
32 | } |
||
33 | |||
56 |