1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-30 04:19:30 +01:00

Fixes from PHPStan (#502)

This commit is contained in:
Gabriel Caruso 2018-05-19 06:12:24 -03:00 committed by Nikita Popov
parent 21d27527ed
commit ee870e3464
2 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@ class BuilderFactory
/** /**
* Creates a namespace/class use builder. * 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 * @return Builder\Use_ The create use builder
*/ */

View File

@ -15,7 +15,7 @@ class Error extends \RuntimeException
* (or start line of error -- deprecated) * (or start line of error -- deprecated)
*/ */
public function __construct(string $message, $attributes = []) { public function __construct(string $message, $attributes = []) {
$this->rawMessage = (string) $message; $this->rawMessage = $message;
if (is_array($attributes)) { if (is_array($attributes)) {
$this->attributes = $attributes; $this->attributes = $attributes;
} else { } else {
@ -76,7 +76,7 @@ class Error extends \RuntimeException
* @param string $message Error message * @param string $message Error message
*/ */
public function setRawMessage(string $message) { public function setRawMessage(string $message) {
$this->rawMessage = (string) $message; $this->rawMessage = $message;
$this->updateMessage(); $this->updateMessage();
} }
@ -86,7 +86,7 @@ class Error extends \RuntimeException
* @param int $line Error start line * @param int $line Error start line
*/ */
public function setStartLine(int $line) { public function setStartLine(int $line) {
$this->attributes['startLine'] = (int) $line; $this->attributes['startLine'] = $line;
$this->updateMessage(); $this->updateMessage();
} }