Skip to content

Commit ccd7841

Browse files
keradusnicolas-grekas
authored andcommitted
DX: re-apply self_accessor and phpdoc_types_order by PHP CS Fixer
1 parent ce48fbe commit ccd7841

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function attribute(string $key, mixed $value): static
9191
/**
9292
* Returns the parent node.
9393
*/
94-
public function end(): NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null
94+
public function end(): NodeParentInterface|NodeBuilder|self|ArrayNodeDefinition|VariableNodeDefinition|null
9595
{
9696
return $this->parent;
9797
}

src/Symfony/Component/DependencyInjection/Definition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ public function setBindings(array $bindings): static
781781
*
782782
* @return $this
783783
*/
784-
public function addError(string|\Closure|Definition $error): static
784+
public function addError(string|\Closure|self $error): static
785785
{
786786
if ($error instanceof self) {
787787
$this->errors = array_merge($this->errors, $error->errors);

src/Symfony/Component/DomCrawler/Crawler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public function outerHtml(): string
662662
* Since an XPath expression might evaluate to either a simple type or a \DOMNodeList,
663663
* this method will return either an array of simple types or a new Crawler instance.
664664
*/
665-
public function evaluate(string $xpath): array|Crawler
665+
public function evaluate(string $xpath): array|self
666666
{
667667
if (null === $this->document) {
668668
throw new \LogicException('Cannot evaluate the expression on an uninitialized crawler.');

src/Symfony/Component/Form/FormBuilderInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
2727
*
2828
* @param array<string, mixed> $options
2929
*/
30-
public function add(string|FormBuilderInterface $child, string $type = null, array $options = []): static;
30+
public function add(string|self $child, string $type = null, array $options = []): static;
3131

3232
/**
3333
* Creates a form builder.

src/Symfony/Component/HttpFoundation/Response.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public function prepare(Request $request): static
331331
/**
332332
* Sends HTTP headers.
333333
*
334-
* @param null|positive-int $statusCode The status code to use, override the statusCode property if set and not null
334+
* @param positive-int|null $statusCode The status code to use, override the statusCode property if set and not null
335335
*
336336
* @return $this
337337
*/

src/Symfony/Component/HttpFoundation/StreamedResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getCallback(): ?\Closure
6868
/**
6969
* This method only sends the headers once.
7070
*
71-
* @param null|positive-int $statusCode The status code to use, override the statusCode property if set and not null
71+
* @param positive-int|null $statusCode The status code to use, override the statusCode property if set and not null
7272
*
7373
* @return $this
7474
*/

src/Symfony/Component/PropertyInfo/Type.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Type
7676
*
7777
* @throws \InvalidArgumentException
7878
*/
79-
public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, array|Type $collectionKeyType = null, array|Type $collectionValueType = null)
79+
public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, array|self $collectionKeyType = null, array|self $collectionValueType = null)
8080
{
8181
if (!\in_array($builtinType, self::$builtinTypes)) {
8282
throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType));
@@ -90,7 +90,7 @@ public function __construct(string $builtinType, bool $nullable = false, string
9090
$this->collectionValueType = $this->validateCollectionArgument($collectionValueType, 6, '$collectionValueType') ?? [];
9191
}
9292

93-
private function validateCollectionArgument(array|Type|null $collectionArgument, int $argumentIndex, string $argumentName): ?array
93+
private function validateCollectionArgument(array|self|null $collectionArgument, int $argumentIndex, string $argumentName): ?array
9494
{
9595
if (null === $collectionArgument) {
9696
return null;

src/Symfony/Component/Routing/Matcher/Dumper/StaticPrefixCollection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function getRoutes(): array
6161
/**
6262
* Adds a route to a group.
6363
*/
64-
public function addRoute(string $prefix, array|StaticPrefixCollection $route): void
64+
public function addRoute(string $prefix, array|self $route): void
6565
{
6666
[$prefix, $staticPrefix] = $this->getCommonPrefix($prefix, $prefix);
6767

0 commit comments

Comments
 (0)