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 08bfa91 commit 4d60e75
Show file tree
Hide file tree
Showing 29 changed files with 54 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/phpci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
-
Expand Down Expand Up @@ -73,6 +74,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

steps:
-
Expand Down Expand Up @@ -121,10 +123,18 @@ 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"
- typo3-version: "^12.4"
php-version: "8.1"
- typo3-version: "^12.4"
php-version: "8.2"
- typo3-version: "^12.4"
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/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
8 changes: 4 additions & 4 deletions Tests/Unit/Middleware/AuthResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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 Down Expand Up @@ -109,7 +109,7 @@ public function testProcessIfAuthDataInServerVariable()
$body = new Stream($fp);

$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 Down Expand Up @@ -144,7 +144,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 @@ -173,7 +173,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
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"@test:phpcompatibility:7.4",
"@test:phpcompatibility:8.0",
"@test:phpcompatibility:8.1",
"@test:phpcompatibility:8.2"
"@test:phpcompatibility:8.2",
"@test:phpcompatibility:8.3"
],
"test:phpcompatibility:7.4": [
"[ -e .Build/bin/phpcs ] || composer update",
Expand All @@ -102,6 +103,10 @@
"[ -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:phpstan": [
"[ -e .Build/bin/phpstan ] || composer update --ansi",
".Build/bin/phpstan analyse -c phpstan.neon --memory-limit=512M --ansi"
Expand Down

0 comments on commit 4d60e75

Please sign in to comment.