Esempio n. 1
0
 /**
  * @param EntityId|Item|Property $target
  *
  * @throws UnexpectedValueException
  * @return EntityId|SiteLink
  *
  * @todo Fix duplicated code
  */
 private function getEntityIdentifierFromTarget($target)
 {
     if ($target instanceof Item || $target instanceof Property) {
         return $target->getId();
     } else {
         return $target;
     }
 }