Skip to content

Commit

Permalink
Aktualisiere PHP-CS-Fixer auf v3.62.0 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude authored Aug 26, 2024
1 parent 8c8f5bb commit 69bd32b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fix-cs-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Run PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:3.11.0
uses: docker://ghcr.io/webfactory/php-cs-fixer:3.62.0

- name: Commit and push back changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/GuideController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final class GuideController
/**
* @param Twig_Environment|Environment $twig
*/
public function __construct(array $shortcodeTags, $twig, FormFactoryInterface $formFactory = null)
public function __construct(array $shortcodeTags, $twig, ?FormFactoryInterface $formFactory = null)
{
$this->shortcodeTags = array_combine(array_map(function (array $definition): string { return $definition['shortcode']; }, $shortcodeTags), $shortcodeTags);
$this->twig = $twig;
Expand Down
7 changes: 3 additions & 4 deletions src/Handler/EmbeddedShortcodeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ class EmbeddedShortcodeHandler
private $requestStack;

/**
* @param string $controllerName
* @param string $renderer
* @param LoggerInterface $logger
* @param string $controllerName
* @param string $renderer
*/
public function __construct(
FragmentHandler $fragmentHandler,
$controllerName,
$renderer,
RequestStack $requestStack,
LoggerInterface $logger = null
?LoggerInterface $logger = null
) {
$this->fragmentHandler = $fragmentHandler;
$this->controllerName = $controllerName;
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Controller/ShortcodeTestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class ShortcodeTestController
{
public function test(string $foo = null): Response
public function test(?string $foo = null): Response
{
return new Response('test'.($foo ? ' foo='.$foo : ''));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/EmbeddedShortcodeHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function provideEsiShortcodes(): Generator
yield 'ESI-based shortcode defined in service configuration' => ['test-service-esi'];
}

private function processShortcodes(string $content, Request $request = null): string
private function processShortcodes(string $content, ?Request $request = null): string
{
self::bootKernel();

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/EndToEndTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function provideEsiShortcodes(): Generator
yield 'ESI-based shortcode defined in service configuration' => ['test-service-esi'];
}

private function renderTwig(string $templateCode, array $context = [], Request $request = null): string
private function renderTwig(string $templateCode, array $context = [], ?Request $request = null): string
{
self::bootKernel();
$container = static::getContainer();
Expand Down

0 comments on commit 69bd32b

Please sign in to comment.