Completed
Push — master ( 7a107a...5cd32c )
by Rafael
04:36
created
src/Query/Node/Nodes.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Resolver/DeferredBuffer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Test/ApiTestCase.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -216,10 +216,10 @@
 block discarded – undo
216 216
 
217 217
         if ($node instanceof NodeInterface) {
218 218
             $nodeType = static::getClient()
219
-                              ->getContainer()
220
-                              ->get(DefinitionRegistry::class)
221
-                              ->getEndpoint()
222
-                              ->getTypeForClass(ClassUtils::getClass($node));
219
+                                ->getContainer()
220
+                                ->get(DefinitionRegistry::class)
221
+                                ->getEndpoint()
222
+                                ->getTypeForClass(ClassUtils::getClass($node));
223 223
 
224 224
             $node = $node->getId();
225 225
         }
Please login to merge, or discard this patch.
src/Test/Helper/DoctrineHelperTrait.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
         $id = ID::createFromString($id);
52 52
         $databaseId = $id->getDatabaseId();
53 53
         $class = static::getClient()
54
-                       ->getContainer()
55
-                       ->get(DefinitionRegistry::class)
56
-                       ->getEndpoint()
57
-                       ->getClassForType($id->getNodeType());
54
+                        ->getContainer()
55
+                        ->get(DefinitionRegistry::class)
56
+                        ->getEndpoint()
57
+                        ->getClassForType($id->getNodeType());
58 58
 
59 59
         return static::getRepository($class)->find($databaseId);
60 60
     }
Please login to merge, or discard this patch.
src/Query/Node/AllNodesWithPagination.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,10 +207,10 @@
 block discarded – undo
207 207
         $paramName = 'root'.mt_rand();
208 208
         if ($this->queryDefinition->getMeta('pagination')['parent_relation'] === PaginationDefinitionPlugin::MANY_TO_MANY) {
209 209
             $qb->andWhere(sprintf(':%s MEMBER OF %s.%s', $paramName, $this->queryAlias, $parentField))
210
-               ->setParameter($paramName, $root);
210
+                ->setParameter($paramName, $root);
211 211
         } else {
212 212
             $qb->andWhere(sprintf('%s.%s = :%s', $this->queryAlias, $parentField, $paramName))
213
-               ->setParameter($paramName, $root);
213
+                ->setParameter($paramName, $root);
214 214
         }
215 215
     }
216 216
 }
Please login to merge, or discard this patch.
src/Command/GraphQLPluginOptionsCommand.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@
 block discarded – undo
31 31
     protected function configure()
32 32
     {
33 33
         $this->setName('graphql:plugins')
34
-             ->setDescription('Expose all available options for one or all graphql plugins')
35
-             ->addArgument('plugin', InputArgument::OPTIONAL, 'Show only options for given plugin');
34
+                ->setDescription('Expose all available options for one or all graphql plugins')
35
+                ->addArgument('plugin', InputArgument::OPTIONAL, 'Show only options for given plugin');
36 36
     }
37 37
 
38 38
     /**
Please login to merge, or discard this patch.
src/Definition/Plugin/PaginationDefinitionPlugin.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,15 +65,15 @@
 block discarded – undo
65 65
 
66 66
         /** @var NodeBuilder $rootNode */
67 67
         $config->scalarNode('target')
68
-               ->info('Target node to properly paginate. If is possible will be auto-resolved using naming conventions')
69
-               ->isRequired();
68
+                ->info('Target node to properly paginate. If is possible will be auto-resolved using naming conventions')
69
+                ->isRequired();
70 70
         $config->integerNode('limit')->info('Max number of records allowed for first & last')->defaultValue($this->limit);
71 71
         $config->scalarNode('parent_field')
72
-               ->info('When is used in sub-fields should be the field to filter by parent instance');
72
+                ->info('When is used in sub-fields should be the field to filter by parent instance');
73 73
         $config->enumNode('parent_relation')
