Browse Source

moved comments to test

Tomas Saghy 7 years ago
parent
commit
083d18d375

+ 0 - 2
src/Database/Type/DecimalType.php

@@ -157,8 +157,6 @@ class DecimalType extends Type implements TypeInterface, BatchCastingInterface
         if (is_numeric($value)) {
             return (float)$value;
         }
-
-        // allow custom decimal format (@see https://github.com/cakephp/cakephp/issues/12800)
         if (preg_match('/[^0-9,. ]/', $value)) {
             return null;
         }

+ 0 - 2
src/Database/Type/FloatType.php

@@ -146,8 +146,6 @@ class FloatType extends Type implements TypeInterface, BatchCastingInterface
         if (is_numeric($value)) {
             return (float)$value;
         }
-
-        // allow custom decimal format (@see https://github.com/cakephp/cakephp/issues/12800)
         if (preg_match('/[^0-9,. ]/', $value)) {
             return null;
         }

+ 1 - 0
tests/TestCase/Database/Type/DecimalTypeTest.php

@@ -167,6 +167,7 @@ class DecimalTypeTest extends TestCase
         $result = $this->type->marshal('2.51');
         $this->assertSame(2.51, $result);
 
+        // allow custom decimal format (@see https://github.com/cakephp/cakephp/issues/12800)
         $result = $this->type->marshal('1 230,73');
         $this->assertSame('1 230,73', $result);
 

+ 1 - 0
tests/TestCase/Database/Type/FloatTypeTest.php

@@ -156,6 +156,7 @@ class FloatTypeTest extends TestCase
         $result = $this->type->marshal('2.51');
         $this->assertSame(2.51, $result);
 
+        // allow custom decimal format (@see https://github.com/cakephp/cakephp/issues/12800)
         $result = $this->type->marshal('1 230,73');
         $this->assertSame('1 230,73', $result);