Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class PsalmEnum |
||
12 | { |
||
13 | /** @use ConstantsEnumTrait<T> */ |
||
14 | use ConstantsEnumTrait; |
||
15 | |||
16 | public const FIRST = 1; |
||
17 | public const SECOND = 2; |
||
18 | |||
19 | /** |
||
20 | * @psalm-param T $value |
||
21 | * @psalm-assert T $value |
||
22 | */ |
||
23 | public function __construct(int $value) |
||
24 | { |
||
25 | $this->member = static::valueToMember($value); |
||
26 | $this->value = $value; |
||
27 | } |
||
28 | |||
29 | private static function fromMemberAndValue(string $member, int $value): self |
||
32 | } |
||
33 | } |
||
38 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.