Completed
Push — master ( 97422f...eaf181 )
by Janusz
10:47 queued 03:45
created
src/Proxy/Buzz/Common.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
 
17 17
         $result = parent::send($request, $response, $options);
18 18
 
19
-        if($this->hasLogger())
19
+        if ($this->hasLogger())
20 20
         {
21 21
             $time = microtime(true) - $start;
22 22
 
23
-            if($request->getHeader('Content-Type') == 'application/json')
23
+            if ($request->getHeader('Content-Type') == 'application/json')
24 24
             {
25 25
                 $payload = json_decode($request->getContent(), true) ?: [];
26 26
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
             if($request->getHeader('Content-Type') == 'application/json')
24 24
             {
25 25
                 $payload = json_decode($request->getContent(), true) ?: [];
26
-            }
27
-            else {
26
+            } else {
28 27
                 parse_str($request->getContent(), $payload);
29 28
             }
30 29
 
Please login to merge, or discard this patch.
src/Twig/CurlFormatter.php 2 patches
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 $value)
35
+        foreach ($request_headers as $value)
36 36
         {
37 37
             $output .= sprintf(' -H "%s"', $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 $header)
47
+            foreach ($singleCall['request_headers'] as $header)
48 48
             {
49
-                if($header == 'Content-Type: application/json')
49
+                if ($header == 'Content-Type: application/json')
50 50
                 {
51 51
                     return sprintf(" --data '%s'", json_encode($singleCall['params']));
52 52
                 }
Please login to merge, or discard this patch.
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.
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.