From 96b8b92d42c1511dfcc3cd4462fdda017db18f59 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Fri, 21 Jun 2024 10:30:58 +0100 Subject: [PATCH] phpstan --- .../core/src/Database/MigrationRepositoryInterface.php | 5 +++++ framework/core/src/Database/Migrator.php | 4 +--- phpstan.neon | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/framework/core/src/Database/MigrationRepositoryInterface.php b/framework/core/src/Database/MigrationRepositoryInterface.php index e4820a4566..2145165bc1 100644 --- a/framework/core/src/Database/MigrationRepositoryInterface.php +++ b/framework/core/src/Database/MigrationRepositoryInterface.php @@ -26,6 +26,11 @@ public function log(string $file, ?string $extension = null): void; */ public function delete(string $file, ?string $extension = null): void; + /** + * Create the migration repository table. + */ + public function createRepository(): void; + /** * Determine if the migration repository exists. */ diff --git a/framework/core/src/Database/Migrator.php b/framework/core/src/Database/Migrator.php index a132a80370..37be1e5258 100644 --- a/framework/core/src/Database/Migrator.php +++ b/framework/core/src/Database/Migrator.php @@ -260,10 +260,8 @@ protected function note(string $message): void /** * Get the migration repository instance. - * - * @return MigrationRepositoryInterface */ - public function getRepository() + public function getRepository(): MigrationRepositoryInterface { return $this->repository; } diff --git a/phpstan.neon b/phpstan.neon index 30392ff54e..bee63a2f25 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -35,6 +35,9 @@ parameters: - extensions/tags/extend.php excludePaths: - *.blade.php - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false databaseMigrationsPath: ['framework/core/migrations'] + ignoreErrors: + - + identifier: missingType.iterableValue + - + identifier: missingType.generics