@@ -21,57 +21,57 @@ protected function setUp(): void
2121 $ this ->syntax = new Php ();
2222 }
2323
24- public function testCheck ()
24+ public function testCheck (): void
2525 {
2626 $ result = $ this ->syntax ->check ('<?php echo 1; ?> ' );
2727
2828 self ::assertEquals (['validity ' => true , 'errors ' => null ], $ result );
2929 }
3030
31- public function testCheckFile ()
31+ public function testCheckFile (): void
3232 {
3333 $ result = $ this ->syntax ->checkFile (__DIR__ .'/fixtures/correct.php ' );
3434
3535 self ::assertEquals (['validity ' => true , 'errors ' => null ], $ result );
3636 }
3737
38- public function testCheckFail ()
38+ public function testCheckFail (): void
3939 {
4040 $ result = $ this ->syntax ->check ('<?php echo "; ?> ' );
4141
42- self ::assertTrue ( \is_array ( $ result) );
42+ self ::assertIsArray ( $ result );
4343
4444 self ::assertFalse ($ result ['validity ' ]);
45- self ::assertTrue ( \is_array ( $ result ['errors ' ]) );
45+ self ::assertIsArray ( $ result ['errors ' ]);
4646 self ::assertCount (1 , $ result ['errors ' ]);
4747
48- self ::assertTrue ( \is_null ( $ result ['errors ' ][0 ]['file ' ]) );
49- self ::assertTrue ( \is_int ( $ result ['errors ' ][0 ]['code ' ]) );
50- self ::assertTrue ( \is_int ( $ result ['errors ' ][0 ]['line ' ]) );
51- self ::assertTrue ( \is_string ( $ result ['errors ' ][0 ]['type ' ]) );
52- self ::assertTrue ( \is_string ( $ result ['errors ' ][0 ]['message ' ]) );
48+ self ::assertNull ( $ result ['errors ' ][0 ]['file ' ]);
49+ self ::assertIsInt ( $ result ['errors ' ][0 ]['code ' ]);
50+ self ::assertIsInt ( $ result ['errors ' ][0 ]['line ' ]);
51+ self ::assertIsString ( $ result ['errors ' ][0 ]['type ' ]);
52+ self ::assertIsString ( $ result ['errors ' ][0 ]['message ' ]);
5353 }
5454
55- public function testCheckFileFail ()
55+ public function testCheckFileFail (): void
5656 {
5757 $ result = $ this ->syntax ->checkFile (__DIR__ .'/fixtures/fail.php ' );
5858
59- self ::assertTrue ( \is_array ( $ result) );
59+ self ::assertIsArray ( $ result );
6060
6161 self ::assertFalse ($ result ['validity ' ]);
62- self ::assertTrue ( \is_array ( $ result ['errors ' ]) );
62+ self ::assertIsArray ( $ result ['errors ' ]);
6363 self ::assertCount (1 , $ result ['errors ' ]);
6464
65- self ::assertTrue ( \is_string ( $ result ['errors ' ][0 ]['file ' ]) );
66- self ::assertTrue ( \is_int ( $ result ['errors ' ][0 ]['code ' ]) );
67- self ::assertTrue ( \is_int ( $ result ['errors ' ][0 ]['line ' ]) );
68- self ::assertTrue ( \is_string ( $ result ['errors ' ][0 ]['type ' ]) );
69- self ::assertTrue ( \is_string ( $ result ['errors ' ][0 ]['message ' ]) );
65+ self ::assertIsString ( $ result ['errors ' ][0 ]['file ' ]);
66+ self ::assertIsInt ( $ result ['errors ' ][0 ]['code ' ]);
67+ self ::assertIsInt ( $ result ['errors ' ][0 ]['line ' ]);
68+ self ::assertIsString ( $ result ['errors ' ][0 ]['type ' ]);
69+ self ::assertIsString ( $ result ['errors ' ][0 ]['message ' ]);
7070
7171 self ::assertEquals (__DIR__ .'/fixtures/fail.php ' , $ result ['errors ' ][0 ]['file ' ]);
7272 }
7373
74- public function testFormatOutputHelper ()
74+ public function testFormatOutputHelper (): void
7575 {
7676 $ result = Php::formatOutputHelper (
7777 '<?php echo "; ' ."\n" .'echo 1; ?> ' ,
0 commit comments