Skip to content

Commit

Permalink
PHPStan: Ignore "Dynamic call to static method" errors
Browse files Browse the repository at this point in the history
The following route:

    Route::get('/', function(\Illuminate\Contracts\Filesystem\Filesystem $factory) {
        return $factory->download('foo.csv');
    });

currently results in the following false-positive error:

     ------ ------------------------------------------------------------------------------------
      Line   routes/web.php
     ------ ------------------------------------------------------------------------------------
      22     Dynamic call to static method Illuminate\Filesystem\FilesystemAdapter::download().
     ------ ------------------------------------------------------------------------------------

See phpstan/phpstan-strict-rules#140
  • Loading branch information
philbates35 committed Jan 27, 2024
1 parent 848d56d commit 3f70576
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ parameters:
level: 9
excludePaths:
- bootstrap/cache/
ignoreErrors:
# TODO remove when https://github.com/phpstan/phpstan-strict-rules/issues/140 is resolved
- '#^Dynamic call to static method#'

0 comments on commit 3f70576

Please sign in to comment.