Skip to content

Commit 7acdf26

Browse files
committed
Use beste/php-cs-fixer-config:^3.1
1 parent 2e5f256 commit 7acdf26

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,10 @@
22

33
declare(strict_types=1);
44

5-
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
5+
use Beste\PhpCsFixer\Config;
66

7-
return (new PhpCsFixer\Config())
8-
->setRiskyAllowed(true)
9-
->setRules([
10-
'@PER-CS2.0' => true,
11-
'no_unused_imports' => true,
12-
'ordered_imports' => [
13-
'imports_order' => [
14-
'class',
15-
'function',
16-
'const',
17-
],
18-
'sort_algorithm' => 'alpha',
19-
],
20-
])
21-
->setFinder($finder);
7+
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php81());
8+
9+
$config->getFinder()->in(__DIR__);
10+
11+
return $config;

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"require-dev": {
1919
"beste/clock": "^3.0",
20+
"beste/php-cs-fixer-config": "^3.1",
2021
"friendsofphp/php-cs-fixer": "^3.60.0",
2122
"phpstan/extension-installer": "^1.4.1",
2223
"phpstan/phpstan": "^1.11.8",

src/InMemoryCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class InMemoryCache implements CacheItemPoolInterface
1717
private array $deferredItems;
1818

1919
public function __construct(
20-
ClockInterface $clock = null
20+
ClockInterface $clock = null,
2121
) {
2222
$this->clock = $clock ?? new class () implements ClockInterface {
2323
public function now(): DateTimeImmutable

tests/CacheKeyTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use PHPUnit\Framework\TestCase;
99
use Psr\Cache\InvalidArgumentException;
1010

11+
/**
12+
* @internal
13+
*/
1114
class CacheKeyTest extends TestCase
1215
{
1316
#[DataProvider('validValues')]

0 commit comments

Comments
 (0)