@@ -69,7 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | header("HTTP/1.1 ".$this->getStatusCode(), true, $this->getStatusCode()); |
| 71 | 71 | header('Content-Type: application/json', true); |
| 72 | - header('Content-Length: ' . strlen($this->toJson())); |
|
| 72 | + header('Content-Length: '.strlen($this->toJson())); |
|
| 73 | 73 | echo ($this->toJson()); |
| 74 | 74 | exit(); |
| 75 | 75 | } |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | $query = http_build_query(array_filter($array)); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - return empty($query) ? '' : '?' . $query; |
|
| 82 | + return empty($query) ? '' : '?'.$query; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -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 | { |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * @var array $allowedCountries |
| 32 | 32 | */ |
| 33 | - private $allowedCountries = array('IT','ES','PT','FR'); |
|
| 33 | + private $allowedCountries = array('IT', 'ES', 'PT', 'FR'); |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Configuration constructor. |
@@ -67,7 +67,7 @@ |
||
| 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); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public function testGetOrders() |
| 51 | 51 | { |
| 52 | 52 | $orderJson = file_get_contents($this->resourcePath.'Order.json'); |
| 53 | - $arrayOfOrders = '[' . $orderJson . ',' . $orderJson . ',' .$orderJson . ']'; |
|
| 53 | + $arrayOfOrders = '['.$orderJson.','.$orderJson.','.$orderJson.']'; |
|
| 54 | 54 | $responseMock = $this->getMockBuilder('Httpful\Response')->disableOriginalConstructor()->getMock(); |
| 55 | 55 | $responseMockReflect = new \ReflectionClass('Httpful\Response'); |
| 56 | 56 | $property = $responseMockReflect->getProperty('body'); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $request = $property->getValue($listOrdersMethod); |
| 102 | 102 | $this->assertInstanceOf('Httpful\Request', $request); |
| 103 | 103 | $this->assertSame(Http::GET, $request->method); |
| 104 | - $uri = $url . ListOrdersMethod::ENDPOINT . '?' . http_build_query($queryParameters); |
|
| 104 | + $uri = $url.ListOrdersMethod::ENDPOINT.'?'.http_build_query($queryParameters); |
|
| 105 | 105 | $this->assertSame($uri, $request->uri); |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -97,11 +97,11 @@ |
||
| 97 | 97 | $this->assertInstanceOf('Httpful\Request', $request); |
| 98 | 98 | $this->assertSame(Http::PUT, $request->method); |
| 99 | 99 | $uri = |
| 100 | - $url . |
|
| 101 | - ConfirmOrderMethod::ENDPOINT . |
|
| 102 | - ConfirmOrderMethod::SLASH . |
|
| 103 | - $orderId . |
|
| 104 | - ConfirmOrderMethod::SLASH . |
|
| 100 | + $url. |
|
| 101 | + ConfirmOrderMethod::ENDPOINT. |
|
| 102 | + ConfirmOrderMethod::SLASH. |
|
| 103 | + $orderId. |
|
| 104 | + ConfirmOrderMethod::SLASH. |
|
| 105 | 105 | ConfirmOrderMethod::CONFIRM_ENDPOINT |
| 106 | 106 | ; |
| 107 | 107 | $this->assertSame($uri, $request->uri); |
@@ -120,11 +120,11 @@ |
||
| 120 | 120 | $this->assertInstanceOf('Httpful\Request', $request); |
| 121 | 121 | $this->assertSame(Http::POST, $request->method); |
| 122 | 122 | $uri = |
| 123 | - $url . |
|
| 124 | - RefundOrderMethod::ENDPOINT . |
|
| 125 | - RefundOrderMethod::SLASH . |
|
| 126 | - $orderId . |
|
| 127 | - RefundOrderMethod::SLASH . |
|
| 123 | + $url. |
|
| 124 | + RefundOrderMethod::ENDPOINT. |
|
| 125 | + RefundOrderMethod::SLASH. |
|
| 126 | + $orderId. |
|
| 127 | + RefundOrderMethod::SLASH. |
|
| 128 | 128 | RefundOrderMethod::REFUND_ENDPOINT |
| 129 | 129 | ; |
| 130 | 130 | $this->assertSame($uri, $request->uri); |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | $request = $property->getValue($getOrderMethod); |
| 97 | 97 | $this->assertInstanceOf('Httpful\Request', $request); |
| 98 | 98 | $this->assertSame(Http::GET, $request->method); |
| 99 | - $uri = $url . GetOrderMethod::ENDPOINT . GetOrderMethod::SLASH . $orderId; |
|
| 99 | + $uri = $url.GetOrderMethod::ENDPOINT.GetOrderMethod::SLASH.$orderId; |
|
| 100 | 100 | $this->assertSame($uri, $request->uri); |
| 101 | 101 | } |
| 102 | 102 | |