Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class CityService extends AbstractService |
||
14 | { |
||
15 | private EntityManagerInterface $em; |
||
16 | |||
17 | public function __construct( |
||
18 | CsrfTokenManagerInterface $tokenManager, |
||
19 | RequestStack $requestStack, |
||
20 | EntityManagerInterface $entityManager |
||
21 | ) { |
||
22 | parent::__construct($tokenManager, $requestStack); |
||
23 | $this->em = $entityManager; |
||
24 | } |
||
25 | |||
26 | public function create(City $city): void |
||
27 | { |
||
28 | $this->save($city); |
||
29 | $this->clearCache('cities_count'); |
||
30 | $this->addFlash('success', 'message.created'); |
||
31 | } |
||
32 | |||
33 | public function update(City $city): void |
||
37 | } |
||
38 | |||
39 | public function remove(City $city): void |
||
45 | } |
||
46 | |||
47 | private function save(City $city): void |
||
53 |