Skip to content

Commit

Permalink
Method should return object not string
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 18, 2022
1 parent 147427c commit 802a375
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ protected function handleCreate(): void
$this->save($output);
}

protected function handleMissingCanonicalField(string $canonicalFieldName): string
protected function handleMissingCanonicalField(string $canonicalFieldName): PublicationFieldType
{
if (str_starts_with($canonicalFieldName, '__')) {
return $canonicalFieldName;
return new PublicationFieldType('text', $canonicalFieldName, '0', '0');
}

return throw new RuntimeException(
Expand Down

0 comments on commit 802a375

Please sign in to comment.