aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-22 20:55:59 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-22 20:55:59 +0200
commit445cc23abdda5767b622d70cf7b5eb5310dcf908 (patch)
treed3f4d05416576da2a0cd7e45eb768f1c2f900f08 /tests
parentd554d0f6736c5cf94cb2a8fa61f3b6187b86ffa2 (diff)
PHPStan Level 7 complete (#5406)
* PHPStan Level 7 complete * Start PHPStan Level 8 * Forgot exclude .phtml
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Minz/MigratorTest.php8
-rw-r--r--tests/phpstan-next.txt76
2 files changed, 73 insertions, 11 deletions
diff --git a/tests/lib/Minz/MigratorTest.php b/tests/lib/Minz/MigratorTest.php
index 4ff02e837..1803e6e86 100644
--- a/tests/lib/Minz/MigratorTest.php
+++ b/tests/lib/Minz/MigratorTest.php
@@ -17,14 +17,6 @@ class MigratorTest extends TestCase
self::assertTrue($result);
}
- public function testAddMigrationFailsIfUncallableMigration(): void {
- $this->expectException(BadFunctionCallException::class);
- $this->expectExceptionMessage('foo migration cannot be called.');
-
- $migrator = new Minz_Migrator();
- $migrator->addMigration('foo', null);
- }
-
public function testMigrationsIsSorted(): void {
$migrator = new Minz_Migrator();
$migrator->addMigration('2_foo', function () {
diff --git a/tests/phpstan-next.txt b/tests/phpstan-next.txt
index eecd0f0ef..83945f2f1 100644
--- a/tests/phpstan-next.txt
+++ b/tests/phpstan-next.txt
@@ -1,7 +1,77 @@
# List of files, which are not yet passing PHPStan level 7 https://phpstan.org/user-guide/rule-levels
# Used for automated tests to avoid regressions in files already passing that level.
# Can be regenerated with something like:
-# find . -type d -name 'vendor' -prune -o -name '*.php' -exec sh -c 'vendor/bin/phpstan analyse --level 7 --memory-limit 512M {} >/dev/null 2>/dev/null || echo {}' \;
+# find . -type d -name 'vendor' -prune -o -name '*.php' -exec sh -c 'vendor/bin/phpstan analyse --level 8 --memory-limit 512M {} >/dev/null 2>/dev/null || echo {}' \;
-./lib/Minz/Mailer.php
-./lib/Minz/Migrator.php
+./app/Controllers/apiController.php
+./app/Controllers/authController.php
+./app/Controllers/categoryController.php
+./app/Controllers/configureController.php
+./app/Controllers/feedController.php
+./app/Controllers/importExportController.php
+./app/Controllers/indexController.php
+./app/Controllers/javascriptController.php
+./app/Controllers/tagController.php
+./app/Controllers/updateController.php
+./app/Controllers/userController.php
+./app/install.php
+./app/layout/aside_configure.phtml
+./app/layout/aside_feed.phtml
+./app/layout/header.phtml
+./app/layout/layout.phtml
+./app/layout/nav_menu.phtml
+./app/layout/simple.phtml
+./app/Mailers/UserMailer.php
+./app/Models/Auth.php
+./app/Models/BooleanSearch.php
+./app/Models/Category.php
+./app/Models/Context.php
+./app/Models/DatabaseDAO.php
+./app/Models/DatabaseDAOPGSQL.php
+./app/Models/Entry.php
+./app/Models/Feed.php
+./app/Models/FeedDAO.php
+./app/Models/FormAuth.php
+./app/Models/Search.php
+./app/Models/Share.php
+./app/Models/StatsDAO.php
+./app/Services/ImportService.php
+./app/views/auth/index.phtml
+./app/views/configure/archiving.phtml
+./app/views/configure/display.phtml
+./app/views/configure/integration.phtml
+./app/views/configure/reading.phtml
+./app/views/configure/shortcut.phtml
+./app/views/configure/system.phtml
+./app/views/feed/contentSelectorPreview.phtml
+./app/views/helpers/category/update.phtml
+./app/views/helpers/configure/query.phtml
+./app/views/helpers/export/opml.phtml
+./app/views/helpers/extension/configure.phtml
+./app/views/helpers/extension/details.phtml
+./app/views/helpers/feed/update.phtml
+./app/views/helpers/index/normal/entry_bottom.phtml
+./app/views/helpers/index/normal/entry_header.phtml
+./app/views/helpers/javascript_vars.phtml
+./app/views/helpers/stream-footer.phtml
+./app/views/index/about.phtml
+./app/views/index/global.phtml
+./app/views/index/normal.phtml
+./app/views/index/reader.phtml
+./app/views/stats/idle.phtml
+./app/views/subscription/index.phtml
+./app/views/user/manage.phtml
+./app/views/user/profile.phtml
+./app/views/user/validateEmail.phtml
+./cli/_cli.php
+./cli/create-user.php
+./cli/delete-user.php
+./cli/do-install.php
+./cli/i18n/I18nData.php
+./cli/i18n/I18nValue.php
+./cli/list-users.php
+./cli/reconfigure.php
+./cli/user-info.php
+./lib/lib_install.php
+./lib/Minz/ModelPdo.php
+./lib/Minz/Translate.php