@@ -39,7 +39,7 @@ public function __construct(Parser $parser)
39
39
/**
40
40
* Return the check's name.
41
41
*/
42
- public function getName () : string
42
+ public function getName (): string
43
43
{
44
44
return 'Function Requirements Check ' ;
45
45
}
@@ -53,10 +53,10 @@ public function getName() : string
53
53
* @param Input $input The command line arguments passed to the command.
54
54
* @return ResultInterface The result of the check.
55
55
*/
56
- public function check (ExerciseInterface $ exercise , Input $ input ) : ResultInterface
56
+ public function check (ExerciseInterface $ exercise , Input $ input ): ResultInterface
57
57
{
58
58
if (!$ exercise instanceof FunctionRequirementsExerciseCheck) {
59
- throw new \InvalidArgumentException ;
59
+ throw new \InvalidArgumentException () ;
60
60
}
61
61
62
62
$ requiredFunctions = $ exercise ->getRequiredFunctions ();
@@ -71,7 +71,7 @@ public function check(ExerciseInterface $exercise, Input $input) : ResultInterfa
71
71
}
72
72
73
73
$ visitor = new FunctionVisitor ($ requiredFunctions , $ bannedFunctions );
74
- $ traverser = new NodeTraverser ;
74
+ $ traverser = new NodeTraverser () ;
75
75
$ traverser ->addVisitor ($ visitor );
76
76
77
77
$ traverser ->traverse ($ ast );
@@ -98,12 +98,12 @@ public function check(ExerciseInterface $exercise, Input $input) : ResultInterfa
98
98
/**
99
99
* This check can run on any exercise type.
100
100
*/
101
- public function canRun (ExerciseType $ exerciseType ) : bool
101
+ public function canRun (ExerciseType $ exerciseType ): bool
102
102
{
103
103
return in_array ($ exerciseType ->getValue (), [ExerciseType::CGI , ExerciseType::CLI ], true );
104
104
}
105
105
106
- public function getExerciseInterface () : string
106
+ public function getExerciseInterface (): string
107
107
{
108
108
return FunctionRequirementsExerciseCheck::class;
109
109
}
@@ -113,7 +113,7 @@ public function getExerciseInterface() : string
113
113
* output, but do it in a way that was not correct for the task. This way the student can see the program works
114
114
* but missed some requirements.
115
115
*/
116
- public function getPosition () : string
116
+ public function getPosition (): string
117
117
{
118
118
return SimpleCheckInterface::CHECK_AFTER ;
119
119
}
0 commit comments