Test Failed
Branch master (c83d56)
by Michael
03:06
created
www/web/config.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -382,7 +382,10 @@  discard block
 block discarded – undo
382 382
                         <?php if ($hasMinorProblems): ?>
383 383
                             <h2>Recommendations</h2>
384 384
                             <p>
385
-                                <?php if ($hasMajorProblems): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience,
385
+                                <?php if ($hasMajorProblems): ?>Additionally, to<?php else {
386
+    : ?>To<?php endif;
387
+}
388
+?> enhance your Symfony experience,
386 389
                                 it’s recommended that you fix the following:
387 390
                             </p>
388 391
                             <ol>
@@ -398,9 +401,12 @@  discard block
 block discarded – undo
398 401
                             <p id="phpini">*
399 402
                                 <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?>
400 403
                                     Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>".
401
-                                <?php else: ?>
404
+                                <?php else {
405
+    : ?>
402 406
                                     To change settings, create a "<strong>php.ini</strong>".
403
-                                <?php endif; ?>
407
+                                <?php endif;
408
+}
409
+?>
404 410
                             </p>
405 411
                         <?php endif; ?>
406 412
 
Please login to merge, or discard this patch.
www/src/AdminBundle/Tests/Command/ImportCommandTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $this->mockObjects['importTwine']->expects($this->once())
81 81
             ->method('run')
