Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove overrides for coding-standard v1.7.12 #8386

Merged
merged 2 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 1 addition & 50 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,56 +43,7 @@
__DIR__ . '/spark',
]);

$overrides = [
'php_unit_data_provider_name' => [
'prefix' => 'provide',
'suffix' => '',
],
'php_unit_data_provider_static' => true,
'php_unit_data_provider_return_type' => true,
'no_extra_blank_lines' => [
'tokens' => [
'attribute',
'break',
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'switch',
'throw',
'use',
],
],
'fully_qualified_strict_types' => [
'import_symbols' => false,
'leading_backslash_in_global_namespace' => false,
'phpdoc_tags' => [
'param',
'phpstan-param',
'phpstan-property',
'phpstan-property-read',
'phpstan-property-write',
'phpstan-return',
'phpstan-var',
'property',
'property-read',
'property-write',
'psalm-param',
'psalm-property',
'psalm-property-read',
'psalm-property-write',
'psalm-return',
'psalm-var',
'return',
'throws',
'var',
],
],
];
$overrides = [];

$options = [
'cacheFile' => 'build/.php-cs-fixer.cache',
Expand Down
26 changes: 1 addition & 25 deletions .php-cs-fixer.no-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,7 @@
__DIR__ . '/admin/starter/builds',
]);

$overrides = [
'php_unit_data_provider_name' => [
'prefix' => 'provide',
'suffix' => '',
],
'php_unit_data_provider_static' => true,
'php_unit_data_provider_return_type' => true,
'no_extra_blank_lines' => [
'tokens' => [
'attribute',
'break',
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'switch',
'throw',
'use',
],
],
];
$overrides = [];

$options = [
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',
Expand Down
31 changes: 4 additions & 27 deletions .php-cs-fixer.user-guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,10 @@
]);

$overrides = [
'echo_tag_syntax' => false,
'php_unit_internal_class' => false,
'no_unused_imports' => false,
'class_attributes_separation' => false,
'php_unit_data_provider_return_type' => true,
'no_extra_blank_lines' => [
'tokens' => [
'attribute',
'break',
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'switch',
'throw',
'use',
],
],
'php_unit_data_provider_static' => true,
'php_unit_data_provider_name' => [
'prefix' => 'provide',
'suffix' => '',
],
'echo_tag_syntax' => false,
'php_unit_internal_class' => false,
'no_unused_imports' => false,
'class_attributes_separation' => false,
];

$options = [
Expand Down
2 changes: 1 addition & 1 deletion admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"psr/log": "^1.1"
},
"require-dev": {
"codeigniter/coding-standard": "^1.5",
"codeigniter/coding-standard": "^1.7",
"fakerphp/faker": "^1.9",
"friendsofphp/php-cs-fixer": "^3.43",
"kint-php/kint": "^5.0.4",
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"psr/log": "^1.1"
},
"require-dev": {
"codeigniter/coding-standard": "^1.5",
"codeigniter/coding-standard": "^1.7",
"codeigniter/phpstan-codeigniter": "^1.4",
"ergebnis/composer-normalize": "^2.28",
"fakerphp/faker": "^1.9",
Expand Down
6 changes: 3 additions & 3 deletions tests/system/AutoReview/FrameworkCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ public function testEachTestClassHasCorrectGroupAnnotation(string $class): void
));
}

public function provideEachTestClassHasCorrectGroupAnnotation(): iterable
public static function provideEachTestClassHasCorrectGroupAnnotation(): iterable
{
foreach ($this->getTestClasses() as $class) {
foreach (self::getTestClasses() as $class) {
yield $class => [$class];
}
}

private function getTestClasses(): array
private static function getTestClasses(): array
{
if (self::$testClasses !== []) {
return self::$testClasses;
Expand Down
6 changes: 3 additions & 3 deletions tests/system/HTTP/SiteURITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public function testConstructor(
$this->assertSame($expectedTotalSegments, $uri->getTotalSegments());
}

public function provideConstructor(): iterable
public static function provideConstructor(): iterable
{
return array_merge($this->provideSetPath(), $this->provideRelativePathWithQueryOrFragment());
return array_merge(self::provideSetPath(), self::provideRelativePathWithQueryOrFragment());
}

public static function provideSetPath(): iterable
Expand Down Expand Up @@ -214,7 +214,7 @@ public static function provideSetPath(): iterable
];
}

public function provideRelativePathWithQueryOrFragment()
public static function provideRelativePathWithQueryOrFragment(): iterable
{
return [
'one/two?foo=1&bar=2' => [
Expand Down
Loading
Loading