Passed
Push — master ( 2b0361...4b9b04 )
by Bruce Pinheiro de
02:58
created
src/Exception/NotAllowedProperty.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
 class NotAllowedProperty extends \RuntimeException
15 15
 {
16
-	public function __construct($object, $property, Throwable $previous = null)
17
-	{
18
-		$message = sprintf('Not allowed property %s into %s class!', $property,get_class($object));
19
-		parent::__construct($message, 100, $previous);
20
-	}
16
+    public function __construct($object, $property, Throwable $previous = null)
17
+    {
18
+        $message = sprintf('Not allowed property %s into %s class!', $property,get_class($object));
19
+        parent::__construct($message, 100, $previous);
20
+    }
21 21
 }
Please login to merge, or discard this patch.
src/Exception/InvalidCheckoutException.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 class InvalidCheckoutException extends \RuntimeException
8 8
 {
9 9
     public function __construct(CheckoutInterface $checkout, $code = 10, Throwable $previous = null)
10
-	{
11
-		$message = sprintf(<<<MSG
10
+    {
11
+        $message = sprintf(<<<MSG
12 12
 		Something is wrong with this checkout:
13 13
 		 checkout_reference: %s
14 14
 		 amount: %s
@@ -19,6 +19,6 @@  discard block
 block discarded – undo
19 19
             $checkout->getAmount(),
20 20
             $checkout->getPayToEmail()
21 21
         );
22
-		parent::__construct($message, $code, $previous);
23
-	}
22
+        parent::__construct($message, $code, $previous);
23
+    }
24 24
 }
Please login to merge, or discard this patch.
src/Checkout/CheckoutClientInterface.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 interface CheckoutClientInterface extends SumUpClientInterface
8 8
 {
9
-	/**
9
+    /**
10 10
      * Create a checkout
11 11
      *
12 12
      * @param CheckoutInterface $checkout
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @param CheckoutInterface $checkout
29 29
      * @return string
30
-	 */
30
+     */
31 31
     static function getCompleteUrl(CheckoutInterface $checkout): string;
32 32
 
33 33
 }
Please login to merge, or discard this patch.
src/SumUp.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,29 +7,29 @@
 block discarded – undo
7 7
 
8 8
 class SumUp
9 9
 {
10
-	const VERSION = 'v0.1';
11
-	const ENTRYPOINT = 'https://api.sumup.com/';
10
+    const VERSION = 'v0.1';
11
+    const ENTRYPOINT = 'https://api.sumup.com/';
12 12
 
13
-	/**
13
+    /**
14 14
      * @param array $options
15 15
      * @return ClientInterface
16
-	 */
16
+     */
17 17
     static function getClient(array $options = []): ClientInterface
18
-	{
18
+    {
19 19
         $options = array_merge_recursive(
20
-			[
21
-				'base_uri' => self::getEntrypoint(),
22
-				'timeout' => 2
20
+            [
21
+                'base_uri' => self::getEntrypoint(),
22
+                'timeout' => 2
23 23
             ],
24 24
             $options
25
-		);
25
+        );
26 26
 
27 27
         return new Client($options);
28
-	}
28
+    }
29 29
 
30
-	static function getEntrypoint(): string
31
-	{
32
-		return self::ENTRYPOINT.self::VERSION.'/';
33
-	}
30
+    static function getEntrypoint(): string
31
+    {
32
+        return self::ENTRYPOINT.self::VERSION.'/';
33
+    }
34 34
 }
35 35
 
Please login to merge, or discard this patch.
src/OAuth/AuthenticationHelper.php 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -11,107 +11,107 @@
 block discarded – undo
11 11
     const OAUTH_AUTHORIZATION = '/authorize';
12 12
     const OAUTH_TOKEN = '/token';
13 13
 
14
-	/**
15
-	 * Generate an url to merchant authorization.
16
-	 *
17
-	 * @param ContextInterface $context
18
-	 * @return string
19
-	 */
14
+    /**
15
+     * Generate an url to merchant authorization.
16
+     *
17
+     * @param ContextInterface $context
18
+     * @return string
19
+     */
20 20
     public static function getAuthorizationURL(ContextInterface $context)
21
-	{
22
-		$queryString = [
23
-			'client_id' => $context->getClientId(),
24
-			'client_secret' => $context->getClientSecret(),
25
-			'redirect_uri' => $context->getRedirectUri(),
26
-			'response_type' => 'code',
27
-		];
28
-
29
-		return SumUp::ENTRYPOINT . self::OAUTH_AUTHORIZATION . '?' . http_build_query($queryString);
30
-	}
31
-
32
-	/**
33
-	 * Request an acess token from sumup services.
34
-	 *
21
+    {
22
+        $queryString = [
23
+            'client_id' => $context->getClientId(),
24
+            'client_secret' => $context->getClientSecret(),
25
+            'redirect_uri' => $context->getRedirectUri(),
26
+            'response_type' => 'code',
27
+        ];
28
+
29
+        return SumUp::ENTRYPOINT . self::OAUTH_AUTHORIZATION . '?' . http_build_query($queryString);
30
+    }
31
+
32
+    /**
33
+     * Request an acess token from sumup services.
34
+     *
35 35
      * @param ContextInterface $context
36 36
      * @param array|null $scopes
37 37
      * @param array $options
38 38
      * @return \BPCI\SumUp\OAuth\AccessToken
39
-	 */
39
+     */
40 40
     public static function getAccessToken(
41 41
         ContextInterface $context,
42 42
         array $scopes = null,
43 43
         array $options = []
44 44
     ): AccessToken
45
-	{
46
-		$formParams = [
47
-			'grant_type' => 'client_credentials',
48
-			'client_id' => $context->getClientId(),
49
-			'client_secret' => $context->getClientSecret(),
50
-		];
45
+    {
46
+        $formParams = [
47
+            'grant_type' => 'client_credentials',
48
+            'client_id' => $context->getClientId(),
49
+            'client_secret' => $context->getClientSecret(),
50
+        ];
51 51
 
52
-		if ($scopes !== null) {
53
-			$formParams['scope'] = implode(',', $scopes);
54
-		}
52
+        if ($scopes !== null) {
53
+            $formParams['scope'] = implode(',', $scopes);
54
+        }
55 55
 
56 56
         $client = SumUp::getClient($options);
57 57
 
58
-		$response = $client->request(
59
-			'POST',
60
-			self::OAUTH_TOKEN,
61
-			[
62
-				'form_params' => $formParams,
63
-			]);
64
-
65
-		$code = $response->getStatusCode();
66
-		if ($code !== 200) {
67
-			$message = " Request code: $code \n Message: " . $response->getReasonPhrase();
68
-			throw new BadRequestException($message);
69
-		}
70
-
71
-		$body = json_decode($response->getBody()->getContents(), true);
72
-		$token_params = [
73
-			$body['access_token'],
74
-			$body['token_type'],
75
-			$body['expires_in'],
76
-		];
77
-
78
-		if (isset($body['scope'])) {
79
-			$token_params[] = $body['scope'];
80
-		}
81
-
82
-		return new AccessToken(...$token_params);
83
-	}
84
-
85
-	/**
86
-	 * If available check token or generate a new token
87
-	 *
88
-	 * @param ContextInterface $context
89
-	 * @param AccessToken $token
90
-	 * @param array $scopes
58
+        $response = $client->request(
59
+            'POST',
60
+            self::OAUTH_TOKEN,
61
+            [
62
+                'form_params' => $formParams,
63
+            ]);
64
+
65
+        $code = $response->getStatusCode();
66
+        if ($code !== 200) {
67
+            $message = " Request code: $code \n Message: " . $response->getReasonPhrase();
68
+            throw new BadRequestException($message);
69
+        }
70
+
71
+        $body = json_decode($response->getBody()->getContents(), true);
72
+        $token_params = [
73
+            $body['access_token'],
74
+            $body['token_type'],
75
+            $body['expires_in'],
76
+        ];
77
+
78
+        if (isset($body['scope'])) {
79
+            $token_params[] = $body['scope'];
80
+        }
81
+
82
+        return new AccessToken(...$token_params);
83
+    }
84
+
85
+    /**
86
+     * If available check token or generate a new token
87
+     *
88
+     * @param ContextInterface $context
89
+     * @param AccessToken $token
90
+     * @param array $scopes
91 91
      * @param array $options
92 92
      *
93 93
      * @return \BPCI\SumUp\OAuth\AccessToken
94
-	 */
94
+     */
95 95
     public static function getValidToken(
96 96
         ContextInterface $context,
97 97
         AccessToken $token = null,
98 98
         array $scopes = null,
99 99
         array $options = []
100 100
     ): AccessToken
101
-	{
102
-		if ($token === null || !$token->isValid()) {
101
+    {
102
+        if ($token === null || !$token->isValid()) {
103 103
             $token = AuthenticationHelper::getAccessToken($context, $scopes, $options);
104
-		}
105
-
106
-		return $token;
107
-	}
108
-
109
-	public static function getOAuthHeader(AccessToken $token): array
110
-	{
111
-		return [
112
-			'headers' => [
113
-				'Authorization' => $token->getType() . ' ' . $token->getToken(),
114
-			],
115
-		];
116
-	}
104
+        }
105
+
106
+        return $token;
107
+    }
108
+
109
+    public static function getOAuthHeader(AccessToken $token): array
110
+    {
111
+        return [
112
+            'headers' => [
113
+                'Authorization' => $token->getType() . ' ' . $token->getToken(),
114
+            ],
115
+        ];
116
+    }
117 117
 }
Please login to merge, or discard this patch.
src/Customer/Address.php 1 patch
Indentation   +372 added lines, -372 removed lines patch added patch discarded remove patch
@@ -8,390 +8,390 @@
 block discarded – undo
8 8
  */
9 9
 class Address implements AddressInterface
10 10
 {
11
-	/**
12
-	 * First address line
13
-	 *
14
-	 * @var string $line1
15
-	 */
16
-	protected $line1;
17
-	/**
18
-	 * Second address line
19
-	 *
20
-	 * @var string
21
-	 */
22
-	protected $line2;
23
-	/**
24
-	 * Address Country
25
-	 *
26
-	 * @var string
27
-	 */
28
-	protected $country;
29
-	/**
30
-	 * Address postal code
31
-	 *
32
-	 * @var string
33
-	 */
34
-	protected $postalCode;
35
-	/**
36
-	 * Address City
37
-	 *
38
-	 * @var string
39
-	 */
40
-	protected $city;
41
-	/**
42
-	 * @var string
43
-	 */
44
-	protected $countryEnName;
45
-	/**
46
-	 * @var string
47
-	 */
48
-	protected $countryNativeName;
49
-	/**
50
-	 * @var integer
51
-	 */
52
-	protected $regionId;
53
-	/**
54
-	 * @var string
55
-	 */
56
-	protected $regionName;
57
-	/**
58
-	 * @var string
59
-	 */
60
-	protected $postCode;
61
-	/**
62
-	 * @var string
63
-	 */
64
-	protected $landline;
65
-	/**
66
-	 * @var string
67
-	 */
68
-	protected $addressLine1;
69
-	/**
70
-	 * @var string
71
-	 */
72
-	protected $addressLine2;
73
-	/**
74
-	 * Address State
75
-	 *
76
-	 * @var string
77
-	 */
78
-	protected $state;
79
-
80
-	/**
81
-	 * Address constructor.
82
-	 * @param array|null $data
83
-	 */
11
+    /**
12
+     * First address line
13
+     *
14
+     * @var string $line1
15
+     */
16
+    protected $line1;
17
+    /**
18
+     * Second address line
19
+     *
20
+     * @var string
21
+     */
22
+    protected $line2;
23
+    /**
24
+     * Address Country
25
+     *
26
+     * @var string
27
+     */
28
+    protected $country;
29
+    /**
30
+     * Address postal code
31
+     *
32
+     * @var string
33
+     */
34
+    protected $postalCode;
35
+    /**
36
+     * Address City
37
+     *
38
+     * @var string
39
+     */
40
+    protected $city;
41
+    /**
42
+     * @var string
43
+     */
44
+    protected $countryEnName;
45
+    /**
46
+     * @var string
47
+     */
48
+    protected $countryNativeName;
49
+    /**
50
+     * @var integer
51
+     */
52
+    protected $regionId;
53
+    /**
54
+     * @var string
55
+     */
56
+    protected $regionName;
57
+    /**
58
+     * @var string
59
+     */
60
+    protected $postCode;
61
+    /**
62
+     * @var string
63
+     */
64
+    protected $landline;
65
+    /**
66
+     * @var string
67
+     */
68
+    protected $addressLine1;
69
+    /**
70
+     * @var string
71
+     */
72
+    protected $addressLine2;
73
+    /**
74
+     * Address State
75
+     *
76
+     * @var string
77
+     */
78
+    protected $state;
79
+
80
+    /**
81
+     * Address constructor.
82
+     * @param array|null $data
83
+     */
84 84
     public function __construct(?array $data = [])
85
-	{
86
-		$this->setAddressLine1($data['address_line1']??null);
87
-		$this->setAddressLine2($data['address_line2']??null);
88
-		$this->setCity($data['city']??null);
89
-		$this->setCountry($data['country']??null);
90
-		$this->setCountryEnName($data['country_en_name']??null);
91
-		$this->setCountryNativeName($data['country_native_name']??null);
92
-		$this->setRegionId($data['region_id']??null);
93
-		$this->setRegionName($data['region_name']??null);
94
-		$this->setPostCode($data['post_code']??null);
95
-		$this->setLandline($data['landline']??null);
96
-		$this->setLine1($data['line1']??null);
97
-		$this->setLine2($data['line2']??null);
98
-		$this->setPostalCode($data['postal_code']??null);
99
-		$this->setState($data['state']??null);
100
-	}
101
-
102
-	/**
103
-	 * Get $line1
104
-	 *
105
-	 * @return  string
106
-	 */
107
-	public function getLine1(): ?string
108
-	{
109
-		return $this->line1;
110
-	}
111
-
112
-	/**
113
-	 * Set $line1
114
-	 *
115
-	 * @param  string  $line1  $line1
116
-	 *
117
-	 * @return  AddressInterface
118
-	 */
119
-	public function setLine1(?string $line1): AddressInterface
120
-	{
121
-		$this->line1 = $line1;
122
-
123
-		return $this;
124
-	}
125
-
126
-	/**
127
-	 * Get second address line
128
-	 *
129
-	 * @return  string
130
-	 */
131
-	public function getLine2(): ?string
132
-	{
133
-		return $this->line2;
134
-	}
135
-
136
-	/**
137
-	 * Set second address line
138
-	 *
139
-	 * @param  string  $line2  Second address line
140
-	 *
141
-	 * @return  AddressInterface
142
-	 */
143
-	public function setLine2(?string $line2): AddressInterface
144
-	{
145
-		$this->line2 = $line2;
146
-
147
-		return $this;
148
-	}
149
-
150
-	/**
151
-	 * Get address Country
152
-	 *
153
-	 * @return  string
154
-	 */
155
-	public function getCountry(): ?string
156
-	{
157
-		return $this->country;
158
-	}
159
-
160
-	/**
161
-	 * Set address Country
162
-	 *
163
-	 * @param  string  $country  Address Country
164
-	 *
165
-	 * @return  AddressInterface
166
-	 */
167
-	public function setCountry(?string $country): AddressInterface
168
-	{
169
-		$this->country = $country;
170
-
171
-		return $this;
172
-	}
173
-
174
-	/**
175
-	 * Get address postal code
176
-	 *
177
-	 * @return  string
178
-	 */
179
-	public function getPostalCode(): ?string
180
-	{
181
-		return $this->postalCode;
182
-	}
183
-
184
-	/**
185
-	 * Set address postal code
186
-	 *
187
-	 * @param  string  $postalCode  Address postal code
188
-	 *
189
-	 * @return  AddressInterface
190
-	 */
191
-	public function setPostalCode(?string $postalCode): AddressInterface
192
-	{
193
-		$this->postalCode = $postalCode;
194
-
195
-		return $this;
196
-	}
197
-
198
-	/**
199
-	 * Get address City
200
-	 *
201
-	 * @return  string
202
-	 */
203
-	public function getCity(): ?string
204
-	{
205
-		return $this->city;
206
-	}
207
-
208
-	/**
209
-	 * Set address City
210
-	 *
211
-	 * @param  string  $city  Address City
212
-	 *
213
-	 * @return  AddressInterface
214
-	 */
215
-	public function setCity(?string $city): AddressInterface
216
-	{
217
-		$this->city = $city;
218
-
219
-		return $this;
220
-	}
221
-
222
-	/**
223
-	 * @return mixed
224
-	 */
225
-	public function getCountryEnName():? string
226
-	{
227
-		return $this->countryEnName;
228
-	}
229
-
230
-	/**
231
-	 * @param mixed $countryEnName
232
-	 * @return AddressInterface
233
-	 */
234
-	public function setCountryEnName($countryEnName): AddressInterface
235
-	{
236
-		$this->countryEnName = $countryEnName;
237
-
238
-		return $this;
239
-	}
240
-
241
-	/**
242
-	 * @return mixed
243
-	 */
244
-	public function getCountryNativeName():? string
245
-	{
246
-		return $this->countryNativeName;
247
-	}
85
+    {
86
+        $this->setAddressLine1($data['address_line1']??null);
87
+        $this->setAddressLine2($data['address_line2']??null);
88
+        $this->setCity($data['city']??null);
89
+        $this->setCountry($data['country']??null);
90
+        $this->setCountryEnName($data['country_en_name']??null);
91
+        $this->setCountryNativeName($data['country_native_name']??null);
92
+        $this->setRegionId($data['region_id']??null);
93
+        $this->setRegionName($data['region_name']??null);
94
+        $this->setPostCode($data['post_code']??null);
95
+        $this->setLandline($data['landline']??null);
96
+        $this->setLine1($data['line1']??null);
97
+        $this->setLine2($data['line2']??null);
98
+        $this->setPostalCode($data['postal_code']??null);
99
+        $this->setState($data['state']??null);
100
+    }
101
+
102
+    /**
103
+     * Get $line1
104
+     *
105
+     * @return  string
106
+     */
107
+    public function getLine1(): ?string
108
+    {
109
+        return $this->line1;
110
+    }
111
+
112
+    /**
113
+     * Set $line1
114
+     *
115
+     * @param  string  $line1  $line1
116
+     *
117
+     * @return  AddressInterface
118
+     */
119
+    public function setLine1(?string $line1): AddressInterface
120
+    {
121
+        $this->line1 = $line1;
122
+
123
+        return $this;
124
+    }
125
+
126
+    /**
127
+     * Get second address line
128
+     *
129
+     * @return  string
130
+     */
131
+    public function getLine2(): ?string
132
+    {
133
+        return $this->line2;
134
+    }
135
+
136
+    /**
137
+     * Set second address line
138
+     *
139
+     * @param  string  $line2  Second address line
140
+     *
141
+     * @return  AddressInterface
142
+     */
143
+    public function setLine2(?string $line2): AddressInterface
144
+    {
145
+        $this->line2 = $line2;
146
+
147
+        return $this;
148
+    }
149
+
150
+    /**
151
+     * Get address Country
152
+     *
153
+     * @return  string
154
+     */
155
+    public function getCountry(): ?string
156
+    {
157
+        return $this->country;
158
+    }
159
+
160
+    /**
161
+     * Set address Country
162
+     *
163
+     * @param  string  $country  Address Country
164
+     *
165
+     * @return  AddressInterface
166
+     */
167
+    public function setCountry(?string $country): AddressInterface
168
+    {
169
+        $this->country = $country;
170
+
171
+        return $this;
172
+    }
173
+
174
+    /**
175
+     * Get address postal code
176
+     *
177
+     * @return  string
178
+     */
179
+    public function getPostalCode(): ?string
180
+    {
181
+        return $this->postalCode;
182
+    }
183
+
184
+    /**
185
+     * Set address postal code
186
+     *
187
+     * @param  string  $postalCode  Address postal code
188
+     *
189
+     * @return  AddressInterface
190
+     */
191
+    public function setPostalCode(?string $postalCode): AddressInterface
192
+    {
193
+        $this->postalCode = $postalCode;
194
+
195
+        return $this;
196
+    }
197
+
198
+    /**
199
+     * Get address City
200
+     *
201
+     * @return  string
202
+     */
203
+    public function getCity(): ?string
204
+    {
205
+        return $this->city;
206
+    }
207
+
208
+    /**
209
+     * Set address City
210
+     *
211
+     * @param  string  $city  Address City
212
+     *
213
+     * @return  AddressInterface
214
+     */
215
+    public function setCity(?string $city): AddressInterface
216
+    {
217
+        $this->city = $city;
218
+
219
+        return $this;
220
+    }
221
+
222
+    /**
223
+     * @return mixed
224
+     */
225
+    public function getCountryEnName():? string
226
+    {
227
+        return $this->countryEnName;
228
+    }
229
+
230
+    /**
231
+     * @param mixed $countryEnName
232
+     * @return AddressInterface
233
+     */
234
+    public function setCountryEnName($countryEnName): AddressInterface
235
+    {
236
+        $this->countryEnName = $countryEnName;
237
+
238
+        return $this;
239
+    }
240
+
241
+    /**
242
+     * @return mixed
243
+     */
244
+    public function getCountryNativeName():? string
245
+    {
246
+        return $this->countryNativeName;
247
+    }
248 248
 
249 249
     /**
250 250
      * @param mixed $countryNativeName
251 251
      * @return AddressInterface
252 252
      */
253
-	public function setCountryNativeName(?string $countryNativeName): AddressInterface
254
-	{
255
-		$this->countryNativeName = $countryNativeName;
253
+    public function setCountryNativeName(?string $countryNativeName): AddressInterface
254
+    {
255
+        $this->countryNativeName = $countryNativeName;
256 256
 
257
-		return $this;
258
-	}
257
+        return $this;
258
+    }
259 259
 
260
-	/**
260
+    /**
261 261
      * @return int|null
262
-	 */
262
+     */
263 263
     public function getRegionId():? int
264
-	{
265
-		return $this->regionId;
266
-	}
264
+    {
265
+        return $this->regionId;
266
+    }
267 267
 
268
-	/**
268
+    /**
269 269
      * @param int|null $regionId
270 270
      * @return AddressInterface
271
-	 */
271
+     */
272 272
     public function setRegionId(?int $regionId): AddressInterface
273
-	{
274
-		$this->regionId = $regionId;
275
-
276
-		return $this;
277
-	}
278
-
279
-	/**
280
-	 * @return string|null
281
-	 */
282
-	public function getRegionName():? string
283
-	{
284
-		return $this->regionName;
285
-	}
286
-
287
-	/**
288
-	 * @param string|null $regionName
289
-	 * @return AddressInterface
290
-	 */
291
-	public function setRegionName(?string $regionName): AddressInterface
292
-	{
293
-		$this->regionName = $regionName;
294
-
295
-		return $this;
296
-	}
297
-
298
-	/**
299
-	 * @return string|null
300
-	 */
301
-	public function getPostCode():? string
302
-	{
303
-		return $this->postCode;
304
-	}
305
-
306
-	/**
307
-	 * @param string|null $postCode
308
-	 * @return AddressInterface
309
-	 */
310
-	public function setPostCode(?string $postCode): AddressInterface
311
-	{
312
-		$this->postCode = $postCode;
313
-
314
-		return $this;
315
-	}
316
-
317
-	/**
318
-	 * @return string|null
319
-	 */
320
-	public function getLandline():? string
321
-	{
322
-		return $this->landline;
323
-	}
324
-
325
-	/**
326
-	 * @param string|null $landline
327
-	 * @return AddressInterface
328
-	 */
329
-	public function setLandline(?string $landline): AddressInterface
330
-	{
331
-		$this->landline = $landline;
332
-
333
-		return $this;
334
-	}
335
-
336
-	/**
337
-	 * @return string|null
338
-	 */
339
-	public function getAddressLine1():? string
340
-	{
341
-		return $this->addressLine1;
342
-	}
343
-
344
-	/**
345
-	 * @param string|null $addressLine1
346
-	 * @return AddressInterface
347
-	 */
348
-	public function setAddressLine1(?string $addressLine1): AddressInterface
349
-	{
350
-		$this->addressLine1 = $addressLine1;
351
-
352
-		return $this;
353
-	}
354
-
355
-	/**
356
-	 * @return string|null
357
-	 */
358
-	public function getAddressLine2():? string
359
-	{
360
-		return $this->addressLine2;
361
-	}
362
-
363
-	/**
364
-	 * @param string|null $addressLine2
365
-	 * @return AddressInterface
366
-	 */
367
-	public function setAddressLine2(?string $addressLine2): AddressInterface
368
-	{
369
-		$this->addressLine2 = $addressLine2;
370
-
371
-		return $this;
372
-	}
373
-
374
-	/**
375
-	 * Get address State
376
-	 *
377
-	 * @return  string|null
378
-	 */
379
-	public function getState(): ?string
380
-	{
381
-		return $this->state;
382
-	}
383
-
384
-	/**
385
-	 * Set address State
386
-	 *
387
-	 * @param  string|null  $state  Address State
388
-	 *
389
-	 * @return  AddressInterface
390
-	 */
391
-	public function setState(?string $state): AddressInterface
392
-	{
393
-		$this->state = $state;
394
-
395
-		return $this;
396
-	}
273
+    {
274
+        $this->regionId = $regionId;
275
+
276
+        return $this;
277
+    }
278
+
279
+    /**
280
+     * @return string|null
281
+     */
282
+    public function getRegionName():? string
283
+    {
284
+        return $this->regionName;
285
+    }
286
+
287
+    /**
288
+     * @param string|null $regionName
289
+     * @return AddressInterface
290
+     */
291
+    public function setRegionName(?string $regionName): AddressInterface
292
+    {
293
+        $this->regionName = $regionName;
294
+
295
+        return $this;
296
+    }
297
+
298
+    /**
299
+     * @return string|null
300
+     */
301
+    public function getPostCode():? string
302
+    {
303
+        return $this->postCode;
304
+    }
305
+
306
+    /**
307
+     * @param string|null $postCode
308
+     * @return AddressInterface
309
+     */
310
+    public function setPostCode(?string $postCode): AddressInterface
311
+    {
312
+        $this->postCode = $postCode;
313
+
314
+        return $this;
315
+    }
316
+
317
+    /**
318
+     * @return string|null
319
+     */
320
+    public function getLandline():? string
321
+    {
322
+        return $this->landline;
323
+    }
324
+
325
+    /**
326
+     * @param string|null $landline
327
+     * @return AddressInterface
328
+     */
329
+    public function setLandline(?string $landline): AddressInterface
330
+    {
331
+        $this->landline = $landline;
332
+
333
+        return $this;
334
+    }
335
+
336
+    /**
337
+     * @return string|null
338
+     */
339
+    public function getAddressLine1():? string
340
+    {
341
+        return $this->addressLine1;
342
+    }
343
+
344
+    /**
345
+     * @param string|null $addressLine1
346
+     * @return AddressInterface
347
+     */
348
+    public function setAddressLine1(?string $addressLine1): AddressInterface
349
+    {
350
+        $this->addressLine1 = $addressLine1;
351
+
352
+        return $this;
353
+    }
354
+
355
+    /**
356
+     * @return string|null
357
+     */
358
+    public function getAddressLine2():? string
359
+    {
360
+        return $this->addressLine2;
361
+    }
362
+
363
+    /**
364
+     * @param string|null $addressLine2
365
+     * @return AddressInterface
366
+     */
367
+    public function setAddressLine2(?string $addressLine2): AddressInterface
368
+    {
369
+        $this->addressLine2 = $addressLine2;
370
+
371
+        return $this;
372
+    }
373
+
374
+    /**
375
+     * Get address State
376
+     *
377
+     * @return  string|null
378
+     */
379
+    public function getState(): ?string
380
+    {
381
+        return $this->state;
382
+    }
383
+
384
+    /**
385
+     * Set address State
386
+     *
387
+     * @param  string|null  $state  Address State
388
+     *
389
+     * @return  AddressInterface
390
+     */
391
+    public function setState(?string $state): AddressInterface
392
+    {
393
+        $this->state = $state;
394
+
395
+        return $this;
396
+    }
397 397
 }
Please login to merge, or discard this patch.
src/Customer/CustomerClient.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
     protected $options = [];
24 24
 
25 25
     /**
26
-	 * CheckoutClientInterface constructor.
27
-	 * @param ContextInterface $context
26
+     * CheckoutClientInterface constructor.
27
+     * @param ContextInterface $context
28 28
      * @param array $options
29 29
      */
30 30
     public function __construct(ContextInterface $context, ?array $options = [])
31
-	{
32
-		$this->context = $context;
31
+    {
32
+        $this->context = $context;
33 33
         $this->options = $options;
34
-	}
34
+    }
35 35
 
36 36
     /**
37 37
      * @param $customer
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
     }
84 84
 
85 85
     public function getLastResponse(): ResponseInterface
86
-	{
87
-		return $this->lastResponse;
88
-	}
86
+    {
87
+        return $this->lastResponse;
88
+    }
89 89
 
90 90
     /**
91 91
      * @param ResponseInterface $response
Please login to merge, or discard this patch.
src/Customer/PaymentInstrument/PaymentInstrumentClient.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
         return null;
56 56
     }
57 57
 
58
-	/**
58
+    /**
59 59
      * Retrieve a paymentInstrument from server and fill the $paymentInstrument Object with response.
60
-	 *
61
-	 */
60
+     *
61
+     */
62 62
     public function get(): array
63 63
     {
64 64
         $response = [];
@@ -70,20 +70,20 @@  discard block
 block discarded – undo
70 70
         };
71 71
 
72 72
         return $response;
73
-	}
73
+    }
74 74
 
