Test Failed
Pull Request — master (#6)
by
unknown
05:21
created
src/Twig/CurlFormatter.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
             }
54 54
 
55 55
             return sprintf(" --data '%s'", http_build_query($singleCall['params']));
56
-        }
57
-        else
56
+        } else
58 57
         {
59 58
             return '';
60 59
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $output = '';
34 34
 
35
-        foreach($request_headers as $key => $value)
35
+        foreach ($request_headers as $key => $value)
36 36
         {
37 37
             $output .= sprintf(' -H "%s: %s"', $key, is_array($value) ? $value[0] : $value);
38 38
         }
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 
43 43
     private function formatParams($singleCall)
44 44
     {
45
-        if($singleCall['method'] != 'GET')
45
+        if ($singleCall['method'] != 'GET')
46 46
         {
47
-            foreach($singleCall['request_headers'] as $key => $value)
47
+            foreach ($singleCall['request_headers'] as $key => $value)
48 48
             {
49
-                if($key == 'Content-Type' && (is_array($value) ? $value[0] : $value) ==  'application/json')
49
+                if ($key == 'Content-Type' && (is_array($value) ? $value[0] : $value) == 'application/json')
50 50
                 {
51 51
                     return sprintf(" --data '%s'", json_encode($singleCall['params']));
52 52
                 }
Please login to merge, or discard this patch.
src/Logger/ApiLogger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function logCall($host, $path, $method, $time, array $requestHeaders = [], array $params = [], array $responseHeaders = [], $result = null)
31 31
     {
32
-        if($this->debug)
32
+        if ($this->debug)
33 33
         {
34 34
             $this->calls[] = [
35 35
                 'host' => $host,
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             ];
44 44
         }
45 45
 
46
-        if(null !== $this->logger)
46
+        if (null !== $this->logger)
47 47
         {
48 48
             $this->logger->info(sprintf("%s (%s) %0.2f ms, params: %s", $path, $method, $time * 1000, json_encode($params)));
49 49
         }
Please login to merge, or discard this patch.
src/DataCollector/ApiDataCollector.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     public function getTime()
59 59
     {
60 60
         $total = 0;
61
-        foreach($this->data['calls'] as $call)
61
+        foreach ($this->data['calls'] as $call)
62 62
             $total += $call['time'];
63 63
 
64 64
         return $total;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,9 @@
 block discarded – undo
58 58
     public function getTime()
59 59
     {
60 60
         $total = 0;
61
-        foreach($this->data['calls'] as $call)
62
-            $total += $call['time'];
61
+        foreach($this->data['calls'] as $call) {
62
+                    $total += $call['time'];
63
+        }
63 64
 
64 65
         return $total;
65 66
     }
Please login to merge, or discard this patch.
src/DependencyInjection/NixillaApiLoggerExtension.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
         $configuration = new Configuration();
15 15
         $this->processConfiguration($configuration, $configs);
16 16
 
17
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
17
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
18 18
         $loader->load('services.yml');
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/Middleware/ApiLoggerMiddleware.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $time = microtime(true) - $this->startTime;
39 39
 
40
-        if($request->getHeader('Content-Type') == 'application/json')
40
+        if ($request->getHeader('Content-Type') == 'application/json')
41 41
         {
42 42
             $payload = json_decode($request->getBody(), true) ?: [];
43 43
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
         if($request->getHeader('Content-Type') == 'application/json')
41 41
         {
42 42
             $payload = json_decode($request->getBody(), true) ?: [];
43
-        }
44
-        else {
43
+        } else {
45 44
             parse_str($request->getBody(), $payload);
46 45
         }
47 46
 
Please login to merge, or discard this patch.
src/DependencyInjection/Configuration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         $treeBuilder = new TreeBuilder('nixilla_api_logger');
13 13
 
14
-        if ( ! method_exists($treeBuilder, 'getRootNode')) {
14
+        if (!method_exists($treeBuilder, 'getRootNode')) {
15 15
             $treeBuilder->root('nixilla_api_logger');
16 16
         }
17 17
 
Please login to merge, or discard this patch.