Skip to content

Commit

Permalink
Use beste/php-cs-fixer-config:^3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed Jul 26, 2024
1 parent 2e5f256 commit 7acdf26
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
22 changes: 6 additions & 16 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

declare(strict_types=1);

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

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PER-CS2.0' => true,
'no_unused_imports' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
])
->setFinder($finder);
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php81());

$config->getFinder()->in(__DIR__);

return $config;
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"require-dev": {
"beste/clock": "^3.0",
"beste/php-cs-fixer-config": "^3.1",
"friendsofphp/php-cs-fixer": "^3.60.0",
"phpstan/extension-installer": "^1.4.1",
"phpstan/phpstan": "^1.11.8",
Expand Down
2 changes: 1 addition & 1 deletion src/InMemoryCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class InMemoryCache implements CacheItemPoolInterface
private array $deferredItems;

public function __construct(
ClockInterface $clock = null
ClockInterface $clock = null,
) {
$this->clock = $clock ?? new class () implements ClockInterface {
public function now(): DateTimeImmutable
Expand Down
3 changes: 3 additions & 0 deletions tests/CacheKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use PHPUnit\Framework\TestCase;
use Psr\Cache\InvalidArgumentException;

/**
* @internal
*/
class CacheKeyTest extends TestCase
{
#[DataProvider('validValues')]
Expand Down

0 comments on commit 7acdf26

Please sign in to comment.