IntegerEnum   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A values() 0 8 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sunrise\Hydrator\Tests\Fixture;
6
7
enum IntegerEnum: int
8
{
9
    case FOO = 1697021457;
10
    case BAR = 1697021458;
11
    case BAZ = 1697021459;
12
13
    /**
14
     * @return list<int>
0 ignored issues
show
Bug introduced by
The type Sunrise\Hydrator\Tests\Fixture\list was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
     */
16
    public static function values(): array
17
    {
18
        $values = [];
19
        foreach (self::cases() as $case) {
20
            $values[] = $case->value;
21
        }
22
23
        return $values;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $values returns the type array|integer[] which is incompatible with the documented return type Sunrise\Hydrator\Tests\Fixture\list.
Loading history...
24
    }
25
}
26