Browse Source

Fix CS errors.

ADmad 7 years ago
parent
commit
3824b474f0

+ 2 - 2
src/I18n/RelativeTimeFormatter.php

@@ -237,9 +237,9 @@ class RelativeTimeFormatter implements DifferenceFormatterInterface
                 $daysInFutureMonth = (int)date('t', mktime(0, 0, 0, (int)$future['m'] - 1, 1, (int)$future['Y']));
 
                 if (!$backwards) {
-                    $days = ($daysInPastMonth - (int)$past['d']) + (int)$future['d'];
+                    $days = $daysInPastMonth - (int)$past['d'] + (int)$future['d'];
                 } else {
-                    $days = ($daysInFutureMonth - (int)$past['d']) + (int)$future['d'];
+                    $days = $daysInFutureMonth - (int)$past['d'] + (int)$future['d'];
                 }
 
                 if ($future['m'] !== $past['m']) {

+ 1 - 1
src/Validation/Validation.php

@@ -1064,7 +1064,7 @@ class Validation
             $sum += $check[$position];
         }
 
-        for ($position = ($length % 2); $position < $length; $position += 2) {
+        for ($position = $length % 2; $position < $length; $position += 2) {
             $number = (int)$check[$position] * 2;
             $sum += $number < 10 ? $number : $number - 9;
         }

+ 1 - 1
tests/TestCase/Controller/ControllerTest.php

@@ -927,7 +927,7 @@ class ControllerTest extends TestCase
         $controller = new PostsController();
 
         $controller->getEventManager()->on('Controller.beforeRender', function (EventInterface $event): void {
-            /* @var Controller $controller */
+            /** @var Controller $controller */
             $controller = $event->getSubject();
 
             $controller->set('testVariable', 'test');

+ 2 - 2
tests/TestCase/Database/QueryTest.php

@@ -3480,7 +3480,7 @@ class QueryTest extends TestCase
     public function testIdentifierExpression()
     {
         $query = new Query($this->connection);
-        /* @var \Cake\Database\Expression\IdentifierExpression $identifier */
+        /** @var \Cake\Database\Expression\IdentifierExpression $identifier */
         $identifier = $query->identifier('foo');
 
         $this->assertInstanceOf(IdentifierExpression::class, $identifier);
@@ -4095,7 +4095,7 @@ class QueryTest extends TestCase
         $statementMock->expects($this->once())
             ->method('closeCursor');
 
-        /* @var \Cake\ORM\Query|\PHPUnit_Framework_MockObject_MockObject $queryMock */
+        /** @var \Cake\ORM\Query|\PHPUnit_Framework_MockObject_MockObject $queryMock */
         $queryMock = $this->getMockBuilder(Query::class)
             ->setMethods(['execute'])
             ->setConstructorArgs([$this->connection])

+ 4 - 4
tests/TestCase/ORM/TableTest.php

@@ -3970,7 +3970,7 @@ class TableTest extends TestCase
      */
     public function testBelongsToFluentInterface()
     {
-        /* @var \TestApp\Model\Table\ArticlesTable $articles */
+        /** @var \TestApp\Model\Table\ArticlesTable $articles */
         $articles = $this->getMockBuilder(Table::class)
             ->setMethods(['_insert'])
             ->setConstructorArgs([['table' => 'articles', 'connection' => $this->connection]])
@@ -4001,7 +4001,7 @@ class TableTest extends TestCase
      */
     public function testHasOneFluentInterface()
     {
-        /* @var \TestApp\Model\Table\AuthorsTable $authors */
+        /** @var \TestApp\Model\Table\AuthorsTable $authors */
         $authors = $this->getMockBuilder(Table::class)
             ->setMethods(['_insert'])
             ->setConstructorArgs([['table' => 'authors', 'connection' => $this->connection]])
@@ -4030,7 +4030,7 @@ class TableTest extends TestCase
      */
     public function testHasManyFluentInterface()
     {
-        /* @var \TestApp\Model\Table\AuthorsTable $authors */
+        /** @var \TestApp\Model\Table\AuthorsTable $authors */
         $authors = $this->getMockBuilder(Table::class)
             ->setMethods(['_insert'])
             ->setConstructorArgs([['table' => 'authors', 'connection' => $this->connection]])
@@ -4061,7 +4061,7 @@ class TableTest extends TestCase
      */
     public function testBelongsToManyFluentInterface()
     {
-        /* @var \TestApp\Model\Table\AuthorsTable $authors */
+        /** @var \TestApp\Model\Table\AuthorsTable $authors */
         $authors = $this->getMockBuilder(Table::class)
             ->setMethods(['_insert'])
             ->setConstructorArgs([['table' => 'authors', 'connection' => $this->connection]])