Skip to content

Commit

Permalink
Update Validate.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslan-avantis authored Dec 18, 2017
1 parent e8bea7b commit 0d76e20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ public static function isNumeric($type)
}

/**
* Checking that types from array matching with [boolean, integer, string, double]
* Checking that types from array matching with [boolean, integer, string, double, text, datetime]
* @param array $types Indexed array
* @return bool
* @throws dbException
*/
public static function types(array $types)
{
$defined = array('boolean', 'integer', 'string', 'double');
$defined = array('boolean', 'integer', 'double', 'string', 'text', 'datetime');
$diff = array_diff($types, $defined);

if (empty($diff))
{
return TRUE;
}
throw new dbException('Wrong types: "' . implode(', ', $diff) . '". Available "boolean, integer, string, double"');
throw new dbException('Wrong types: "' . implode(', ', $diff) . '". Available "boolean, integer, double, string, text, datetime"');
}

/**
Expand Down

0 comments on commit 0d76e20

Please sign in to comment.