Fix some missed type hints

This commit is contained in:
Timothy Warren 2018-01-24 13:25:42 -05:00
parent 608b25207a
commit 16e50c3277
2 changed files with 3 additions and 6 deletions

View File

@ -30,7 +30,7 @@ class Driver extends AbstractDriver {
* @param string $password * @param string $password
* @param array $options * @param array $options
*/ */
public function __construct($dsn, $username=NULL, $password=NULL, array $options=[]) public function __construct(string $dsn, string $username=NULL, string $password=NULL, array $options=[])
{ {
if (strpos($dsn, 'pgsql') === FALSE) if (strpos($dsn, 'pgsql') === FALSE)
{ {

View File

@ -120,12 +120,9 @@ class QueryBuilder implements QueryBuilderInterface {
*/ */
public function __call(string $name, array $params) public function __call(string $name, array $params)
{ {
//foreach([$this, $this->driver] as $object) if (method_exists($this->driver, $name))
{ {
if (method_exists($this->driver, $name)) return \call_user_func_array([$this->driver, $name], $params);
{
return \call_user_func_array([$this->driver, $name], $params);
}
} }
throw new BadMethodCallException('Method does not exist'); throw new BadMethodCallException('Method does not exist');