| Conditions | 8 |
| Paths | 10 |
| Total Lines | 30 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function load(ObjectManager $manager) |
||
| 26 | { |
||
| 27 | $eventManager = $manager->getEventManager(); |
||
| 28 | |||
| 29 | foreach ($eventManager->getListeners() as $event => $listeners) { |
||
| 30 | foreach ($listeners as $key => $listener) { |
||
| 31 | if (is_object($listener) && $listener instanceof UserListener) { |
||
| 32 | $listener->setEnabled(false); |
||
| 33 | } else if (is_string($listener) && $listener === UserListener::class) { |
||
| 34 | $eventManager->removeEventListener(['postPersist'], $listener); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | $objects = $this->parse($this->path); |
||
| 40 | |||
| 41 | foreach ($objects as $object) { |
||
| 42 | $registration = new RegistrationEntity; |
||
| 43 | $registration |
||
| 44 | ->setUuid($object->uuid) |
||
| 45 | ->setOwner($object->owner) |
||
| 46 | ->setOwnerUuid($object->owner_uuid) |
||
| 47 | ->setUsername($object->username) |
||
| 48 | ->setPassword($object->password) |
||
| 49 | ->setData($object->data) |
||
| 50 | ->setTenant($object->tenant); |
||
| 51 | $manager->persist($registration); |
||
| 52 | } |
||
| 53 | |||
| 54 | $manager->flush(); |
||
| 55 | } |
||
| 57 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths