| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function load(Tenant $tenant) |
||
| 29 | { |
||
| 30 | $data = (array) json_decode(json_encode($tenant->getData())); |
||
| 31 | $objects = Objects::parseFile($this->path, $data); |
||
| 32 | $manager = $this->staffRoleService->getManager(); |
||
| 33 | |||
| 34 | foreach ($objects as $object) { |
||
| 35 | $staff = $manager->getRepository(StaffEntity::class)->findOneBy(['uuid' => $object->staff]); |
||
| 36 | $role = $manager->getRepository(RoleEntity::class)->findOneBy(['uuid' => $object->role]); |
||
| 37 | $staffRole = $this->staffRoleService->createInstance(); |
||
| 38 | $staffRole |
||
| 39 | ->setStaff($staff) |
||
| 40 | ->setOwner($object->owner) |
||
| 41 | ->setOwnerUuid($object->owner_uuid) |
||
| 42 | ->setRole($role) |
||
| 43 | ->setTenant($object->tenant); |
||
| 44 | $manager->persist($staffRole); |
||
| 45 | $manager->flush(); |
||
| 46 | } |
||
| 49 |
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