1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-06 13:16:45 +02:00

refactor(core): code updates and improvements - phpstan level 5

This commit is contained in:
Awilum
2022-07-07 17:46:35 +03:00
parent 9a81ea5e0b
commit c2b8d8e7d5
2 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
parameters:
level: 4
level: 5
reportUnmatchedIgnoredErrors: false
bootstrapFiles:
- src/flextype/defines.php
@@ -7,7 +7,5 @@ parameters:
- src
ignoreErrors:
- '#Undefined variable: \$this.*#'
- '/Constant PATH not found./'
- '/Constant ROOT_DIR not found./'
- '/Variable \$api_errors might not be defined./'
- '/Variable \$registry might not be defined./'

View File

@@ -72,12 +72,12 @@ class Driver implements AggregatablePoolInterface
{
$filePath = $this->getFilePath($item->getKey(), true) . '.' . 'php';
$value = null;
set_error_handler(static function () {});
// mute errors handling
set_error_handler(fn(): bool => true);
$value = include $filePath;
// restore errors handling
restore_error_handler();
return ! is_bool($value) ? $value : null;