| Conditions | 6 |
| Paths | 6 |
| Total Lines | 41 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function load(ObjectManager $manager) |
||
| 26 | { |
||
| 27 | $objects = $this->parse($this->path); |
||
| 28 | |||
| 29 | foreach ($objects as $object) { |
||
| 30 | $system = $this->getReference($object->system); |
||
| 31 | |||
| 32 | if (!$system) { |
||
| 33 | throw new LogicException('System "'.$object->system.'" does not exist.'); |
||
| 34 | } |
||
| 35 | |||
| 36 | $systemRole = new SystemRoleEntity; |
||
| 37 | $systemRole |
||
| 38 | ->setSystem($system) |
||
| 39 | ->setUuid($object->uuid) |
||
| 40 | ->setOwner($object->owner) |
||
| 41 | ->setOwnerUuid($object->owner_uuid) |
||
| 42 | ->setTenant($object->tenant); |
||
| 43 | |||
| 44 | $role = $this->getReference($object->role); |
||
| 45 | |||
| 46 | if (!$role) { |
||
| 47 | throw new LogicException('Role "'.$object->role.'" does not exist.'); |
||
| 48 | } |
||
| 49 | |||
| 50 | $systemRole->setRole($role); |
||
| 51 | |||
| 52 | foreach ($object->business_units as $uuid) { |
||
| 53 | $businessUnit = $this->getReference($uuid); |
||
| 54 | |||
| 55 | if (!$businessUnit) { |
||
| 56 | throw new LogicException('Business Unit "'.$uuid.'" does not exist.'); |
||
| 57 | } |
||
| 58 | |||
| 59 | $systemRole->addBusinessUnit($businessUnit); |
||
| 60 | } |
||
| 61 | |||
| 62 | $manager->persist($systemRole); |
||
| 63 | } |
||
| 64 | |||
| 65 | $manager->flush(); |
||
| 66 | } |
||
| 68 |
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