Files
apimacro/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php

46 lines
1.3 KiB
PHP
Raw Normal View History

2024-05-07 12:17:25 +02:00
<?php declare(strict_types=1);
namespace PhpParser\Node\Expr;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\VariadicPlaceholder;
2024-05-17 12:24:19 +00:00
class StaticCall extends CallLike {
2024-05-07 12:17:25 +02:00
/** @var Node\Name|Expr Class name */
2024-05-17 12:24:19 +00:00
public Node $class;
2024-05-07 12:17:25 +02:00
/** @var Identifier|Expr Method name */
2024-05-17 12:24:19 +00:00
public Node $name;
2024-05-07 12:17:25 +02:00
/** @var array<Arg|VariadicPlaceholder> Arguments */
2024-05-17 12:24:19 +00:00
public array $args;
2024-05-07 12:17:25 +02:00
/**
* Constructs a static method call node.
*
2024-05-17 12:24:19 +00:00
* @param Node\Name|Expr $class Class name
* @param string|Identifier|Expr $name Method name
* @param array<Arg|VariadicPlaceholder> $args Arguments
* @param array<string, mixed> $attributes Additional attributes
2024-05-07 12:17:25 +02:00
*/
2024-05-17 12:24:19 +00:00
public function __construct(Node $class, $name, array $args = [], array $attributes = []) {
2024-05-07 12:17:25 +02:00
$this->attributes = $attributes;
$this->class = $class;
$this->name = \is_string($name) ? new Identifier($name) : $name;
$this->args = $args;
}
2024-05-17 12:24:19 +00:00
public function getSubNodeNames(): array {
2024-05-07 12:17:25 +02:00
return ['class', 'name', 'args'];
}
2024-05-17 12:24:19 +00:00
public function getType(): string {
2024-05-07 12:17:25 +02:00
return 'Expr_StaticCall';
}
public function getRawArgs(): array {
return $this->args;
}
}