Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
25 | final class RememberMeToken extends AbstractToken implements TokenInterface |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Creates a RememberMeToken |
||
30 | * |
||
31 | * @param UserInterface $user |
||
32 | * @phpstan-param UserInterface $user |
||
33 | * @param string $secret |
||
34 | */ |
||
35 | public function __construct( |
||
36 | UserInterface $user, |
||
37 | #[SensitiveParameter] |
||
38 | private string $secret |
||
39 | ) { |
||
40 | $this->user = $user; |
||
41 | $roles = $this->user()?->roles(); |
||
42 | parent::__construct($roles ?? []); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * RememberMeToken secret |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function secret(): string |
||
51 | { |
||
52 | return $this->secret; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @inheritDoc |
||
57 | */ |
||
58 | public function __serialize(): array |
||
59 | { |
||
60 | return [$this->secret, parent::__serialize()]; |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @inheritDoc |
||
65 | * @param array<string|int, mixed> $data |
||
66 | */ |
||
67 | public function __unserialize(array $data): void |
||
72 | } |
||
73 | } |
||
74 |
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