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.

Link::getDestination()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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\Structure;
12
13
/**
14
 * Object representation of a Link.
15
 *
16
 * @author Michael Donat <[email protected]>
17
 * @package php-vfs
18
 */
19
class Link extends Node
20
{
21
    /**
22
     * @see http://man7.org/linux/man-pages/man2/lstat.2.html
23
     */
24
    const S_IFTYPE   = 0120000;
25
26
    /**
27
     * @var Node
28
     */
29
    protected $destination;
30
31
    /**
32
     * Class constructor.
33
     *
34
     * @param string $basename
35
     */
36
    public function __construct($basename, Node $destination)
37
    {
38
        parent::__construct($basename);
39
        $this->destination = $destination;
40
    }
41
42
    /**
43
     * Returns Link size.
44
     *
45
     * The size is the length of the destination path
46
     *
47
     * @return mixed
48
     */
49
    public function size()
50
    {
51
        return $this->destination->size();
52
    }
53
54
    /**
55
     * @return Node
56
     */
57
    public function getDestination()
58
    {
59
        return $this->destination;
60
    }
61
}
62