Skip to content

Commit

Permalink
adjust phpcs config based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusstoerrle committed Oct 26, 2024
1 parent a8e18d7 commit 6039028
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
17 changes: 1 addition & 16 deletions webservice/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'], // part of PERCS2.0 included in sf
'no_null_property_initialization' => true, // part of Sf coding standard
'nullable_type_declaration_for_default_null_value' => true, // part of Sf coding standard
'phpdoc_order' => true, // part of Sf coding standard
'phpdoc_types_order' => [ // part of Sf coding standard
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'native_constant_invocation' => [
Expand All @@ -33,19 +25,12 @@
'comment_text' => 'Intentional: No break',
],
'non_printable_character' => false, // As of PHP 7, they can be masked in strings (Not included in @Symfony)
'protected_to_private' => false, // Not included in @Symfony
'phpdoc_no_empty_return' => false, // Not included in@Symfony
'ordered_class_elements' => false, // Not included in @Symfony
'ordered_imports' => [
'imports_order' => ['class', 'const', 'function'], // differs from @Symfony
],
'global_namespace_import' => [ // differs from Symfony Coding Standard
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'ordered_traits' => false, // Not included in @Symfony
'phpdoc_to_comment' => false, // differs from @Symfony
'phpdoc_to_comment' => false, // differs from @Symfony, needed for higher PHPStan / lower PSalm levels
'pow_to_exponentiation' => true,
'declare_strict_types' => true,
])
Expand Down
2 changes: 2 additions & 0 deletions webservice/config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Expand Down
2 changes: 2 additions & 0 deletions webservice/config/preload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}
2 changes: 2 additions & 0 deletions webservice/importmap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/**
* Returns the importmap for this application.
*
Expand Down
2 changes: 2 additions & 0 deletions webservice/public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use App\Kernel;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
Expand Down
2 changes: 2 additions & 0 deletions webservice/src/Kernel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App;

use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down
2 changes: 2 additions & 0 deletions webservice/tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Symfony\Component\Dotenv\Dotenv;

require dirname(__DIR__).'/vendor/autoload.php';
Expand Down

0 comments on commit 6039028

Please sign in to comment.