diff options
Diffstat (limited to 'src/decorators/Decorator.php')
-rw-r--r-- | src/decorators/Decorator.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decorators/Decorator.php b/src/decorators/Decorator.php index 73e9324c..07947bdc 100644 --- a/src/decorators/Decorator.php +++ b/src/decorators/Decorator.php @@ -44,7 +44,7 @@ class Decorator */ public static function get_sanitized_value(&$var, array &$fields, ?string $esc = null) { - if (\is_a($var, 'PHPPgAdmin\Decorators\Decorator')) { + if ($var instanceof self) { $val = $var->value($fields); } else { $val = &$var; @@ -71,12 +71,12 @@ class Decorator } /** - * @param \Closure|\Closure|\Closure $callback - * @param (mixed|string)[]|null $params + * @param \Closure $callback + * @param (mixed|string)[]|null $params */ - public static function callback($callback, ?array $params = null) + public static function callback(\Closure $callback, ?array $params = null) { - return new \PHPPgAdmin\Decorators\CallbackDecorator($callback, $params); + return new CallbackDecorator($callback, $params); } /** |