mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-30 04:29:15 +01:00
Fixes from PHPStan (#502)
This commit is contained in:
parent
21d27527ed
commit
ee870e3464
@ -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
|
||||
*/
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user