Conditions | 4 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function prePersist(LifecycleEventArgs $eventArgs, SortableInterface $entity): void |
||
|
|||
44 | { |
||
45 | if ($entity->getSort() === null) { |
||
46 | $collection = $entity->getSortCollection(); |
||
47 | if ($collection === null && $entity instanceof AbstractDynamicPage) { |
||
48 | $collection = $this->contentRepository->findPageByType(get_class($entity)); |
||
49 | } |
||
50 | $entity->setSort($entity->calculateSort(true, $collection)); |
||
51 | } |
||
54 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.