File tree Expand file tree Collapse file tree 4 files changed +10
-15
lines changed Expand file tree Collapse file tree 4 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 13
13
14
14
class Iterator implements \Iterator
15
15
{
16
- protected $ values = [];
16
+ protected array $ values = [];
17
17
18
18
public function __construct (array $ values = [])
19
19
{
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ class MockSplFileInfo extends \SplFileInfo
17
17
public const TYPE_FILE = 2 ;
18
18
public const TYPE_UNKNOWN = 3 ;
19
19
20
- private $ contents ;
21
- private $ mode ;
22
- private $ type ;
23
- private $ relativePath ;
24
- private $ relativePathname ;
20
+ private ? string $ contents = null ;
21
+ private ? string $ mode = null ;
22
+ private ? int $ type = null ;
23
+ private ? string $ relativePath = null ;
24
+ private ? string $ relativePathname = null ;
25
25
26
26
public function __construct ($ param )
27
27
{
Original file line number Diff line number Diff line change 16
16
17
17
abstract class RealIteratorTestCase extends IteratorTestCase
18
18
{
19
- protected static $ tmpDir ;
20
- protected static $ files ;
19
+ protected static string $ tmpDir ;
20
+ protected static array $ files ;
21
21
22
22
public static function setUpBeforeClass (): void
23
23
{
@@ -126,9 +126,7 @@ protected static function toAbsolute($files = null)
126
126
/*
127
127
* Without the call to setUpBeforeClass() property can be null.
128
128
*/
129
- if (!self ::$ tmpDir ) {
130
- self ::$ tmpDir = realpath (sys_get_temp_dir ()).\DIRECTORY_SEPARATOR .'symfony_finder ' ;
131
- }
129
+ self ::$ tmpDir ??= realpath (sys_get_temp_dir ()).\DIRECTORY_SEPARATOR .'symfony_finder ' ;
132
130
133
131
if (\is_array ($ files )) {
134
132
$ f = [];
Original file line number Diff line number Diff line change 16
16
17
17
class VcsIgnoredFilterIteratorTest extends IteratorTestCase
18
18
{
19
- /**
20
- * @var string
21
- */
22
- private $ tmpDir ;
19
+ private string $ tmpDir ;
23
20
24
21
protected function setUp (): void
25
22
{
You can’t perform that action at this time.
0 commit comments