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:
@@ -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./'
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user