Completed
Push — master ( 8c5cc3...01b1f4 )
by Francesco
02:33
created
src/service/Report.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 
93 93
         $repositoryResponse = RepositoryResponse::fromResponse($response);
94 94
 
95
-        if (!$repositoryResponse->isSuccessful()) {
95
+        if ( ! $repositoryResponse->isSuccessful()) {
96 96
             throw ReportException::failed($repositoryResponse);
97 97
         }
98 98
 
99
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['report_id'])) {
99
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['report_id'])) {
100 100
             throw ReportException::missingIndex('response->report_id');
101 101
         }
102 102
 
@@ -118,21 +118,21 @@  discard block
 block discarded – undo
118 118
     public function getReportStatus(ReportTicket $reportTicket)
119 119
     {
120 120
 
121
-        $compiledUrl = self::BASE_URL.'?id='.$reportTicket->getReportId();
121
+        $compiledUrl = self::BASE_URL . '?id=' . $reportTicket->getReportId();
122 122
 
123 123
         $response = $this->client->request('GET', $compiledUrl);
124 124
 
125 125
         $repositoryResponse = RepositoryResponse::fromResponse($response);
126 126
 
127
-        if (!$repositoryResponse->isSuccessful()) {
127
+        if ( ! $repositoryResponse->isSuccessful()) {
128 128
             throw ReportException::failed($repositoryResponse);
129 129
         }
130 130
 
131
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['report'])) {
131
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['report'])) {
132 132
             throw ReportException::missingIndex('response->report');
133 133
         }
134 134
 
135
-        if (!isset($repositoryResponse->getResponseAsArray()['response']['execution_status'])) {
135
+        if ( ! isset($repositoryResponse->getResponseAsArray()['response']['execution_status'])) {
136 136
             throw ReportException::missingIndex('response->execution_status');
137 137
         }
138 138
 
@@ -155,15 +155,15 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function getReport(ReportStatus $reportStatus)
157 157
     {
158
-        if (!$reportStatus->isReady()) {
158
+        if ( ! $reportStatus->isReady()) {
159 159
             throw ReportException::validation('report status not readi');
160 160
         }
161 161
 
162
-        if (!$reportStatus->getUrl()) {
162
+        if ( ! $reportStatus->getUrl()) {
163 163
             throw ReportException::validation('missing url in the report status');
164 164
         }
165 165
 
166
-        $cacheKey = self::CACHE_NAMESPACE.sha1($reportStatus->getUrl());
166
+        $cacheKey = self::CACHE_NAMESPACE . sha1($reportStatus->getUrl());
167 167
 
168 168
         if ($this->isCacheEnabled()) {
169 169
             if ($this->cache->contains($cacheKey)) {
@@ -171,14 +171,14 @@  discard block
 block discarded – undo
171 171
             }
172 172
         }
173 173
 
174
-        $compiledUrl = self::BASE_URL_DOWNLOAD.$reportStatus->getUrl();
174
+        $compiledUrl = self::BASE_URL_DOWNLOAD . $reportStatus->getUrl();
175 175
 
176 176
         $response = $this->client->request('GET', $compiledUrl);
177 177
 
178 178
         $lines = explode(PHP_EOL, $response->getBody()->getContents());
179 179
         $result = [];
180 180
         foreach ($lines as $line) {
181
-            if (!empty($line)) {
181
+            if ( ! empty($line)) {
182 182
                 $result[] = str_getcsv($line);
183 183
             }
184 184
         }
Please login to merge, or discard this patch.
src/facade/AppnexusFacade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,9 +175,9 @@
 block discarded – undo
175 175
 
176 176
         $maxSteps = 0;
177 177
 
178
-        while (!$reportStatus->isReady() && $maxSteps < 10) {
178
+        while ( ! $reportStatus->isReady() && $maxSteps < 10) {
179 179
             $reportStatus = $this->report->getReportStatus($reportStatus);
180
-            $maxSteps++;
180
+            $maxSteps ++;
181 181
         }
182 182
 
183 183
         return $this->report->getReport($reportStatus);
Please login to merge, or discard this patch.