@@ -38,7 +38,7 @@ public static function container()
3838
3939 return static ::$ container ;
4040 }
41-
41+
4242 /**
4343 * Sets the container instance the Application should use as a Service Locator.
4444 *
@@ -54,7 +54,7 @@ public static function setContainer(Container $container)
5454 {
5555 static ::$ container = $ container ;
5656 }
57-
57+
5858 /**
5959 * Sets a variable on the container.
6060 *
@@ -99,7 +99,7 @@ public static function offsetSet($offset, $value)
9999 *
100100 * @throws ContainerException If there's any issue reflecting on the class, interface or the implementation.
101101 */
102- public static function singleton ($ id , $ implementation = null , array $ afterBuildMethods = null )
102+ public static function singleton ($ id , $ implementation = null , ? array $ afterBuildMethods = null )
103103 {
104104 static ::container ()->singleton ($ id , $ implementation , $ afterBuildMethods );
105105 }
@@ -311,7 +311,7 @@ public static function register($serviceProviderClass, ...$alias)
311311 *
312312 * @throws ContainerException If there's an issue while trying to bind the implementation.
313313 */
314- public static function bind ($ id , $ implementation = null , array $ afterBuildMethods = null )
314+ public static function bind ($ id , $ implementation = null , ? array $ afterBuildMethods = null )
315315 {
316316 static ::container ()->bind ($ id , $ implementation , $ afterBuildMethods );
317317 }
@@ -346,7 +346,7 @@ public static function boot()
346346 * @return void This method does not return any value.
347347 * @throws ContainerException
348348 */
349- public static function singletonDecorators ($ id , $ decorators , array $ afterBuildMethods = null )
349+ public static function singletonDecorators ($ id , $ decorators , ? array $ afterBuildMethods = null )
350350 {
351351 static ::container ()->singletonDecorators ($ id , $ decorators , $ afterBuildMethods );
352352 }
@@ -367,7 +367,7 @@ public static function singletonDecorators($id, $decorators, array $afterBuildMe
367367 * @return void This method does not return any value.
368368 * @throws ContainerException If there's any issue binding the decorators.
369369 */
370- public static function bindDecorators ($ id , array $ decorators , array $ afterBuildMethods = null )
370+ public static function bindDecorators ($ id , array $ decorators , ? array $ afterBuildMethods = null )
371371 {
372372 static ::container ()->bindDecorators ($ id , $ decorators , $ afterBuildMethods );
373373 }
@@ -471,7 +471,7 @@ public static function callback($id, $method)
471471 * The callable will be a closure on PHP 5.3+ or a lambda function on PHP 5.2.
472472 *
473473 * @param string|class-string|mixed $id The fully qualified name of a class or an interface.
474- * @param array<mixed> $buildArgs An array of arguments that should be used to build the
474+ * @param array<mixed>|null $buildArgs An array of arguments that should be used to build the
475475 * instance; note that any argument will be resolved using
476476 * the container itself and bindings will apply.
477477 * @param string[]|null $afterBuildMethods An array of methods that should be called on the built
@@ -480,9 +480,9 @@ public static function callback($id, $method)
480480 * @return callable A callable function that will return an instance of the specified class when
481481 * called.
482482 */
483- public static function instance ($ id , array $ buildArgs = [], array $ afterBuildMethods = null )
483+ public static function instance ($ id , ? array $ buildArgs = [], ? array $ afterBuildMethods = null )
484484 {
485- return static ::container ()->instance ($ id , $ buildArgs , $ afterBuildMethods );
485+ return static ::container ()->instance ($ id , $ buildArgs ?? [] , $ afterBuildMethods );
486486 }
487487
488488 /**
0 commit comments