@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public function add(Segment $segment) |
| 55 | 55 | { |
| 56 | 56 | |
| 57 | - $compiledUrl = self::BASE_URL.$segment->getMemberId(); |
|
| 57 | + $compiledUrl = self::BASE_URL . $segment->getMemberId(); |
|
| 58 | 58 | |
| 59 | 59 | $payload = [ |
| 60 | 60 | 'segment' => $segment->torray(), |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $responseContent = json_decode($stream->getContents(), true); |
| 71 | 71 | $stream->rewind(); |
| 72 | 72 | |
| 73 | - if (!(isset($responseContent['response']['segment']['id']))) { |
|
| 73 | + if ( ! (isset($responseContent['response']['segment']['id']))) { |
|
| 74 | 74 | throw RepositoryException::wrongFormat(serialize($responseContent)); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | public function findOneById($id, $memberId) |
| 91 | 91 | { |
| 92 | 92 | |
| 93 | - $compiledUrl = self::BASE_URL.$memberId.'/'.$id; |
|
| 93 | + $compiledUrl = self::BASE_URL . $memberId . '/' . $id; |
|
| 94 | 94 | |
| 95 | 95 | $response = $this->client->request('GET', $compiledUrl); |
| 96 | 96 | |
| 97 | 97 | $repositoryResponse = RepositoryResponse::fromResponse($response); |
| 98 | 98 | |
| 99 | - if (!$repositoryResponse->isSuccessful()) { |
|
| 99 | + if ( ! $repositoryResponse->isSuccessful()) { |
|
| 100 | 100 | return null; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | public function remove($id, $memberId) |
| 118 | 118 | { |
| 119 | 119 | |
| 120 | - $compiledUrl = self::BASE_URL.$memberId.'/'.$id; |
|
| 120 | + $compiledUrl = self::BASE_URL . $memberId . '/' . $id; |
|
| 121 | 121 | |
| 122 | 122 | $response = $this->client->request('DELETE', $compiledUrl); |
| 123 | 123 | |
@@ -138,20 +138,20 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | |
| 140 | 140 | if ($this->isCacheEnabled()) { |
| 141 | - $cacheKey = self::CACHE_NAMESPACE.sha1($memberId.$start.$maxResults); |
|
| 141 | + $cacheKey = self::CACHE_NAMESPACE . sha1($memberId . $start . $maxResults); |
|
| 142 | 142 | if ($this->cache->contains($cacheKey)) { |
| 143 | 143 | return $this->cache->fetch($cacheKey); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - $compiledUrl = self::BASE_URL.$memberId."?start_element=$start&num_elements=$maxResults"; |
|
| 148 | + $compiledUrl = self::BASE_URL . $memberId . "?start_element=$start&num_elements=$maxResults"; |
|
| 149 | 149 | |
| 150 | 150 | $response = $this->client->request('GET', $compiledUrl); |
| 151 | 151 | |
| 152 | 152 | $repositoryResponse = RepositoryResponse::fromResponse($response); |
| 153 | 153 | |
| 154 | - if (!$repositoryResponse->isSuccessful()) { |
|
| 154 | + if ( ! $repositoryResponse->isSuccessful()) { |
|
| 155 | 155 | return null; |
| 156 | 156 | } |
| 157 | 157 | |
@@ -183,11 +183,11 @@ discard block |
||
| 183 | 183 | public function update(Segment $segment) |
| 184 | 184 | { |
| 185 | 185 | |
| 186 | - if (!$segment->getId()) { |
|
| 186 | + if ( ! $segment->getId()) { |
|
| 187 | 187 | throw new \Exception('name me - missing id'); |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - $compiledUrl = self::BASE_URL.$segment->getMemberId().'/'.$segment->getId(); |
|
| 190 | + $compiledUrl = self::BASE_URL . $segment->getMemberId() . '/' . $segment->getId(); |
|
| 191 | 191 | |
| 192 | 192 | $payload = [ |
| 193 | 193 | 'segment' => $segment->torray(), |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $responseContent = json_decode($stream->getContents(), true); |
| 204 | 204 | $stream->rewind(); |
| 205 | 205 | |
| 206 | - if (!(isset($responseContent['response']['segment']['id']))) { |
|
| 206 | + if ( ! (isset($responseContent['response']['segment']['id']))) { |
|
| 207 | 207 | throw RepositoryException::wrongFormat(serialize($responseContent)); |
| 208 | 208 | } |
| 209 | 209 | |