Skip to content

Commit

Permalink
Cleanup fix cs and qs
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Nov 25, 2024
1 parent bc6526f commit 282bdde
Show file tree
Hide file tree
Showing 30 changed files with 66 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/phpci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
-
Expand Down Expand Up @@ -68,6 +71,9 @@ jobs:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
-
Expand Down Expand Up @@ -118,6 +124,12 @@ jobs:
php-version: "7.4"
- typo3-version: "^11.5"
php-version: "8.0"
- typo3-version: "^11.5"
php-version: "8.1"
- typo3-version: "^11.5"
php-version: "8.2"
- typo3-version: "^11.5"
php-version: "8.3"

steps:
-
Expand Down
9 changes: 9 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@
'@Symfony' => true,
'phpdoc_align' => false,
'no_superfluous_phpdoc_tags' => false,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
// no support for "arguments" and "parameters" as we need support for PHP 7.4
'elements' => [
'array_destructuring',
'arrays',
'match',
],
],
])
->setLineEnding("\n");
1 change: 1 addition & 0 deletions Classes/Controller/AbstractController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Controller/InterfaceController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Controller/Json.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Model/Provider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/***************************************************************
* Copyright notice
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Model/ProviderHolder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Model/Supplier.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Provider/InterfaceProvider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Repository/Provider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Router/InterfaceRouter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Router/Respect.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Auth/FeUser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Auth/InterfaceAuth.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Auth/Ip.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Exception.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/InterfaceRoute.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/InterfaceRouter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Log/MemTrack.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Log/TimeTrack.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/PhpError.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Routines/Through/Json.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Transformer/InterfaceTransformer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Transformer/Simple.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Utility/Composer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Utility/Config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
1 change: 1 addition & 0 deletions Classes/Utility/Factory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Copyright notice.
*
Expand Down
6 changes: 3 additions & 3 deletions Tests/Unit/Middleware/AuthResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testProcess()
$body->rewind();

$request = new ServerRequest('/t3rest/login', 'POST', $body);
$requestHandler = new class() implements RequestHandlerInterface {
$requestHandler = new class implements RequestHandlerInterface {
public function handle(ServerRequestInterface $request): ResponseInterface
{
return new JsonResponse(
Expand All @@ -85,7 +85,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
public function testNoProcessIfUriDoesNotMatch()
{
$request = new ServerRequest('/not/a/rest/api/endpoint', 'GET');
$requestHandler = new class() implements RequestHandlerInterface {
$requestHandler = new class implements RequestHandlerInterface {
public function handle(ServerRequestInterface $request): ResponseInterface
{
return new NullResponse();
Expand Down Expand Up @@ -114,7 +114,7 @@ public function testProcessIfRedirect()
$_SERVER['REDIRECT_HTTP_AUTHORIZATION'] = 'basic '.base64_encode('foo:pass:word');

$request = new ServerRequest('/t3rest/login', 'POST');
$requestHandler = new class() implements RequestHandlerInterface {
$requestHandler = new class implements RequestHandlerInterface {
public function handle(ServerRequestInterface $request): ResponseInterface
{
return new JsonResponse(
Expand Down
17 changes: 16 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@
],
"test:phpcompatibility": [
"@test:phpcompatibility:7.4",
"@test:phpcompatibility:8.0"
"@test:phpcompatibility:8.0",
"@test:phpcompatibility:8.1",
"@test:phpcompatibility:8.2",
"@test:phpcompatibility:8.3"
],
"test:phpcompatibility:7.4": [
"[ -e .Build/bin/phpcs ] || composer update",
Expand All @@ -93,6 +96,18 @@
"[ -e .Build/bin/phpcs ] || composer update",
".Build/bin/phpcs --ignore=.Build/*,./Resources/Private/PHP/Composer/respect/rest/tests/* -p . --standard=.Build/vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.0"
],
"test:phpcompatibility:8.1": [
"[ -e .Build/bin/phpcs ] || composer update",
".Build/bin/phpcs --ignore=.Build/*,./Resources/Private/PHP/Composer/respect/rest/tests/* -p . --standard=.Build/vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.1"
],
"test:phpcompatibility:8.2": [
"[ -e .Build/bin/phpcs ] || composer update",
".Build/bin/phpcs --ignore=.Build/*,./Resources/Private/PHP/Composer/respect/rest/tests/* -p . --standard=.Build/vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.2"
],
"test:phpcompatibility:8.3": [
"[ -e .Build/bin/phpcs ] || composer update",
".Build/bin/phpcs --ignore=.Build/*,./Resources/Private/PHP/Composer/respect/rest/tests/* -p . --standard=.Build/vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.3"
],
"test:phpunit": [
"[ -e .Build/bin/phpunit ] || composer update --ansi",
"export TYPO3_PATH_WEB=$PWD/.Build/Web && .Build/bin/phpunit -c phpunit.xml.dist --colors=always"
Expand Down

0 comments on commit 282bdde

Please sign in to comment.