Completed
Push — master ( 6e86f3...1e378a )
by Neomerx
02:32
created
src/Analyzer.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@
 block discarded – undo
376 376
     /**
377 377
      * @param RequestInterface $request
378 378
      *
379
-     * @return null|string
379
+     * @return string
380 380
      */
381 381
     private function getRequestHostHeader(RequestInterface $request)
382 382
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         if ($this->strategy->isCheckHost() === true && $this->isSameHost($request, $serverOrigin) === false) {
132 132
             $host = $this->getRequestHostHeader($request);
133 133
             $this->logInfo(
134
-                'Host header in request either absent or do not match server origin. ' .
134
+                'Host header in request either absent or do not match server origin. '.
135 135
                 'Check config settings for Server Origin and Host Check.',
136 136
                 ['host' => $host, 'server' => $serverOrigin]
137 137
             );
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $requestOrigin = $this->getOrigin($request);
145 145
         if ($requestOrigin === null || $this->isCrossOrigin($requestOrigin, $serverOrigin) === false) {
146 146
             $this->logDebug(
147
-                'Request is not CORS (request origin is empty or equals to server one). ' .
147
+                'Request is not CORS (request origin is empty or equals to server one). '.
148 148
                 'Check config settings for Server Origin.',
149 149
                 ['request' => $requestOrigin, 'server' => $serverOrigin]
150 150
             );
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         // #6.2.3
221 221
         $requestMethod = $request->getHeader(CorsRequestHeaders::METHOD);
222 222
         if (empty($requestMethod) === true) {
223
-            $this->logDebug('Request is not CORS (header ' . CorsRequestHeaders::METHOD . ' is not specified).');
223
+            $this->logDebug('Request is not CORS (header '.CorsRequestHeaders::METHOD.' is not specified).');
224 224
             return $this->createResult(AnalysisResultInterface::TYPE_REQUEST_OUT_OF_CORS_SCOPE);
225 225
         } else {
226 226
             $requestMethod = $requestMethod[0];
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             // after explode header names might have spaces in the beginnings and ends...
295 295
             $requestHeaders = explode(CorsRequestHeaders::HEADERS_SEPARATOR, $requestHeaders[0]);
296 296
             // ... so trim the spaces and convert values to lower case
297
-            $requestHeaders = array_map(function ($headerName) {
297
+            $requestHeaders = array_map(function($headerName) {
298 298
                 return strtolower(trim($headerName));
299 299
             }, $requestHeaders);
300 300
         }
Please login to merge, or discard this patch.
src/Http/ParsedUrl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@
 block discarded – undo
105 105
     public function getOrigin()
106 106
     {
107 107
         if ($this->urlAsString === null) {
108
-            $url = $this->scheme === null ? '' : $this->scheme . ':';
109
-            $url .= $this->host === null  ? '' : '//' . $this->host;
110
-            $url .= $this->port === self::DEFAULT_PORT ? '' : ':' . $this->port;
108
+            $url = $this->scheme === null ? '' : $this->scheme.':';
109
+            $url .= $this->host === null ? '' : '//'.$this->host;
110
+            $url .= $this->port === self::DEFAULT_PORT ? '' : ':'.$this->port;
111 111
 
112 112
             $this->urlAsString = $url;
113 113
         }
Please login to merge, or discard this patch.