74
-               ->info('When is used in sub-fields should be the type of relation with the parent field')
75
-               ->defaultValue(self::ONE_TO_MANY)
76
-               ->values([self::ONE_TO_MANY, self::MANY_TO_MANY]);
74
+                ->info('When is used in sub-fields should be the type of relation with the parent field')
75
+                ->defaultValue(self::ONE_TO_MANY)
76
+                ->values([self::ONE_TO_MANY, self::MANY_TO_MANY]);
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
src/Definition/Plugin/MutationFormResolverPlugin.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,22 +67,22 @@
 block discarded – undo
67 67
             ->children();
68 68
 
69 69
         $config->variableNode('type')
70
-               ->defaultNull()
71
-               ->info(
72
-                   'Specify the form type to use,
70
+                ->defaultNull()
71
+                ->info(
72
+                    'Specify the form type to use,
73 73
 [string] Name of the form type to use
74 74
 [true|null] The form will be automatically resolved to ...Bundle\Form\Input\{Node}\{MutationName}Input.
75 75
 [true] Throw a exception if the form can`t be located
76 76
 [false] The form is not required and should not be resolved'
77
-               );
77
+                );
78 78
         $config->variableNode('options')->defaultValue([])->info('Form options');
79 79
         $config->variableNode('argument')
80
-               ->defaultValue('input')
81
-               ->info('Name of the argument to use as input');
80
+                ->defaultValue('input')
81
+                ->info('Name of the argument to use as input');
82 82
 
83 83
         $config->booleanNode('client_mutation_id')
84
-               ->defaultTrue()
85
-               ->info('Automatically add a field called clientMutationId');
84
+                ->defaultTrue()
85
+                ->info('Automatically add a field called clientMutationId');
86 86
     }
87 87
 
88 88
     /**
Please login to merge, or discard this patch.
src/DependencyInjection/Configuration.php 1 patch
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -42,44 +42,44 @@  discard block
 block discarded – undo
42 42
     protected function configureEndpoints(NodeBuilder $root)
43 43
     {
44 44
         $endpoints = $root->arrayNode('endpoints')
45
-                          ->useAttributeAsKey('name')
46
-                          ->validate()
47
-                          ->ifTrue(
48
-                              function ($v) {
49
-                                  return array_key_exists('default', $v);
50
-                              }
51
-                          )->thenInvalid('"default" can\'t be used as endpoint name, the system internally use this endpoint name to store the entire schema.')
52
-                          ->end()
53
-                          ->arrayPrototype()
54
-                          ->children();
45
+                            ->useAttributeAsKey('name')
46
+                            ->validate()
47
+                            ->ifTrue(
48
+                                function ($v) {
49
+                                    return array_key_exists('default', $v);
50
+                                }
51
+                            )->thenInvalid('"default" can\'t be used as endpoint name, the system internally use this endpoint name to store the entire schema.')
52
+                            ->end()
53
+                            ->arrayPrototype()
54
+                            ->children();
55 55
 
56 56
         $endpoints->arrayNode('roles')
57
-                  ->beforeNormalization()
58
-                  ->ifString()
59
-                  ->then(
60
-                      function ($v) {
61
-                          return preg_split('/\s*,\s*/', $v);
62
-                      }
63
-                  )
64
-                  ->end()
65
-                  ->prototype('scalar')
66
-                  ->end();
57
+                    ->beforeNormalization()
58
+                    ->ifString()
59
+                    ->then(
60
+                        function ($v) {
61
+                            return preg_split('/\s*,\s*/', $v);
62
+                        }
63
+                    )
64
+                    ->end()
65
+                    ->prototype('scalar')
66
+                    ->end();
67 67
 
68 68
         $endpoints->scalarNode('host')->example('^api\.backend\.');
69 69
         $endpoints->scalarNode('path')->example('/backend');
70 70
 
71 71
         $root->arrayNode('endpoint_alias')
72
-             ->info('Use alias to refer to multiple endpoints using only one name')
73
-             ->useAttributeAsKey('name')
74
-             ->beforeNormalization()
75
-             ->ifString()
76
-             ->then(
77
-                 function ($v) {
78
-                     return preg_split('/\s*,\s*/', $v);
79
-                 }
80
-             )
81
-             ->end()
82
-             ->variablePrototype();
72
+                ->info('Use alias to refer to multiple endpoints using only one name')
73
+                ->useAttributeAsKey('name')
74
+                ->beforeNormalization()
75
+                ->ifString()
76
+                ->then(
77
+                    function ($v) {
78
+                        return preg_split('/\s*,\s*/', $v);
79
+                    }
80
+                )
81
+                ->end()
82
+                ->variablePrototype();
83 83
 
84 84
         $root->scalarNode('endpoint_default')->info('Endpoint to apply to all definitions without explicit endpoint.');
85 85
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $graphiql = $root->arrayNode('graphiql')->addDefaultsIfNotSet()->children();
91 91
 
92 92
         $graphiql->scalarNode('title')
93
-                 ->defaultValue('GraphQL API Explorer');
93
+                    ->defaultValue('GraphQL API Explorer');
94 94
 
95 95
         $graphiql
96 96
             ->scalarNode('data_warning_message')
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $graphiql->enumNode('data_warning_style')->values(['info', 'warning', 'danger'])->defaultValue('danger');
100 100
 
101 101
         $graphiql->scalarNode('template')
102
-                 ->defaultValue('@YnloGraphQL/explorer.html.twig');
102
+                    ->defaultValue('@YnloGraphQL/explorer.html.twig');
103 103
 
104 104
         $authentication = $graphiql->arrayNode('authentication')->addDefaultsIfNotSet()->children();
105 105
         $authentication
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             ->defaultFalse();
112 112
 
113 113
         $authentication->scalarNode('login_message')
114
-                       ->defaultValue('Start exploring GraphQL API queries using your account’s data now.');
114
+                        ->defaultValue('Start exploring GraphQL API queries using your account’s data now.');
115 115
 
116 116
         $authenticationProvider = $authentication->arrayNode('provider')->children();
117 117
 
@@ -120,29 +120,29 @@  discard block
 block discarded – undo
120 120
         $jwtLogin = $jwt->arrayNode('login')->children();
121 121
 
122 122
         $jwtLogin->scalarNode('url')
123
-                 ->info('Route name or URI to make the login process to retrieve the token.')
124
-                 ->isRequired();
123
+                    ->info('Route name or URI to make the login process to retrieve the token.')
124
+                    ->isRequired();
125 125
 
126 126
         $jwtLogin->scalarNode('username_parameter')
127
-                 ->defaultValue('username');
127
+                    ->defaultValue('username');
128 128
 
129 129
         $jwtLogin->scalarNode('username_label')
130
-                 ->defaultValue('Username');
130
+                    ->defaultValue('Username');
131 131
 
132 132
         $jwtLogin->scalarNode('password_parameter')
133
-                 ->defaultValue('password');
133
+                    ->defaultValue('password');
134 134
 
135 135
         $jwtLogin->scalarNode('password_label')
136
-                 ->defaultValue('Password');
136
+                    ->defaultValue('Password');
137 137
 
138 138
         $jwtLogin->enumNode('parameters_in')
139
-                 ->values(['form', 'query', 'header'])
140
-                 ->info('How pass parameters to request the token')
141
-                 ->defaultValue('form');
139
+                    ->values(['form', 'query', 'header'])
140
+                    ->info('How pass parameters to request the token')
141
+                    ->defaultValue('form');
142 142
 
143 143
         $jwtLogin->scalarNode('response_token_path')
144
-                 ->defaultValue('token')
145
-                 ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.');
144
+                    ->defaultValue('token')
145
+                    ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.');
146 146
 
147 147
         $jwtRequests = $jwt->arrayNode('requests')->addDefaultsIfNotSet()->children();
148 148
 
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
                     ->info('Customize how the token should be send,  use the place holder {token} to replace for current token');
161 161
 
162 162
         $authenticationProvider->scalarNode('custom')
163
-                               ->defaultNull()
164
-                               ->info('Configure custom service to use as authentication provider');
163
+                                ->defaultNull()
164
+                                ->info('Configure custom service to use as authentication provider');
165 165
     }
166 166
 
167 167
     protected function configureCORS(NodeBuilder $root)
@@ -187,25 +187,25 @@  discard block
 block discarded – undo
187 187
     {
188 188
         $pagination = $root->arrayNode('pagination')->addDefaultsIfNotSet()->children();
189 189
         $pagination->integerNode('limit')
190
-                   ->defaultValue(100)->info('Maximum limit allowed for all paginations');
190
+                    ->defaultValue(100)->info('Maximum limit allowed for all paginations');
191 191
     }
192 192
 
193 193
     protected function configurePluginNamespaceGlobalConfig(NodeBuilder $root)
194 194
     {
195 195
         $namespaces = $root->arrayNode('namespaces')
196
-                           ->info(
197
-                               'Group GraphQL schema using namespaced schemas. 
196
+                            ->info(
197
+                                'Group GraphQL schema using namespaced schemas. 
198 198
 On large schemas is  helpful to keep schemas grouped by bundle and node'
199
-                           )
200
-                           ->canBeEnabled()
201
-                           ->addDefaultsIfNotSet()
202
-                           ->children();
199
+                            )
200
+                            ->canBeEnabled()
201
+                            ->addDefaultsIfNotSet()
202
+                            ->children();
203 203
 
204 204
         $bundles = $namespaces->arrayNode('bundles')
205
-                              ->info('Group each bundle into a separate schema definition')
206
-                              ->canBeDisabled()
207
-                              ->addDefaultsIfNotSet()
208
-                              ->children();
205
+                                ->info('Group each bundle into a separate schema definition')
206
+                                ->canBeDisabled()
207
+                                ->addDefaultsIfNotSet()
208
+                                ->children();
209 209
 
210 210
         $bundles->scalarNode('query_suffix')
211 211
                 ->info('The following suffix will be used for bundle query groups')
@@ -236,25 +236,25 @@  discard block
 block discarded – undo
236 236
                             ->children();
237 237
 
238 238
         $nodes->scalarNode('query_suffix')
239
-              ->info('The following suffix will be used to create the name for queries to the same node')
240
-              ->defaultValue('Query');
239
+                ->info('The following suffix will be used to create the name for queries to the same node')
240
+                ->defaultValue('Query');
241 241
 
242 242
         $nodes->scalarNode('mutation_suffix')
243
-              ->info('The following suffix will be used to create the name for mutations to the same node')
244
-              ->defaultValue('Mutation');
243
+                ->info('The following suffix will be used to create the name for mutations to the same node')
244
+                ->defaultValue('Mutation');
245 245
 
246 246
         $nodes->variableNode('ignore')
247
-              ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation')
248
-              ->defaultValue(['Node']);
247
+                ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation')
248
+                ->defaultValue(['Node']);
249 249
 
250 250
         $nodes->arrayNode('aliases')
251
-              ->info(
252
-                  'Define aliases for nodes to set definitions inside other desired node name. 
251
+                ->info(
252
+                    'Define aliases for nodes to set definitions inside other desired node name. 
253 253
 Can be used to group multiple nodes or publish a node with a different group name'
254
-              )
255
-              ->example('InvoiceItem: Invoice')
256
-              ->useAttributeAsKey('name')
257
-              ->prototype('scalar');
254
+                )
255
+                ->example('InvoiceItem: Invoice')
256
+                ->useAttributeAsKey('name')
257
+                ->prototype('scalar');
258 258
     }
259 259
 
260 260
     private function configureSecurity(NodeBuilder $rootNode)
Please login to merge, or discard this patch.