Passed
Push — master ( aa3dc5...40feff )
by Michael
01:43
created
www/src/AdminBundle/Tests/Controller/DefaultControllerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         /* @var $response \Symfony\Component\HttpFoundation\Response */
153 153
         $response = $controller->usersAction($request);
154 154
         $this->assertInstanceOf(Response::class, $response);
155
-        $this->assertJsonStringEqualsJsonString('[{"id":"id1","gender":null,"email":"email1","roles":"ROLE_ADMIN","licenseeId":"lic1","status":null,"source":null,"reason":null,"created":"'.date('Y-m-d H:i:s', 0).'","updated":"'.date('Y-m-d H:i:s', 0).'"},{"id":"id2","email":"email2","roles":"ROLE_USER","licenseeId":"lic2","status":null,"source":null,"reason":null,"gender":null,"created":"'.date('Y-m-d H:i:s', 0).'","updated":"'.date('Y-m-d H:i:s', 0).'"}]', $response->getContent());
155
+        $this->assertJsonStringEqualsJsonString('[{"id":"id1","gender":null,"email":"email1","roles":"ROLE_ADMIN","licenseeId":"lic1","status":null,"source":null,"reason":null,"created":"' . date('Y-m-d H:i:s', 0) . '","updated":"' . date('Y-m-d H:i:s', 0) . '"},{"id":"id2","email":"email2","roles":"ROLE_USER","licenseeId":"lic2","status":null,"source":null,"reason":null,"gender":null,"created":"' . date('Y-m-d H:i:s', 0) . '","updated":"' . date('Y-m-d H:i:s', 0) . '"}]', $response->getContent());
156 156
         $this->assertEquals('200', $response->getStatusCode());
157 157
     }
158 158
 
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
         $this->repository = $this->getMockBuilder(DocumentRepository::class)->disableOriginalConstructor()->getMock();
511 511
         $this->container->expects($this->once())
512 512
             ->method("get")
513
-            ->with($this->equalTo('app.model_repository_'.$repository))
513
+            ->with($this->equalTo('app.model_repository_' . $repository))
514 514
             ->will($this->returnValue($this->repository));
515 515
     }
516 516
 }
Please login to merge, or discard this patch.
www/src/AdminBundle/Controller/TopicController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@
 block discarded – undo
96 96
             return new Response(\json_encode($output));
97 97
         }
98 98
         $directory = $this->getParameter('topic_image_directory');
99
-        $filename = md5(uniqid().$file['name']);
100
-        move_uploaded_file($file["tmp_name"], $directory.$filename);
99
+        $filename = md5(uniqid() . $file['name']);
100
+        move_uploaded_file($file["tmp_name"], $directory . $filename);
101 101
         $output['imageFileName'] = $filename;
102 102
         $output['originalImageName'] = $file['name'];
103 103
 
Please login to merge, or discard this patch.
www/src/AdminBundle/Command/ImportCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
         $this->prepare($input);
99 99
 
100 100
         if (file_exists($this->twineArchivePath) !== true) {
101
-            $this->output->writeln("<error>Parameter 'twine-archive-file': File '".$this->twineArchivePath."' doesn't exist.</error>");
101
+            $this->output->writeln("<error>Parameter 'twine-archive-file': File '" . $this->twineArchivePath . "' doesn't exist.</error>");
102 102
 
103 103
             return -1;
104 104
         }
105 105
 
106 106
         if (is_readable($this->twineArchivePath) !== true) {
107
-            $this->output->writeln("<error>Parameter 'twine-archive-file': File '".$this->twineArchivePath."' isn't readable.</error>");
107
+            $this->output->writeln("<error>Parameter 'twine-archive-file': File '" . $this->twineArchivePath . "' isn't readable.</error>");
108 108
 
109 109
             return -1;
110 110
         }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
             $this->dm->flush();
125 125
         } catch (\Exception $ex) {
126
-            $output->writeln('<error>'.$ex->getMessage().'</error>');
126
+            $output->writeln('<error>' . $ex->getMessage() . '</error>');
127 127
 
128 128
             $importTwine->parserFree();
129 129
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
          */
152 152
         $licensee = $repositoryLicensee->findOneByName($input->getOption('licensee-name'));
153 153
         if (is_null($licensee)) {
154
-            throw new \Exception("<error>A Licensee named '".$input->getOption('licensee-name')."' doesn't exist.</error>");
154
+            throw new \Exception("<error>A Licensee named '" . $input->getOption('licensee-name') . "' doesn't exist.</error>");
155 155
         }
156 156
 
157 157
         $this->author = $input->getOption('metadata-author');
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.
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/Controller/DefaultControllerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $router->expects($this->once())
131 131
             ->method("generate")
132 132
             ->with("login_route", array())
133
-            ->will($this->returnValue("text/".$textnode->getId()));
133
+            ->will($this->returnValue("text/" . $textnode->getId()));
134 134
 
135 135
         $controller = new DefaultController();
136 136
         $controller->setContainer($container);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
         $this->assertEquals('Symfony\Component\HttpFoundation\RedirectResponse', get_class($result));
141 141
         $this->assertEquals('302', $result->getStatusCode());
142
-        $this->assertEquals('text/'.$textnode->getId(), $result->getTargetUrl());
142
+        $this->assertEquals('text/' . $textnode->getId(), $result->getTargetUrl());
143 143
     }
144 144
 
145 145
     /** @todo Implement testReadTopicWithLogin(). */
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/Controller/DefaultController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $textnode = $textnodeRepository->getTextnodeToRead($topicId);
64 64
 
65 65
         if (is_null($textnode)) {
66
-            throw $this->createNotFoundException('No Textnode for Topic \''.$topicId.'\' found.');
66
+            throw $this->createNotFoundException('No Textnode for Topic \'' . $topicId . '\' found.');
67 67
         }
68 68
 
69 69
         if ($textnode->isFinanceNode()) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $textnode = $textnodeRepository->findOneActiveByArbitraryId($textnodeArbitraryId);
91 91
 
92 92
         if (is_null($textnode)) {
93
-            throw $this->createNotFoundException('No Textnode with arbitrary ID \''.$textnode->getArbitraryId().'\' found.');
93
+            throw $this->createNotFoundException('No Textnode with arbitrary ID \'' . $textnode->getArbitraryId() . '\' found.');
94 94
         }
95 95
 
96 96
         if ($textnode->isFinanceNode()) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $textnode = $textnodeRepository->findOneActiveById($textnodeId);
170 170
 
171 171
         if (is_null($textnode)) {
172
-            throw $this->createNotFoundException('No Textnode with ID \''.$textnodeId.'\' found.');
172
+            throw $this->createNotFoundException('No Textnode with ID \'' . $textnodeId . '\' found.');
173 173
         }
174 174
 
175 175
         $hitch = $textnode->getHitch($hitchIndex);
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.