Skip to content

Commit 58fea65

Browse files
simPodspawnia
authored andcommitted
Remove trailing comma from array shapes since psalm cannot read it
Causes huge amount of type errors with code bases using psalm
1 parent d93a76d commit 58fea65

18 files changed

+24
-24
lines changed

src/Executor/ExecutionResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
* message: string,
2424
* locations?: array<int, array{line: int, column: int}>,
2525
* path?: array<int, int|string>,
26-
* extensions?: array<string, mixed>,
26+
* extensions?: array<string, mixed>
2727
* }
2828
* @phpstan-type SerializableErrors array<int, SerializableError>
2929
* @phpstan-type SerializableResult array{
3030
* data?: array<string, mixed>,
3131
* errors?: SerializableErrors,
32-
* extensions?: array<string, mixed>,
32+
* extensions?: array<string, mixed>
3333
* }
3434
* @phpstan-type ErrorFormatter callable(Throwable): SerializableError
3535
* @phpstan-type ErrorsHandler callable(array<Error> $errors, ErrorFormatter $formatter): SerializableErrors

src/Language/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* noLocation?: bool,
6767
* allowLegacySDLEmptyFields?: bool,
6868
* allowLegacySDLImplementsInterfaces?: bool,
69-
* experimentalFragmentVariables?: bool,
69+
* experimentalFragmentVariables?: bool
7070
* }
7171
*
7272
* noLocation:

src/Type/Definition/Argument.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
* type: ArgumentType,
1717
* defaultValue?: mixed,
1818
* description?: string|null,
19-
* astNode?: InputValueDefinitionNode|null,
19+
* astNode?: InputValueDefinitionNode|null
2020
* }
2121
* @phpstan-type ArgumentConfig array{
2222
* name: string,
2323
* type: ArgumentType,
2424
* defaultValue?: mixed,
2525
* description?: string|null,
26-
* astNode?: InputValueDefinitionNode|null,
26+
* astNode?: InputValueDefinitionNode|null
2727
* }
2828
* @phpstan-type ArgumentListConfig iterable<ArgumentConfig|ArgumentType>|iterable<UnnamedArgumentConfig>
2929
*/

src/Type/Definition/CustomScalarType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* parseValue: callable(mixed): mixed,
1919
* parseLiteral: callable(ValueNode&Node, array<string, mixed>|null): mixed,
2020
* astNode?: ScalarTypeDefinitionNode|null,
21-
* extensionASTNodes?: array<ScalarTypeExtensionNode>|null,
21+
* extensionASTNodes?: array<ScalarTypeExtensionNode>|null
2222
* }
2323
* @phpstan-type OutputCustomScalarConfig array{
2424
* name?: string|null,
@@ -27,7 +27,7 @@
2727
* parseValue?: callable(mixed): mixed,
2828
* parseLiteral?: callable(ValueNode&Node, array<string, mixed>|null): mixed,
2929
* astNode?: ScalarTypeDefinitionNode|null,
30-
* extensionASTNodes?: array<ScalarTypeExtensionNode>|null,
30+
* extensionASTNodes?: array<ScalarTypeExtensionNode>|null
3131
* }
3232
* @phpstan-type CustomScalarConfig InputCustomScalarConfig|OutputCustomScalarConfig
3333
*/

src/Type/Definition/Directive.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* args?: ArgumentListConfig|null,
1515
* locations: array<string>,
1616
* isRepeatable?: bool|null,
17-
* astNode?: DirectiveDefinitionNode|null,
17+
* astNode?: DirectiveDefinitionNode|null
1818
* }
1919
*/
2020
class Directive

src/Type/Definition/EnumType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
* value?: mixed,
2424
* deprecationReason?: string|null,
2525
* description?: string|null,
26-
* astNode?: EnumValueDefinitionNode|null,
26+
* astNode?: EnumValueDefinitionNode|null
2727
* }
2828
* @phpstan-type EnumValues iterable<string, PartialEnumValueConfig>|iterable<string, mixed>|iterable<int, string>
2929
* @phpstan-type EnumTypeConfig array{
3030
* name?: string|null,
3131
* description?: string|null,
3232
* values: EnumValues|callable(): EnumValues,
3333
* astNode?: EnumTypeDefinitionNode|null,
34-
* extensionASTNodes?: array<int, EnumTypeExtensionNode>|null,
34+
* extensionASTNodes?: array<int, EnumTypeExtensionNode>|null
3535
* }
3636
*/
3737
class EnumType extends Type implements InputType, OutputType, LeafType, NullableType, NamedType

src/Type/Definition/EnumValueDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* value?: mixed,
1111
* deprecationReason?: string|null,
1212
* description?: string|null,
13-
* astNode?: EnumValueDefinitionNode|null,
13+
* astNode?: EnumValueDefinitionNode|null
1414
* }
1515
*/
1616
class EnumValueDefinition

src/Type/Definition/FieldDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* description?: string|null,
2626
* deprecationReason?: string|null,
2727
* astNode?: FieldDefinitionNode|null,
28-
* complexity?: ComplexityFn|null,
28+
* complexity?: ComplexityFn|null
2929
* }
3030
* @phpstan-type UnnamedFieldDefinitionConfig array{
3131
* type: FieldType,
@@ -34,7 +34,7 @@
3434
* description?: string|null,
3535
* deprecationReason?: string|null,
3636
* astNode?: FieldDefinitionNode|null,
37-
* complexity?: ComplexityFn|null,
37+
* complexity?: ComplexityFn|null
3838
* }
3939
* @phpstan-type FieldsConfig iterable<mixed>|(callable(): iterable<mixed>)
4040
*/

src/Type/Definition/InputObjectField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
* defaultValue?: mixed,
1616
* description?: string|null,
1717
* type: ArgumentType,
18-
* astNode?: InputValueDefinitionNode|null,
18+
* astNode?: InputValueDefinitionNode|null
1919
* }
2020
* @phpstan-type UnnamedInputObjectFieldConfig array{
2121
* name?: string,
2222
* defaultValue?: mixed,
2323
* description?: string|null,
2424
* type: ArgumentType,
25-
* astNode?: InputValueDefinitionNode|null,
25+
* astNode?: InputValueDefinitionNode|null
2626
* }
2727
*/
2828
class InputObjectField

src/Type/Definition/InputObjectType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* description?: string|null,
2222
* fields: iterable<FieldConfig>|callable(): iterable<FieldConfig>,
2323
* astNode?: InputObjectTypeDefinitionNode|null,
24-
* extensionASTNodes?: array<int, InputObjectTypeExtensionNode>|null,
24+
* extensionASTNodes?: array<int, InputObjectTypeExtensionNode>|null
2525
* }
2626
*/
2727
class InputObjectType extends Type implements InputType, NullableType, NamedType

0 commit comments

Comments
 (0)