protected function toNumeric($value) { if (strpos((string) $value, ".") === false) { return (int) $value; } return (double) $value; }