| Conditions | 5 |
| Paths | 6 |
| Total Lines | 37 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function load(ObjectManager $manager) |
||
| 27 | { |
||
| 28 | $objects = $this->parse($this->path); |
||
| 29 | |||
| 30 | foreach ($objects as $object) { |
||
| 31 | $organization = $this->getReference($object->organization); |
||
| 32 | |||
| 33 | if (!$organization) { |
||
| 34 | throw new LogicException('Organization "'.$object->organization.'" does not exist.'); |
||
| 35 | } |
||
| 36 | |||
| 37 | $organizationRole = new OrganizationRoleEntity; |
||
| 38 | $organizationRole |
||
| 39 | ->setOrganization($organization) |
||
| 40 | ->setUuid($object->uuid) |
||
| 41 | ->setOwner($object->owner) |
||
| 42 | ->setOwnerUuid($object->owner_uuid) |
||
| 43 | ->setEntityUuids((array) $object->entity_uuids) |
||
| 44 | ->setTenant($object->tenant); |
||
| 45 | |||
| 46 | if (null !== $object->created_at) { |
||
| 47 | $date = new DateTime; |
||
| 48 | $date->setTimestamp($object->created_at); |
||
| 49 | $organizationRole->setCreatedAt($date); |
||
| 50 | } |
||
| 51 | |||
| 52 | $role = $this->getReference($object->role); |
||
| 53 | |||
| 54 | if (!$role) { |
||
| 55 | throw new LogicException('Role "'.$object->role.'" does not exist.'); |
||
| 56 | } |
||
| 57 | |||
| 58 | $organizationRole->setRole($role); |
||
| 59 | $manager->persist($organizationRole); |
||
| 60 | } |
||
| 61 | |||
| 62 | $manager->flush(); |
||
| 63 | } |
||
| 65 |
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