Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add back @return $this annotations #42714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions 24 src/Symfony/Bridge/Twig/Mime/WrappedTemplatedEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -69,6 +72,9 @@ public function getSubject(): ?string
return $this->message->getSubject();
}

/**
* @return $this
*/
public function setReturnPath(string $address): static
{
$this->message->returnPath($address);
Expand All @@ -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));
Expand All @@ -96,6 +105,9 @@ public function getFrom(): array
return $this->message->getFrom();
}

/**
* @return $this
*/
public function addReplyTo(string $address): static
{
$this->message->addReplyTo($address);
Expand All @@ -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));
Expand All @@ -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));
Expand All @@ -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));
Expand All @@ -156,6 +177,9 @@ public function getBcc(): array
return $this->message->getBcc();
}

/**
* @return $this
*/
public function setPriority(int $priority): static
{
$this->message->priority($priority);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ 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));

return $this;
}

/**
* @return $this
*/
final public function __invoke(string $name, mixed $value): static
{
return $this->set($name, $value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,29 @@ public function __construct(string $id)
$this->id = $id;
}

/**
* @return $this
*/
final public function ignoreOnInvalid(): static
{
$this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;

return $this;
}

/**
* @return $this
*/
final public function nullOnInvalid(): static
{
$this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;

return $this;
}

/**
* @return $this
*/
final public function ignoreOnUninitialized(): static
{
$this->invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ trait AutowireTrait
{
/**
* Enables/disables autowiring.
*
* @return $this
*/
final public function autowire(bool $autowired = true): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ trait ClassTrait
{
/**
* Sets the service class.
*
* @return $this
*/
final public function class(?string $class): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ trait FactoryTrait
{
/**
* Sets a factory.
*
* @return $this
*/
final public function factory(string|array|ReferenceConfigurator $factory): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ trait FileTrait
{
/**
* Sets a file to require before creating the service.
*
* @return $this
*/
final public function file(string $file): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ trait PropertyTrait
{
/**
* Sets a specific property.
*
* @return $this
*/
final public function property(string $name, mixed $value): static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@

trait PublicTrait
{
/**
* @return $this
*/
final public function public(): static
{
$this->definition->setPublic(true);

return $this;
}

/**
* @return $this
*/
final public function private(): static
{
$this->definition->setPublic(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ trait TagTrait
{
/**
* Adds a tag for this definition.
*
* @return $this
*/
final public function tag(string $name, array $attributes = []): static
{
Expand Down
5 changes: 5 additions & 0 deletions 5 src/Symfony/Component/Dotenv/Dotenv.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
{
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.