@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | parent::__construct($statusPhrase, $statusCode); |
69 | 69 | |
70 | - $header = sprintf('HTTP/1.1 %d %s', $statusCode, $statusPhrase); |
|
70 | + $header = sprintf('HTTP/1.1 %d %s', $statusCode, $statusPhrase); |
|
71 | 71 | |
72 | 72 | $this->addHeader($header); |
73 | 73 | $this->addHeaders($headers); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | foreach ($headers as $key => $header) { |
106 | 106 | if (!is_int($key)) { |
107 | - $header = $key.': '.$header; |
|
107 | + $header = $key . ': ' . $header; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | $this->addHeader($header); |
@@ -47,7 +47,6 @@ |
||
47 | 47 | * @param $assistedSale |
48 | 48 | * |
49 | 49 | * @return $this |
50 | - |
|
51 | 50 | */ |
52 | 51 | public function setAssistedSale($assistedSale) |
53 | 52 | { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | //1. User Object |
34 | 34 | writeLog('Creating User object'); |
35 | 35 | writeLog('Adding the address of the user'); |
36 | - $userAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
36 | + $userAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
37 | 37 | $userAddress |
38 | 38 | ->setZipCode('28031') |
39 | 39 | ->setFullName('María Sanchez Escudero') |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $orderBillingAddress = $userAddress; |
48 | 48 | |
49 | - $orderShippingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
49 | + $orderShippingAddress = new \Pagantis\OrdersApiClient\Model\Order\User\Address(); |
|
50 | 50 | $orderShippingAddress |
51 | 51 | ->setZipCode('08029') |
52 | 52 | ->setFullName('Alberto Escudero Sanchez') |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ->setUser($orderUser); |
132 | 132 | |
133 | 133 | writeLog('Creating OrdersApiClient'); |
134 | - if (PUBLIC_KEY=='' || PRIVATE_KEY == '') { |
|
134 | + if (PUBLIC_KEY == '' || PRIVATE_KEY == '') { |
|
135 | 135 | throw new \Exception('You need set the public and private key'); |
136 | 136 | } |
137 | 137 | $orderClient = new \Pagantis\OrdersApiClient\Client(PUBLIC_KEY, PRIVATE_KEY); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | // You can use our test credit cards to fill the Pagantis form |
154 | 154 | writeLog("Redirecting to Pagantis form => $url"); |
155 | - header('Location:'. $url); |
|
155 | + header('Location:' . $url); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -92,7 +92,7 @@ |
||
92 | 92 | public function setPurchaseCountry($purchaseCountry) |
93 | 93 | { |
94 | 94 | $upperPurchaseCountry = strtoupper($purchaseCountry); |
95 | - if (in_array($upperPurchaseCountry, array('IT','ES','PT','FR'))) { |
|
95 | + if (in_array($upperPurchaseCountry, array('IT', 'ES', 'PT', 'FR'))) { |
|
96 | 96 | $this->purchaseCountry = $upperPurchaseCountry; |
97 | 97 | } else { |
98 | 98 | $this->purchaseCountry = null; |
@@ -147,11 +147,11 @@ |
||
147 | 147 | $dateTime = new \DateTime(trim($dateOfBirth)); |
148 | 148 | $today = new \DateTime('today'); |
149 | 149 | if ($dateTime >= $today) { |
150 | - $this->dateOfBirth = null; |
|
150 | + $this->dateOfBirth = null; |
|
151 | 151 | } |
152 | - $this->dateOfBirth = $dateTime->format('Y-m-d'); |
|
152 | + $this->dateOfBirth = $dateTime->format('Y-m-d'); |
|
153 | 153 | } catch (\Exception $exception) { |
154 | - $this->dateOfBirth = null; |
|
154 | + $this->dateOfBirth = null; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | return $this; |