@@ -15,7 +15,7 @@ |
||
15 | 15 | const ACCOUNT_ID = 'account id'; |
16 | 16 | |
17 | 17 | // Create twitter ads client |
18 | -$twitterAds = new TwitterAds(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_TOKEN,ACCESS_TOKEN_SECRET); |
|
18 | +$twitterAds = new TwitterAds(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET); |
|
19 | 19 | |
20 | 20 | // Retrieve account information |
21 | 21 | $account = $twitterAds->getAccounts(ACCOUNT_ID); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | // Fetching stats for multiple line items |
39 | 39 | $ids = array_map( |
40 | - function ($o) { |
|
40 | + function($o) { |
|
41 | 41 | return $o->getId(); |
42 | 42 | }, |
43 | 43 | $lineItems->getCollection() |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | const ACCOUNT_ID = 'account id'; |
19 | 19 | |
20 | 20 | // Create twitter ads client |
21 | -$twitterAds = new TwitterAds(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_TOKEN,ACCESS_TOKEN_SECRET); |
|
21 | +$twitterAds = new TwitterAds(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET); |
|
22 | 22 | |
23 | 23 | // load up the account instance, campaign and line item |
24 | 24 | $account = $twitterAds->getAccounts(ACCOUNT_ID); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $lineItem = $account->getLineItems(null, ['campaign_ids' => $campaign->getId()])->next(); |
27 | 27 | |
28 | 28 | // create request for a simple nullcasted tweet |
29 | -$tweet1 = Tweet::create($account,'There can be only one... http://twitter.com'); |
|
29 | +$tweet1 = Tweet::create($account, 'There can be only one... http://twitter.com'); |
|
30 | 30 | |
31 | 31 | // promote the tweet using our line item |
32 | 32 | $promotedTweet = new PromotedTweet($account); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // create request for a nullcasted tweet with a website card |
38 | 38 | $websiteCard = new WebsiteCard($account); |
39 | 39 | $websiteCard = $websiteCard->all()->next(); |
40 | -$status = 'Fine. There can be two. '. $websiteCard->getPreviewUrl(); |
|
40 | +$status = 'Fine. There can be two. '.$websiteCard->getPreviewUrl(); |
|
41 | 41 | $tweet2 = Tweet::create($account, $status); |
42 | 42 | |
43 | 43 | // Promote the tweet using our line item |
@@ -6,13 +6,13 @@ discard block |
||
6 | 6 | * @param string $class The fully-qualified class name. |
7 | 7 | * @return void |
8 | 8 | */ |
9 | -spl_autoload_register(function ($class) { |
|
9 | +spl_autoload_register(function($class) { |
|
10 | 10 | |
11 | 11 | // project-specific namespace prefix |
12 | 12 | $prefix = 'Hborras\\TwitterAdsSDK\\'; |
13 | 13 | |
14 | 14 | // base directory for the namespace prefix |
15 | - $base_dir = __DIR__ . '/src/'; |
|
15 | + $base_dir = __DIR__.'/src/'; |
|
16 | 16 | |
17 | 17 | // does the class use the namespace prefix? |
18 | 18 | $len = strlen($prefix); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // replace the namespace prefix with the base directory, replace namespace |
28 | 28 | // separators with directory separators in the relative class name, append |
29 | 29 | // with .php |
30 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
30 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
31 | 31 | |
32 | 32 | // if the file exists, require it |
33 | 33 | if (file_exists($file)) { |
@@ -187,7 +187,7 @@ |
||
187 | 187 | } |
188 | 188 | |
189 | 189 | |
190 | - public function getTailoredAudiences($id = '', $params = []) |
|
190 | + public function getTailoredAudiences($id = '', $params = []) |
|
191 | 191 | { |
192 | 192 | // TODO: Next Release |
193 | 193 | } |