Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
🚨 Fix code lint
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Jul 15, 2023
1 parent 82f1d13 commit c0b66a4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Core/HasResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait HasResolver
protected static array $ACTIONS = [];

/**
* @param array<object|string>|string|object|callable(mixed ...$args): mixed $action
* @param array<object|string>|string|object|callable(mixed ...$args): mixed $action
*/
public function on(string $name, $action): static
{
Expand All @@ -28,7 +28,7 @@ public function on(string $name, $action): static
}

/**
* @param array<object|string>|string|object|callable(mixed ...$args): mixed $action
* @param array<object|string>|string|object|callable(mixed ...$args): mixed $action
*/
public static function onStatic(string $name, $action): void
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/HasExceptionConstructor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string|int> $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);
Expand Down
6 changes: 3 additions & 3 deletions src/Support/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ final class Callback
private $function;

/**
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value
*/
public function __construct(array|string|object|callable $value)
{
$this->setValue($value);
}

/**
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value
*/
public static function from(array|string|object|callable $value): self
{
return new self($value);
}

/**
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $value
*/
public function setValue(array|string|object|callable $value): static
{
Expand Down
12 changes: 6 additions & 6 deletions src/Support/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ final class Container implements ContainerInterface
private array $aliases = [];

/**
* @param array<string, mixed[]|string|object|callable(mixed ...$args): mixed> $components
* @param array<string, mixed[]|string|object|callable(mixed ...$args): mixed> $components
*/
public function __construct(array $components = [])
{
$this->setComponents($components);
}

/**
* @param array<string, mixed[]|string|object|callable(mixed ...$args): mixed> $components
* @param array<string, mixed[]|string|object|callable(mixed ...$args): mixed> $components
*/
public function setComponents(array $components): static
{
Expand All @@ -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
{
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -190,7 +190,7 @@ public function instanciateArgs(object|string $object_or_class, array $args = []
}

/**
* @param array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed $callback
* @param array<callable-string|callable-object>|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
{
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c0b66a4

Please sign in to comment.