src/PhpToZephir/Converter/Printer/Expr/ClosurePrinter.php
public function convert(Expr\Closure $node)
    {
        $methodName = $this->dispatcher->getMetadata()->getClass().$this->dispatcher->getLastMethod();
        if (isset(self::$converted[$methodName])) {
            ++self::$converted[$methodName];
        } else {
            self::$converted[$methodName] = 1;
        }

        $name = $methodName.'Closure'.$this->N2L(count(self::$converted[$methodName]));

        $this->logger->logNode(
            sprintf('Closure does not exist in Zephir, class "%s" with __invoke is created', $name),
            $node,
            $this->dispatcher->getMetadata()->getFullQualifiedNameClass()
        );

        return 'new '.$name.'('.$this->dispatcher->pCommaSeparated($node->uses).')';
    }
public function convert(Expr\Closure $node)
    {
        $methodName = $this->dispatcher->getMetadata()->getClass().$this->dispatcher->getLastMethod();
        if (isset(self::$converted[$methodName])) {
            ++self::$converted[$methodName];
        } else {
            self::$converted[$methodName] = 1;
        }

        $name = $methodName.'Closure'.$this->N2L(count(self::$converted[$methodName]));

        $this->logger->logNode(
            sprintf('Closure does not exist in Zephir, class "%s" with __invoke is created', $name),
            $node,
            $this->dispatcher->getMetadata()->getFullQualifiedNameClass()
        );

        return 'new '.$name.'('.$this->dispatcher->pCommaSeparated($node->uses).')';
    }
@param Expr\Closure $node

@return string