diff --git a/build/kint.phar b/build/kint.phar index d6c1843a9..f72b9531d 100644 Binary files a/build/kint.phar and b/build/kint.phar differ diff --git a/src/Renderer/Rich/CallablePlugin.php b/src/Renderer/Rich/CallablePlugin.php index 043c2110d..744380524 100644 --- a/src/Renderer/Rich/CallablePlugin.php +++ b/src/Renderer/Rich/CallablePlugin.php @@ -33,7 +33,7 @@ use Kint\Zval\MethodValue; use Kint\Zval\Value; -class CallablePlugin extends AbstractPlugin implements ValuePluginInterface +class CallablePlugin extends ClosurePlugin { protected static $method_cache = []; @@ -46,21 +46,12 @@ public function renderValue(Value $o): ?string } if ($o instanceof ClosureValue) { - return $this->getClosurePlugin()->renderValue($o); + return parent::renderValue($o); } return null; } - protected function getClosurePlugin(): ClosurePlugin - { - if (null === $this->closure_plugin) { - $this->closure_plugin = new ClosurePlugin($this->renderer); - } - - return $this->closure_plugin; - } - protected function renderMethod(MethodValue $o): string { if (!empty(self::$method_cache[$o->owner_class][$o->name])) { diff --git a/src/Renderer/RichRenderer.php b/src/Renderer/RichRenderer.php index ecedb40b5..f206e560c 100644 --- a/src/Renderer/RichRenderer.php +++ b/src/Renderer/RichRenderer.php @@ -52,7 +52,6 @@ class RichRenderer extends AbstractRenderer 'array_limit' => Rich\ArrayLimitPlugin::class, 'blacklist' => Rich\BlacklistPlugin::class, 'callable' => Rich\CallablePlugin::class, - 'closure' => Rich\ClosurePlugin::class, 'color' => Rich\ColorPlugin::class, 'depth_limit' => Rich\DepthLimitPlugin::class, 'recursion' => Rich\RecursionPlugin::class,