Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class DoctrineEntityListener |
||
9 | { |
||
10 | /** |
||
11 | * @var IndexProcessManager |
||
12 | */ |
||
13 | private $indexProcessManager; |
||
14 | |||
15 | /** |
||
16 | * @param IndexProcessManager $indexProcessManager |
||
17 | */ |
||
18 | public function __construct(IndexProcessManager $indexProcessManager) |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @param $entity |
||
25 | * @param LifecycleEventArgs $event |
||
26 | */ |
||
27 | public function postUpdate($entity, LifecycleEventArgs $event) |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param $entity |
||
34 | * @param LifecycleEventArgs $event |
||
35 | */ |
||
36 | public function preRemove($entity, LifecycleEventArgs $event) |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param $entity |
||
43 | * @param LifecycleEventArgs $event |
||
44 | */ |
||
45 | public function postPersist($entity, LifecycleEventArgs $event) |
||
46 | { |
||
47 | $this->reindexEntity($entity); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param $entity |
||
52 | */ |
||
53 | private function reindexEntity($entity) |
||
54 | { |
||
55 | $this->indexProcessManager->reindex($entity); |
||
56 | } |
||
57 | |||
58 | private function removeEntity($entity) |
||
61 | } |
||
62 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.