Skip to content

Commit

Permalink
PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Dec 7, 2020
1 parent 20dfde3 commit 51fb5c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core-bundle/src/Migration/Version408/Version480Update.php
Expand Up @@ -17,6 +17,7 @@
use Contao\File;
use Contao\StringUtil;
use Doctrine\DBAL\Connection;
use Symfony\Component\Filesystem\Filesystem;

/**
* @internal
Expand Down Expand Up @@ -153,7 +154,7 @@ public function run(): MigrationResult

// Convert the important part to relative values as fractions
while (false !== ($file = $statement->fetch(\PDO::FETCH_OBJ))) {
if (!file_exists($this->projectDir.'/'.$file->path) || is_dir($this->projectDir.'/'.$file->path)) {
if (!(new Filesystem())->exists($this->projectDir.'/'.$file->path) || is_dir($this->projectDir.'/'.$file->path)) {
continue;
}

Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon.dist
Expand Up @@ -27,6 +27,9 @@ parameters:
# Ignore the missing TL_SCRIPT constant in the InitializeController class
- '#Constant TL_SCRIPT not found\.#'

# Ignore the missing array_insert function in the Version330Update class
- '#Function array_insert not found\.#'

# Ignore backwards compatibility layers when preferring lowest dependencies
- '#Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) invoked with 2 parameters, 1 required\.#'

Expand Down

0 comments on commit 51fb5c7

Please sign in to comment.