Skip to content

Commit

Permalink
DGI9-314: Code sniffer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bibliophileaxe committed Nov 21, 2023
1 parent 7350c05 commit d921940
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Plugin/search_api/processor/EDTFYear.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace Drupal\controlled_access_terms\Plugin\search_api\processor;

use Drupal\controlled_access_terms\EDTFUtils;
use Drupal\Core\Entity\EntityInterface;
use EDTF\EdtfFactory;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\search_api\Datasource\DatasourceInterface;
use Drupal\search_api\Item\ItemInterface;
use Drupal\search_api\Plugin\PluginFormTrait;
use Drupal\search_api\Processor\ProcessorPluginBase;
use Drupal\search_api\Processor\ProcessorProperty;
use Drupal\controlled_access_terms\EDTFUtils;
use EDTF\EdtfFactory;

/**
* Adds the item's creation year to the indexed data.
Expand Down Expand Up @@ -142,7 +142,7 @@ public function addFieldValues(ItemInterface $item) {
[$entityType, $bundle, $field_name] = explode('|', $field, 3);

if ($entityType === 'paragraph') {
$edtf = $this->getDateFromParagraphField($entity, $bundle, $field_name);
$edtf = $this->getDateFromParagraphField($entity, $bundle, $field_name);
}
elseif ($entity->getEntityTypeId() == $entityType
&& $entity->bundle() == $bundle
Expand Down Expand Up @@ -200,7 +200,8 @@ public function addFieldValues(ItemInterface $item) {
}
}
}
} catch (\Throwable $e) {
}
catch (\Throwable $e) {
\Drupal::logger('controlled_access_terms')
->warning(t("Could not parse EDTF value '@edtf' for indexing @type/@id",
[
Expand Down

0 comments on commit d921940

Please sign in to comment.