Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 8e5ede5

Browse files
authored
Merge pull request #51 from PrisisForks/feature/normalize-composer
fix : normalized composer.json's
2 parents 81f89dd + e63cfc0 commit 8e5ede5

File tree

5 files changed

+22
-33
lines changed

5 files changed

+22
-33
lines changed

composer.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,19 @@
2828
},
2929
"require-dev": {
3030
"ext-json": "*",
31-
"phpunit/phpunit": "^8.5.2",
32-
"narrowspark/testing-helper": "^8.0.2"
31+
"narrowspark/testing-helper": "^8.0.2",
32+
"phpunit/phpunit": "^8.5.2"
3333
},
3434
"config": {
3535
"sort-packages": true
3636
},
37+
"extra": {
38+
"prefetcher": {
39+
"require": {
40+
"phpunit/phpunit": "^8.5"
41+
}
42+
}
43+
},
3744
"autoload": {
3845
"psr-4": {
3946
"Narrowspark\\CS\\Config\\": "src"
@@ -47,29 +54,22 @@
4754
"minimum-stability": "dev",
4855
"prefer-stable": true,
4956
"scripts": {
57+
"post-install-cmd": "composer --working-dir=./.build install",
58+
"post-update-cmd": "composer --working-dir=./.build update --lock",
5059
"coverage": [
5160
"phpunit --dump-xdebug-filter=./.build/phpunit/.xdebug-filter.php",
5261
"phpunit --prepend=./.build/phpunit/.xdebug-filter.php --coverage-html=./.build/phpunit/coverage"
5362
],
5463
"cs": "composer --working-dir=./.build cs -- -v",
5564
"cs:check": "composer --working-dir=./.build cs:check -- -v",
65+
"infection": "composer --working-dir=./.build infection -- --min-covered-msi=100 --min-msi=100",
5666
"phpstan": "composer --working-dir=./.build phpstan -- --memory-limit=-1",
5767
"psalm": "composer --working-dir=./.build psalm",
5868
"psalm:fix": "composer --working-dir=./.build psalm:fix",
59-
"infection": "composer --working-dir=./.build infection -- --min-covered-msi=100 --min-msi=100",
60-
"test": "phpunit",
61-
"post-install-cmd": "composer --working-dir=./.build install",
62-
"post-update-cmd": "composer --working-dir=./.build update --lock"
69+
"test": "phpunit"
6370
},
6471
"support": {
6572
"issues": "https://github.com/narrowspark/php-cs-fixer-config/issues",
6673
"source": "https://github.com/narrowspark/php-cs-fixer-config"
67-
},
68-
"extra": {
69-
"prefetcher": {
70-
"require": {
71-
"phpunit/phpunit": "^8.5"
72-
}
73-
}
7474
}
7575
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Config.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ final class Config extends CsConfig
7979
/**
8080
* Create new Config instance.
8181
*
82-
* @param null|string $header
8382
* @param array<string, array<string, mixed>|bool|string> $overwriteConfig
8483
*/
8584
public function __construct(?string $header = null, array $overwriteConfig = [])
@@ -307,7 +306,7 @@ public function getPhp73Rules(): array
307306
/**
308307
* @return ((bool|string|string[])[]|bool)[]
309308
*
310-
* @psalm-return array{@DoctrineAnnotation: true, align_multiline_comment: array{comment_type: string}, no_binary_string: true, no_unset_on_property: false, array_indentation: true, array_syntax: array{syntax: string}, logical_operators: true, pre_increment: false, backtick_to_shell_exec: true, blank_line_before_return: true, class_keyword_remove: false, combine_consecutive_issets: true, combine_consecutive_unsets: true, comment_to_phpdoc: false, compact_nullable_typehint: true, date_time_immutable: true, declare_strict_types: true, dir_constant: true, ereg_to_preg: true, escape_implicit_backslashes: true, explicit_indirect_variable: true, explicit_string_variable: true, ordered_class_elements: true, ordered_imports: array{importsOrder: array{0: string, 1: string, 2: string}}, final_class: true, final_internal_class: true, fully_qualified_strict_types: true, general_phpdoc_annotation_remove: false, hash_to_slash_comment: true, header_comment: false, linebreak_after_opening_tag: true, magic_constant_casing: true, mb_str_functions: false, method_argument_space: array{ensure_fully_multiline: true, keep_multiple_spaces_after_comma: false}, static_lambda: true, string_line_ending: true, method_chaining_indentation: true, modernize_types_casting: true, multiline_comment_opening_closing: true, multiline_whitespace_before_semicolons: array{strategy: string}, no_alternative_syntax: true, no_blank_lines_before_namespace: false, no_multiline_whitespace_before_semicolons: false, no_php4_constructor: false, no_short_echo_tag: true, no_useless_else: true, no_useless_return: true, no_superfluous_elseif: true, phpdoc_to_return_type: true, phpdoc_var_annotation_correct_order: true, no_superfluous_phpdoc_tags: false, not_operator_with_space: false, not_operator_with_successor_space: true, no_homoglyph_names: false, no_unset_cast: true, ordered_interfaces: true, phpdoc_add_missing_param_annotation: array{only_untyped: false}, phpdoc_order: true, phpdoc_types_order: array{null_adjustment: string, sort_algorithm: string}, protected_to_private: true, psr0: false, psr4: true, semicolon_after_instruction: true, simplified_null_return: false, strict_comparison: true, strict_param: true}
309+
* @psalm-return array{@DoctrineAnnotation: true, align_multiline_comment: array{comment_type: string}, no_binary_string: true, no_unset_on_property: false, array_indentation: true, array_syntax: array{syntax: string}, logical_operators: true, pre_increment: false, backtick_to_shell_exec: true, blank_line_before_return: true, class_keyword_remove: false, combine_consecutive_issets: true, combine_consecutive_unsets: true, comment_to_phpdoc: false, compact_nullable_typehint: true, date_time_immutable: true, declare_strict_types: true, dir_constant: true, ereg_to_preg: true, escape_implicit_backslashes: true, explicit_indirect_variable: true, explicit_string_variable: true, ordered_class_elements: true, ordered_imports: array{importsOrder: array{0: string, 1: string, 2: string}}, final_class: true, final_internal_class: true, fully_qualified_strict_types: true, general_phpdoc_annotation_remove: false, hash_to_slash_comment: true, header_comment: false, linebreak_after_opening_tag: true, magic_constant_casing: true, mb_str_functions: false, method_argument_space: array{ensure_fully_multiline: true, keep_multiple_spaces_after_comma: false}, static_lambda: true, string_line_ending: true, method_chaining_indentation: true, modernize_types_casting: true, multiline_comment_opening_closing: true, multiline_whitespace_before_semicolons: array{strategy: string}, no_alternative_syntax: true, no_blank_lines_before_namespace: false, no_multiline_whitespace_before_semicolons: false, no_php4_constructor: false, no_short_echo_tag: true, no_useless_else: true, no_useless_return: true, no_superfluous_elseif: true, phpdoc_to_return_type: true, phpdoc_var_annotation_correct_order: true, no_superfluous_phpdoc_tags: true, not_operator_with_space: false, not_operator_with_successor_space: true, no_homoglyph_names: false, no_unset_cast: true, ordered_interfaces: true, phpdoc_add_missing_param_annotation: array{only_untyped: true}, phpdoc_order: true, phpdoc_types_order: array{null_adjustment: string, sort_algorithm: string}, protected_to_private: true, psr0: false, psr4: true, semicolon_after_instruction: true, simplified_null_return: false, strict_comparison: true, strict_param: true}
311310
*/
312311
public function getContribRules(): array
313312
{
@@ -377,14 +376,14 @@ public function getContribRules(): array
377376
'no_superfluous_elseif' => true,
378377
'phpdoc_to_return_type' => true,
379378
'phpdoc_var_annotation_correct_order' => true,
380-
'no_superfluous_phpdoc_tags' => false,
379+
'no_superfluous_phpdoc_tags' => true,
381380
'not_operator_with_space' => false,
382381
'not_operator_with_successor_space' => true,
383382
'no_homoglyph_names' => false,
384383
'no_unset_cast' => true,
385384
'ordered_interfaces' => true,
386385
'phpdoc_add_missing_param_annotation' => [
387-
'only_untyped' => false,
386+
'only_untyped' => true,
388387
],
389388
'phpdoc_order' => true,
390389
'phpdoc_types_order' => [

tests/AutoReview/ComposerTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public function testBranchAlias(): void
5757
);
5858
}
5959

60-
/**
61-
* @param string $version
62-
*
63-
* @return string
64-
*/
6560
private function convertAppVersionToAliasedVersion(string $version): string
6661
{
6762
$parts = explode('.', $version, 3);

tests/Unit/ConfigTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,11 @@ public function testAllConfiguredRulesAreBuiltIn(): void
346346
/**
347347
* @dataProvider provideDoesNotHaveRulesEnabledCases
348348
*
349-
* @param string $fixer
350349
* @param array<int|string, string>|string $reason
351350
*
352351
* @throws \PHPUnit\Framework\ExpectationFailedException
353352
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
354353
* @throws Exception
355-
*
356-
* @return void
357354
*/
358355
public function testDoesNotHaveRulesEnabled(string $fixer, $reason): void
359356
{
@@ -427,8 +424,6 @@ public function testHeaderCommentFixerIsDisabledByDefault(): void
427424

428425
/**
429426
* @dataProvider provideHeaderCommentFixerIsEnabledIfHeaderIsProvidedCases
430-
*
431-
* @param string $header
432427
*/
433428
public function testHeaderCommentFixerIsEnabledIfHeaderIsProvided(string $header): void
434429
{
@@ -532,7 +527,7 @@ protected function getPhp73Rules(): array
532527
/**
533528
* @return ((bool|string|string[])[]|bool)[]
534529
*
535-
* @psalm-return array{@DoctrineAnnotation: true, align_multiline_comment: array{comment_type: string}, no_binary_string: true, no_unset_on_property: false, array_indentation: true, array_syntax: array{syntax: string}, logical_operators: true, pre_increment: false, backtick_to_shell_exec: true, blank_line_before_return: true, class_keyword_remove: false, combine_consecutive_issets: true, combine_consecutive_unsets: true, comment_to_phpdoc: false, compact_nullable_typehint: true, date_time_immutable: true, declare_strict_types: true, dir_constant: true, ereg_to_preg: true, escape_implicit_backslashes: true, explicit_indirect_variable: true, explicit_string_variable: true, ordered_class_elements: true, ordered_imports: array{importsOrder: array{0: string, 1: string, 2: string}}, final_class: true, final_internal_class: true, fully_qualified_strict_types: true, general_phpdoc_annotation_remove: false, hash_to_slash_comment: true, header_comment: false, linebreak_after_opening_tag: true, magic_constant_casing: true, mb_str_functions: false, method_argument_space: array{ensure_fully_multiline: true, keep_multiple_spaces_after_comma: false}, static_lambda: true, string_line_ending: true, method_chaining_indentation: true, modernize_types_casting: true, multiline_comment_opening_closing: true, multiline_whitespace_before_semicolons: array{strategy: string}, no_alternative_syntax: true, no_blank_lines_before_namespace: false, no_multiline_whitespace_before_semicolons: false, no_php4_constructor: false, no_short_echo_tag: true, no_useless_else: true, no_useless_return: true, no_superfluous_elseif: true, phpdoc_to_return_type: true, phpdoc_var_annotation_correct_order: true, no_superfluous_phpdoc_tags: false, not_operator_with_space: false, not_operator_with_successor_space: true, no_homoglyph_names: false, no_unset_cast: true, ordered_interfaces: true, phpdoc_add_missing_param_annotation: array{only_untyped: false}, phpdoc_order: true, phpdoc_types_order: array{null_adjustment: string, sort_algorithm: string}, protected_to_private: true, psr0: false, psr4: true, semicolon_after_instruction: true, simplified_null_return: false, strict_comparison: true, strict_param: true}
530+
* @psalm-return array{@DoctrineAnnotation: true, align_multiline_comment: array{comment_type: string}, no_binary_string: true, no_unset_on_property: false, array_indentation: true, array_syntax: array{syntax: string}, logical_operators: true, pre_increment: false, backtick_to_shell_exec: true, blank_line_before_return: true, class_keyword_remove: false, combine_consecutive_issets: true, combine_consecutive_unsets: true, comment_to_phpdoc: false, compact_nullable_typehint: true, date_time_immutable: true, declare_strict_types: true, dir_constant: true, ereg_to_preg: true, escape_implicit_backslashes: true, explicit_indirect_variable: true, explicit_string_variable: true, ordered_class_elements: true, ordered_imports: array{importsOrder: array{0: string, 1: string, 2: string}}, final_class: true, final_internal_class: true, fully_qualified_strict_types: true, general_phpdoc_annotation_remove: false, hash_to_slash_comment: true, header_comment: false, linebreak_after_opening_tag: true, magic_constant_casing: true, mb_str_functions: false, method_argument_space: array{ensure_fully_multiline: true, keep_multiple_spaces_after_comma: false}, static_lambda: true, string_line_ending: true, method_chaining_indentation: true, modernize_types_casting: true, multiline_comment_opening_closing: true, multiline_whitespace_before_semicolons: array{strategy: string}, no_alternative_syntax: true, no_blank_lines_before_namespace: false, no_multiline_whitespace_before_semicolons: false, no_php4_constructor: false, no_short_echo_tag: true, no_useless_else: true, no_useless_return: true, no_superfluous_elseif: true, phpdoc_to_return_type: true, phpdoc_var_annotation_correct_order: true, no_superfluous_phpdoc_tags: true, not_operator_with_space: false, not_operator_with_successor_space: true, no_homoglyph_names: false, no_unset_cast: true, ordered_interfaces: true, phpdoc_add_missing_param_annotation: array{only_untyped: true}, phpdoc_order: true, phpdoc_types_order: array{null_adjustment: string, sort_algorithm: string}, protected_to_private: true, psr0: false, psr4: true, semicolon_after_instruction: true, simplified_null_return: false, strict_comparison: true, strict_param: true}
536531
*/
537532
protected function getContribRules(): array
538533
{
@@ -602,14 +597,14 @@ protected function getContribRules(): array
602597
'no_superfluous_elseif' => true,
603598
'phpdoc_to_return_type' => true,
604599
'phpdoc_var_annotation_correct_order' => true,
605-
'no_superfluous_phpdoc_tags' => false,
600+
'no_superfluous_phpdoc_tags' => true,
606601
'not_operator_with_space' => false,
607602
'not_operator_with_successor_space' => true,
608603
'no_homoglyph_names' => false,
609604
'no_unset_cast' => true,
610605
'ordered_interfaces' => true,
611606
'phpdoc_add_missing_param_annotation' => [
612-
'only_untyped' => false,
607+
'only_untyped' => true,
613608
],
614609
'phpdoc_order' => true,
615610
'phpdoc_types_order' => [

0 commit comments

Comments
 (0)