diff --git a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidGenerator.php b/src/Symfony/Bridge/Doctrine/IdGenerator/UuidGenerator.php index 5e1747bb13821..7791e417b4c87 100644 --- a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidGenerator.php +++ b/src/Symfony/Bridge/Doctrine/IdGenerator/UuidGenerator.php @@ -49,10 +49,7 @@ public function nameBased(string $entityGetter, Uuid|string $namespace = null): return $clone; } - /** - * @return static - */ - public function randomBased(): self + public function randomBased(): static { $clone = clone $this; $clone->factory = $clone->protoFactory->randomBased(); diff --git a/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php b/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php index f1726914b490b..a6a90bf1ed5eb 100644 --- a/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php +++ b/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php @@ -57,10 +57,7 @@ public function attach(string $file, string $name = null, string $contentType = } } - /** - * @return $this - */ - public function setSubject(string $subject): self + public function setSubject(string $subject): static { $this->message->subject($subject); @@ -72,10 +69,7 @@ public function getSubject(): ?string return $this->message->getSubject(); } - /** - * @return $this - */ - public function setReturnPath(string $address): self + public function setReturnPath(string $address): static { $this->message->returnPath($address); @@ -87,10 +81,7 @@ public function getReturnPath(): string return $this->message->getReturnPath(); } - /** - * @return $this - */ - public function addFrom(string $address, string $name = ''): self + public function addFrom(string $address, string $name = ''): static { $this->message->addFrom(new Address($address, $name)); @@ -105,10 +96,7 @@ public function getFrom(): array return $this->message->getFrom(); } - /** - * @return $this - */ - public function addReplyTo(string $address): self + public function addReplyTo(string $address): static { $this->message->addReplyTo($address); @@ -123,10 +111,7 @@ public function getReplyTo(): array return $this->message->getReplyTo(); } - /** - * @return $this - */ - public function addTo(string $address, string $name = ''): self + public function addTo(string $address, string $name = ''): static { $this->message->addTo(new Address($address, $name)); @@ -141,10 +126,7 @@ public function getTo(): array return $this->message->getTo(); } - /** - * @return $this - */ - public function addCc(string $address, string $name = ''): self + public function addCc(string $address, string $name = ''): static { $this->message->addCc(new Address($address, $name)); @@ -159,10 +141,7 @@ public function getCc(): array return $this->message->getCc(); } - /** - * @return $this - */ - public function addBcc(string $address, string $name = ''): self + public function addBcc(string $address, string $name = ''): static { $this->message->addBcc(new Address($address, $name)); @@ -177,10 +156,7 @@ public function getBcc(): array return $this->message->getBcc(); } - /** - * @return $this - */ - public function setPriority(int $priority): self + public function setPriority(int $priority): static { $this->message->priority($priority); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php index a0773267a9a74..41ae717fcf265 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityTest.php @@ -177,7 +177,7 @@ public function getPassword(): ?string /** * {@inheritdoc} */ - public function getSalt() + public function getSalt(): ?string { return null; } diff --git a/src/Symfony/Component/Console/Command/LazyCommand.php b/src/Symfony/Component/Console/Command/LazyCommand.php index 4defc0a877f59..930cee0be32c0 100644 --- a/src/Symfony/Component/Console/Command/LazyCommand.php +++ b/src/Symfony/Component/Console/Command/LazyCommand.php @@ -69,10 +69,7 @@ public function run(InputInterface $input, OutputInterface $output): int return $this->getCommand()->run($input, $output); } - /** - * @return $this - */ - public function setCode(callable $code): self + public function setCode(callable $code): static { $this->getCommand()->setCode($code); @@ -87,10 +84,7 @@ public function mergeApplicationDefinition(bool $mergeArgs = true): void $this->getCommand()->mergeApplicationDefinition($mergeArgs); } - /** - * @return $this - */ - public function setDefinition(array|InputDefinition $definition): self + public function setDefinition(array|InputDefinition $definition): static { $this->getCommand()->setDefinition($definition); @@ -107,40 +101,28 @@ public function getNativeDefinition(): InputDefinition return $this->getCommand()->getNativeDefinition(); } - /** - * @return $this - */ - public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null): self + public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null): static { $this->getCommand()->addArgument($name, $mode, $description, $default); return $this; } - /** - * @return $this - */ - public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null): self + public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null): static { $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default); return $this; } - /** - * @return $this - */ - public function setProcessTitle(string $title): self + public function setProcessTitle(string $title): static { $this->getCommand()->setProcessTitle($title); return $this; } - /** - * @return $this - */ - public function setHelp(string $help): self + public function setHelp(string $help): static { $this->getCommand()->setHelp($help); @@ -162,10 +144,7 @@ public function getSynopsis(bool $short = false): string return $this->getCommand()->getSynopsis($short); } - /** - * @return $this - */ - public function addUsage(string $usage): self + public function addUsage(string $usage): static { $this->getCommand()->addUsage($usage); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php index eb1df2dd0d460..793300dbf2c8d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ContainerConfigurator.php @@ -82,10 +82,7 @@ final public function env(): ?string return $this->env; } - /** - * @return static - */ - final public function withPath(string $path): self + final public function withPath(string $path): static { $clone = clone $this; $clone->path = $clone->file = $path; diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php index 5e84848046a6f..3d5eab3290e81 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php @@ -38,11 +38,9 @@ public function __construct(ServicesConfigurator $parent, Definition $definition /** * Adds a tag for this definition. * - * @return $this - * * @throws InvalidArgumentException when an invalid tag name or attribute is provided */ - final public function tag(string $name, array $attributes = []): self + final public function tag(string $name, array $attributes = []): static { if ('' === $name) { throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.'); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php index 2b2c402d5fb3b..8e7cf4bc45778 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php @@ -27,20 +27,14 @@ public function __construct(ContainerBuilder $container) $this->container = $container; } - /** - * @return $this - */ - final public function set(string $name, mixed $value): self + final public function set(string $name, mixed $value): static { $this->container->setParameter($name, static::processValue($value, true)); return $this; } - /** - * @return $this - */ - final public function __invoke(string $name, mixed $value): self + final public function __invoke(string $name, mixed $value): static { return $this->set($name, $value); } diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php index 34fb5dec3634c..fdb78cf9b5845 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php @@ -75,10 +75,8 @@ public function __destruct() * Excludes files from registration using glob patterns. * * @param string[]|string $excludes - * - * @return $this */ - final public function exclude(array|string $excludes): self + final public function exclude(array|string $excludes): static { $this->excludes = (array) $excludes; diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php index b36ba61e341ee..434b5490e0385 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php @@ -29,30 +29,21 @@ public function __construct(string $id) $this->id = $id; } - /** - * @return $this - */ - final public function ignoreOnInvalid(): self + final public function ignoreOnInvalid(): static { $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; return $this; } - /** - * @return $this - */ - final public function nullOnInvalid(): self + final public function nullOnInvalid(): static { $this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; return $this; } - /** - * @return $this - */ - final public function ignoreOnUninitialized(): self + final public function ignoreOnUninitialized(): static { $this->invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE; diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AbstractTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AbstractTrait.php index 82ba21d7bdd2e..1dc945bbf1f61 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AbstractTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AbstractTrait.php @@ -16,10 +16,8 @@ trait AbstractTrait /** * Whether this definition is abstract, that means it merely serves as a * template for other definitions. - * - * @return $this */ - final public function abstract(bool $abstract = true): self + final public function abstract(bool $abstract = true): static { $this->definition->setAbstract($abstract); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php index e77922f23403f..cd05da3f1d5ac 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php @@ -15,10 +15,8 @@ trait ArgumentTrait { /** * Sets the arguments to pass to the service constructor/factory method. - * - * @return $this */ - final public function args(array $arguments): self + final public function args(array $arguments): static { $this->definition->setArguments(static::processValue($arguments, true)); @@ -27,10 +25,8 @@ final public function args(array $arguments): self /** * Sets one argument to pass to the service constructor/factory method. - * - * @return $this */ - final public function arg(string|int $key, mixed $value): self + final public function arg(string|int $key, mixed $value): static { $this->definition->setArgument($key, static::processValue($value, true)); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php index 9eab22cfef01d..bca470359507d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php @@ -18,11 +18,9 @@ trait AutoconfigureTrait /** * Sets whether or not instanceof conditionals should be prepended with a global set. * - * @return $this - * * @throws InvalidArgumentException when a parent is already set */ - final public function autoconfigure(bool $autoconfigured = true): self + final public function autoconfigure(bool $autoconfigured = true): static { $this->definition->setAutoconfigured($autoconfigured); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php index 2837a0201d11b..33d8f1d3a81b7 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php @@ -15,10 +15,8 @@ trait AutowireTrait { /** * Enables/disables autowiring. - * - * @return $this */ - final public function autowire(bool $autowired = true): self + final public function autowire(bool $autowired = true): static { $this->definition->setAutowired($autowired); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php index 5ee344468255c..6b79dc740a410 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php @@ -28,10 +28,8 @@ trait BindTrait * * @param string $nameOrFqcn A parameter name with its "$" prefix, or an FQCN * @param mixed $valueOrRef The value or reference to bind - * - * @return $this */ - final public function bind(string $nameOrFqcn, mixed $valueOrRef): self + final public function bind(string $nameOrFqcn, mixed $valueOrRef): static { $valueOrRef = static::processValue($valueOrRef, true); if (!preg_match('/^(?:(?:array|bool|float|int|string|iterable)[ \t]*+)?\$/', $nameOrFqcn) && !$valueOrRef instanceof Reference) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php index 28f92d274fe11..984d9d6857431 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php @@ -22,11 +22,9 @@ trait CallTrait * @param array $arguments An array of arguments to pass to the method call * @param bool $returnsClone Whether the call returns the service instance or not * - * @return $this - * * @throws InvalidArgumentException on empty $method param */ - final public function call(string $method, array $arguments = [], bool $returnsClone = false): self + final public function call(string $method, array $arguments = [], bool $returnsClone = false): static { $this->definition->addMethodCall($method, static::processValue($arguments, true), $returnsClone); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php index 20da791aaae08..dc9879304833f 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php @@ -15,10 +15,8 @@ trait ClassTrait { /** * Sets the service class. - * - * @return $this */ - final public function class(?string $class): self + final public function class(?string $class): static { $this->definition->setClass($class); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php index 226391f0f0710..18b560bf424b9 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php @@ -11,16 +11,14 @@ namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; +use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; + trait ConfiguratorTrait { /** * Sets a configurator to call after the service is fully initialized. - * - * @param string|array $configurator A PHP callable reference - * - * @return $this */ - final public function configurator(string|array $configurator): self + final public function configurator(string|array|ReferenceConfigurator $configurator): static { $this->definition->setConfigurator(static::processValue($configurator, true)); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php index b3a1ae1b54793..5dfbd1e32f3c8 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php @@ -21,11 +21,9 @@ trait DecorateTrait * * @param string|null $id The decorated service id, use null to remove decoration * - * @return $this - * * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals */ - final public function decorate(?string $id, string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): self + final public function decorate(?string $id, string $renamedId = null, int $priority = 0, int $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE): static { $this->definition->setDecoratedService($id, $renamedId, $priority, $invalidBehavior); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php index 94ad60fbf9719..075091ff77b58 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php @@ -22,11 +22,9 @@ trait DeprecateTrait * @param string $version The version of the package that introduced the deprecation * @param string $message The deprecation message to use * - * @return $this - * * @throws InvalidArgumentException when the message template is invalid */ - final public function deprecate(string $package, string $version, string $message): self + final public function deprecate(string $package, string $version, string $message): static { $this->definition->setDeprecated($package, $version, $message); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php index 0cc4eb0b20103..1126d9828a2b0 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php @@ -18,12 +18,8 @@ trait FactoryTrait { /** * Sets a factory. - * - * @param string|array|ReferenceConfigurator $factory A PHP callable reference - * - * @return $this */ - final public function factory(string|array $factory): self + final public function factory(string|array|ReferenceConfigurator $factory): static { if (\is_string($factory) && 1 === substr_count($factory, ':')) { $factoryParts = explode(':', $factory); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php index 5f42aef8fd65d..31d5604772a4e 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php @@ -15,10 +15,8 @@ trait FileTrait { /** * Sets a file to require before creating the service. - * - * @return $this */ - final public function file(string $file): self + final public function file(string $file): static { $this->definition->setFile($file); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php index ccde64e75e1f3..2846c945a4ea9 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php @@ -17,10 +17,8 @@ trait LazyTrait * Sets the lazy flag of this service. * * @param bool|string $lazy A FQCN to derivate the lazy proxy from or `true` to make it extend from the definition's class - * - * @return $this */ - final public function lazy(bool|string $lazy = true): self + final public function lazy(bool|string $lazy = true): static { $this->definition->setLazy((bool) $lazy); if (\is_string($lazy)) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php index 37194e50e6d1f..2356143076c80 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php @@ -19,11 +19,9 @@ trait ParentTrait /** * Sets the Definition to inherit from. * - * @return $this - * * @throws InvalidArgumentException when parent cannot be set */ - final public function parent(string $parent): self + final public function parent(string $parent): static { if (!$this->allowParent) { throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id)); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php index 06848450af391..719d72bf10770 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php @@ -15,10 +15,8 @@ trait PropertyTrait { /** * Sets a specific property. - * - * @return $this */ - final public function property(string $name, mixed $value): self + final public function property(string $name, mixed $value): static { $this->definition->setProperty($name, static::processValue($value, true)); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php index f15756c1b5270..d9ffc50363e37 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php @@ -13,20 +13,14 @@ trait PublicTrait { - /** - * @return $this - */ - final public function public(): self + final public function public(): static { $this->definition->setPublic(true); return $this; } - /** - * @return $this - */ - final public function private(): self + final public function private(): static { $this->definition->setPublic(false); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ShareTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ShareTrait.php index 16fde0f2943d4..6893e232c2b11 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ShareTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ShareTrait.php @@ -15,10 +15,8 @@ trait ShareTrait { /** * Sets if the service must be shared or not. - * - * @return $this */ - final public function share(bool $shared = true): self + final public function share(bool $shared = true): static { $this->definition->setShared($shared); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php index cb08b1133abcd..ad0254a571d26 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php @@ -16,10 +16,8 @@ trait SyntheticTrait /** * Sets whether this definition is synthetic, that is not constructed by the * container, but dynamically injected. - * - * @return $this */ - final public function synthetic(bool $synthetic = true): self + final public function synthetic(bool $synthetic = true): static { $this->definition->setSynthetic($synthetic); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php index f4d5f002cf87d..7293ff72ed2e0 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php @@ -17,10 +17,8 @@ trait TagTrait { /** * Adds a tag for this definition. - * - * @return $this */ - final public function tag(string $name, array $attributes = []): self + final public function tag(string $name, array $attributes = []): static { if ('' === $name) { throw new InvalidArgumentException(sprintf('The tag name for service "%s" must be a non-empty string.', $this->id)); diff --git a/src/Symfony/Component/DependencyInjection/ServiceLocator.php b/src/Symfony/Component/DependencyInjection/ServiceLocator.php index 2191524f9c0f0..6c4fe136f7605 100644 --- a/src/Symfony/Component/DependencyInjection/ServiceLocator.php +++ b/src/Symfony/Component/DependencyInjection/ServiceLocator.php @@ -69,10 +69,8 @@ public function __invoke(string $id) /** * @internal - * - * @return static */ - public function withContext(string $externalId, Container $container): self + public function withContext(string $externalId, Container $container): static { $locator = clone $this; $locator->externalId = $externalId; diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php index ecded79cc06eb..20bb0aa62be13 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php @@ -277,20 +277,16 @@ public function setFoo(Foo $foo) /** * @required - * - * @return static */ - public function withFoo1(Foo $foo): self + public function withFoo1(Foo $foo): static { return $this->withFoo2($foo); } /** * @required - * - * @return static */ - public function withFoo2(Foo $foo): self + public function withFoo2(Foo $foo): static { $new = clone $this; $new->foo = $foo; diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index f280f82d6b49b..10ba11bbdc43e 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -956,10 +956,8 @@ public static function xpathLiteral(string $s) * Filters the list of nodes with an XPath expression. * * The XPath expression should already be processed to apply it in the context of each node. - * - * @return static */ - private function filterRelativeXPath(string $xpath): object + private function filterRelativeXPath(string $xpath): static { $crawler = $this->createSubCrawler(null); if (null === $this->document) { @@ -1202,10 +1200,8 @@ private function findNamespacePrefixes(string $xpath): array * Creates a crawler for some subnodes. * * @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $nodes - * - * @return static */ - private function createSubCrawler(\DOMNodeList|\DOMNode|array|string|null $nodes): object + private function createSubCrawler(\DOMNodeList|\DOMNode|array|string|null $nodes): static { $crawler = new static($nodes, $this->uri, $this->baseHref); $crawler->isHtml = $this->isHtml; diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php index e1490af2bd93d..86420f6d969a3 100644 --- a/src/Symfony/Component/Dotenv/Dotenv.php +++ b/src/Symfony/Component/Dotenv/Dotenv.php @@ -46,10 +46,7 @@ public function __construct(string $envKey = 'APP_ENV', string $debugKey = 'APP_ $this->debugKey = $debugKey; } - /** - * @return $this - */ - public function setProdEnvs(array $prodEnvs): self + public function setProdEnvs(array $prodEnvs): static { $this->prodEnvs = $prodEnvs; @@ -59,10 +56,8 @@ public function setProdEnvs(array $prodEnvs): self /** * @param bool $usePutenv If `putenv()` should be used to define environment variables or not. * Beware that `putenv()` is not thread safe, that's why this setting defaults to false - * - * @return $this */ - public function usePutenv(bool $usePutenv = true): self + public function usePutenv(bool $usePutenv = true): static { $this->usePutenv = $usePutenv; diff --git a/src/Symfony/Component/HttpClient/DecoratorTrait.php b/src/Symfony/Component/HttpClient/DecoratorTrait.php index 2d546776f2193..a33c09486b10f 100644 --- a/src/Symfony/Component/HttpClient/DecoratorTrait.php +++ b/src/Symfony/Component/HttpClient/DecoratorTrait.php @@ -48,7 +48,7 @@ public function stream(ResponseInterface|iterable $responses, float $timeout = n /** * {@inheritdoc} */ - public function withOptions(array $options): self + public function withOptions(array $options): static { $clone = clone $this; $clone->client = $this->client->withOptions($options); diff --git a/src/Symfony/Component/HttpClient/HttpClientTrait.php b/src/Symfony/Component/HttpClient/HttpClientTrait.php index 05ed08a772867..b7eadc7e4209c 100644 --- a/src/Symfony/Component/HttpClient/HttpClientTrait.php +++ b/src/Symfony/Component/HttpClient/HttpClientTrait.php @@ -28,7 +28,7 @@ trait HttpClientTrait /** * {@inheritdoc} */ - public function withOptions(array $options): self + public function withOptions(array $options): static { $clone = clone $this; $clone->defaultOptions = self::mergeDefaultOptions($options, $this->defaultOptions); diff --git a/src/Symfony/Component/HttpClient/HttplugClient.php b/src/Symfony/Component/HttpClient/HttplugClient.php index df0cca1ce9622..8cee93891990c 100644 --- a/src/Symfony/Component/HttpClient/HttplugClient.php +++ b/src/Symfony/Component/HttpClient/HttplugClient.php @@ -102,10 +102,8 @@ public function sendRequest(RequestInterface $request): Psr7ResponseInterface /** * {@inheritdoc} - * - * @return HttplugPromise */ - public function sendAsyncRequest(RequestInterface $request): Promise + public function sendAsyncRequest(RequestInterface $request): HttplugPromise { if (!$promisePool = $this->promisePool) { throw new \LogicException(sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__)); diff --git a/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php b/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php index 6dc8bd7c6dbeb..f982072bbe12f 100644 --- a/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php +++ b/src/Symfony/Component/HttpClient/NoPrivateNetworkHttpClient.php @@ -114,7 +114,7 @@ public function setLogger(LoggerInterface $logger): void /** * {@inheritdoc} */ - public function withOptions(array $options): self + public function withOptions(array $options): static { $clone = clone $this; $clone->client = $this->client->withOptions($options); diff --git a/src/Symfony/Component/HttpClient/TraceableHttpClient.php b/src/Symfony/Component/HttpClient/TraceableHttpClient.php index 4946660ad9bf2..4ed8368e87e20 100644 --- a/src/Symfony/Component/HttpClient/TraceableHttpClient.php +++ b/src/Symfony/Component/HttpClient/TraceableHttpClient.php @@ -109,7 +109,7 @@ public function setLogger(LoggerInterface $logger): void /** * {@inheritdoc} */ - public function withOptions(array $options): self + public function withOptions(array $options): static { $clone = clone $this; $clone->client = $this->client->withOptions($options); diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index a68ddb5decffa..be0907b7df70c 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -410,11 +410,9 @@ public function getContent() /** * Sets the HTTP protocol version (1.0 or 1.1). * - * @return $this - * * @final */ - public function setProtocolVersion(string $version): object + public function setProtocolVersion(string $version): static { $this->version = $version; @@ -437,13 +435,11 @@ public function getProtocolVersion(): string * If the status text is null it will be automatically populated for the known * status codes and left empty otherwise. * - * @return $this - * * @throws \InvalidArgumentException When the HTTP status code is not valid * * @final */ - public function setStatusCode(int $code, string $text = null): object + public function setStatusCode(int $code, string $text = null): static { $this->statusCode = $code; if ($this->isInvalid()) { @@ -480,11 +476,9 @@ public function getStatusCode(): int /** * Sets the response charset. * - * @return $this - * * @final */ - public function setCharset(string $charset): object + public function setCharset(string $charset): static { $this->charset = $charset; @@ -561,11 +555,9 @@ public function isValidateable(): bool * * It makes the response ineligible for serving other clients. * - * @return $this - * * @final */ - public function setPrivate(): object + public function setPrivate(): static { $this->headers->removeCacheControlDirective('public'); $this->headers->addCacheControlDirective('private'); @@ -578,11 +570,9 @@ public function setPrivate(): object * * It makes the response eligible for serving other clients. * - * @return $this - * * @final */ - public function setPublic(): object + public function setPublic(): static { $this->headers->addCacheControlDirective('public'); $this->headers->removeCacheControlDirective('private'); @@ -593,11 +583,9 @@ public function setPublic(): object /** * Marks the response as "immutable". * - * @return $this - * * @final */ - public function setImmutable(bool $immutable = true): object + public function setImmutable(bool $immutable = true): static { if ($immutable) { $this->headers->addCacheControlDirective('immutable'); @@ -648,11 +636,9 @@ public function getDate(): ?\DateTimeInterface /** * Sets the Date header. * - * @return $this - * * @final */ - public function setDate(\DateTimeInterface $date): object + public function setDate(\DateTimeInterface $date): static { if ($date instanceof \DateTime) { $date = \DateTimeImmutable::createFromMutable($date); @@ -713,11 +699,9 @@ public function getExpires(): ?\DateTimeInterface * * Passing null as value will remove the header. * - * @return $this - * * @final */ - public function setExpires(\DateTimeInterface $date = null): object + public function setExpires(\DateTimeInterface $date = null): static { if (null === $date) { $this->headers->remove('Expires'); @@ -766,11 +750,9 @@ public function getMaxAge(): ?int * * This methods sets the Cache-Control max-age directive. * - * @return $this - * * @final */ - public function setMaxAge(int $value): object + public function setMaxAge(int $value): static { $this->headers->addCacheControlDirective('max-age', $value); @@ -782,11 +764,9 @@ public function setMaxAge(int $value): object * * This methods sets the Cache-Control s-maxage directive. * - * @return $this - * * @final */ - public function setSharedMaxAge(int $value): object + public function setSharedMaxAge(int $value): static { $this->setPublic(); $this->headers->addCacheControlDirective('s-maxage', $value); @@ -816,11 +796,9 @@ public function getTtl(): ?int * * This method adjusts the Cache-Control/s-maxage directive. * - * @return $this - * * @final */ - public function setTtl(int $seconds): object + public function setTtl(int $seconds): static { $this->setSharedMaxAge($this->getAge() + $seconds); @@ -832,11 +810,9 @@ public function setTtl(int $seconds): object * * This method adjusts the Cache-Control/max-age directive. * - * @return $this - * * @final */ - public function setClientTtl(int $seconds): object + public function setClientTtl(int $seconds): static { $this->setMaxAge($this->getAge() + $seconds); @@ -860,11 +836,9 @@ public function getLastModified(): ?\DateTimeInterface * * Passing null as value will remove the header. * - * @return $this - * * @final */ - public function setLastModified(\DateTimeInterface $date = null): object + public function setLastModified(\DateTimeInterface $date = null): static { if (null === $date) { $this->headers->remove('Last-Modified'); @@ -898,11 +872,9 @@ public function getEtag(): ?string * @param string|null $etag The ETag unique identifier or null to remove the header * @param bool $weak Whether you want a weak ETag or not * - * @return $this - * * @final */ - public function setEtag(string $etag = null, bool $weak = false): object + public function setEtag(string $etag = null, bool $weak = false): static { if (null === $etag) { $this->headers->remove('Etag'); @@ -922,13 +894,11 @@ public function setEtag(string $etag = null, bool $weak = false): object * * Available options are: must_revalidate, no_cache, no_store, no_transform, public, private, proxy_revalidate, max_age, s_maxage, immutable, last_modified and etag. * - * @return $this - * * @throws \InvalidArgumentException * * @final */ - public function setCache(array $options): object + public function setCache(array $options): static { if ($diff = array_diff(array_keys($options), array_keys(self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES))) { throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff))); @@ -985,13 +955,11 @@ public function setCache(array $options): object * This sets the status, removes the body, and discards any headers * that MUST NOT be included in 304 responses. * - * @return $this - * * @see https://tools.ietf.org/html/rfc2616#section-10.3.5 * * @final */ - public function setNotModified(): object + public function setNotModified(): static { $this->setStatusCode(304); $this->setContent(null); @@ -1038,11 +1006,9 @@ public function getVary(): array * * @param bool $replace Whether to replace the actual value or not (true by default) * - * @return $this - * * @final */ - public function setVary(string|array $headers, bool $replace = true): object + public function setVary(string|array $headers, bool $replace = true): static { $this->headers->set('Vary', $headers, $replace); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php index 6c65f449372d4..b2216af054742 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -32,10 +32,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase */ protected $redisClient; - /** - * @return \Redis|\RedisArray|\RedisCluster|\Predis\Client - */ - abstract protected function createRedisClient(string $host): object; + abstract protected function createRedisClient(string $host): \Redis|\RedisArray|\RedisCluster|\Predis\Client; protected function setUp(): void { diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php index bfccc80763d8a..8926fb1a93a14 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php @@ -18,10 +18,7 @@ */ class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { - /** - * @return Client - */ - protected function createRedisClient(string $host): object + protected function createRedisClient(string $host): Client { return new Client([['host' => $host]]); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php index 6df77d41e994f..bb33a3d9a56e2 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php @@ -18,10 +18,7 @@ */ class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { - /** - * @return Client - */ - protected function createRedisClient(string $host): object + protected function createRedisClient(string $host): Client { return new Client(['host' => $host]); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php index b8aacbf584376..af66915890fdd 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php @@ -16,10 +16,7 @@ */ class RedisArraySessionHandlerTest extends AbstractRedisSessionHandlerTestCase { - /** - * @return \RedisArray - */ - protected function createRedisClient(string $host): object + protected function createRedisClient(string $host): \RedisArray { return new \RedisArray([$host]); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php index b3b7b4a1ff398..031629501bb11 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php @@ -29,10 +29,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \RedisCluster - */ - protected function createRedisClient(string $host): object + protected function createRedisClient(string $host): \RedisCluster { return new \RedisCluster(null, explode(' ', getenv('REDIS_CLUSTER_HOSTS'))); } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php index e775d7ff2956e..523feaa5ec3a5 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php @@ -16,10 +16,7 @@ */ class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { - /** - * @return \Redis - */ - protected function createRedisClient(string $host): object + protected function createRedisClient(string $host): \Redis { $client = new \Redis(); $client->connect($host); diff --git a/src/Symfony/Component/Ldap/Ldap.php b/src/Symfony/Component/Ldap/Ldap.php index afe8e15a4425a..874625c15aa5a 100644 --- a/src/Symfony/Component/Ldap/Ldap.php +++ b/src/Symfony/Component/Ldap/Ldap.php @@ -69,10 +69,8 @@ public function escape(string $subject, string $ignore = '', int $flags = 0): st * * @param string $adapter The adapter name * @param array $config The adapter's configuration - * - * @return static */ - public static function create(string $adapter, array $config = []): self + public static function create(string $adapter, array $config = []): static { if (!isset(self::ADAPTER_MAP[$adapter])) { throw new DriverNotFoundException(sprintf('Adapter "%s" not found. You should use one of: "%s".', $adapter, implode('", "', self::ADAPTER_MAP))); diff --git a/src/Symfony/Component/Lock/Store/PdoStore.php b/src/Symfony/Component/Lock/Store/PdoStore.php index e33420a432ec4..f938e1e808f2c 100644 --- a/src/Symfony/Component/Lock/Store/PdoStore.php +++ b/src/Symfony/Component/Lock/Store/PdoStore.php @@ -230,10 +230,7 @@ private function getUniqueToken(Key $key): string return $key->getState(__CLASS__); } - /** - * @return \PDO|Connection - */ - private function getConnection(): object + private function getConnection(): \PDO|Connection { if (null === $this->conn) { if (strpos($this->dsn, '://')) { diff --git a/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php index 6f3eb47125006..97a2a54eeb762 100644 --- a/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/AbstractRedisStoreTest.php @@ -34,12 +34,7 @@ protected function getClockDelay() return 250000; } - /** - * Return a RedisConnection. - * - * @return \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface - */ - abstract protected function getRedisConnection(): object; + abstract protected function getRedisConnection(): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php index 7dc483bf842a6..96bb658c9e999 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PredisStoreTest.php @@ -29,10 +29,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \Predis\Client - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \Predis\Client { $redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379'); $redis->connect(); diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php index 0e5ac73e9bcee..5a592cd67a2fe 100644 --- a/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/RedisArrayStoreTest.php @@ -33,10 +33,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \RedisArray - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \RedisArray { $redis = new \RedisArray([getenv('REDIS_HOST')]); diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php index 387a9033ada50..7e9ef4727a85e 100644 --- a/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/RedisClusterStoreTest.php @@ -31,10 +31,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \RedisCluster - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \RedisCluster { return new \RedisCluster(null, explode(' ', getenv('REDIS_CLUSTER_HOSTS'))); } diff --git a/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php index 9f45bae9270e0..c43c8412818d2 100644 --- a/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/RedisStoreTest.php @@ -34,10 +34,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \Redis - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \Redis { $redis = new \Redis(); $redis->connect(getenv('REDIS_HOST')); diff --git a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php index 7a443921f20d6..c3048d14aacdd 100644 --- a/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php @@ -25,10 +25,7 @@ class ZookeeperStoreTest extends AbstractStoreTest { use UnserializableTestTrait; - /** - * @return ZookeeperStore - */ - public function getStore(): PersistingStoreInterface + public function getStore(): ZookeeperStore { $zookeeper_server = getenv('ZOOKEEPER_HOST').':2181'; diff --git a/src/Symfony/Component/Messenger/Envelope.php b/src/Symfony/Component/Messenger/Envelope.php index bd6cf00dbac26..b2b33fa238409 100644 --- a/src/Symfony/Component/Messenger/Envelope.php +++ b/src/Symfony/Component/Messenger/Envelope.php @@ -49,9 +49,9 @@ public static function wrap(object $message, array $stamps = []): self } /** - * @return static A new Envelope instance with additional stamp + * Adds one or more stamps. */ - public function with(StampInterface ...$stamps): self + public function with(StampInterface ...$stamps): static { $cloned = clone $this; @@ -63,9 +63,9 @@ public function with(StampInterface ...$stamps): self } /** - * @return static A new Envelope instance without any stamps of the given class + * Removes all stamps of the given class. */ - public function withoutAll(string $stampFqcn): self + public function withoutAll(string $stampFqcn): static { $cloned = clone $this; @@ -107,9 +107,6 @@ public function all(string $stampFqcn = null): array return $this->stamps; } - /** - * @return object The original message contained in the envelope - */ public function getMessage(): object { return $this->message; diff --git a/src/Symfony/Component/Mime/Crypto/DkimOptions.php b/src/Symfony/Component/Mime/Crypto/DkimOptions.php index 4c51d661585c7..0b47bfdecf22c 100644 --- a/src/Symfony/Component/Mime/Crypto/DkimOptions.php +++ b/src/Symfony/Component/Mime/Crypto/DkimOptions.php @@ -25,70 +25,49 @@ public function toArray(): array return $this->options; } - /** - * @return $this - */ - public function algorithm(int $algo): self + public function algorithm(int $algo): static { $this->options['algorithm'] = $algo; return $this; } - /** - * @return $this - */ - public function signatureExpirationDelay(int $show): self + public function signatureExpirationDelay(int $show): static { $this->options['signature_expiration_delay'] = $show; return $this; } - /** - * @return $this - */ - public function bodyMaxLength(int $max): self + public function bodyMaxLength(int $max): static { $this->options['body_max_length'] = $max; return $this; } - /** - * @return $this - */ - public function bodyShowLength(bool $show): self + public function bodyShowLength(bool $show): static { $this->options['body_show_length'] = $show; return $this; } - /** - * @return $this - */ - public function headerCanon(string $canon): self + public function headerCanon(string $canon): static { $this->options['header_canon'] = $canon; return $this; } - /** - * @return $this - */ - public function bodyCanon(string $canon): self + public function bodyCanon(string $canon): static { $this->options['body_canon'] = $canon; return $this; } - /** - * @return $this - */ - public function headersToIgnore(array $headers): self + public function headersToIgnore(array $headers): static { $this->options['headers_to_ignore'] = $headers; diff --git a/src/Symfony/Component/Mime/Email.php b/src/Symfony/Component/Mime/Email.php index 8e728c8dfa36b..496d163968193 100644 --- a/src/Symfony/Component/Mime/Email.php +++ b/src/Symfony/Component/Mime/Email.php @@ -491,10 +491,7 @@ private function createDataPart(array $attachment): DataPart return $part; } - /** - * @return $this - */ - private function setHeaderBody(string $type, string $name, $body): object + private function setHeaderBody(string $type, string $name, $body): static { $this->getHeaders()->setHeaderBody($type, $name, $body); diff --git a/src/Symfony/Component/Mime/Header/Headers.php b/src/Symfony/Component/Mime/Header/Headers.php index cb1f8f7f4472f..22f0795ab35d5 100644 --- a/src/Symfony/Component/Mime/Header/Headers.php +++ b/src/Symfony/Component/Mime/Header/Headers.php @@ -76,66 +76,43 @@ public function getMaxLineLength(): int /** * @param array $addresses - * - * @return $this */ - public function addMailboxListHeader(string $name, array $addresses): self + public function addMailboxListHeader(string $name, array $addresses): static { return $this->add(new MailboxListHeader($name, Address::createArray($addresses))); } - /** - * @return $this - */ - public function addMailboxHeader(string $name, Address|string $address): self + public function addMailboxHeader(string $name, Address|string $address): static { return $this->add(new MailboxHeader($name, Address::create($address))); } - /** - * @return $this - */ - public function addIdHeader(string $name, string|array $ids): self + public function addIdHeader(string $name, string|array $ids): static { return $this->add(new IdentificationHeader($name, $ids)); } - /** - * @return $this - */ - public function addPathHeader(string $name, Address|string $path): self + public function addPathHeader(string $name, Address|string $path): static { return $this->add(new PathHeader($name, $path instanceof Address ? $path : new Address($path))); } - /** - * @return $this - */ - public function addDateHeader(string $name, \DateTimeInterface $dateTime): self + public function addDateHeader(string $name, \DateTimeInterface $dateTime): static { return $this->add(new DateHeader($name, $dateTime)); } - /** - * @return $this - */ - public function addTextHeader(string $name, string $value): self + public function addTextHeader(string $name, string $value): static { return $this->add(new UnstructuredHeader($name, $value)); } - /** - * @return $this - */ - public function addParameterizedHeader(string $name, string $value, array $params = []): self + public function addParameterizedHeader(string $name, string $value, array $params = []): static { return $this->add(new ParameterizedHeader($name, $value, $params)); } - /** - * @return $this - */ - public function addHeader(string $name, mixed $argument, array $more = []): self + public function addHeader(string $name, mixed $argument, array $more = []): static { $parts = explode('\\', self::HEADER_CLASS_MAP[strtolower($name)] ?? UnstructuredHeader::class); $method = 'add'.ucfirst(array_pop($parts)); @@ -153,10 +130,7 @@ public function has(string $name): bool return isset($this->headers[strtolower($name)]); } - /** - * @return $this - */ - public function add(HeaderInterface $header): self + public function add(HeaderInterface $header): static { self::checkHeaderClass($header); diff --git a/src/Symfony/Component/Notifier/Bridge/AllMySms/AllMySmsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/AllMySms/AllMySmsTransportFactory.php index a9d06ff8a91b1..bead250d1a06d 100644 --- a/src/Symfony/Component/Notifier/Bridge/AllMySms/AllMySmsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/AllMySmsTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Quentin Dequippe */ final class AllMySmsTransportFactory extends AbstractTransportFactory { - /** - * @return AllMySmsTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): AllMySmsTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportFactoryTest.php index a523d3ae24c68..12a46c5baf725 100644 --- a/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class AllMySmsTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return AllMySmsTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): AllMySmsTransportFactory { return new AllMySmsTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportTest.php b/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportTest.php index 2cafefca79f68..68887083564f9 100644 --- a/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class AllMySmsTransportTest extends TransportTestCase { - /** - * @return AllMySmsTransport - */ - public function createTransport(HttpClientInterface $client = null, string $from = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $from = null): AllMySmsTransport { return new AllMySmsTransport('login', 'apiKey', $from, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php b/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php index 5fa757dafef1f..2af81dd468a7f 100644 --- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php @@ -41,10 +41,8 @@ public function getRecipientId(): ?string /** * @param string $topic The Topic ARN for SNS message - * - * @return $this */ - public function recipient(string $topic): self + public function recipient(string $topic): static { $this->recipient = $topic; diff --git a/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php index e2249b3e5a812..af0d15b03ac16 100644 --- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsTransportFactory.php @@ -15,14 +15,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Adrien Chinour */ final class AmazonSnsTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): AmazonSnsTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportFactoryTest.php index 0fe0e72061c2d..708154626707a 100644 --- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportFactoryTest.php @@ -13,11 +13,10 @@ use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; class AmazonSnsTransportFactoryTest extends TransportFactoryTestCase { - public function createFactory(): TransportFactoryInterface + public function createFactory(): AmazonSnsTransportFactory { return new AmazonSnsTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportTest.php b/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportTest.php index 346a7eb5de299..a9430cc61ef95 100644 --- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportTest.php @@ -20,12 +20,11 @@ use Symfony\Component\Notifier\Message\MessageOptionsInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; class AmazonSnsTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): AmazonSnsTransport { return (new AmazonSnsTransport(new SnsClient(['region' => 'eu-west-3']), $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Clickatell/ClickatellTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Clickatell/ClickatellTransportFactory.php index f280233c4c625..8abae18f40235 100644 --- a/src/Symfony/Component/Notifier/Bridge/Clickatell/ClickatellTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Clickatell/ClickatellTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Kevin Auvinet */ final class ClickatellTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): ClickatellTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Clickatell/Tests/ClickatellTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Clickatell/Tests/ClickatellTransportFactoryTest.php index 2fed5a7b647b5..9897e48bda2b9 100644 --- a/src/Symfony/Component/Notifier/Bridge/Clickatell/Tests/ClickatellTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Clickatell/Tests/ClickatellTransportFactoryTest.php @@ -4,14 +4,10 @@ use Symfony\Component\Notifier\Bridge\Clickatell\ClickatellTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; class ClickatellTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return ClickatellTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): ClickatellTransportFactory { return new ClickatellTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransportFactory.php index 9cdefdd4b3c8f..13cb0f5c21fc7 100644 --- a/src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Mathieu Piot */ final class DiscordTransportFactory extends AbstractTransportFactory { - /** - * @return DiscordTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): DiscordTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportFactoryTest.php index 24dc1049c276e..8bf15db40839b 100644 --- a/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class DiscordTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return DiscordTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): DiscordTransportFactory { return new DiscordTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportTest.php index 97e76d00cd288..461c351fe4a08 100644 --- a/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportTest.php @@ -19,16 +19,12 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class DiscordTransportTest extends TransportTestCase { - /** - * @return DiscordTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): DiscordTransport { return (new DiscordTransport('testToken', 'testWebhookId', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Esendex/EsendexTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Esendex/EsendexTransportFactory.php index 57d3a6237e9f9..281564411ed59 100644 --- a/src/Symfony/Component/Notifier/Bridge/Esendex/EsendexTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Esendex/EsendexTransportFactory.php @@ -14,14 +14,10 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; final class EsendexTransportFactory extends AbstractTransportFactory { - /** - * @return EsendexTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): EsendexTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportFactoryTest.php index 5a7645b7cdda3..0fa330eaf2066 100644 --- a/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Esendex\EsendexTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class EsendexTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return EsendexTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): EsendexTransportFactory { return new EsendexTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportTest.php index c07dde43489a1..9fb0bed847c50 100644 --- a/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Esendex/Tests/EsendexTransportTest.php @@ -18,16 +18,12 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class EsendexTransportTest extends TransportTestCase { - /** - * @return EsendexTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): EsendexTransport { return (new EsendexTransport('email', 'password', 'testAccountReference', 'testFrom', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/FakeChat/FakeChatTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/FakeChat/FakeChatTransportFactory.php index 9b55acb99a00f..9c299d8b49741 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeChat/FakeChatTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/FakeChatTransportFactory.php @@ -16,7 +16,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Oskar Stark @@ -35,10 +34,7 @@ public function __construct(MailerInterface $mailer, LoggerInterface $logger) $this->logger = $logger; } - /** - * @return FakeChatEmailTransport|FakeChatLoggerTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): FakeChatEmailTransport|FakeChatLoggerTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatEmailTransportTest.php b/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatEmailTransportTest.php index 46e4289c65c47..b102927fb8db2 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatEmailTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatEmailTransportTest.php @@ -20,12 +20,11 @@ use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Fixtures\TestOptions; use Symfony\Component\Notifier\Tests\Mailer\DummyMailer; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class FakeChatEmailTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null, string $transportName = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $transportName = null): FakeChatEmailTransport { $transport = (new FakeChatEmailTransport($this->createMock(MailerInterface::class), 'recipient@email.net', 'sender@email.net', $client ?? $this->createMock(HttpClientInterface::class))); diff --git a/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatLoggerTransportTest.php b/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatLoggerTransportTest.php index ee93ec333421d..97c4d6575cb92 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatLoggerTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatLoggerTransportTest.php @@ -18,12 +18,11 @@ use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Fixtures\TestOptions; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class FakeChatLoggerTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null, LoggerInterface $logger = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, LoggerInterface $logger = null): FakeChatLoggerTransport { return new FakeChatLoggerTransport($logger ?? $this->createMock(LoggerInterface::class), $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatTransportFactoryTest.php index a83d035cae707..e6821ba92c769 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeChat/Tests/FakeChatTransportFactoryTest.php @@ -15,14 +15,10 @@ use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Notifier\Bridge\FakeChat\FakeChatTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class FakeChatTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return FakeChatTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): FakeChatTransportFactory { return new FakeChatTransportFactory($this->createMock(MailerInterface::class), $this->createMock(LoggerInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/FakeSms/FakeSmsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/FakeSms/FakeSmsTransportFactory.php index 55f2162d641d5..3951d9a17c0a9 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeSms/FakeSmsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/FakeSmsTransportFactory.php @@ -16,7 +16,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author James Hemery @@ -36,10 +35,7 @@ public function __construct(MailerInterface $mailer, LoggerInterface $logger) $this->logger = $logger; } - /** - * @return FakeSmsEmailTransport|FakeSmsLoggerTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): FakeSmsEmailTransport|FakeSmsLoggerTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsEmailTransportTest.php b/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsEmailTransportTest.php index 2d4c8d9a73d6b..3b0e86e3ef613 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsEmailTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsEmailTransportTest.php @@ -19,12 +19,11 @@ use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Mailer\DummyMailer; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class FakeSmsEmailTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null, string $transportName = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $transportName = null): FakeSmsEmailTransport { $transport = (new FakeSmsEmailTransport($this->createMock(MailerInterface::class), 'recipient@email.net', 'sender@email.net', $client ?? $this->createMock(HttpClientInterface::class))); diff --git a/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsLoggerTransportTest.php b/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsLoggerTransportTest.php index 443f9cb4ee047..dba06f959a860 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsLoggerTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsLoggerTransportTest.php @@ -17,12 +17,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class FakeSmsLoggerTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null, LoggerInterface $logger = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, LoggerInterface $logger = null): FakeSmsLoggerTransport { $transport = (new FakeSmsLoggerTransport($logger ?? $this->createMock(LoggerInterface::class), $client ?? $this->createMock(HttpClientInterface::class))); diff --git a/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsTransportFactoryTest.php index 603da742f2f5c..0d18d51c5303d 100644 --- a/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FakeSms/Tests/FakeSmsTransportFactoryTest.php @@ -15,14 +15,10 @@ use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Notifier\Bridge\FakeSms\FakeSmsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class FakeSmsTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return FakeSmsTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): FakeSmsTransportFactory { return new FakeSmsTransportFactory($this->createMock(MailerInterface::class), $this->createMock(LoggerInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransportFactory.php index 962978b1d24e7..808d7470ce6d5 100644 --- a/src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Jeroen Spee */ final class FirebaseTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): FirebaseTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportFactoryTest.php index 77e69348dc0b2..e2ccc77955c86 100644 --- a/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportFactoryTest.php @@ -13,17 +13,13 @@ use Symfony\Component\Notifier\Bridge\Firebase\FirebaseTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Oskar Stark */ final class FirebaseTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return FirebaseTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): FirebaseTransportFactory { return new FirebaseTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php index 7a28b4f32f5df..3ee1182ed7aea 100644 --- a/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php @@ -16,7 +16,6 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** @@ -24,10 +23,7 @@ */ final class FirebaseTransportTest extends TransportTestCase { - /** - * @return FirebaseTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): FirebaseTransport { return new FirebaseTransport('username:password', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/FreeMobile/FreeMobileTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/FreeMobile/FreeMobileTransportFactory.php index eda2c888df5cb..91e21b3923890 100644 --- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/FreeMobileTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/FreeMobileTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Antoine Makdessi */ final class FreeMobileTransportFactory extends AbstractTransportFactory { - /** - * @return FreeMobileTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): FreeMobileTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportFactoryTest.php index bb9698cd98e51..c122abd10ba20 100644 --- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class FreeMobileTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return FreeMobileTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): FreeMobileTransportFactory { return new FreeMobileTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportTest.php b/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportTest.php index 2035102daa1fd..41610f3590b33 100644 --- a/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/FreeMobile/Tests/FreeMobileTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class FreeMobileTransportTest extends TransportTestCase { - /** - * @return FreeMobileTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): FreeMobileTransport { return new FreeMobileTransport('login', 'pass', '0611223344', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/GatewayApi/GatewayApiTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/GatewayApi/GatewayApiTransportFactory.php index 282baea5fb0b7..948004975e394 100644 --- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/GatewayApiTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/GatewayApiTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Piergiuseppe Longo */ final class GatewayApiTransportFactory extends AbstractTransportFactory { - /** - * @return GatewayApiTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): GatewayApiTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportFactoryTest.php index 26b817befc7df..b54a62f8fed96 100644 --- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportFactoryTest.php @@ -4,7 +4,6 @@ use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Piergiuseppe Longo @@ -12,10 +11,7 @@ */ final class GatewayApiTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return GatewayApiTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): GatewayApiTransportFactory { return new GatewayApiTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportTest.php b/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportTest.php index 7a0166b2baf10..adaf1af0c8dc0 100644 --- a/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/GatewayApi/Tests/GatewayApiTransportTest.php @@ -9,7 +9,6 @@ use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; @@ -19,10 +18,7 @@ */ final class GatewayApiTransportTest extends TransportTestCase { - /** - * @return GatewayApiTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): GatewayApiTransport { return new GatewayApiTransport('authtoken', 'Symfony', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Gitter/GitterTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Gitter/GitterTransportFactory.php index c86f29d6b9594..ad82e8ebed523 100644 --- a/src/Symfony/Component/Notifier/Bridge/Gitter/GitterTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Gitter/GitterTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Christin Gruber */ final class GitterTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): GitterTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportFactoryTest.php index 345d9aa38e7e5..48559c39bd8ea 100644 --- a/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportFactoryTest.php @@ -13,14 +13,13 @@ use Symfony\Component\Notifier\Bridge\Gitter\GitterTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Christin Gruber */ final class GitterTransportFactoryTest extends TransportFactoryTestCase { - public function createFactory(): TransportFactoryInterface + public function createFactory(): GitterTransportFactory { return new GitterTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportTest.php index c8ae860d86cc7..142bdc0ef5b01 100644 --- a/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Gitter/Tests/GitterTransportTest.php @@ -16,7 +16,6 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** @@ -24,7 +23,7 @@ */ final class GitterTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): GitterTransport { return (new GitterTransport('token', '5539a3ee5etest0d3255bfef', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('api.gitter.im'); } diff --git a/src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransportFactory.php index 3a35195d09cc4..581e21609440a 100644 --- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransportFactory.php @@ -15,7 +15,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Jérôme Tamarelle @@ -24,10 +23,8 @@ final class GoogleChatTransportFactory extends AbstractTransportFactory { /** * @param Dsn $dsn Format: googlechat://:@default/?thread_key= - * - * @return GoogleChatTransport */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): GoogleChatTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportFactoryTest.php index b3c8981100b91..dd90da83c66c1 100644 --- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class GoogleChatTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return GoogleChatTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): GoogleChatTransportFactory { return new GoogleChatTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportTest.php b/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportTest.php index ce033f31ff712..6335c8a5bd5e8 100644 --- a/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/GoogleChat/Tests/GoogleChatTransportTest.php @@ -22,16 +22,12 @@ use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class GoogleChatTransportTest extends TransportTestCase { - /** - * @return GoogleChatTransport - */ - public function createTransport(HttpClientInterface $client = null, string $threadKey = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $threadKey = null): GoogleChatTransport { return new GoogleChatTransport('My-Space', 'theAccessKey', 'theAccessToken=', $threadKey, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransportFactory.php index b4ed0f9fe4c55..0700538b0d4ef 100644 --- a/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/InfobipTransportFactory.php @@ -14,7 +14,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier @@ -22,10 +21,7 @@ */ final class InfobipTransportFactory extends AbstractTransportFactory { - /** - * @return InfobipTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): InfobipTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportFactoryTest.php index 06a6ff586ed3d..4e6f7c2412989 100644 --- a/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class InfobipTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return InfobipTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): InfobipTransportFactory { return new InfobipTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportTest.php index 80bd35fdf4ce4..df0dee3e4236e 100644 --- a/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Infobip/Tests/InfobipTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class InfobipTransportTest extends TransportTestCase { - /** - * @return InfobipTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): InfobipTransport { return (new InfobipTransport('authtoken', '0611223344', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Iqsms/IqsmsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Iqsms/IqsmsTransportFactory.php index 480416e07b875..9fe957c0cf7be 100644 --- a/src/Symfony/Component/Notifier/Bridge/Iqsms/IqsmsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/IqsmsTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Oleksandr Barabolia */ final class IqsmsTransportFactory extends AbstractTransportFactory { - /** - * @return IqsmsTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): IqsmsTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportFactoryTest.php index a71e3bf5a7cc8..75933d3e6a885 100644 --- a/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class IqsmsTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return IqsmsTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): IqsmsTransportFactory { return new IqsmsTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportTest.php index 83d957176a19d..8cdb549e749c2 100644 --- a/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Iqsms/Tests/IqsmsTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class IqsmsTransportTest extends TransportTestCase { - /** - * @return IqsmsTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): IqsmsTransport { return new IqsmsTransport('login', 'password', 'sender', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransportFactory.php index 9a7d172ca8aab..767e4374eaa98 100644 --- a/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Vasilij Duško */ final class LightSmsTransportFactory extends AbstractTransportFactory { - /** - * @return LightSmsTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): LightSmsTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php index 01b206882f549..b453a11a32b26 100644 --- a/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\LightSms\LightSmsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class LightSmsTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return LightSmsTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): LightSmsTransportFactory { return new LightSmsTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportTest.php b/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportTest.php index ea7508bc018eb..cb27b05ad19c1 100644 --- a/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class LightSmsTransportTest extends TransportTestCase { - /** - * @return LightSmsTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): LightSmsTransport { return new LightSmsTransport('accountSid', 'authToken', 'from', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/LinkedIn/LinkedInTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/LinkedIn/LinkedInTransportFactory.php index f052e28e29075..43bbf02c28cf6 100644 --- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/LinkedInTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/LinkedInTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Smaïne Milianni */ final class LinkedInTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): LinkedInTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportFactoryTest.php index 40858754c9b68..47b37b368fff2 100644 --- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportFactoryTest.php @@ -4,14 +4,10 @@ use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class LinkedInTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return LinkedInTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): LinkedInTransportFactory { return new LinkedInTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportTest.php b/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportTest.php index 38f0d5c502a7b..549f3b2032559 100644 --- a/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/LinkedIn/Tests/LinkedInTransportTest.php @@ -12,16 +12,12 @@ use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class LinkedInTransportTest extends TransportTestCase { - /** - * @return LinkedInTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): LinkedInTransport { return (new LinkedInTransport('AuthToken', 'AccountId', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mailjet/MailjetTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Mailjet/MailjetTransportFactory.php index d5d2d9933d0d1..0a0c02cdb63e1 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mailjet/MailjetTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/MailjetTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Jérôme Nadaud */ final class MailjetTransportFactory extends AbstractTransportFactory { - /** - * @return MailjetTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MailjetTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportFactoryTest.php index b24a15a67e52d..ff788fa2465dc 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Mailjet\MailjetTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class MailjetTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return MailjetTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): MailjetTransportFactory { return new MailjetTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportTest.php index b6e3bb750294e..129c44c7eff5b 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mailjet/Tests/MailjetTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class MailjetTransportTest extends TransportTestCase { - /** - * @return MailjetTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): MailjetTransport { return (new MailjetTransport('authtoken', 'Mailjet', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransportFactory.php index aa68de27dbebd..4298c3fc3aabb 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Emanuele Panzeri */ final class MattermostTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MattermostTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportFactoryTest.php index 5f75994ce133a..a02f3e547f373 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportFactoryTest.php @@ -13,17 +13,13 @@ use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Oskar Stark */ final class MattermostTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return MattermostTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): MattermostTransportFactory { return new MattermostTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportTest.php index 48e77f1fcf2f6..4c4bb7cd7f26e 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportTest.php @@ -16,7 +16,6 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** @@ -24,10 +23,7 @@ */ final class MattermostTransportTest extends TransportTestCase { - /** - * @return MattermostTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): MattermostTransport { return (new MattermostTransport('testAccessToken', 'testChannel', null, $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransportFactory.php index 5bdabcc58b708..5403fee1cc818 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransportFactory.php @@ -17,7 +17,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Mathias Arlaud @@ -33,10 +32,7 @@ public function __construct(HubRegistry $registry) $this->registry = $registry; } - /** - * @return MercureTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MercureTransport { if ('mercure' !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, 'mercure', $this->getSupportedSchemes()); diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportFactoryTest.php index 37825f49438dc..c016022c3144a 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportFactoryTest.php @@ -17,14 +17,13 @@ use Symfony\Component\Notifier\Exception\IncompleteDsnException; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Mathias Arlaud */ final class MercureTransportFactoryTest extends TransportFactoryTestCase { - public function createFactory(): TransportFactoryInterface + public function createFactory(): MercureTransportFactory { $hub = $this->createMock(HubInterface::class); $hubRegistry = new HubRegistry($hub, ['hubId' => $hub]); diff --git a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php index bdc36383df649..21c59e38e76ad 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php @@ -26,7 +26,6 @@ use Symfony\Component\Notifier\Message\MessageOptionsInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use TypeError; @@ -35,7 +34,7 @@ */ final class MercureTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null, HubInterface $hub = null, string $hubId = 'hubId', $topics = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, HubInterface $hub = null, string $hubId = 'hubId', $topics = null): MercureTransport { $hub = $hub ?? $this->createMock(HubInterface::class); diff --git a/src/Symfony/Component/Notifier/Bridge/MessageBird/MessageBirdTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/MessageBird/MessageBirdTransportFactory.php index 07202682ca9cf..5f62bf8b9d1a3 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageBird/MessageBirdTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/MessageBirdTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Vasilij Duško */ final class MessageBirdTransportFactory extends AbstractTransportFactory { - /** - * @return MessageBirdTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MessageBirdTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportFactoryTest.php index 55d26b2a91797..776af5bb46db2 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class MessageBirdTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return MessageBirdTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): MessageBirdTransportFactory { return new MessageBirdTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportTest.php b/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportTest.php index 3154fc98a391a..3a623cd2db39b 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MessageBird/Tests/MessageBirdTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class MessageBirdTransportTest extends TransportTestCase { - /** - * @return MessageBirdTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): MessageBirdTransport { return new MessageBirdTransport('token', 'from', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/MessageMedia/MessageMediaTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/MessageMedia/MessageMediaTransportFactory.php index 4f55f64e8ba5e..63f147af3bb97 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/MessageMediaTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/MessageMediaTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Adrian Nguyen */ final class MessageMediaTransportFactory extends AbstractTransportFactory { - /** - * @return MessageMediaTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MessageMediaTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportFactoryTest.php index 2dbb5ce4b03b1..26c38a865b85b 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class MessageMediaTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return MessageMediaTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): MessageMediaTransportFactory { return new MessageMediaTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php b/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php index 147078e64aa5c..ee1c84060c41e 100644 --- a/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MessageMedia/Tests/MessageMediaTransportTest.php @@ -19,16 +19,12 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class MessageMediaTransportTest extends TransportTestCase { - /** - * @return MessageMediaTransport - */ - public function createTransport(HttpClientInterface $client = null, string $from = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $from = null): MessageMediaTransport { return new MessageMediaTransport('apiKey', 'apiSecret', $from, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsTransportFactory.php index 1e4b411e5a23e..dbec3473fabc8 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsTransportFactory.php @@ -15,7 +15,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Edouard Lescot @@ -23,7 +22,7 @@ */ final class MicrosoftTeamsTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MicrosoftTeamsTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/DateInputTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/DateInputTest.php index 6cb843177cf99..b7cfdcb6376e8 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/DateInputTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/DateInputTest.php @@ -8,10 +8,7 @@ final class DateInputTest extends AbstractInputTestCase { - /** - * @return DateInput - */ - public function createInput(): AbstractInput + public function createInput(): DateInput { return new DateInput(); } diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php index 6cdded3eaa58b..f2a929ae94be7 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/MultiChoiceInputTest.php @@ -9,10 +9,7 @@ final class MultiChoiceInputTest extends AbstractInputTestCase { - /** - * @return MultiChoiceInput - */ - public function createInput(): AbstractInput + public function createInput(): MultiChoiceInput { return new MultiChoiceInput(); } diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/TextInputTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/TextInputTest.php index fa958ec298cd3..046a14dee0bf3 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/TextInputTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/Action/Input/TextInputTest.php @@ -8,10 +8,7 @@ final class TextInputTest extends AbstractInputTestCase { - /** - * @return TextInput - */ - public function createInput(): AbstractInput + public function createInput(): TextInput { return new TextInput(); } diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportFactoryTest.php index cbf6c48e407ab..373f4a0d7a1b6 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportFactoryTest.php @@ -13,11 +13,10 @@ use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class MicrosoftTeamsTransportFactoryTest extends TransportFactoryTestCase { - public function createFactory(): TransportFactoryInterface + public function createFactory(): MicrosoftTeamsTransportFactory { return new MicrosoftTeamsTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportTest.php index d1229803dd864..0c4fa43748cdd 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsTransportTest.php @@ -21,16 +21,12 @@ use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class MicrosoftTeamsTransportTest extends TransportTestCase { - /** - * @return MicrosoftTeamsTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): MicrosoftTeamsTransport { return (new MicrosoftTeamsTransport('/testPath', $client ?: $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytTransportFactory.php index 9f352f8f44873..c5e1daa4164cf 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/MobytTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Bastien Durand */ final class MobytTransportFactory extends AbstractTransportFactory { - /** - * @return MobytTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): MobytTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportFactoryTest.php index 9b47e9c55f99f..8cc5a321f28fa 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportFactoryTest.php @@ -13,17 +13,13 @@ use Symfony\Component\Notifier\Bridge\Mobyt\MobytTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Oskar Stark */ final class MobytTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return MobytTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): MobytTransportFactory { return new MobytTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportTest.php index ea1aac62491a1..f6e8c53e1bc50 100644 --- a/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportTest.php @@ -17,7 +17,6 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** @@ -25,10 +24,7 @@ */ final class MobytTransportTest extends TransportTestCase { - /** - * @return MobytTransport - */ - public function createTransport(HttpClientInterface $client = null, string $messageType = MobytOptions::MESSAGE_TYPE_QUALITY_LOW): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $messageType = MobytOptions::MESSAGE_TYPE_QUALITY_LOW): MobytTransport { return (new MobytTransport('accountSid', 'authToken', 'from', $messageType, $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransportFactory.php index 6c7287b398658..871b8bc707855 100644 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/NexmoTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier */ final class NexmoTransportFactory extends AbstractTransportFactory { - /** - * @return NexmoTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): NexmoTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportFactoryTest.php index a44545b069e5b..b6d801c2f347c 100644 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Nexmo\NexmoTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class NexmoTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return NexmoTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): NexmoTransportFactory { return new NexmoTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportTest.php index 8473b3a8888a1..e066e89a06e15 100644 --- a/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Nexmo/Tests/NexmoTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class NexmoTransportTest extends TransportTestCase { - /** - * @return NexmoTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): NexmoTransport { return new NexmoTransport('apiKey', 'apiSecret', 'sender', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Octopush/OctopushTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Octopush/OctopushTransportFactory.php index 0d93ef6909c2a..8f8fbf10f882a 100644 --- a/src/Symfony/Component/Notifier/Bridge/Octopush/OctopushTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Octopush/OctopushTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Aurélien Martin */ final class OctopushTransportFactory extends AbstractTransportFactory { - /** - * @return OctopushTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): OctopushTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportFactoryTest.php index 714f76bc94828..c30937a8a1588 100644 --- a/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Octopush\OctopushTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class OctopushTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return OctopushTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): OctopushTransportFactory { return new OctopushTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportTest.php index d528a8582a459..c320deff70ae9 100644 --- a/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Octopush/Tests/OctopushTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class OctopushTransportTest extends TransportTestCase { - /** - * @return OctopushTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): OctopushTransport { return new OctopushTransport('userLogin', 'apiKey', 'from', 'type', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php index 2fb69da7d7982..a2caa5dc789fa 100644 --- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/OvhCloudTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Thomas Ferney */ final class OvhCloudTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): OvhCloudTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportFactoryTest.php index abf6f40343fdc..d50fd07ac7f47 100644 --- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\OvhCloud\OvhCloudTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class OvhCloudTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return OvhCloudTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): OvhCloudTransportFactory { return new OvhCloudTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php index 9bfac2249cc9e..806dad21b932c 100644 --- a/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/OvhCloud/Tests/OvhCloudTransportTest.php @@ -18,15 +18,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class OvhCloudTransportTest extends TransportTestCase { - /** - * @return OvhCloudTransport - */ - public function createTransport(HttpClientInterface $client = null, string $sender = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $sender = null): OvhCloudTransport { return (new OvhCloudTransport('applicationKey', 'applicationSecret', 'consumerKey', 'serviceName', $client ?? $this->createMock(HttpClientInterface::class)))->setSender($sender); } diff --git a/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php b/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php index d7f5d63bfb979..9e8d45d27e32c 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php @@ -46,10 +46,7 @@ public function getRecipientId(): ?string return $this->channel; } - /** - * @return $this - */ - public function channel(string $channel): self + public function channel(string $channel): static { $this->channel = $channel; diff --git a/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatTransportFactory.php index abba7062baa06..d107b09c534b1 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Jeroen Spee */ final class RocketChatTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): RocketChatTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportFactoryTest.php index d9fb2bcb27e19..c3bf19ce1b50b 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportFactoryTest.php @@ -13,17 +13,13 @@ use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; /** * @author Oskar Stark */ final class RocketChatTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return RocketChatTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): RocketChatTransportFactory { return new RocketChatTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportTest.php b/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportTest.php index fc45fe4f9215c..3d3c12840386c 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/Tests/RocketChatTransportTest.php @@ -16,7 +16,6 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** @@ -24,10 +23,7 @@ */ final class RocketChatTransportTest extends TransportTestCase { - /** - * @return RocketChatTransport - */ - public function createTransport(HttpClientInterface $client = null, string $channel = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $channel = null): RocketChatTransport { return new RocketChatTransport('testAccessToken', $channel, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransportFactory.php index bd38a43762bdb..3d9eddf337bc9 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Pierre Tondereau */ final class SendinblueTransportFactory extends AbstractTransportFactory { - /** - * @return SendinblueTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SendinblueTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php index c9b2cb5c0bbb3..6713701413015 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Sendinblue\SendinblueTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SendinblueTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SendinblueTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SendinblueTransportFactory { return new SendinblueTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php index adde5b17d4157..6c89cbc85e08f 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Sendinblue/Tests/SendinblueTransportTest.php @@ -18,16 +18,12 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class SendinblueTransportTest extends TransportTestCase { - /** - * @return SendinblueTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): SendinblueTransport { return (new SendinblueTransport('api-key', '0611223344', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Sinch/SinchTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Sinch/SinchTransportFactory.php index 30ac8a929942a..1b8d24da6fd06 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sinch/SinchTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/SinchTransportFactory.php @@ -14,14 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Iliya Miroslavov Iliev */ final class SinchTransportFactory extends AbstractTransportFactory { - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SinchTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportFactoryTest.php index 5139f236dd67e..b9284f3281d70 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Sinch\SinchTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SinchTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SinchTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SinchTransportFactory { return new SinchTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportTest.php index c9464848f203b..41bd0b1a12315 100644 --- a/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SinchTransportTest extends TransportTestCase { - /** - * @return SinchTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): SinchTransport { return new SinchTransport('accountSid', 'authToken', 'sender', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php index 25c4c06338bea..dae2259aa8445 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php @@ -21,10 +21,7 @@ public function __construct() $this->options['type'] = 'actions'; } - /** - * @return $this - */ - public function button(string $text, string $url, string $style = null): self + public function button(string $text, string $url, string $style = null): static { if (25 === \count($this->options['elements'] ?? [])) { throw new \LogicException('Maximum number of buttons should not exceed 25.'); diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php index b14bb271064df..b29d03de00bbd 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php @@ -21,10 +21,7 @@ public function __construct() $this->options['type'] = 'section'; } - /** - * @return $this - */ - public function text(string $text, bool $markdown = true): self + public function text(string $text, bool $markdown = true): static { $this->options['text'] = [ 'type' => $markdown ? 'mrkdwn' : 'plain_text', @@ -34,10 +31,7 @@ public function text(string $text, bool $markdown = true): self return $this; } - /** - * @return $this - */ - public function field(string $text, bool $markdown = true): self + public function field(string $text, bool $markdown = true): static { if (10 === \count($this->options['fields'] ?? [])) { throw new \LogicException('Maximum number of fields should not exceed 10.'); @@ -51,10 +45,7 @@ public function field(string $text, bool $markdown = true): self return $this; } - /** - * @return $this - */ - public function accessory(SlackBlockElementInterface $element): self + public function accessory(SlackBlockElementInterface $element): static { $this->options['accessory'] = $element->toArray(); diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php b/src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php index 4f70344071df5..b495db588c538 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php @@ -67,30 +67,22 @@ public function getRecipientId(): ?string /** * @param string $id The hook id (anything after https://hooks.slack.com/services/) - * - * @return $this */ - public function recipient(string $id): self + public function recipient(string $id): static { $this->options['recipient_id'] = $id; return $this; } - /** - * @return $this - */ - public function asUser(bool $bool): self + public function asUser(bool $bool): static { $this->options['as_user'] = $bool; return $this; } - /** - * @return $this - */ - public function block(SlackBlockInterface $block): self + public function block(SlackBlockInterface $block): static { if (\count($this->options['blocks'] ?? []) >= self::MAX_BLOCKS) { throw new LogicException(sprintf('Maximum number of "blocks" has been reached (%d).', self::MAX_BLOCKS)); @@ -101,90 +93,63 @@ public function block(SlackBlockInterface $block): self return $this; } - /** - * @return $this - */ - public function iconEmoji(string $emoji): self + public function iconEmoji(string $emoji): static { $this->options['icon_emoji'] = $emoji; return $this; } - /** - * @return $this - */ - public function iconUrl(string $url): self + public function iconUrl(string $url): static { $this->options['icon_url'] = $url; return $this; } - /** - * @return $this - */ - public function linkNames(bool $bool): self + public function linkNames(bool $bool): static { $this->options['link_names'] = $bool; return $this; } - /** - * @return $this - */ - public function mrkdwn(bool $bool): self + public function mrkdwn(bool $bool): static { $this->options['mrkdwn'] = $bool; return $this; } - /** - * @return $this - */ - public function parse(string $parse): self + public function parse(string $parse): static { $this->options['parse'] = $parse; return $this; } - /** - * @return $this - */ - public function unfurlLinks(bool $bool): self + public function unfurlLinks(bool $bool): static { $this->options['unfurl_links'] = $bool; return $this; } - /** - * @return $this - */ - public function unfurlMedia(bool $bool): self + public function unfurlMedia(bool $bool): static { $this->options['unfurl_media'] = $bool; return $this; } - /** - * @return $this - */ - public function username(string $username): self + public function username(string $username): static { $this->options['username'] = $username; return $this; } - /** - * @return $this - */ - public function threadTs(string $threadTs): self + public function threadTs(string $threadTs): static { $this->options['thread_ts'] = $threadTs; diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransportFactory.php index d714a0c500840..40e0140f11c90 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/SlackTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier */ final class SlackTransportFactory extends AbstractTransportFactory { - /** - * @return SlackTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SlackTransport { if ('slack' !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, 'slack', $this->getSupportedSchemes()); diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportFactoryTest.php index d9a6461ae4a3c..634232a2917d2 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SlackTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SlackTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SlackTransportFactory { return new SlackTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php index 2b3e96e6b4414..38a6931127797 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportTest.php @@ -23,16 +23,12 @@ use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class SlackTransportTest extends TransportTestCase { - /** - * @return SlackTransport - */ - public function createTransport(HttpClientInterface $client = null, string $channel = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $channel = null): SlackTransport { return new SlackTransport('xoxb-TestToken', $channel, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php index e83fae3cf43a1..41b671ba8e780 100644 --- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/SmsBiurasTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Vasilij Duško */ final class SmsBiurasTransportFactory extends AbstractTransportFactory { - /** - * @return SmsBiurasTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SmsBiurasTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportFactoryTest.php index abb1dd3eb0042..b4e4dbb3b1add 100644 --- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\SmsBiuras\SmsBiurasTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SmsBiurasTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SmsBiurasTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SmsBiurasTransportFactory { return new SmsBiurasTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php index 494e66c3bca23..28e96cc491877 100644 --- a/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/SmsBiuras/Tests/SmsBiurasTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SmsBiurasTransportTest extends TransportTestCase { - /** - * @return SmsBiurasTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): SmsBiurasTransport { return new SmsBiurasTransport('uid', 'api_key', 'from', true, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php index 0234850b0cd6d..7df99f409a3c0 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Marcin Szepczynski */ final class SmsapiTransportFactory extends AbstractTransportFactory { - /** - * @return SmsapiTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SmsapiTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportFactoryTest.php index 71bdde97a3d9f..0c1ac21197efa 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Smsapi\SmsapiTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SmsapiTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SmsapiTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SmsapiTransportFactory { return new SmsapiTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php index 615d55de6b33b..0f2f6efc41261 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/Tests/SmsapiTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SmsapiTransportTest extends TransportTestCase { - /** - * @return SmsapiTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): SmsapiTransport { return (new SmsapiTransport('testToken', 'testFrom', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('test.host'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Smsc/SmscTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Smsc/SmscTransportFactory.php index 55961b3334849..d9fae481b87b3 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsc/SmscTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsc/SmscTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Valentin Nazarov */ final class SmscTransportFactory extends AbstractTransportFactory { - /** - * @return SmscTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SmscTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportFactoryTest.php index d3bf70319ae61..386d15b5d9edc 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Smsc\SmscTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SmscTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SmscTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SmscTransportFactory { return new SmscTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportTest.php index 5a849a646e3b1..0b297bd775861 100644 --- a/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Smsc/Tests/SmscTransportTest.php @@ -16,12 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SmscTransportTest extends TransportTestCase { - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): SmscTransport { return new SmscTransport('login', 'password', 'MyApp', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransportFactory.php index 912b4e2e0f1ec..699e5c3eb63e5 100644 --- a/src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/SpotHitTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author James Hemery */ final class SpotHitTransportFactory extends AbstractTransportFactory { - /** - * @return SpotHitTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): SpotHitTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php index 57da2c142a5e4..0d63f91974000 100644 --- a/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\SpotHit\SpotHitTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class SpotHitTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return SpotHitTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): SpotHitTransportFactory { return new SpotHitTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php b/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php index d3129b65efe54..15ddafc3577c6 100644 --- a/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/SpotHit/Tests/SpotHitTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SpotHitTransportTest extends TransportTestCase { - /** - * @return SpotHitTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): SpotHitTransport { return (new SpotHitTransport('api_token', 'MyCompany', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('host.test'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Reply/Markup/ReplyKeyboardMarkup.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Reply/Markup/ReplyKeyboardMarkup.php index a5b8ef600d69c..c9af3d1b5a098 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/Reply/Markup/ReplyKeyboardMarkup.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Reply/Markup/ReplyKeyboardMarkup.php @@ -27,10 +27,8 @@ public function __construct() /** * @param array|KeyboardButton[] $buttons - * - * @return $this */ - public function keyboard(array $buttons): self + public function keyboard(array $buttons): static { $buttons = array_map(static function (KeyboardButton $button) { return $button->toArray(); diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php index 490fe1d26e9b7..8f5dec7772020 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/TelegramTransportFactory.php @@ -15,17 +15,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier */ final class TelegramTransportFactory extends AbstractTransportFactory { - /** - * @return TelegramTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): TelegramTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php index 37a0577444c57..0c1ff0d9fd17a 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class TelegramTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return TelegramTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): TelegramTransportFactory { return new TelegramTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php index 2b0cbbdf17c45..875083902af25 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php @@ -19,16 +19,12 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class TelegramTransportTest extends TransportTestCase { - /** - * @return TelegramTransport - */ - public function createTransport(HttpClientInterface $client = null, string $channel = null): TransportInterface + public function createTransport(HttpClientInterface $client = null, string $channel = null): TelegramTransport { return new TelegramTransport('token', $channel, $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Telnyx/TelnyxTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Telnyx/TelnyxTransportFactory.php index 557ba85285d6d..3e67492a34700 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telnyx/TelnyxTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/TelnyxTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Vasilij Duško */ final class TelnyxTransportFactory extends AbstractTransportFactory { - /** - * @return TelnyxTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): TelnyxTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportFactoryTest.php index 3d7cd943723a9..d8763e3b54fb5 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Telnyx\TelnyxTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class TelnyxTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return TelnyxTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): TelnyxTransportFactory { return new TelnyxTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportTest.php index 4ecb9b58c49ae..97ca4e743aded 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Telnyx/Tests/TelnyxTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class TelnyxTransportTest extends TransportTestCase { - /** - * @return TelnyxTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): TelnyxTransport { return new TelnyxTransport('api_key', 'from', 'messaging_profile_id', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportFactoryTest.php index 682a6ae5548b1..b945da398d344 100644 --- a/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\TurboSms\TurboSmsTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class TurboSmsTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return TurboSmsTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): TurboSmsTransportFactory { return new TurboSmsTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportTest.php b/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportTest.php index ae559bb012cf7..140e4cad63225 100644 --- a/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/Tests/TurboSmsTransportTest.php @@ -20,16 +20,12 @@ use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class TurboSmsTransportTest extends TransportTestCase { - /** - * @return TurboSmsTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): TurboSmsTransport { return new TurboSmsTransport('authToken', 'sender', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/TurboSms/TurboSmsTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/TurboSms/TurboSmsTransportFactory.php index 2cb187459be69..caa221428695b 100644 --- a/src/Symfony/Component/Notifier/Bridge/TurboSms/TurboSmsTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/TurboSms/TurboSmsTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Artem Henvald */ final class TurboSmsTransportFactory extends AbstractTransportFactory { - /** - * @return TurboSmsTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): TurboSmsTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportFactoryTest.php index a9f46e6103bef..734bab3124a13 100644 --- a/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Twilio\TwilioTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class TwilioTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return TwilioTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): TwilioTransportFactory { return new TwilioTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php index 3fb78003525cd..e125ffbb0b8b3 100644 --- a/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/Tests/TwilioTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class TwilioTransportTest extends TransportTestCase { - /** - * @return TwilioTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): TwilioTransport { return new TwilioTransport('accountSid', 'authToken', 'from', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Twilio/TwilioTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Twilio/TwilioTransportFactory.php index 2009d63dc4ea5..6df8ff6fbad07 100644 --- a/src/Symfony/Component/Notifier/Bridge/Twilio/TwilioTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Twilio/TwilioTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier */ final class TwilioTransportFactory extends AbstractTransportFactory { - /** - * @return TwilioTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): TwilioTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportFactoryTest.php index dfa5a23b735b7..4f5107cc6210d 100644 --- a/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class YunpianTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return YunpianTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): YunpianTransportFactory { return new YunpianTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportTest.php index 3adf11006bf3f..ce4ef2552d041 100644 --- a/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/Tests/YunpianTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class YunpianTransportTest extends TransportTestCase { - /** - * @return YunpianTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): YunpianTransport { return new YunpianTransport('api_key', $client ?? $this->createMock(HttpClientInterface::class)); } diff --git a/src/Symfony/Component/Notifier/Bridge/Yunpian/YunpianTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Yunpian/YunpianTransportFactory.php index 440c9da101e4d..07e782a756774 100644 --- a/src/Symfony/Component/Notifier/Bridge/Yunpian/YunpianTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Yunpian/YunpianTransportFactory.php @@ -14,7 +14,6 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Mathieu Santostefano @@ -24,7 +23,7 @@ class YunpianTransportFactory extends AbstractTransportFactory /** * @return YunpianTransport */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): YunpianTransport { if ('yunpian' !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, 'yunpian', $this->getSupportedSchemes()); diff --git a/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportFactoryTest.php index 77c1b3f5f709d..3eb8ea807af90 100644 --- a/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportFactoryTest.php @@ -13,14 +13,10 @@ use Symfony\Component\Notifier\Bridge\Zulip\ZulipTransportFactory; use Symfony\Component\Notifier\Test\TransportFactoryTestCase; -use Symfony\Component\Notifier\Transport\TransportFactoryInterface; final class ZulipTransportFactoryTest extends TransportFactoryTestCase { - /** - * @return ZulipTransportFactory - */ - public function createFactory(): TransportFactoryInterface + public function createFactory(): ZulipTransportFactory { return new ZulipTransportFactory(); } diff --git a/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportTest.php index 1da6bc6ee33fa..71f8238464f2d 100644 --- a/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/Tests/ZulipTransportTest.php @@ -16,15 +16,11 @@ use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; -use Symfony\Component\Notifier\Transport\TransportInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class ZulipTransportTest extends TransportTestCase { - /** - * @return ZulipTransport - */ - public function createTransport(HttpClientInterface $client = null): TransportInterface + public function createTransport(HttpClientInterface $client = null): ZulipTransport { return (new ZulipTransport('testEmail', 'testToken', 'testChannel', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('test.host'); } diff --git a/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransportFactory.php b/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransportFactory.php index 8d54924c06f62..46b15158f034d 100644 --- a/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransportFactory.php +++ b/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransportFactory.php @@ -14,17 +14,13 @@ use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; -use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Mohammad Emran Hasan */ final class ZulipTransportFactory extends AbstractTransportFactory { - /** - * @return ZulipTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): ZulipTransport { $scheme = $dsn->getScheme(); diff --git a/src/Symfony/Component/Notifier/Message/ChatMessage.php b/src/Symfony/Component/Notifier/Message/ChatMessage.php index d7c028a7c90a3..2cbdd1f6f9dcf 100644 --- a/src/Symfony/Component/Notifier/Message/ChatMessage.php +++ b/src/Symfony/Component/Notifier/Message/ChatMessage.php @@ -37,10 +37,7 @@ public static function fromNotification(Notification $notification): self return $message; } - /** - * @return $this - */ - public function subject(string $subject): self + public function subject(string $subject): static { $this->subject = $subject; @@ -57,10 +54,7 @@ public function getRecipientId(): ?string return $this->options ? $this->options->getRecipientId() : null; } - /** - * @return $this - */ - public function options(MessageOptionsInterface $options): self + public function options(MessageOptionsInterface $options): static { $this->options = $options; @@ -72,10 +66,7 @@ public function getOptions(): ?MessageOptionsInterface return $this->options; } - /** - * @return $this - */ - public function transport(?string $transport): self + public function transport(?string $transport): static { $this->transport = $transport; diff --git a/src/Symfony/Component/Notifier/Message/EmailMessage.php b/src/Symfony/Component/Notifier/Message/EmailMessage.php index 13524885f91e9..d68c35f26e58b 100644 --- a/src/Symfony/Component/Notifier/Message/EmailMessage.php +++ b/src/Symfony/Component/Notifier/Message/EmailMessage.php @@ -72,10 +72,7 @@ public function getEnvelope(): ?Envelope return $this->envelope; } - /** - * @return $this - */ - public function envelope(Envelope $envelope): self + public function envelope(Envelope $envelope): static { $this->envelope = $envelope; @@ -97,10 +94,7 @@ public function getOptions(): ?MessageOptionsInterface return null; } - /** - * @return $this - */ - public function transport(?string $transport): self + public function transport(?string $transport): static { if (!$this->message instanceof Email) { throw new LogicException('Cannot set a Transport on a RawMessage instance.'); diff --git a/src/Symfony/Component/Notifier/Message/SmsMessage.php b/src/Symfony/Component/Notifier/Message/SmsMessage.php index 872dab26e34d3..5e6b21ed74f2c 100644 --- a/src/Symfony/Component/Notifier/Message/SmsMessage.php +++ b/src/Symfony/Component/Notifier/Message/SmsMessage.php @@ -39,10 +39,7 @@ public static function fromNotification(Notification $notification, SmsRecipient return new self($recipient->getPhone(), $notification->getSubject()); } - /** - * @return $this - */ - public function phone(string $phone): self + public function phone(string $phone): static { if ('' === $phone) { throw new InvalidArgumentException(sprintf('"%s" needs a phone number, it cannot be empty.', static::class)); @@ -63,10 +60,7 @@ public function getRecipientId(): string return $this->phone; } - /** - * @return $this - */ - public function subject(string $subject): self + public function subject(string $subject): static { $this->subject = $subject; @@ -78,10 +72,7 @@ public function getSubject(): string return $this->subject; } - /** - * @return $this - */ - public function transport(?string $transport): self + public function transport(?string $transport): static { $this->transport = $transport; diff --git a/src/Symfony/Component/Notifier/Transport/NullTransportFactory.php b/src/Symfony/Component/Notifier/Transport/NullTransportFactory.php index 1ee6ed6ed832c..bcbcdee70c79f 100644 --- a/src/Symfony/Component/Notifier/Transport/NullTransportFactory.php +++ b/src/Symfony/Component/Notifier/Transport/NullTransportFactory.php @@ -18,10 +18,7 @@ */ final class NullTransportFactory extends AbstractTransportFactory { - /** - * @return NullTransport - */ - public function create(Dsn $dsn): TransportInterface + public function create(Dsn $dsn): NullTransport { if ('null' === $dsn->getScheme()) { return new NullTransport($this->dispatcher); diff --git a/src/Symfony/Component/OptionsResolver/OptionConfigurator.php b/src/Symfony/Component/OptionsResolver/OptionConfigurator.php index 335537462eb30..e75baf5cec040 100644 --- a/src/Symfony/Component/OptionsResolver/OptionConfigurator.php +++ b/src/Symfony/Component/OptionsResolver/OptionConfigurator.php @@ -28,11 +28,9 @@ public function __construct(string $name, OptionsResolver $resolver) /** * Adds allowed types for this option. * - * @return $this - * * @throws AccessException If called from a lazy option or normalizer */ - public function allowedTypes(string ...$types): self + public function allowedTypes(string ...$types): static { $this->resolver->setAllowedTypes($this->name, $types); @@ -44,11 +42,9 @@ public function allowedTypes(string ...$types): self * * @param mixed ...$values One or more acceptable values/closures * - * @return $this - * * @throws AccessException If called from a lazy option or normalizer */ - public function allowedValues(mixed ...$values): self + public function allowedValues(mixed ...$values): static { $this->resolver->setAllowedValues($this->name, $values); @@ -58,11 +54,9 @@ public function allowedValues(mixed ...$values): self /** * Sets the default value for this option. * - * @return $this - * * @throws AccessException If called from a lazy option or normalizer */ - public function default(mixed $value): self + public function default(mixed $value): static { $this->resolver->setDefault($this->name, $value); @@ -83,10 +77,8 @@ public function define(string $option): self * @param string $package The name of the composer package that is triggering the deprecation * @param string $version The version of the package that introduced the deprecation * @param string|\Closure $message The deprecation message to use - * - * @return $this */ - public function deprecated(string $package, string $version, string|\Closure $message = 'The option "%name%" is deprecated.'): self + public function deprecated(string $package, string $version, string|\Closure $message = 'The option "%name%" is deprecated.'): static { $this->resolver->setDeprecated($this->name, $package, $version, $message); @@ -96,11 +88,9 @@ public function deprecated(string $package, string $version, string|\Closure $me /** * Sets the normalizer for this option. * - * @return $this - * * @throws AccessException If called from a lazy option or normalizer */ - public function normalize(\Closure $normalizer): self + public function normalize(\Closure $normalizer): static { $this->resolver->setNormalizer($this->name, $normalizer); @@ -110,11 +100,9 @@ public function normalize(\Closure $normalizer): self /** * Marks this option as required. * - * @return $this - * * @throws AccessException If called from a lazy option or normalizer */ - public function required(): self + public function required(): static { $this->resolver->setRequired($this->name); @@ -124,11 +112,9 @@ public function required(): self /** * Sets an info message for an option. * - * @return $this - * * @throws AccessException If called from a lazy option or normalizer */ - public function info(string $info): self + public function info(string $info): static { $this->resolver->setInfo($this->name, $info); diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index a2fdb71dbdaab..e7ed10eda3114 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -258,13 +258,11 @@ public function run(callable $callback = null, array $env = []): int * This is identical to run() except that an exception is thrown if the process * exits with a non-zero exit code. * - * @return $this - * * @throws ProcessFailedException if the process didn't terminate successfully * * @final */ - public function mustRun(callable $callback = null, array $env = []): self + public function mustRun(callable $callback = null, array $env = []): static { if (0 !== $this->run($callback, $env)) { throw new ProcessFailedException($this); @@ -374,8 +372,6 @@ public function start(callable $callback = null, array $env = []) * @param callable|null $callback A PHP callback to run whenever there is some * output available on STDOUT or STDERR * - * @return static - * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process is already running * @@ -383,7 +379,7 @@ public function start(callable $callback = null, array $env = []) * * @final */ - public function restart(callable $callback = null, array $env = []): self + public function restart(callable $callback = null, array $env = []): static { if ($this->isRunning()) { throw new RuntimeException('Process is already running.'); diff --git a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php index adaff593e5435..713e4337a0426 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php @@ -75,10 +75,8 @@ final public function collection(string $name = ''): self * Sets the prefix to add to the path of all child routes. * * @param string|array $prefix the prefix, or the localized prefixes - * - * @return $this */ - final public function prefix(string|array $prefix): self + final public function prefix(string|array $prefix): static { if (\is_array($prefix)) { if (null === $this->parentPrefixes) { @@ -108,10 +106,8 @@ final public function prefix(string|array $prefix): self * Sets the host to use for all child routes. * * @param string|array $host the host, or the localized hosts - * - * @return $this */ - final public function host(string|array $host): self + final public function host(string|array $host): static { $this->host = $host; diff --git a/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php index ab205d64f0d79..664a0d4fadf7f 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php @@ -52,10 +52,8 @@ public function __destruct() * Sets the prefix to add to the path of all child routes. * * @param string|array $prefix the prefix, or the localized prefixes - * - * @return $this */ - final public function prefix(string|array $prefix, bool $trailingSlashOnRoot = true): self + final public function prefix(string|array $prefix, bool $trailingSlashOnRoot = true): static { $this->addPrefix($this->route, $prefix, $trailingSlashOnRoot); @@ -64,10 +62,8 @@ final public function prefix(string|array $prefix, bool $trailingSlashOnRoot = t /** * Sets the prefix to add to the name of all child routes. - * - * @return $this */ - final public function namePrefix(string $namePrefix): self + final public function namePrefix(string $namePrefix): static { $this->route->addNamePrefix($namePrefix); @@ -78,10 +74,8 @@ final public function namePrefix(string $namePrefix): self * Sets the host to use for all child routes. * * @param string|array $host the host, or the localized hosts - * - * @return $this */ - final public function host(string|array $host): self + final public function host(string|array $host): static { $this->addHost($this->route, $host); diff --git a/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php index 05bf955ea93c0..cc8ecd2f18ed8 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php @@ -37,10 +37,8 @@ public function __construct(RouteCollection $collection, RouteCollection $route, * Sets the host to use for all child routes. * * @param string|array $host the host, or the localized hosts - * - * @return $this */ - final public function host(string|array $host): self + final public function host(string|array $host): static { $this->addHost($this->route, $host); diff --git a/src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php index 101b6e9cce3bc..df49b981dc85f 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php @@ -68,10 +68,7 @@ final public function env(): ?string return $this->env; } - /** - * @return static - */ - final public function withPath(string $path): self + final public function withPath(string $path): static { $clone = clone $this; $clone->path = $clone->file = $path; diff --git a/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php b/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php index 19e61c18a4297..0bf4a09e6c42b 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php @@ -23,10 +23,8 @@ trait RouteTrait /** * Adds defaults. - * - * @return $this */ - final public function defaults(array $defaults): self + final public function defaults(array $defaults): static { $this->route->addDefaults($defaults); @@ -35,10 +33,8 @@ final public function defaults(array $defaults): self /** * Adds requirements. - * - * @return $this */ - final public function requirements(array $requirements): self + final public function requirements(array $requirements): static { $this->route->addRequirements($requirements); @@ -47,10 +43,8 @@ final public function requirements(array $requirements): self /** * Adds options. - * - * @return $this */ - final public function options(array $options): self + final public function options(array $options): static { $this->route->addOptions($options); @@ -59,10 +53,8 @@ final public function options(array $options): self /** * Whether paths should accept utf8 encoding. - * - * @return $this */ - final public function utf8(bool $utf8 = true): self + final public function utf8(bool $utf8 = true): static { $this->route->addOptions(['utf8' => $utf8]); @@ -71,10 +63,8 @@ final public function utf8(bool $utf8 = true): self /** * Sets the condition. - * - * @return $this */ - final public function condition(string $condition): self + final public function condition(string $condition): static { $this->route->setCondition($condition); @@ -83,10 +73,8 @@ final public function condition(string $condition): self /** * Sets the pattern for the host. - * - * @return $this */ - final public function host(string $pattern): self + final public function host(string $pattern): static { $this->route->setHost($pattern); @@ -98,10 +86,8 @@ final public function host(string $pattern): self * So an empty array means that any scheme is allowed. * * @param string[] $schemes - * - * @return $this */ - final public function schemes(array $schemes): self + final public function schemes(array $schemes): static { $this->route->setSchemes($schemes); @@ -113,10 +99,8 @@ final public function schemes(array $schemes): self * So an empty array means that any method is allowed. * * @param string[] $methods - * - * @return $this */ - final public function methods(array $methods): self + final public function methods(array $methods): static { $this->route->setMethods($methods); @@ -127,10 +111,8 @@ final public function methods(array $methods): self * Adds the "_controller" entry to defaults. * * @param callable|string|array $controller a callable or parseable pseudo-callable - * - * @return $this */ - final public function controller(callable|string|array $controller): self + final public function controller(callable|string|array $controller): static { $this->route->addDefaults(['_controller' => $controller]); @@ -139,10 +121,8 @@ final public function controller(callable|string|array $controller): self /** * Adds the "_locale" entry to defaults. - * - * @return $this */ - final public function locale(string $locale): self + final public function locale(string $locale): static { $this->route->addDefaults(['_locale' => $locale]); @@ -151,10 +131,8 @@ final public function locale(string $locale): self /** * Adds the "_format" entry to defaults. - * - * @return $this */ - final public function format(string $format): self + final public function format(string $format): static { $this->route->addDefaults(['_format' => $format]); @@ -163,10 +141,8 @@ final public function format(string $format): self /** * Adds the "_stateless" entry to defaults. - * - * @return $this */ - final public function stateless(bool $stateless = true): self + final public function stateless(bool $stateless = true): static { $this->route->addDefaults(['_stateless' => $stateless]); diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php index a31cf5555c660..b3d347b8d9f2b 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php @@ -266,7 +266,7 @@ public function getUserIdentifier(): string return $this->name; } - public function getPassword() + public function getPassword(): ?string { return '***'; } @@ -284,7 +284,7 @@ public function eraseCredentials() { } - public function getSalt() + public function getSalt(): ?string { return null; } diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php index 6357fa95bb698..636850fb0f3e5 100644 --- a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php @@ -142,5 +142,5 @@ abstract class TestPasswordAuthenticatedUser implements UserInterface, PasswordA { abstract public function getPassword(): ?string; - abstract public function getSalt(); + abstract public function getSalt(): ?string; } diff --git a/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php b/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php index ef9f9015c3091..3824e033b6fe4 100644 --- a/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php @@ -257,12 +257,12 @@ public function getRoles(): array return []; } - public function getPassword() + public function getPassword(): ?string { return $this->passwordProperty; } - public function getSalt() + public function getSalt(): ?string { return ''; } diff --git a/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php index 11bb931684528..a71f17555a824 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/AbstractRedisStoreTest.php @@ -19,12 +19,7 @@ */ abstract class AbstractRedisStoreTest extends AbstractStoreTest { - /** - * Return a RedisConnection. - * - * @return \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface - */ - abstract protected function getRedisConnection(): object; + abstract protected function getRedisConnection(): \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Semaphore/Tests/Store/PredisStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/PredisStoreTest.php index bf1d2c0641ca2..08a9808370b12 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/PredisStoreTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/PredisStoreTest.php @@ -28,10 +28,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \Predis\Client - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \Predis\Client { $redis = new \Predis\Client('tcp://'.getenv('REDIS_HOST').':6379'); $redis->connect(); diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php index 9de3d2af79989..996875c8b1727 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/RedisArrayStoreTest.php @@ -32,10 +32,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \RedisArray - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \RedisArray { return new \RedisArray([getenv('REDIS_HOST')]); } diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php index be463d52d0b5e..cd0eb91f8388c 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/RedisClusterStoreTest.php @@ -30,10 +30,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \RedisCluster - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \RedisCluster { return new \RedisCluster(null, explode(' ', getenv('REDIS_CLUSTER_HOSTS'))); } diff --git a/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php b/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php index 52725a6ac19fd..51e0d1471ac8b 100644 --- a/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php +++ b/src/Symfony/Component/Semaphore/Tests/Store/RedisStoreTest.php @@ -34,10 +34,7 @@ public static function setUpBeforeClass(): void } } - /** - * @return \Redis - */ - protected function getRedisConnection(): object + protected function getRedisConnection(): \Redis { $redis = new \Redis(); $redis->connect(getenv('REDIS_HOST')); diff --git a/src/Symfony/Component/String/AbstractUnicodeString.php b/src/Symfony/Component/String/AbstractUnicodeString.php index 73334df3d3bdc..ecb53481b4e35 100644 --- a/src/Symfony/Component/String/AbstractUnicodeString.php +++ b/src/Symfony/Component/String/AbstractUnicodeString.php @@ -459,10 +459,7 @@ public function width(bool $ignoreAnsiDecoration = true): int return $width; } - /** - * @return static - */ - private function pad(int $len, self $pad, int $type): parent + private function pad(int $len, self $pad, int $type): static { $sLen = $this->length(); diff --git a/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProviderFactory.php b/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProviderFactory.php index 0520634575994..efbad2c6e30fd 100644 --- a/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProviderFactory.php +++ b/src/Symfony/Component/Translation/Bridge/Crowdin/CrowdinProviderFactory.php @@ -54,10 +54,7 @@ public function __construct(HttpClientInterface $client, LoggerInterface $logger $this->xliffFileDumper = $xliffFileDumper; } - /** - * @return CrowdinProvider - */ - public function create(Dsn $dsn): ProviderInterface + public function create(Dsn $dsn): CrowdinProvider { if ('crowdin' !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, 'crowdin', $this->getSupportedSchemes()); diff --git a/src/Symfony/Component/Translation/Bridge/Loco/LocoProviderFactory.php b/src/Symfony/Component/Translation/Bridge/Loco/LocoProviderFactory.php index 880b54bceba47..6c3ecd71e8d82 100644 --- a/src/Symfony/Component/Translation/Bridge/Loco/LocoProviderFactory.php +++ b/src/Symfony/Component/Translation/Bridge/Loco/LocoProviderFactory.php @@ -41,10 +41,7 @@ public function __construct(HttpClientInterface $client, LoggerInterface $logger $this->loader = $loader; } - /** - * @return LocoProvider - */ - public function create(Dsn $dsn): ProviderInterface + public function create(Dsn $dsn): LocoProvider { if ('loco' !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, 'loco', $this->getSupportedSchemes()); diff --git a/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php b/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php index b0bff500bb526..33e9cde8f41f7 100644 --- a/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php +++ b/src/Symfony/Component/Translation/Bridge/Lokalise/LokaliseProviderFactory.php @@ -41,10 +41,7 @@ public function __construct(HttpClientInterface $client, LoggerInterface $logger $this->loader = $loader; } - /** - * @return LokaliseProvider - */ - public function create(Dsn $dsn): ProviderInterface + public function create(Dsn $dsn): LokaliseProvider { if ('lokalise' !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, 'lokalise', $this->getSupportedSchemes());