Skip to content

Commit

Permalink
Small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Dec 1, 2023
1 parent 5500b87 commit 15106ac
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

# ignore generated documentation
*GENERATED*
Tests/Unit/Build/.phpunit.cache/
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Features: Please create a issue first and describe the feature!

## Code Checks

The extension use PHP CS Fixer & PHP Unit in tooling. Please run "composer code" or equivalent to execute PHP CS Fixer and the tests in front of the commit!
The extension use PHP CS Fixer & PHP Unit in tooling. Please run "composer code-fix"/"composer code-check" or equivalent to execute PHP CS Fixer and the tests in front of the commit!

More tooling will be added shortly.

Expand Down
4 changes: 2 additions & 2 deletions Classes/Command/ImportCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ protected function configure()
'since',
's',
InputOption::VALUE_OPTIONAL,
'Imports all events since the given date.' . LF
. 'Valid PHP date format e.g. "2014-04-14", "-10 days"' . LF
'Imports all events since the given date.' . \chr(10)
. 'Valid PHP date format e.g. "2014-04-14", "-10 days"' . \chr(10)
. '(Note: use --since="-x days" syntax on the console)'
);
}
Expand Down
4 changes: 1 addition & 3 deletions Classes/Controller/AbstractCompatibilityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace HDNET\Calendarize\Controller;

use JetBrains\PhpStorm\NoReturn;
use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Extbase\Mvc\RequestInterface;

Expand Down Expand Up @@ -47,12 +46,11 @@ protected function callActionMethod(RequestInterface $request): ResponseInterfac
/**
* Send the content type header and the right file extension in front of the content.
*/
#[NoReturn]
protected function sendHeaderAndFilename(
ResponseInterface $response,
string $contentType,
string $fileExtension
): void {
): never {
$testMode = (bool)$this->settings['feed']['debugMode'];
if ($testMode) {
header('Content-Type: text/plain; charset=utf-8');
Expand Down
2 changes: 1 addition & 1 deletion Classes/EventListener/CalendarizeFieldListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ protected function getCalendarizeDatabaseString(): string
$sql[] = 'CREATE TABLE ' . $configuration['tableName'] . ' (' . $fieldName . ' tinytext);';
}

return implode(LF, $sql);
return implode(\chr(10), $sql);
}
}
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"require-dev": {
"typo3/testing-framework": "^8.0",
"typo3/cms-workspaces": "^12.4",
"squizlabs/php_codesniffer": "^2.6",
"friendsofphp/php-cs-fixer": "^3.0",
"phpmd/phpmd": "^2.4",
"scrutinizer/ocular": "^1.3",
Expand Down Expand Up @@ -84,9 +83,14 @@
"post-autoload-dump": [
"TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare"
],
"code": [
"@tool:php-cs-fixer",
"@tool:phpunit"
"code-fix": [
"@tool:php-cs-fixer"
],
"code-check": [
"@tool:php-cs-fixer-check",
"@tool:phpunit",
"@tool:phpstan",
"@tool:deptrac"
],
"tool:php-cs-fixer": [
"php-cs-fixer fix --config Resources/Private/Build/PhpCsFixer.php"
Expand All @@ -107,7 +111,7 @@
"docker run --rm --volume $PWD:/app --user $(id -u):$(id -g) ghcr.io/sabbelasichon/typo3-rector process --config=Resources/Private/Build/Rector.php"
],
"tool:phpstan": [
"phpstan analyse -c phpstan.neon"
"phpstan analyse -c phpstan.neon --memory-limit=1G"
],
"tool:deptrac": [
"deptrac"
Expand Down

0 comments on commit 15106ac

Please sign in to comment.