diff options
author | Jason Rhodes <jason.matthew.rhodes@gmail.com> | 2016-05-03 22:10:04 -0400 |
---|---|---|
committer | Richard Leland <rich@richleland.com> | 2016-05-03 22:10:04 -0400 |
commit | d4c3a89c103e551a3cd71d20f36414095158365b (patch) | |
tree | 86ff4277800b41e1cf9def71b1753d53c0b25def /examples/transmission/delete_transmission.php | |
parent | d96d825aa138af92628ec7311c05e9659917ba79 (diff) | |
download | php-sparkpost-d4c3a89c103e551a3cd71d20f36414095158365b.zip php-sparkpost-d4c3a89c103e551a3cd71d20f36414095158365b.tar.gz php-sparkpost-d4c3a89c103e551a3cd71d20f36414095158365b.tar.bz2 |
Add php-cs-fixer as composer script and make initial fix-style run
* Add php-cs-fixer as composer script
* Make initial fix-style run
* Fix indentation on all files
* Add editorconfig file
Diffstat (limited to 'examples/transmission/delete_transmission.php')
-rw-r--r-- | examples/transmission/delete_transmission.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/transmission/delete_transmission.php b/examples/transmission/delete_transmission.php index 9459066..f7d0530 100644 --- a/examples/transmission/delete_transmission.php +++ b/examples/transmission/delete_transmission.php @@ -1,9 +1,11 @@ <?php + namespace Examples\Transmisson; -require_once (dirname(__FILE__).'/../bootstrap.php'); + +require_once dirname(__FILE__).'/../bootstrap.php'; //pull in API key config -$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json'); +$configFile = file_get_contents(dirname(__FILE__).'/../example-config.json'); $config = json_decode($configFile, true); use SparkPost\SparkPost; @@ -11,14 +13,13 @@ use GuzzleHttp\Client; use Ivory\HttpAdapter\Guzzle6HttpAdapter; $httpAdapter = new Guzzle6HttpAdapter(new Client()); -$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]); +$sparky = new SparkPost($httpAdapter, ['key' => $config['api-key']]); try { $results = $sparky->transmission->delete('transmission-id'); echo 'Transmission deleted!'; } catch (\Exception $exception) { - echo $exception->getAPIMessage() . "\n"; - echo $exception->getAPICode() . "\n"; - echo $exception->getAPIDescription() . "\n"; + echo $exception->getAPIMessage()."\n"; + echo $exception->getAPICode()."\n"; + echo $exception->getAPIDescription()."\n"; } -?> |