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 ( b3f20b...f5717e )
by James
03:07
created

SimpleDirective::isSimple()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of WebHelper Parser.
5
 *
6
 * (c) James <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WebHelper\Parser\Directive;
13
14
use WebHelper\Parser\Server\ServerInterface;
15
16
/**
17
 * Describes a simple directive instance.
18
 *
19
 * a SimpleDirective is a simple key/value information.
20
 *
21
 * @author James <[email protected]>
22
 */
23
class SimpleDirective extends Directive implements DirectiveInterface
24
{
25
    /**
26
     * Confirms if the directive contains a specified directive.
27
     *
28
     * @param string $name the directive for which to check existence
29
     *
30
     * @return bool true if the sub-directive exists, false otherwise
31
     */
32 1
    public function hasDirective($name)
33
    {
34 1
        return false;
35
    }
36
37
    /**
38
     * Confirms if the directive is simple.
39
     *
40
     * Simple directive cannot have sub directive
41
     *
42
     * @return bool true if the directive is simple, false otherwise
43
     */
44 1
    public function isSimple()
45
    {
46 1
        return true;
47
    }
48
49
    /**
50
     * Dumps the directive respecting a server syntax.
51
     *
52
     * @param ServerInterface $server a server instance
53
     * @param int             $spaces the indentation spaces
54
     *
55
     * @return string the dumped directive
56
     */
57 1 View Code Duplication
    public function dump(ServerInterface $server, $spaces = 0)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
58
    {
59 1
        $value = $this->getValue() ? ' '.$this->getValue() : '';
60
61 1
        return str_repeat(' ', $spaces).sprintf(
62 1
            $server->getDumperSimpleDirective(),
63 1
            $this->getName(),
64
            $value
65 1
        ).PHP_EOL;
66
    }
67
}
68