| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ProfileBuilder |
||
| 10 | { |
||
| 11 | private const LoginRating = 80; |
||
| 12 | |||
| 13 | private const ActionRating = 20; |
||
| 14 | |||
| 15 | public function __construct(private readonly User $user) |
||
| 17 | } |
||
| 18 | |||
| 19 | public function set(): void |
||
| 20 | { |
||
| 21 | $this->user->load([ |
||
| 22 | 'person:id,name,appellative,birthday,phone', |
||
| 23 | 'group:id,name', 'role:id,name', 'avatar:id,user_id', |
||
| 24 | ]); |
||
| 25 | |||
| 26 | $this->build(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function build(): void |
||
| 35 | } |
||
| 36 | |||
| 37 | private function rating(): int |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.