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.
Completed
Push — master ( 03fc69...ce7332 )
by Cees-Jan
02:08
created

ProcSelfFd::list()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 4.0312

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 7
cts 8
cp 0.875
rs 9.7998
c 0
b 0
f 0
cc 4
nc 4
nop 0
crap 4.0312
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\FileDescriptors;
4
5
final class ProcSelfFd
6
{
7
    private const PATH = '/proc/self/fd';
8
9 1
    public static function list(): iterable
10
    {
11 1
        $fds = @\scandir(self::PATH, \SCANDIR_SORT_NONE);
12
13 1
        if ($fds === false) {
14
            throw new \Exception(\error_get_last()['mesage']);
15
        }
16
17 1
        foreach ($fds as $id) {
18 1
            if (!\in_array($id, ['.', '..'], true)) {
19 1
                yield $id;
20
            }
21
        }
22 1
    }
23
}
24