The expression return $this->lookup->getEntity($propertyId) also could return the type Wikibase\DataModel\Entity\EntityDocument which includes types incompatible with the return type mandated by Wikibase\DataModel\Servi...kup::getPropertyForId() of Wikibase\DataModel\Entity\Property|null. Consider adding a type-check to rule them out.
Loading history...
32
} catch ( EntityLookupException $ex ) {
33
throw new PropertyLookupException( $propertyId, $ex->getMessage(), $ex );