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.
*
* @param string|Node\Name Name to alias
* @param string|Node\Name $name Name to alias
*
* @return Builder\Use_ The create use builder
*/

View File

@ -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();
}