@@ -123,6 +123,6 @@ |
||
| 123 | 123 | { |
| 124 | 124 | $timeStamp = time(); |
| 125 | 125 | |
| 126 | - return $timeStamp.'-'.md5($this->accountId.$timeStamp.$this->secretKey); |
|
| 126 | + return $timeStamp . '-' . md5($this->accountId . $timeStamp . $this->secretKey); |
|
| 127 | 127 | } |
| 128 | 128 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $data = json_decode($response->getBody()->getContents(), true); |
| 77 | 77 | |
| 78 | 78 | if ($data['error']) { |
| 79 | - throw new \Exception('WannaSpeak API: '.$data['error']['txt']); |
|
| 79 | + throw new \Exception('WannaSpeak API: ' . $data['error']['txt']); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | return $data; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'destination' => $phoneDest, |
| 107 | 107 | 'tag1' => $platformId, |
| 108 | 108 | 'tag2' => $siteId, |
| 109 | - 'tag3' => ($callerId === true) ? 'callerid:'.$phoneDid : '', |
|
| 109 | + 'tag3' => ($callerId === true) ? 'callerid:' . $phoneDid : '', |
|
| 110 | 110 | 'did' => $phoneDid, |
| 111 | 111 | 'name' => $name, |
| 112 | 112 | ]; |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | ], |
| 299 | 299 | ]; |
| 300 | 300 | |
| 301 | - $boundary = '--------------------------'.microtime(true); |
|
| 301 | + $boundary = '--------------------------' . microtime(true); |
|
| 302 | 302 | $streamFactory = StreamFactoryDiscovery::find(); |
| 303 | 303 | $builder = new MultipartStreamBuilder($streamFactory); |
| 304 | 304 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $builder->addResource('sound', $data, $options); |
| 312 | 312 | |
| 313 | 313 | $body = $builder->build(); |
| 314 | - $headers = ['Content-Type' => 'multipart/form-data; boundary="'.$boundary.'"']; |
|
| 314 | + $headers = ['Content-Type' => 'multipart/form-data; boundary="' . $boundary . '"']; |
|
| 315 | 315 | |
| 316 | 316 | $response = $this->httpClient->createAndSendRequest($args, $headers, $body); |
| 317 | 317 | $data = $this->processResponse($response); |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | */ |
| 327 | 327 | public function deleteMessageWannaspeak($name) |
| 328 | 328 | { |
| 329 | - $args = [ |
|
| 329 | + $args = [ |
|
| 330 | 330 | 'api' => 'sound', |
| 331 | 331 | 'method' => 'delete', |
| 332 | 332 | 'name' => $name, |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | } |
| 132 | 132 | /** |
| 133 | 133 | * @param string $didPhone |
| 134 | - * @param \DateTime $enddate |
|
| 134 | + * @param \DateTime $endDate |
|
| 135 | 135 | * |
| 136 | 136 | * @return array |
| 137 | 137 | */ |
@@ -8,9 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | namespace Yproximite\WannaSpeakBundle\Api; |
| 10 | 10 | |
| 11 | -use Http\Discovery\MessageFactoryDiscovery; |
|
| 12 | 11 | use Http\Discovery\StreamFactoryDiscovery; |
| 13 | -use Http\Discovery\UriFactoryDiscovery; |
|
| 14 | 12 | use Http\Message\MultipartStream\MultipartStreamBuilder; |
| 15 | 13 | use Psr\Http\Message\ResponseInterface; |
| 16 | 14 | use Symfony\Component\HttpFoundation\File\UploadedFile; |
@@ -130,11 +130,11 @@ |
||
| 130 | 130 | return $data; |
| 131 | 131 | } |
| 132 | 132 | /** |
| 133 | - * @param string $didPhone |
|
| 134 | - * @param \DateTime $enddate |
|
| 135 | - * |
|
| 136 | - * @return array |
|
| 137 | - */ |
|
| 133 | + * @param string $didPhone |
|
| 134 | + * @param \DateTime $enddate |
|
| 135 | + * |
|
| 136 | + * @return array |
|
| 137 | + */ |
|
| 138 | 138 | public function callTrackingModifyForDelete($didPhone, \DateTime $endDate = null) |
| 139 | 139 | { |
| 140 | 140 | if (!$endDate) { |