@@ -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 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | { |
| 110 | 110 | $responses = $this->iterateThroughStrategies('responses', $context, [$route, $controller, $method, $rulesToApply]); |
| 111 | 111 | if (count($responses)) { |
| 112 | - return collect($responses)->map(function (string $response, int $status) { |
|
| 112 | + return collect($responses)->map(function(string $response, int $status) { |
|
| 113 | 113 | return [ |
| 114 | 114 | 'status' => $status ?: 200, |
| 115 | 115 | 'content' => $response, |
@@ -128,14 +128,14 @@ discard block |
||
| 128 | 128 | $strategy = new $strategyClass($this->config); |
| 129 | 129 | $arguments[] = $context; |
| 130 | 130 | $results = $strategy(...$arguments); |
| 131 | - if (! is_null($results)) { |
|
| 131 | + if (!is_null($results)) { |
|
| 132 | 132 | foreach ($results as $index => $item) { |
| 133 | 133 | // Using a for loop rather than array_merge or += |
| 134 | 134 | // so it does not renumber numeric keys |
| 135 | 135 | // and also allows values to be overwritten |
| 136 | 136 | |
| 137 | 137 | // Don't allow overwriting if an empty value is trying to replace a set one |
| 138 | - if (! in_array($context[$key], [null, ''], true) && in_array($item, [null, ''], true)) { |
|
| 138 | + if (!in_array($context[$key], [null, ''], true) && in_array($item, [null, ''], true)) { |
|
| 139 | 139 | continue; |
| 140 | 140 | } else { |
| 141 | 141 | $context[$key][$index] = $item; |
@@ -160,8 +160,8 @@ discard block |
||
| 160 | 160 | $values = []; |
| 161 | 161 | |
| 162 | 162 | // Remove params which have no examples. |
| 163 | - $params = array_filter($params, function ($details) { |
|
| 164 | - return ! is_null($details['value']); |
|
| 163 | + $params = array_filter($params, function($details) { |
|
| 164 | + return !is_null($details['value']); |
|
| 165 | 165 | }); |
| 166 | 166 | |
| 167 | 167 | foreach ($params as $paramName => $details) { |