Completed
Pull Request — master (#37)
by Sébastien
02:16
created
src/Rest/RestApiBrowser.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -154,6 +154,9 @@
 block discarded – undo
154 154
         $this->addRequestHeader($name, $value);
155 155
     }
156 156
 
157
+    /**
158
+     * @param string $headerName
159
+     */
157 160
     private function removeRequestHeader($headerName)
158 161
     {
159 162
         if (array_key_exists($headerName, $this->requestHeaders)) {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Zend\Diactoros\Stream;
10 10
 use Psr\Http\Message\RequestInterface;
11 11
 use Psr\Http\Message\ResponseInterface;
12
-use Behat\Gherkin\Node\PyStringNode;
13 12
 
14 13
 class RestApiBrowser
15 14
 {
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
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 $app->match(
16 16
     'echo',
17
-    function (Request $req) {
17
+    function(Request $req) {
18 18
         $ret = array(
19 19
             'warning' => 'Do not expose this service in production : it is intrinsically unsafe',
20 20
         );
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/Json/JsonContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
 
112 112
         if ($e === null) {
113
-            throw new \Exception(sprintf("The node '%s' exists and contains '%s'.", $jsonNode , json_encode($realValue)));
113
+            throw new \Exception(sprintf("The node '%s' exists and contains '%s'.", $jsonNode, json_encode($realValue)));
114 114
         }
115 115
     }
116 116
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ));
179 179
         }
180 180
 
181
-        $filename = $this->jsonSchemaBaseUrl.'/'.$filename;
181
+        $filename = $this->jsonSchemaBaseUrl . '/' . $filename;
182 182
 
183 183
         if (false === is_file($filename)) {
184 184
             throw new \RuntimeException(sprintf(
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.