From 355acab805d15f79bc08fc47755f182bed1863da Mon Sep 17 00:00:00 2001 From: Diederik van Remoortere Date: Sun, 11 Aug 2024 11:54:14 +0000 Subject: [PATCH 1/2] add default [] for schema-rules.skip_columns to prevent errors when config is not published. --- src/Resolvers/BaseSchemaRulesResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resolvers/BaseSchemaRulesResolver.php b/src/Resolvers/BaseSchemaRulesResolver.php index 1e5ea5b..3cd508b 100644 --- a/src/Resolvers/BaseSchemaRulesResolver.php +++ b/src/Resolvers/BaseSchemaRulesResolver.php @@ -21,7 +21,7 @@ public function generate(): array { $tableColumns = $this->getColumnsDefinitionsFromTable(); - $skip_columns = config('schema-rules.skip_columns'); + $skip_columns = config('schema-rules.skip_columns', []); $tableRules = []; foreach ($tableColumns as $column) { From 1fecfc9e88aa7dd3e875fa481f59c9752e94df5a Mon Sep 17 00:00:00 2001 From: dreammonkey Date: Sun, 11 Aug 2024 11:55:11 +0000 Subject: [PATCH 2/2] Fix styling --- src/Exceptions/ColumnDoesNotExistException.php | 4 +--- src/Exceptions/MultipleTablesSuppliedException.php | 4 +--- src/Exceptions/TableDoesNotExistException.php | 4 +--- src/Exceptions/UnsupportedDbDriverException.php | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/Exceptions/ColumnDoesNotExistException.php b/src/Exceptions/ColumnDoesNotExistException.php index be6a791..c8f5319 100644 --- a/src/Exceptions/ColumnDoesNotExistException.php +++ b/src/Exceptions/ColumnDoesNotExistException.php @@ -4,6 +4,4 @@ use Exception; -class ColumnDoesNotExistException extends Exception -{ -} +class ColumnDoesNotExistException extends Exception {} diff --git a/src/Exceptions/MultipleTablesSuppliedException.php b/src/Exceptions/MultipleTablesSuppliedException.php index 7131fdd..ed85f8f 100644 --- a/src/Exceptions/MultipleTablesSuppliedException.php +++ b/src/Exceptions/MultipleTablesSuppliedException.php @@ -4,6 +4,4 @@ use Exception; -class MultipleTablesSuppliedException extends Exception -{ -} +class MultipleTablesSuppliedException extends Exception {} diff --git a/src/Exceptions/TableDoesNotExistException.php b/src/Exceptions/TableDoesNotExistException.php index 0c996ba..9cbc2fe 100644 --- a/src/Exceptions/TableDoesNotExistException.php +++ b/src/Exceptions/TableDoesNotExistException.php @@ -4,6 +4,4 @@ use Exception; -class TableDoesNotExistException extends Exception -{ -} +class TableDoesNotExistException extends Exception {} diff --git a/src/Exceptions/UnsupportedDbDriverException.php b/src/Exceptions/UnsupportedDbDriverException.php index 542abd5..31e1351 100644 --- a/src/Exceptions/UnsupportedDbDriverException.php +++ b/src/Exceptions/UnsupportedDbDriverException.php @@ -4,6 +4,4 @@ use Exception; -class UnsupportedDbDriverException extends Exception -{ -} +class UnsupportedDbDriverException extends Exception {}