Completed
Pull Request — master (#437)
by Michael
14:05 queued 06:25
created
www/src/DembeloMain/Command/InstallCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         foreach ($topicData as $topicDatum) {
377 377
             $topic = $this->topicRepository->findOneByName($topicDatum['name']);
378 378
             if (null === $topic) {
379
-                $imagename = 'bg0'.$sortKey.'.jpg';
379
+                $imagename = 'bg0' . $sortKey . '.jpg';
380 380
                 $topic = new Topic();
381 381
                 $topic->setName($topicDatum['name']);
382 382
                 $topic->setStatus($topicDatum['status']);
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
                 $topic->setOriginalImageName($imagename);
385 385
                 $topic->setImageFilename($imagename);
386 386
                 $this->topicRepository->save($topic);
387
-                $topicFolder = $imagesTargetFolder.'/'.$topic->getId().'/';
387
+                $topicFolder = $imagesTargetFolder . '/' . $topic->getId() . '/';
388 388
                 if (!mkdir($topicFolder) && !is_dir($topicFolder)) {
389 389
                     throw new \RuntimeException(sprintf('Directory "%s" was not created', $topicFolder));
390 390
                 }
391
-                copy($imagesSrcFolder.$imagename, $topicFolder.'/'.$imagename);
391
+                copy($imagesSrcFolder . $imagename, $topicFolder . '/' . $imagename);
392 392
                 ++$sortKey;
393 393
             }
394 394
             $this->dummyData['topics'][] = $topic;
@@ -532,9 +532,9 @@  discard block
 block discarded – undo
532 532
      */
533 533
     private function cleanImageDirectories(): void
534 534
     {
535
-        $topicImageDirectory = $this->topicImageDirectory.'/';
535
+        $topicImageDirectory = $this->topicImageDirectory . '/';
536 536
         if (is_dir($topicImageDirectory)) {
537
-            shell_exec('rm -r '.$topicImageDirectory.'*');
537
+            shell_exec('rm -r ' . $topicImageDirectory . '*');
538 538
         }
539 539
     }
540 540
 }
Please login to merge, or discard this patch.
www/src/AdminBundle/Command/ImportCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
         $this->prepare($input);
156 156
 
157 157
         if (file_exists($this->twineArchivePath) !== true) {
158
-            $this->output->writeln("<error>Parameter 'twine-archive-file': File '".$this->twineArchivePath."' doesn't exist.</error>");
158
+            $this->output->writeln("<error>Parameter 'twine-archive-file': File '" . $this->twineArchivePath . "' doesn't exist.</error>");
159 159
 
160 160
             return -1;
161 161
         }
162 162
 
163 163
         if (is_readable($this->twineArchivePath) !== true) {
164
-            $this->output->writeln("<error>Parameter 'twine-archive-file': File '".$this->twineArchivePath."' isn't readable.</error>");
164
+            $this->output->writeln("<error>Parameter 'twine-archive-file': File '" . $this->twineArchivePath . "' isn't readable.</error>");
165 165
 
166 166
             return -1;
167 167
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
             $this->importfileRepository->save($importfile);
182 182
         } catch (\Exception $ex) {
183
-            $output->writeln('<error>'.$ex->getMessage().'</error>');
183
+            $output->writeln('<error>' . $ex->getMessage() . '</error>');
184 184
 
185 185
             $this->importTwine->parserFree();
186 186
 
Please login to merge, or discard this patch.