Completed
Pull Request — master (#50)
by Timothée
08:09 queued 05:06
created
src/Rest/RestApiBrowser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
     private function send($method, $uri, $body = null)
122 122
     {
123 123
         if (!$this->hasHost($uri)) {
124
-            $uri = rtrim($this->httpClient->getConfiguration()->getBaseUri(), '/') . '/' . ltrim($uri, '/');
124
+            $uri = rtrim($this->httpClient->getConfiguration()->getBaseUri(), '/').'/'.ltrim($uri, '/');
125 125
         }
126 126
         $body = is_array($body) ? http_build_query($body) : $body;
127 127
         $stream = new Stream('php://memory', 'rw');
Please login to merge, or discard this patch.
src/Json/JsonContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $this->jsonInspector->validateJson(
146 146
             new JsonSchema(
147 147
                 file_get_contents($filename),
148
-                'file://' . $filename
148
+                'file://'.$filename
149 149
             )
150 150
         );
151 151
     }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             ));
190 190
         }
191 191
 
192
-        $filename = $this->jsonSchemaBaseUrl . '/' . $filename;
192
+        $filename = $this->jsonSchemaBaseUrl.'/'.$filename;
193 193
 
194 194
         if (false === is_file($filename)) {
195 195
             throw new \RuntimeException(sprintf(
Please login to merge, or discard this patch.
src/Json/JsonSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
         $validator->check($json->getRawContent(), $this->getRawContent());
40 40
 
41 41
         if (!$validator->isValid()) {
42
-            $msg = "JSON does not validate. Violations:" . PHP_EOL;
42
+            $msg = "JSON does not validate. Violations:".PHP_EOL;
43 43
             foreach ($validator->getErrors() as $error) {
44
-                $msg .= sprintf("  - [%s] %s" . PHP_EOL, $error['property'], $error['message']);
44
+                $msg .= sprintf("  - [%s] %s".PHP_EOL, $error['property'], $error['message']);
45 45
             }
46 46
             throw new \Exception($msg);
47 47
         }
Please login to merge, or discard this patch.
src/RestApiContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@
 block discarded – undo
101 101
      */
102 102
     public function iSetBasicAuthenticationWithAnd($username, $password)
103 103
     {
104
-        $authorization = base64_encode($username . ':' . $password);
105
-        $this->restApiBrowser->setRequestHeader('Authorization', 'Basic ' . $authorization);
104
+        $authorization = base64_encode($username.':'.$password);
105
+        $this->restApiBrowser->setRequestHeader('Authorization', 'Basic '.$authorization);
106 106
     }
107 107
 
108 108
     /**
Please login to merge, or discard this patch.
src/Extension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $container->setParameter('rezzza.json_api.rest.base_url', $config['rest']['base_url']);
18 18
         $container->setParameter('rezzza.json_api.rest.adaptor_name', $config['rest']['adaptor_name']);
19
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/Resources'));
19
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Resources'));
20 20
         $loader->load('services.xml');
21 21
 
22 22
         if (true === $config['rest']['store_response']) {
Please login to merge, or discard this patch.
www/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 use Symfony\Component\HttpFoundation\JsonResponse;
9 9
 use Symfony\Component\HttpFoundation\Request;
10 10
 
11
-require_once __DIR__ . '/../vendor/autoload.php';
11
+require_once __DIR__.'/../vendor/autoload.php';
12 12
 
13 13
 $app = new Silex\Application();
14 14
 
Please login to merge, or discard this patch.