Passed
Push — master ( 9df731...b79561 )
by Evgenii
03:05
created
src/DalliClient.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
      */
35 35
     public function __construct(string $dalliEndpoint, ?string $authToken, ClientInterface $client = null)
36 36
     {
37
-        if (empty($authToken))
38
-            throw new EmptyTokenException();
37
+        if (empty($authToken)) {
38
+                    throw new EmptyTokenException();
39
+        }
39 40
 
40 41
         $this->client = $client ?? new Client();
41 42
         $this->dalliEndpoint = $dalliEndpoint;
Please login to merge, or discard this patch.
src/Models/DalliApiBody.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@
 block discarded – undo
23 23
      */
24 24
     public function __construct(?string $apiMethodName)
25 25
     {
26
-        if (empty($apiMethodName))
27
-            throw new EmptyApiMethodException();
26
+        if (empty($apiMethodName)) {
27
+                    throw new EmptyApiMethodException();
28
+        }
28 29
 
29 30
         $this->apiMethodName = $apiMethodName;
30 31
         $this->mainElement = new SimpleXMLElement("<$this->apiMethodName></$this->apiMethodName>");
Please login to merge, or discard this patch.
examples/SendOrdersToCart.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,8 +54,9 @@
 block discarded – undo
54 54
 $apiBody->add($order);
55 55
 
56 56
 $success = !$dalliClient->sendApiRequest($apiBody);
57
-if (!$success)
57
+if (!$success) {
58 58
     foreach ($dalliClient->getErrors() as $error)
59 59
         echo $error;
60
+}
60 61
 
61 62
 echo $dalliClient->getResponseBody();
Please login to merge, or discard this patch.
examples/ClearBasket.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,8 +12,9 @@
 block discarded – undo
12 12
 
13 13
 $success = $dalliClient->sendApiRequest($apiBody);
14 14
 
15
-if (!$success)
15
+if (!$success) {
16 16
     foreach ($dalliClient->getErrors() as $error)
17 17
         echo $error;
18
+}
18 19
 
19 20
 echo $dalliClient->getResponseBody();
Please login to merge, or discard this patch.