From c0b66a49408053c77105a6decee84f52426295dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SIGUI=20Kess=C3=A9=20Emmanuel?= Date: Sat, 15 Jul 2023 15:32:20 +0100 Subject: [PATCH] :rotating_light: Fix code lint --- src/Core/HasResolver.php | 4 ++-- src/Exception/HasExceptionConstructor.php | 4 ++-- src/Support/Callback.php | 6 +++--- src/Support/Container.php | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Core/HasResolver.php b/src/Core/HasResolver.php index bdd4f22..6719d45 100644 --- a/src/Core/HasResolver.php +++ b/src/Core/HasResolver.php @@ -18,7 +18,7 @@ trait HasResolver protected static array $ACTIONS = []; /** - * @param array|string|object|callable(mixed ...$args): mixed $action + * @param array|string|object|callable(mixed ...$args): mixed $action */ public function on(string $name, $action): static { @@ -28,7 +28,7 @@ public function on(string $name, $action): static } /** - * @param array|string|object|callable(mixed ...$args): mixed $action + * @param array|string|object|callable(mixed ...$args): mixed $action */ public static function onStatic(string $name, $action): void { diff --git a/src/Exception/HasExceptionConstructor.php b/src/Exception/HasExceptionConstructor.php index 9a1c89a..5bbed57 100644 --- a/src/Exception/HasExceptionConstructor.php +++ b/src/Exception/HasExceptionConstructor.php @@ -6,12 +6,12 @@ trait HasExceptionConstructor { - abstract public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null); + abstract public function __construct(string $message = '', int $code = 0, Throwable $previous = null); /** * @param array $arguments */ - public static function with(string $message = '', array $arguments = [], int $code = 0, ?Throwable $previous = null): Throwable + public static function with(string $message = '', array $arguments = [], int $code = 0, Throwable $previous = null): Throwable { if ($arguments !== []) { $message = sprintf($message, ...$arguments); diff --git a/src/Support/Callback.php b/src/Support/Callback.php index 40a1f5c..284b9de 100644 --- a/src/Support/Callback.php +++ b/src/Support/Callback.php @@ -20,7 +20,7 @@ final class Callback private $function; /** - * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value + * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value */ public function __construct(array|string|object|callable $value) { @@ -28,7 +28,7 @@ public function __construct(array|string|object|callable $value) } /** - * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value + * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value */ public static function from(array|string|object|callable $value): self { @@ -36,7 +36,7 @@ public static function from(array|string|object|callable $value): self } /** - * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value + * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value */ public function setValue(array|string|object|callable $value): static { diff --git a/src/Support/Container.php b/src/Support/Container.php index 2823e1c..864a1ab 100644 --- a/src/Support/Container.php +++ b/src/Support/Container.php @@ -22,7 +22,7 @@ final class Container implements ContainerInterface private array $aliases = []; /** - * @param array $components + * @param array $components */ public function __construct(array $components = []) { @@ -30,7 +30,7 @@ public function __construct(array $components = []) } /** - * @param array $components + * @param array $components */ public function setComponents(array $components): static { @@ -42,7 +42,7 @@ public function setComponents(array $components): static } /** - * @param mixed[]|string|object|callable(mixed ...$args): mixed $component + * @param mixed[]|string|object|callable(mixed ...$args): mixed $component */ public function set(string $id, array|string|object|callable $component): static { @@ -127,7 +127,7 @@ public function getClasses(): array /** * @return null|class-string */ - public function getClass(string $id): null|string + public function getClass(string $id): ?string { if (isset($this->components[$id])) { $component = $this->components[$id]; @@ -190,7 +190,7 @@ public function instanciateArgs(object|string $object_or_class, array $args = [] } /** - * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $callback + * @param array|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $callback */ public function invoke(array|string|object|callable $callback, mixed ...$arguments): mixed { @@ -221,7 +221,7 @@ public function invokeArgs(array|string|object|callable $callback, array $args = /** * @param mixed[] $args */ - public function invokeFunctionArgs(ReflectionFunction|ReflectionMethod $func, array $args = [], ?object $object = null): mixed + public function invokeFunctionArgs(ReflectionFunction|ReflectionMethod $func, array $args = [], object $object = null): mixed { $args = $this->buildFunctionArgs($func, $args);