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.

NewGeneration::getDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 4
loc 4
rs 10
1
<?php
2
3
namespace PhpSchool\Php7Way\Exercise;
4
5
use PhpSchool\PhpWorkshop\Check\FunctionRequirementsCheck;
6
use PhpSchool\PhpWorkshop\Exercise\AbstractExercise;
7
use PhpSchool\PhpWorkshop\Exercise\CliExercise;
8
use PhpSchool\PhpWorkshop\Exercise\ExerciseInterface;
9
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
10
use PhpSchool\PhpWorkshop\ExerciseCheck\FunctionRequirementsExerciseCheck;
11
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
12
13
/**
14
 * Class NewGeneration
15
 * @package PhpSchool\Php7Way\Exercise
16
 */
17 View Code Duplication
class NewGeneration 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...
18
    ExerciseInterface,
19
    CliExercise,
20
    FunctionRequirementsExerciseCheck
21
{
22
    /**
23
     * @return string
24
     */
25
    public function getName()
26
    {
27
        return 'A new generation is coming';
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getDescription()
34
    {
35
        return 'Develop a generator and use it';
36
    }
37
38
    /**
39
     * @return array
40
     */
41
    public function getArgs()
42
    {
43
        return ["firstArgument", "secondArgument", "thirdArgument"];
44
    }
45
46
    /**
47
     * @return ExerciseType
48
     */
49
    public function getType()
50
    {
51
        return ExerciseType::CLI();
52
    }
53
54
    /**
55
     * @return string[]
56
     */
57
    public function getRequiredFunctions()
58
    {
59
        return ["strtoupper"];
60
    }
61
62
    /**
63
     * @return string[]
64
     */
65
    public function getBannedFunctions()
66
    {
67
        return [];
68
    }
69
70
    /**
71
     * @param ExerciseDispatcher $dispatcher
72
     */
73
    public function configure(ExerciseDispatcher $dispatcher)
74
    {
75
        $dispatcher->requireCheck(FunctionRequirementsCheck::class);
76
    }
77
}
78