@@ -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,7 +90,7 @@ discard block |
||
| 90 | 90 | public function remove($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('DELETE', $compiledUrl); |
| 96 | 96 | |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | public function update(Segment $segment) |
| 110 | 110 | { |
| 111 | 111 | |
| 112 | - if (!$segment->getId()) { |
|
| 112 | + if ( ! $segment->getId()) { |
|
| 113 | 113 | throw new \Exception('name me - missing id'); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - $compiledUrl = self::BASE_URL.$segment->getMemberId().'/'.$segment->getId(); |
|
| 116 | + $compiledUrl = self::BASE_URL . $segment->getMemberId() . '/' . $segment->getId(); |
|
| 117 | 117 | |
| 118 | 118 | $payload = [ |
| 119 | 119 | 'segment' => $segment->torray(), |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | public function findOneById($id, $memberId) |
| 137 | 137 | { |
| 138 | 138 | |
| 139 | - $compiledUrl = self::BASE_URL.$memberId.'/'.$id; |
|
| 139 | + $compiledUrl = self::BASE_URL . $memberId . '/' . $id; |
|
| 140 | 140 | |
| 141 | 141 | $response = $this->client->request('GET', $compiledUrl); |
| 142 | 142 | |
| 143 | 143 | $repositoryResponse = RepositoryResponse::fromResponse($response); |
| 144 | 144 | |
| 145 | - if (!$repositoryResponse->isSuccessful()) { |
|
| 145 | + if ( ! $repositoryResponse->isSuccessful()) { |
|
| 146 | 146 | return null; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -165,20 +165,20 @@ discard block |
||
| 165 | 165 | { |
| 166 | 166 | |
| 167 | 167 | if ($this->isCacheEnabled()) { |
| 168 | - $cacheKey = self::CACHE_NAMESPACE.sha1($memberId.$start.$maxResults); |
|
| 168 | + $cacheKey = self::CACHE_NAMESPACE . sha1($memberId . $start . $maxResults); |
|
| 169 | 169 | if ($this->cache->contains($cacheKey)) { |
| 170 | 170 | return $this->cache->fetch($cacheKey); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - $compiledUrl = self::BASE_URL.$memberId."?start_element=$start&num_elements=$maxResults"; |
|
| 175 | + $compiledUrl = self::BASE_URL . $memberId . "?start_element=$start&num_elements=$maxResults"; |
|
| 176 | 176 | |
| 177 | 177 | $response = $this->client->request('GET', $compiledUrl); |
| 178 | 178 | |
| 179 | 179 | $repositoryResponse = RepositoryResponse::fromResponse($response); |
| 180 | 180 | |
| 181 | - if (!$repositoryResponse->isSuccessful()) { |
|
| 181 | + if ( ! $repositoryResponse->isSuccessful()) { |
|
| 182 | 182 | return null; |
| 183 | 183 | } |
| 184 | 184 | |