File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace MauroBaptista \SlowTests ;
4
4
5
- use Closure ;
6
5
use function Termwind \render ;
7
6
8
7
class Components
Original file line number Diff line number Diff line change 7
7
use PHPUnit \Runner \AfterTestHook ;
8
8
use PHPUnit \Runner \BeforeFirstTestHook ;
9
9
10
-
11
10
class ResultToCSV implements BeforeFirstTestHook, AfterTestHook, AfterLastTestHook
12
11
{
13
12
private $ handle ;
@@ -35,7 +34,7 @@ public function executeBeforeFirstTest(): void
35
34
36
35
$ this ->handle = fopen ($ this ->getFile (), "a " );
37
36
38
- if (!is_resource ($ this ->handle )) {
37
+ if (! is_resource ($ this ->handle )) {
39
38
$ this ->components ->error ("Couldn't open file <i> $ file</i> " , [
40
39
'You added the report inside a folder that do not exist ' ,
41
40
'You have no permission to create/write the file ' ,
Original file line number Diff line number Diff line change 8
8
9
9
class SlowestTests implements BeforeFirstTestHook, AfterTestHook, AfterLastTestHook
10
10
{
11
- /** @var array<string, float> array<$test, $time> */
11
+ /** @var array<string, float> array<$test,> */
12
12
private array $ tests = [];
13
13
14
- public function __construct (public int $ show = 10 ) {}
14
+ public function __construct (public int $ show = 10 )
15
+ {
16
+ }
15
17
16
18
public function executeBeforeFirstTest (): void
17
19
{
@@ -29,6 +31,6 @@ public function executeAfterLastTest(): void
29
31
30
32
$ slowestTests = array_slice ($ this ->tests , 0 , $ this ->show );
31
33
32
- fwrite (STDERR , print_r ($ slowestTests , TRUE ));
34
+ fwrite (STDERR , print_r ($ slowestTests , true ));
33
35
}
34
36
}
You can’t perform that action at this time.
0 commit comments