src/PhpToZephir/Converter/Converter.php
private function findAdditionalClasses(array $stmts, Logger $logger)
    {
        $closurePrinter = new ClosurePrinter($this->dispatcher, $logger);
        $lastMethod = null;
        $aditionalClass = array();
        $number = 0;

        foreach ($this->nodeFetcher->foreachNodes($stmts) as $nodeData) {
            $node = $nodeData['node'];
            if ($node instanceof Stmt\ClassMethod) {
                $lastMethod = $node->name;
            } elseif ($node instanceof Expr\Closure) {
                $aditionalClass[] = $closurePrinter->createClosureClass($node, $lastMethod, $number);
                ++$number;
            }
        }

        return $aditionalClass;
    }
private function findAdditionalClasses(array $stmts, Logger $logger)
    {
        $closurePrinter = new ClosurePrinter($this->dispatcher, $logger);
        $lastMethod = null;
        $aditionalClass = array();
        $number = 0;

        foreach ($this->nodeFetcher->foreachNodes($stmts) as $nodeData) {
            $node = $nodeData['node'];
            if ($node instanceof Stmt\ClassMethod) {
                $lastMethod = $node->name;
            } elseif ($node instanceof Expr\Closure) {
                $aditionalClass[] = $closurePrinter->createClosureClass($node, $lastMethod, $number);
                ++$number;
            }
        }

        return $aditionalClass;
    }
private function findAdditionalClasses ( array $ stmts , Logger $ logger ) { $ closurePrinter = new ClosurePrinter ( $ this -> dispatcher , $ logger ) ; $ lastMethod = null ; $ aditionalClass = array ( ) ; $ number = 0 ; foreach ( $ this -> nodeFetcher -> foreachNodes ( $ stmts ) as $ nodeData ) { $ node = $ nodeData [ 'node' ] ; if ( $ node instanceof Stmt \ ClassMethod ) { $ lastMethod = $ node -> name ; } elseif ( $ node instanceof Expr \ Closure ) { $ aditionalClass [ ] = $ closurePrinter -> createClosureClass ( $ node , $ lastMethod , $ number ) ; ++ $ number ; } } return $ aditionalClass ; }
@param array $stmts

@return array
@param array $stmts