75
-	/**
75
+    /**
76 76
      * Delete an paymentInstrument from server.
77
-	 *
77
+     *
78 78
      * @param PaymentInstrumentInterface $paymentInstrument
79 79
      * @return bool
80
-	 */
80
+     */
81 81
     public function disable(PaymentInstrumentInterface $paymentInstrument):?bool
82 82
     {
83 83
         $uri = $this->getEndPoint().'/'.$paymentInstrument->getToken();
84 84
 
85 85
         return $this->request('delete', $paymentInstrument, $uri);
86
-	}
86
+    }
87 87
 
88 88
     /**
89 89
      * @return string
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
         return 'customers/'.$this->customer->getCustomerId().'/payment-instruments';
94 94
     }
95 95
 
96
-	/**
97
-	 * Return last response of client
98
-	 * @return ResponseInterface
99
-	 */
96
+    /**
97
+     * Return last response of client
98
+     * @return ResponseInterface
99
+     */
100 100
     public function getLastResponse(): ResponseInterface
101
-	{
101
+    {
102 102
         return $this->lastResponse;
103
-	}
103
+    }
104 104
 
105 105
     /**
106 106
      * @param ResponseInterface $response
Please login to merge, or discard this patch.
src/Customer/Customer.php 1 patch
Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -4,132 +4,132 @@
 block discarded – undo
4 4
 
5 5
 class Customer implements CustomerInterface
6 6
 {
7
-	/**
8
-	 * Customer SumUp ID
9
-	 *
10
-	 * @var string
11
-	 */
12
-	protected $customerId;
13
-
14
-	/**
15
-	 * Customer Name
16
-	 *
17
-	 * @var string
18
-	 */
19
-	protected $name;
20
-
21
-	/**
22
-	 * Customer phone
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $phone;
27
-
28
-	/**
29
-	 * Cusomter address
30
-	 *
31
-	 * @var AddressInterface
32
-	 */
33
-	protected $address;
7
+    /**
8
+     * Customer SumUp ID
9
+     *
10
+     * @var string
11
+     */
12
+    protected $customerId;
13
+
14
+    /**
15
+     * Customer Name
16
+     *
17
+     * @var string
18
+     */
19
+    protected $name;
20
+
21
+    /**
22
+     * Customer phone
23
+     *
24
+     * @var string
25
+     */
26
+    protected $phone;
27
+
28
+    /**
29
+     * Cusomter address
30
+     *
31
+     * @var AddressInterface
32
+     */
33
+    protected $address;
34 34
 
