Passed
Push — master ( 2b0361...4b9b04 )
by Bruce Pinheiro de
02:58
created
src/Checkout/CheckoutInterface.php 2 patches
Indentation   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -10,208 +10,208 @@
 block discarded – undo
10 10
  */
11 11
 interface CheckoutInterface
12 12
 {
13
-	/**
14
-	 * @return null|string
15
-	 */
13
+    /**
14
+     * @return null|string
15
+     */
16 16
     public function getId(): ?string;
17 17
 
18
-	/**
19
-	 * @param string $id
20
-	 * @return CheckoutInterface
21
-	 */
18
+    /**
19
+     * @param string $id
20
+     * @return CheckoutInterface
21
+     */
22 22
     public function setId(string $id): self;
23 23
 
24
-	/**
25
-	 * @return null|string
26
-	 */
24
+    /**
25
+     * @return null|string
26
+     */
27 27
     public function getStatus(): ?string;
28 28
 
29
-	/**
30
-	 * @param string $status
31
-	 * @return CheckoutInterface
32
-	 */
29
+    /**
30
+     * @param string $status
31
+     * @return CheckoutInterface
32
+     */
33 33
     public function setStatus(string $status): self;
34 34
 
35 35
 
36
-	/**
37
-	 * @param float $amount
38
-	 * @return CheckoutInterface
39
-	 */
36
+    /**
37
+     * @param float $amount
38
+     * @return CheckoutInterface
39
+     */
40 40
     public function setAmount(float $amount): self;
41 41
 
42
-	/**
43
-	 * @return float
44
-	 */
42
+    /**
43
+     * @return float
44
+     */
45 45
     public function getAmount():? float;
46 46
 
47
-	/**
48
-	 * @return float|null
49
-	 */
47
+    /**
48
+     * @return float|null
49
+     */
50 50
     public function getFeeAmount():? float;
51 51
 
52
-	/**
53
-	 * @param float $amount
54
-	 * @return CheckoutInterface
55
-	 */
52
+    /**
53
+     * @param float $amount
54
+     * @return CheckoutInterface
55
+     */
56 56
     public function setFeeAmount(float $amount): self;
57 57
 
58
-	/**
59
-	 * @return null|string
60
-	 */
58
+    /**
59
+     * @return null|string
60
+     */
61 61
     public function getCurrency(): ?string;
62 62
 
63
-	/**
64
-	 * @param string $currency
65
-	 * @return CheckoutInterface
66
-	 */
63
+    /**
64
+     * @param string $currency
65
+     * @return CheckoutInterface
66
+     */
67 67
     public function setCurrency(string $currency): self;
68 68
 
69
-	/**
70
-	 * @return CustomerInterface|null
71
-	 */
69
+    /**
70
+     * @return CustomerInterface|null
71
+     */
72 72
     public function getCustomer(): ?CustomerInterface;
73 73
 
74
-	/**
75
-	 * @param CustomerInterface $customer
76
-	 * @return CheckoutInterface
77
-	 */
74
+    /**
75
+     * @param CustomerInterface $customer
76
+     * @return CheckoutInterface
77
+     */
78 78
     public function setCustomer(CustomerInterface $customer): self;
79 79
 
80
-	/**
80
+    /**
81 81
      * @return PaymentInstrumentInterface|null
82
-	 */
82
+     */
83 83
     public function getCard(): ?PaymentInstrumentInterface;
84 84
 
85
-	/**
85
+    /**
86 86
      * @param PaymentInstrumentInterface $card
87
-	 * @return CheckoutInterface
88
-	 */
87
+     * @return CheckoutInterface
88
+     */
89 89
     public function setCard(PaymentInstrumentInterface $card): self;
90 90
 
91
-	/**
92
-	 * @return null|string
93
-	 */
91
+    /**
92
+     * @return null|string
93
+     */
94 94
     public function getPayToEmail(): ?string;
95 95
 
96
-	/**
97
-	 * @param string $email
98
-	 * @return CheckoutInterface
99
-	 */
96
+    /**
97
+     * @param string $email
98
+     * @return CheckoutInterface
99
+     */
100 100
     public function setPayToEmail(string $email): self;
101 101
 
102
-	/**
103
-	 * @return null|string
104
-	 */
102
+    /**
103
+     * @return null|string
104
+     */
105 105
     public function getPayFromEmail(): ?string;
106 106
 
107
-	/**
108
-	 * @param string $email
109
-	 * @return CheckoutInterface
110
-	 */
107
+    /**
108
+     * @param string $email
109
+     * @return CheckoutInterface
110
+     */
111 111
     public function setPayFromEmail(string $email): self;
112 112
 
113
-	/**
114
-	 * @return null|string
115
-	 */
113
+    /**
114
+     * @return null|string
115
+     */
116 116
     public function getReference(): ?string;
117 117
 
118
-	/**
119
-	 * @param string $reference
120
-	 * @return CheckoutInterface
121
-	 */
118
+    /**
119
+     * @param string $reference
120
+     * @return CheckoutInterface
121
+     */
122 122
     public function setReference(string $reference): self;
123 123
 
124
-	/**
125
-	 * @return null|string
126
-	 */
124
+    /**
125
+     * @return null|string
126
+     */
127 127
     public function getDescription(): ?string;
128 128
 
129
-	/**
130
-	 * @param string $description
131
-	 * @return CheckoutInterface
132
-	 */
129
+    /**
130
+     * @param string $description
131
+     * @return CheckoutInterface
132
+     */
133 133
     public function setDescription(string $description): self;
134 134
 
135
-	/**
136
-	 * @return null|string
137
-	 */
135
+    /**
136
+     * @return null|string
137
+     */
138 138
     public function getRedirectUrl(): ?string;
139 139
 
140
-	/**
141
-	 * @param string $url
142
-	 * @return CheckoutInterface
143
-	 */
140
+    /**
141
+     * @param string $url
142
+     * @return CheckoutInterface
143
+     */
144 144
     public function setRedirectUrl(string $url): self;
145 145
 
146
-	/**
147
-	 * @return string
148
-	 */
146
+    /**
147
+     * @return string
148
+     */
149 149
     public function getValidUntil():? string;
150 150
 
151
-	/**
152
-	 * @param string $timestamp
153
-	 * @return CheckoutInterface
154
-	 */
151
+    /**
152
+     * @param string $timestamp
153
+     * @return CheckoutInterface
154
+     */
155 155
     public function setValidUntil(string $timestamp): self;
156 156
 
157
-	/**
158
-	 * @return null|string
159
-	 */
157
+    /**
158
+     * @return null|string
159
+     */
160 160
     public function getTransactionCode(): ?string;
161 161
 
162
-	/**
163
-	 * @param string $code
164
-	 * @return CheckoutInterface
165
-	 */
162
+    /**
163
+     * @param string $code
164
+     * @return CheckoutInterface
165
+     */
166 166
     public function setTransactionCode(string $code): self;
167 167
 
168
-	/**
169
-	 * @return null|string
170
-	 */
168
+    /**
169
+     * @return null|string
170
+     */
171 171
     public function getTransactionId(): ?string;
172 172
 
173
-	/**
174
-	 * @param string $id
175
-	 * @return CheckoutInterface
176
-	 */
173
+    /**
174
+     * @param string $id
175
+     * @return CheckoutInterface
176
+     */
177 177
     public function setTransactionId(string $id): self;
178 178
 
179
-	/**
180
-	 * @return array|null
181
-	 */
179
+    /**
180
+     * @return array|null
181
+     */
182 182
     public function getTransactions(): ?array;
183 183
 
184
-	/**
185
-	 * @param array $transactions
186
-	 * @return CheckoutInterface
187
-	 */
184
+    /**
185
+     * @param array $transactions
186
+     * @return CheckoutInterface
187
+     */
188 188
     public function setTransactions(array $transactions): self;
189 189
 
190
-	/**
191
-	 * @return null|string
192
-	 */
190
+    /**
191
+     * @return null|string
192
+     */
193 193
     public function getToken(): ?string;
194 194
 
195
-	/**
196
-	 * @param string $token
197
-	 * @return CheckoutInterface
198
-	 */
195
+    /**
196
+     * @param string $token
197
+     * @return CheckoutInterface
198
+     */
199 199
     public function setToken(string $token): self;
200 200
 
201
-	/**
201
+    /**
202 202
      * @return bool
203
-	 */
203
+     */
204 204
     public function isValid(): bool;
205 205
 
206
-	/**
207
-	 * @param string|null $type
208
-	 * @return CheckoutInterface
209
-	 */
206
+    /**
207
+     * @param string|null $type
208
+     * @return CheckoutInterface
209
+     */
210 210
     public function setType(string $type = null): self;
211 211
 
212
-	/**
213
-	 * @return null|string
214
-	 */
212
+    /**
213
+     * @return null|string
214
+     */
215 215
     public function getType():? string;
216 216
 
217 217
     public function setInstallments(?string $installments):? self;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * @return float
44 44
 	 */
45
-    public function getAmount():? float;
45
+    public function getAmount(): ? float;
46 46
 
47 47
 	/**
48 48
 	 * @return float|null
49 49
 	 */
50
-    public function getFeeAmount():? float;
50
+    public function getFeeAmount(): ? float;
51 51
 
52 52
 	/**
53 53
 	 * @param float $amount
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	/**
147 147
 	 * @return string
148 148
 	 */
149
-    public function getValidUntil():? string;
149
+    public function getValidUntil(): ? string;
150 150
 
151 151
 	/**
152 152
 	 * @param string $timestamp
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
 	/**
213 213
 	 * @return null|string
214 214
 	 */
215
-    public function getType():? string;
215
+    public function getType(): ? string;
216 216
 
217
-    public function setInstallments(?string $installments):? self;
217
+    public function setInstallments(?string $installments): ? self;
218 218
 
219
-    public function getInstallments():? string;
219
+    public function getInstallments(): ? string;
220 220
 
221 221
 }
