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.

DirectoryHandler::setDirectory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/*
3
 * This file is part of the php-vfs package.
4
 *
5
 * (c) Michael Donat <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace VirtualFileSystem\Wrapper;
12
13
use VirtualFileSystem\Structure\Directory;
14
15
/**
16
 * User as directory handle by streamWrapper implementation.
17
 *
18
 * This class is responsible mainly iterating over directory.
19
 *
20
 * @author Michael Donat <[email protected]>
21
 * @package php-vfs
22
 */
23
class DirectoryHandler
24
{
25
    /**
26
     * @var Directory
27
     */
28
    protected $directory;
29
30
    /**
31
     * @var \ArrayIterator
32
     */
33
    protected $iterator;
34
35
    /**
36
     * Sets directory in context.
37
     *
38
     * @param Directory $directory
39
     */
40
    public function setDirectory(Directory $directory)
41
    {
42
        $this->directory = $directory;
43
        $this->iterator = new \ArrayIterator($directory->children());
44
    }
45
46
    /**
47
     * Returns children iterator
48
     *
49
     * @return ArrayIterator
0 ignored issues
show
Documentation introduced by
Should the return type not be \ArrayIterator?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
50
     */
51
    public function iterator()
52
    {
53
        return $this->iterator;
54
    }
55
}
56