Skip to content

Commit af6a99d

Browse files
committed
[FIX] CS issues 2025.11.25
This commit has the PHP CS fixes only.
1 parent 9ccfd7f commit af6a99d

18 files changed

+66
-66
lines changed

Classes/Controller/Backend/PreviewController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ public function previewAction(ServerRequestInterface $request): ResponseInterfac
5757
$tikaService = $this->getConfiguredTikaService();
5858
$metadata = $tikaService->extractMetaData(
5959
/** not real static-analysis error, because checked in {@link \ApacheSolrForTypo3\Tika\ContextMenu\Preview::canHandle()} */
60-
$file
60+
$file,
6161
);
6262
$content = $tikaService->extractText(
6363
/** not real static-analysis error, because checked in {@link \ApacheSolrForTypo3\Tika\ContextMenu\Preview::canHandle()} */
64-
$file
64+
$file,
6565
);
6666

6767
try {
6868
$language = $tikaService->detectLanguageFromFile(
6969
/** not real static-analysis error, because checked in {@link \ApacheSolrForTypo3\Tika\ContextMenu\Preview::canHandle()} */
70-
$file
70+
$file,
7171
);
7272
} catch (Throwable) {
7373
$language = 'not detectable';

Classes/Controller/Backend/SolrModule/TikaControlPanelModuleController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function indexAction(): ResponseInterface
9595
$this->moduleTemplate->assign('configuration', $this->tikaConfiguration);
9696
$this->moduleTemplate->assign(
9797
'extractor',
98-
ucfirst($this->tikaConfiguration['extractor'] ?? '')
98+
ucfirst($this->tikaConfiguration['extractor'] ?? ''),
9999
);
100100

101101
switch ($this->tikaConfiguration['extractor']) {
@@ -109,7 +109,7 @@ public function indexAction(): ResponseInterface
109109
'isControllable' => $this->isTikaServerControllable(),
110110
'pid' => $this->getTikaServerPid(),
111111
'version' => $this->getTikaServerVersion(),
112-
]
112+
],
113113
);
114114
break;
115115
case 'solr':
@@ -118,15 +118,15 @@ public function indexAction(): ResponseInterface
118118
[
119119
'isConnected' => $this->isConnectedToTikaServer(),
120120
'version' => $this->getTikaServerVersion(),
121-
]
121+
],
122122
);
123123
break;
124124
case 'jar':
125125
$this->moduleTemplate->assign(
126126
'jar',
127127
[
128128
'version' => $this->getTikaServerVersion(),
129-
]
129+
],
130130
);
131131
break;
132132
default:
@@ -235,7 +235,7 @@ protected function isTikaServerControllable(): bool
235235
. ',' . ini_get('suhosin.executor.func.blacklist');
236236
$disabledFunctions = GeneralUtility::trimExplode(
237237
',',
238-
$disabledFunctions
238+
$disabledFunctions,
239239
);
240240
if (in_array('exec', $disabledFunctions)) {
241241
return false;
@@ -278,7 +278,7 @@ protected function isConnectedToTikaServer(): bool
278278
$this->addFlashMessage(
279279
'Could not connect to Tika at: ' . $this->tikaService->getTikaServerUrl(),
280280
'Unable to contact Apache Tika server.',
281-
ContextualFeedbackSeverity::ERROR
281+
ContextualFeedbackSeverity::ERROR,
282282
);
283283
return false;
284284
}

Classes/Report/TikaStatus.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected function getOkStatus(): Status
9999
return GeneralUtility::makeInstance(
100100
Status::class,
101101
'Apache Tika',
102-
'Configuration OK'
102+
'Configuration OK',
103103
);
104104
}
105105

@@ -112,7 +112,7 @@ protected function getJavaInstalledStatus(ContextualFeedbackSeverity $severity =
112112
$status = GeneralUtility::makeInstance(
113113
Status::class,
114114
'Apache Tika',
115-
'Java OK'
115+
'Java OK',
116116
);
117117

118118
if (!$this->isJavaInstalled()) {
@@ -121,7 +121,7 @@ protected function getJavaInstalledStatus(ContextualFeedbackSeverity $severity =
121121
'Apache Tika',
122122
'Java Not Found',
123123
'<p>Please install Java.</p>',
124-
$severity
124+
$severity,
125125
);
126126
}
127127

@@ -140,7 +140,7 @@ protected function getAppConfigurationStatus(): Status
140140
'Apache Tika',
141141
'Configuration Incomplete',
142142
'<p>Could not find Tika app jar.</p>',
143-
ContextualFeedbackSeverity::ERROR
143+
ContextualFeedbackSeverity::ERROR,
144144
);
145145
}
146146

@@ -161,7 +161,7 @@ protected function getServerConfigurationStatus(): Status
161161
'Apache Tika',
162162
'Configuration Incomplete',
163163
'<p>Could not connect to Tika server.</p>',
164-
ContextualFeedbackSeverity::ERROR
164+
ContextualFeedbackSeverity::ERROR,
165165
);
166166
}
167167

@@ -238,7 +238,7 @@ protected function getSolrCellConfigurationStatus(): Status
238238
'Apache Tika',
239239
'Configuration incomplete or wrong',
240240
$additionalErrorInfos,
241-
ContextualFeedbackSeverity::ERROR
241+
ContextualFeedbackSeverity::ERROR,
242242
);
243243
}
244244

@@ -249,7 +249,7 @@ protected function getTikaServiceFromTikaConfiguration(): ServerService
249249
{
250250
return GeneralUtility::makeInstance(
251251
ServerService::class,
252-
$this->tikaConfiguration
252+
$this->tikaConfiguration,
253253
);
254254
}
255255

