@@ -40,7 +40,7 @@ |
||
40 | 40 | $expects = '['. implode(', ', self::$enum_values[$name]) . ']'; |
41 | 41 | throw new \InvalidArgumentException(self::message($expects, $value, $name)); |
42 | 42 | } elseif ( |
43 | - ($expected_type === 'int' && is_int($value)) |
|
43 | + ($expected_type === 'int' && is_int($value)) |
|
44 | 44 | || ($expected_type === 'string' && is_string($value)) |
45 | 45 | || ($expected_type === 'float' && is_float($value)) |
46 | 46 | || ($expected_type === 'array' && is_array($value)) |
@@ -37,16 +37,16 @@ |
||
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
40 | - $expects = '['. implode(', ', self::$enum_values[$name]) . ']'; |
|
40 | + $expects = '['.implode(', ', self::$enum_values[$name]).']'; |
|
41 | 41 | throw new \InvalidArgumentException(self::message($expects, $value, $name)); |
42 | 42 | } elseif ( |
43 | - ($expected_type === 'int' && is_int($value)) |
|
44 | - || ($expected_type === 'string' && is_string($value)) |
|
45 | - || ($expected_type === 'float' && is_float($value)) |
|
46 | - || ($expected_type === 'array' && is_array($value)) |
|
47 | - || ($expected_type === 'bool' && is_bool($value)) |
|
48 | - || ($expected_type === 'object' && is_object($value)) |
|
49 | - || ($expected_type === 'scalar' && is_scalar($value)) |
|
43 | + ($expected_type === 'int' && is_int($value)) |
|
44 | + || ($expected_type === 'string' && is_string($value)) |
|
45 | + || ($expected_type === 'float' && is_float($value)) |
|
46 | + || ($expected_type === 'array' && is_array($value)) |
|
47 | + || ($expected_type === 'bool' && is_bool($value)) |
|
48 | + || ($expected_type === 'object' && is_object($value)) |
|
49 | + || ($expected_type === 'scalar' && is_scalar($value)) |
|
50 | 50 | || ($expected_type === 'callable' && is_callable($value)) |
51 | 51 | || ($expected_type === 'resource' && is_resource($value)) |
52 | 52 | ) { |