Skip to content

Commit

Permalink
[TASK] Fix TYPO3 coding standards issues after upgrade to v0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dkd-kaehm committed Sep 22, 2022
1 parent 94803dc commit cd010f3
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
name: Mount RAMFS
run: |
sudo mkdir -p ${{ env.CI_BUILD_DIRECTORY }}
sudo mount -t tmpfs -o size=2048m none ${{ env.CI_BUILD_DIRECTORY }}
sudo mount -t tmpfs -o size=2560m none ${{ env.CI_BUILD_DIRECTORY }}
sudo mkdir -p ${{ env.CI_BUILD_DIRECTORY }}/data-{solr,mysql,tika-binaries} \
&& sudo chown $USER ${{ env.CI_BUILD_DIRECTORY }}/data-{mysql,tika-binaries} \
&& sudo chown 8983:8983 ${{ env.CI_BUILD_DIRECTORY }}/data-solr
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.cache
.Build
.DS_Store
/.buildpath
Expand Down
1 change: 0 additions & 1 deletion Classes/Controller/Backend/PreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
*/
class PreviewController
{

/**
* @param ServerRequestInterface $request
* @return string|Response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
*/
class TikaControlPanelModuleController extends AbstractModuleController
{

/**
* Tika configuration
*
Expand Down
1 change: 0 additions & 1 deletion Classes/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
class Process
{

/**
* Process ID
*
Expand Down
1 change: 0 additions & 1 deletion Classes/Service/Extractor/TextExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
*/
class TextExtractor implements TextExtractorInterface
{

/**
* @var array
*/
Expand Down
1 change: 0 additions & 1 deletion Classes/Service/File/SizeValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
class SizeValidator
{

/**
* @var array
*/
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/Tika/AbstractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function getAdditionalCommandOptions(): string

// Early return if no additional command options are configured
// or configuration does not match required pattern (only -D parameter is supported)
if ('' === $commandOptions || !preg_match_all(self::JAVA_COMMAND_OPTIONS_REGEX, $commandOptions, $matches)) {
if ($commandOptions === '' || !preg_match_all(self::JAVA_COMMAND_OPTIONS_REGEX, $commandOptions, $matches)) {
return '';
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/Tika/ServerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function startServer(): void
public function stopServer(): void
{
$pid = $this->getServerPid();
if (null === $pid) {
if ($pid === null) {
return;
}

Expand Down
1 change: 0 additions & 1 deletion Classes/Service/Tika/ServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
*/
class ServiceFactory
{

/**
* Creates an instance of a Tika service
*
Expand Down
1 change: 0 additions & 1 deletion Classes/ViewHelpers/Backend/IsStringViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/
class IsStringViewHelper extends AbstractConditionViewHelper
{

/**
* Initialize ViewHelper arguments
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*/
class ServerServiceFixture extends ServerService
{

/**
* The endpoint to be used
*
Expand Down
1 change: 0 additions & 1 deletion Tests/Unit/ExecRecorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
*/
class ExecRecorder
{

/**
* Allows to capture exec() parameters
*
Expand Down
1 change: 0 additions & 1 deletion Tests/Unit/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/
class ProcessTest extends UnitTestCase
{

/**
* @test
*/
Expand Down
1 change: 0 additions & 1 deletion Tests/Unit/Service/Extractor/MetaDataExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
*/
class MetaDataExtractorTest extends UnitTestCase
{

/**
* Returns a faked extractor response of a jpeg image.
*
Expand Down
1 change: 0 additions & 1 deletion Tests/Unit/Service/Tika/AbstractServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*/
class AbstractServiceTest extends UnitTestCase
{

/**
* @test
*/
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function getFixturePath(string $fixtureName): string
*/
protected function getRuntimeDirectory(): string
{
$rc = new ReflectionClass(get_class($this));
$rc = new ReflectionClass(static::class);
return dirname($rc->getFileName());
}
}
10 changes: 5 additions & 5 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
/* @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */ // register all module icons with extensions-solr-module-modulename
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);

$iconRegistry->registerIcon(
$modulePrefix . '-tikacontrolpanel',
$svgProvider,
['source' => $extIconPath . 'module-tika.svg']
);
$iconRegistry->registerIcon(
$modulePrefix . '-tikacontrolpanel',
$svgProvider,
['source' => $extIconPath . 'module-tika.svg']
);

if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('solr')) {
$tikaExtensionConfiguration = \ApacheSolrForTypo3\Tika\Util::getTikaExtensionConfiguration();
Expand Down

0 comments on commit cd010f3

Please sign in to comment.