diff --git a/tests/Config/Parser/fixtures/annotations/Enum/Race.php b/tests/Config/Parser/fixtures/annotations/Enum/Race.php index 4a46ba5ec..d9dec3599 100644 --- a/tests/Config/Parser/fixtures/annotations/Enum/Race.php +++ b/tests/Config/Parser/fixtures/annotations/Enum/Race.php @@ -14,15 +14,15 @@ * @GQL\Description("The list of races!") */ #[GQL\Enum] -#[GQL\Description("The list of races!")] +#[GQL\Description('The list of races!')] class Race { public const HUMAIN = 1; - #[GQL\Description("The Chiss race")] + #[GQL\Description('The Chiss race')] public const CHISS = '2'; - #[GQL\Deprecated("The Zabraks have been wiped out")] + #[GQL\Deprecated('The Zabraks have been wiped out')] public const ZABRAK = '3'; public const TWILEK = Constants::TWILEK; diff --git a/tests/Config/Parser/fixtures/annotations/Input/Planet.php b/tests/Config/Parser/fixtures/annotations/Input/Planet.php index c07832537..c63296c9d 100644 --- a/tests/Config/Parser/fixtures/annotations/Input/Planet.php +++ b/tests/Config/Parser/fixtures/annotations/Input/Planet.php @@ -12,25 +12,25 @@ * @GQL\Description("Planet Input type description") */ #[GQL\Input] -#[GQL\Description("Planet Input type description")] +#[GQL\Description('Planet Input type description')] class Planet { /** * @GQL\Field(resolve="...") */ - #[GQL\Field(resolve: "...")] + #[GQL\Field(resolve: '...')] protected string $skipField; /** * @GQL\Field(type="String!") */ - #[GQL\Field(type: "String!")] + #[GQL\Field(type: 'String!')] protected string $name; /** * @GQL\Field(type="Int!") */ - #[GQL\Field(type: "Int!")] + #[GQL\Field(type: 'Int!')] protected string $population; /** diff --git a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php index 36ee0650e..79c543ab2 100644 --- a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php +++ b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php @@ -15,6 +15,6 @@ class InvalidAccess /** * @GQL\Access("access") */ - #[GQL\Access("access")] + #[GQL\Access('access')] protected string $field; } diff --git a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidArgumentGuessing.php b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidArgumentGuessing.php index ac872235a..3bd050f84 100644 --- a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidArgumentGuessing.php +++ b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidArgumentGuessing.php @@ -17,7 +17,7 @@ class InvalidArgumentGuessing * * @param mixed $test */ - #[GQL\Field(name: "guessFailed")] + #[GQL\Field(name: 'guessFailed')] public function guessFail($test): int { return 12; diff --git a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidProvider.php b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidProvider.php index 2442b0279..9a6a1b016 100644 --- a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidProvider.php +++ b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidProvider.php @@ -15,7 +15,7 @@ class InvalidProvider /** * @GQL\Query(type="Int", targetType="RootMutation2") */ - #[GQL\Query(type: "Int", targetType: "RootMutation2")] + #[GQL\Query(type: 'Int', targetType: 'RootMutation2')] public function noQueryOnMutation(): array { return []; @@ -24,7 +24,7 @@ public function noQueryOnMutation(): array /** * @GQL\Mutation(type="Int", targetType="RootQuery2") */ - #[GQL\Mutation(type: "Int", targetType: "RootQuery2")] + #[GQL\Mutation(type: 'Int', targetType: 'RootQuery2')] public function noMutationOnQuery(): array { return []; diff --git a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidReturnTypeGuessing.php b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidReturnTypeGuessing.php index cc89a1797..e61c755cb 100644 --- a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidReturnTypeGuessing.php +++ b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidReturnTypeGuessing.php @@ -16,7 +16,8 @@ class InvalidReturnTypeGuessing * @GQL\Field(name="guessFailed") * @phpstan-ignore-next-line */ - #[GQL\Field(name: "guessFailed")] + #[GQL\Field(name: 'guessFailed')] + // @phpstan-ignore-next-line public function guessFail(int $test) { diff --git a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidUnion.php b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidUnion.php index 7dbb6b962..337b09cf8 100644 --- a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidUnion.php +++ b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidUnion.php @@ -9,7 +9,7 @@ /** * @GQL\Union(types={"Hero", "Droid", "Sith"}) */ -#[GQL\Union(types: ["Hero", "Droid", "Sith"])] +#[GQL\Union(types: ['Hero', 'Droid', 'Sith'])] class InvalidUnion { } diff --git a/tests/Config/Parser/fixtures/annotations/Relay/EnemiesConnection.php b/tests/Config/Parser/fixtures/annotations/Relay/EnemiesConnection.php index 705154e9b..66e15e3fa 100644 --- a/tests/Config/Parser/fixtures/annotations/Relay/EnemiesConnection.php +++ b/tests/Config/Parser/fixtures/annotations/Relay/EnemiesConnection.php @@ -10,7 +10,7 @@ /** * @GQL\Relay\Connection(node="Character") */ -#[GQL\Relay\Connection(node: "Character")] +#[GQL\Relay\Connection(node: 'Character')] class EnemiesConnection extends Connection { } diff --git a/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnection.php b/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnection.php index fc35e36b7..125cda4d8 100644 --- a/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnection.php +++ b/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnection.php @@ -10,7 +10,7 @@ /** * @GQL\Relay\Connection(edge="FriendsConnectionEdge") */ -#[GQL\Relay\Connection(edge: "FriendsConnectionEdge")] +#[GQL\Relay\Connection(edge: 'FriendsConnectionEdge')] class FriendsConnection extends Connection { } diff --git a/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnectionEdge.php b/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnectionEdge.php index 5c3bd1c9c..80520af7b 100644 --- a/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnectionEdge.php +++ b/tests/Config/Parser/fixtures/annotations/Relay/FriendsConnectionEdge.php @@ -10,7 +10,7 @@ /** * @GQL\Relay\Edge(node="Character") */ -#[GQL\Relay\Edge(node: "Character")] +#[GQL\Relay\Edge(node: 'Character')] class FriendsConnectionEdge extends Edge { } diff --git a/tests/Config/Parser/fixtures/annotations/Repository/PlanetRepository.php b/tests/Config/Parser/fixtures/annotations/Repository/PlanetRepository.php index bfab99689..5f9d0b98a 100644 --- a/tests/Config/Parser/fixtures/annotations/Repository/PlanetRepository.php +++ b/tests/Config/Parser/fixtures/annotations/Repository/PlanetRepository.php @@ -12,17 +12,17 @@ * @GQL\Access("default_access") * @GQL\IsPublic("default_public") */ -#[GQL\Provider(prefix: "planet_")] -#[GQL\Access("default_access")] -#[GQL\IsPublic("default_public")] +#[GQL\Provider(prefix: 'planet_')] +#[GQL\Access('default_access')] +#[GQL\IsPublic('default_public')] class PlanetRepository { /** * @GQL\Query(type="[Planet]") * @GQL\Arg(type="String!", name="keyword") */ - #[GQL\Query(type: "[Planet]")] - #[GQL\Arg(type: "String!", name: "keyword")] + #[GQL\Query(type: '[Planet]')] + #[GQL\Arg(type: 'String!', name: 'keyword')] public function searchPlanet(string $keyword): array { return []; @@ -32,8 +32,8 @@ public function searchPlanet(string $keyword): array * @GQL\Query(type="[Planet]") * @GQL\Arg(type="Int!", name="distance") */ - #[GQL\Query(type: "[Planet]")] - #[GQL\Arg(type: "Int!", name: "distance")] + #[GQL\Query(type: '[Planet]')] + #[GQL\Arg(type: 'Int!', name: 'distance')] public function searchStar(int $distance): array { return []; @@ -44,9 +44,9 @@ public function searchStar(int $distance): array * @GQL\Arg(type="PlanetInput!", name="planetInput") * @GQL\IsPublic("override_public") */ - #[GQL\Mutation(type: "Planet")] - #[GQL\Arg(type: "PlanetInput!", name: "planetInput")] - #[GQL\IsPublic("override_public")] + #[GQL\Mutation(type: 'Planet')] + #[GQL\Arg(type: 'PlanetInput!', name: 'planetInput')] + #[GQL\IsPublic('override_public')] public function createPlanet(array $planetInput): array { return []; @@ -56,8 +56,8 @@ public function createPlanet(array $planetInput): array * @GQL\Query(type="[Planet]", targetType="Droid", name="allowedPlanets") * @GQL\Access("override_access") */ - #[GQL\Query(type: "[Planet]", targetType: "Droid", name: "allowedPlanets")] - #[GQL\Access("override_access")] + #[GQL\Query(type: '[Planet]', targetType: 'Droid', name: 'allowedPlanets')] + #[GQL\Access('override_access')] public function getAllowedPlanetsForDroids(): array { return []; @@ -66,7 +66,7 @@ public function getAllowedPlanetsForDroids(): array /** * @GQL\Query(type="Planet", targetTypes="RootQuery2") */ - #[GQL\Query(type: "Planet", targetType: "RootQuery2")] + #[GQL\Query(type: 'Planet', targetType: 'RootQuery2')] public function getPlanetSchema2(): ?Planet { return null; @@ -77,9 +77,9 @@ public function getPlanetSchema2(): ?Planet * @GQL\Arg(type="PlanetInput!", name="planetInput") * @GQL\IsPublic("override_public") */ - #[GQL\Mutation(type: "Planet", targetTypes: "RootMutation2")] - #[GQL\Arg(type: "PlanetInput!", name: "planetInput")] - #[GQL\IsPublic("override_public")] + #[GQL\Mutation(type: 'Planet', targetTypes: 'RootMutation2')] + #[GQL\Arg(type: 'PlanetInput!', name: 'planetInput')] + #[GQL\IsPublic('override_public')] public function createPlanetSchema2(array $planetInput): array { return []; @@ -88,7 +88,7 @@ public function createPlanetSchema2(array $planetInput): array /** * @GQL\Mutation(targetTypes={"RootMutation", "RootMutation2"}) */ - #[GQL\Mutation(targetTypes: ["RootMutation", "RootMutation2"])] + #[GQL\Mutation(targetTypes: ['RootMutation', 'RootMutation2'])] public function destroyPlanet(int $planetId): bool { return true; @@ -97,7 +97,7 @@ public function destroyPlanet(int $planetId): bool /** * @GQL\Query(targetTypes={"RootQuery", "RootQuery2"}) */ - #[GQL\Query(targetTypes: ["RootQuery", "RootQuery2"])] + #[GQL\Query(targetTypes: ['RootQuery', 'RootQuery2'])] public function isPlanetDestroyed(int $planetId): bool { return true; @@ -106,7 +106,7 @@ public function isPlanetDestroyed(int $planetId): bool /** * @GQL\Query(targetTypes={"Droid", "Mandalorian"}, name="armorResistance") */ - #[GQL\Query(name: "armorResistance", targetTypes: ["Droid", "Mandalorian"])] + #[GQL\Query(name: 'armorResistance', targetTypes: ['Droid', 'Mandalorian'])] public function getArmorResistance(): int { return 10; diff --git a/tests/Config/Parser/fixtures/annotations/Repository/WeaponRepository.php b/tests/Config/Parser/fixtures/annotations/Repository/WeaponRepository.php index 3e018c29f..fe6c66817 100644 --- a/tests/Config/Parser/fixtures/annotations/Repository/WeaponRepository.php +++ b/tests/Config/Parser/fixtures/annotations/Repository/WeaponRepository.php @@ -9,7 +9,7 @@ /** * @GQL\Provider(targetQueryTypes={"RootQuery2"}, targetMutationTypes="RootMutation2") */ -#[GQL\Provider(targetQueryTypes: ["RootQuery2"], targetMutationTypes: "RootMutation2")] +#[GQL\Provider(targetQueryTypes: ['RootQuery2'], targetMutationTypes: 'RootMutation2')] class WeaponRepository { /** @@ -24,7 +24,7 @@ public function hasSecretWeapons(): bool /** * @GQL\Query(targetTypes="RootQuery") */ - #[GQL\Query(targetTypes: "RootQuery")] + #[GQL\Query(targetTypes: 'RootQuery')] public function countSecretWeapons(): int { return 2; diff --git a/tests/Config/Parser/fixtures/annotations/Scalar/GalaxyCoordinates.php b/tests/Config/Parser/fixtures/annotations/Scalar/GalaxyCoordinates.php index 13a4bfa16..11a79acdc 100644 --- a/tests/Config/Parser/fixtures/annotations/Scalar/GalaxyCoordinates.php +++ b/tests/Config/Parser/fixtures/annotations/Scalar/GalaxyCoordinates.php @@ -15,7 +15,7 @@ * @GQL\Description("The galaxy coordinates scalar") */ #[GQL\Scalar] -#[GQL\Description("The galaxy coordinates scalar")] +#[GQL\Description('The galaxy coordinates scalar')] class GalaxyCoordinates { /** diff --git a/tests/Config/Parser/fixtures/annotations/Scalar/MyScalar2.php b/tests/Config/Parser/fixtures/annotations/Scalar/MyScalar2.php index 333de4a89..36faaf650 100644 --- a/tests/Config/Parser/fixtures/annotations/Scalar/MyScalar2.php +++ b/tests/Config/Parser/fixtures/annotations/Scalar/MyScalar2.php @@ -9,7 +9,7 @@ /** * @GQL\Scalar(name="MyScalar", scalarType="newObject('App\\Type\\EmailType')") */ -#[GQL\Scalar(name: "MyScalar", scalarType: "newObject('App\\Type\\EmailType')")] +#[GQL\Scalar(name: 'MyScalar', scalarType: "newObject('App\\Type\\EmailType')")] class MyScalar2 { } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Animal.php b/tests/Config/Parser/fixtures/annotations/Type/Animal.php index e20b5a211..900b64e40 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Animal.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Animal.php @@ -11,20 +11,20 @@ * @GQL\Description("The character interface") */ #[GQL\Type] -#[GQL\Description("The character interface")] +#[GQL\Description('The character interface')] abstract class Animal { /** * @GQL\Field(type="String!") * @GQL\Description("The name of the animal") */ - #[GQL\Field(type: "String!")] - #[GQL\Description("The name of the animal")] + #[GQL\Field(type: 'String!')] + #[GQL\Description('The name of the animal')] private string $name; /** * @GQL\Field(type="String!") */ - #[GQL\Field(type: "String!")] + #[GQL\Field(type: 'String!')] private string $lives; } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Armored.php b/tests/Config/Parser/fixtures/annotations/Type/Armored.php index 306ebb679..4b9cb3441 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Armored.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Armored.php @@ -10,8 +10,8 @@ * @GQL\TypeInterface(name="WithArmor", resolveType="@=resolver('character_type', [value])") * @GQL\Description("The armored interface") */ -#[GQL\TypeInterface("WithArmor", resolveType: "@=resolver('character_type', [value])")] -#[GQL\Description("The armored interface")] +#[GQL\TypeInterface('WithArmor', resolveType: "@=resolver('character_type', [value])")] +#[GQL\Description('The armored interface')] interface Armored { } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Battle.php b/tests/Config/Parser/fixtures/annotations/Type/Battle.php index 3058d9fe1..ad800af1e 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Battle.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Battle.php @@ -16,13 +16,13 @@ class Battle /** * @GQL\Field(type="Planet", complexity="100 + childrenComplexity") */ - #[GQL\Field(type: "Planet", complexity: "100 + childrenComplexity")] + #[GQL\Field(type: 'Planet', complexity: '100 + childrenComplexity')] protected object $planet; /** * @GQL\Field(name="casualties", complexity="childrenComplexity * 5") */ - #[GQL\Field(name: "casualties", complexity: "childrenComplexity * 5")] + #[GQL\Field(name: 'casualties', complexity: 'childrenComplexity * 5')] public function getCasualties( int $areaId, string $raceId, diff --git a/tests/Config/Parser/fixtures/annotations/Type/Cat.php b/tests/Config/Parser/fixtures/annotations/Type/Cat.php index 1a9386cba..ad52f2367 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Cat.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Cat.php @@ -11,13 +11,13 @@ * @GQL\Description("The Cat type") */ #[GQL\Type] -#[GQL\Description("The Cat type")] +#[GQL\Description('The Cat type')] class Cat extends Animal { /** * @GQL\Field(type="Int!") */ - #[GQL\Field(type: "Int!")] + #[GQL\Field(type: 'Int!')] protected int $lives; /** diff --git a/tests/Config/Parser/fixtures/annotations/Type/Character.php b/tests/Config/Parser/fixtures/annotations/Type/Character.php index 672c95bb8..9740ea858 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Character.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Character.php @@ -11,22 +11,22 @@ * @GQL\Description("The character interface") */ #[GQL\TypeInterface(resolveType: "@=resolver('character_type', [value])")] -#[GQL\Description("The character interface")] +#[GQL\Description('The character interface')] abstract class Character { /** * @GQL\Field(type="String!") * @GQL\Description("The name of the character") */ - #[GQL\Field(type: "String!")] - #[GQL\Description("The name of the character")] + #[GQL\Field(type: 'String!')] + #[GQL\Description('The name of the character')] protected string $name; /** * @GQL\Field(type="[Character]", resolve="@=resolver('App\MyResolver::getFriends')") * @GQL\Description("The friends of the character") */ - #[GQL\Field(type: "[Character]", resolve: "@=resolver('App\MyResolver::getFriends')")] - #[GQL\Description("The friends of the character")] + #[GQL\Field(type: '[Character]', resolve: "@=resolver('App\MyResolver::getFriends')")] + #[GQL\Description('The friends of the character')] protected array $friends; } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Crystal.php b/tests/Config/Parser/fixtures/annotations/Type/Crystal.php index e6c09c8e8..bdfdb1353 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Crystal.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Crystal.php @@ -11,12 +11,12 @@ * @GQL\FieldsBuilder(name="MyFieldsBuilder", config={"param1": "val1"}) */ #[GQL\Type] -#[GQL\FieldsBuilder(name: "MyFieldsBuilder", config: ["param1" => "val1"])] +#[GQL\FieldsBuilder(name: 'MyFieldsBuilder', config: ['param1' => 'val1'])] class Crystal { /** * @GQL\Field(type="String!") */ - #[GQL\Field(type: "String!")] + #[GQL\Field(type: 'String!')] protected string $color; } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Droid.php b/tests/Config/Parser/fixtures/annotations/Type/Droid.php index 5ed95b297..a679c5c6a 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Droid.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Droid.php @@ -11,7 +11,7 @@ * @GQL\Description("The Droid type") */ #[GQL\Type(isTypeOf: "@=isTypeOf('App\Entity\Droid')")] -#[GQL\Description("The Droid type")] +#[GQL\Description('The Droid type')] class Droid extends Character { /** diff --git a/tests/Config/Parser/fixtures/annotations/Type/Hero.php b/tests/Config/Parser/fixtures/annotations/Type/Hero.php index ae87b441c..fe9463c38 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Hero.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Hero.php @@ -12,13 +12,13 @@ * @GQL\Type(interfaces={"Character"}) * @GQL\Description("The Hero type") */ -#[GQL\Type(interfaces: ["Character"])] -#[GQL\Description("The Hero type")] +#[GQL\Type(interfaces: ['Character'])] +#[GQL\Description('The Hero type')] class Hero extends Character implements Killable { /** * @GQL\Field(type="Race") */ - #[GQL\Field(type: "Race")] + #[GQL\Field(type: 'Race')] protected Race $race; } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Lightsaber.php b/tests/Config/Parser/fixtures/annotations/Type/Lightsaber.php index 90d24b0b7..31c162d02 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Lightsaber.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Lightsaber.php @@ -93,7 +93,7 @@ class Lightsaber * @GQL\Deprecated("No more tags on lightsabers") */ #[GQL\Field] - #[GQL\Deprecated("No more tags on lightsabers")] + #[GQL\Deprecated('No more tags on lightsabers')] protected array $tags; /** diff --git a/tests/Config/Parser/fixtures/annotations/Type/Planet.php b/tests/Config/Parser/fixtures/annotations/Type/Planet.php index c0b8c207b..b67a0da8a 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Planet.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Planet.php @@ -12,25 +12,25 @@ * @GQL\Description("The Planet type") */ #[GQL\Type] -#[GQL\Description("The Planet type")] +#[GQL\Description('The Planet type')] class Planet { /** * @GQL\Field(type="String!") */ - #[GQL\Field(type: "String!")] + #[GQL\Field(type: 'String!')] protected string $name; /** * @GQL\Field(type="GalaxyCoordinates") */ - #[GQL\Field(type: "GalaxyCoordinates")] + #[GQL\Field(type: 'GalaxyCoordinates')] protected GalaxyCoordinates $location; /** * @GQL\Field(type="Int!") */ - #[GQL\Field(type: "Int!")] + #[GQL\Field(type: 'Int!')] protected int $population; /** @@ -38,7 +38,7 @@ class Planet * @GQL\FieldBuilder(name="NoteFieldBuilder", config={"option1"="value1"}) */ #[GQL\Field] - #[GQL\FieldBuilder("NoteFieldBuilder", ["option1" => "value1"])] + #[GQL\FieldBuilder('NoteFieldBuilder', ['option1' => 'value1'])] public array $notes; /** @@ -48,14 +48,14 @@ class Planet * ) * @GQL\ArgsBuilder(name="PlanetFilterArgBuilder", config={"option2"="value2"}) */ - #[GQL\Field(type: "Planet", resolve: "@=resolver('closest_planet', [args['filter']])")] - #[GQL\ArgsBuilder("PlanetFilterArgBuilder", ["option2" => "value2"])] + #[GQL\Field(type: 'Planet', resolve: "@=resolver('closest_planet', [args['filter']])")] + #[GQL\ArgsBuilder('PlanetFilterArgBuilder', ['option2' => 'value2'])] public Planet $closestPlanet; /** * @GQL\Field(fieldBuilder={"NoteFieldBuilder", {"option1": "value1"}}) */ - #[GQL\Field(fieldBuilder: ["NoteFieldBuilder", ["option1" => "value1"]])] + #[GQL\Field(fieldBuilder: ['NoteFieldBuilder', ['option1' => 'value1']])] public array $notesDeprecated; /** @@ -65,6 +65,6 @@ class Planet * resolve="@=resolver('closest_planet', [args['filter']])" * ) */ - #[GQL\Field(type: "Planet", argsBuilder: ["PlanetFilterArgBuilder", ["option2" => "value2"]], resolve: "@=resolver('closest_planet', [args['filter']])")] + #[GQL\Field(type: 'Planet', argsBuilder: ['PlanetFilterArgBuilder', ['option2' => 'value2']], resolve: "@=resolver('closest_planet', [args['filter']])")] public Planet $closestPlanetDeprecated; } diff --git a/tests/Config/Parser/fixtures/annotations/Type/Sith.php b/tests/Config/Parser/fixtures/annotations/Type/Sith.php index 7be82be32..84c9d0d85 100644 --- a/tests/Config/Parser/fixtures/annotations/Type/Sith.php +++ b/tests/Config/Parser/fixtures/annotations/Type/Sith.php @@ -13,10 +13,10 @@ * @GQL\Access("isAuthenticated()") * @GQL\IsPublic("isAuthenticated()") */ -#[GQL\Type(interfaces: ["Character"], resolveField: "value")] -#[GQL\Description("The Sith type")] -#[GQL\Access("isAuthenticated()")] -#[GQL\IsPublic("isAuthenticated()")] +#[GQL\Type(interfaces: ['Character'], resolveField: 'value')] +#[GQL\Description('The Sith type')] +#[GQL\Access('isAuthenticated()')] +#[GQL\IsPublic('isAuthenticated()')] class Sith extends Character implements Killable { /** @@ -24,7 +24,7 @@ class Sith extends Character implements Killable * @GQL\Access("hasRole('SITH_LORD')") */ #[GQL\Access("hasRole('SITH_LORD')")] - #[GQL\Field(type: "String!")] + #[GQL\Field(type: 'String!')] protected string $realName; /** @@ -32,21 +32,21 @@ class Sith extends Character implements Killable * @GQL\IsPublic("hasRole('SITH_LORD')") */ #[GQL\IsPublic("hasRole('SITH_LORD')")] - #[GQL\Field(type: "String!")] + #[GQL\Field(type: 'String!')] protected string $location; /** * @GQL\Field(type="Sith", resolve="service('master_resolver').getMaster(value)") */ - #[GQL\Field(type: "Sith", resolve: "service('master_resolver').getMaster(value)")] + #[GQL\Field(type: 'Sith', resolve: "service('master_resolver').getMaster(value)")] protected Sith $currentMaster; /** * @GQL\Field(type="[Character]", name="victims") * @GQL\Arg(name="jediOnly", type="Boolean", description="Only Jedi victims", default=false) */ - #[GQL\Field(type: "[Character]", name: "victims")] - #[GQL\Arg(name: "jediOnly", type: "Boolean", description: "Only Jedi victims", default: false)] + #[GQL\Field(type: '[Character]', name: 'victims')] + #[GQL\Arg(name: 'jediOnly', type: 'Boolean', description: 'Only Jedi victims', default: false)] public function getVictims(bool $jediOnly = false): array { return []; diff --git a/tests/Config/Parser/fixtures/annotations/Union/Killable.php b/tests/Config/Parser/fixtures/annotations/Union/Killable.php index 9b46e1740..d4a5dd64a 100644 --- a/tests/Config/Parser/fixtures/annotations/Union/Killable.php +++ b/tests/Config/Parser/fixtures/annotations/Union/Killable.php @@ -9,7 +9,7 @@ /** * @GQL\Union(resolveType="value.getType()") */ -#[GQL\Union(resolveType: "value.getType()")] +#[GQL\Union(resolveType: 'value.getType()')] interface Killable { } diff --git a/tests/Config/Parser/fixtures/annotations/Union/SearchResult.php b/tests/Config/Parser/fixtures/annotations/Union/SearchResult.php index e02d6e94c..adac7ff1c 100644 --- a/tests/Config/Parser/fixtures/annotations/Union/SearchResult.php +++ b/tests/Config/Parser/fixtures/annotations/Union/SearchResult.php @@ -10,8 +10,8 @@ * @GQL\Union(name="ResultSearch", types={"Hero", "Droid", "Sith"}, resolveType="value.getType()") * @GQL\Description("A search result") */ -#[GQL\Union("ResultSearch", types: ["Hero", "Droid", "Sith"], resolveType: "value.getType()")] -#[GQL\Description("A search result")] +#[GQL\Union('ResultSearch', types: ['Hero', 'Droid', 'Sith'], resolveType: 'value.getType()')] +#[GQL\Description('A search result')] class SearchResult { } diff --git a/tests/Config/Parser/fixtures/annotations/Union/SearchResult2.php b/tests/Config/Parser/fixtures/annotations/Union/SearchResult2.php index b65d894ad..cd804cc6c 100644 --- a/tests/Config/Parser/fixtures/annotations/Union/SearchResult2.php +++ b/tests/Config/Parser/fixtures/annotations/Union/SearchResult2.php @@ -11,7 +11,7 @@ /** * @GQL\Union(types={"Hero", "Droid", "Sith"}) */ -#[GQL\Union(types: ["Hero", "Droid", "Sith"])] +#[GQL\Union(types: ['Hero', 'Droid', 'Sith'])] class SearchResult2 { public static function resolveType(TypeResolver $typeResolver, bool $value): ?Type