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 ( 7f64b4...3b8bf4 )
by Freek
01:23
created

FilenameCompleter::search()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Spatie\PhpUnitWatcher\Screens\Completers;
4
5
class FilenameCompleter extends Completer
6
{
7
    /**
8
     * Search for files and directories corresponding to the word to complete
9
     *
10
     * @return array
11
     */
12
    protected function search() {
13
        return glob($this->word . '*', GLOB_MARK) ?: [];
14
    }
15
16
    /**
17
     * Append a quote if path is prefixed with a quote, except for directories
18
     *
19
     * @param string $path
20
     * @return string
21
     */
22
    protected function appendQuoteIfNeeded($path)
23
    {
24
        if (is_dir($path)) {
25
            return $path;
26
        }
27
28
        $char = $this->getCharBeforeWord();
29
30
        return ($char === '"' || $char === '\'')
31
            ? $path . $char
32
            : $path;
33
    }
34
}
35