@@ -32,25 +32,25 @@ abstract class TestCase extends PHPUnitTestCase
32
32
*/
33
33
private $ tmpNamespace ;
34
34
35
- protected function setUp ()
35
+ protected function setUp (): void
36
36
{
37
37
parent ::setUp ();
38
38
39
39
$ this ->baseTmpDir = $ this ->getSysTempDir () .
40
40
DIRECTORY_SEPARATOR .
41
41
'p-a-c-t- ' .
42
- uniqid () .
42
+ \ uniqid () .
43
43
DIRECTORY_SEPARATOR ;
44
44
$ this ->tmpDir = $ this ->baseTmpDir .
45
- uniqid () .
45
+ \ uniqid () .
46
46
DIRECTORY_SEPARATOR ;
47
47
;
48
48
49
- mkdir ($ this ->tmpDir , 0777 , true );
50
- $ this ->tmpNamespace = uniqid ('PACTN ' );
49
+ \ mkdir ($ this ->tmpDir , 0777 , true );
50
+ $ this ->tmpNamespace = \ uniqid ('PACTN ' );
51
51
}
52
52
53
- protected function tearDown ()
53
+ protected function tearDown (): void
54
54
{
55
55
parent ::tearDown ();
56
56
$ this ->rmdir ($ this ->baseTmpDir );
@@ -76,33 +76,33 @@ public function provideTrueFalse(): array
76
76
*/
77
77
protected function getSysTempDir (): string
78
78
{
79
- if (strtoupper (substr (PHP_OS , 0 , 3 )) === 'WIN ' ) {
79
+ if (\ strtoupper (\ substr (PHP_OS , 0 , 3 )) === 'WIN ' ) {
80
80
return 'C: \\t \\' ;
81
81
}
82
82
83
- return sys_get_temp_dir ();
83
+ return \ sys_get_temp_dir ();
84
84
}
85
85
86
86
/**
87
87
* @param string $dir
88
88
*/
89
- protected function rmdir (string $ dir )
89
+ protected function rmdir (string $ dir ): void
90
90
{
91
91
$ directory = new FilesystemIterator ($ dir );
92
92
93
93
foreach ($ directory as $ node ) {
94
- if (is_dir ($ node ->getPathname ())) {
94
+ if (\ is_dir ($ node ->getPathname ())) {
95
95
$ this ->rmdir ($ node ->getPathname ());
96
96
continue ;
97
97
}
98
98
99
- if (is_file ($ node ->getPathname ())) {
100
- unlink ($ node ->getPathname ());
99
+ if (\ is_file ($ node ->getPathname ())) {
100
+ \ unlink ($ node ->getPathname ());
101
101
continue ;
102
102
}
103
103
}
104
104
105
- rmdir ($ dir );
105
+ \ rmdir ($ dir );
106
106
}
107
107
108
108
/**
@@ -133,7 +133,7 @@ protected function getFilesInDirectory(string $path): array
133
133
$ directory = new RecursiveIteratorIterator ($ directory );
134
134
135
135
foreach ($ directory as $ node ) {
136
- if (!is_file ($ node ->getPathname ())) {
136
+ if (!\ is_file ($ node ->getPathname ())) {
137
137
continue ;
138
138
}
139
139
0 commit comments