← All changes
|
includes/Dependencies/PhpParser/NodeVisitor/NameResolver.php
+3
-3
3.4.2
→
4.9.3
View file →
| @@ -33,9 +33,9 @@ | ||
| 33 | 33 | * |
| 34 | 34 | * @param ErrorHandler|null $errorHandler Error handler |
| 35 | 35 | * @param array $options Options |
| 36 | 36 | */ |
| 37 | - public function __construct(ErrorHandler $errorHandler = null, array $options = []) { | |
| 37 | + public function __construct(?ErrorHandler $errorHandler = null, array $options = []) { | |
| 38 | 38 | $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; |
| 39 | 39 | $this->preserveOriginalNames = !empty($options['preserveOriginalNames']); |
| 40 | 40 | } |
| 41 | 41 | |
| @@ -122,9 +122,9 @@ | ||
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - protected function resetState(Name $namespace = null) { | |
| 126 | + protected function resetState(?Name $namespace = null) { | |
| 127 | 127 | $this->namespace = $namespace; |
| 128 | 128 | $this->aliases = array( |
| 129 | 129 | Stmt\Use_::TYPE_NORMAL => array(), |
| 130 | 130 | Stmt\Use_::TYPE_FUNCTION => array(), |
| @@ -131,9 +131,9 @@ | ||
| 131 | 131 | Stmt\Use_::TYPE_CONSTANT => array(), |
| 132 | 132 | ); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - protected function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { | |
| 135 | + protected function addAlias(Stmt\UseUse $use, $type, ?Name $prefix = null) { | |
| 136 | 136 | // Add prefix for group uses |
| 137 | 137 | $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; |
| 138 | 138 | // Type is determined either by individual element or whole use declaration |
| 139 | 139 | $type |= $use->type; |