Passed
Push — master ( 86cb8f...bd95f1 )
by Vince
01:28
created
src/core/endpoints/map.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
         /**
82 82
          * Check if a custom directory was set in the Responsible API options
83 83
          */
84
-        if( (isset($this->options['classRoute']) && !empty($this->options['classRoute'])) && 
84
+        if ((isset($this->options['classRoute']) && !empty($this->options['classRoute'])) && 
85 85
             (isset($this->options['classRoute']['directory']) && isset($this->options['classRoute']['namespace']))
86 86
         ) {
87 87
             $customService = $this->options['classRoute'];
88 88
             $directory = $customService['directory'];
89 89
             $middleware = $customService['namespace'];
90 90
 
91
-        }else {
91
+        } else {
92 92
             $middleware = 'responsible';
93 93
 
94 94
             $endpoint = str_replace(
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 if (class_exists($child)) {
136 136
                     self::$middleWareClass = new $child;
137 137
                     $this->registry[$point] = self::$middleWareClass->register();
138
-                }else{
138
+                } else {
139 139
                     (new exception\errorException)
140 140
                         ->message("Class Error:: class {$child} needs to exist. See documentation on setting up a service.")
141 141
                         ->error('NOT_EXTENDED');
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
                 if (array_search($endpoint, $this->registry[$api]) !== false) {
209 209
                     
210 210
                     $scope = 'private';
211
-                    if( method_exists($this->NAMESPACE_ENDPOINTS[$api], 'scope') ) {
211
+                    if (method_exists($this->NAMESPACE_ENDPOINTS[$api], 'scope')) {
212 212
                         $classScope = (new $this->NAMESPACE_ENDPOINTS[$api])->scope();
213 213
                         $position = array_search($endpoint, $this->registry[$api]);
214 214
                         
215
-                        if( is_array($classScope) && isset($classScope[$position]) ) {
215
+                        if (is_array($classScope) && isset($classScope[$position])) {
216 216
                             $endpointSettings['model']['scope'] = $classScope[$position];
217 217
 
218
-                        }else{
218
+                        } else {
219 219
 
220
-                            if( !is_array($classScope) ) {
220
+                            if (!is_array($classScope)) {
221 221
                                 $endpointSettings['model']['scope'] = $classScope;
222 222
                             }
223 223
                         }
@@ -267,16 +267,16 @@  discard block
 block discarded – undo
267 267
                         }
268 268
 
269 269
                         $scope = 'private';
270
-                        if( method_exists($this->NAMESPACE_ENDPOINTS[$api], 'scope') ) {
270
+                        if (method_exists($this->NAMESPACE_ENDPOINTS[$api], 'scope')) {
271 271
                             $classScope = (new $this->NAMESPACE_ENDPOINTS[$api])->scope();
272 272
                             $position = array_search($path, $this->registry[$api]);
273 273
                             
274
-                            if( is_array($classScope) && isset($classScope[$position]) ) {
274
+                            if (is_array($classScope) && isset($classScope[$position])) {
275 275
                                 $scope = $classScope[$position];
276 276
 
277
-                            }else{
277
+                            } else {
278 278
 
279
-                                if( !is_array($classScope) ) {
279
+                                if (!is_array($classScope)) {
280 280
                                     $scope = $classScope;
281 281
                                 }
282 282
                             }
Please login to merge, or discard this patch.