mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-22 05:33:34 +02:00
Enabled exception analysis and fixed many static analysis errors
This commit is contained in:
@@ -20,6 +20,61 @@ parameters:
|
||||
count: 1
|
||||
path: app/config/container.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Controllers\\\\DirectoryController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\LoaderError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 2
|
||||
path: app/src/Controllers/DirectoryController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Controllers\\\\DirectoryController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\RuntimeError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 2
|
||||
path: app/src/Controllers/DirectoryController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Controllers\\\\DirectoryController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\SyntaxError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 2
|
||||
path: app/src/Controllers/DirectoryController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Controllers\\\\SearchController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\LoaderError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 2
|
||||
path: app/src/Controllers/SearchController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Controllers\\\\SearchController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\RuntimeError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 2
|
||||
path: app/src/Controllers/SearchController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Controllers\\\\SearchController\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\SyntaxError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 2
|
||||
path: app/src/Controllers/SearchController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Exceptions\\\\ErrorHandler\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\LoaderError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 1
|
||||
path: app/src/Exceptions/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Exceptions\\\\ErrorHandler\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\RuntimeError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 1
|
||||
path: app/src/Exceptions/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Exceptions\\\\ErrorHandler\\:\\:__invoke\\(\\) throws checked exception Twig\\\\Error\\\\SyntaxError but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 1
|
||||
path: app/src/Exceptions/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Factories\\\\TwigFactory\\:\\:__invoke\\(\\) throws checked exception ReflectionException but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 1
|
||||
path: app/src/Factories/TwigFactory.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Middlewares\\\\PruneCacheMiddleware\\:\\:winsLottery\\(\\) throws checked exception Exception but it's missing from the PHPDoc @throws tag\\.$#"
|
||||
count: 1
|
||||
path: app/src/Middlewares/PruneCacheMiddleware.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#"
|
||||
count: 1
|
||||
|
4
phpstan-ignores.neon
Normal file
4
phpstan-ignores.neon
Normal file
@@ -0,0 +1,4 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
- message: "/^Method .+ throws checked exception .+ but it's missing from the PHPDoc @throws tag.$/"
|
||||
path: tests/*
|
@@ -20,14 +20,22 @@ parameters:
|
||||
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
|
||||
# exceptions:
|
||||
# check:
|
||||
# missingCheckedExceptionInThrows: true
|
||||
# tooWideThrowType: true
|
||||
exceptions:
|
||||
check:
|
||||
missingCheckedExceptionInThrows: true
|
||||
tooWideThrowType: true
|
||||
|
||||
# uncheckedExceptionClasses:
|
||||
# - 'PHPUnit\Framework\Exception'
|
||||
# - 'SebastianBergmann\RecursionContext\InvalidArgumentException'
|
||||
uncheckedExceptionClasses:
|
||||
- 'DI\DependencyException'
|
||||
- 'InvalidArgumentException'
|
||||
- 'Invoker\Exception\NotCallableException'
|
||||
- 'LogicException'
|
||||
- 'RuntimeException'
|
||||
- 'Psr\Cache\InvalidArgumentException'
|
||||
- 'SebastianBergmann\RecursionContext\InvalidArgumentException'
|
||||
- 'Symfony\Component\Cache\Exception\CacheException'
|
||||
- 'PHPUnit\Framework\Exception'
|
||||
|
||||
includes:
|
||||
- phpstan-baseline.neon
|
||||
- phpstan-ignores.neon
|
||||
|
Reference in New Issue
Block a user