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

<?php declare(strict_types=1);

namespace PhpParser\Node\Expr;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\FunctionLike;

class ArrowFunction extends Expr implements FunctionLike {
    /** @var bool Whether the closure is static */
    public bool $static;

    /** @var bool Whether to return by reference */
    public bool $byRef;

    /** @var Node\Param[] */
    public array $params = [];

    /** @var null|Node\Identifier|Node\Name|Node\ComplexType */
    public ?Node $returnType;

    /** @var Expr Expression body */
    public Expr $expr;
    /** @var Node\AttributeGroup[] */
    public array $attrGroups;

    /**
     * @param array{
     *     expr: Expr,
     *     static?: bool,
     *     byRef?: bool,
     *     params?: Node\Param[],
     *     returnType?: null|Node\Identifier|Node\Name|Node\ComplexType,
     *     attrGroups?: Node\AttributeGroup[]
     * } $subNodes Array of the following subnodes:
     *             'expr'                  : Expression body
     *             'static'     => false   : Whether the closure is static
     *             'byRef'      => false   : Whether to return by reference
     *             'params'     => array() : Parameters
     *             'returnType' => null    : Return type
     *             'attrGroups' => array() : PHP attribute groups
     * @param array<string, mixed> $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->returnType = $subNodes['returnType'] ?? null;
        $this->expr = $subNodes['expr'];
        $this->attrGroups = $subNodes['attrGroups'] ?? [];
    }

    public function getSubNodeNames(): array {
        return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr'];
    }

    public function returnsByRef(): bool {
        return $this->byRef;
    }

    public function getParams(): array {
        return $this->params;
    }

    public function getReturnType() {
        return $this->returnType;
    }

    public function getAttrGroups(): array {
        return $this->attrGroups;
    }

    /**
     * @return Node\Stmt\Return_[]
     */
    public function getStmts(): array {
        return [new Node\Stmt\Return_($this->expr)];
    }

    public function getType(): string {
        return 'Expr_ArrowFunction';
    }
}

Directory Contents

Dirs: 3 × Files: 48

Name Size Perms Modified Actions
AssignOp DIR
- drwxr-xr-x 2025-12-06 11:56:16
Edit Download
BinaryOp DIR
- drwxr-xr-x 2025-12-06 11:56:16
Edit Download
Cast DIR
- drwxr-xr-x 2025-12-06 11:56:16
Edit Download
822 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
305 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
831 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
2.49 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
774 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
726 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
823 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.07 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
652 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
652 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.76 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
567 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
986 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
637 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
2.77 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
309 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
683 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
640 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
757 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
662 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
637 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
758 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
994 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
951 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
860 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
642 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
879 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
782 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.25 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.08 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.27 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
971 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
639 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
639 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
636 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
636 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
640 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
945 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
795 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1.26 KB lrw-r--r-- 2025-12-06 11:56:16
Edit Download
1014 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
967 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
668 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
652 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
649 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
637 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
666 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download
846 B lrw-r--r-- 2025-12-06 11:56:16
Edit Download

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