Skip to content

Commit

Permalink
Coding standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Mar 4, 2024
1 parent 883fba3 commit a4a8d3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion embargo.module
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ function embargo_entity_base_field_info(EntityTypeInterface $entity_type) {
->setClass(EmbargoItemList::class)
->setSetting('target_type', 'embargo')
->setSetting('embargo_types', match($entity_type->id()) {
'file', 'media' => [EmbargoInterface::EMBARGO_TYPE_NODE, EmbargoInterface::EMBARGO_TYPE_FILE],
'file', 'media' => [
EmbargoInterface::EMBARGO_TYPE_NODE,
EmbargoInterface::EMBARGO_TYPE_FILE,
],
'node' => [EmbargoInterface::EMBARGO_TYPE_NODE],
});

Expand Down
5 changes: 4 additions & 1 deletion src/Plugin/search_api/processor/EmbargoProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ public function preprocessSearchQuery(QueryInterface $query) : void {
return;
}

$and_group = $query->createAndAddConditionGroup(tags: ['embargo_processor', 'embargo_access']);
$and_group = $query->createAndAddConditionGroup(tags: [
'embargo_processor',
'embargo_access',
]);
foreach (array_keys($applicable_datasources) as $datasource_id) {
if ($filter = $this->addEmbargoFilters($datasource_id, $query)) {
$and_group->addConditionGroup($filter);
Expand Down

0 comments on commit a4a8d3e

Please sign in to comment.