Skip to content

Commit a96f5e1

Browse files
author
Martin Guth
committed
fixup! Upgrade everything to its newest version, use PSR-12
1 parent dabd834 commit a96f5e1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"phpstan/extension-installer": "^1.1",
2525
"phpstan/phpstan": "^1.3.0",
2626
"phpstan/phpstan-phpunit": "^1.0.0",
27-
"phpunit/phpunit": "^9.5.2"
27+
"phpunit/phpunit": "^9.6.19"
2828
},
2929
"prefer-stable": true,
3030
"autoload": {

ecs.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
use PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer;
4444
use PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer;
4545
use PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer;
46+
use PhpCsFixer\Fixer\Basic\BracesFixer;
4647
use PhpCsFixer\Fixer\Basic\NoTrailingCommaInSinglelineFixer;
4748
use PhpCsFixer\Fixer\Basic\PsrAutoloadingFixer;
4849
use PhpCsFixer\Fixer\Casing\MagicMethodCasingFixer;
@@ -458,6 +459,9 @@
458459
->withConfiguredRule(OperatorSpacingSniff::class, ['ignoreNewlines' => true])
459460
// PHP arrays should be declared using the configured syntax
460461
->withConfiguredRule(ArraySyntaxFixer::class, ['syntax' => 'short'])
462+
// The body of each structure MUST be enclosed by braces. Braces should be properly placed
463+
// @TODO move configuration to BracesPositionFixer after BracesFixer is not included in PSR-12 check anymore
464+
->withConfiguredRule(BracesFixer::class, ['allow_single_line_closure' => true, 'allow_single_line_anonymous_class_with_empty_body' => true])
461465
// Class, trait and interface elements must be separated with one or none blank line
462466
->withConfiguredRule(ClassAttributesSeparationFixer::class, ['elements' => ['method' => 'one']])
463467
// Visibility MUST be declared on all properties, methods and class constants

0 commit comments

Comments
 (0)