35 35
     public function __construct(?array $data = [])
36
-	{
37
-		$this->setCustomerId($data['customer_id']??null);
38
-		$personal_details = $data['personal_details']??$data;
39
-		$this->setName($personal_details['name']??null);
40
-		$this->setPhone($personal_details['phone']??null);
41
-		$this->setAddress(new Address($personal_details['address']??null));
42
-	}
43
-
44
-	/**
45
-	 * Get customer SumUp ID
46
-	 *
47
-	 * @return  string
48
-	 */
49
-	public function getCustomerId(): ?string
50
-	{
51
-		return $this->customerId;
52
-	}
53
-
54
-	/**
55
-	 * Set customer SumUp ID
56
-	 *
57
-	 * @param  string $customerId Customer SumUp ID
58
-	 * @return CustomerInterface
59
-	 */
60
-	public function setCustomerId(?string $customerId): CustomerInterface
61
-	{
62
-		$this->customerId = $customerId;
63
-
64
-		return $this;
65
-	}
66
-
67
-	/**
68
-	 * Get customer Name
69
-	 *
70
-	 * @return  string
71
-	 */
72
-	public function getName(): ?string
73
-	{
74
-		return $this->name;
75
-	}
76
-
77
-	/**
78
-	 * Set customer Name
79
-	 *
36
+    {
37
+        $this->setCustomerId($data['customer_id']??null);
38
+        $personal_details = $data['personal_details']??$data;
39
+        $this->setName($personal_details['name']??null);
40
+        $this->setPhone($personal_details['phone']??null);
41
+        $this->setAddress(new Address($personal_details['address']??null));
42
+    }
43
+
44
+    /**
45
+     * Get customer SumUp ID
46
+     *
47
+     * @return  string
48
+     */
49
+    public function getCustomerId(): ?string
50
+    {
51
+        return $this->customerId;
52
+    }
53
+
54
+    /**
55
+     * Set customer SumUp ID
56
+     *
57
+     * @param  string $customerId Customer SumUp ID
58
+     * @return CustomerInterface
59
+     */
60
+    public function setCustomerId(?string $customerId): CustomerInterface
61
+    {
62
+        $this->customerId = $customerId;
63
+
64
+        return $this;
65
+    }
66
+
67
+    /**
68
+     * Get customer Name
69
+     *
70
+     * @return  string
71
+     */
72
+    public function getName(): ?string
73
+    {
74
+        return $this->name;
75
+    }
76
+
77
+    /**
78
+     * Set customer Name
79
+     *
80 80
      * @param  string $name Customer Name
81 81
      * @return Customer|CustomerInterface
82
-	 */
83
-	public function setName(?string $name): CustomerInterface
84
-	{
85
-		$this->name = $name;
86
-
87
-		return $this;
88
-	}
89
-
90
-	/**
91
-	 * Get customer phone
92
-	 *
93
-	 * @return  string
94
-	 */
95
-	public function getPhone(): ?string
96
-	{
97
-		return $this->phone;
98
-	}
99
-
100
-	/**
101
-	 * Set customer phone
102
-	 *
82
+     */
83
+    public function setName(?string $name): CustomerInterface
84
+    {
85
+        $this->name = $name;
86
+
87
+        return $this;
88
+    }
89
+
90
+    /**
91
+     * Get customer phone
92
+     *
93
+     * @return  string
94
+     */
95
+    public function getPhone(): ?string
96
+    {
97
+        return $this->phone;
98
+    }
99
+
100
+    /**
101
+     * Set customer phone
102
+     *
103 103
      * @param  string $phone Customer phone
104 104
      * @return Customer|CustomerInterface
105
-	 */
106
-	public function setPhone(?string $phone): CustomerInterface
107
-	{
108
-		$this->phone = $phone;
109
-
110
-		return $this;
111
-	}
112
-
113
-	/**
114
-	 * Get cusomter address
115
-	 *
116
-	 * @return  AddressInterface
117
-	 */
118
-	public function getAddress(): AddressInterface
119
-	{
120
-		return $this->address;
121
-	}
122
-
123
-	/**
124
-	 * Set cusomter address
125
-	 *
126
-	 * @param AddressInterface $address
127
-	 * @return Customer|CustomerInterface
128
-	 */
129
-	public function setAddress(AddressInterface $address): CustomerInterface
130
-	{
131
-		$this->address = $address;
132
-		return $this;
133
-	}
105
+     */
106
+    public function setPhone(?string $phone): CustomerInterface
107
+    {
108
+        $this->phone = $phone;
109
+
110
+        return $this;
111
+    }
112
+
113
+    /**
114
+     * Get cusomter address
115
+     *
116
+     * @return  AddressInterface
117
+     */
118
+    public function getAddress(): AddressInterface
119
+    {
120
+        return $this->address;
121
+    }
122
+
123
+    /**
124
+     * Set cusomter address
125
+     *
126
+     * @param AddressInterface $address
127
+     * @return Customer|CustomerInterface
128
+     */
129
+    public function setAddress(AddressInterface $address): CustomerInterface
130
+    {
131
+        $this->address = $address;
132
+        return $this;
133
+    }
134 134
 
135 135
 }
Please login to merge, or discard this patch.