Passed
Pull Request — master (#5)
by Yonel Ceruto
08:14
created
src/Definition/Extension/MutationFormResolverExtension.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/Definition/Extension/PaginationDefinitionExtension.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/Query/Node/AllNodesWithPagination.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,10 +129,10 @@
 block discarded – undo
129 129
         $paramName = 'root'.mt_rand();
130 130
         if ($this->queryDefinition->getMeta('pagination')['parent_relation'] === PaginationDefinitionExtension::MANY_TO_MANY) {
131 131
             $qb->andWhere(sprintf(':%s MEMBER OF %s.%s', $paramName, $this->queryAlias, $parentField))
132
-               ->setParameter($paramName, $root);
132
+                ->setParameter($paramName, $root);
133 133
         } else {
134 134
             $qb->andWhere(sprintf('%s.%s = :%s', $this->queryAlias, $parentField, $paramName))
135
-               ->setParameter($paramName, $root);
135
+                ->setParameter($paramName, $root);
136 136
         }
137 137
     }
138 138
 }
Please login to merge, or discard this patch.
src/Command/DefinitionOptionsCommand.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: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
     /**
Please login to merge, or discard this patch.
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/DependencyInjection/Configuration.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $graphiql = $root->arrayNode('graphiql')->addDefaultsIfNotSet()->children();
44 44
 
45 45
         $graphiql->scalarNode('title')
46
-                 ->defaultValue('GraphQL API Explorer');
46
+                    ->defaultValue('GraphQL API Explorer');
47 47
 
48 48
         $graphiql
49 49
             ->scalarNode('data_warning_message')
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $graphiql->enumNode('data_warning_style')->values(['info', 'warning', 'danger'])->defaultValue('danger');
53 53
 
54 54
         $graphiql->scalarNode('template')
55
-                 ->defaultValue('@YnloGraphQL/explorer.twig');
55
+                    ->defaultValue('@YnloGraphQL/explorer.twig');
56 56
 
57 57
         $authentication = $graphiql->arrayNode('authentication')->addDefaultsIfNotSet()->children();
58 58
         $authentication
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             ->defaultFalse();
65 65
 
66 66
         $authentication->scalarNode('login_message')
67
-                       ->defaultValue('Start exploring GraphQL API queries using your account’s data now.');
67
+                        ->defaultValue('Start exploring GraphQL API queries using your account’s data now.');
68 68
 
69 69
         $authenticationProvider = $authentication->arrayNode('provider')->children();
70 70
 
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
         $jwtLogin = $jwt->arrayNode('login')->children();
74 74
 
75 75
         $jwtLogin->scalarNode('url')
76
-                 ->info('Route name or URI to make the login process to retrieve the token.')
77
-                 ->isRequired();
76
+                    ->info('Route name or URI to make the login process to retrieve the token.')
77
+                    ->isRequired();
78 78
 
79 79
         $jwtLogin->scalarNode('username_parameter')
80
-                 ->defaultValue('username');
80
+                    ->defaultValue('username');
81 81
 
82 82
         $jwtLogin->scalarNode('password_parameter')
83
-                 ->defaultValue('password');
83
+                    ->defaultValue('password');
84 84
 
85 85
         $jwtLogin->enumNode('parameters_in')
86
-                 ->values(['form', 'query', 'header'])
87
-                 ->info('How pass parameters to request the token')
88
-                 ->defaultValue('form');
86
+                    ->values(['form', 'query', 'header'])
87
+                    ->info('How pass parameters to request the token')
88
+                    ->defaultValue('form');
89 89
 
90 90
         $jwtLogin->scalarNode('response_token_path')
91
-                 ->defaultValue('token')
92
-                 ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.');
91
+                    ->defaultValue('token')
92
+                    ->info('Where the token should be located in the response in case of JSON, set null if the response is the token.');
93 93
 
94 94
         $jwtRequests = $jwt->arrayNode('requests')->addDefaultsIfNotSet()->children();
95 95
 
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
                     ->info('Customize how the token should be send,  use the place holder {token} to replace for current token');
108 108
 
109 109
         $authenticationProvider->scalarNode('custom')
110
-                               ->defaultNull()
111
-                               ->info('Configure custom service to use as authentication provider');
110
+                                ->defaultNull()
111
+                                ->info('Configure custom service to use as authentication provider');
112 112
     }
113 113
 
114 114
     protected function configureCORS(NodeBuilder $root)
@@ -134,25 +134,25 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $pagination = $root->arrayNode('pagination')->addDefaultsIfNotSet()->children();
136 136
         $pagination->integerNode('limit')
137
-                   ->defaultValue(100)->info('Maximum limit allowed for all paginations');
137
+                    ->defaultValue(100)->info('Maximum limit allowed for all paginations');
138 138
     }
139 139
 
140 140
     protected function configureExtensionNamespace(NodeBuilder $root)
141 141
     {
142 142
         $namespaces = $root->arrayNode('namespaces')
143
-                           ->info(
144
-                               'Group GraphQL schema using namespaced schemas. 
143
+                            ->info(
144
+                                'Group GraphQL schema using namespaced schemas. 
145 145
 On large schemas is  helpful to keep schemas grouped by bundle and node'
146
-                           )
147
-                           ->canBeEnabled()
148
-                           ->addDefaultsIfNotSet()
149
-                           ->children();
146
+                            )
147
+                            ->canBeEnabled()
148
+                            ->addDefaultsIfNotSet()
149
+                            ->children();
150 150
 
151 151
         $bundles = $namespaces->arrayNode('bundles')
152
-                              ->info('Group each bundle into a separate schema definition')
153
-                              ->canBeDisabled()
154
-                              ->addDefaultsIfNotSet()
155
-                              ->children();
152
+                                ->info('Group each bundle into a separate schema definition')
153
+                                ->canBeDisabled()
154
+                                ->addDefaultsIfNotSet()
155
+                                ->children();
156 156
 
157 157
         $bundles->scalarNode('query_suffix')
158 158
                 ->info('The following suffix will be used for bundle query groups')
@@ -183,25 +183,25 @@  discard block
 block discarded – undo
183 183
                             ->children();
184 184
 
185 185
         $nodes->scalarNode('query_suffix')
186
-              ->info('The following suffix will be used to create the name for queries to the same node')
187
-              ->defaultValue('Query');
186
+                ->info('The following suffix will be used to create the name for queries to the same node')
187
+                ->defaultValue('Query');
188 188
 
189 189
         $nodes->scalarNode('mutation_suffix')
190
-              ->info('The following suffix will be used to create the name for mutations to the same node')
191
-              ->defaultValue('Mutation');
190
+                ->info('The following suffix will be used to create the name for mutations to the same node')
191
+                ->defaultValue('Mutation');
192 192
 
193 193
         $nodes->variableNode('ignore')
194
-              ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation')
195
-              ->defaultValue(['Node']);
194
+                ->info('The following nodes will be ignore for grouping, all definitions will be placed in the root query or mutation')
195
+                ->defaultValue(['Node']);
196 196
 
197 197
         $nodes->arrayNode('aliases')
198
-              ->info(
199
-                  'Define aliases for nodes to set definitions inside other desired node name. 
198
+                ->info(
199
+                    'Define aliases for nodes to set definitions inside other desired node name. 
200 200
 Can be used to group multiple nodes or publish a node with a different group name'
201
-              )
202
-              ->example('InvoiceItem: Invoice')
203
-              ->useAttributeAsKey('name')
204
-              ->prototype('scalar');
201
+                )
202
+                ->example('InvoiceItem: Invoice')
203
+                ->useAttributeAsKey('name')
204
+                ->prototype('scalar');
205 205
     }
206 206
 
207 207
     private function configureSecurity(NodeBuilder $rootNode)
Please login to merge, or discard this patch.