-<?php
+<?php declare(strict_types=1);
namespace PhpParser\Builder;
use PhpParser;
+use PhpParser\BuilderHelpers;
-abstract class Declaration extends PhpParser\BuilderAbstract
+abstract class Declaration implements PhpParser\Builder
{
- protected $attributes = array();
+ protected $attributes = [];
abstract public function addStmt($stmt);
* @return $this The builder instance (for fluid interface)
*/
public function setDocComment($docComment) {
- $this->attributes['comments'] = array(
- $this->normalizeDocComment($docComment)
- );
+ $this->attributes['comments'] = [
+ BuilderHelpers::normalizeDocComment($docComment)
+ ];
return $this;
}
-}
\ No newline at end of file
+}