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 — develop ( 9e9d51...fc7292 )
by Borut
03:13
created

Helpers::rglob()   B

Complexity

Conditions 6
Paths 4

Size

Total Lines 19
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
rs 8.8571
cc 6
eloc 10
nc 4
nop 3
1
<?php
2
3
namespace Application\Tool;
4
5
/**
6
 * @author Borut Balažek <[email protected]>
7
 */
8
class Helpers
9
{
10
    /**
11
     * @param string $pattern
12
     * @param int    $flags
13
     * @param string $path
14
     *
15
     * @return array
16
     */
17
    public static function rglob($pattern = '*', $flags = 0, $path = '')
18
    {
19
        if (!$path && ($dir = dirname($pattern)) != '.') {
20
            if ($dir == '\\' || $dir == '/') {
21
                $dir = '';
22
            }
23
24
            return self::rglob(basename($pattern), $flags, $dir.'/');
25
        }
26
27
        $paths = glob($path.'*', GLOB_ONLYDIR | GLOB_NOSORT);
28
        $files = glob($path.$pattern, $flags);
29
30
        foreach ($paths as $p) {
31
            $files = array_merge($files, self::rglob($pattern, $flags, $p.'/'));
32
        }
33
34
        return $files;
35
    }
36
}
37