mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Remove PHP 5-incompatible things from SimpleNameResolver
This commit is contained in:
parent
a7cb4664aa
commit
95b9b8b51e
@ -33,7 +33,7 @@ class SimpleNameResolver extends NodeVisitorAbstract
|
||||
* @param array $options Options
|
||||
*/
|
||||
public function __construct(ErrorHandler $errorHandler = null, array $options = []) {
|
||||
$this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing);
|
||||
$this->nameContext = new NameContext($errorHandler ?: new ErrorHandler\Throwing);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -143,7 +143,7 @@ class SimpleNameResolver extends NodeVisitorAbstract
|
||||
*
|
||||
* @return Name Resolved name, or original name with attribute
|
||||
*/
|
||||
protected function resolveName(Name $name, int $type) : Name {
|
||||
protected function resolveName(Name $name, $type) : Name {
|
||||
$resolvedName = $this->nameContext->getResolvedName($name, $type);
|
||||
if (null !== $resolvedName) {
|
||||
$name->setAttribute('resolvedName', $resolvedName->toString());
|
||||
|
Loading…
Reference in New Issue
Block a user