| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 182 | 
| Code Lines | 177 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php  | 
            ||
| 73 | private function addProvidersSection(ArrayNodeDefinition $rootNode)  | 
            ||
| 74 |     { | 
            ||
| 75 | /** @var ArrayNodeDefinition $protoType */  | 
            ||
| 76 | $protoType = $rootNode  | 
            ||
| 77 | ->children()  | 
            ||
| 78 |                 ->arrayNode('providers') | 
            ||
| 79 | ->isRequired()  | 
            ||
| 80 | ->requiresAtLeastOneElement()  | 
            ||
| 81 |                 ->useAttributeAsKey('type') | 
            ||
| 82 |                 ->prototype('array'); | 
            ||
| 83 | |||
| 84 | $protoType  | 
            ||
| 85 | ->children()  | 
            ||
| 86 |                 ->arrayNode('hosted') | 
            ||
| 87 | ->children()  | 
            ||
| 88 |                         ->arrayNode('service_provider') | 
            ||
| 89 | ->children()  | 
            ||
| 90 |                                 ->scalarNode('public_key') | 
            ||
| 91 | ->isRequired()  | 
            ||
| 92 |                                     ->info('The absolute path to the public key used to sign AuthnRequests') | 
            ||
| 93 | ->end()  | 
            ||
| 94 |                                 ->scalarNode('private_key') | 
            ||
| 95 | ->isRequired()  | 
            ||
| 96 |                                     ->info('The absolute path to the private key used to sign AuthnRequests') | 
            ||
| 97 | ->end()  | 
            ||
| 98 | ->end()  | 
            ||
| 99 | ->end()  | 
            ||
| 100 |                         ->arrayNode('metadata') | 
            ||
| 101 | ->children()  | 
            ||
| 102 |                                 ->scalarNode('public_key') | 
            ||
| 103 | ->isRequired()  | 
            ||
| 104 |                                     ->info('The absolute path to the public key used to sign the metadata') | 
            ||
| 105 | ->end()  | 
            ||
| 106 |                                 ->scalarNode('private_key') | 
            ||
| 107 | ->isRequired()  | 
            ||
| 108 |                                     ->info('The absolute path to the private key used to sign the metadata') | 
            ||
| 109 | ->end()  | 
            ||
| 110 | ->end()  | 
            ||
| 111 | ->end()  | 
            ||
| 112 | ->end()  | 
            ||
| 113 | ->end()  | 
            ||
| 114 |                 ->arrayNode('remote') | 
            ||
| 115 | ->children()  | 
            ||
| 116 |                         ->scalarNode('entity_id') | 
            ||
| 117 | ->isRequired()  | 
            ||
| 118 |                             ->info('The EntityID of the remote identity provider') | 
            ||
| 119 | ->end()  | 
            ||
| 120 |                         ->scalarNode('sso_url') | 
            ||
| 121 | ->isRequired()  | 
            ||
| 122 |                             ->info('The name of the route to generate the SSO URL') | 
            ||
| 123 | ->end()  | 
            ||
| 124 |                         ->scalarNode('certificate') | 
            ||
| 125 | ->isRequired()  | 
            ||
| 126 | ->info(  | 
            ||
| 127 | 'The contents of the certificate used to sign the AuthnResponse with, if different from'  | 
            ||
| 128 | . ' the public key configured below'  | 
            ||
| 129 | )  | 
            ||
| 130 | ->end()  | 
            ||
| 131 | ->end()  | 
            ||
| 132 | ->end()  | 
            ||
| 133 |                 ->arrayNode('view_config') | 
            ||
| 134 | ->children()  | 
            ||
| 135 |                         ->scalarNode('loa') | 
            ||
| 136 | ->isRequired()  | 
            ||
| 137 |                             ->info('The loa level (for now 1-3 are supported)') | 
            ||
| 138 | ->end()  | 
            ||
| 139 |                         ->scalarNode('logo') | 
            ||
| 140 | ->isRequired()  | 
            ||
| 141 |                             ->info('The absolute path to the logo of the gssp') | 
            ||
| 142 | ->end()  | 
            ||
| 143 |                         ->arrayNode('alt') | 
            ||
| 144 | ->children()  | 
            ||
| 145 |                                 ->scalarNode('en_GB') | 
            ||
| 146 | ->isRequired()  | 
            ||
| 147 |                                     ->info('English alt text translation') | 
            ||
| 148 | ->end()  | 
            ||
| 149 |                                 ->scalarNode('nl_NL') | 
            ||
| 150 | ->isRequired()  | 
            ||
| 151 |                                     ->info('Dutch alt text translation') | 
            ||
| 152 | ->end()  | 
            ||
| 153 | ->end()  | 
            ||
| 154 | ->end()  | 
            ||
| 155 |                         ->arrayNode('title') | 
            ||
| 156 | ->children()  | 
            ||
| 157 |                                 ->scalarNode('en_GB') | 
            ||
| 158 | ->isRequired()  | 
            ||
| 159 |                                     ->info('English title of the gssp') | 
            ||
| 160 | ->end()  | 
            ||
| 161 |                                 ->scalarNode('nl_NL') | 
            ||
| 162 | ->isRequired()  | 
            ||
| 163 |                                     ->info('Dutch title of the gssp') | 
            ||
| 164 | ->end()  | 
            ||
| 165 | ->end()  | 
            ||
| 166 | ->end()  | 
            ||
| 167 |                         ->arrayNode('description') | 
            ||
| 168 | ->children()  | 
            ||
| 169 |                                 ->scalarNode('en_GB') | 
            ||
| 170 | ->isRequired()  | 
            ||
| 171 |                                     ->info('English description of the gssp') | 
            ||
| 172 | ->end()  | 
            ||
| 173 |                                 ->scalarNode('nl_NL') | 
            ||
| 174 | ->isRequired()  | 
            ||
| 175 |                                     ->info('Dutch description of the gssp') | 
            ||
| 176 | ->end()  | 
            ||
| 177 | ->end()  | 
            ||
| 178 | ->end()  | 
            ||
| 179 |                         ->arrayNode('button_use') | 
            ||
| 180 | ->children()  | 
            ||
| 181 |                                 ->scalarNode('en_GB') | 
            ||
| 182 | ->isRequired()  | 
            ||
| 183 |                                     ->info('English text shown on the use button') | 
            ||
| 184 | ->end()  | 
            ||
| 185 |                                 ->scalarNode('nl_NL') | 
            ||
| 186 | ->isRequired()  | 
            ||
| 187 |                                     ->info('Dutch text shown on the use button') | 
            ||
| 188 | ->end()  | 
            ||
| 189 | ->end()  | 
            ||
| 190 | ->end()  | 
            ||
| 191 |                         ->arrayNode('initiate_title') | 
            ||
| 192 | ->children()  | 
            ||
| 193 |                                 ->scalarNode('en_GB') | 
            ||
| 194 | ->isRequired()  | 
            ||
| 195 |                                     ->info('English initiate title text') | 
            ||
| 196 | ->end()  | 
            ||
| 197 |                                 ->scalarNode('nl_NL') | 
            ||
| 198 | ->isRequired()  | 
            ||
| 199 |                                     ->info('Dutch initiate title text') | 
            ||
| 200 | ->end()  | 
            ||
| 201 | ->end()  | 
            ||
| 202 | ->end()  | 
            ||
| 203 |                         ->arrayNode('initiate_button') | 
            ||
| 204 | ->children()  | 
            ||
| 205 |                                 ->scalarNode('en_GB') | 
            ||
| 206 | ->isRequired()  | 
            ||
| 207 |                                     ->info('English initiate button text') | 
            ||
| 208 | ->end()  | 
            ||
| 209 |                                 ->scalarNode('nl_NL') | 
            ||
| 210 | ->isRequired()  | 
            ||
| 211 |                                     ->info('Dutch initiate button text') | 
            ||
| 212 | ->end()  | 
            ||
| 213 | ->end()  | 
            ||
| 214 | ->end()  | 
            ||
| 215 |                         ->arrayNode('explanation') | 
            ||
| 216 | ->children()  | 
            ||
| 217 |                                 ->scalarNode('en_GB') | 
            ||
| 218 | ->isRequired()  | 
            ||
| 219 |                                     ->info('English explanation for step 2') | 
            ||
| 220 | ->end()  | 
            ||
| 221 |                                 ->scalarNode('nl_NL') | 
            ||
| 222 | ->isRequired()  | 
            ||
| 223 |                                     ->info('Dutch explanation for step 2') | 
            ||
| 224 | ->end()  | 
            ||
| 225 | ->end()  | 
            ||
| 226 | ->end()  | 
            ||
| 227 |                         ->arrayNode('authn_failed') | 
            ||
| 228 | ->children()  | 
            ||
| 229 |                                 ->scalarNode('en_GB') | 
            ||
| 230 | ->isRequired()  | 
            ||
| 231 |                                     ->info('English text shown when authn request failed') | 
            ||
| 232 | ->end()  | 
            ||
| 233 |                                 ->scalarNode('nl_NL') | 
            ||
| 234 | ->isRequired()  | 
            ||
| 235 |                                     ->info('Dutch text shown when authn request failed') | 
            ||
| 236 | ->end()  | 
            ||
| 237 | ->end()  | 
            ||
| 238 | ->end()  | 
            ||
| 239 |                         ->arrayNode('pop_failed') | 
            ||
| 240 | ->children()  | 
            ||
| 241 |                                 ->scalarNode('en_GB') | 
            ||
| 242 | ->isRequired()  | 
            ||
| 243 |                                     ->info('English text shown on failed proof of posession') | 
            ||
| 244 | ->end()  | 
            ||
| 245 |                                 ->scalarNode('nl_NL') | 
            ||
| 246 | ->isRequired()  | 
            ||
| 247 |                                     ->info('Dutch text shown on failed proof of posession') | 
            ||
| 248 | ->end()  | 
            ||
| 249 | ->end()  | 
            ||
| 250 | ->end()  | 
            ||
| 251 | ->end()  | 
            ||
| 252 | ->end()  | 
            ||
| 253 | ->end();  | 
            ||
| 254 | }  | 
            ||
| 255 | }  | 
            ||
| 256 |