Skip to content

Commit

Permalink
[TASK] Sync with EXT:solr addons :: fix old linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dkd-kaehm committed Aug 15, 2023
1 parent d96e4eb commit b15df83
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Classes/System/Solr/SolrConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SolrConnection
{
protected ?SolrAdminService $adminService = null;

protected ?SolrReadService $readService= null;
protected ?SolrReadService $readService = null;

protected ?SolrWriteService $writeService = null;

Expand Down
6 changes: 3 additions & 3 deletions Classes/System/Util/SiteUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ public static function getAllSolrConnectionConfigurations(
*/
protected static function getConnectionPropertyOrFallback(
CoreSite $typo3Site,
string $property,
int $languageId,
string $scope,
string $property,
int $languageId,
string $scope,
): string|int|bool|null {
if ($scope === 'write' && !self::isWriteConnectionEnabled($typo3Site, $languageId)) {
$scope = 'read';
Expand Down
4 changes: 2 additions & 2 deletions Tests/Integration/Controller/SearchControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,8 @@ public function canSeeTheParsedQueryWhenABackendUserIsLoggedIn()
public function frontendWillRenderErrorMessageIfSolrNotAvailableDataProvider(): array
{
return [
['action' => 'results', 'getArguments' =>['q' => '*']],
['action' => 'detail', 'getArguments' =>['id' => 1]],
['action' => 'results', 'getArguments' => ['q' => '*']],
['action' => 'detail', 'getArguments' => ['id' => 1]],
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function canGetVariants(): void

$typoScriptConfiguration = Util::getSolrConfiguration();
$typoScriptConfiguration->mergeSolrConfiguration([
'search.' =>[
'search.' => [
'variants' => 1,
'variants.' => [
'variantField' => 'pid',
Expand Down Expand Up @@ -130,7 +130,7 @@ public function canGetCaseSensitiveVariants(): void

$typoScriptConfiguration = Util::getSolrConfiguration();
$typoScriptConfiguration->mergeSolrConfiguration([
'search.' =>[
'search.' => [
'variants' => 1,
'variants.' => [
'variantField' => 'author',
Expand Down Expand Up @@ -196,7 +196,7 @@ public function canGetZeroResultsWithVariantsOnEmptyIndex(): void

$typoScriptConfiguration = Util::getSolrConfiguration();
$typoScriptConfiguration->mergeSolrConfiguration([
'search.' =>[
'search.' => [
'variants' => 1,
'variants.' => [
'variantField' => 'pid',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function canSaveStatisticsRecord()
protected static function getDaysSinceTimestamp(int $timestamp): int
{
$secondsUntilNow = time() - $timestamp;
$days = floor($secondsUntilNow / (60*60*24));
$days = floor($secondsUntilNow / (60 * 60 * 24));
return (int)$days;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testCanUsePlainValuesFromConfiguration()
$configuration = [
'plugin.' => [
'tx_solr.' => [
'search.' =>[
'search.' => [
'sorting' => 1,
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function canCreateGroups(): void
$parserRegistry = GeneralUtility::makeInstance(ResultParserRegistry::class, $typoScriptConfiguration);
$parserRegistry->registerParser(GroupedResultParser::class, 300);

$queryMock= $this->createMock(Query::class);
$queryMock = $this->createMock(Query::class);
$queryMock->expects(self::once())->method('getComponent')->willReturn($this->createMock(Grouping::class));
$queryBuilderMock = $this->createMock(QueryBuilder::class);
$queryBuilderMock->expects(self::once())->method('buildSearchQuery')->willReturn($queryMock);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Domain/Site/SiteRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function canGetAllLanguages(): void
);

$siteOne = $this->siteRepository->getFirstAvailableSite();
$connections =$siteOne->getAllSolrConnectionConfigurations();
$connections = $siteOne->getAllSolrConnectionConfigurations();
self::assertEquals([0, 2, 5], array_keys($connections), 'Could not get languages for site');
}

Expand Down

0 comments on commit b15df83

Please sign in to comment.