@@ -99,7 +99,7 @@ public function __construct(A $a, DInterface $d)
9999
100100class E
101101{
102- public function __construct (D $ d = null )
102+ public function __construct (? D $ d = null )
103103 {
104104 }
105105}
@@ -155,13 +155,6 @@ public function __construct(Dunglas $j, Dunglas $k)
155155 }
156156}
157157
158- class OptionalParameter
159- {
160- public function __construct (CollisionInterface $ c = null , A $ a , Foo $ f = null )
161- {
162- }
163- }
164-
165158class BadTypeHintedArgument
166159{
167160 public function __construct (Dunglas $ k , NotARealClass $ r )
@@ -195,7 +188,7 @@ public function __construct(A $k, $foo, Dunglas $dunglas, array $bar)
195188
196189class MultipleArgumentsOptionalScalar
197190{
198- public function __construct (A $ a , $ foo = 'default_val ' , Lille $ lille = null )
191+ public function __construct (A $ a , $ foo = 'default_val ' , ? Lille $ lille = null )
199192 {
200193 }
201194}
@@ -211,7 +204,7 @@ public function __construct(A $a, Lille $lille, $foo = 'some_val')
211204 */
212205class ClassForResource
213206{
214- public function __construct ($ foo , Bar $ bar = null )
207+ public function __construct ($ foo , ? Bar $ bar = null )
215208 {
216209 }
217210
@@ -350,7 +343,7 @@ public function setBar()
350343 {
351344 }
352345
353- public function setOptionalNotAutowireable (NotARealClass $ n = null )
346+ public function setOptionalNotAutowireable (? NotARealClass $ n = null )
354347 {
355348 }
356349
@@ -399,7 +392,7 @@ class DecoratorImpl implements DecoratorInterface
399392
400393class Decorated implements DecoratorInterface
401394{
402- public function __construct ($ quz = null , \NonExistent $ nonExistent = null , DecoratorInterface $ decorated = null , array $ foo = [])
395+ public function __construct ($ quz = null , ? \NonExistent $ nonExistent = null , ? DecoratorInterface $ decorated = null , array $ foo = [])
403396 {
404397 }
405398}
0 commit comments