Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
othercorey committed Jan 12, 2020
1 parent 04a925b commit 5d20e82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Database/TypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public static function build(string $name): TypeInterface
throw new InvalidArgumentException(sprintf('Unknown type "%s"', $name));
}

if ($name === 'decimal' && static::$_types[$name] !== Type\DecimalType::class) {
throw new \RuntimeException('Not set to DecimalType');
}

/** @var \Cake\Database\TypeInterface */
return static::$_builtTypes[$name] = new static::$_types[$name]($name);
}
Expand Down

0 comments on commit 5d20e82

Please sign in to comment.