Completed
Push — feature/408-release-1.5.1 ( af52ab...deb638 )
by Michael
11:29 queued 06:32
created
www/src/DembeloMain/Model/Repository/Doctrine/ODM/TopicRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 //$value = $value === 'aktiv' ? 1 : 0;
58 58
                 $query->field($field)->equals((int) $value);
59 59
             } else {
60
-                $query->field($field)->equals(new \MongoRegex('/.*'.$value.'.*/i'));
60
+                $query->field($field)->equals(new \MongoRegex('/.*' . $value . '.*/i'));
61 61
             }
62 62
         }
63 63
 
Please login to merge, or discard this patch.
www/src/DembeloMain/Tests/Document/UserTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@
 block discarded – undo
54 54
         $properties = array('id', 'email', 'licenseeId', 'currentTextnode', 'gender', 'source', 'reason', 'password', 'status', 'activationHash');
55 55
 
56 56
         foreach ($properties as $property) {
57
-            $getter = 'get'.ucfirst($property);
58
-            $setter = 'set'.ucfirst($property);
57
+            $getter = 'get' . ucfirst($property);
58
+            $setter = 'set' . ucfirst($property);
59 59
             $string = @tempnam($property, 'hrz');
60 60
             $this->assertNull($this->user->$getter());
61 61
             $this->user->$setter($string);
Please login to merge, or discard this patch.
www/src/DembeloMain/Command/InstallCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
             array('name' => 'Themenfeld 9', 'status' => Topic::STATUS_ACTIVE),
258 258
         );
259 259
 
260
-        $imagesSrcFolder = $this->getContainer()->getParameter('kernel.root_dir').'/../src/DembeloMain/Resources/public/images/';
260
+        $imagesSrcFolder = $this->getContainer()->getParameter('kernel.root_dir') . '/../src/DembeloMain/Resources/public/images/';
261 261
         $imagesTargetFolder = $this->getContainer()->getParameter('topic_image_directory');
262 262
 
263 263
         $sortKey = 1;
264 264
         foreach ($topicData as $topicDatum) {
265 265
             $topic = $repository->findOneByName($topicDatum['name']);
266 266
             if (is_null($topic)) {
267
-                $imagename = 'bg0'.$sortKey.'.jpg';
267
+                $imagename = 'bg0' . $sortKey . '.jpg';
268 268
                 $topic = new Topic();
269 269
                 $topic->setName($topicDatum['name']);
270 270
                 $topic->setStatus($topicDatum['status']);
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
                 $topic->setOriginalImageName($imagename);
273 273
                 $topic->setImageFilename($imagename);
274 274
                 $dm->persist($topic);
275
-                $topicFolder = $imagesTargetFolder.'/'.$topic->getId().'/';
275
+                $topicFolder = $imagesTargetFolder . '/' . $topic->getId() . '/';
276 276
                 mkdir($topicFolder);
277
-                copy($imagesSrcFolder.$imagename, $topicFolder.'/'.$imagename);
277
+                copy($imagesSrcFolder . $imagename, $topicFolder . '/' . $imagename);
278 278
                 $sortKey++;
279 279
             }
280 280
             $this->dummyData['topics'][] = $topic;
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 
410 410
     private function cleanImageDirectories()
411 411
     {
412
-        $topicImageDirectory = $this->getContainer()->getParameter('topic_image_directory').'/';
412
+        $topicImageDirectory = $this->getContainer()->getParameter('topic_image_directory') . '/';
413 413
         if (is_dir($topicImageDirectory)) {
414
-            shell_exec('rm -r '.$topicImageDirectory.'*');
414
+            shell_exec('rm -r ' . $topicImageDirectory . '*');
415 415
         }
416 416
     }
417 417
 }
Please login to merge, or discard this patch.
www/src/DembeloMain/Twig/VersionExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      */
62 62
     public function version()
63 63
     {
64
-        $file = $this->container->get('kernel')->getRootDir().'/../../files/version';
64
+        $file = $this->container->get('kernel')->getRootDir() . '/../../files/version';
65 65
 
66 66
         return file_get_contents($file);
67 67
     }
Please login to merge, or discard this patch.
www/src/DembeloMain/Tests/Command/InstallCommandTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         // the output of the command in the console
74 74
         $output = $this->commandTester->getDisplay();
75
-        $this->assertEquals('admin user installed'."\n".'Default users installed'."\n", $output);
75
+        $this->assertEquals('admin user installed' . "\n" . 'Default users installed' . "\n", $output);
76 76
         $this->assertEquals(0, $returnValue);
77 77
     }
78 78
 
Please login to merge, or discard this patch.
www/src/DembeloMain/Model/Repository/Doctrine/ODM/TextNodeRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
      */
157 157
     private function createArbitraryId(Textnode $object): string
158 158
     {
159
-        $id = substr(md5(time().$object->getTwineId().substr($object->getText(), 0, 100)), 0, 15);
159
+        $id = substr(md5(time() . $object->getTwineId() . substr($object->getText(), 0, 100)), 0, 15);
160 160
         $exists = count($this->findBy(array('arbitraryId' => $id))) > 0;
161 161
 
162 162
         if ($exists) {
Please login to merge, or discard this patch.
www/src/DembeloMain/Tests/Model/ReadpathTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
                 $this->assertEquals($textnodeMockId, $readpathDocument->getTextnodeId());
99 99
                 $this->assertEquals($userMockId, $readpathDocument->getUserId());
100 100
                 $this->assertInstanceOf(\MongoDate::class, $readpathDocument->getTimestamp());
101
-                $this->assertLessThanOrEqual(1, abs($readpathDocument->getTimestamp()->sec-time()));
101
+                $this->assertLessThanOrEqual(1, abs($readpathDocument->getTimestamp()->sec - time()));
102 102
             });
103 103
 
104 104
         $readpath = new Readpath($readpathRepositoryMock, $this->session);
Please login to merge, or discard this patch.
www/src/DembeloMain/Model/FavoriteManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function setFavorite(Textnode $textnode, User $user = null): void
51 51
     {
52 52
         if (null === $user) {
53
-            $this->session->set('favorite_'.$textnode->getTopicId(), $textnode->getArbitraryId());
53
+            $this->session->set('favorite_' . $textnode->getTopicId(), $textnode->getArbitraryId());
54 54
 
55 55
             return;
56 56
         }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     public function getFavorite(Topic $topic, User $user = null): ?string
67 67
     {
68 68
         if (null === $user) {
69
-            return $this->session->get('favorite_'.$topic->getId());
69
+            return $this->session->get('favorite_' . $topic->getId());
70 70
         }
71 71
 
72 72
         return $user->getFavorite($topic->getId());
Please login to merge, or discard this patch.
www/src/DembeloMain/Model/FeatureToggle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,6 +70,6 @@
 block discarded – undo
70 70
 
71 71
     private function buildParameterName(string $featureKey): string
72 72
     {
73
-        return 'features.'.$featureKey;
73
+        return 'features.' . $featureKey;
74 74
     }
75 75
 }
Please login to merge, or discard this patch.