@@ -41,10 +41,10 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Auth constructor. |
| 44 | - * @param $clientId |
|
| 45 | - * @param $secretKey |
|
| 46 | - * @param $username |
|
| 47 | - * @param $password |
|
| 44 | + * @param string $clientId |
|
| 45 | + * @param string $secretKey |
|
| 46 | + * @param string $username |
|
| 47 | + * @param string $password |
|
| 48 | 48 | * @param ClientInterface $clientInterface |
| 49 | 49 | * @param AuthStrategyInterface $authStrategy |
| 50 | 50 | */ |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * @param string $method |
| 70 | - * @param null $uri |
|
| 70 | + * @param string $uri |
|
| 71 | 71 | * @param array $options |
| 72 | 72 | * |
| 73 | - * @return mixed|\Psr\Http\Message\ResponseInterface |
|
| 73 | + * @return \Psr\Http\Message\ResponseInterface |
|
| 74 | 74 | * @throws \Exception |
| 75 | 75 | */ |
| 76 | 76 | public function request($method, $uri = null, array $options = []) |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $optionForToken = [ |
| 80 | 80 | 'headers' => [ |
| 81 | - 'Authorization' => ['Bearer '.$this->authStrategy->authenticate($this->clientId, $this->secretKey, $this->username, $this->password)], |
|
| 81 | + 'Authorization' => ['Bearer ' . $this->authStrategy->authenticate($this->clientId, $this->secretKey, $this->username, $this->password)], |
|
| 82 | 82 | ], |
| 83 | 83 | ]; |
| 84 | 84 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $optionForToken = [ |
| 95 | 95 | 'headers' => [ |
| 96 | - 'Authorization' => ['Bearer '.$this->authStrategy->authenticate($this->clientId, $this->secretKey, $this->username, $this->password, true, true)], |
|
| 96 | + 'Authorization' => ['Bearer ' . $this->authStrategy->authenticate($this->clientId, $this->secretKey, $this->username, $this->password, true, true)], |
|
| 97 | 97 | ], |
| 98 | 98 | ]; |
| 99 | 99 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * AdnxStrategy constructor. |
| 27 | 27 | * |
| 28 | 28 | * @param ClientInterface $clientInterface |
| 29 | - * @param Cache|null $cache |
|
| 29 | + * @param Cache $cache |
|
| 30 | 30 | */ |
| 31 | 31 | public function __construct(ClientInterface $clientInterface, Cache $cache) |
| 32 | 32 | { |
@@ -39,6 +39,8 @@ discard block |
||
| 39 | 39 | * @param string $password |
| 40 | 40 | * @param bool $cache |
| 41 | 41 | * @param bool $refresh |
| 42 | + * @param string $clientId |
|
| 43 | + * @param string $secretKey |
|
| 42 | 44 | * @return mixed |
| 43 | 45 | * @throws AuthException |
| 44 | 46 | */ |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * AdnxStrategy constructor. |
| 28 | 28 | * |
| 29 | 29 | * @param ClientInterface $clientInterface |
| 30 | - * @param Cache|null $cache |
|
| 30 | + * @param Cache $cache |
|
| 31 | 31 | */ |
| 32 | 32 | public function __construct(ClientInterface $clientInterface, Cache $cache) |
| 33 | 33 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @param string $clientId |
| 40 | 40 | * @param string $secretKey |
| 41 | 41 | * @param string $username |
| 42 | - * @param $password |
|
| 42 | + * @param string $password |
|
| 43 | 43 | * @param bool $cache |
| 44 | 44 | * @param bool $refresh |
| 45 | 45 | * @return mixed |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Audiens\AdobeClient\Authentication; |
| 4 | 4 | |
| 5 | -use Audiens\AdobeClient\Auth; |
|
| 6 | 5 | use Audiens\AdobeClient\Exception\AuthException; |
| 7 | 6 | use Doctrine\Common\Cache\Cache; |
| 8 | 7 | use GuzzleHttp\ClientInterface; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | - * @param $id |
|
| 96 | + * @param integer $id |
|
| 97 | 97 | * |
| 98 | 98 | * @return Traits|null |
| 99 | 99 | */ |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | - * @param $sid |
|
| 162 | + * @param integer $sid |
|
| 163 | 163 | * @param \DateTime $startDate |
| 164 | 164 | * @param \DateTime $endDate |
| 165 | 165 | * @param string $dayInterval |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Audiens\AdobeClient\Repository; |
| 4 | 4 | |
| 5 | -use Audiens\AdobeClient\Auth; |
|
| 6 | 5 | use Audiens\AdobeClient\CachableTrait; |
| 7 | 6 | use Audiens\AdobeClient\CacheableInterface; |
| 8 | 7 | use Audiens\AdobeClient\Entity\TraitMetrics; |
@@ -168,7 +168,7 @@ |
||
| 168 | 168 | */ |
| 169 | 169 | public function getTrendByTrait($sid, \DateTime $startDate, \DateTime $endDate, $dayInterval = '1D') |
| 170 | 170 | { |
| 171 | - $cacheKey = self::CACHE_NAMESPACE . sha1($startDate->getTimestamp().$endDate->getTimestamp()); |
|
| 171 | + $cacheKey = self::CACHE_NAMESPACE . sha1($startDate->getTimestamp() . $endDate->getTimestamp()); |
|
| 172 | 172 | |
| 173 | 173 | if ($this->isCacheEnabled()) { |
| 174 | 174 | if ($this->cache->contains($cacheKey)) { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Test; |
| 4 | 4 | |
| 5 | 5 | use Audiens\AdobeClient\Auth; |
| 6 | -use Audiens\AdobeClient\Authentication\AdnxStrategy; |
|
| 7 | 6 | use Audiens\AdobeClient\Authentication\SandboxStrategy; |
| 8 | 7 | use Audiens\AdobeClient\Repository\TraitRepository; |
| 9 | 8 | use Doctrine\Common\Cache\FilesystemCache; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | { |
| 42 | 42 | |
| 43 | 43 | try { |
| 44 | - $dotenv = new Dotenv(__DIR__.'/../'); |
|
| 44 | + $dotenv = new Dotenv(__DIR__ . '/../'); |
|
| 45 | 45 | $dotenv->load(); |
| 46 | 46 | } catch (\Exception $e) { |
| 47 | 47 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | $this->assertNotEmpty($trait->getMetrics()); |
| 70 | 70 | |
| 71 | - foreach($trait->getMetrics() as $metric) |
|
| 71 | + foreach ($trait->getMetrics() as $metric) |
|
| 72 | 72 | { |
| 73 | 73 | $this->assertInstanceOf(TraitMetrics::class, $metric); |
| 74 | 74 | } |
@@ -37,6 +37,6 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public static function missingSid($trait) |
| 39 | 39 | { |
| 40 | - return new self('Missing sid for '.serialize($trait->getName())); |
|
| 40 | + return new self('Missing sid for ' . serialize($trait->getName())); |
|
| 41 | 41 | } |
| 42 | 42 | } |
@@ -17,6 +17,6 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public static function authFailed($reason) |
| 19 | 19 | { |
| 20 | - return new self(self::DEFAULT_MESSAGE.$reason, 0, null); |
|
| 20 | + return new self(self::DEFAULT_MESSAGE . $reason, 0, null); |
|
| 21 | 21 | } |
| 22 | 22 | } |