Please login to merge, or discard this patch.
src/OAuth/AccessToken.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $this->type = $type;
27 27
         $this->expiration = time() + $expiresIn;
28 28
 
29
-        if($scope !== null) {
29
+        if ($scope !== null) {
30 30
             $this->scope = $scope;
31 31
         }
32 32
     }
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $scopes = func_get_args();
93 93
         $diff = array_diff($scopes, $this->scope);
94
-        return count($diff)>0;
94
+        return count($diff) > 0;
95 95
     }
96 96
 }
Please login to merge, or discard this patch.
src/Traits/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @throws BadResponseException
30 30
      * @throws ConnectException
31 31
      */
32
-    public function request(string $action, $object = null, string $endpoint = null):? bool
32
+    public function request(string $action, $object = null, string $endpoint = null): ? bool
33 33
     {
34 34
         /** @var SumUpClientInterface $this */
35 35
 
Please login to merge, or discard this patch.
src/Traits/ClientInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
      * @param string|null $endpoint
18 18
      * @return bool|null
19 19
      */
20
-    public function request(string $action, $object, string $endpoint = null):? bool;
20
+    public function request(string $action, $object, string $endpoint = null): ? bool;
21 21
 }
Please login to merge, or discard this patch.
src/Traits/PropertyHandler.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -11,48 +11,48 @@
 block discarded – undo
