From e3699b6bd35b936edef7dc9b0e38bcfececc892e Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Fri, 9 Oct 2020 11:28:54 -0300 Subject: [PATCH 1/3] Fix psalm issues. --- src/Schema/Schema.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Schema/Schema.php b/src/Schema/Schema.php index 5521bc55a..7e5449ef5 100644 --- a/src/Schema/Schema.php +++ b/src/Schema/Schema.php @@ -100,6 +100,13 @@ public function __construct(ConnectionInterface $db) $this->cache = $this->db->getSchemaCache(); } + /** + * Creates a query builder for the MSSQL database. + * + * @return QueryBuilder query builder interface. + */ + abstract public function createQueryBuilder(): QueryBuilder; + /** * Resolves the table name and schema name (if any). * @@ -122,11 +129,11 @@ protected function resolveTableName(string $name): TableSchema * This method should be overridden by child classes in order to support this feature because the default * implementation simply throws an exception. * - * @return void all schema names in the database, except system schemas. + * @return array all schema names in the database, except system schemas. * * @throws NotSupportedException if this method is not supported by the DBMS. */ - protected function findSchemaNames() + protected function findSchemaNames(): array { throw new NotSupportedException(get_class($this) . ' does not support fetching all schema names.'); } @@ -139,7 +146,7 @@ protected function findSchemaNames() * * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema. * - * @return void all table names in the database. The names have NO schema name prefix. + * @return array all table names in the database. The names have NO schema name prefix. * * @throws NotSupportedException if this method is not supported by the DBMS. */ From 2964a5a0a55b64bea885ac2e29e9599083e27a32 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Fri, 9 Oct 2020 13:11:09 -0300 Subject: [PATCH 2/3] Fix minor correction. --- src/Schema/Schema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Schema/Schema.php b/src/Schema/Schema.php index 7e5449ef5..01750cee3 100644 --- a/src/Schema/Schema.php +++ b/src/Schema/Schema.php @@ -101,7 +101,7 @@ public function __construct(ConnectionInterface $db) } /** - * Creates a query builder for the MSSQL database. + * Creates a query builder. * * @return QueryBuilder query builder interface. */ From 15cc85a0b37444d1e33938ffd8ea50aa9e204f24 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Fri, 9 Oct 2020 13:15:20 -0300 Subject: [PATCH 3/3] Remove unnecessary phpdoc. --- src/Schema/Schema.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Schema/Schema.php b/src/Schema/Schema.php index 01750cee3..44ec7416b 100644 --- a/src/Schema/Schema.php +++ b/src/Schema/Schema.php @@ -100,11 +100,6 @@ public function __construct(ConnectionInterface $db) $this->cache = $this->db->getSchemaCache(); } - /** - * Creates a query builder. - * - * @return QueryBuilder query builder interface. - */ abstract public function createQueryBuilder(): QueryBuilder; /**