Added 'double' to \RTEX\Abstracts > VariableType
This commit is contained in:
parent
47b434b625
commit
66cd6d0625
2 changed files with 8 additions and 1 deletions
|
@ -10,6 +10,8 @@
|
|||
|
||||
const Float = 'float';
|
||||
|
||||
const Double = 'double';
|
||||
|
||||
const Boolean = 'boolean';
|
||||
|
||||
const Array = 'array';
|
||||
|
@ -22,6 +24,7 @@
|
|||
self::String,
|
||||
self::Integer,
|
||||
self::Float,
|
||||
self::Double,
|
||||
self::Boolean,
|
||||
self::Array,
|
||||
self::Null,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @return string
|
||||
* @throws TypeException
|
||||
*/
|
||||
public static function determineType($input): string
|
||||
public static function getType($input): string
|
||||
{
|
||||
if ($input instanceof InstructionInterface)
|
||||
return VariableType::Instruction;
|
||||
|
@ -25,6 +25,8 @@
|
|||
return VariableType::Integer;
|
||||
if (is_float($input))
|
||||
return VariableType::Float;
|
||||
if (is_double($input))
|
||||
return VariableType::Double;
|
||||
if (is_bool($input))
|
||||
return VariableType::Boolean;
|
||||
if (is_array($input))
|
||||
|
@ -88,6 +90,8 @@
|
|||
return 'int(' . $input . ')';
|
||||
if(is_float($input))
|
||||
return 'float(' . $input . ')';
|
||||
if(is_double($input))
|
||||
return 'double(' . $input . ')';
|
||||
if(is_bool($input))
|
||||
return $input ? 'True' : 'False';
|
||||
if(is_null($input))
|
||||
|
|
Loading…
Add table
Reference in a new issue