GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 15-15 lines in 2 locations

src/functions.php 2 locations

@@ 23-37 (lines=15) @@
20
 *
21
 * @return iterable
22
 */
23
function listClassesInDirectories(string ...$directories): iterable
24
{
25
    $sourceLocator = new AggregateSourceLocator([
26
        new DirectoriesSourceLocator(
27
            $directories,
28
            (new BetterReflection())->astLocator()
29
        ),
30
        // ↓ required to autoload parent classes/interface from another directory than /src (e.g. /vendor)
31
        new AutoloadSourceLocator((new BetterReflection())->astLocator()),
32
    ]);
33
34
    foreach ((new ClassReflector($sourceLocator))->getAllClasses() as $class) {
35
        yield $class->getName();
36
    }
37
}
38
39
/**
40
 * get a list of all classes in the given directory.
@@ 58-72 (lines=15) @@
55
 *
56
 * @return iterable
57
 */
58
function listClassesInFile(string $file): iterable
59
{
60
    $sourceLocator = new AggregateSourceLocator([
61
        new SingleFileSourceLocator(
62
            $file,
63
            (new BetterReflection())->astLocator()
64
        ),
65
        // ↓ required to autoload parent classes/interface from another directory (e.g. /vendor)
66
        new AutoloadSourceLocator((new BetterReflection())->astLocator()),
67
    ]);
68
69
    foreach ((new ClassReflector($sourceLocator))->getAllClasses() as $class) {
70
        yield $class->getName();
71
    }
72
}
73
74
/**
75
 * get a list of all classes in the given files.