Conditions | 2 |
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 ($fetch) { |
||
48 | $this->container->get('loevgaard_dandomain_altapay.terminal_synchronizer')->syncAll(); |
||
49 | |||
50 | return $this->findTerminalBySlug($slug, false); |
||
51 | } |
||
52 | |||
53 | return $terminal; |
||
54 | } |
||
55 | } |
||
56 |