Passed
Push — master ( 6d0b22...d6cda5 )
by Théo
01:59
created

SymbolType::getAllSpecificTypes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Humbug\PhpScoper\Console\Command;
6
7
// TODO: make this an enum in PHP 8.1
8
final class SymbolType
9
{
10
    public const CLASS_TYPE = 'class';
11
    public const FUNCTION_TYPE = 'function';
12
    public const CONSTANT_TYPE = 'constant';
13
    public const ANY_TYPE = 'any';
14
15
    public const ALL = [
16
        self::CLASS_TYPE,
17
        self::FUNCTION_TYPE,
18
        self::CONSTANT_TYPE,
19
        self::ANY_TYPE,
20
    ];
21
22
    /**
23
     * @return list<self::*_TYPE>
0 ignored issues
show
Bug introduced by
The type Humbug\PhpScoper\Console\Command\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...
24
     */
25
    public static function getAllSpecificTypes(): array
26
    {
27
        return [
0 ignored issues
show
Bug Best Practice introduced by
The expression return array(self::CLASS...E, self::CONSTANT_TYPE) returns the type array<integer,string> which is incompatible with the documented return type Humbug\PhpScoper\Console\Command\list.
Loading history...
28
            self::CLASS_TYPE,
29
            self::FUNCTION_TYPE,
30
            self::CONSTANT_TYPE,
31
        ];
32
    }
33
}
34