1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-11 08:59:46 +01:00
PHP-Parser/lib/PhpParser/Node/Stmt/ClassLike.php

23 lines
451 B
PHP
Raw Normal View History

<?php
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
abstract class ClassLike extends Node\Stmt {
/** @var string Name */
public $name;
/** @var Node[] Statements */
public $stmts;
public function getMethods() {
$methods = array();
foreach ($this->stmts as $stmt) {
if ($stmt instanceof ClassMethod) {
$methods[] = $stmt;
}
}
return $methods;
}
}