44
55namespace Codeception \Lib \Connector ;
66
7+ use Closure ;
78use Codeception \Lib \Connector \Laravel \ExceptionHandlerDecorator as LaravelExceptionHandlerDecorator ;
89use Codeception \Lib \Connector \Laravel6 \ExceptionHandlerDecorator as Laravel6ExceptionHandlerDecorator ;
910use Codeception \Stub ;
@@ -406,11 +407,11 @@ private function applyInstances(): void
406407 * Register a Laravel service container binding that should be applied
407408 * after initializing the Laravel Application object.
408409 *
409- * @param $abstract
410- * @param $concrete
410+ * @param string $abstract
411+ * @param Closure|string|null $concrete
411412 * @param bool $shared
412413 */
413- public function haveBinding ($ abstract , $ concrete , $ shared = false ): void
414+ public function haveBinding (string $ abstract , $ concrete , bool $ shared = false ): void
414415 {
415416 $ this ->bindings [$ abstract ] = [$ concrete , $ shared ];
416417 }
@@ -419,11 +420,11 @@ public function haveBinding($abstract, $concrete, $shared = false): void
419420 * Register a Laravel service container contextual binding that should be applied
420421 * after initializing the Laravel Application object.
421422 *
422- * @param $concrete
423- * @param $abstract
424- * @param $implementation
423+ * @param string $concrete
424+ * @param string $abstract
425+ * @param Closure|string $implementation
425426 */
426- public function haveContextualBinding ($ concrete , $ abstract , $ implementation ): void
427+ public function haveContextualBinding (string $ concrete , string $ abstract , $ implementation ): void
427428 {
428429 if (! isset ($ this ->contextualBindings [$ concrete ])) {
429430 $ this ->contextualBindings [$ concrete ] = [];
@@ -436,10 +437,10 @@ public function haveContextualBinding($concrete, $abstract, $implementation): vo
436437 * Register a Laravel service container instance binding that should be applied
437438 * after initializing the Laravel Application object.
438439 *
439- * @param $abstract
440- * @param $instance
440+ * @param string $abstract
441+ * @param mixed $instance
441442 */
442- public function haveInstance ($ abstract , $ instance ): void
443+ public function haveInstance (string $ abstract , $ instance ): void
443444 {
444445 $ this ->instances [$ abstract ] = $ instance ;
445446 }
@@ -448,9 +449,9 @@ public function haveInstance($abstract, $instance): void
448449 * Register a handler than can be used to modify the Laravel application object after it is initialized.
449450 * The Laravel application object will be passed as an argument to the handler.
450451 *
451- * @param $handler
452+ * @param callable $handler
452453 */
453- public function haveApplicationHandler ($ handler ): void
454+ public function haveApplicationHandler (callable $ handler ): void
454455 {
455456 $ this ->applicationHandlers [] = $ handler ;
456457 }
0 commit comments