Fix exception thrown when getting completions on Definitions with a null type- this is expected
parent
91f13795d6
commit
1fa29ccae5
|
@ -29,10 +29,10 @@ class FqnUtilities
|
||||||
/**
|
/**
|
||||||
* Returns all possible FQNs in a type
|
* Returns all possible FQNs in a type
|
||||||
*
|
*
|
||||||
* @param Type $type
|
* @param Type|null $type
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public static function getFqnsFromType(Type $type): array
|
public static function getFqnsFromType($type): array
|
||||||
{
|
{
|
||||||
$fqns = [];
|
$fqns = [];
|
||||||
if ($type instanceof Types\Object_) {
|
if ($type instanceof Types\Object_) {
|
||||||
|
|
|
@ -537,9 +537,9 @@ class TolerantDefinitionResolver
|
||||||
* If the type could not be resolved, returns Types\Mixed.
|
* If the type could not be resolved, returns Types\Mixed.
|
||||||
*
|
*
|
||||||
* @param Tolerant\Node\Expression $expr
|
* @param Tolerant\Node\Expression $expr
|
||||||
* @return \phpDocumentor\Reflection\Type
|
* @return \phpDocumentor\Reflection\Type|null
|
||||||
*/
|
*/
|
||||||
public function resolveExpressionNodeToType($expr): Type
|
public function resolveExpressionNodeToType($expr)
|
||||||
{
|
{
|
||||||
if ($expr == null || $expr instanceof Tolerant\MissingToken || $expr instanceof Tolerant\SkippedToken) {
|
if ($expr == null || $expr instanceof Tolerant\MissingToken || $expr instanceof Tolerant\SkippedToken) {
|
||||||
// TODO some members are null or Missing/SkippedToken
|
// TODO some members are null or Missing/SkippedToken
|
||||||
|
|
Loading…
Reference in New Issue