Skip to content

Commit 125be65

Browse files
chore(deps): update dependency friendsofphp/php-cs-fixer to v3.49.0
1 parent 5803ac2 commit 125be65

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+100
-100
lines changed

benchmarks/Utils/SchemaGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function loadType(string $name): ObjectType
5555
return $this->createType($nestingLevel, $name);
5656
}
5757

58-
protected function createType(int $nestingLevel, string $typeName = null): ObjectType
58+
protected function createType(int $nestingLevel, ?string $typeName = null): ObjectType
5959
{
6060
if ($this->typeIndex > $this->config['totalTypes']) {
6161
throw new \Exception("Cannot create new type: there are already {$this->typeIndex} types which exceeds allowed number of {$this->config['totalTypes']} types total");

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"amphp/http-server": "^2.1",
1919
"dms/phpunit-arraysubset-asserts": "dev-master",
2020
"ergebnis/composer-normalize": "^2.28",
21-
"friendsofphp/php-cs-fixer": "3.48.0",
21+
"friendsofphp/php-cs-fixer": "3.49.0",
2222
"mll-lab/php-cs-fixer-config": "^5",
2323
"nyholm/psr7": "^1.5",
2424
"phpbench/phpbench": "^1.2",

examples/01-blog/Blog/Data/DataSource.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public static function findLatestStory(): ?Story
165165
}
166166

167167
/** @return array<int, Story> */
168-
public static function findStories(int $limit, int $afterId = null): array
168+
public static function findStories(int $limit, ?int $afterId = null): array
169169
{
170170
$start = $afterId !== null
171171
? (int) \array_search($afterId, \array_keys(self::$stories), true) + 1
@@ -175,7 +175,7 @@ public static function findStories(int $limit, int $afterId = null): array
175175
}
176176

177177
/** @return array<int, Comment> */
178-
public static function findComments(int $storyId, int $limit = 5, int $afterId = null): array
178+
public static function findComments(int $storyId, int $limit = 5, ?int $afterId = null): array
179179
{
180180
$storyComments = self::$storyComments[$storyId] ?? [];
181181

@@ -191,7 +191,7 @@ public static function findComments(int $storyId, int $limit = 5, int $afterId =
191191
}
192192

193193
/** @return array<int, Comment> */
194-
public static function findReplies(int $commentId, int $limit = 5, int $afterId = null): array
194+
public static function findReplies(int $commentId, int $limit = 5, ?int $afterId = null): array
195195
{
196196
$commentReplies = self::$commentReplies[$commentId] ?? [];
197197

examples/01-blog/Blog/Type/Scalar/EmailType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function parseValue($value): string
3333
return $value;
3434
}
3535

36-
public function parseLiteral(Node $valueNode, array $variables = null): string
36+
public function parseLiteral(Node $valueNode, ?array $variables = null): string
3737
{
3838
// Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL
3939
// error location in query:

examples/01-blog/Blog/Type/Scalar/UrlType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function parseValue($value): string
3333
return $value;
3434
}
3535

36-
public function parseLiteral(Node $valueNode, array $variables = null): string
36+
public function parseLiteral(Node $valueNode, ?array $variables = null): string
3737
{
3838
// Throwing GraphQL\Error\Error to benefit from GraphQL error location in query
3939
if (! ($valueNode instanceof StringValueNode)) {

src/Error/CoercionError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function make(
2525
string $message,
2626
?array $inputPath,
2727
$invalidValue,
28-
\Throwable $previous = null
28+
?\Throwable $previous = null
2929
): self {
3030
$instance = new static($message, null, null, [], null, $previous);
3131
$instance->inputPath = $inputPath;

src/Error/Error.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ class Error extends \Exception implements \JsonSerializable, ClientAware, Provid
7171
public function __construct(
7272
string $message = '',
7373
$nodes = null,
74-
Source $source = null,
75-
array $positions = null,
76-
array $path = null,
77-
\Throwable $previous = null,
78-
array $extensions = null
74+
?Source $source = null,
75+
?array $positions = null,
76+
?array $path = null,
77+
?\Throwable $previous = null,
78+
?array $extensions = null
7979
) {
8080
parent::__construct($message, 0, $previous);
8181

@@ -116,7 +116,7 @@ public function __construct(
116116
* @param iterable<Node>|Node|null $nodes
117117
* @param array<int, int|string>|null $path
118118
*/
119-
public static function createLocatedError($error, $nodes = null, array $path = null): Error
119+
public static function createLocatedError($error, $nodes = null, ?array $path = null): Error
120120
{
121121
if ($error instanceof self) {
122122
if ($error->isLocated()) {

src/Error/FormattedError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private static function leftPad(int $length, string $str): string
128128
*
129129
* @api
130130
*/
131-
public static function createFromException(\Throwable $exception, int $debugFlag = DebugFlag::NONE, string $internalErrorMessage = null): array
131+
public static function createFromException(\Throwable $exception, int $debugFlag = DebugFlag::NONE, ?string $internalErrorMessage = null): array
132132
{
133133
$internalErrorMessage ??= self::$internalErrorMessage;
134134

src/Error/Warning.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class Warning
4040
*
4141
* @api
4242
*/
43-
public static function setWarningHandler(callable $warningHandler = null): void
43+
public static function setWarningHandler(?callable $warningHandler = null): void
4444
{
4545
self::$warningHandler = $warningHandler;
4646
}
@@ -97,7 +97,7 @@ public static function enable($enable = true): void
9797
}
9898
}
9999

100-
public static function warnOnce(string $errorMessage, int $warningId, int $messageLevel = null): void
100+
public static function warnOnce(string $errorMessage, int $warningId, ?int $messageLevel = null): void
101101
{
102102
$messageLevel ??= \E_USER_WARNING;
103103

@@ -109,7 +109,7 @@ public static function warnOnce(string $errorMessage, int $warningId, int $messa
109109
}
110110
}
111111

112-
public static function warn(string $errorMessage, int $warningId, int $messageLevel = null): void
112+
public static function warn(string $errorMessage, int $warningId, ?int $messageLevel = null): void
113113
{
114114
$messageLevel ??= \E_USER_WARNING;
115115

src/Executor/ExecutionResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class ExecutionResult implements \JsonSerializable
8282
* @param array<Error> $errors
8383
* @param array<string, mixed> $extensions
8484
*/
85-
public function __construct(array $data = null, array $errors = [], array $extensions = [])
85+
public function __construct(?array $data = null, array $errors = [], array $extensions = [])
8686
{
8787
$this->data = $data;
8888
$this->errors = $errors;

0 commit comments

Comments
 (0)