Skip to content

Commit

Permalink
Remove default fixers (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingimmick authored Dec 31, 2021
1 parent 3c1f390 commit d84af88
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
],
"config": {
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require": {
"php": "^7.2 || ^8.0",
Expand Down
15 changes: 0 additions & 15 deletions config/set/php-cs-fixer-custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

declare(strict_types=1);

use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer;
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
use PhpCsFixer\Fixer\Operator\IncrementStyleFixer;
Expand All @@ -23,12 +21,6 @@
$containerConfigurator->import(PhpCsFixerSetList::PHP_CS_FIXER);

$services = $containerConfigurator->services();
$services->set(ArraySyntaxFixer::class)
->call('configure', [
[
'syntax' => 'short',
],
]);
$services->set(ClassAttributesSeparationFixer::class);
$services->set(ConcatSpaceFixer::class)
->call('configure', [
Expand Down Expand Up @@ -84,11 +76,4 @@
],
]);
$services->set(SimplifiedNullReturnFixer::class);

$services->set(VisibilityRequiredFixer::class)
->call('configure', [
[
'elements' => ['property', 'method', 'const'],
],
]);
};
2 changes: 0 additions & 2 deletions config/set/slevomat-coding-standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff;
use SlevomatCodingStandard\Sniffs\Exceptions\ReferenceThrowableOnlySniff;
use SlevomatCodingStandard\Sniffs\Functions\UnusedInheritedVariablePassedToClosureSniff;
use SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff;
use SlevomatCodingStandard\Sniffs\Functions\UselessParameterDefaultValueSniff;
use SlevomatCodingStandard\Sniffs\Namespaces\FullyQualifiedClassNameInAnnotationSniff;
use SlevomatCodingStandard\Sniffs\Namespaces\NamespaceDeclarationSniff;
Expand All @@ -56,7 +55,6 @@
use SlevomatCodingStandard\Sniffs\TypeHints\LongTypeHintsSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\NullableTypeForNullDefaultValueSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\NullTypeHintOnLastPositionSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSpacingSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff;
use SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff;
Expand Down
2 changes: 1 addition & 1 deletion correct/TestClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class TestClass implements TestableContract
private const A = 1;

/**
* @var array<string, bool>
* @var array<string, true>
*/
public static $config = [
// test
Expand Down
4 changes: 2 additions & 2 deletions src/LaravelSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
final class LaravelSet extends AbstractRuleSetDescription
{
/**
* @var mixed[]|mixed
* @var mixed[]
*/
private $rules;
private $rules = [];

/**
* @param mixed[] $rules
Expand Down

0 comments on commit d84af88

Please sign in to comment.