Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-moser committed Jan 15, 2024
1 parent afa3c43 commit 052df3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Entity/IndexQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class IndexQueue
{
public const TABLE = 'generic_data_index_queue';

#[ORM\Id()]
#[ORM\Id]
#[ORM\Column(type: 'integer', options: ['unsigned' => true])]
private int $elementId;

#[ORM\Id()]
#[ORM\Id]
#[ORM\Column(type: 'string', length: 20)]
private string $elementType;

Expand Down
4 changes: 2 additions & 2 deletions src/Service/SearchIndex/OpenSearch/OpenSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function deleteIndex($indexName, bool $silent = false): OpenSearchService
$this->logger->log($silent ? LogLevel::DEBUG : LogLevel::INFO, "Deleting index $indexName");
$response = $this->openSearchClient->indices()->delete(['index' => $indexName]);
$this->logger->debug(json_encode($response));

Check notice on line 57 in src/Service/SearchIndex/OpenSearch/OpenSearchService.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

JSON encoding API usage

\[EA\] Please consider taking advantage of JSON_THROW_ON_ERROR flag for this call options.
} catch (Missing404Exception $e) {
} catch (Missing404Exception) {

Check notice on line 58 in src/Service/SearchIndex/OpenSearch/OpenSearchService.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Redundant catch clause

Exception 'Missing404Exception' is never thrown in the corresponding 'try' block
$this->logger->debug('Delete index - index did not exist: ' . $indexName);
}

Expand All @@ -68,7 +68,7 @@ public function getCurrentIndexVersion(string $indexName): string
$result = $this->openSearchClient->indices()->getAlias([
'name' => $indexName,
]);
} catch (Missing404Exception $e) {
} catch (Missing404Exception) {

Check notice on line 71 in src/Service/SearchIndex/OpenSearch/OpenSearchService.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Redundant catch clause

Exception 'Missing404Exception' is never thrown in the corresponding 'try' block
return '';
}

Expand Down

0 comments on commit 052df3f

Please sign in to comment.