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 ( 35de78...03d5ad )
by Nastasia
07:55 queued 05:47
created

NullItsNull   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 36
loc 36
rs 10
wmc 4
lcom 0
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 4 4 1
A getDescription() 4 4 1
A getArgs() 4 4 1
A getType() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace PhpSchool\Php7Way\Exercise;
4
5
use PhpSchool\PhpWorkshop\Exercise\AbstractExercise;
6
use PhpSchool\PhpWorkshop\Exercise\CliExercise;
7
use PhpSchool\PhpWorkshop\Exercise\ExerciseInterface;
8
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
9
10
/**
11
 * Class NullItsNull
12
 * @package PhpSchool\Php7Way\Exercise
13
 */
14 View Code Duplication
class NullItsNull extends AbstractExercise implements
0 ignored issues
show
Duplication introduced by
This class 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...
15
    ExerciseInterface,
16
    CliExercise
17
{
18
    /**
19
     * @return string
20
     */
21
    public function getName()
22
    {
23
        return 'Null, it\'s null!';
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getDescription()
30
    {
31
        return 'Use the null coalescing operator to check if the value is null';
32
    }
33
34
    /**
35
     * @return array
36
     */
37
    public function getArgs()
38
    {
39
        return ["FirstArgument", "SecondArgument"];
40
    }
41
42
    /**
43
     * @return ExerciseType
44
     */
45
    public function getType()
46
    {
47
        return ExerciseType::CLI();
48
    }
49
}
50