Вход Регистрация
Файл: vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php
Строк: 33
<?php declare(strict_types=1);

namespace 
PhpParserNodeStmt;

use 
PhpParserNode;

class 
PropertyProperty extends NodeStmt
{
    
/** @var NodeVarLikeIdentifier Name */
    
public $name;
    
/** @var null|NodeExpr Default */
    
public $default;

    
/**
     * Constructs a class property node.
     *
     * @param string|NodeVarLikeIdentifier $name       Name
     * @param null|NodeExpr                $default    Default value
     * @param array                         $attributes Additional attributes
     */
    
public function __construct($nameNodeExpr $default null, array $attributes = []) {
        
$this->attributes $attributes;
        
$this->name is_string($name) ? new NodeVarLikeIdentifier($name) : $name;
        
$this->default $default;
    }

    public function 
getSubNodeNames() : array {
        return [
'name''default'];
    }
    
    public function 
getType() : string {
        return 
'Stmt_PropertyProperty';
    }
}
Онлайн: 1
Реклама