Lines 100.00% 1 / 1
Methods 100.00% 1 / 1
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
37final readonly class Agent
38{
39    public const string READ = 'agent:read';
40
41    public const string ITEM = 'agent:item';
42
43    /**
44     * @param array<string, int|string|null>|null                                                                                                                                $latestStats with the latest stats part
45     * @param list<array<string, int|string|null>>|null                                                                                                                          $history     with the stats history part, newest first
46     * @param list<array{date: string, endDate: string|null, text: string}>|null                                                                                                 $events      the custom timeline events, with the stats history part, newest first
47     * @param list<array{bannerId: string, title: string, missions: int, picture: string|null, startLatitude: float|null, startLongitude: float|null, doneAt: string|null}>|null $doneBanners newest on the list first
48     */
49    public function __construct(
50        #[ApiProperty(identifier: true)]
51        #[Groups([self::READ])]
52        public string $agentName,
53        /** From the latest stats; null without stats. */
54        #[Groups([self::READ])]
55        public ?string $faction = null,
56        #[Groups([self::READ])]
57        public ?int $level = null,
58        /** The Google profile picture (data: URI), with the avatar part. */
59        #[Groups([self::READ])]
60        public ?string $avatar = null,
61        #[Groups([self::ITEM])]
62        public ?array $latestStats = null,
63        #[Groups([self::ITEM])]
64        public ?array $history = null,
65        #[Groups([self::ITEM])]
66        public ?array $events = null,
67        /** With the custom medals part. */
68        #[Groups([self::ITEM])]
69        public ?CustomMedals $customMedals = null,
70        /** With the Bannergress part, once the agent synced it. */
71        #[Groups([self::ITEM])]
72        public ?Bannergress $bannergress = null,
73        /** The done list with the days, with the Bannergress part. */
74        #[Groups([self::ITEM])]
75        public ?array $doneBanners = null,
76    ) {
77    }
78}