@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | * @param string $path |
276 | 276 | * @param array $parameters |
277 | 277 | * |
278 | - * @param array $headers |
|
278 | + * @param string[] $headers |
|
279 | 279 | * @return Response |
280 | 280 | * @throws BadRequest |
281 | 281 | * @throws Forbidden |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | * @param string $path |
319 | 319 | * @param array $parameters |
320 | 320 | * |
321 | - * @param array $headers |
|
321 | + * @param string[] $headers |
|
322 | 322 | * @return Response |
323 | 323 | * @throws BadRequest |
324 | 324 | * @throws Forbidden |
@@ -811,6 +811,10 @@ discard block |
||
811 | 811 | // This function takes a input like a=b&a=c&d=e and returns the parsed |
812 | 812 | // parameters like this |
813 | 813 | // array('a' => array('b','c'), 'd' => 'e') |
814 | + |
|
815 | + /** |
|
816 | + * @param string $input |
|
817 | + */ |
|
814 | 818 | public static function parse_parameters($input) |
815 | 819 | { |
816 | 820 | if (!isset($input) || !$input) { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $this->response->setApiPath($path); |
236 | 236 | $url = sprintf('%s/%s', self::API_HOST_OAUTH, $path); |
237 | 237 | $request = Request::fromConsumerAndToken($this->consumer, $this->token, $method, $url, $parameters); |
238 | - $authorization = 'Authorization: Basic ' . $this->encodeAppAuthorization($this->consumer); |
|
238 | + $authorization = 'Authorization: Basic '.$this->encodeAppAuthorization($this->consumer); |
|
239 | 239 | $result = $this->request($request->getNormalizedHttpUrl(), $method, $authorization, $parameters); |
240 | 240 | $response = JsonDecoder::decode($result, $this->decodeJsonAsArray); |
241 | 241 | $this->response->setBody($response); |
@@ -525,9 +525,9 @@ discard block |
||
525 | 525 | public function manageErrors($response) |
526 | 526 | { |
527 | 527 | $errors = []; |
528 | - if(isset($response->errors)){ |
|
528 | + if (isset($response->errors)) { |
|
529 | 529 | $errors = $response->errors; |
530 | - } else if(isset($response->operation_errors)){ |
|
530 | + } else if (isset($response->operation_errors)) { |
|
531 | 531 | $errors = $response->operation_errors; |
532 | 532 | } |
533 | 533 | |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | $request->signRequest($this->signatureMethod, $this->consumer, $this->token); |
574 | 574 | $authorization = $request->toHeader(); |
575 | 575 | } else { |
576 | - $authorization = 'Authorization: Bearer ' . $this->bearer; |
|
576 | + $authorization = 'Authorization: Bearer '.$this->bearer; |
|
577 | 577 | } |
578 | 578 | if (strpos($url, TONUpload::DEFAULT_DOMAIN) === 0) { |
579 | 579 | return $this->request($url, $method, $authorization, $parameters, $headers); |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | /* Curl settings */ |
600 | 600 | $options = [ |
601 | 601 | CURLOPT_VERBOSE => false, |
602 | - CURLOPT_CAINFO => __DIR__ . DIRECTORY_SEPARATOR . 'cacert.pem', |
|
602 | + CURLOPT_CAINFO => __DIR__.DIRECTORY_SEPARATOR.'cacert.pem', |
|
603 | 603 | CURLOPT_CONNECTTIMEOUT => $this->connectionTimeout, |
604 | 604 | CURLOPT_HEADER => true, |
605 | 605 | CURLOPT_HTTPHEADER => array_merge(['Accept: */*', $authorization, 'Expect:'], $headers, ['Connection: close']), |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | } |
647 | 647 | |
648 | 648 | if (in_array($method, ['GET', 'PUT', 'DELETE']) && !empty($postfields) && !isset($postfields['raw'])) { |
649 | - $options[CURLOPT_URL] .= '?' . Util::buildHttpQuery($postfields); |
|
649 | + $options[CURLOPT_URL] .= '?'.Util::buildHttpQuery($postfields); |
|
650 | 650 | } |
651 | 651 | |
652 | 652 | $curlHandle = curl_init(); |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | $key = $consumer->key; |
723 | 723 | $secret = $consumer->secret; |
724 | 724 | |
725 | - return base64_encode($key . ':' . $secret); |
|
725 | + return base64_encode($key.':'.$secret); |
|
726 | 726 | } |
727 | 727 | |
728 | 728 | /** |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | */ |
757 | 757 | public function getAccountId() |
758 | 758 | { |
759 | - if(!$this->account instanceof Account){ |
|
759 | + if (!$this->account instanceof Account) { |
|
760 | 760 | return ''; |
761 | 761 | } |
762 | 762 | return $this->account->getId(); |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | */ |
768 | 768 | public function getAccountTimezone() |
769 | 769 | { |
770 | - if(!$this->account instanceof Account){ |
|
770 | + if (!$this->account instanceof Account) { |
|
771 | 771 | return 'UTC'; |
772 | 772 | } |
773 | 773 | return $this->account->getTimezone(); |
@@ -882,9 +882,9 @@ discard block |
||
882 | 882 | $token = $token['oauth_token']; |
883 | 883 | } |
884 | 884 | if (empty($sign_in_with_twitter)) { |
885 | - return $this->authorizeURL() . "?oauth_token={$token}"; |
|
885 | + return $this->authorizeURL()."?oauth_token={$token}"; |
|
886 | 886 | } |
887 | 887 | |
888 | - return $this->authenticateURL() . "?oauth_token={$token}"; |
|
888 | + return $this->authenticateURL()."?oauth_token={$token}"; |
|
889 | 889 | } |
890 | 890 | } |
@@ -36,23 +36,23 @@ discard block |
||
36 | 36 | $j = 1; |
37 | 37 | $l = 1; |
38 | 38 | foreach ($campaignsData as $campaign) { |
39 | - echo $i . ': ' . $campaign->getId() . ' ' . $campaign->getName() . ' ' . $campaign->getStartTime()->format('Y-m-d') . ' - ' . $campaign->getEntityStatus() . PHP_EOL; |
|
39 | + echo $i.': '.$campaign->getId().' '.$campaign->getName().' '.$campaign->getStartTime()->format('Y-m-d').' - '.$campaign->getEntityStatus().PHP_EOL; |
|
40 | 40 | $lineItems = $campaign->getLineItems([TwitterAds\Fields\LineItemFields::COUNT => 2]); |
41 | 41 | /** @var LineItem $lineItem */ |
42 | 42 | foreach ($lineItems as $lineItem) { |
43 | - echo "\t" . $j . ': ' . $lineItem->getId() . ' ' . $lineItem->getName() . ' ' . PHP_EOL; |
|
44 | - echo "\t\tBid: " . ($lineItem->getBidAmountLocalMicro() / 1000000) . PHP_EOL; |
|
45 | - echo "\t\tObjective: " . $lineItem->getObjective() . PHP_EOL; |
|
46 | - echo "\t\tCharge By: " . $lineItem->getChargeBy() . PHP_EOL; |
|
47 | - echo "\t\tBid Unit: " . $lineItem->getBidUnit() . PHP_EOL; |
|
48 | - echo "\t\tOptimization: " . $lineItem->getOptimization() . PHP_EOL; |
|
49 | - echo "\t\tBid Type: " . $lineItem->getBidType() . PHP_EOL; |
|
43 | + echo "\t".$j.': '.$lineItem->getId().' '.$lineItem->getName().' '.PHP_EOL; |
|
44 | + echo "\t\tBid: ".($lineItem->getBidAmountLocalMicro() / 1000000).PHP_EOL; |
|
45 | + echo "\t\tObjective: ".$lineItem->getObjective().PHP_EOL; |
|
46 | + echo "\t\tCharge By: ".$lineItem->getChargeBy().PHP_EOL; |
|
47 | + echo "\t\tBid Unit: ".$lineItem->getBidUnit().PHP_EOL; |
|
48 | + echo "\t\tOptimization: ".$lineItem->getOptimization().PHP_EOL; |
|
49 | + echo "\t\tBid Type: ".$lineItem->getBidType().PHP_EOL; |
|
50 | 50 | $targetingCriterias = $lineItem->getTargetingCriteria(); |
51 | 51 | /** @var TwitterAds\Campaign\TargetingCriteria $targetingCriteria */ |
52 | 52 | foreach ($targetingCriterias as $targetingCriteria) { |
53 | - echo "\t\t" . $l . ': ' . $targetingCriteria->getId() . ' ' . $targetingCriteria->getName() . ' ' . |
|
53 | + echo "\t\t".$l.': '.$targetingCriteria->getId().' '.$targetingCriteria->getName().' '. |
|
54 | 54 | |
55 | - $targetingCriteria->getTargetingType() . ' ' . $targetingCriteria->getTargetingValue() . PHP_EOL; |
|
55 | + $targetingCriteria->getTargetingType().' '.$targetingCriteria->getTargetingValue().PHP_EOL; |
|
56 | 56 | |
57 | 57 | $l++; |
58 | 58 | } |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | ); |
79 | 79 | $stats = $stats[0]->id_data[0]->metrics; |
80 | 80 | if (!is_null($stats->billed_charge_local_micro)) { |
81 | - echo "\t\t\t Start: " . $date[0]->format('Y-m-d H:i:s') . PHP_EOL; |
|
82 | - echo "\t\t\t End: " . $date[1]->format('Y-m-d H:i:s') . PHP_EOL; |
|
83 | - echo "\t\t\t " . ($stats->billed_charge_local_micro[0] / 1000000) . '€' . PHP_EOL; |
|
81 | + echo "\t\t\t Start: ".$date[0]->format('Y-m-d H:i:s').PHP_EOL; |
|
82 | + echo "\t\t\t End: ".$date[1]->format('Y-m-d H:i:s').PHP_EOL; |
|
83 | + echo "\t\t\t ".($stats->billed_charge_local_micro[0] / 1000000).'€'.PHP_EOL; |
|
84 | 84 | echo "\t\t\t\t App clicks: "; |
85 | 85 | getStats($stats->app_clicks); |
86 | - echo "\t\t\t\t Installs:" . PHP_EOL; |
|
86 | + echo "\t\t\t\t Installs:".PHP_EOL; |
|
87 | 87 | getStats($stats->mobile_conversion_installs); |
88 | - echo "\t\t\t\t Checkouts:" . PHP_EOL; |
|
88 | + echo "\t\t\t\t Checkouts:".PHP_EOL; |
|
89 | 89 | getStats($stats->mobile_conversion_checkouts_initiated); |
90 | 90 | } |
91 | 91 | } |
@@ -105,14 +105,14 @@ discard block |
||
105 | 105 | if ($stat instanceof stdClass) { |
106 | 106 | foreach (get_object_vars($stat) as $key => $val) { |
107 | 107 | if (is_array($val)) { |
108 | - echo "\t\t\t\t\t " . $key . ': ' . $val[0] . PHP_EOL; |
|
108 | + echo "\t\t\t\t\t ".$key.': '.$val[0].PHP_EOL; |
|
109 | 109 | } else { |
110 | - echo "\t\t\t\t\t " . $key . ' 0' . PHP_EOL; |
|
110 | + echo "\t\t\t\t\t ".$key.' 0'.PHP_EOL; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | } else if (is_array($stat)) { |
114 | 114 | foreach ($stat as $s) { |
115 | - echo $s . PHP_EOL; |
|
115 | + echo $s.PHP_EOL; |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 |
@@ -36,23 +36,23 @@ discard block |
||
36 | 36 | $j = 1; |
37 | 37 | $l = 1; |
38 | 38 | foreach ($campaignsData as $campaign) { |
39 | - echo $i . ': ' . $campaign->getId() . ' ' . $campaign->getName() . ' ' . $campaign->getStartTime()->format('Y-m-d') . ' - ' . $campaign->getEntityStatus() . PHP_EOL; |
|
39 | + echo $i.': '.$campaign->getId().' '.$campaign->getName().' '.$campaign->getStartTime()->format('Y-m-d').' - '.$campaign->getEntityStatus().PHP_EOL; |
|
40 | 40 | $lineItems = $campaign->getLineItems([TwitterAds\Fields\LineItemFields::COUNT => 2]); |
41 | 41 | /** @var LineItem $lineItem */ |
42 | 42 | foreach ($lineItems as $lineItem) { |
43 | - echo "\t" . $j . ': ' . $lineItem->getId() . ' ' . $lineItem->getName() . ' ' . PHP_EOL; |
|
44 | - echo "\t\tBid: " . ($lineItem->getBidAmountLocalMicro() / 1000000) . PHP_EOL; |
|
45 | - echo "\t\tObjective: " . $lineItem->getObjective() . PHP_EOL; |
|
46 | - echo "\t\tCharge By: " . $lineItem->getChargeBy() . PHP_EOL; |
|
47 | - echo "\t\tBid Unit: " . $lineItem->getBidUnit() . PHP_EOL; |
|
48 | - echo "\t\tOptimization: " . $lineItem->getOptimization() . PHP_EOL; |
|
49 | - echo "\t\tBid Type: " . $lineItem->getBidType() . PHP_EOL; |
|
43 | + echo "\t".$j.': '.$lineItem->getId().' '.$lineItem->getName().' '.PHP_EOL; |
|
44 | + echo "\t\tBid: ".($lineItem->getBidAmountLocalMicro() / 1000000).PHP_EOL; |
|
45 | + echo "\t\tObjective: ".$lineItem->getObjective().PHP_EOL; |
|
46 | + echo "\t\tCharge By: ".$lineItem->getChargeBy().PHP_EOL; |
|
47 | + echo "\t\tBid Unit: ".$lineItem->getBidUnit().PHP_EOL; |
|
48 | + echo "\t\tOptimization: ".$lineItem->getOptimization().PHP_EOL; |
|
49 | + echo "\t\tBid Type: ".$lineItem->getBidType().PHP_EOL; |
|
50 | 50 | $targetingCriterias = $lineItem->getTargetingCriteria(); |
51 | 51 | /** @var TwitterAds\Campaign\TargetingCriteria $targetingCriteria */ |
52 | 52 | foreach ($targetingCriterias as $targetingCriteria) { |
53 | - echo "\t\t" . $l . ': ' . $targetingCriteria->getId() . ' ' . $targetingCriteria->getName() . ' ' . |
|
53 | + echo "\t\t".$l.': '.$targetingCriteria->getId().' '.$targetingCriteria->getName().' '. |
|
54 | 54 | |
55 | - $targetingCriteria->getTargetingType() . ' ' . $targetingCriteria->getTargetingValue() . PHP_EOL; |
|
55 | + $targetingCriteria->getTargetingType().' '.$targetingCriteria->getTargetingValue().PHP_EOL; |
|
56 | 56 | |
57 | 57 | $l++; |
58 | 58 | } |
@@ -76,26 +76,26 @@ discard block |
||
76 | 76 | AnalyticsFields::PLACEMENT => Enumerations::PLACEMENT_ALL_ON_TWITTER |
77 | 77 | ], $async |
78 | 78 | ); |
79 | - while($job->getStatus() == TwitterAds\Fields\JobFields::PROCESSING){ |
|
80 | - echo 'Job is still processing. Waiting 5 more seconds' .PHP_EOL; |
|
79 | + while ($job->getStatus() == TwitterAds\Fields\JobFields::PROCESSING) { |
|
80 | + echo 'Job is still processing. Waiting 5 more seconds'.PHP_EOL; |
|
81 | 81 | $job->read(); |
82 | 82 | sleep(5); |
83 | 83 | } |
84 | 84 | |
85 | - if($job->getStatus() == TwitterAds\Fields\JobFields::SUCCESS){ |
|
85 | + if ($job->getStatus() == TwitterAds\Fields\JobFields::SUCCESS) { |
|
86 | 86 | $result = gzfile($job->getUrl()); |
87 | 87 | $result = implode('', $result); |
88 | 88 | $stats = json_decode($result)->data; |
89 | 89 | $stats = $stats[0]->id_data[0]->metrics; |
90 | 90 | if (!is_null($stats->billed_charge_local_micro)) { |
91 | - echo "\t\t\t Start: " . $date[0]->format('Y-m-d H:i:s') . PHP_EOL; |
|
92 | - echo "\t\t\t End: " . $date[1]->format('Y-m-d H:i:s') . PHP_EOL; |
|
93 | - echo "\t\t\t " . ($stats->billed_charge_local_micro[0] / 1000000) . '€' . PHP_EOL; |
|
91 | + echo "\t\t\t Start: ".$date[0]->format('Y-m-d H:i:s').PHP_EOL; |
|
92 | + echo "\t\t\t End: ".$date[1]->format('Y-m-d H:i:s').PHP_EOL; |
|
93 | + echo "\t\t\t ".($stats->billed_charge_local_micro[0] / 1000000).'€'.PHP_EOL; |
|
94 | 94 | echo "\t\t\t\t App clicks: "; |
95 | 95 | getStats($stats->app_clicks); |
96 | - echo "\t\t\t\t Installs:" . PHP_EOL; |
|
96 | + echo "\t\t\t\t Installs:".PHP_EOL; |
|
97 | 97 | getStats($stats->mobile_conversion_installs); |
98 | - echo "\t\t\t\t Checkouts:" . PHP_EOL; |
|
98 | + echo "\t\t\t\t Checkouts:".PHP_EOL; |
|
99 | 99 | getStats($stats->mobile_conversion_checkouts_initiated); |
100 | 100 | } |
101 | 101 | } |
@@ -116,14 +116,14 @@ discard block |
||
116 | 116 | if ($stat instanceof stdClass) { |
117 | 117 | foreach (get_object_vars($stat) as $key => $val) { |
118 | 118 | if (is_array($val)) { |
119 | - echo "\t\t\t\t\t " . $key . ': ' . $val[0] . PHP_EOL; |
|
119 | + echo "\t\t\t\t\t ".$key.': '.$val[0].PHP_EOL; |
|
120 | 120 | } else { |
121 | - echo "\t\t\t\t\t " . $key . ' 0' . PHP_EOL; |
|
121 | + echo "\t\t\t\t\t ".$key.' 0'.PHP_EOL; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | } else if (is_array($stat)) { |
125 | 125 | foreach ($stat as $s) { |
126 | - echo $s . PHP_EOL; |
|
126 | + echo $s.PHP_EOL; |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 |
@@ -74,22 +74,22 @@ discard block |
||
74 | 74 | { |
75 | 75 | /** Here you can add any header you want to the request*/ |
76 | 76 | $headers = [ |
77 | - 'x-ton-expires: ' . gmdate('D, d M Y H:i:s T', strtotime('+10 day')), |
|
78 | - 'content-type: ' . $this->getContentType(), |
|
79 | - 'Content-Length: ' . $this->fileSize |
|
77 | + 'x-ton-expires: '.gmdate('D, d M Y H:i:s T', strtotime('+10 day')), |
|
78 | + 'content-type: '.$this->getContentType(), |
|
79 | + 'Content-Length: '.$this->fileSize |
|
80 | 80 | ]; |
81 | 81 | |
82 | - $response = $this->getTwitterAds()->post(self::DEFAULT_DOMAIN . self::DEFAULT_RESOURCE . self::DEFAULT_BUCKET, ['raw' => file_get_contents($this->filePath)], $headers); |
|
82 | + $response = $this->getTwitterAds()->post(self::DEFAULT_DOMAIN.self::DEFAULT_RESOURCE.self::DEFAULT_BUCKET, ['raw' => file_get_contents($this->filePath)], $headers); |
|
83 | 83 | return $response; |
84 | 84 | } |
85 | 85 | |
86 | 86 | public function uploadChunk($resource, $chunkSize, $bytes, $bytesStart, $bytesRead) |
87 | 87 | { |
88 | 88 | $headers = [ |
89 | - 'Content-Type: ' . $this->getContentType(), |
|
90 | - 'Content-Range: bytes ' . $bytesStart . '-' . ($bytesRead - 1) . '/' . $this->fileSize |
|
89 | + 'Content-Type: '.$this->getContentType(), |
|
90 | + 'Content-Range: bytes '.$bytesStart.'-'.($bytesRead - 1).'/'.$this->fileSize |
|
91 | 91 | ]; |
92 | - $response = $this->getTwitterAds()->put(self::DEFAULT_DOMAIN . $resource, ['raw' => $bytes], $headers); |
|
92 | + $response = $this->getTwitterAds()->put(self::DEFAULT_DOMAIN.$resource, ['raw' => $bytes], $headers); |
|
93 | 93 | |
94 | 94 | return $response; |
95 | 95 | } |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | public function initChunkedUpload() |
98 | 98 | { |
99 | 99 | $headers = [ |
100 | - 'X-Ton-Content-Type: ' . $this->getContentType(), |
|
101 | - 'X-Ton-Content-Length: ' . $this->fileSize, |
|
102 | - 'X-Ton-Expires: ' . gmdate('D, d M Y H:i:s T', strtotime('+6 day')), |
|
103 | - 'Content-Type: ' . $this->getContentType(), |
|
104 | - 'Content-Length: ' . strval(0) |
|
100 | + 'X-Ton-Content-Type: '.$this->getContentType(), |
|
101 | + 'X-Ton-Content-Length: '.$this->fileSize, |
|
102 | + 'X-Ton-Expires: '.gmdate('D, d M Y H:i:s T', strtotime('+6 day')), |
|
103 | + 'Content-Type: '.$this->getContentType(), |
|
104 | + 'Content-Length: '.strval(0) |
|
105 | 105 | ]; |
106 | 106 | |
107 | - $resource = self::DEFAULT_DOMAIN . self::DEFAULT_RESOURCE . self::DEFAULT_BUCKET . '?resumable=true'; |
|
107 | + $resource = self::DEFAULT_DOMAIN.self::DEFAULT_RESOURCE.self::DEFAULT_BUCKET.'?resumable=true'; |
|
108 | 108 | return $this->getTwitterAds()->post($resource, [], $headers); |
109 | 109 | } |
110 | 110 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $instance = $instance ?: TwitterAds::instance(); |
57 | 57 | if (!$instance) { |
58 | 58 | throw new InvalidArgumentException( |
59 | - 'An Api instance must be provided as argument or ' . |
|
59 | + 'An Api instance must be provided as argument or '. |
|
60 | 60 | 'set as instance in the \TwitterAds\Api' |
61 | 61 | ); |
62 | 62 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $params[$property] = implode(',', $this->$property); |
200 | 200 | } elseif (is_bool($this->$property)) { |
201 | 201 | $params[$property] = $this->$property ? 'true' : 'false'; |
202 | - } elseif (isset($this->$property->id)){ |
|
202 | + } elseif (isset($this->$property->id)) { |
|
203 | 203 | $params[$property] = strval($this->$property->id); |
204 | 204 | } else { |
205 | 205 | $params[$property] = strval($this->$property); |
@@ -129,7 +129,7 @@ |
||
129 | 129 | */ |
130 | 130 | public function getAudienceSize() |
131 | 131 | { |
132 | - return (int)$this->audience_size; |
|
132 | + return (int) $this->audience_size; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -59,7 +59,7 @@ |
||
59 | 59 | { |
60 | 60 | $endTime = isset($params[AnalyticsFields::END_TIME]) ? $params[AnalyticsFields::END_TIME] : new DateTime('now'); |
61 | 61 | $endTime->setTime($endTime->format('H'), 0, 0); |
62 | - $startTime = isset($params[AnalyticsFields::START_TIME]) ? $params[AnalyticsFields::START_TIME] : new DateTime($endTime->format('c') . ' - 7 days'); |
|
62 | + $startTime = isset($params[AnalyticsFields::START_TIME]) ? $params[AnalyticsFields::START_TIME] : new DateTime($endTime->format('c').' - 7 days'); |
|
63 | 63 | $startTime->setTime($startTime->format('H'), 0, 0); |
64 | 64 | $granularity = isset($params[AnalyticsFields::GRANULARITY]) ? $params[AnalyticsFields::GRANULARITY] : Enumerations::GRANULARITY_TOTAL; |
65 | 65 | $placement = isset($params[AnalyticsFields::PLACEMENT]) ? $params[AnalyticsFields::PLACEMENT] : Enumerations::PLACEMENT_ALL_ON_TWITTER; |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $instance = $instance ?: TwitterAds::instance(); |
38 | 38 | if (!$instance) { |
39 | 39 | throw new InvalidArgumentException( |
40 | - 'An Api instance must be provided as argument or ' . |
|
40 | + 'An Api instance must be provided as argument or '. |
|
41 | 41 | 'set as instance in the \TwitterAds\Api' |
42 | 42 | ); |
43 | 43 | } |