1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php declare(strict_types=1);
- namespace PhpParser\Builder;
- use PhpParser;
- use PhpParser\BuilderHelpers;
- abstract class Declaration implements PhpParser\Builder {
-
- protected array $attributes = [];
-
- abstract public function addStmt($stmt);
-
- public function addStmts(array $stmts) {
- foreach ($stmts as $stmt) {
- $this->addStmt($stmt);
- }
- return $this;
- }
-
- public function setDocComment($docComment) {
- $this->attributes['comments'] = [
- BuilderHelpers::normalizeDocComment($docComment)
- ];
- return $this;
- }
- }
|