Passed
Push — master ( 319fcb...7a107a )
by Rafael
04:41
created
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.
src/Cache/DefinitionCacheWarmer.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,9 +102,9 @@
 block discarded – undo
102 102
         }
103 103
 
104 104
         $files = Finder::create()
105
-                       ->in($dirs[1])
106
-                       ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime)))
107
-                       ->files();
105
+                        ->in($dirs[1])
106
+                        ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime)))
107
+                        ->files();
108 108
 
109 109
         //exist at least one modified file
110 110
         foreach ($files as $file) {
Please login to merge, or discard this patch.
src/Behat/GraphQLApiExtension.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -76,16 +76,16 @@
 block discarded – undo
76 76
             ->defaultValue(FosUserResolver::class);
77 77
 
78 78
         $jwt->arrayNode('users')
79
-                  ->beforeNormalization()
80
-                  ->ifString()
81
-                  ->then(
82
-                      function ($v) {
83
-                          return preg_split('/\s*,\s*/', $v);
84
-                      }
85
-                  )
86
-                  ->end()
87
-                  ->prototype('scalar')
88
-                  ->end();
79
+                    ->beforeNormalization()
80
+                    ->ifString()
81
+                    ->then(
82
+                        function ($v) {
83
+                            return preg_split('/\s*,\s*/', $v);
84
+                        }
85
+                    )
86
+                    ->end()
87
+                    ->prototype('scalar')
88
+                    ->end();
89 89
     }
90 90
 
91 91
     public function process(ContainerBuilder $container)
Please login to merge, or discard this patch.