PHP 8.2.31
Preview: Closure.php Size: 2.70 KB
//opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php

<?php

declare (strict_types=1);
namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\FunctionLike;
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
class Closure extends Expr implements FunctionLike, StmtsAwareInterface
{
    /** @var bool Whether the closure is static */
    public $static;
    /** @var bool Whether to return by reference */
    public $byRef;
    /** @var Node\Param[] Parameters */
    public $params;
    /** @var ClosureUse[] use()s */
    public $uses;
    /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
    public $returnType;
    /** @var Node\Stmt[] Statements */
    public $stmts;
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public $attrGroups;
    /**
     * Constructs a lambda function node.
     *
     * @param array $subNodes   Array of the following optional subnodes:
     *                          'static'     => false  : Whether the closure is static
     *                          'byRef'      => false  : Whether to return by reference
     *                          'params'     => array(): Parameters
     *                          'uses'       => array(): use()s
     *                          'returnType' => null   : Return type
     *                          'stmts'      => array(): Statements
     *                          'attrGroups' => array(): PHP attributes groups
     * @param array $attributes Additional attributes
     */
    public function __construct(array $subNodes = [], array $attributes = [])
    {
        $this->attributes = $attributes;
        $this->static = $subNodes['static'] ?? \false;
        $this->byRef = $subNodes['byRef'] ?? \false;
        $this->params = $subNodes['params'] ?? [];
        $this->uses = $subNodes['uses'] ?? [];
        $returnType = $subNodes['returnType'] ?? null;
        $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
        $this->stmts = $subNodes['stmts'] ?? [];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }
    public function getSubNodeNames() : array
    {
        return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts'];
    }
    public function returnsByRef() : bool
    {
        return $this->byRef;
    }
    public function getParams() : array
    {
        return $this->params;
    }
    public function getReturnType()
    {
        return $this->returnType;
    }
    /** @return Node\Stmt[] */
    public function getStmts() : array
    {
        return $this->stmts;
    }
    public function getAttrGroups() : array
    {
        return $this->attrGroups;
    }
    public function getType() : string
    {
        return 'Expr_Closure';
    }
}

Directory Contents

Dirs: 3 × Files: 48

Name Size Perms Modified Actions
AssignOp DIR
- drwxr-xr-x 2024-11-08 13:59:10
Edit Download
BinaryOp DIR
- drwxr-xr-x 2024-11-08 13:59:10
Edit Download
Cast DIR
- drwxr-xr-x 2024-11-08 13:59:10
Edit Download
830 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.10 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
808 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.35 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
775 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
723 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
824 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.09 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
650 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
663 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.01 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
561 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1000 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
635 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.70 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
887 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
681 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
638 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
754 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
660 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
635 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
758 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.05 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
914 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
841 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
639 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
726 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
658 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.31 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.12 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.33 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
985 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
638 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
638 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
635 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
635 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
638 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
959 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
687 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.32 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.01 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
990 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
664 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
650 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
660 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
645 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
664 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
846 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).