Completed
Push — master ( ea2eeb...b55dab )
by Francesco
06:33
created
src/repository/SegmentRepository.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function add(Segment $segment): RepositoryResponse
53 53
     {
54
-        $compiledUrl = $this->baseUrl.$this->memberId;
54
+        $compiledUrl = $this->baseUrl . $this->memberId;
55 55
 
56 56
         $payload = [
57 57
             'segment' => $segment->toArray(),
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $responseContent = json_decode($stream->getContents(), true);
67 67
             $stream->rewind();
68 68
 
69
-            if (!isset($responseContent['response']['segment']['id'])) {
69
+            if ( ! isset($responseContent['response']['segment']['id'])) {
70 70
                 throw RepositoryException::wrongFormat(serialize($responseContent));
71 71
             }
72 72
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function remove($id): RepositoryResponse
80 80
     {
81
-        $compiledUrl = $this->baseUrl.$this->memberId.'/'.$id;
81
+        $compiledUrl = $this->baseUrl . $this->memberId . '/' . $id;
82 82
 
83 83
         $response = $this->client->request('DELETE', $compiledUrl);
84 84
 
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 
88 88
     public function update(Segment $segment): RepositoryResponse
89 89
     {
90
-        if (!$segment->getId()) {
90
+        if ( ! $segment->getId()) {
91 91
             throw RepositoryException::missingId($segment);
92 92
         }
93 93
 
94
-        $compiledUrl = $this->baseUrl.$this->memberId.'/'.$segment->getId();
94
+        $compiledUrl = $this->baseUrl . $this->memberId . '/' . $segment->getId();
95 95
 
96 96
         $payload = [
97 97
             'segment' => $segment->toArray(),
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 
105 105
     public function findOneById($id): ?Segment
106 106
     {
107
-        $compiledUrl = $this->baseUrl.$this->memberId.'/'.$id;
107
+        $compiledUrl = $this->baseUrl . $this->memberId . '/' . $id;
108 108
 
109 109
         $response = $this->client->request('GET', $compiledUrl);
110 110
 
111 111
         $repositoryResponse = RepositoryResponse::fromResponse($response);
112 112
 
113
-        if (!$repositoryResponse->isSuccessful()) {
113
+        if ( ! $repositoryResponse->isSuccessful()) {
114 114
             return null;
115 115
         }
116 116
 
@@ -123,19 +123,19 @@  discard block
 block discarded – undo
123 123
 
124 124
     public function findAll($start = 0, $maxResults = 100): ?array
125 125
     {
126
-        $cacheKey = self::CACHE_NAMESPACE.sha1($this->memberId.$start.$maxResults);
126
+        $cacheKey = self::CACHE_NAMESPACE . sha1($this->memberId . $start . $maxResults);
127 127
 
128 128
         if ($this->cache->contains($cacheKey)) {
129 129
             return $this->cache->fetch($cacheKey);
130 130
         }
131 131
 
132
-        $compiledUrl = $this->baseUrl.$this->memberId."?start_element=$start&num_elements=$maxResults";
132
+        $compiledUrl = $this->baseUrl . $this->memberId . "?start_element=$start&num_elements=$maxResults";
133 133
 
134 134
         $response = $this->client->request('GET', $compiledUrl);
135 135
 
136 136
         $repositoryResponse = RepositoryResponse::fromResponse($response);
137 137
 
138
-        if (!$repositoryResponse->isSuccessful()) {
138
+        if ( ! $repositoryResponse->isSuccessful()) {
139 139
             throw RepositoryException::failed($repositoryResponse);
140 140
         }
141 141
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         $result = [];
147 147
 
148
-        if (!$responseContent['response']['segments']) {
148
+        if ( ! $responseContent['response']['segments']) {
149 149
             $responseContent['response']['segments'] = [];
150 150
         }
151 151
 
Please login to merge, or discard this patch.
src/repository/MemberDataSharingRepository.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -67,19 +67,19 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function findAll($start = 0, $maxResults = 100)
69 69
     {
70
-        $cacheKey = self::CACHE_NAMESPACE.sha1($start.$maxResults);
70
+        $cacheKey = self::CACHE_NAMESPACE . sha1($start . $maxResults);
71 71
 
72 72
         if ($this->cache->contains($cacheKey)) {
73 73
             return $this->cache->fetch($cacheKey);
74 74
         }
75 75
 
76
-        $compiledUrl = $this->baseUrl."?start_element=$start&num_elements=$maxResults";
76
+        $compiledUrl = $this->baseUrl . "?start_element=$start&num_elements=$maxResults";
77 77
 
78 78
         $response = $this->client->request('GET', $compiledUrl);
79 79
 
80 80
         $repositoryResponse = RepositoryResponse::fromResponse($response);
81 81
 
82
-        if (!$repositoryResponse->isSuccessful()) {
82
+        if ( ! $repositoryResponse->isSuccessful()) {
83 83
             throw RepositoryException::failed($repositoryResponse);
84 84
         }
85 85
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
         $result = [];
91 91
 
92
-        if (!$responseContent['response']['member_data_sharings']) {
92
+        if ( ! $responseContent['response']['member_data_sharings']) {
93 93
             $responseContent['response']['member_data_sharings'] = [];
94 94
         }
95 95
 
@@ -111,19 +111,19 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function findByBuyerId($buyerId, $memberId)
113 113
     {
114
-        $cacheKey = self::CACHE_NAMESPACE.sha1($buyerId.$memberId);
114
+        $cacheKey = self::CACHE_NAMESPACE . sha1($buyerId . $memberId);
115 115
 
116 116
         if ($this->cache->contains($cacheKey)) {
117 117
             return $this->cache->fetch($cacheKey);
118 118
         }
119 119
 
120
-        $compiledUrl = $this->baseUrl."?data_member_id=$memberId&buyer_member_id=$buyerId";
120
+        $compiledUrl = $this->baseUrl . "?data_member_id=$memberId&buyer_member_id=$buyerId";
121 121
 
122 122
         $response = $this->client->request('GET', $compiledUrl);
123 123
 
124 124
         $repositoryResponse = RepositoryResponse::fromResponse($response);
125 125
 
126
-        if (!$repositoryResponse->isSuccessful()) {
126
+        if ( ! $repositoryResponse->isSuccessful()) {
127 127
             throw RepositoryException::failed($repositoryResponse);
128 128
         }
129 129
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $result = [];
135 135
 
136
-        if (!$responseContent['response']['member_data_sharings']) {
136
+        if ( ! $responseContent['response']['member_data_sharings']) {
137 137
             $responseContent['response']['member_data_sharings'] = [];
138 138
         }
139 139
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
             $segments = [];
144 144
 
145
-            if (!empty($memberDataSharing->getSegments() && count($memberDataSharing->getSegments()) > 0)) {
145
+            if ( ! empty($memberDataSharing->getSegments() && count($memberDataSharing->getSegments()) > 0)) {
146 146
                 foreach ($memberDataSharing->getSegments() as $segment) {
147 147
                     $segments[] = MemberDataSharingSegment::fromArray($segment);
148 148
                 }
@@ -164,19 +164,19 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function findById($id)
166 166
     {
167
-        $cacheKey = self::CACHE_NAMESPACE.sha1((string)$id);
167
+        $cacheKey = self::CACHE_NAMESPACE . sha1((string) $id);
168 168
 
169 169
         if ($this->cache->contains($cacheKey)) {
170 170
             return $this->cache->fetch($cacheKey);
171 171
         }
172 172
 
173
-        $compiledUrl = $this->baseUrl."$id";
173
+        $compiledUrl = $this->baseUrl . "$id";
174 174
 
175 175
         $response = $this->client->request('GET', $compiledUrl);
176 176
 
177 177
         $repositoryResponse = RepositoryResponse::fromResponse($response);
178 178
 
179
-        if (!$repositoryResponse->isSuccessful()) {
179
+        if ( ! $repositoryResponse->isSuccessful()) {
180 180
             throw RepositoryException::failed($repositoryResponse);
181 181
         }
182 182
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         $result = [];
188 188
 
189
-        if (!$responseContent['response']['member_data_sharing']) {
189
+        if ( ! $responseContent['response']['member_data_sharing']) {
190 190
             $responseContent['response']['member_data_sharing'] = [];
191 191
         }
192 192
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
         $segments = [];
196 196
 
197
-        if (!empty($memberDataSharing->getSegments() && count($memberDataSharing->getSegments()) > 0)) {
197
+        if ( ! empty($memberDataSharing->getSegments() && count($memberDataSharing->getSegments()) > 0)) {
198 198
             foreach ($memberDataSharing->getSegments() as $segment) {
199 199
                 $segments[] = MemberDataSharingSegment::fromArray($segment);
200 200
             }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             'member_data_sharing' => $mSharing->toArray(),
223 223
         ];
224 224
 
225
-        if (!empty($mSharing->getSegments())) {
225
+        if ( ! empty($mSharing->getSegments())) {
226 226
             $segmentToUpload = [];
227 227
 
228 228
             foreach ($mSharing->getSegments() as $segment) {
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             $responseContent = json_decode($stream->getContents(), true);
242 242
             $stream->rewind();
243 243
 
244
-            if (!(isset($responseContent['response']['member_data_sharing']['id']))) {
244
+            if ( ! (isset($responseContent['response']['member_data_sharing']['id']))) {
245 245
                 throw RepositoryException::wrongFormat(serialize($responseContent));
246 246
             }
247 247
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function addSegmentsToMemberDataSharing($memberDataSharingId, $segments)
261 261
     {
262
-        $compiledUrl = $this->baseUrl.$memberDataSharingId;
262
+        $compiledUrl = $this->baseUrl . $memberDataSharingId;
263 263
 
264 264
         /** @var MemberDataSharingSegment[] $mdObject */
265 265
         $mdObjectArray = $this->findById($memberDataSharingId);
@@ -293,11 +293,11 @@  discard block
 block discarded – undo
293 293
 
294 294
     public function update(MemberDataSharing $memberDataSharing)
295 295
     {
296
-        if (!$memberDataSharing->getId()) {
296
+        if ( ! $memberDataSharing->getId()) {
297 297
             throw RepositoryException::missingMemberDataSharingId($memberDataSharing);
298 298
         }
299 299
 
300
-        $compiledUrl = $this->baseUrl.'?id='.$memberDataSharing->getId();
300
+        $compiledUrl = $this->baseUrl . '?id=' . $memberDataSharing->getId();
301 301
 
302 302
         $payload = [
303 303
             'member_data_sharing' => $memberDataSharing->toArray(),
Please login to merge, or discard this patch.
src/repository/SegmentBillingRepository.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function add(SegmentBilling $segmentBilling): RepositoryResponse
52 52
     {
53
-        $compiledUrl = $this->baseUrl.'?member_id='.$this->memberId;
53
+        $compiledUrl = $this->baseUrl . '?member_id=' . $this->memberId;
54 54
 
55 55
         $payload = [
56 56
             'segment-billing-category' => $segmentBilling->toArray(),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 throw RepositoryException::missingSegmentBillingContent();
71 71
             }
72 72
 
73
-            if (!(isset($responseContent['response']['segment-billing-category'][0]['id']))) {
73
+            if ( ! (isset($responseContent['response']['segment-billing-category'][0]['id']))) {
74 74
                 throw RepositoryException::wrongFormat(serialize($responseContent));
75 75
             }
76 76
 
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function update(SegmentBilling $segmentBilling): RepositoryResponse
84 84
     {
85
-        if (!$segmentBilling->getId()) {
85
+        if ( ! $segmentBilling->getId()) {
86 86
             throw RepositoryException::missingSegmentBillingId($segmentBilling);
87 87
         }
88 88
 
89
-        $compiledUrl = $this->baseUrl.'?member_id='.$this->memberId;
89
+        $compiledUrl = $this->baseUrl . '?member_id=' . $this->memberId;
90 90
 
91 91
         $payload = [
92 92
             'segment-billing-category' => $segmentBilling->toArray(),
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 
100 100
     public function findOneBySegmentId($segmentId): ?SegmentBilling
101 101
     {
102
-        $compiledUrl = $this->baseUrl.'?member_id='.$this->memberId.'&segment_id='.$segmentId;
102
+        $compiledUrl = $this->baseUrl . '?member_id=' . $this->memberId . '&segment_id=' . $segmentId;
103 103
 
104 104
         $response = $this->client->request('GET', $compiledUrl);
105 105
 
106 106
         $repositoryResponse = RepositoryResponse::fromResponse($response);
107 107
 
108
-        if (!$repositoryResponse->isSuccessful()) {
108
+        if ( ! $repositoryResponse->isSuccessful()) {
109 109
             throw RepositoryException::failed($repositoryResponse);
110 110
         }
111 111
 
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
         $responseContent = json_decode($stream->getContents(), true);
114 114
         $stream->rewind();
115 115
 
116
-        if (!$responseContent['response']['segment-billing-categories']) {
116
+        if ( ! $responseContent['response']['segment-billing-categories']) {
117 117
             return null;
118 118
         }
119 119
 
120 120
         if (count($responseContent['response']['segment-billing-categories']) > 1) {
121
-            throw RepositoryException::genericFailed('Expected only one results. Found '.count($responseContent['response']['segment-billing-categories']));
121
+            throw RepositoryException::genericFailed('Expected only one results. Found ' . count($responseContent['response']['segment-billing-categories']));
122 122
         }
123 123
 
124 124
         return SegmentBilling::fromArray($responseContent['response']['segment-billing-categories'][0]);
@@ -126,19 +126,19 @@  discard block
 block discarded – undo
126 126
 
127 127
     public function findAll($start = 0, $maxResults = 100): ?array
128 128
     {
129
-        $cacheKey = self::CACHE_NAMESPACE.sha1($this->memberId.$start.$maxResults);
129
+        $cacheKey = self::CACHE_NAMESPACE . sha1($this->memberId . $start . $maxResults);
130 130
 
131 131
         if ($this->cache->contains($cacheKey)) {
132 132
             return $this->cache->fetch($cacheKey);
133 133
         }
134 134
 
135
-        $compiledUrl = $this->baseUrl.'?member_id='.$this->memberId.'&start_element='.$start.'&num_elements='.$maxResults;
135
+        $compiledUrl = $this->baseUrl . '?member_id=' . $this->memberId . '&start_element=' . $start . '&num_elements=' . $maxResults;
136 136
 
137 137
         $response = $this->client->request('GET', $compiledUrl);
138 138
 
139 139
         $repositoryResponse = RepositoryResponse::fromResponse($response);
140 140
 
141
-        if (!$repositoryResponse->isSuccessful()) {
141
+        if ( ! $repositoryResponse->isSuccessful()) {
142 142
             throw RepositoryException::failed($repositoryResponse);
143 143
         }
144 144
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
         $result = [];
150 150
 
151
-        if (!$responseContent['response']['segment-billing-categories']) {
151
+        if ( ! $responseContent['response']['segment-billing-categories']) {
152 152
             $responseContent['response']['segment-billing-categories'] = [];
153 153
         }
154 154
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     public function remove($id)
165 165
     {
166
-        $compiledUrl = $this->baseUrl.'?member_id='.$this->memberId.'&id='.$id;
166
+        $compiledUrl = $this->baseUrl . '?member_id=' . $this->memberId . '&id=' . $id;
167 167
 
168 168
         $response = $this->client->request('DELETE', $compiledUrl);
169 169
 
Please login to merge, or discard this patch.
src/service/Report.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
 
163 163
         $repositoryResponse = RepositoryResponse::fromResponse($response);
164 164
 
165
-        if (!$repositoryResponse->isSuccessful()) {
165
+        if ( ! $repositoryResponse->isSuccessful()) {
166 166
             throw ReportException::failed($repositoryResponse);
167 167
         }
168 168
 
169
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['report_id'])) {
169
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['report_id'])) {
170 170
             throw ReportException::missingIndex('response->report_id');
171 171
         }
172 172
 
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
      */
186 186
     public function getReportStatus(ReportTicket $reportTicket)
187 187
     {
188
-        $compiledUrl = $this->baseUrl.'?id='.$reportTicket->getReportId();
188
+        $compiledUrl = $this->baseUrl . '?id=' . $reportTicket->getReportId();
189 189
 
190 190
         $response = $this->client->request('GET', $compiledUrl);
191 191
 
192 192
         $repositoryResponse = RepositoryResponse::fromResponse($response);
193 193
 
194
-        if (!$repositoryResponse->isSuccessful()) {
194
+        if ( ! $repositoryResponse->isSuccessful()) {
195 195
             throw ReportException::failed($repositoryResponse);
196 196
         }
197 197
 
198
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['report'])) {
198
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['report'])) {
199 199
             throw ReportException::missingIndex('response->report');
200 200
         }
201 201
 
202
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['execution_status'])) {
202
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['execution_status'])) {
203 203
             throw ReportException::missingIndex('response->execution_status');
204 204
         }
205 205
 
@@ -220,28 +220,28 @@  discard block
 block discarded – undo
220 220
      */
221 221
     public function getReport(ReportStatus $reportStatus)
222 222
     {
223
-        if (!$reportStatus->isReady()) {
223
+        if ( ! $reportStatus->isReady()) {
224 224
             throw ReportException::validation('report status not ready');
225 225
         }
226 226
 
227
-        if (!$reportStatus->getUrl()) {
227
+        if ( ! $reportStatus->getUrl()) {
228 228
             throw ReportException::validation('missing url in the report status');
229 229
         }
230 230
 
231
-        $cacheKey = self::CACHE_NAMESPACE.sha1($reportStatus->getUrl());
231
+        $cacheKey = self::CACHE_NAMESPACE . sha1($reportStatus->getUrl());
232 232
 
233 233
         if ($this->cache->contains($cacheKey)) {
234 234
             return $this->cache->fetch($cacheKey);
235 235
         }
236 236
 
237
-        $compiledUrl = $this->baseUrlDownload.$reportStatus->getUrl();
237
+        $compiledUrl = $this->baseUrlDownload . $reportStatus->getUrl();
238 238
 
239 239
         $response = $this->client->request('GET', $compiledUrl);
240 240
 
241 241
         $lines  = explode(PHP_EOL, $response->getBody()->getContents());
242 242
         $result = [];
243 243
         foreach ($lines as $line) {
244
-            if (!empty($line)) {
244
+            if ( ! empty($line)) {
245 245
                 $result[] = str_getcsv($line);
246 246
             }
247 247
         }
Please login to merge, or discard this patch.
src/service/UserUpload.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         $repositoryResponse = RepositoryResponse::fromResponse($response);
89 89
 
90
-        if (!$repositoryResponse->isSuccessful()) {
90
+        if ( ! $repositoryResponse->isSuccessful()) {
91 91
             throw UploadException::failed($repositoryResponse);
92 92
         }
93 93
 
@@ -102,17 +102,17 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function getUploadTicket($memberId)
104 104
     {
105
-        $compiledUrl = $this->baseUrl.'?member_id='.$memberId;
105
+        $compiledUrl = $this->baseUrl . '?member_id=' . $memberId;
106 106
 
107 107
         $response = $this->client->request('POST', $compiledUrl);
108 108
 
109 109
         $repositoryResponse = RepositoryResponse::fromResponse($response);
110 110
 
111
-        if (!$repositoryResponse->isSuccessful()) {
111
+        if ( ! $repositoryResponse->isSuccessful()) {
112 112
             throw UploadException::failed($repositoryResponse);
113 113
         }
114 114
 
115
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['batch_segment_upload_job'])) {
115
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['batch_segment_upload_job'])) {
116 116
             throw UploadException::missingIndex('response->batch_segment_upload_job');
117 117
         }
118 118
 
@@ -131,17 +131,17 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function getJobStatus(UploadTicket $uploadTicket)
133 133
     {
134
-        $compiledUrl = $this->baseUrl."?member_id={$uploadTicket->getMemberId()}&job_id={$uploadTicket->getJobId()}";
134
+        $compiledUrl = $this->baseUrl . "?member_id={$uploadTicket->getMemberId()}&job_id={$uploadTicket->getJobId()}";
135 135
 
136 136
         $response = $this->client->request('GET', $compiledUrl);
137 137
 
138 138
         $repositoryResponse = RepositoryResponse::fromResponse($response);
139 139
 
140
-        if (!$repositoryResponse->isSuccessful()) {
140
+        if ( ! $repositoryResponse->isSuccessful()) {
141 141
             throw UploadException::failed($repositoryResponse);
142 142
         }
143 143
 
144
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['batch_segment_upload_job'][0])) {
144
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['batch_segment_upload_job'][0])) {
145 145
             throw UploadException::missingIndex('response->batch_segment_upload_job->0');
146 146
         }
147 147
 
@@ -162,17 +162,17 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function getUploadHistory($memberId, $start = 0, $maxResults = 100)
164 164
     {
165
-        $compiledUrl = $this->baseUrl."?member_id=$memberId&start_element=$start&num_elements=$maxResults";
165
+        $compiledUrl = $this->baseUrl . "?member_id=$memberId&start_element=$start&num_elements=$maxResults";
166 166
 
167 167
         $response = $this->client->request('GET', $compiledUrl);
168 168
 
169 169
         $repositoryResponse = RepositoryResponse::fromResponse($response);
170 170
 
171
-        if (!$repositoryResponse->isSuccessful()) {
171
+        if ( ! $repositoryResponse->isSuccessful()) {
172 172
             throw UploadException::failed($repositoryResponse);
173 173
         }
174 174
 
175
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['batch_segment_upload_job'][0])) {
175
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['batch_segment_upload_job'][0])) {
176 176
             throw UploadException::missingIndex('response->batch_segment_upload_job->0');
177 177
         }
178 178
 
Please login to merge, or discard this patch.
src/exceptions/RepositoryException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,22 +22,22 @@  discard block
 block discarded – undo
22 22
 
23 23
     public static function missingId(Segment $segment): self
24 24
     {
25
-        return new self('Missing segment id for '.serialize($segment->getName()));
25
+        return new self('Missing segment id for ' . serialize($segment->getName()));
26 26
     }
27 27
 
28 28
     public static function missingMemberDataSharingId(MemberDataSharing $memberDataSharing): self
29 29
     {
30
-        return new self('Missing Member data sharing id for '.serialize($memberDataSharing));
30
+        return new self('Missing Member data sharing id for ' . serialize($memberDataSharing));
31 31
     }
32 32
 
33 33
     public static function missingSegmentBillingId(SegmentBilling $segmentsegmentBilling): self
34 34
     {
35
-        return new self('Missing segment billing id for '.serialize($segmentsegmentBilling->getId()));
35
+        return new self('Missing segment billing id for ' . serialize($segmentsegmentBilling->getId()));
36 36
     }
37 37
 
38 38
     public static function failed(RepositoryResponse $repositoryResponse): self
39 39
     {
40
-        return new self('Failed call: '.$repositoryResponse->getError()->getError());
40
+        return new self('Failed call: ' . $repositoryResponse->getError()->getError());
41 41
     }
42 42
 
43 43
     public static function genericFailed(string $reason): self
@@ -47,6 +47,6 @@  discard block
 block discarded – undo
47 47
 
48 48
     public static function missingIndex(string $missingIndex): self
49 49
     {
50
-        return new self('Invalid reposnse missing: '.$missingIndex);
50
+        return new self('Invalid reposnse missing: ' . $missingIndex);
51 51
     }
52 52
 }
Please login to merge, or discard this patch.