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.

AccessRights::hasMode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Naneau\FileGen;
3
4
use Naneau\FileGen\Node;
5
6
/**
7
 * Describes access rights for a file or directory
8
 */
9
abstract class AccessRights extends Node
10
{
11
    /**
12
     * The mode
13
     *
14
     * @var int
15
     **/
16
    private $mode;
17
18
    /**
19
     * Constructor
20
     *
21
     * @param  string $name
22
     * @param  int    $mode mode in octal (0XXX)
23
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
24
     **/
25
    public function __construct($name, $mode = null)
26
    {
27
        parent::__construct($name);
28
29
        $this->setMode($mode);
30
    }
31
32
    /**
33
     * Get the mode (as an int)
34
     *
35
     * @return int
36
     */
37
    public function getMode()
38
    {
39
        return $this->mode;
40
    }
41
42
    /**
43
     * Set the mode (as an int)
44
     *
45
     * @param  int          $mode
46
     * @return AccessRights
47
     */
48
    public function setMode($mode)
49
    {
50
        $this->mode = $mode;
51
52
        return $this;
53
    }
54
55
    /**
56
     * Has a mode been set?
57
     *
58
     * @return bool
59
     **/
60
    public function hasMode()
61
    {
62
        return $this->mode !== null;
63
    }
64
}
65