11 11
 
12 12
 trait PropertyHandler
13 13
 {
14
-	/**
15
-	 * @param array $data
16
-	 */
14
+    /**
15
+     * @param array $data
16
+     */
17 17
     public function fillProperties(array $data): void
18
-	{
19
-		foreach ($data as $p => $v)
20
-		{
21
-			$this->fillProperty($p, $v);
22
-		}
23
-	}
18
+    {
19
+        foreach ($data as $p => $v)
20
+        {
21
+            $this->fillProperty($p, $v);
22
+        }
23
+    }
24 24
 
25
-	/**
26
-	 * @param string $property
27
-	 * @param mixed $value
28
-	 */
25
+    /**
26
+     * @param string $property
27
+     * @param mixed $value
28
+     */
29 29
     public function fillProperty(string $property, $value): void
30
-	{
31
-		$property = lcfirst(str_replace('_', '', ucwords($property, '_')));
32
-		if(property_exists(__CLASS__, $property))
33
-		{
34
-			$method = sprintf('set%s', ucfirst($property));
35
-			$this->{$method}($value);
36
-		}
37
-	}
30
+    {
31
+        $property = lcfirst(str_replace('_', '', ucwords($property, '_')));
32
+        if(property_exists(__CLASS__, $property))
33
+        {
34
+            $method = sprintf('set%s', ucfirst($property));
35
+            $this->{$method}($value);
36
+        }
37
+    }
38 38
 
39
-	/**
40
-	 * @return array
41
-	 */
39
+    /**
40
+     * @return array
41
+     */
42 42
     public function getPropertyArray(): array
43
-	{
44
-		$reflection = new \ReflectionClass(__CLASS__);
45
-		$properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED);
46
-		$data = [];
47
-		foreach($properties as $property){
48
-			$prop_name = $property->getName();
49
-			$method = sprintf('get%s', ucfirst($prop_name));
50
-			$form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name));
51
-			if($reflection->hasMethod($method)){
52
-				$data[$form_name] = $this->{$method}();
53
-			}
54
-		}
55
-		return $data;
56
-	}
43
+    {
44
+        $reflection = new \ReflectionClass(__CLASS__);
45
+        $properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED);
46
+        $data = [];
47
+        foreach($properties as $property){
48
+            $prop_name = $property->getName();
49
+            $method = sprintf('get%s', ucfirst($prop_name));
50
+            $form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name));
51
+            if($reflection->hasMethod($method)){
52
+                $data[$form_name] = $this->{$method}();
53
+            }
54
+        }
55
+        return $data;
56
+    }
57 57
 
58 58
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function fillProperty(string $property, $value): void
30 30
 	{
31 31
 		$property = lcfirst(str_replace('_', '', ucwords($property, '_')));
32
-		if(property_exists(__CLASS__, $property))
32
+		if (property_exists(__CLASS__, $property))
33 33
 		{
34 34
 			$method = sprintf('set%s', ucfirst($property));
35 35
 			$this->{$method}($value);
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 		$reflection = new \ReflectionClass(__CLASS__);
45 45
 		$properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED);
46 46
 		$data = [];
47
-		foreach($properties as $property){
47
+		foreach ($properties as $property) {
48 48
 			$prop_name = $property->getName();
49 49
 			$method = sprintf('get%s', ucfirst($prop_name));
50 50
 			$form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name));
51
-			if($reflection->hasMethod($method)){
51
+			if ($reflection->hasMethod($method)) {
52 52
 				$data[$form_name] = $this->{$method}();
53 53
 			}
54 54
 		}
Please login to merge, or discard this patch.