Skip to content

Commit 88ea163

Browse files
committed
Checking type correction
1 parent 8a51098 commit 88ea163

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Vartypes/Boolean.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Boolean
3939
public function __construct($val)
4040
{
4141
$val = (boolean)$val;
42-
if (gettype($val) == __CLASS__) {
42+
if (gettype($val) == 'boolean') {
4343
$this->value = $val;
4444
} else {
4545
throw new \Exception('Value must be ' . __CLASS__ . ' type but is ' . gettype($val));

Vartypes/Double.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct($val, $lenght = null)
4141
{
4242
$val = (double)str_replace(',', '.', $val);
4343

44-
if (gettype($val) == __CLASS__) {
44+
if (gettype($val) == 'double') {
4545
if (empty($lenght)) {
4646
$this->value = $val;
4747
} else {

Vartypes/Float.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct($value)
4141
{
4242
$value = (float)str_replace(',', '.', $value);
4343

44-
if (gettype($value) == __CLASS__) {
44+
if (gettype($value) == 'float') {
4545
$this->value = $value;
4646
} else {
4747
throw new \Exception('Value must be ' . __CLASS__ . ' type but is ' . gettype($value) . ' - ' . $value);

0 commit comments

Comments
 (0)