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...
19
ExerciseInterface,
20
CliExercise,
21
FunctionRequirementsExerciseCheck
22
{
23
/**
24
* @return string
25
*/
26
public function getName()
27
{
28
return 'Array we reduce!';
29
}
30
31
/**
32
* @return string
33
*/
34
public function getDescription()
35
{
36
return 'Exercice with array reduce';
37
}
38
39
/**
40
* @return array
41
*/
42
public function getArgs()
43
{
44
return [1, 2, 3];
45
}
46
47
/**
48
* @return ExerciseType
49
*/
50
public function getType()
51
{
52
return ExerciseType::CLI();
53
}
54
55
56
/**
57
* @return string[]
58
*/
59
public function getRequiredFunctions()
60
{
61
return ['array_reduce'];
62
}
63
64
/**
65
* @return string[]
66
*/
67
public function getBannedFunctions()
68
{
69
return [];
70
}
71
72
/**
73
* @param ExerciseDispatcher $dispatcher
74
*/
75
public function configure(ExerciseDispatcher $dispatcher)
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.