diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..b20be6851 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,22 @@ +# CS fixes +86055ec8f9e3f20bde367c9bd318e38b705a681c +9efbd219ebad17dbdfbaa3c9358da9caf5f850ca +b971f6e7751a280c872c3a92f26160dbf3d944ee +85da4b1f41dcbf18160f39c2bdfe6c6204f6e974 +2c4ad14863436f32f7695777d3cf4feaff32c299 +6dcacfa03d827623c054a6ee9faea0a2e48f074b +b4be914757d69c10c6ba3360bb640aac3e03ecbb +36cd24dc4899ad3c196fe439bb9b11542acd3e08 +# Rector cosmetic changes +93f2699102c3704435f70857df68837a29d58142 +99da8995ae47c1be802eb23c1364e907a00bdea6 +8772eeb79a0326a1d1f451a9c6759506fa178002 +9f5907008c67c5da6e1fcb103ffc863f3764e59d +68c56f4e303108ede067d9af0461b993655d0883 +54157f0a184b6a3af44695c1fec6211f55851d77 +5b20c3f8090dd586b8f3a45e0ec2002018007a3e +88f4633eb2a6f4f8bcea3ce45319cfc927e51cd4 +78d0cd9c3ab34eaaa9c2bfaffc2f425e72b4e624 +0160a8696a6aa386ae949936bc2b7fb218195e55 +acf4dc86daa625d8b860b93e46bbc9c2ada7f81d +2f631b23e94c3524bd0eb51d7bce5aa47afd3eae diff --git a/src/AnnotatedRoutes/src/Annotation/Route.php b/src/AnnotatedRoutes/src/Annotation/Route.php index f1e804dd7..8652c9574 100644 --- a/src/AnnotatedRoutes/src/Annotation/Route.php +++ b/src/AnnotatedRoutes/src/Annotation/Route.php @@ -32,11 +32,11 @@ final class Route public const DEFAULT_GROUP = 'web'; /** + * @param array $middleware Route specific middleware set, if any * @psalm-param non-empty-string $route * @psalm-param non-empty-string|null $name * @psalm-param non-empty-string|array $methods * @psalm-param non-empty-string $group Route group, groups can be configured using MiddlewareRegistry - * @param array $middleware Route specific middleware set, if any */ public function __construct( public readonly string $route, diff --git a/src/Boot/src/Attribute/AbstractMethod.php b/src/Boot/src/Attribute/AbstractMethod.php index f6fff86f6..6bb554770 100644 --- a/src/Boot/src/Attribute/AbstractMethod.php +++ b/src/Boot/src/Attribute/AbstractMethod.php @@ -6,7 +6,7 @@ /** * Abstract base class for method attributes used in bootloaders. - * + * * This abstract class serves as a base for all method-level attributes in the bootloader system, * providing common functionality for managing binding aliases. * diff --git a/src/Boot/src/Attribute/BindAlias.php b/src/Boot/src/Attribute/BindAlias.php index 96bcf77d4..ff3f47c49 100644 --- a/src/Boot/src/Attribute/BindAlias.php +++ b/src/Boot/src/Attribute/BindAlias.php @@ -6,12 +6,12 @@ /** * Attribute to define additional aliases for a method. - * + * * This attribute allows defining multiple aliases for a method in a bootloader class. * It can be used to bind a method's return value to multiple interface or class names. - * + * * This attribute can be applied multiple times to the same method. - * + * * Example usage: * ```php * class MyBootloader extends Bootloader @@ -24,8 +24,8 @@ * } * } * ``` - * - * The above example binds the returned Logger instance to LoggerInterface, + * + * The above example binds the returned Logger instance to LoggerInterface, * PsrLoggerInterface, and MonologLoggerInterface. */ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Boot/src/Attribute/BindMethod.php b/src/Boot/src/Attribute/BindMethod.php index 15a8fa94e..0185c5abd 100644 --- a/src/Boot/src/Attribute/BindMethod.php +++ b/src/Boot/src/Attribute/BindMethod.php @@ -6,12 +6,12 @@ /** * Attribute for marking methods that provide container bindings. - * + * * Methods marked with this attribute will be invoked each time the container * needs to resolve the dependency, creating a new instance each time. * The return value of the method will be bound to the specified alias * or to all interfaces/classes in the return type. - * + * * Example usage: * ```php * class MyBootloader extends Bootloader @@ -22,7 +22,7 @@ * { * return new HttpClient(); * } - * + * * // Method will be called each time the container resolves DbFactory * // instead of its return type (DatabaseFactory) * #[BindMethod(alias: DbFactory::class)] @@ -30,7 +30,7 @@ * { * return new DatabaseFactory(); * } - * + * * // Method will be called each time the container resolves either * // LogManagerInterface or its return type (LogManager) * #[BindMethod(alias: LogManagerInterface::class, aliasesFromReturnType: true)] @@ -40,10 +40,10 @@ * } * } * ``` - * + * * This attribute is similar to defining bindings via the `defineBindings()` method, * but with a more expressive and type-safe approach. - * + * * @see SingletonMethod For binding singleton instances * @see InjectorMethod For binding injector methods */ diff --git a/src/Boot/src/Attribute/BootMethod.php b/src/Boot/src/Attribute/BootMethod.php index 0af2c0a83..80ed4f4df 100644 --- a/src/Boot/src/Attribute/BootMethod.php +++ b/src/Boot/src/Attribute/BootMethod.php @@ -6,15 +6,15 @@ /** * Attribute for marking methods that should be called during the boot phase. - * + * * Methods marked with this attribute will be called during the bootloader's * boot phase, after all initialization methods have been called. * The boot phase is where you typically configure services, register event listeners, * or perform other setup tasks. - * + * * The priority parameter determines the order in which boot methods are called. * Higher priority values are executed first. - * + * * Example usage: * ```php * class MyBootloader extends Bootloader @@ -25,14 +25,14 @@ * { * $router->addRoute('home', '/'); * } - * + * * // Called during boot phase with high priority (10) * #[BootMethod(priority: 10)] * public function configureDatabase(DatabaseInterface $db): void * { * $db->setDefaultConnection('default'); * } - * + * * // Called during boot phase with low priority (-10) * #[BootMethod(priority: -10)] * public function registerEventListeners(EventDispatcherInterface $dispatcher): void @@ -41,9 +41,9 @@ * } * } * ``` - * + * * Boot methods are executed after all bootloaders' init methods have been called. - * + * * @see InitMethod For methods to be called during initialization phase */ #[\Attribute(\Attribute::TARGET_METHOD)] diff --git a/src/Boot/src/Attribute/BootloadConfig.php b/src/Boot/src/Attribute/BootloadConfig.php index 8faacbab5..840bdbefa 100644 --- a/src/Boot/src/Attribute/BootloadConfig.php +++ b/src/Boot/src/Attribute/BootloadConfig.php @@ -6,11 +6,11 @@ /** * Attribute to configure bootloader behavior. - * + * * This attribute allows defining configuration for bootloaders, including * constructor arguments, enabling/disabling based on environment variables, * and controlling how configuration overrides work. - * + * * Example usage: * ```php * // Basic configuration with constructor arguments @@ -20,10 +20,10 @@ * public function __construct( * private readonly string $defaultConnection * ) {} - * + * * // ... * } - * + * * // Conditionally enable based on environment * #[BootloadConfig( * allowEnv: ['APP_ENV' => ['local', 'development']], @@ -34,7 +34,7 @@ * // Only loaded in local or development environments * // And not when TESTING is true * } - * + * * // Prevent runtime configuration from overriding attribute configuration * #[BootloadConfig(args: ['debug' => true], override: false)] * class DebugBootloader extends Bootloader @@ -43,7 +43,7 @@ * // configuration is provided at runtime * } * ``` - * + * * When a bootloader has both runtime configuration and a BootloadConfig attribute, * the override parameter controls which configuration takes precedence. */ diff --git a/src/Boot/src/Attribute/InitMethod.php b/src/Boot/src/Attribute/InitMethod.php index d2bac8e1b..bb628b2ae 100644 --- a/src/Boot/src/Attribute/InitMethod.php +++ b/src/Boot/src/Attribute/InitMethod.php @@ -6,14 +6,14 @@ /** * Attribute for marking methods that should be called during the initialization phase. - * + * * Methods marked with this attribute will be called during the bootloader's * initialization phase, before the boot phase begins. This is where you typically * set up container bindings, register services, or perform other initialization tasks. - * + * * The priority parameter determines the order in which init methods are called. * Higher priority values are executed first. - * + * * Example usage: * ```php * class MyBootloader extends Bootloader @@ -24,14 +24,14 @@ * { * $container->bindSingleton(MyService::class, MyServiceImplementation::class); * } - * + * * // Called during initialization phase with high priority (10) * #[InitMethod(priority: 10)] * public function setupCore(): void * { * // Setup core components first * } - * + * * // Called during initialization phase with low priority (-10) * #[InitMethod(priority: -10)] * public function setupExtensions(): void @@ -40,9 +40,9 @@ * } * } * ``` - * + * * Init methods are executed before any bootloader's boot methods are called. - * + * * @see BootMethod For methods to be called during boot phase */ #[\Attribute(\Attribute::TARGET_METHOD)] diff --git a/src/Boot/src/Attribute/InjectorMethod.php b/src/Boot/src/Attribute/InjectorMethod.php index 73471d692..6ffedb5a0 100644 --- a/src/Boot/src/Attribute/InjectorMethod.php +++ b/src/Boot/src/Attribute/InjectorMethod.php @@ -6,14 +6,14 @@ /** * Attribute for marking methods that provide a custom injector. - * + * * Methods marked with this attribute will be used as injectors for the specified * alias type. An injector is responsible for creating and configuring instances * of a specific type when they're requested from the container. - * + * * Unlike BindMethod and SingletonMethod which bind the return value of the method, * InjectorMethod binds the method itself as an injector for the specified type. - * + * * Example usage: * ```php * class MyBootloader extends Bootloader @@ -24,7 +24,7 @@ * { * return new Logger($channel); * } - * + * * // Method will be used as injector for ConnectionInterface * #[InjectorMethod(ConnectionInterface::class)] * public function createDatabaseConnection(string $name = null): ConnectionInterface @@ -35,13 +35,13 @@ * } * } * ``` - * + * * With the above example, any time a LoggerInterface is requested from the container, * the createLogger method will be called with any provided constructor arguments. - * + * * Injectors are powerful for types that need custom creation logic or that * accept additional parameters during construction. - * + * * @see BindMethod For simple method bindings * @see SingletonMethod For singleton method bindings */ diff --git a/src/Boot/src/Attribute/SingletonMethod.php b/src/Boot/src/Attribute/SingletonMethod.php index e4d49e5ad..70a24ba42 100644 --- a/src/Boot/src/Attribute/SingletonMethod.php +++ b/src/Boot/src/Attribute/SingletonMethod.php @@ -6,12 +6,12 @@ /** * Attribute for marking methods that provide singleton container bindings. - * + * * Methods marked with this attribute will be invoked only once, and the * return value will be cached and reused for subsequent resolutions. * The return value of the method will be bound to the specified alias * or to all interfaces/classes in the return type. - * + * * Example usage: * ```php * class MyBootloader extends Bootloader @@ -22,7 +22,7 @@ * { * return new HttpClient(); * } - * + * * // Method will be called once and the result will be bound to DbFactory * // instead of its return type (DatabaseFactory) * #[SingletonMethod(alias: DbFactory::class)] @@ -30,7 +30,7 @@ * { * return new DatabaseFactory(); * } - * + * * // Method will be called once and the result will be bound to both * // LogManagerInterface and its return type (LogManager) * #[SingletonMethod(alias: LogManagerInterface::class, aliasesFromReturnType: true)] @@ -40,10 +40,10 @@ * } * } * ``` - * + * * This attribute is similar to defining singletons via the `defineSingletons()` method, * but with a more expressive and type-safe approach. - * + * * @see BindMethod For non-singleton bindings * @see InjectorMethod For binding injector methods */ diff --git a/src/Boot/src/Injector/EnumInjector.php b/src/Boot/src/Injector/EnumInjector.php index b3586b73e..51f927119 100644 --- a/src/Boot/src/Injector/EnumInjector.php +++ b/src/Boot/src/Injector/EnumInjector.php @@ -12,7 +12,7 @@ use UnitEnum; /** - * @implements InjectorInterface + * @implements InjectorInterface<\UnitEnum> * * @internal */ diff --git a/src/Console/src/Console.php b/src/Console/src/Console.php index f92dbbc6a..7e1eafbdf 100644 --- a/src/Console/src/Console.php +++ b/src/Console/src/Console.php @@ -166,7 +166,7 @@ private function configureIO(InputInterface $input, OutputInterface $output): vo $inputStream = $input->getStream(); } - if ($inputStream !== null && !@\posix_isatty($inputStream) && \getenv('SHELL_INTERACTIVE') === false) { + if ($inputStream !== null && !@posix_isatty($inputStream) && \getenv('SHELL_INTERACTIVE') === false) { $input->setInteractive(false); } } diff --git a/src/Core/src/Config.php b/src/Core/src/Config.php index 3378da0dc..213f3f7d6 100644 --- a/src/Core/src/Config.php +++ b/src/Core/src/Config.php @@ -4,7 +4,6 @@ namespace Spiral\Core; -use IteratorAggregate; use Psr\Container\ContainerInterface; use Spiral\Core\Internal\Binder; use Spiral\Core\Internal\Container; @@ -14,14 +13,13 @@ use Spiral\Core\Internal\Resolver; use Spiral\Core\Internal\Scope; use Spiral\Core\Internal\State; -use Spiral\Core\Internal\Tracer; /** * Container configuration that will be used not only in the root container but also in all child containers. * The {@see self::$scopedBindings} property is internal and common for all containers. * By the reason you can access to bindings for any scope from any container. * - * @implements IteratorAggregate< + * @implements \IteratorAggregate< * non-empty-string, * class-string|class-string|class-string|class-string|class-string|class-string|class-string|class-string * > @@ -32,8 +30,8 @@ class Config implements \IteratorAggregate public readonly string $scope; public readonly Internal\Config\StateStorage $scopedBindings; - private bool $rootLocked = true; public readonly string $actor; + private bool $rootLocked = true; /** * @param class-string $state diff --git a/src/Core/src/Config/Factory.php b/src/Core/src/Config/Factory.php index a36e0e906..be6873d28 100644 --- a/src/Core/src/Config/Factory.php +++ b/src/Core/src/Config/Factory.php @@ -13,9 +13,11 @@ final class Factory extends Binding { use ClosureRendererTrait; + public readonly \Closure $factory; + /** @var class-string|null */ private readonly ?string $returnClass; - public readonly \Closure $factory; + private readonly int $parametersCount; private ?string $definition; @@ -49,6 +51,15 @@ public function getParametersCount(): int return $this->parametersCount; } + /** + * @return class-string|null + * @internal + */ + public function getReturnClass(): ?string + { + return $this->returnClass; + } + public function __toString(): string { $this->definition ??= $this->renderClosureSignature(new \ReflectionFunction($this->factory)); @@ -58,13 +69,4 @@ public function __toString(): string $this->definition, ); } - - /** - * @return class-string|null - * @internal - */ - public function getReturnClass(): ?string - { - return $this->returnClass; - } } diff --git a/src/Core/src/Config/Proxy.php b/src/Core/src/Config/Proxy.php index a42ebe4bd..0b2b9cb47 100644 --- a/src/Core/src/Config/Proxy.php +++ b/src/Core/src/Config/Proxy.php @@ -9,6 +9,7 @@ class Proxy extends Binding { private readonly bool $hasFactory; + /** * @template T * @param class-string $interface @@ -27,7 +28,7 @@ public function __construct( 'Singleton proxies must not have a fallback factory.', ); $this->hasFactory = $fallbackFactory !== null && (new \ReflectionFunction($fallbackFactory)) - ->getReturnType()->__toString() !== 'never'; + ->getReturnType()->__toString() !== 'never'; } /** diff --git a/src/Core/src/Config/Shared.php b/src/Core/src/Config/Shared.php index ab0af5d97..2651b679b 100644 --- a/src/Core/src/Config/Shared.php +++ b/src/Core/src/Config/Shared.php @@ -14,11 +14,6 @@ public function __construct( public readonly bool $singleton = false, ) {} - public function __toString(): string - { - return 'Shared object of class ' . $this->value::class; - } - /** * @return class-string * @internal @@ -27,4 +22,9 @@ public function getReturnClass(): string { return $this->value::class; } + + public function __toString(): string + { + return 'Shared object of class ' . $this->value::class; + } } diff --git a/src/Core/src/Container.php b/src/Core/src/Container.php index 6c22ef1ad..6cb17e5ae 100644 --- a/src/Core/src/Container.php +++ b/src/Core/src/Container.php @@ -246,10 +246,10 @@ public function bind(string $alias, mixed $resolver): void * Bind value resolver to container alias to be executed as cached. Resolver can be class name * (will be constructed only once), function array or Closure (executed only once call). * - * @psalm-param TResolver $resolver * @param bool|null $force If the value is false, an exception will be thrown when attempting * to bind an already constructed singleton. * If the value is null, option {@see Options::$allowSingletonsRebinding} will be used. + * @psalm-param TResolver $resolver * @throws SingletonOverloadException */ public function bindSingleton(string $alias, string|array|callable|object $resolver, ?bool $force = null): void diff --git a/src/Core/src/Exception/Resolver/PositionalArgumentException.php b/src/Core/src/Exception/Resolver/PositionalArgumentException.php index c00f9507a..21e5c0de6 100644 --- a/src/Core/src/Exception/Resolver/PositionalArgumentException.php +++ b/src/Core/src/Exception/Resolver/PositionalArgumentException.php @@ -6,6 +6,11 @@ final class PositionalArgumentException extends ValidationException { + public function getParameter(): string + { + return '#' . $this->parameter; + } + protected function getValidationMessage( \ReflectionFunctionAbstract $reflection, string $parameter, @@ -13,9 +18,4 @@ protected function getValidationMessage( $pattern = 'Cannot use positional argument after named argument `%s` %s.'; return $this->renderFunctionAndParameter($reflection, $pattern); } - - public function getParameter(): string - { - return '#' . $this->parameter; - } } diff --git a/src/Core/src/Internal/Actor.php b/src/Core/src/Internal/Actor.php index be030490c..3c8b7a4fa 100644 --- a/src/Core/src/Internal/Actor.php +++ b/src/Core/src/Internal/Actor.php @@ -20,7 +20,6 @@ use Spiral\Core\Exception\Container\NotFoundException; use Spiral\Core\Exception\Container\RecursiveProxyException; use Spiral\Core\Exception\Container\TracedContainerException; -use Spiral\Core\Exception\Resolver\ValidationException; use Spiral\Core\Exception\Resolver\WrongTypeException; use Spiral\Core\Exception\Scope\BadScopeException; use Spiral\Core\FactoryInterface; @@ -226,7 +225,7 @@ private function resolveInjector(Config\Injectable $binding, Ctx $ctx, array $ar /** @var array, \ReflectionMethod|false> $cache reflection for extended injectors */ static $cache = []; $extended = $cache[$injectorInstance::class] ??= ( - static fn(\ReflectionType $type): bool => + static fn(\ReflectionType $type): bool => $type::class === \ReflectionUnionType::class || (string) $type === 'mixed' )( ($refMethod = new \ReflectionMethod($injectorInstance, 'createInjection')) @@ -549,7 +548,9 @@ private function createInstance( \sprintf( "Can't resolve `%s`.", $tracer->getRootAlias(), - ), $tracer->getTraces(), $e + ), + $tracer->getTraces(), + $e, ); } finally { $tracer->pop($newScope); @@ -604,7 +605,7 @@ private function registerInstance(Ctx $ctx, object $instance): object */ private function isSingleton(Ctx $ctx): bool { - if (is_bool($ctx->singleton)) { + if (\is_bool($ctx->singleton)) { return $ctx->singleton; } diff --git a/src/Core/src/Internal/Proxy/ProxyClassRenderer.php b/src/Core/src/Internal/Proxy/ProxyClassRenderer.php index f02e3c8c1..3e7fdf239 100644 --- a/src/Core/src/Internal/Proxy/ProxyClassRenderer.php +++ b/src/Core/src/Internal/Proxy/ProxyClassRenderer.php @@ -195,7 +195,7 @@ public static function renderDefaultValue(\ReflectionParameter $param): string public static function normalizeClassType(\ReflectionNamedType $type, \ReflectionClass $class): string { - return match($type->getName()) { + return match ($type->getName()) { 'static' => 'static', 'self' => '\\' . $class->getName(), default => '\\' . $type->getName(), diff --git a/src/Core/src/Internal/Tracer.php b/src/Core/src/Internal/Tracer.php index d686d52b2..44349cfab 100644 --- a/src/Core/src/Internal/Tracer.php +++ b/src/Core/src/Internal/Tracer.php @@ -18,6 +18,19 @@ final class Tracer implements \Stringable */ private array $traces = []; + /** + * @param Trace[][] $blocks + */ + public static function renderTraceList(array $blocks): string + { + $result = []; + $i = 0; + foreach ($blocks as $block) { + \array_push($result, ...self::blockToStringList($block, $i++)); + } + return \implode("\n", $result); + } + /** * @param string $header Message before stack list */ @@ -65,19 +78,6 @@ public function __toString(): string return $this->traces === [] ? '' : "Resolving trace:\n" . self::renderTraceList($this->traces); } - /** - * @param Trace[][] $blocks - */ - public static function renderTraceList(array $blocks): string - { - $result = []; - $i = 0; - foreach ($blocks as $block) { - \array_push($result, ...self::blockToStringList($block, $i++)); - } - return \implode("\n", $result); - } - /** * @param Trace[] $items * @param int<0, max> $level diff --git a/src/Core/tests/InvokerTest.php b/src/Core/tests/InvokerTest.php index 75dedb62d..b8ee80ebd 100644 --- a/src/Core/tests/InvokerTest.php +++ b/src/Core/tests/InvokerTest.php @@ -17,8 +17,6 @@ use Spiral\Tests\Core\Fixtures\SampleClass; use Spiral\Tests\Core\Fixtures\Storage; -use function PHPUnit\Framework\assertTrue; - class InvokerTest extends TestCase { private Container $container; diff --git a/src/Core/tests/Scope/ScopeAttributeTest.php b/src/Core/tests/Scope/ScopeAttributeTest.php index 925344ddc..f1919c310 100644 --- a/src/Core/tests/Scope/ScopeAttributeTest.php +++ b/src/Core/tests/Scope/ScopeAttributeTest.php @@ -7,7 +7,6 @@ use PHPUnit\Framework\Attributes\Group; use Spiral\Core\Attribute\Scope; use Spiral\Core\Container; -use Spiral\Core\Exception\Container\NotFoundException; use Spiral\Core\Exception\Scope\BadScopeException; use Spiral\Core\Exception\Scope\NamedScopeDuplicationException; use Spiral\Tests\Core\Scope\Stub\AttrScopeFoo; diff --git a/src/Exceptions/src/Renderer/ConsoleRenderer.php b/src/Exceptions/src/Renderer/ConsoleRenderer.php index 0036f1fc2..53c782c56 100644 --- a/src/Exceptions/src/Renderer/ConsoleRenderer.php +++ b/src/Exceptions/src/Renderer/ConsoleRenderer.php @@ -246,7 +246,7 @@ private function isColorsSupported(mixed $stream = STDOUT): bool try { if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($stream)) + return (\function_exists('sapi_windows_vt100_support') && @\sapi_windows_vt100_support($stream)) || \getenv('ANSICON') !== false || \getenv('ConEmuANSI') === 'ON' || \getenv('TERM') === 'xterm'; diff --git a/src/Prototype/src/ClassNode/Type.php b/src/Prototype/src/ClassNode/Type.php index e5f3a9c94..fe9a35152 100644 --- a/src/Prototype/src/ClassNode/Type.php +++ b/src/Prototype/src/ClassNode/Type.php @@ -4,7 +4,6 @@ namespace Spiral\Prototype\ClassNode; -use phpDocumentor\Reflection\Types\ClassString; use Spiral\Prototype\Utils; final class Type diff --git a/src/Queue/src/QueueableDetector.php b/src/Queue/src/QueueableDetector.php index c99380be8..5b34c44ba 100644 --- a/src/Queue/src/QueueableDetector.php +++ b/src/Queue/src/QueueableDetector.php @@ -12,8 +12,7 @@ final class QueueableDetector public function __construct(private readonly ReaderInterface $reader) {} /** - * @psalm-param class-string|object $object - * @param mixed $object + * @param class-string|object $object */ public function isQueueable($object): bool { @@ -28,8 +27,7 @@ public function isQueueable($object): bool } /** - * @psalm-param class-string|object $object - * @param mixed $object + * @param class-string|object $object */ public function getQueue($object): ?string {