1
0
Fork 0

Fix exception thrown when getting completions on Definitions with a null type- this is expected

pull/357/head
Rob Lourens 2017-05-18 11:17:09 -07:00
parent 91f13795d6
commit 1fa29ccae5
2 changed files with 4 additions and 4 deletions

View File

@ -29,10 +29,10 @@ class FqnUtilities
/**
* Returns all possible FQNs in a type
*
* @param Type $type
* @param Type|null $type
* @return string[]
*/
public static function getFqnsFromType(Type $type): array
public static function getFqnsFromType($type): array
{
$fqns = [];
if ($type instanceof Types\Object_) {

View File

@ -537,9 +537,9 @@ class TolerantDefinitionResolver
* If the type could not be resolved, returns Types\Mixed.
*
* @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) {
// TODO some members are null or Missing/SkippedToken