reference url can always fallback to the link itself

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
pull/34353/head
Julien Veyssier 2 years ago
parent 910c774b35
commit eff783797a
No known key found for this signature in database
GPG Key ID: 4141FEE162030638

@ -98,7 +98,7 @@ interface IReference extends JsonSerializable {
/** /**
* @since 25.0.0 * @since 25.0.0
*/ */
public function getUrl(): ?string; public function getUrl(): string;
/** /**
* Set the reference specific rich object representation * Set the reference specific rich object representation

@ -149,8 +149,8 @@ class Reference implements IReference {
* @inheritdoc * @inheritdoc
* @since 25.0.0 * @since 25.0.0
*/ */
public function getUrl(): ?string { public function getUrl(): string {
return $this->url; return $this->url ?? $this->reference;
} }
/** /**

Loading…
Cancel
Save