Skip to content

Commit

Permalink
Fix static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jul 31, 2022
1 parent bb643a9 commit cb8a5b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions psalm_autoload.php
Expand Up @@ -7,6 +7,9 @@
$helperDirs = [
'src/Helpers',
'vendor/codeigniter4/framework/system/Helpers',
'vendor/tatter/alerts/src/Helpers',
'vendor/tatter/imposter/src/Helpers',
'vendor/tatter/preferences/src/Helpers',
];

foreach ($helperDirs as $dir) {
Expand Down
3 changes: 3 additions & 0 deletions src/Config/Routes.php
Expand Up @@ -5,6 +5,9 @@
if (empty(config('Files')->routeFiles)) {
return;
}

$routes ??= service('routes');

$options = [
'filter' => 'assets:\Tatter\Files\Bundles\FilesBundle',
'namespace' => '\Tatter\Files\Controllers',
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/Files.php
Expand Up @@ -58,7 +58,7 @@ class Files extends Controller
public function __construct(?FilesConfig $config = null, ?FileModel $model = null)
{
$this->config = $config ?? config('Files');
$this->model = $model ?? model(FileModel::class); // @phpstan-ignore-line
$this->model = $model ?? model(FileModel::class);
}

//--------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/TestCase.php
Expand Up @@ -67,7 +67,7 @@ protected function setUp(): void
}

// Set up the model
$this->model = model(FileModel::class); // @phpstan-ignore-line
$this->model = model(FileModel::class);
}

protected function tearDown(): void
Expand Down

0 comments on commit cb8a5b8

Please sign in to comment.