Browse Source

coercion for floats was actaully not faster

Jose Lorenzo Rodriguez 8 years ago
parent
commit
467d54bee9
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/Database/Type/FloatType.php

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

@@ -96,10 +96,7 @@ class FloatType extends Type implements TypeInterface, BatchCastingInterface
             return null;
         }
 
-        // Using coersion is faster than casting
-        // @codingStandardsIgnoreStart
-        return (float)+$value;
-        // @codingStandardsIgnoreEnd
+        return (float)$value;
     }
 
     /**
@@ -114,10 +111,7 @@ class FloatType extends Type implements TypeInterface, BatchCastingInterface
                 continue;
             }
 
-            // Using coersion is faster than casting
-            // @codingStandardsIgnoreStart
-            $values[$field] = (float)+$values[$field];
-            // @codingStandardsIgnoreEnd
+            $values[$field] = (float)$values[$field];
         }
 
         return $values;