diff --git a/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php b/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php index a6a90bf1ed5eb..b567667883ef3 100644 --- a/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php +++ b/src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php @@ -57,6 +57,9 @@ public function attach(string $file, string $name = null, string $contentType = } } + /** + * @return $this + */ public function setSubject(string $subject): static { $this->message->subject($subject); @@ -69,6 +72,9 @@ public function getSubject(): ?string return $this->message->getSubject(); } + /** + * @return $this + */ public function setReturnPath(string $address): static { $this->message->returnPath($address); @@ -81,6 +87,9 @@ public function getReturnPath(): string return $this->message->getReturnPath(); } + /** + * @return $this + */ public function addFrom(string $address, string $name = ''): static { $this->message->addFrom(new Address($address, $name)); @@ -96,6 +105,9 @@ public function getFrom(): array return $this->message->getFrom(); } + /** + * @return $this + */ public function addReplyTo(string $address): static { $this->message->addReplyTo($address); @@ -111,6 +123,9 @@ public function getReplyTo(): array return $this->message->getReplyTo(); } + /** + * @return $this + */ public function addTo(string $address, string $name = ''): static { $this->message->addTo(new Address($address, $name)); @@ -126,6 +141,9 @@ public function getTo(): array return $this->message->getTo(); } + /** + * @return $this + */ public function addCc(string $address, string $name = ''): static { $this->message->addCc(new Address($address, $name)); @@ -141,6 +159,9 @@ public function getCc(): array return $this->message->getCc(); } + /** + * @return $this + */ public function addBcc(string $address, string $name = ''): static { $this->message->addBcc(new Address($address, $name)); @@ -156,6 +177,9 @@ public function getBcc(): array return $this->message->getBcc(); } + /** + * @return $this + */ public function setPriority(int $priority): static { $this->message->priority($priority); diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php index 3d5eab3290e81..fd90b9faa4a7c 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/DefaultsConfigurator.php @@ -38,6 +38,8 @@ 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 = []): static diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php index 8e7cf4bc45778..6460bbc7b0f3e 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ParametersConfigurator.php @@ -27,6 +27,9 @@ public function __construct(ContainerBuilder $container) $this->container = $container; } + /** + * @return $this + */ final public function set(string $name, mixed $value): static { $this->container->setParameter($name, static::processValue($value, true)); @@ -34,6 +37,9 @@ final public function set(string $name, mixed $value): static return $this; } + /** + * @return $this + */ 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 fdb78cf9b5845..d01ef934bd3ae 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/PrototypeConfigurator.php @@ -75,6 +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): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php index 434b5490e0385..9447f7e57845f 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php @@ -29,6 +29,9 @@ public function __construct(string $id) $this->id = $id; } + /** + * @return $this + */ final public function ignoreOnInvalid(): static { $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE; @@ -36,6 +39,9 @@ final public function ignoreOnInvalid(): static return $this; } + /** + * @return $this + */ final public function nullOnInvalid(): static { $this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; @@ -43,6 +49,9 @@ final public function nullOnInvalid(): static return $this; } + /** + * @return $this + */ 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 1dc945bbf1f61..b42b0708c9900 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AbstractTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AbstractTrait.php @@ -16,6 +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): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php index cd05da3f1d5ac..67051f31fae8d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ArgumentTrait.php @@ -15,6 +15,8 @@ trait ArgumentTrait { /** * Sets the arguments to pass to the service constructor/factory method. + * + * @return $this */ final public function args(array $arguments): static { @@ -25,6 +27,8 @@ final public function args(array $arguments): static /** * Sets one argument to pass to the service constructor/factory method. + * + * @return $this */ final public function arg(string|int $key, mixed $value): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php index bca470359507d..f5762c55bedb0 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutoconfigureTrait.php @@ -18,6 +18,8 @@ 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): static diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php index 33d8f1d3a81b7..9bce28f9a9483 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/AutowireTrait.php @@ -15,6 +15,8 @@ trait AutowireTrait { /** * Enables/disables autowiring. + * + * @return $this */ final public function autowire(bool $autowired = true): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php index 6b79dc740a410..b7fb0de443972 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.php @@ -28,6 +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): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php index 984d9d6857431..dbfb158e9ff99 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/CallTrait.php @@ -22,6 +22,8 @@ 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): static diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php index dc9879304833f..429cebcb6b82f 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ClassTrait.php @@ -15,6 +15,8 @@ trait ClassTrait { /** * Sets the service class. + * + * @return $this */ final public function class(?string $class): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php index 18b560bf424b9..a4b447c08550d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ConfiguratorTrait.php @@ -17,6 +17,8 @@ trait ConfiguratorTrait { /** * Sets a configurator to call after the service is fully initialized. + * + * @return $this */ final public function configurator(string|array|ReferenceConfigurator $configurator): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php index 5dfbd1e32f3c8..ae6d3c9487382 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DecorateTrait.php @@ -21,6 +21,8 @@ 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): static diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php index 075091ff77b58..04ff9a0472962 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/DeprecateTrait.php @@ -22,6 +22,8 @@ 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): static diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php index 1126d9828a2b0..1ca650c424902 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FactoryTrait.php @@ -18,6 +18,8 @@ trait FactoryTrait { /** * Sets a factory. + * + * @return $this */ final public function factory(string|array|ReferenceConfigurator $factory): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php index 31d5604772a4e..7b72181ee4457 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/FileTrait.php @@ -15,6 +15,8 @@ trait FileTrait { /** * Sets a file to require before creating the service. + * + * @return $this */ final public function file(string $file): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php index 2846c945a4ea9..ac4326b8501a9 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/LazyTrait.php @@ -17,6 +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): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php index 2356143076c80..4096025815dbc 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ParentTrait.php @@ -19,6 +19,8 @@ trait ParentTrait /** * Sets the Definition to inherit from. * + * @return $this + * * @throws InvalidArgumentException when parent cannot be set */ final public function parent(string $parent): static diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php index 719d72bf10770..0dab40fb6d4da 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PropertyTrait.php @@ -15,6 +15,8 @@ trait PropertyTrait { /** * Sets a specific property. + * + * @return $this */ final public function property(string $name, mixed $value): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php index d9ffc50363e37..3d88d7432af1e 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/PublicTrait.php @@ -13,6 +13,9 @@ trait PublicTrait { + /** + * @return $this + */ final public function public(): static { $this->definition->setPublic(true); @@ -20,6 +23,9 @@ final public function public(): static return $this; } + /** + * @return $this + */ 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 6893e232c2b11..801fabcce0f7b 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ShareTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/ShareTrait.php @@ -15,6 +15,8 @@ trait ShareTrait { /** * Sets if the service must be shared or not. + * + * @return $this */ final public function share(bool $shared = true): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php index ad0254a571d26..5e8c4b3c6d211 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/SyntheticTrait.php @@ -16,6 +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): static { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php index 7293ff72ed2e0..2797c1ccfce8d 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/TagTrait.php @@ -17,6 +17,8 @@ trait TagTrait { /** * Adds a tag for this definition. + * + * @return $this */ final public function tag(string $name, array $attributes = []): static { diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php index 38ab76ac8b0b9..ca92dbcc8e9ea 100644 --- a/src/Symfony/Component/Dotenv/Dotenv.php +++ b/src/Symfony/Component/Dotenv/Dotenv.php @@ -46,6 +46,9 @@ public function __construct(string $envKey = 'APP_ENV', string $debugKey = 'APP_ $this->debugKey = $debugKey; } + /** + * @return $this + */ public function setProdEnvs(array $prodEnvs): static { $this->prodEnvs = $prodEnvs; @@ -56,6 +59,8 @@ public function setProdEnvs(array $prodEnvs): static /** * @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): static { diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 45b75afd3bc80..999736885161c 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -410,6 +410,8 @@ public function getContent(): string|false /** * Sets the HTTP protocol version (1.0 or 1.1). * + * @return $this + * * @final */ public function setProtocolVersion(string $version): static @@ -435,6 +437,8 @@ 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 @@ -476,6 +480,8 @@ public function getStatusCode(): int /** * Sets the response charset. * + * @return $this + * * @final */ public function setCharset(string $charset): static @@ -555,6 +561,8 @@ public function isValidateable(): bool * * It makes the response ineligible for serving other clients. * + * @return $this + * * @final */ public function setPrivate(): static @@ -570,6 +578,8 @@ public function setPrivate(): static * * It makes the response eligible for serving other clients. * + * @return $this + * * @final */ public function setPublic(): static @@ -583,6 +593,8 @@ public function setPublic(): static /** * Marks the response as "immutable". * + * @return $this + * * @final */ public function setImmutable(bool $immutable = true): static @@ -636,6 +648,8 @@ public function getDate(): ?\DateTimeInterface /** * Sets the Date header. * + * @return $this + * * @final */ public function setDate(\DateTimeInterface $date): static @@ -699,6 +713,8 @@ public function getExpires(): ?\DateTimeInterface * * Passing null as value will remove the header. * + * @return $this + * * @final */ public function setExpires(\DateTimeInterface $date = null): static @@ -750,6 +766,8 @@ public function getMaxAge(): ?int * * This methods sets the Cache-Control max-age directive. * + * @return $this + * * @final */ public function setMaxAge(int $value): static @@ -764,6 +782,8 @@ public function setMaxAge(int $value): static * * This methods sets the Cache-Control s-maxage directive. * + * @return $this + * * @final */ public function setSharedMaxAge(int $value): static @@ -796,6 +816,8 @@ public function getTtl(): ?int * * This method adjusts the Cache-Control/s-maxage directive. * + * @return $this + * * @final */ public function setTtl(int $seconds): static @@ -810,6 +832,8 @@ public function setTtl(int $seconds): static * * This method adjusts the Cache-Control/max-age directive. * + * @return $this + * * @final */ public function setClientTtl(int $seconds): static @@ -836,6 +860,8 @@ public function getLastModified(): ?\DateTimeInterface * * Passing null as value will remove the header. * + * @return $this + * * @final */ public function setLastModified(\DateTimeInterface $date = null): static @@ -872,6 +898,8 @@ 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): static @@ -894,6 +922,8 @@ public function setEtag(string $etag = null, bool $weak = false): static * * 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 @@ -955,6 +985,8 @@ public function setCache(array $options): static * 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 @@ -1006,6 +1038,8 @@ 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): static diff --git a/src/Symfony/Component/Mime/Crypto/DkimOptions.php b/src/Symfony/Component/Mime/Crypto/DkimOptions.php index 0b47bfdecf22c..45e38c0809c68 100644 --- a/src/Symfony/Component/Mime/Crypto/DkimOptions.php +++ b/src/Symfony/Component/Mime/Crypto/DkimOptions.php @@ -25,6 +25,9 @@ public function toArray(): array return $this->options; } + /** + * @return $this + */ public function algorithm(int $algo): static { $this->options['algorithm'] = $algo; @@ -32,6 +35,9 @@ public function algorithm(int $algo): static return $this; } + /** + * @return $this + */ public function signatureExpirationDelay(int $show): static { $this->options['signature_expiration_delay'] = $show; @@ -39,6 +45,9 @@ public function signatureExpirationDelay(int $show): static return $this; } + /** + * @return $this + */ public function bodyMaxLength(int $max): static { $this->options['body_max_length'] = $max; @@ -46,6 +55,9 @@ public function bodyMaxLength(int $max): static return $this; } + /** + * @return $this + */ public function bodyShowLength(bool $show): static { $this->options['body_show_length'] = $show; @@ -53,6 +65,9 @@ public function bodyShowLength(bool $show): static return $this; } + /** + * @return $this + */ public function headerCanon(string $canon): static { $this->options['header_canon'] = $canon; @@ -60,6 +75,9 @@ public function headerCanon(string $canon): static return $this; } + /** + * @return $this + */ public function bodyCanon(string $canon): static { $this->options['body_canon'] = $canon; @@ -67,6 +85,9 @@ public function bodyCanon(string $canon): static return $this; } + /** + * @return $this + */ 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 e9772906b933b..7c0e8e4c9ca35 100644 --- a/src/Symfony/Component/Mime/Email.php +++ b/src/Symfony/Component/Mime/Email.php @@ -491,6 +491,9 @@ private function createDataPart(array $attachment): DataPart return $part; } + /** + * @return $this + */ 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 22f0795ab35d5..0b7a0ebbc9e74 100644 --- a/src/Symfony/Component/Mime/Header/Headers.php +++ b/src/Symfony/Component/Mime/Header/Headers.php @@ -76,42 +76,65 @@ public function getMaxLineLength(): int /** * @param array $addresses + * + * @return $this */ 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): static { return $this->add(new MailboxHeader($name, Address::create($address))); } + /** + * @return $this + */ 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): static { return $this->add(new PathHeader($name, $path instanceof Address ? $path : new Address($path))); } + /** + * @return $this + */ public function addDateHeader(string $name, \DateTimeInterface $dateTime): static { return $this->add(new DateHeader($name, $dateTime)); } + /** + * @return $this + */ 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 = []): static { return $this->add(new ParameterizedHeader($name, $value, $params)); } + /** + * @return $this + */ public function addHeader(string $name, mixed $argument, array $more = []): static { $parts = explode('\\', self::HEADER_CLASS_MAP[strtolower($name)] ?? UnstructuredHeader::class); @@ -130,6 +153,9 @@ public function has(string $name): bool return isset($this->headers[strtolower($name)]); } + /** + * @return $this + */ public function add(HeaderInterface $header): static { self::checkHeaderClass($header); diff --git a/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php b/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php index 2af81dd468a7f..d4aa1ec0fbcbe 100644 --- a/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/AmazonSns/AmazonSnsOptions.php @@ -41,6 +41,8 @@ public function getRecipientId(): ?string /** * @param string $topic The Topic ARN for SNS message + * + * @return $this */ public function recipient(string $topic): static { diff --git a/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php b/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php index 9e8d45d27e32c..63d47dbac588b 100644 --- a/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/RocketChat/RocketChatOptions.php @@ -46,6 +46,9 @@ public function getRecipientId(): ?string return $this->channel; } + /** + * @return $this + */ public function channel(string $channel): static { $this->channel = $channel; diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php index dae2259aa8445..7e2f9b8616136 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackActionsBlock.php @@ -21,6 +21,9 @@ public function __construct() $this->options['type'] = 'actions'; } + /** + * @return $this + */ public function button(string $text, string $url, string $style = null): static { if (25 === \count($this->options['elements'] ?? [])) { diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php index b29d03de00bbd..01e80e26802f3 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php @@ -21,6 +21,9 @@ public function __construct() $this->options['type'] = 'section'; } + /** + * @return $this + */ public function text(string $text, bool $markdown = true): static { $this->options['text'] = [ @@ -31,6 +34,9 @@ public function text(string $text, bool $markdown = true): static return $this; } + /** + * @return $this + */ public function field(string $text, bool $markdown = true): static { if (10 === \count($this->options['fields'] ?? [])) { @@ -45,6 +51,9 @@ public function field(string $text, bool $markdown = true): static return $this; } + /** + * @return $this + */ 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 b495db588c538..6d1f5c390dd86 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php @@ -67,6 +67,8 @@ public function getRecipientId(): ?string /** * @param string $id The hook id (anything after https://hooks.slack.com/services/) + * + * @return $this */ public function recipient(string $id): static { @@ -75,6 +77,9 @@ public function recipient(string $id): static return $this; } + /** + * @return $this + */ public function asUser(bool $bool): static { $this->options['as_user'] = $bool; @@ -82,6 +87,9 @@ public function asUser(bool $bool): static return $this; } + /** + * @return $this + */ public function block(SlackBlockInterface $block): static { if (\count($this->options['blocks'] ?? []) >= self::MAX_BLOCKS) { @@ -93,6 +101,9 @@ public function block(SlackBlockInterface $block): static return $this; } + /** + * @return $this + */ public function iconEmoji(string $emoji): static { $this->options['icon_emoji'] = $emoji; @@ -100,6 +111,9 @@ public function iconEmoji(string $emoji): static return $this; } + /** + * @return $this + */ public function iconUrl(string $url): static { $this->options['icon_url'] = $url; @@ -107,6 +121,9 @@ public function iconUrl(string $url): static return $this; } + /** + * @return $this + */ public function linkNames(bool $bool): static { $this->options['link_names'] = $bool; @@ -114,6 +131,9 @@ public function linkNames(bool $bool): static return $this; } + /** + * @return $this + */ public function mrkdwn(bool $bool): static { $this->options['mrkdwn'] = $bool; @@ -121,6 +141,9 @@ public function mrkdwn(bool $bool): static return $this; } + /** + * @return $this + */ public function parse(string $parse): static { $this->options['parse'] = $parse; @@ -128,6 +151,9 @@ public function parse(string $parse): static return $this; } + /** + * @return $this + */ public function unfurlLinks(bool $bool): static { $this->options['unfurl_links'] = $bool; @@ -135,6 +161,9 @@ public function unfurlLinks(bool $bool): static return $this; } + /** + * @return $this + */ public function unfurlMedia(bool $bool): static { $this->options['unfurl_media'] = $bool; @@ -142,6 +171,9 @@ public function unfurlMedia(bool $bool): static return $this; } + /** + * @return $this + */ public function username(string $username): static { $this->options['username'] = $username; @@ -149,6 +181,9 @@ public function username(string $username): static return $this; } + /** + * @return $this + */ public function threadTs(string $threadTs): static { $this->options['thread_ts'] = $threadTs; 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 c9af3d1b5a098..e11e0193bd570 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/Reply/Markup/ReplyKeyboardMarkup.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Reply/Markup/ReplyKeyboardMarkup.php @@ -27,6 +27,8 @@ public function __construct() /** * @param array|KeyboardButton[] $buttons + * + * @return $this */ public function keyboard(array $buttons): static { diff --git a/src/Symfony/Component/Notifier/Message/ChatMessage.php b/src/Symfony/Component/Notifier/Message/ChatMessage.php index 2cbdd1f6f9dcf..11fc6681c2c39 100644 --- a/src/Symfony/Component/Notifier/Message/ChatMessage.php +++ b/src/Symfony/Component/Notifier/Message/ChatMessage.php @@ -37,6 +37,9 @@ public static function fromNotification(Notification $notification): self return $message; } + /** + * @return $this + */ public function subject(string $subject): static { $this->subject = $subject; @@ -54,6 +57,9 @@ public function getRecipientId(): ?string return $this->options ? $this->options->getRecipientId() : null; } + /** + * @return $this + */ public function options(MessageOptionsInterface $options): static { $this->options = $options; @@ -66,6 +72,9 @@ public function getOptions(): ?MessageOptionsInterface return $this->options; } + /** + * @return $this + */ 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 d68c35f26e58b..a5e0a6d93ea8f 100644 --- a/src/Symfony/Component/Notifier/Message/EmailMessage.php +++ b/src/Symfony/Component/Notifier/Message/EmailMessage.php @@ -72,6 +72,9 @@ public function getEnvelope(): ?Envelope return $this->envelope; } + /** + * @return $this + */ public function envelope(Envelope $envelope): static { $this->envelope = $envelope; @@ -94,6 +97,9 @@ public function getOptions(): ?MessageOptionsInterface return null; } + /** + * @return $this + */ public function transport(?string $transport): static { if (!$this->message instanceof Email) { diff --git a/src/Symfony/Component/Notifier/Message/SmsMessage.php b/src/Symfony/Component/Notifier/Message/SmsMessage.php index 5e6b21ed74f2c..34f8f7bd8a1dd 100644 --- a/src/Symfony/Component/Notifier/Message/SmsMessage.php +++ b/src/Symfony/Component/Notifier/Message/SmsMessage.php @@ -39,6 +39,9 @@ public static function fromNotification(Notification $notification, SmsRecipient return new self($recipient->getPhone(), $notification->getSubject()); } + /** + * @return $this + */ public function phone(string $phone): static { if ('' === $phone) { @@ -60,6 +63,9 @@ public function getRecipientId(): string return $this->phone; } + /** + * @return $this + */ public function subject(string $subject): static { $this->subject = $subject; @@ -72,6 +78,9 @@ public function getSubject(): string return $this->subject; } + /** + * @return $this + */ public function transport(?string $transport): static { $this->transport = $transport; diff --git a/src/Symfony/Component/OptionsResolver/OptionConfigurator.php b/src/Symfony/Component/OptionsResolver/OptionConfigurator.php index e75baf5cec040..37d5138444da0 100644 --- a/src/Symfony/Component/OptionsResolver/OptionConfigurator.php +++ b/src/Symfony/Component/OptionsResolver/OptionConfigurator.php @@ -28,6 +28,8 @@ 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): static @@ -42,6 +44,8 @@ public function allowedTypes(string ...$types): static * * @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): static @@ -54,6 +58,8 @@ public function allowedValues(mixed ...$values): static /** * Sets the default value for this option. * + * @return $this + * * @throws AccessException If called from a lazy option or normalizer */ public function default(mixed $value): static @@ -77,6 +83,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.'): static { @@ -88,6 +96,8 @@ 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): static @@ -100,6 +110,8 @@ public function normalize(\Closure $normalizer): static /** * Marks this option as required. * + * @return $this + * * @throws AccessException If called from a lazy option or normalizer */ public function required(): static @@ -112,6 +124,8 @@ public function required(): static /** * Sets an info message for an option. * + * @return $this + * * @throws AccessException If called from a lazy option or normalizer */ public function info(string $info): static diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 7ef708fa76b6b..cd1e920c20254 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -253,6 +253,8 @@ 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 diff --git a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php index 1834460742bb2..0f0fa7432002b 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/CollectionConfigurator.php @@ -72,6 +72,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): static { @@ -103,6 +105,8 @@ final public function prefix(string|array $prefix): static * 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): static { diff --git a/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php index 5e443e9d11578..ee8eb6c016204 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/ImportConfigurator.php @@ -49,6 +49,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): static { @@ -59,6 +61,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): static { @@ -71,6 +75,8 @@ final public function namePrefix(string $namePrefix): static * 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): static { diff --git a/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php b/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php index cc8ecd2f18ed8..9407cc8ee73fd 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/RouteConfigurator.php @@ -37,6 +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): static { diff --git a/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php b/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php index 0bf4a09e6c42b..16dc43d0a3608 100644 --- a/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php +++ b/src/Symfony/Component/Routing/Loader/Configurator/Traits/RouteTrait.php @@ -23,6 +23,8 @@ trait RouteTrait /** * Adds defaults. + * + * @return $this */ final public function defaults(array $defaults): static { @@ -33,6 +35,8 @@ final public function defaults(array $defaults): static /** * Adds requirements. + * + * @return $this */ final public function requirements(array $requirements): static { @@ -43,6 +47,8 @@ final public function requirements(array $requirements): static /** * Adds options. + * + * @return $this */ final public function options(array $options): static { @@ -53,6 +59,8 @@ final public function options(array $options): static /** * Whether paths should accept utf8 encoding. + * + * @return $this */ final public function utf8(bool $utf8 = true): static { @@ -63,6 +71,8 @@ final public function utf8(bool $utf8 = true): static /** * Sets the condition. + * + * @return $this */ final public function condition(string $condition): static { @@ -73,6 +83,8 @@ final public function condition(string $condition): static /** * Sets the pattern for the host. + * + * @return $this */ final public function host(string $pattern): static { @@ -86,6 +98,8 @@ final public function host(string $pattern): static * So an empty array means that any scheme is allowed. * * @param string[] $schemes + * + * @return $this */ final public function schemes(array $schemes): static { @@ -99,6 +113,8 @@ final public function schemes(array $schemes): static * So an empty array means that any method is allowed. * * @param string[] $methods + * + * @return $this */ final public function methods(array $methods): static { @@ -111,6 +127,8 @@ final public function methods(array $methods): static * 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): static { @@ -121,6 +139,8 @@ final public function controller(callable|string|array $controller): static /** * Adds the "_locale" entry to defaults. + * + * @return $this */ final public function locale(string $locale): static { @@ -131,6 +151,8 @@ final public function locale(string $locale): static /** * Adds the "_format" entry to defaults. + * + * @return $this */ final public function format(string $format): static { @@ -141,6 +163,8 @@ final public function format(string $format): static /** * Adds the "_stateless" entry to defaults. + * + * @return $this */ final public function stateless(bool $stateless = true): static {