Skip to content

Commit 3f6fe79

Browse files
authored
chore: replace stylecy with php-cs-fixer (#626)
1 parent 9afe5ec commit 3f6fe79

29 files changed

+72
-98
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.gitattributes export-ignore
22
.gitignore export-ignore
33
.scrutinizer.yml export-ignore
4-
.styleci.yml export-ignore
54
.travis.yml export-ignore
65
phpunit.xml.dist export-ignore
76
Resources/doc export-ignore

.github/workflows/static.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,16 @@ jobs:
3737
uses: docker://oskarstark/phpstan-ga
3838
with:
3939
args: analyze --no-progress -c phpstan.tests.neon.dist
40+
41+
php-cs-fixer:
42+
name: PHP-CS-Fixer
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v4
48+
49+
- name: PHP-CS-Fixer
50+
uses: docker://oskarstark/php-cs-fixer-ga
51+
with:
52+
args: --dry-run --diff

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ vendor/
33
composer.lock
44
phpunit.xml
55
Resources/doc/_build
6+
.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__.'/src')
5+
->in(__DIR__.'/tests')
6+
->name('*.php')
7+
;
8+
9+
$config = new PhpCsFixer\Config();
10+
11+
return $config
12+
->setRiskyAllowed(true)
13+
->setRules([
14+
'@Symfony' => true,
15+
'single_line_throw' => false,
16+
])
17+
->setFinder($finder)
18+
;

.styleci.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@
5959
"phpstan/phpstan": "^1.10",
6060
"phpstan/phpstan-symfony": "^1.3",
6161
"phpstan/extension-installer": "^1.3",
62-
"jean-beru/fos-http-cache-cloudfront": "^1.1"
62+
"jean-beru/fos-http-cache-cloudfront": "^1.1",
63+
"friendsofphp/php-cs-fixer": "^3.54"
6364
},
6465
"suggest": {
6566
"jean-beru/fos-http-cache-cloudfront": "To use CloudFront proxy",
@@ -90,4 +91,4 @@
9091
"phpstan/extension-installer": true
9192
}
9293
}
93-
}
94+
}

src/DependencyInjection/Compiler/HashGeneratorPass.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ final class HashGeneratorPass implements CompilerPassInterface
2323
{
2424
public const TAG_NAME = 'fos_http_cache.user_context_provider';
2525

26-
/**
27-
* {@inheritdoc}
28-
*/
2926
public function process(ContainerBuilder $container): void
3027
{
3128
if (!$container->has('fos_http_cache.user_context.hash_generator')) {

src/DependencyInjection/Compiler/LoggerPass.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
final class LoggerPass implements CompilerPassInterface
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function process(ContainerBuilder $container): void
2623
{
2724
if (!$container->has('logger') || !$container->has('fos_http_cache.event_listener.log')) {

src/DependencyInjection/Compiler/SessionListenerPass.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
*/
2323
final class SessionListenerPass implements CompilerPassInterface
2424
{
25-
/**
26-
* {@inheritdoc}
27-
*/
2825
public function process(ContainerBuilder $container): void
2926
{
3027
if ($container->has('session_listener')) {

src/DependencyInjection/Configuration.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public function __construct($debug)
4848
$this->debug = $debug;
4949
}
5050

51-
/**
52-
* {@inheritdoc}
53-
*/
5451
public function getConfigTreeBuilder(): TreeBuilder
5552
{
5653
$treeBuilder = new TreeBuilder('fos_http_cache');

0 commit comments

Comments
 (0)