Completed
Push — feature/EVO-3237-jc-send-file-... ( ff951d )
by
unknown
09:40
created
src/Command/ImportCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             $output->writeln("<info>Loading data from ${file}</info>");
178 178
 
179 179
             if (!array_key_exists('target', $doc->getData())) {
180
-                throw new MissingTargetException('Missing target in \'' . $file . '\'');
180
+                throw new MissingTargetException('Missing target in \''.$file.'\'');
181 181
             }
182 182
 
183 183
             $targetUrl = sprintf('%s%s', $host, $doc->getData()['target']);
@@ -226,15 +226,15 @@  discard block
 block discarded – undo
226 226
         $content = str_replace($rewriteHost, $rewriteTo, $doc->getContent());
227 227
         $uploadFile = $this->validateUploadFile($doc, $file);
228 228
 
229
-        $successFunc = function (ResponseInterface $response) use ($output) {
229
+        $successFunc = function(ResponseInterface $response) use ($output) {
230 230
             $output->writeln(
231
-                '<comment>Wrote ' . $response->getHeader('Link')[0] . '</comment>'
231
+                '<comment>Wrote '.$response->getHeader('Link')[0].'</comment>'
232 232
             );
233 233
         };
234 234
 
235
-        $errFunc = function (RequestException $e) use ($output, $file) {
235
+        $errFunc = function(RequestException $e) use ($output, $file) {
236 236
             $output->writeln(
237
-                '<error>' . str_pad(
237
+                '<error>'.str_pad(
238 238
                     sprintf(
239 239
                         'Failed to write <%s> from \'%s\' with message \'%s\'',
240 240
                         $e->getRequest()->getUri(),
@@ -243,17 +243,17 @@  discard block
 block discarded – undo
243 243
                     ),
244 244
                     140,
245 245
                     ' '
246
-                ) . '</error>'
246
+                ).'</error>'
247 247
             );
248 248
             if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
249 249
                 $this->dumper->dump(
250 250
                     $this->cloner->cloneVar(
251 251
                         $this->parser->parse($e->getResponse()->getBody(), false, false, true)
252 252
                     ),
253
-                    function ($line, $depth) use ($output) {
253
+                    function($line, $depth) use ($output) {
254 254
                         if ($depth > 0) {
255 255
                             $output->writeln(
256
-                                '<error>' . str_pad(str_repeat('  ', $depth) . $line, 140, ' ') . '</error>'
256
+                                '<error>'.str_pad(str_repeat('  ', $depth).$line, 140, ' ').'</error>'
257 257
                             );
258 258
                         }
259 259
                     }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         }
342 342
 
343 343
         // Find file
344
-        $fileName = dirname($originFile) . DIRECTORY_SEPARATOR . $documentData['file'];
344
+        $fileName = dirname($originFile).DIRECTORY_SEPARATOR.$documentData['file'];
345 345
         $fileName = str_replace('//', '/', $fileName);
346 346
         if (!file_exists($fileName)) {
347 347
             return false;
Please login to merge, or discard this patch.