Skip to content

Commit

Permalink
more code sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
chippyash committed Jun 1, 2015
1 parent 5e34057 commit 4b46daa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/chippyash/Type/TypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ abstract class TypeFactory
*/
public static function create($type, $value, $extra = null)
{
$type = strtolower($type);

switch ($type) {
switch (strtolower($type)) {
case 'int':
case 'integer':
return self::createInt($value);
Expand All @@ -85,7 +83,7 @@ public static function create($type, $value, $extra = null)
case 'rational':
return self::createRational($value, $extra);
default:
throw new InvalidTypeException($type);
throw new InvalidTypeException(strtolower($type));
}
}

Expand Down

0 comments on commit 4b46daa

Please sign in to comment.