Skip to content

Commit

Permalink
refactor: reduce code
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Mar 25, 2024
1 parent 9abecb7 commit 083230c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Service/Indexer/SiteKit/QuoteSectionMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,8 @@ public function match(array $path, array $value): string|false
/** @var Model $model */

$content = [];
$quote = $model['quote'] ?? '';
if (is_string($quote)) {
$content[] = $quote;
}
$citation = $model['citation'] ?? '';
if (is_string($citation)) {
$content[] = $citation;
}
$content[] = $model['quote'] ?? '';
$content[] = $model['citation'] ?? '';

return implode(' ', $content);
}
Expand Down

0 comments on commit 083230c

Please sign in to comment.