1<?php declare(strict_types=1); 2 3namespace PhpParser\Node\Expr; 4 5use PhpParser\Node; 6use PhpParser\Node\Expr; 7use PhpParser\Node\Identifier; 8 9class StaticCall extends Expr 10{ 11 /** @var Node\Name|Expr Class name */ 12 public $class; 13 /** @var Identifier|Expr Method name */ 14 public $name; 15 /** @var Node\Arg[] Arguments */ 16 public $args; 17 18 /** 19 * Constructs a static method call node. 20 * 21 * @param Node\Name|Expr $class Class name 22 * @param string|Identifier|Expr $name Method name 23 * @param Node\Arg[] $args Arguments 24 * @param array $attributes Additional attributes 25 */ 26 public function __construct($class, $name, array $args = [], array $attributes = []) { 27 $this->attributes = $attributes; 28 $this->class = $class; 29 $this->name = \is_string($name) ? new Identifier($name) : $name; 30 $this->args = $args; 31 } 32 33 public function getSubNodeNames() : array { 34 return ['class', 'name', 'args']; 35 } 36 37 public function getType() : string { 38 return 'Expr_StaticCall'; 39 } 40} 41