Total Complexity | 8 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class AchievementManager implements AchievementManagerInterface |
||
13 | { |
||
14 | /** @var array<string> */ |
||
15 | private static array $achievements = []; |
||
16 | |||
17 | 7 | public function __construct( |
|
21 | |||
22 | 211 | #[Override] |
|
23 | public function getAchievements(): array |
||
24 | { |
||
25 | 211 | return self::$achievements; |
|
26 | } |
||
27 | |||
28 | 7 | #[Override] |
|
29 | public function checkDatabaseItem(?int $databaseEntryId, User $user): void |
||
30 | { |
||
31 | if ( |
||
32 | 7 | $databaseEntryId === null |
|
33 | 7 | || $databaseEntryId < 1 |
|
34 | ) { |
||
35 | 4 | return; |
|
36 | } |
||
37 | |||
38 | 3 | if (!$this->databaseUserRepository->exists($user->getId(), $databaseEntryId)) { |
|
39 | 1 | $entry = $this->createDatabaseEntry->createDatabaseEntryForUser($user, $databaseEntryId); |
|
40 | |||
41 | 1 | if ($entry !== null) { |
|
42 | 1 | self::$achievements[] = sprintf( |
|
43 | 1 | 'Neuer Datenbankeintrag: %s (+%d Punkte)', |
|
44 | 1 | $entry->getDescription(), |
|
45 | 1 | $entry->getCategory()->getPoints() |
|
46 | 1 | ); |
|
47 | } |
||
48 | } |
||
49 | } |
||
50 | |||
51 | 222 | #[Override] |
|
55 | } |
||
56 | } |
||
57 |
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