@@ -26,9 +26,8 @@ protected function printDefects(array $defects, string $type): void
26
26
{
27
27
$ this ->currentType = $ type ;
28
28
29
- $ i =0 ;
30
- foreach ($ defects as $ defect ) {
31
- $ this ->printDefect ($ defect , $ i ++);
29
+ foreach ($ defects as $ i => $ defect ) {
30
+ $ this ->printDefect ($ defect , $ i );
32
31
}
33
32
}
34
33
@@ -57,19 +56,15 @@ function($l){ return $l; }
57
56
}
58
57
59
58
protected function getCurrentType () {
60
- if (in_array ($ this ->currentType , ['error ' , 'failure ' ])) {
61
- return 'error ' ;
62
- }
63
-
64
- return 'warning ' ;
59
+ return in_array ($ this ->currentType , ['error ' , 'failure ' ]) ? 'error ' : 'warning ' ;
65
60
}
66
61
67
62
protected function relativePath (string $ path ) {
68
- return str_replace (getcwd ().'/ ' , "" , $ path );
63
+ return str_replace (getcwd ().'/ ' , '' , $ path );
69
64
}
70
65
71
66
protected function getReflectionFromTest (string $ name ) {
72
- list ($ klass , $ method ) = explode (" :: " , $ name );
67
+ list ($ klass , $ method ) = explode (' :: ' , $ name );
73
68
$ c = new \ReflectionClass ($ klass );
74
69
$ m = $ c ->getMethod ($ method );
75
70
0 commit comments