Passed
Branch version-1.x (02dcd3)
by Mariano
20:23 queued 10:14
created
Category
src/Server/Utils/FileExpectationsLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         );
79 79
         $this->validateExpectationOrThrowException($expectation, $this->logger);
80 80
 
81
-        $this->logger->debug('Parsed expectation: ' . var_export($expectation, true));
81
+        $this->logger->debug('Parsed expectation: '.var_export($expectation, true));
82 82
         $this->storage->addExpectation($expectation);
83 83
         // As we have no API to modify expectation parsed the same object could be used for backup.
84 84
         // On futher changes when $expectation modifications are possible something like deep-copy
Please login to merge, or discard this patch.
src/Server/Utils/Strategies/RegexResponseStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,9 +148,9 @@
 block discarded – undo
148 148
     {
149 149
         $path = ltrim($httpRequest->getUri()->getPath(), '/');
150 150
         $query = $httpRequest->getUri()->getQuery();
151
-        $return = '/' . $path;
151
+        $return = '/'.$path;
152 152
         if ($query) {
153
-            $return .= '?' . $httpRequest->getUri()->getQuery();
153
+            $return .= '?'.$httpRequest->getUri()->getQuery();
154 154
         }
155 155
 
156 156
         return $return;
Please login to merge, or discard this patch.
src/Server/Utils/Strategies/ProxyResponseStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     public function createResponse(Expectation $expectation, TransactionData $transactionData)
50 50
     {
51 51
         $url = $expectation->getProxyTo();
52
-        $this->logger->debug('Proxying request to : ' . $url);
52
+        $this->logger->debug('Proxying request to : '.$url);
53 53
 
54 54
         return $this->httpService->send(
55 55
             $transactionData->getRequest()->withUri(new Uri($url))
Please login to merge, or discard this patch.
src/Server/Utils/Strategies/AbstractResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         if ($responseConfig->getDelayMillis()) {
40 40
             $this->logger->debug(
41
-                'Delaying the response for ' . $responseConfig->getDelayMillis() . ' milliseconds'
41
+                'Delaying the response for '.$responseConfig->getDelayMillis().' milliseconds'
42 42
             );
43 43
             usleep($responseConfig->getDelayMillis() * 1000);
44 44
         }
Please login to merge, or discard this patch.
src/Server/Utils/HomePathService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
         $windowsHome = getenv('HOMEPATH');
42 42
         if (!empty($windowsHome)) {
43
-            return getenv('HOMEDRIVE') . getenv('HOMEPATH');
43
+            return getenv('HOMEDRIVE').getenv('HOMEPATH');
44 44
         }
45 45
 
46 46
         throw new \Exception('Could not get the users\'s home path');
Please login to merge, or discard this patch.
src/Server/Http/Matchers/JsonObjectsEquals.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $decodedValue = json_decode($value, true);
66 66
         if (JSON_ERROR_NONE !== json_last_error()) {
67
-            throw new \InvalidArgumentException('JSON parsing error: ' . json_last_error_msg());
67
+            throw new \InvalidArgumentException('JSON parsing error: '.json_last_error_msg());
68 68
         }
69 69
 
70 70
         return $decodedValue;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $requestValue = $this->decodeJson($value);
82 82
         } catch (\InvalidArgumentException $e) {
83 83
             $requestValue = $value;
84
-            $this->logger->warning('Invalid json received in request: ' . $value);
84
+            $this->logger->warning('Invalid json received in request: '.$value);
85 85
         }
86 86
 
87 87
         return $requestValue;
Please login to merge, or discard this patch.
src/Server/Http/Implementation/ReactPhpServer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $serverClass = $this->getReactServerClass();
83 83
         $this->http = new $serverClass(
84
-            function (ServerRequestInterface $request) {
84
+            function(ServerRequestInterface $request) {
85 85
                 return $this->createRequestManager($request);
86 86
             }
87 87
         );
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         // Dispatch pending signals periodically
94 94
         if (\function_exists('pcntl_signal_dispatch')) {
95
-            $this->loop->addPeriodicTimer(0.5, function () {
95
+            $this->loop->addPeriodicTimer(0.5, function() {
96 96
                 pcntl_signal_dispatch();
97 97
             });
98 98
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $start = microtime(true);
122 122
         $psrResponse = $this->requestHandler->execute($request, new PsrResponse());
123
-        $this->logger->debug('Processing took ' . number_format((microtime(true) - $start) * 1000, 3) . ' milliseconds');
123
+        $this->logger->debug('Processing took '.number_format((microtime(true) - $start) * 1000, 3).' milliseconds');
124 124
 
125 125
         return $psrResponse;
126 126
     }
@@ -130,21 +130,21 @@  discard block
 block discarded – undo
130 130
      */
131 131
     private function createRequestManager(ServerRequestInterface $request)
132 132
     {
133
-        return new Promise(function ($resolve, $reject) use ($request) {
133
+        return new Promise(function($resolve, $reject) use ($request) {
134 134
             $bodyStream = '';
135 135
 
136
-            $request->getBody()->on('data', function ($data) use (&$bodyStream, $request) {
136
+            $request->getBody()->on('data', function($data) use (&$bodyStream, $request) {
137 137
                 $bodyStream .= $data;
138 138
             });
139
-            $request->getBody()->on('end', function () use ($resolve, $request, &$bodyStream) {
139
+            $request->getBody()->on('end', function() use ($resolve, $request, &$bodyStream) {
140 140
                 $response = $this->onRequest($request->withBody(new StringStream($bodyStream)));
141 141
                 $resolve($response);
142 142
             });
143
-            $request->getBody()->on('error', function (\Exception $exception) use ($resolve) {
143
+            $request->getBody()->on('error', function(\Exception $exception) use ($resolve) {
144 144
                 $response = new ReactResponse(
145 145
                     400,
146 146
                     ['Content-Type' => 'text/plain'],
147
-                    'An error occured while reading: ' . $exception->getMessage()
147
+                    'An error occured while reading: '.$exception->getMessage()
148 148
                 );
149 149
                 $resolve($response);
150 150
             });
Please login to merge, or discard this patch.
src/Server/Http/InputSources/UrlFromPath.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
33 33
         $url = $request->getUri();
34 34
         $return = $url->getPath();
35 35
         if ($url->getQuery()) {
36
-            $return .= '?' . $url->getQuery();
36
+            $return .= '?'.$url->getQuery();
37 37
         }
38 38
         if ($url->getFragment()) {
39
-            $return .= '#' . $url->getFragment();
39
+            $return .= '#'.$url->getFragment();
40 40
         }
41 41
 
42 42
         return $return;
Please login to merge, or discard this patch.
src/Server/Http/RequestFilters/ConvertToCondition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     private function validateMatcherOrThrowException($matcher)
65 65
     {
66 66
         if (!Matchers::isValidMatcher($matcher)) {
67
-            throw new FilterErrorException('Invalid condition matcher specified: ' . $matcher);
67
+            throw new FilterErrorException('Invalid condition matcher specified: '.$matcher);
68 68
         }
69 69
     }
70 70
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     private function checkValueIsValidOrThrowException($value)
77 77
     {
78 78
         if (!\is_array($value) || 1 !== \count($value)) {
79
-            throw new FilterErrorException('Condition parsing failed for "' . var_export($value, true) . '", it should be something like: "isEqualTo" : "a value"');
79
+            throw new FilterErrorException('Condition parsing failed for "'.var_export($value, true).'", it should be something like: "isEqualTo" : "a value"');
80 80
         }
81 81
     }
82 82
 }
Please login to merge, or discard this patch.