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

Commit

Permalink
🩹 Fix: code format and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Jun 22, 2023
1 parent 8996357 commit 039fe12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Support/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
final class Callback
{
/**
* @var array<callable-string|callable-object>|callable-string|callable-object|callable(mixed ...$args): mixed
* @var array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed
*/
private mixed $value;

Expand All @@ -20,23 +20,23 @@ final class Callback
private $function;

/**
* @param array<callable-string|callable-object>|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>|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>|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 Expand Up @@ -74,7 +74,7 @@ public function setValue(array|string|object|callable $value): static
}

/**
* @return array<callable-string|callable-object>|callable-string|callable-object|callable(mixed ...$args): mixed
* @return array<callable-string|callable-object>|array{object|class-string,string}|callable-string|callable-object|callable(mixed ...$args): mixed
*/
public function getValue(): array|string|object|callable
{
Expand Down
4 changes: 2 additions & 2 deletions src/Support/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ public function instanciateArgs(object|string $object_or_class, array $args = []
}

/**
* @param array<callable-object|callable-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
{
return $this->invokeArgs($callback, $arguments);
}

/**
* @param array<callable-object|callable-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
* @param mixed[] $args
*/
public function invokeArgs(array|string|object|callable $callback, array $args = []): mixed
Expand Down

0 comments on commit 039fe12

Please sign in to comment.