| Conditions | 4 |
| Paths | 4 |
| Total Lines | 27 |
| Code Lines | 16 |
| 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 | $staff = new StaffEntity; |
||
| 31 | $staff |
||
| 32 | ->setUuid($object->uuid) |
||
| 33 | ->setOwner($object->owner) |
||
| 34 | ->setOwnerUuid($object->owner_uuid) |
||
| 35 | ->setTenant($object->tenant); |
||
| 36 | |||
| 37 | foreach ($object->business_units as $uuid) { |
||
| 38 | $businessUnit = $this->getReference($uuid); |
||
| 39 | |||
| 40 | if (!$businessUnit) { |
||
| 41 | throw new LogicException('Business Unit "'.$uuid.'" does not exist.'); |
||
| 42 | } |
||
| 43 | |||
| 44 | $staff->addBusinessUnit($businessUnit); |
||
| 45 | } |
||
| 46 | |||
| 47 | $manager->persist($staff); |
||
| 48 | $this->setReference($object->uuid, $staff); |
||
| 49 | } |
||
| 50 | |||
| 51 | $manager->flush(); |
||
| 52 | } |
||
| 54 |
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