1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-12 09:29:47 +01:00
PHP-Parser/lib/PhpParser/Node/Stmt/ClassLike.php

24 lines
462 B
PHP
Raw Normal View History

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