82
-            ->will($this->returnCallback(function ($importfile) {
82
+            ->will($this->returnCallback(function($importfile) {
83 83
                 return $importfile->getFilename() === 'somefile_readable_exists.html'
84 84
                 && $importfile->getLicenseeId() === 'licenseeId'
85 85
                 && $importfile->getAuthor() === 'someauthor'
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $this->mockObjects['importTwine']->expects($this->once())
153 153
             ->method('run')
154
-            ->will($this->returnCallback(function ($importfile) {
154
+            ->will($this->returnCallback(function($importfile) {
155 155
                 return $importfile->getFilename() === 'somefile_readable_exists.html'
156 156
                 && $importfile->getLicenseeId() === 'licenseeId'
157 157
                 && $importfile->getAuthor() === 'someauthor'
Please login to merge, or discard this patch.
www/src/AdminBundle/Tests/Model/ImportTwineTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
         $textnodeRepository->expects($this->once())
332 332
             ->method('save')
333
-            ->with($this->callback(function ($textnode) {
333
+            ->with($this->callback(function($textnode) {
334 334
                 return $textnode instanceof Textnode
335 335
                     && $textnode->getText() === "lorem ipsumlorem ipsum";
336 336
             }));
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
         $textnodeRepository->expects($this->any())
378 378
             ->method('save')
379
-            ->with($this->callback(function ($textnode) {
379
+            ->with($this->callback(function($textnode) {
380 380
                 return $textnode instanceof Textnode
381 381
                 && $textnode->getText() === "lorem ipsumlorem ipsum";
382 382
             }));
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 
746 746
         $textnodeRepository->expects($this->any())
747 747
             ->method('save')
748
-            ->willReturnCallback(function ($textnode) {
748
+            ->willReturnCallback(function($textnode) {
749 749
                 static $counter = 0;
750 750
                 $textnode->setId('someTextnode'.$counter++);
751 751
             });
Please login to merge, or discard this patch.
www/src/AdminBundle/Model/ImportTwine.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 continue;
187 187
             }
188 188
 
189
-            if ($peekDataLength - $i < $magicStringLength) {
189
+            if ($peekDataLength-$i < $magicStringLength) {
190 190
                 throw new Exception("File '".$this->importfile->getFilename()."' isn't a Twine archive file.");
191 191
             }
192 192
 
@@ -410,13 +410,13 @@  discard block
 block discarded – undo
410 410
                 $textnodeTextNew = substr($textnodeText, 0, $startPos);
411 411
 
412 412
                 while ($startPos !== false) {
413
-                    $endPos = strpos($textnodeText, "]]", $startPos + strlen("[["));
413
+                    $endPos = strpos($textnodeText, "]]", $startPos+strlen("[["));
414 414
 
415 415
                     if ($endPos === false) {
416 416
                         throw new Exception("The Twine archive file '".$this->importfile->getFilename()."' has a textnode named '".$twineName."' which contains a malformed link that starts with '[[' but has no corresponding ']]'.");
417 417
                     }
418 418
 
419
-                    $content = substr($textnodeText, $startPos + strlen("[["), $endPos - ($startPos + strlen("[[")));
419
+                    $content = substr($textnodeText, $startPos+strlen("[["), $endPos-($startPos+strlen("[[")));
420 420
                     $hitch = null;
421 421
                     $metadata = null;
422 422
 
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
                     $startPos = strpos($textnodeText, "[[", $endPos);
520 520
 
521 521
                     if ($startPos !== false) {
522
-                        $textnodeTextNew .= substr($textnodeText, $endPos, $startPos - $endPos);
522
+                        $textnodeTextNew .= substr($textnodeText, $endPos, $startPos-$endPos);
523 523
                     } else {
524 524
                         $textnodeTextNew .= substr($textnodeText, $endPos);
525 525
                     }
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
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
         $containerMock = $this->getMockBuilder(ContainerInterface::class)->getMock();
109 109
         $containerMock->expects($this->any())
110 110
             ->method('get')
111
-            ->willReturnCallback(function ($param) {
111
+            ->willReturnCallback(function($param) {
112 112
                 switch ($param) {
113 113
                     case 'app.model_repository_user':
114 114
                         return $this->userRepositoryMock;
Please login to merge, or discard this patch.
www/src/DembeloMain/Tests/Document/TextnodeTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $hitch['status'] = Textnode::HITCH_STATUS_ACTIVE;
184 184
         $this->textnode->appendHitch($hitch);
185 185
 
186
-        $result = $this->textnode->getHitch($this->textnode->getHitchCount() - 1);
186
+        $result = $this->textnode->getHitch($this->textnode->getHitchCount()-1);
187 187
 
188 188
         $this->assertFalse(is_null($result));
189 189
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
      */
281 281
     public function testAppendHitchMoreThanMaximum()
282 282
     {
283
-        for ($i = 0; $i < Textnode::HITCHES_MAXIMUM_COUNT + 1; $i++) {
283
+        for ($i = 0; $i < Textnode::HITCHES_MAXIMUM_COUNT+1; $i++) {
284 284
             $hitch = array();
285 285
             $hitch['textnodeId'] = $i;
286 286
             $hitch['description'] = "Continue.";
@@ -311,12 +311,12 @@  discard block
 block discarded – undo
311 311
         $hitch['textnodeId'] = "55f5ab3708985c4b188b4578";
312 312
         $hitch['description'] = "Abort.";
313 313
         $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE;
314
-        $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch);
314
+        $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch);
315 315
 
316 316
         $this->assertTrue($result);
317 317
         $this->assertEquals($this->textnode->getHitchCount(), 1);
318 318
 
319
-        $result = $this->textnode->getHitch($this->textnode->getHitchCount() - 1);
319
+        $result = $this->textnode->getHitch($this->textnode->getHitchCount()-1);
320 320
 
321 321
         $this->assertFalse(is_null($result));
322 322
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
         $hitch = array();
368 368
         $hitch['description'] = "Abort.";
369 369
         $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE;
370
-        $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch);
370
+        $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch);
371 371
 
372 372
         $this->assertFalse($result);
373 373
     }
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         $hitch = array();
389 389
         $hitch['textnodeId'] = "55f5ab3708985c4b188b4578";
390 390
         $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE;
391
-        $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch);
391
+        $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch);
392 392
 
393 393
         $this->assertFalse($result);
394 394
     }
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         $hitch = array();
410 410
         $hitch['textnodeId'] = "55f5ab3708985c4b188b4578";
411 411
         $hitch['description'] = "Abort.";
412
-        $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch);
412
+        $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch);
413 413
 
414 414
         $this->assertFalse($result);
415 415
     }
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         $hitch['textnodeId'] = null;
432 432
         $hitch['description'] = "Abort.";
433 433
         $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE;
434
-        $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch);
434
+        $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch);
435 435
 
436 436
         $this->assertFalse($result);
437 437
     }
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
         $this->assertTrue($this->textnode->appendHitch($hitch));
450 450
         $this->assertEquals($this->textnode->getHitchCount(), 1);
451 451
 
452
-        $this->assertTrue($this->textnode->removeHitch($this->textnode->getHitchCount() - 1));
452
+        $this->assertTrue($this->textnode->removeHitch($this->textnode->getHitchCount()-1));
453 453
         $this->assertEquals($this->textnode->getHitchCount(), 0);
454 454
     }
455 455
 
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
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 
69 69
         $readpathRepositoryMock->expects($this->once())
70 70
             ->method('save')
71
-            ->willReturnCallback(function (ReadpathDocument $readpathDocument) use ($textnodeMockId, $userMockId) {
71
+            ->willReturnCallback(function(ReadpathDocument $readpathDocument) use ($textnodeMockId, $userMockId) {
72 72
                 $this->assertInstanceOf(ReadpathDocument::class, $readpathDocument);
73 73
                 $this->assertEquals($textnodeMockId, $readpathDocument->getTextnodeId());
74 74
                 $this->assertEquals($userMockId, $readpathDocument->getUserId());
Please login to merge, or discard this patch.
scripts/install.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 $releases = json_decode($data);
41 41
 
42 42
 if (is_null($releases)) {
43
-    echo 'Data can\'t be parsed as JSON. exit' . "\n";
43
+    echo 'Data can\'t be parsed as JSON. exit'."\n";
44 44
     exit(1);
45 45
 }
46 46
 
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
 }
60 60
 
61 61
 if ($latestReleaseDate === 0) {
62
-    echo 'No release found. exit' . "\n";
62
+    echo 'No release found. exit'."\n";
63 63
     exit(1);
64 64
 }
65 65
 
66 66
 if (file_exists("files/version")) {
67 67
     $installedVersion = trim(file_get_contents("files/version"));
68 68
     if ($installedVersion === $newVersion) {
69
-        echo 'latest version ['.$installedVersion.'] already installed. exit' . "\n";
69
+        echo 'latest version ['.$installedVersion.'] already installed. exit'."\n";
70 70
         exit(1);
71 71
     }
72 72
 }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 if (array_key_exists('u', $options)) {
83 83
     echo 'chown to '.$options['u']."...\n";
84
-    shell_exec('chown -R '.$options['u']. ' www/');
84
+    shell_exec('chown -R '.$options['u'].' www/');
85 85
 }
86 86
 
87 87
 echo 'clearing cache '."...\n";
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 echo 'prepare some apache stuff'."\n";
93 93
 shell_exec('cp files/apache/htaccess www/web/.htaccess');
94 94
 if (array_key_exists('u', $options)) {
95
-    shell_exec('chown ' . $options['u'] . ' www/web/.htaccess');
95
+    shell_exec('chown '.$options['u'].' www/web/.htaccess');
96 96
 }
97 97
 echo 'finished'."\n";
98 98
 
Please login to merge, or discard this patch.
scripts/coverage-checker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
 $coverage = round(($checkedElements / $totalElements) * 100, 2);
26 26
 
27 27
 if ($coverage < $percentage) {
28
-    echo 'Code coverage is ' . $coverage . '%, which is below the accepted ' . $percentage . '%' . PHP_EOL;
28
+    echo 'Code coverage is '.$coverage.'%, which is below the accepted '.$percentage.'%'.PHP_EOL;
29 29
     exit(1);
30 30
 }
31 31
 
32
-echo 'Code coverage is ' . $coverage . '% - OK!' . PHP_EOL;
32
+echo 'Code coverage is '.$coverage.'% - OK!'.PHP_EOL;
Please login to merge, or discard this patch.