Skip to content

Commit aecccfb

Browse files
Merge branch '6.4' into 7.0
* 6.4: fix typo Add types to private and internal properties [Workflow] Cleaning code [Scheduler] Fix NPE in debug:scheduler command
2 parents e63f8d4 + b8c939b commit aecccfb

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

Debug/OptionsResolverIntrospector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class OptionsResolverIntrospector
2424
{
25-
private $get;
25+
private \Closure $get;
2626

2727
public function __construct(OptionsResolver $optionsResolver)
2828
{

OptionConfigurator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
final class OptionConfigurator
1717
{
18-
private $name;
19-
private $resolver;
18+
private string $name;
19+
private OptionsResolver $resolver;
2020

2121
public function __construct(string $name, OptionsResolver $resolver)
2222
{

OptionsResolver.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -50,73 +50,73 @@ class OptionsResolver implements Options
5050
/**
5151
* The names of all defined options.
5252
*/
53-
private $defined = [];
53+
private array $defined = [];
5454

5555
/**
5656
* The default option values.
5757
*/
58-
private $defaults = [];
58+
private array $defaults = [];
5959

6060
/**
6161
* A list of closure for nested options.
6262
*
6363
* @var \Closure[][]
6464
*/
65-
private $nested = [];
65+
private array $nested = [];
6666

6767
/**
6868
* The names of required options.
6969
*/
70-
private $required = [];
70+
private array $required = [];
7171

7272
/**
7373
* The resolved option values.
7474
*/
75-
private $resolved = [];
75+
private array $resolved = [];
7676

7777
/**
7878
* A list of normalizer closures.
7979
*
8080
* @var \Closure[][]
8181
*/
82-
private $normalizers = [];
82+
private array $normalizers = [];
8383

8484
/**
8585
* A list of accepted values for each option.
8686
*/
87-
private $allowedValues = [];
87+
private array $allowedValues = [];
8888

8989
/**
9090
* A list of accepted types for each option.
9191
*/
92-
private $allowedTypes = [];
92+
private array $allowedTypes = [];
9393

9494
/**
9595
* A list of info messages for each option.
9696
*/
97-
private $info = [];
97+
private array $info = [];
9898

9999
/**
100100
* A list of closures for evaluating lazy options.
101101
*/
102-
private $lazy = [];
102+
private array $lazy = [];
103103

104104
/**
105105
* A list of lazy options whose closure is currently being called.
106106
*
107107
* This list helps detecting circular dependencies between lazy options.
108108
*/
109-
private $calling = [];
109+
private array $calling = [];
110110

111111
/**
112112
* A list of deprecated options.
113113
*/
114-
private $deprecated = [];
114+
private array $deprecated = [];
115115

116116
/**
117117
* The list of options provided by the user.
118118
*/
119-
private $given = [];
119+
private array $given = [];
120120

121121
/**
122122
* Whether the instance is locked for reading.
@@ -126,19 +126,19 @@ class OptionsResolver implements Options
126126
* process. If any option is changed after being read, all evaluated
127127
* lazy options that depend on this option would become invalid.
128128
*/
129-
private $locked = false;
129+
private bool $locked = false;
130130

131-
private $parentsOptions = [];
131+
private array $parentsOptions = [];
132132

133133
/**
134134
* Whether the whole options definition is marked as array prototype.
135135
*/
136-
private $prototype;
136+
private ?bool $prototype = null;
137137

138138
/**
139139
* The prototype array's index that is being read.
140140
*/
141-
private $prototypeIndex;
141+
private int|string|null $prototypeIndex = null;
142142

143143
/**
144144
* Whether to ignore undefined options.

0 commit comments

Comments
 (0)