Total Complexity | 5 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 7 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class SkyNetService |
||
9 | { |
||
10 | |||
11 | private static ?User $botUser = null; |
||
12 | |||
13 | public function __construct( |
||
17 | |||
18 | public function discoveryBotUser(): void |
||
19 | { |
||
20 | if (!self::$botUser) |
||
21 | $bots = ['R2D2', 'C3PO', 'T800', 'SkyNet']; |
||
22 | |||
23 | $online = array_rand($bots); |
||
24 | $bot = $bots[$online]; |
||
25 | self::$botUser = $this->manager->getRepository(User::class)->findOneBy(['username' => $bot]); |
||
26 | if (!self::$botUser) { |
||
27 | self::$botUser = new User(); |
||
28 | self::$botUser->setUserName($bot); |
||
29 | self::$botUser->setHash('872844840.0'); |
||
30 | self::$botUser->setPeople($this->domainService->getPeopleDomain()->getPeople()); |
||
31 | $this->manager->persist(self::$botUser); |
||
32 | $this->manager->flush(); |
||
33 | } |
||
34 | } |
||
35 | public function getBotUser(): ?User |
||
38 | } |
||
39 | } |
||
40 |
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