@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $method = $controller->getMethod($methodName); |
| 55 | 55 | |
| 56 | 56 | $parsedRoute = [ |
| 57 | - 'id' => md5($this->getUri($route).':'.implode($this->getMethods($route))), |
|
| 57 | + 'id' => md5($this->getUri($route) . ':' . implode($this->getMethods($route))), |
|
| 58 | 58 | 'methods' => $this->getMethods($route), |
| 59 | 59 | 'uri' => $this->getUri($route), |
| 60 | 60 | 'boundUri' => Utils::getFullUrl($route, $rulesToApply['bindings'] ?? ($rulesToApply['response_calls']['bindings'] ?? [])), |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | $responses = $this->fetchResponses($controller, $method, $route, $rulesToApply, $parsedRoute); |
| 73 | 73 | $parsedRoute['response'] = $responses; |
| 74 | - $parsedRoute['showresponse'] = ! empty($responses); |
|
| 74 | + $parsedRoute['showresponse'] = !empty($responses); |
|
| 75 | 75 | |
| 76 | 76 | $parsedRoute['headers'] = $rulesToApply['headers'] ?? []; |
| 77 | 77 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | $responses = $this->iterateThroughStrategies('responses', $context, [$route, $controller, $method, $rulesToApply]); |
| 109 | 109 | if (count($responses)) { |
| 110 | - return collect($responses)->map(function (string $response, int $status) { |
|
| 110 | + return collect($responses)->map(function(string $response, int $status) { |
|
| 111 | 111 | return [ |
| 112 | 112 | 'status' => $status ?: 200, |
| 113 | 113 | 'content' => $response, |
@@ -126,14 +126,14 @@ discard block |
||
| 126 | 126 | $strategy = new $strategyClass($stage, $this->config); |
| 127 | 127 | $arguments[] = $context; |
| 128 | 128 | $results = $strategy(...$arguments); |
| 129 | - if (! is_null($results)) { |
|
| 129 | + if (!is_null($results)) { |
|
| 130 | 130 | foreach ($results as $index => $item) { |
| 131 | 131 | // Using a for loop rather than array_merge or += |
| 132 | 132 | // so it does not renumber numeric keys |
| 133 | 133 | // and also allows values to be overwritten |
| 134 | 134 | |
| 135 | 135 | // Don't allow overwriting if an empty value is trying to replace a set one |
| 136 | - if (! in_array($context[$stage], [null, ''], true) && in_array($item, [null, ''], true)) { |
|
| 136 | + if (!in_array($context[$stage], [null, ''], true) && in_array($item, [null, ''], true)) { |
|
| 137 | 137 | continue; |
| 138 | 138 | } else { |
| 139 | 139 | $context[$stage][$index] = $item; |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | $values = []; |
| 159 | 159 | |
| 160 | 160 | // Remove params which have no examples. |
| 161 | - $params = array_filter($params, function ($details) { |
|
| 162 | - return ! is_null($details['value']); |
|
| 161 | + $params = array_filter($params, function($details) { |
|
| 162 | + return !is_null($details['value']); |
|
| 163 | 163 | }); |
| 164 | 164 | |
| 165 | 165 | foreach ($params as $paramName => $details) { |