Classes/Service/Extractor/AbstractExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(
5454
$this->configuration = $extensionConfiguration ?? Util::getTikaExtensionConfiguration();
5555
$this->fileSizeValidator = $fileSizeValidator ?? GeneralUtility::makeInstance(
5656
SizeValidator::class,
57-
$this->configuration
57+
$this->configuration,
5858
);
5959
}
6060

@@ -103,7 +103,7 @@ protected function log(string $message, array $data = []): void
103103
$this->logger->log(
104104
LogLevel::DEBUG, // Previous value 0
105105
$message,
106-
$data
106+
$data,
107107
);
108108
}
109109
}

Classes/Service/Extractor/LanguageDetector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function canProcess(File $file): bool
7575
*/
7676
public function extractMetaData(
7777
File $file,
78-
array $previousExtractedData = []
78+
array $previousExtractedData = [],
7979
): array {
8080
$metaData = [];
8181

Classes/Service/Tika/AbstractService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function log(string $message, array $data = [], mixed $severity = LogL
6262
$this->logger->log(
6363
$severity,
6464
$message,
65-
$data
65+
$data,
6666
);
6767
}
6868

Classes/Service/Tika/AppService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function initializeService(): void
4040
) {
4141
throw new RuntimeException(
4242
'Invalid path or filename for Tika application jar: ' . $this->configuration['tikaPath'],
43-
1266864929
43+
1266864929,
4444
);
4545
}
4646

@@ -87,7 +87,7 @@ public function extractText(FileInterface $file): string
8787
'file' => $file,
8888
'tika command' => $tikaCommand,
8989
'shell output' => $extractedText,
90-
]
90+
],
9191
);
9292

9393
return (string)$extractedText;
@@ -118,7 +118,7 @@ public function extractMetaData(FileInterface $file): array
118118
'tika command' => $tikaCommand,
119119
'shell output' => $shellOutput,
120120
'meta data' => $metaData,
121-
]
121+
],
122122
);
123123

124124
return $metaData;
@@ -181,7 +181,7 @@ protected function detectLanguageFromLocalFile(string $localFilePath): string
181181
'file' => $localFilePath,
182182
'tika command' => $tikaCommand,
183183
'shell output' => $language,
184-
]
184+
],
185185
);
186186

187187
return $language;

Classes/Service/Tika/ServerService.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ protected function queryTika(RequestInterface $request): string
251251
throw new BadResponseException(
252252
'Invalid status code ' . $response->getStatusCode(),
253253
$request,
254-
$response
254+
$response,
255255
);
256256
}
257257

@@ -294,12 +294,12 @@ public function extractText(FileInterface $file): string
294294
$this->log(
295295
'Text Extraction using Tika Server failed',
296296
$this->getLogData($file, $response),
297-
LogLevel::ERROR
297+
LogLevel::ERROR,
298298
);
299299
} else {
300300
$this->log(
301301
'Text Extraction using Tika Server',
302-
$this->getLogData($file, $response)
302+
$this->getLogData($file, $response),
303303
);
304304
}
305305

@@ -328,14 +328,14 @@ public function extractMetaData(FileInterface $file): array
328328
$this->log(
329329
'Meta Data Extraction using Tika Server failed',
330330
$this->getLogData($file, $rawResponse),
331-
LogLevel::ERROR
331+
LogLevel::ERROR,
332332
);
333333
return [];
334334
}
335335

336336
$this->log(
337337
'Meta Data Extraction using Tika Server',
338-
$this->getLogData($file, $rawResponse)
338+
$this->getLogData($file, $rawResponse),
339339
);
340340
return $response;
341341
}
@@ -360,12 +360,12 @@ public function detectLanguageFromFile(FileInterface $file): string
360360
$this->log(
361361
'Language Detection using Tika Server failed',
362362
$this->getLogData($file, $response),
363-
LogLevel::ERROR
363+
LogLevel::ERROR,
364364
);
365365
} else {
366366
$this->log(
367367
'Language Detection using Tika Server',
368-
$this->getLogData($file, $response)
368+
$this->getLogData($file, $response),
369369
);
370370
}
371371

@@ -480,7 +480,7 @@ protected function createRequest(UriInterface $uri, string $method = 'GET'): Req
480480
$requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
481481
$request = $requestFactory->createRequest(
482482
$method,
483-
$uri
483+
$uri,
484484
);
485485
return $request->withAddedHeader('User-Agent', $this->getUserAgent());
486486
}

Classes/Service/Tika/ServiceFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function getTika(
5151
'solr' => GeneralUtility::makeInstance(SolrCellService::class, $configuration),
5252
default => throw new InvalidArgumentException(
5353
'Unknown Tika service type "' . $tikaServiceType . '". Must be one of jar, server, or solr.',
54-
1423035119
54+
1423035119,
5555
),
5656
};
5757
}

Classes/Service/Tika/SolrCellService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function detectLanguageFromFile(FileInterface $file): string
150150
// TODO check whether Solr supports text extraction now
151151
throw new UnsupportedOperationException(
152152
'The Tika Solr service does not support language detection',
153-
1423457153
153+
1423457153,
154154
);
155155
}
156156

@@ -164,7 +164,7 @@ public function detectLanguageFromString(string $input): string
164164
// TODO check whether Solr supports text extraction now
165165
throw new UnsupportedOperationException(
166166
'The Tika Solr service does not support language detection',
167-
1423457154
167+
1423457154,
168168
);
169169
}
170170

0 commit comments

Comments
 (0)