@@ -2,12 +2,12 @@ |
||
| 2 | 2 | namespace LinusShops\CanadaPost\Services; |
| 3 | 3 | use LinusShops\CanadaPost\Service; |
| 4 | 4 | /** |
| 5 | - * |
|
| 6 | - * |
|
| 7 | - * @author Sam Schmidt <[email protected]> |
|
| 8 | - * @since 2015-12-09 |
|
| 9 | - * @company Linus Shops |
|
| 10 | - */ |
|
| 5 | + * |
|
| 6 | + * |
|
| 7 | + * @author Sam Schmidt <[email protected]> |
|
| 8 | + * @since 2015-12-09 |
|
| 9 | + * @company Linus Shops |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | class GetNearestPostOffice extends Service |
| 13 | 13 | { |
@@ -3,13 +3,13 @@ |
||
| 3 | 3 | use Guzzle\Http\Client; |
| 4 | 4 | use LinusShops\CanadaPost\Service; |
| 5 | 5 | /** |
| 6 | - * Get the nearest post office |
|
| 7 | - * |
|
| 8 | - * @see https://www.canadapost.ca/cpo/mc/business/productsservices/developers/services/findpostoffice/nearestpostoffice.jsf |
|
| 9 | - * @author Sam Schmidt <[email protected]> |
|
| 10 | - * @since 2015-12-09 |
|
| 11 | - * @company Linus Shops |
|
| 12 | - */ |
|
| 6 | + * Get the nearest post office |
|
| 7 | + * |
|
| 8 | + * @see https://www.canadapost.ca/cpo/mc/business/productsservices/developers/services/findpostoffice/nearestpostoffice.jsf |
|
| 9 | + * @author Sam Schmidt <[email protected]> |
|
| 10 | + * @since 2015-12-09 |
|
| 11 | + * @company Linus Shops |
|
| 12 | + */ |
|
| 13 | 13 | |
| 14 | 14 | class GetNearestPostOffice extends Service |
| 15 | 15 | { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | return $this; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - public function getParameter($name, $default=null) |
|
| 61 | + public function getParameter($name, $default = null) |
|
| 62 | 62 | { |
| 63 | 63 | return $this->hasParameter($name) ? |
| 64 | 64 | $this->parameters[$name] : $default; |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | $request = $this->buildRequest(); |
| 83 | 83 | |
| 84 | 84 | //Apply standard headers |
| 85 | - $this->setHeader('Authorization', 'Basic '.base64_encode( |
|
| 86 | - $this->userid.':'.$this->password |
|
| 85 | + $this->setHeader('Authorization', 'Basic ' . base64_encode( |
|
| 86 | + $this->userid . ':' . $this->password |
|
| 87 | 87 | )); |
| 88 | 88 | |
| 89 | 89 | $client = new Client(array( |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require __DIR__ . '/../vendor/autoload.php'; |
| 3 | 3 | |
| 4 | -$config = json_decode(file_get_contents(__DIR__.'/config.json'), true); |
|
| 4 | +$config = json_decode(file_get_contents(__DIR__ . '/config.json'), true); |
|
| 5 | 5 | if ($config == false) { |
| 6 | 6 | $user = getenv('CP_USER'); |
| 7 | 7 | $pass = getenv('CP_PASSWORD'); |