diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index c28f40f..ee85558 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -104,7 +104,7 @@ class BuilderFactory /** * Creates a namespace/class use builder. * - * @param string|Node\Name Name to alias + * @param string|Node\Name $name Name to alias * * @return Builder\Use_ The create use builder */ diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index cedb412..d1fb959 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -15,7 +15,7 @@ class Error extends \RuntimeException * (or start line of error -- deprecated) */ public function __construct(string $message, $attributes = []) { - $this->rawMessage = (string) $message; + $this->rawMessage = $message; if (is_array($attributes)) { $this->attributes = $attributes; } else { @@ -76,7 +76,7 @@ class Error extends \RuntimeException * @param string $message Error message */ public function setRawMessage(string $message) { - $this->rawMessage = (string) $message; + $this->rawMessage = $message; $this->updateMessage(); } @@ -86,7 +86,7 @@ class Error extends \RuntimeException * @param int $line Error start line */ public function setStartLine(int $line) { - $this->attributes['startLine'] = (int) $line; + $this->attributes['startLine'] = $line; $this->updateMessage(); }