Skip to content

Commit d486868

Browse files
committed
[PHP CS Fixer] Update the config
1 parent 5faac33 commit d486868

File tree

9 files changed

+24
-22
lines changed

9 files changed

+24
-22
lines changed

.php-cs-fixer.dist.php

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
$fileHeaderComment = <<<COMMENT
413
This file is part of the Symfony package.
514
@@ -9,35 +18,20 @@
918
file that was distributed with this source code.
1019
COMMENT;
1120

12-
$finder = PhpCsFixer\Finder::create()
13-
->in(__DIR__)
14-
->exclude('config')
15-
->exclude('var')
16-
->exclude('public/bundles')
17-
->exclude('public/build')
18-
// exclude files generated by Symfony Flex recipes
19-
->notPath('public/index.php')
20-
->notPath('importmap.php')
21-
;
22-
2321
return (new PhpCsFixer\Config())
22+
->setFinder(
23+
PhpCsFixer\Finder::create()->in(['src', 'tests'])->append([__FILE__])
24+
)
2425
->setRiskyAllowed(true)
2526
->setRules([
2627
'@Symfony' => true,
2728
'@Symfony:risky' => true,
2829
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
29-
'linebreak_after_opening_tag' => true,
30-
'mb_str_functions' => true,
31-
'no_php4_constructor' => true,
32-
'no_unreachable_default_argument_value' => true,
3330
'no_useless_else' => true,
3431
'no_useless_return' => true,
3532
'php_unit_strict' => true,
36-
'phpdoc_order' => true,
3733
'strict_comparison' => true,
3834
'strict_param' => true,
39-
'blank_line_between_import_groups' => false,
4035
])
41-
->setFinder($finder)
4236
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
4337
;

src/Command/AddUserCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use Symfony\Component\Console\Style\SymfonyStyle;
2626
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
2727
use Symfony\Component\Stopwatch\Stopwatch;
28+
2829
use function Symfony\Component\String\u;
2930

3031
/**

src/DataFixtures/AppFixtures.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
2121
use Symfony\Component\String\AbstractUnicodeString;
2222
use Symfony\Component\String\Slugger\SluggerInterface;
23+
2324
use function Symfony\Component\String\u;
2425

2526
final class AppFixtures extends Fixture
@@ -127,9 +128,9 @@ private function getTagData(): array
127128
}
128129

129130
/**
130-
* @throws \Exception
131-
*
132131
* @return array<int, array{0: string, 1: AbstractUnicodeString, 2: string, 3: string, 4: \DateTimeImmutable, 5: User, 6: array<Tag>}>
132+
*
133+
* @throws \Exception
133134
*/
134135
private function getPostData(): array
135136
{
@@ -245,9 +246,9 @@ private function getPostContent(): string
245246
}
246247

247248
/**
248-
* @throws \Exception
249-
*
250249
* @return array<Tag>
250+
*
251+
* @throws \Exception
251252
*/
252253
private function getRandomTags(): array
253254
{

src/Entity/Comment.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Doctrine\DBAL\Types\Types;
1515
use Doctrine\ORM\Mapping as ORM;
1616
use Symfony\Component\Validator\Constraints as Assert;
17+
1718
use function Symfony\Component\String\u;
1819

1920
/**

src/EventSubscriber/RedirectToPreferredLocaleSubscriber.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\HttpKernel\Event\RequestEvent;
1717
use Symfony\Component\HttpKernel\KernelEvents;
1818
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
19+
1920
use function Symfony\Component\String\u;
2021

2122
/**

src/Form/DataTransformer/TagArrayToStringTransformer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use App\Entity\Tag;
1515
use App\Repository\TagRepository;
1616
use Symfony\Component\Form\DataTransformerInterface;
17+
1718
use function Symfony\Component\String\u;
1819

1920
/**

src/Repository/PostRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use App\Pagination\Paginator;
1717
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
1818
use Doctrine\Persistence\ManagerRegistry;
19+
1920
use function Symfony\Component\String\u;
2021

2122
/**

src/Twig/SourceCodeExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Twig\Extension\AbstractExtension;
1818
use Twig\TemplateWrapper;
1919
use Twig\TwigFunction;
20+
2021
use function Symfony\Component\String\u;
2122

2223
/**

src/Utils/Validator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace App\Utils;
1313

1414
use Symfony\Component\Console\Exception\InvalidArgumentException;
15+
1516
use function Symfony\Component\String\u;
1617

1718
/**

0 commit comments

Comments
 (0)