@@ -85,7 +85,7 @@ |
||
85 | 85 | return new TypeGuess(TextType::class, [], Guess::MEDIUM_CONFIDENCE); |
86 | 86 | case Type::SIMPLE_ARRAY: |
87 | 87 | case Type::JSON_ARRAY: |
88 | - return new TypeGuess(GraphQLType::class, ['graphql_type' => Types::listOf(Types::STRING) ], Guess::MEDIUM_CONFIDENCE); |
|
88 | + return new TypeGuess(GraphQLType::class, ['graphql_type' => Types::listOf(Types::STRING)], Guess::MEDIUM_CONFIDENCE); |
|
89 | 89 | case Type::TEXT: |
90 | 90 | return new TypeGuess(TextareaType::class, [], Guess::MEDIUM_CONFIDENCE); |
91 | 91 | default: |
@@ -82,7 +82,7 @@ |
||
82 | 82 | * |
83 | 83 | * @return TypeGuess|null |
84 | 84 | */ |
85 | - protected function resolveDoctrineEnumBundleType($class, $property):?TypeGuess |
|
85 | + protected function resolveDoctrineEnumBundleType($class, $property): ?TypeGuess |
|
86 | 86 | { |
87 | 87 | if (!class_exists('\Fresh\DoctrineEnumBundle\DBAL\Types\AbstractEnumType')) { |
88 | 88 | return null; |
@@ -27,9 +27,9 @@ |
||
27 | 27 | public function buildForm(FormBuilderInterface $builder, array $options) |
28 | 28 | { |
29 | 29 | $transformer = new CallbackTransformer( |
30 | - function ($value) { |
|
30 | + function($value) { |
|
31 | 31 | }, |
32 | - function ($value) { |
|
32 | + function($value) { |
|
33 | 33 | } |
34 | 34 | ); |
35 | 35 | $builder->addModelTransformer($transformer); |
@@ -31,8 +31,8 @@ |
||
31 | 31 | protected function configure() |
32 | 32 | { |
33 | 33 | $this->setName('graphql:definition:options') |
34 | - ->setDescription('Expose all available options for one or all graphql definition extensions') |
|
35 | - ->addArgument('extension', InputArgument::OPTIONAL, 'Show only options for given extension'); |
|
34 | + ->setDescription('Expose all available options for one or all graphql definition extensions') |
|
35 | + ->addArgument('extension', InputArgument::OPTIONAL, 'Show only options for given extension'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $graphiql = $root->arrayNode('graphiql')->addDefaultsIfNotSet()->children(); |
41 | 41 | |
42 | 42 | $graphiql->scalarNode('title') |
43 | - ->defaultValue('GraphQL API Explorer'); |
|
43 | + ->defaultValue('GraphQL API Explorer'); |
|
44 | 44 | |
45 | 45 | $graphiql |
46 | 46 | ->scalarNode('data_warning_message') |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $graphiql->enumNode('data_warning_style')->values(['info', 'warning', 'danger'])->defaultValue('danger'); |
50 | 50 | |
51 | 51 | $graphiql->scalarNode('template') |
52 | - ->defaultValue('@YnloGraphQL/explorer.twig'); |
|
52 | + ->defaultValue('@YnloGraphQL/explorer.twig'); |
|
53 | 53 | |
54 | 54 | $authentication = $graphiql->arrayNode('authentication')->addDefaultsIfNotSet()->children(); |
55 | 55 | $authentication |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ->defaultFalse(); |
62 | 62 | |
63 | 63 | $authentication->scalarNode('login_message') |
64 | - ->defaultValue('Start exploring GraphQL API queries using your account’s data now.'); |
|
64 | + ->defaultValue('Start exploring GraphQL API queries using your account’s data now.'); |
|
65 | 65 | |
66 | 66 | $authenticationProvider = $authentication->arrayNode('provider')->children(); |
67 | 67 | |
@@ -70,23 +70,23 @@ discard block |
||
70 | 70 | $jwtLogin = $jwt->arrayNode('login')->children(); |
71 | 71 | |
72 | 72 | $jwtLogin->scalarNode('url') |
73 | - ->info('Route name or URI to make the login process to retrieve the token.') |
|
74 | - ->isRequired(); |
|
73 | + ->info('Route name or URI to make the login process to retrieve the token.') |
|
74 | + ->isRequired(); |
|
75 | 75 | |
76 | 76 | $jwtLogin->scalarNode('username_parameter') |
77 | - ->defaultValue('username'); |
|
77 | + ->defaultValue('username'); |
|
78 | 78 | |
79 | 79 | $jwtLogin->scalarNode('password_parameter') |
80 | - ->defaultValue('password'); |
|
80 | + ->defaultValue('password'); |
|
81 | 81 | |
82 | 82 | $jwtLogin->enumNode('parameters_in') |
83 | - ->values(['form', 'query', 'header']) |
|
84 | - ->info('How pass parameters to request the token') |
|
85 | - ->defaultValue('form'); |
|
83 | + ->values(['form', 'query', 'header']) |
|
84 | + ->info('How pass parameters to request the token') |
|
85 | + ->defaultValue('form'); |
|
86 | 86 | |
87 | 87 | $jwtLogin->scalarNode('response_token_path') |
88 | - ->defaultValue('token') |
|
89 | - ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.'); |
|
88 | + ->defaultValue('token') |
|
89 | + ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.'); |
|
90 | 90 | |
91 | 91 | $jwtRequests = $jwt->arrayNode('requests')->addDefaultsIfNotSet()->children(); |
92 | 92 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | ->info('Customize how the token should be send, use the place holder {token} to replace for current token'); |
105 | 105 | |
106 | 106 | $authenticationProvider->scalarNode('custom') |
107 | - ->defaultNull() |
|
108 | - ->info('Configure custom service to use as authentication provider'); |
|
107 | + ->defaultNull() |
|
108 | + ->info('Configure custom service to use as authentication provider'); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | protected function configureCORS(NodeBuilder $root) |
@@ -131,25 +131,25 @@ discard block |
||
131 | 131 | { |
132 | 132 | $pagination = $root->arrayNode('pagination')->addDefaultsIfNotSet()->children(); |
133 | 133 | $pagination->integerNode('limit') |
134 | - ->defaultValue(100)->info('Maximum limit allowed for all paginations'); |
|
134 | + ->defaultValue(100)->info('Maximum limit allowed for all paginations'); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | protected function configureExtensionNamespace(NodeBuilder $root) |
138 | 138 | { |
139 | 139 | $namespaces = $root->arrayNode('namespaces') |
140 | - ->info( |
|
141 | - 'Group GraphQL schema using namespaced schemas. |
|
140 | + ->info( |
|
141 | + 'Group GraphQL schema using namespaced schemas. |
|
142 | 142 | On large schemas is helpful to keep schemas grouped by bundle and node' |
143 | - ) |
|
144 | - ->canBeEnabled() |
|
145 | - ->addDefaultsIfNotSet() |
|
146 | - ->children(); |
|
143 | + ) |
|
144 | + ->canBeEnabled() |
|
145 | + ->addDefaultsIfNotSet() |
|
146 | + ->children(); |
|
147 | 147 | |
148 | 148 | $bundles = $namespaces->arrayNode('bundles') |
149 | - ->info('Group each bundle into a separate schema definition') |
|
150 | - ->canBeDisabled() |
|
151 | - ->addDefaultsIfNotSet() |
|
152 | - ->children(); |
|
149 | + ->info('Group each bundle into a separate schema definition') |
|
150 | + ->canBeDisabled() |
|
151 | + ->addDefaultsIfNotSet() |
|
152 | + ->children(); |
|
153 | 153 | |
154 | 154 | $bundles->scalarNode('suffix') |
155 | 155 | ->info('The following suffix will be used for bundle groups') |
@@ -176,24 +176,24 @@ discard block |
||
176 | 176 | ->children(); |
177 | 177 | |
178 | 178 | $nodes->scalarNode('query_suffix') |
179 | - ->info('The following suffix will be used to create the name for queries to the same node') |
|
180 | - ->defaultValue('Query'); |
|
179 | + ->info('The following suffix will be used to create the name for queries to the same node') |
|
180 | + ->defaultValue('Query'); |
|
181 | 181 | |
182 | 182 | $nodes->scalarNode('mutation_suffix') |
183 | - ->info('The following suffix will be used to create the name for mutations to the same node') |
|
184 | - ->defaultValue('Mutation'); |
|
183 | + ->info('The following suffix will be used to create the name for mutations to the same node') |
|
184 | + ->defaultValue('Mutation'); |
|
185 | 185 | |
186 | 186 | $nodes->variableNode('ignore') |
187 | - ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation') |
|
188 | - ->defaultValue(['Node']); |
|
187 | + ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation') |
|
188 | + ->defaultValue(['Node']); |
|
189 | 189 | |
190 | 190 | $nodes->arrayNode('aliases') |
191 | - ->info( |
|
192 | - 'Define aliases for nodes to set definitions inside other desired node name. |
|
191 | + ->info( |
|
192 | + 'Define aliases for nodes to set definitions inside other desired node name. |
|
193 | 193 | Can be used to group multiple nodes or publish a node with a different group name' |
194 | - ) |
|
195 | - ->example('InvoiceItem: Invoice') |
|
196 | - ->useAttributeAsKey('name') |
|
197 | - ->prototype('scalar'); |
|
194 | + ) |
|
195 | + ->example('InvoiceItem: Invoice') |
|
196 | + ->useAttributeAsKey('name') |
|
197 | + ->prototype('scalar'); |
|
198 | 198 | } |
199 | 199 | } |
@@ -84,8 +84,8 @@ |
||
84 | 84 | |
85 | 85 | $qb = $repo->createQueryBuilder('o', $findBy); |
86 | 86 | $entities = $qb->where($qb->expr()->in($findBy, $searchValues)) |
87 | - ->getQuery() |
|
88 | - ->getResult(); |
|
87 | + ->getQuery() |
|
88 | + ->getResult(); |
|
89 | 89 | |
90 | 90 | foreach ($entities as $searchValue => $entity) { |
91 | 91 | $expectedResultsOrder[md5($type.$searchValue)] = $entity; |
@@ -92,8 +92,8 @@ |
||
92 | 92 | $repo = $this->registry->getRepository($class); |
93 | 93 | $qb = $repo->createQueryBuilder('o', 'o.id'); |
94 | 94 | $entities = $qb->where($qb->expr()->in('o.id', $ids)) |
95 | - ->getQuery() |
|
96 | - ->getResult(); |
|
95 | + ->getQuery() |
|
96 | + ->getResult(); |
|
97 | 97 | self::$deferred[$class] = $entities; |
98 | 98 | } |
99 | 99 | } |
@@ -118,7 +118,7 @@ |
||
118 | 118 | $this->deferredBuffer->add($value); |
119 | 119 | |
120 | 120 | return new Deferred( |
121 | - function () use ($value) { |
|
121 | + function() use ($value) { |
|
122 | 122 | $this->deferredBuffer->loadBuffer(); |
123 | 123 | |
124 | 124 | return $this->deferredBuffer->getLoadedEntity($value); |
@@ -112,7 +112,7 @@ |
||
112 | 112 | * |
113 | 113 | * @return string |
114 | 114 | */ |
115 | - protected function getGraphQLType(?string $type):?string |
|
115 | + protected function getGraphQLType(?string $type): ?string |
|
116 | 116 | { |
117 | 117 | switch ($type) { |
118 | 118 | case DoctrineType::BOOLEAN: |