Skip to content
Permalink
Browse files

coercion for floats was actaully not faster

  • Loading branch information...
lorenzo committed Feb 26, 2018
1 parent 1bd3fd8 commit 467d54bee9739112e901a3b869ae0651c558ff02
Showing with 2 additions and 8 deletions.
  1. +2 −8 src/Database/Type/FloatType.php
@@ -96,10 +96,7 @@ public function toPHP($value, Driver $driver)
return null;
}
// Using coersion is faster than casting
// @codingStandardsIgnoreStart
return (float)+$value;
// @codingStandardsIgnoreEnd
return (float)$value;
}
/**
@@ -114,10 +111,7 @@ public function manyToPHP(array $values, array $fields, Driver $driver)
continue;
}
// Using coersion is faster than casting
// @codingStandardsIgnoreStart
$values[$field] = (float)+$values[$field];
// @codingStandardsIgnoreEnd
$values[$field] = (float)$values[$field];
}
return $values;

0 comments on commit 467d54b

Please sign in to comment.
You can’t perform that action at this time.