@@ -38,10 +38,8 @@ public function __construct(Parser $parser)
3838
3939 /**
4040 * Return the check's name.
41- *
42- * @return string
4341 */
44- public function getName ()
42+ public function getName () : string
4543 {
4644 return 'Function Requirements Check ' ;
4745 }
@@ -55,7 +53,7 @@ public function getName()
5553 * @param Input $input The command line arguments passed to the command.
5654 * @return ResultInterface The result of the check.
5755 */
58- public function check (ExerciseInterface $ exercise , Input $ input )
56+ public function check (ExerciseInterface $ exercise , Input $ input ) : ResultInterface
5957 {
6058 if (!$ exercise instanceof FunctionRequirementsExerciseCheck) {
6159 throw new \InvalidArgumentException ;
@@ -99,19 +97,13 @@ public function check(ExerciseInterface $exercise, Input $input)
9997
10098 /**
10199 * This check can run on any exercise type.
102- *
103- * @param ExerciseType $exerciseType
104- * @return bool
105100 */
106- public function canRun (ExerciseType $ exerciseType )
101+ public function canRun (ExerciseType $ exerciseType ) : bool
107102 {
108- return in_array ($ exerciseType ->getValue (), [ExerciseType::CGI , ExerciseType::CLI ]);
103+ return in_array ($ exerciseType ->getValue (), [ExerciseType::CGI , ExerciseType::CLI ], true );
109104 }
110105
111- /**
112- * @return string
113- */
114- public function getExerciseInterface ()
106+ public function getExerciseInterface () : string
115107 {
116108 return FunctionRequirementsExerciseCheck::class;
117109 }
@@ -120,10 +112,8 @@ public function getExerciseInterface()
120112 * This is performed after executing the student's solution because the solution may produce the correct
121113 * output, but do it in a way that was not correct for the task. This way the student can see the program works
122114 * but missed some requirements.
123- *
124- * @return string
125115 */
126- public function getPosition ()
116+ public function getPosition () : string
127117 {
128118 return SimpleCheckInterface::CHECK_AFTER ;
129119 }
0 commit comments