@@ -103,9 +103,9 @@ |
||
103 | 103 | |
104 | 104 | /** @var iterable $files */ |
105 | 105 | $files = Finder::create() |
106 | - ->in($dirs) |
|
107 | - ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime))) |
|
108 | - ->files(); |
|
106 | + ->in($dirs) |
|
107 | + ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime))) |
|
108 | + ->files(); |
|
109 | 109 | |
110 | 110 | //exist at least one modified file |
111 | 111 | foreach ($files as $file) { |
@@ -43,10 +43,10 @@ |
||
43 | 43 | [ |
44 | 44 | 'name' => $definition->getName(), |
45 | 45 | 'description' => $definition->getDescription(), |
46 | - 'fields' => function () use ($definition) { |
|
46 | + 'fields' => function() use ($definition) { |
|
47 | 47 | return GraphQLBuilder::resolveFields($definition); |
48 | 48 | }, |
49 | - 'resolveType' => function ($value) { |
|
49 | + 'resolveType' => function($value) { |
|
50 | 50 | return TypeUtil::resolveObjectType($this->endpoint, $value); |
51 | 51 | }, |
52 | 52 | ] |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @return null|string |
84 | 84 | */ |
85 | - public function getClassForType(string $type):?string |
|
85 | + public function getClassForType(string $type): ?string |
|
86 | 86 | { |
87 | 87 | if (isset($this->typeMap[$type])) { |
88 | 88 | return $this->typeMap[$type]; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | { |
111 | 111 | $types = array_filter( |
112 | 112 | $this->typeMap, |
113 | - function ($val) use ($class) { |
|
113 | + function($val) use ($class) { |
|
114 | 114 | return $val === $class; |
115 | 115 | } |
116 | 116 | ); |
@@ -42,10 +42,10 @@ |
||
42 | 42 | protected function configure() |
43 | 43 | { |
44 | 44 | $this->setName('graphql:schema:export') |
45 | - ->setDescription('Export your schema.') |
|
46 | - ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
47 | - ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Name of the file to save the schema, e.i. schema.graphql or schema.json') |
|
48 | - ->addOption('json', null, InputOption::VALUE_NONE, 'Create json output, automatically used if the output contains json extension'); |
|
45 | + ->setDescription('Export your schema.') |
|
46 | + ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
47 | + ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Name of the file to save the schema, e.i. schema.graphql or schema.json') |
|
48 | + ->addOption('json', null, InputOption::VALUE_NONE, 'Create json output, automatically used if the output contains json extension'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -57,11 +57,11 @@ |
||
57 | 57 | protected function configure() |
58 | 58 | { |
59 | 59 | $this->setName('graphql:schema:snapshot') |
60 | - ->setDescription('Create a snapshot of your schema to compare using behat tests.') |
|
61 | - ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
62 | - ->addOption('all', 'a', InputOption::VALUE_NONE, 'Create snapshot for all registered endpoints') |
|
63 | - ->addOption('strict', null, InputOption::VALUE_NONE, 'When use strict mode the snapshot must be updated every time your schema change') |
|
64 | - ->addOption('features', null, InputOption::VALUE_REQUIRED, 'Path where should be located the generated features and fixtures'); |
|
60 | + ->setDescription('Create a snapshot of your schema to compare using behat tests.') |
|
61 | + ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
62 | + ->addOption('all', 'a', InputOption::VALUE_NONE, 'Create snapshot for all registered endpoints') |
|
63 | + ->addOption('strict', null, InputOption::VALUE_NONE, 'When use strict mode the snapshot must be updated every time your schema change') |
|
64 | + ->addOption('features', null, InputOption::VALUE_REQUIRED, 'Path where should be located the generated features and fixtures'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -239,7 +239,7 @@ |
||
239 | 239 | public function sendRequest($method, $uri, array $parameters = [], array $files = [], array $server = [], $content = null, $changeHistory = true) |
240 | 240 | { |
241 | 241 | set_error_handler( |
242 | - function ($level, $message, $errFile, $errLine) { |
|
242 | + function($level, $message, $errFile, $errLine) { |
|
243 | 243 | if ($this->deprecationAdviser) { |
244 | 244 | $this->deprecationAdviser->addWarning($message, $errFile, $errLine); |
245 | 245 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ->beforeNormalization() |
75 | 75 | ->ifString() |
76 | 76 | ->then( |
77 | - function ($v) { |
|
77 | + function($v) { |
|
78 | 78 | return [$v]; |
79 | 79 | } |
80 | 80 | ) |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | ->beforeNormalization() |
88 | 88 | ->ifString() |
89 | 89 | ->then( |
90 | - function ($v) { |
|
90 | + function($v) { |
|
91 | 91 | return [$v]; |
92 | 92 | } |
93 | 93 | ) |
94 | 94 | ->end() |
95 | 95 | ->validate() |
96 | 96 | ->ifTrue( |
97 | - function (array $value) { |
|
97 | + function(array $value) { |
|
98 | 98 | foreach ($value as $val) { |
99 | 99 | try { |
100 | 100 | preg_match($val, null); |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | ->beforeNormalization() |
112 | 112 | ->ifString() |
113 | 113 | ->then( |
114 | - function ($v) { |
|
114 | + function($v) { |
|
115 | 115 | return [$v]; |
116 | 116 | } |
117 | 117 | ) |
118 | 118 | ->end() |
119 | 119 | ->validate() |
120 | 120 | ->ifTrue( |
121 | - function (array $value) { |
|
121 | + function(array $value) { |
|
122 | 122 | foreach ($value as $val) { |
123 | 123 | try { |
124 | 124 | preg_match($val, null); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ->useAttributeAsKey('name') |
137 | 137 | ->validate() |
138 | 138 | ->ifTrue( |
139 | - function ($v) { |
|
139 | + function($v) { |
|
140 | 140 | return array_key_exists('default', $v); |
141 | 141 | } |
142 | 142 | )->thenInvalid('"default" can\'t be used as endpoint name, the system internally use this endpoint name to store the entire schema.') |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | ->beforeNormalization() |
149 | 149 | ->ifString() |
150 | 150 | ->then( |
151 | - function ($v) { |
|
151 | + function($v) { |
|
152 | 152 | return preg_split('/\s*,\s*/', $v); |
153 | 153 | } |
154 | 154 | ) |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | ->beforeNormalization() |
166 | 166 | ->ifString() |
167 | 167 | ->then( |
168 | - function ($v) { |
|
168 | + function($v) { |
|
169 | 169 | return preg_split('/\s*,\s*/', $v); |
170 | 170 | } |
171 | 171 | ) |
@@ -51,51 +51,51 @@ discard block |
||
51 | 51 | protected function configureSubscriptions(NodeBuilder $root) |
52 | 52 | { |
53 | 53 | $subscriptions = $root->arrayNode('subscriptions') |
54 | - ->info('Manage subscriptions settings') |
|
55 | - ->addDefaultsIfNotSet() |
|
56 | - ->children(); |
|
54 | + ->info('Manage subscriptions settings') |
|
55 | + ->addDefaultsIfNotSet() |
|
56 | + ->children(); |
|
57 | 57 | |
58 | 58 | $subscriptions->scalarNode('ttl')->defaultValue(Subscriber::DEFAULT_SUBSCRIPTION_TTL) |
59 | - ->info('Time to live for subscriptions. The subscription will be deleted after this time, a heartbeat is required to keep-alive'); |
|
59 | + ->info('Time to live for subscriptions. The subscription will be deleted after this time, a heartbeat is required to keep-alive'); |
|
60 | 60 | $subscriptions->scalarNode('mercure_hub')->defaultValue('default'); |
61 | 61 | $subscriptions->scalarNode('pubsub_handler')->defaultValue(RedisPubSubHandler::class); |
62 | 62 | $redis = $subscriptions->arrayNode('redis')->info('Configure redis server to use as subscription handler') |
63 | - ->addDefaultsIfNotSet() |
|
64 | - ->children(); |
|
63 | + ->addDefaultsIfNotSet() |
|
64 | + ->children(); |
|
65 | 65 | |
66 | 66 | $redis->scalarNode('host')->defaultValue('localhost'); |
67 | 67 | $redis->integerNode('port')->defaultValue(6379); |
68 | 68 | $redis->scalarNode('prefix')->defaultValue('GraphQLSubscription:') |
69 | - ->info('Define custom prefix to avoid collisions between applications'); |
|
69 | + ->info('Define custom prefix to avoid collisions between applications'); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | protected function configureErrorHandling(NodeBuilder $root) |
73 | 73 | { |
74 | 74 | $errorHandling = $root->arrayNode('error_handling') |
75 | - ->info('It is important to handle errors and when possible, report these errors back to your users for information. ') |
|
76 | - ->addDefaultsIfNotSet() |
|
77 | - ->children(); |
|
75 | + ->info('It is important to handle errors and when possible, report these errors back to your users for information. ') |
|
76 | + ->addDefaultsIfNotSet() |
|
77 | + ->children(); |
|
78 | 78 | |
79 | 79 | $errorHandling->enumNode('validation_messages') |
80 | - ->values(['error', 'payload', 'both']) |
|
81 | - ->info('Where should be displayed validation messages.') |
|
82 | - ->defaultValue('error'); |
|
80 | + ->values(['error', 'payload', 'both']) |
|
81 | + ->info('Where should be displayed validation messages.') |
|
82 | + ->defaultValue('error'); |
|
83 | 83 | |
84 | 84 | //@deprecated since v1.1 snd should be deleted in 2.0, this is a compatibility flag |
85 | 85 | $errorHandling->booleanNode('jwt_auth_failure_compatibility') |
86 | - ->info('Keep BC with oldest version of JWT Authentication errors') |
|
87 | - ->setDeprecated('Since v1.1 and will will be removed in the next mayor release') |
|
88 | - ->defaultFalse(); |
|
86 | + ->info('Keep BC with oldest version of JWT Authentication errors') |
|
87 | + ->setDeprecated('Since v1.1 and will will be removed in the next mayor release') |
|
88 | + ->defaultFalse(); |
|
89 | 89 | |
90 | 90 | $errorHandling->booleanNode('show_trace')->info('Show error trace in debug mode')->defaultFalse(); |
91 | 91 | |
92 | 92 | $errorHandling->scalarNode('formatter') |
93 | - ->info('Formatter is responsible for converting instances of Error to an array') |
|
94 | - ->defaultValue(DefaultErrorFormatter::class); |
|
93 | + ->info('Formatter is responsible for converting instances of Error to an array') |
|
94 | + ->defaultValue(DefaultErrorFormatter::class); |
|
95 | 95 | |
96 | 96 | $errorHandling->scalarNode('handler') |
97 | - ->info('Handler is useful for error filtering and logging.') |
|
98 | - ->defaultValue(DefaultErrorHandler::class); |
|
97 | + ->info('Handler is useful for error filtering and logging.') |
|
98 | + ->defaultValue(DefaultErrorHandler::class); |
|
99 | 99 | |
100 | 100 | $controlledErrors = $errorHandling |
101 | 101 | ->arrayNode('controlled_errors') |
@@ -181,44 +181,44 @@ discard block |
||
181 | 181 | protected function configureEndpoints(NodeBuilder $root) |
182 | 182 | { |
183 | 183 | $endpoints = $root->arrayNode('endpoints') |
184 | - ->useAttributeAsKey('name') |
|
185 | - ->validate() |
|
186 | - ->ifTrue( |
|
187 | - function ($v) { |
|
188 | - return array_key_exists('default', $v); |
|
189 | - } |
|
190 | - )->thenInvalid('"default" can\'t be used as endpoint name, the system internally use this endpoint name to store the entire schema.') |
|
191 | - ->end() |
|
192 | - ->arrayPrototype() |
|
193 | - ->children(); |
|
184 | + ->useAttributeAsKey('name') |
|
185 | + ->validate() |
|
186 | + ->ifTrue( |
|
187 | + function ($v) { |
|
188 | + return array_key_exists('default', $v); |
|
189 | + } |
|
190 | + )->thenInvalid('"default" can\'t be used as endpoint name, the system internally use this endpoint name to store the entire schema.') |
|
191 | + ->end() |
|
192 | + ->arrayPrototype() |
|
193 | + ->children(); |
|
194 | 194 | |
195 | 195 | $endpoints->arrayNode('roles') |
196 | - ->beforeNormalization() |
|
197 | - ->ifString() |
|
198 | - ->then( |
|
199 | - function ($v) { |
|
200 | - return preg_split('/\s*,\s*/', $v); |
|
201 | - } |
|
202 | - ) |
|
203 | - ->end() |
|
204 | - ->prototype('scalar') |
|
205 | - ->end(); |
|
196 | + ->beforeNormalization() |
|
197 | + ->ifString() |
|
198 | + ->then( |
|
199 | + function ($v) { |
|
200 | + return preg_split('/\s*,\s*/', $v); |
|
201 | + } |
|
202 | + ) |
|
203 | + ->end() |
|
204 | + ->prototype('scalar') |
|
205 | + ->end(); |
|
206 | 206 | |
207 | 207 | $endpoints->scalarNode('host')->example('^api\.backend\.'); |
208 | 208 | $endpoints->scalarNode('path')->example('/backend'); |
209 | 209 | |
210 | 210 | $root->arrayNode('endpoint_alias') |
211 | - ->info('Use alias to refer to multiple endpoints using only one name') |
|
212 | - ->useAttributeAsKey('name') |
|
213 | - ->beforeNormalization() |
|
214 | - ->ifString() |
|
215 | - ->then( |
|
216 | - function ($v) { |
|
217 | - return preg_split('/\s*,\s*/', $v); |
|
218 | - } |
|
219 | - ) |
|
220 | - ->end() |
|
221 | - ->variablePrototype(); |
|
211 | + ->info('Use alias to refer to multiple endpoints using only one name') |
|
212 | + ->useAttributeAsKey('name') |
|
213 | + ->beforeNormalization() |
|
214 | + ->ifString() |
|
215 | + ->then( |
|
216 | + function ($v) { |
|
217 | + return preg_split('/\s*,\s*/', $v); |
|
218 | + } |
|
219 | + ) |
|
220 | + ->end() |
|
221 | + ->variablePrototype(); |
|
222 | 222 | |
223 | 223 | $root->scalarNode('endpoint_default')->info('Endpoint to apply to all definitions without explicit endpoint.'); |
224 | 224 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $graphiql = $root->arrayNode('graphiql')->addDefaultsIfNotSet()->children(); |
230 | 230 | |
231 | 231 | $graphiql->scalarNode('title') |
232 | - ->defaultValue('GraphQL API Explorer'); |
|
232 | + ->defaultValue('GraphQL API Explorer'); |
|
233 | 233 | |
234 | 234 | $graphiql |
235 | 235 | ->scalarNode('data_warning_message') |
@@ -257,61 +257,61 @@ discard block |
||
257 | 257 | ->defaultFalse(); |
258 | 258 | |
259 | 259 | $authentication->scalarNode('login_message') |
260 | - ->defaultValue('Start exploring GraphQL API queries using your account’s data now.'); |
|
260 | + ->defaultValue('Start exploring GraphQL API queries using your account’s data now.'); |
|
261 | 261 | |
262 | 262 | $authenticationProvider = $authentication->arrayNode('provider')->children(); |
263 | 263 | |
264 | 264 | //the updated version of `jwt` to use lexik authentication bundle |
265 | 265 | $lexikJwt = $authenticationProvider->arrayNode('lexik_jwt') |
266 | - ->canBeEnabled() |
|
267 | - ->children(); |
|
266 | + ->canBeEnabled() |
|
267 | + ->children(); |
|
268 | 268 | |
269 | 269 | $lexikJwt->scalarNode('user_provider') |
270 | - ->isRequired() |
|
271 | - ->info('Name of the user provider to use'); |
|
270 | + ->isRequired() |
|
271 | + ->info('Name of the user provider to use'); |
|
272 | 272 | |
273 | 273 | $lexikJwt->scalarNode('username_label') |
274 | - ->defaultValue('Username'); |
|
274 | + ->defaultValue('Username'); |
|
275 | 275 | |
276 | 276 | $lexikJwt->scalarNode('password_label') |
277 | - ->defaultValue('Password'); |
|
277 | + ->defaultValue('Password'); |
|
278 | 278 | |
279 | 279 | $authenticationProvider->scalarNode('custom') |
280 | - ->defaultNull() |
|
281 | - ->info('Configure custom service to use as authentication provider'); |
|
280 | + ->defaultNull() |
|
281 | + ->info('Configure custom service to use as authentication provider'); |
|
282 | 282 | |
283 | 283 | //deprecated since v1.1 and should be deleted in v2.0 |
284 | 284 | $jwt = $authenticationProvider->arrayNode('jwt') |
285 | - ->setDeprecated('Use lexik_jwt instead, this provider will be removed in the next mayor release.') |
|
286 | - ->canBeEnabled() |
|
287 | - ->children(); |
|
285 | + ->setDeprecated('Use lexik_jwt instead, this provider will be removed in the next mayor release.') |
|
286 | + ->canBeEnabled() |
|
287 | + ->children(); |
|
288 | 288 | |
289 | 289 | $jwtLogin = $jwt->arrayNode('login')->children(); |
290 | 290 | |
291 | 291 | $jwtLogin->scalarNode('url') |
292 | - ->info('Route name or URI to make the login process to retrieve the token.') |
|
293 | - ->isRequired(); |
|
292 | + ->info('Route name or URI to make the login process to retrieve the token.') |
|
293 | + ->isRequired(); |
|
294 | 294 | |
295 | 295 | $jwtLogin->scalarNode('username_parameter') |
296 | - ->defaultValue('username'); |
|
296 | + ->defaultValue('username'); |
|
297 | 297 | |
298 | 298 | $jwtLogin->scalarNode('username_label') |
299 | - ->defaultValue('Username'); |
|
299 | + ->defaultValue('Username'); |
|
300 | 300 | |
301 | 301 | $jwtLogin->scalarNode('password_parameter') |
302 | - ->defaultValue('password'); |
|
302 | + ->defaultValue('password'); |
|
303 | 303 | |
304 | 304 | $jwtLogin->scalarNode('password_label') |
305 | - ->defaultValue('Password'); |
|
305 | + ->defaultValue('Password'); |
|
306 | 306 | |
307 | 307 | $jwtLogin->enumNode('parameters_in') |
308 | - ->values(['form', 'query', 'header']) |
|
309 | - ->info('How pass parameters to request the token') |
|
310 | - ->defaultValue('form'); |
|
308 | + ->values(['form', 'query', 'header']) |
|
309 | + ->info('How pass parameters to request the token') |
|
310 | + ->defaultValue('form'); |
|
311 | 311 | |
312 | 312 | $jwtLogin->scalarNode('response_token_path') |
313 | - ->defaultValue('token') |
|
314 | - ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.'); |
|
313 | + ->defaultValue('token') |
|
314 | + ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.'); |
|
315 | 315 | |
316 | 316 | $jwtRequests = $jwt->arrayNode('requests')->addDefaultsIfNotSet()->children(); |
317 | 317 | |
@@ -350,25 +350,25 @@ discard block |
||
350 | 350 | { |
351 | 351 | $pagination = $root->arrayNode('pagination')->addDefaultsIfNotSet()->children(); |
352 | 352 | $pagination->integerNode('limit') |
353 | - ->defaultValue(100)->info('Maximum limit allowed for all paginations'); |
|
353 | + ->defaultValue(100)->info('Maximum limit allowed for all paginations'); |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | protected function configurePluginNamespaceGlobalConfig(NodeBuilder $root) |
357 | 357 | { |
358 | 358 | $namespaces = $root->arrayNode('namespaces') |
359 | - ->info( |
|
360 | - 'Group GraphQL schema using namespaced schemas. |
|
359 | + ->info( |
|
360 | + 'Group GraphQL schema using namespaced schemas. |
|
361 | 361 | On large schemas is helpful to keep schemas grouped by bundle and node' |
362 | - ) |
|
363 | - ->canBeEnabled() |
|
364 | - ->addDefaultsIfNotSet() |
|
365 | - ->children(); |
|
362 | + ) |
|
363 | + ->canBeEnabled() |
|
364 | + ->addDefaultsIfNotSet() |
|
365 | + ->children(); |
|
366 | 366 | |
367 | 367 | $bundles = $namespaces->arrayNode('bundles') |
368 | - ->info('Group each bundle into a separate schema definition') |
|
369 | - ->canBeDisabled() |
|
370 | - ->addDefaultsIfNotSet() |
|
371 | - ->children(); |
|
368 | + ->info('Group each bundle into a separate schema definition') |
|
369 | + ->canBeDisabled() |
|
370 | + ->addDefaultsIfNotSet() |
|
371 | + ->children(); |
|
372 | 372 | |
373 | 373 | $bundles->scalarNode('query_suffix') |
374 | 374 | ->info('The following suffix will be used for bundle query groups') |
@@ -403,29 +403,29 @@ discard block |
||
403 | 403 | ->children(); |
404 | 404 | |
405 | 405 | $nodes->scalarNode('query_suffix') |
406 | - ->info('The following suffix will be used to create the name for queries to the same node') |
|
407 | - ->defaultValue('Query'); |
|
406 | + ->info('The following suffix will be used to create the name for queries to the same node') |
|
407 | + ->defaultValue('Query'); |
|
408 | 408 | |
409 | 409 | $nodes->scalarNode('mutation_suffix') |
410 | - ->info('The following suffix will be used to create the name for mutations to the same node') |
|
411 | - ->defaultValue('Mutation'); |
|
410 | + ->info('The following suffix will be used to create the name for mutations to the same node') |
|
411 | + ->defaultValue('Mutation'); |
|
412 | 412 | |
413 | 413 | $nodes->scalarNode('subscription_suffix') |
414 | - ->info('The following suffix will be used to create the name for subscriptions to the same node') |
|
415 | - ->defaultValue('Subscriptions'); |
|
414 | + ->info('The following suffix will be used to create the name for subscriptions to the same node') |
|
415 | + ->defaultValue('Subscriptions'); |
|
416 | 416 | |
417 | 417 | $nodes->variableNode('ignore') |
418 | - ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation') |
|
419 | - ->defaultValue(['Node']); |
|
418 | + ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation') |
|
419 | + ->defaultValue(['Node']); |
|
420 | 420 | |
421 | 421 | $nodes->arrayNode('aliases') |
422 | - ->info( |
|
423 | - 'Define aliases for nodes to set definitions inside other desired node name. |
|
422 | + ->info( |
|
423 | + 'Define aliases for nodes to set definitions inside other desired node name. |
|
424 | 424 | Can be used to group multiple nodes or publish a node with a different group name' |
425 | - ) |
|
426 | - ->example('InvoiceItem: Invoice') |
|
427 | - ->useAttributeAsKey('name') |
|
428 | - ->prototype('scalar'); |
|
425 | + ) |
|
426 | + ->example('InvoiceItem: Invoice') |
|
427 | + ->useAttributeAsKey('name') |
|
428 | + ->prototype('scalar'); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | private function configureSecurity(NodeBuilder $rootNode) |
@@ -471,13 +471,13 @@ discard block |
||
471 | 471 | ->children(); |
472 | 472 | |
473 | 473 | $bcNode->variableNode('filters') |
474 | - ->info('Keep deprecated "filters" argument in collections') |
|
475 | - ->setDeprecated('v1.2') |
|
476 | - ->defaultFalse(); |
|
474 | + ->info('Keep deprecated "filters" argument in collections') |
|
475 | + ->setDeprecated('v1.2') |
|
476 | + ->defaultFalse(); |
|
477 | 477 | |
478 | 478 | $bcNode->variableNode('orderBy') |
479 | - ->info('Keep deprecated "orderBy" argument in collections') |
|
480 | - ->setDeprecated('v1.2') |
|
481 | - ->defaultFalse(); |
|
479 | + ->info('Keep deprecated "orderBy" argument in collections') |
|
480 | + ->setDeprecated('v1.2') |
|
481 | + ->defaultFalse(); |
|
482 | 482 | } |
483 | 483 | } |
@@ -46,9 +46,9 @@ |
||
46 | 46 | |
47 | 47 | $styleGuide = new TableStyle(); |
48 | 48 | $styleGuide->setHorizontalBorderChar('') |
49 | - ->setVerticalBorderChar('|') |
|
50 | - ->setCrossingChar(' ') |
|
51 | - ->setCellHeaderFormat('%s'); |
|
49 | + ->setVerticalBorderChar('|') |
|
50 | + ->setCrossingChar(' ') |
|
51 | + ->setCellHeaderFormat('%s'); |
|
52 | 52 | |
53 | 53 | $table->setStyle($styleGuide); |
54 | 54 | $table->setRows($rows); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | $table = new Table($output); |
37 | 37 | $table->setHeaders(['Code', 'Text', 'Description']) |
38 | - ->setRows($rows); |
|
38 | + ->setRows($rows); |
|
39 | 39 | $table->render(); |
40 | 40 | } |
41 | 41 | } |