Skip to content

Commit 9912ebf

Browse files
authored
Updating php-cs-fixer to use PSR12 and latest version (#121)
1 parent 6340eba commit 9912ebf

File tree

4 files changed

+230
-366
lines changed

4 files changed

+230
-366
lines changed

.php-cs-fixer.dist.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
$mainFinder = PhpCsFixer\Finder::create()
4+
->in(
5+
[
6+
__DIR__ . '/bin',
7+
__DIR__ . '/src',
8+
__DIR__ . '/www',
9+
]
10+
);
11+
12+
$config = new PhpCsFixer\Config();
13+
return $config->setRules(
14+
[
15+
'@PSR12' => true,
16+
'array_syntax' => ['syntax' => 'short'],
17+
]
18+
)
19+
->setRiskyAllowed(true)
20+
->setFinder($mainFinder);

.php_cs

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

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "http://github.com/joomla/framework.joomla.org",
55
"license": "GPL-2.0-or-later",
66
"require": {
7-
"php": "^7.2",
7+
"php": "^7.4",
88
"ext-json": "*",
99
"ext-pdo": "*",
1010
"fig/link-util": "^1.1",
@@ -41,7 +41,7 @@
4141
"twig/twig": "^3.0"
4242
},
4343
"require-dev": {
44-
"friendsofphp/php-cs-fixer": "^2.16.4",
44+
"friendsofphp/php-cs-fixer": "^3.13.2",
4545
"squizlabs/php_codesniffer": "~3.0",
4646
"maximebf/debugbar": "^1.16.3"
4747
},
@@ -57,7 +57,7 @@
5757
},
5858
"config": {
5959
"platform": {
60-
"php": "7.2.21"
60+
"php": "7.4.0"
6161
}
6262
}
6363
}

0 commit comments

Comments
 (0)