Completed
Pull Request — master (#457)
by Michael
14:11 queued 07:21
created
www/src/AdminBundle/Controller/TopicController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             return new Response(\json_encode([]));
68 68
         }
69 69
 
70
-        $output = [] ;
70
+        $output = [];
71 71
         /* @var $topic \DembeloMain\Document\Topic */
72 72
         foreach ($topics as $topic) {
73 73
             $item = [];
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $searchString = $filter['value'];
99 99
 
100 100
         /* @var $topics \DembeloMain\Document\Topic[] */
101
-        $topics = $this->topicRepository->findBy(array('name' => new \MongoRegex('/'.$searchString.'/')), null, 10);
101
+        $topics = $this->topicRepository->findBy(array('name' => new \MongoRegex('/' . $searchString . '/')), null, 10);
102 102
 
103 103
         $output = [];
104 104
         foreach ($topics as $topic) {
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
             return new Response(\json_encode($output));
131 131
         }
132 132
         $directory = $request->query->get('topic_image_directory');
133
-        $filename = md5(uniqid('', true).$file['name']);
134
-        move_uploaded_file($file["tmp_name"], $directory.$filename);
133
+        $filename = md5(uniqid('', true) . $file['name']);
134
+        move_uploaded_file($file["tmp_name"], $directory . $filename);
135 135
         $output['imageFileName'] = $filename;
136 136
         $output['originalImageName'] = $file['name'];
137 137
 
Please login to merge, or discard this patch.
www/src/AdminBundle/Controller/TextnodeController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             $obj->access = $textnode->getAccess() ? 'ja' : 'nein';
86 86
             $obj->licensee = $licenseeIndex[$textnode->getLicenseeId()];
87 87
             $obj->importfile = $importfileIndex[$textnode->getImportfileId()] ?? 'unbekannt';
88
-            $obj->beginning = substr(htmlentities(strip_tags($textnode->getText())), 0, 200).'...';
88
+            $obj->beginning = substr(htmlentities(strip_tags($textnode->getText())), 0, 200) . '...';
89 89
             $obj->financenode = $textnode->isFinanceNode() ? 'ja' : 'nein';
90 90
             $obj->arbitraryId = $textnode->getArbitraryId();
91 91
             $obj->twineId = $textnode->getTwineId();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 $arbitraryId = $hitch->getTargetTextnode()->getArbitraryId();
118 118
             }
119 119
 
120
-            $string .= $counter.') '.$hitch->getDescription().' ['.$arbitraryId.']'."\n";
120
+            $string .= $counter . ') ' . $hitch->getDescription() . ' [' . $arbitraryId . ']' . "\n";
121 121
         }
122 122
 
123 123
         return $string;
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     {
147 147
         $string = '';
148 148
         foreach ($metadata as $key => $value) {
149
-            $string .= $key.': '.$value."\n";
149
+            $string .= $key . ': ' . $value . "\n";
150 150
         }
151 151
 
152 152
         return $string;
Please login to merge, or discard this patch.
www/src/AdminBundle/Controller/DefaultController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             } elseif ('' === $value && in_array($param, ['licenseeId', 'imported'], true)) {
207 207
                 $value = null;
208 208
             }
209
-            $method = 'set'.ucfirst($param);
209
+            $method = 'set' . ucfirst($param);
210 210
             if (method_exists($item, $method)) {
211 211
                 $item->$method($value);
212 212
             }
@@ -261,13 +261,13 @@  discard block
 block discarded – undo
261 261
     private function saveFile(Importfile $item, $filename, $orgname): void
262 262
     {
263 263
         $directory = $this->configTwineDirectory;
264
-        $file = $directory.$filename;
264
+        $file = $directory . $filename;
265 265
         if (!$this->filesystem->exists($file)) {
266 266
             return;
267 267
         }
268
-        $finalDirectory = $directory.$item->getLicenseeId().'/';
268
+        $finalDirectory = $directory . $item->getLicenseeId() . '/';
269 269
         $this->filesystem->mkdir($finalDirectory);
270
-        $finalName = $finalDirectory.$item->getId();
270
+        $finalName = $finalDirectory . $item->getId();
271 271
 
272 272
         $this->filesystem->rename($file, $finalName);
273 273
 
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
     private function saveTopicImage(Topic $item, string $filename, string $orgname): void
290 290
     {
291 291
         $directory = $this->topicImageDirectory;
292
-        $finalDirectory = $directory.$item->getId().'/';
292
+        $finalDirectory = $directory . $item->getId() . '/';
293 293
         $this->filesystem->mkdir($finalDirectory);
294 294
 
295
-        $finalName = $finalDirectory.$orgname;
296
-        $file = $directory.$filename;
295
+        $finalName = $finalDirectory . $orgname;
296
+        $file = $directory . $filename;
297 297
         $this->filesystem->rename($file, $finalName);
298 298
         $item->setOriginalImageName($orgname);
299 299
         $item->setImageFilename($finalName);
Please login to merge, or discard this patch.