Skip to content

Commit 8a93b65

Browse files
authored
Merge pull request #6537 from paulbalandan/coding-standards
Update coding-standards version
2 parents 77c7a9d + ec0447b commit 8a93b65

File tree

7 files changed

+8
-199
lines changed

7 files changed

+8
-199
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -38,71 +38,7 @@
3838
__DIR__ . '/spark',
3939
]);
4040

41-
$overrides = [
42-
// <<<<<<<<<<<<<<<<<<<<<<<< @TODO TO BE REMOVED ONCE LIVE IN CODING-STANDARD
43-
'blank_line_between_import_groups' => true,
44-
'class_definition' => [
45-
'multi_line_extends_each_single_line' => true,
46-
'single_item_single_line' => true,
47-
'single_line' => true,
48-
'space_before_parenthesis' => true,
49-
'inline_constructor_arguments' => true,
50-
],
51-
'control_structure_braces' => true,
52-
'curly_braces_position' => [
53-
'control_structures_opening_brace' => 'same_line',
54-
'functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
55-
'anonymous_functions_opening_brace' => 'same_line',
56-
'classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
57-
'anonymous_classes_opening_brace' => 'same_line',
58-
'allow_single_line_empty_anonymous_classes' => true,
59-
'allow_single_line_anonymous_functions' => true,
60-
],
61-
'date_time_create_from_format_call' => false,
62-
'function_declaration' => [
63-
'closure_function_spacing' => 'one',
64-
'trailing_comma_single_line' => false,
65-
],
66-
'new_with_braces' => [
67-
'named_class' => true,
68-
'anonymous_class' => true,
69-
],
70-
'no_multiple_statements_per_line' => true,
71-
'no_trailing_comma_in_singleline' => [
72-
'elements' => [
73-
'arguments',
74-
'array_destructuring',
75-
'array',
76-
'group_import',
77-
],
78-
],
79-
'no_useless_nullsafe_operator' => true,
80-
'phpdoc_order' => [
81-
'order' => ['param', 'return', 'throws'],
82-
],
83-
'phpdoc_separation' => [
84-
'groups' => [
85-
['immutable', 'psalm-immutable'],
86-
['param', 'phpstan-param', 'psalm-param'],
87-
['phpstan-pure', 'psalm-pure'],
88-
['readonly', 'psalm-readonly'],
89-
['return', 'phpstan-return', 'psalm-return'],
90-
['template', 'phpstan-template', 'psalm-template'],
91-
['template-covariant', 'phpstan-template-covariant', 'psalm-template-covariant'],
92-
['phpstan-type', 'psalm-type'],
93-
['var', 'phpstan-var', 'psalm-var'],
94-
],
95-
],
96-
'single_import_per_statement' => ['group_to_single_imports' => true],
97-
'single_line_comment_spacing' => true,
98-
'statement_indentation' => true,
99-
'types_spaces' => [
100-
'space' => 'none',
101-
'space_multiple_catch' => 'none',
102-
],
103-
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
104-
// >>>>>>>>>>>>>>>>>>>>>>>>>
105-
];
41+
$overrides = [];
10642

10743
$options = [
10844
'cacheFile' => 'build/.php-cs-fixer.cache',

.php-cs-fixer.no-header.php

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -30,71 +30,7 @@
3030
__DIR__ . '/admin/starter/builds',
3131
]);
3232

33-
$overrides = [
34-
// <<<<<<<<<<<<<<<<<<<<<<<< @TODO TO BE REMOVED ONCE LIVE IN CODING-STANDARD
35-
'blank_line_between_import_groups' => true,
36-
'class_definition' => [
37-
'multi_line_extends_each_single_line' => true,
38-
'single_item_single_line' => true,
39-
'single_line' => true,
40-
'space_before_parenthesis' => true,
41-
'inline_constructor_arguments' => true,
42-
],
43-
'control_structure_braces' => true,
44-
'curly_braces_position' => [
45-
'control_structures_opening_brace' => 'same_line',
46-
'functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
47-
'anonymous_functions_opening_brace' => 'same_line',
48-
'classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
49-
'anonymous_classes_opening_brace' => 'same_line',
50-
'allow_single_line_empty_anonymous_classes' => true,
51-
'allow_single_line_anonymous_functions' => true,
52-
],
53-
'date_time_create_from_format_call' => false,
54-
'function_declaration' => [
55-
'closure_function_spacing' => 'one',
56-
'trailing_comma_single_line' => false,
57-
],
58-
'new_with_braces' => [
59-
'named_class' => true,
60-
'anonymous_class' => true,
61-
],
62-
'no_multiple_statements_per_line' => true,
63-
'no_trailing_comma_in_singleline' => [
64-
'elements' => [
65-
'arguments',
66-
'array_destructuring',
67-
'array',
68-
'group_import',
69-
],
70-
],
71-
'no_useless_nullsafe_operator' => true,
72-
'phpdoc_order' => [
73-
'order' => ['param', 'return', 'throws'],
74-
],
75-
'phpdoc_separation' => [
76-
'groups' => [
77-
['immutable', 'psalm-immutable'],
78-
['param', 'phpstan-param', 'psalm-param'],
79-
['phpstan-pure', 'psalm-pure'],
80-
['readonly', 'psalm-readonly'],
81-
['return', 'phpstan-return', 'psalm-return'],
82-
['template', 'phpstan-template', 'psalm-template'],
83-
['template-covariant', 'phpstan-template-covariant', 'psalm-template-covariant'],
84-
['phpstan-type', 'psalm-type'],
85-
['var', 'phpstan-var', 'psalm-var'],
86-
],
87-
],
88-
'single_import_per_statement' => ['group_to_single_imports' => true],
89-
'single_line_comment_spacing' => true,
90-
'statement_indentation' => true,
91-
'types_spaces' => [
92-
'space' => 'none',
93-
'space_multiple_catch' => 'none',
94-
],
95-
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
96-
// >>>>>>>>>>>>>>>>>>>>>>>>>
97-
];
33+
$overrides = [];
9834

9935
$options = [
10036
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',

.php-cs-fixer.user-guide.php

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -33,69 +33,6 @@
3333
'php_unit_internal_class' => false,
3434
'no_unused_imports' => false,
3535
'class_attributes_separation' => false,
36-
// <<<<<<<<<<<<<<<<<<<<<<<< @TODO TO BE REMOVED ONCE LIVE IN CODING-STANDARD
37-
'blank_line_between_import_groups' => true,
38-
'class_definition' => [
39-
'multi_line_extends_each_single_line' => true,
40-
'single_item_single_line' => true,
41-
'single_line' => true,
42-
'space_before_parenthesis' => true,
43-
'inline_constructor_arguments' => true,
44-
],
45-
'control_structure_braces' => true,
46-
'curly_braces_position' => [
47-
'control_structures_opening_brace' => 'same_line',
48-
'functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
49-
'anonymous_functions_opening_brace' => 'same_line',
50-
'classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
51-
'anonymous_classes_opening_brace' => 'same_line',
52-
'allow_single_line_empty_anonymous_classes' => true,
53-
'allow_single_line_anonymous_functions' => true,
54-
],
55-
'date_time_create_from_format_call' => false,
56-
'function_declaration' => [
57-
'closure_function_spacing' => 'one',
58-
'trailing_comma_single_line' => false,
59-
],
60-
'new_with_braces' => [
61-
'named_class' => true,
62-
'anonymous_class' => true,
63-
],
64-
'no_multiple_statements_per_line' => true,
65-
'no_trailing_comma_in_singleline' => [
66-
'elements' => [
67-
'arguments',
68-
'array_destructuring',
69-
'array',
70-
'group_import',
71-
],
72-
],
73-
'no_useless_nullsafe_operator' => true,
74-
'phpdoc_order' => [
75-
'order' => ['param', 'return', 'throws'],
76-
],
77-
'phpdoc_separation' => [
78-
'groups' => [
79-
['immutable', 'psalm-immutable'],
80-
['param', 'phpstan-param', 'psalm-param'],
81-
['phpstan-pure', 'psalm-pure'],
82-
['readonly', 'psalm-readonly'],
83-
['return', 'phpstan-return', 'psalm-return'],
84-
['template', 'phpstan-template', 'psalm-template'],
85-
['template-covariant', 'phpstan-template-covariant', 'psalm-template-covariant'],
86-
['phpstan-type', 'psalm-type'],
87-
['var', 'phpstan-var', 'psalm-var'],
88-
],
89-
],
90-
'single_import_per_statement' => ['group_to_single_imports' => true],
91-
'single_line_comment_spacing' => true,
92-
'statement_indentation' => true,
93-
'types_spaces' => [
94-
'space' => 'none',
95-
'space_multiple_catch' => 'none',
96-
],
97-
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
98-
// >>>>>>>>>>>>>>>>>>>>>>>>>
9936
];
10037

10138
$options = [

admin/framework/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"psr/log": "^1.1"
1616
},
1717
"require-dev": {
18-
"codeigniter/coding-standard": "^1.1",
18+
"codeigniter/coding-standard": "^1.5",
1919
"fakerphp/faker": "^1.9",
2020
"friendsofphp/php-cs-fixer": "~3.11.0",
2121
"mikey179/vfsstream": "^1.6",
22-
"nexusphp/cs-config": "^3.3",
22+
"nexusphp/cs-config": "^3.6",
2323
"phpunit/phpunit": "^9.1",
2424
"predis/predis": "^1.1 || ^2.0"
2525
},

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
"psr/log": "^1.1"
1616
},
1717
"require-dev": {
18-
"codeigniter/coding-standard": "^1.1",
18+
"codeigniter/coding-standard": "^1.5",
1919
"fakerphp/faker": "^1.9",
2020
"friendsofphp/php-cs-fixer": "~3.11.0",
2121
"mikey179/vfsstream": "^1.6",
22-
"nexusphp/cs-config": "^3.3",
22+
"nexusphp/cs-config": "^3.6",
2323
"nexusphp/tachycardia": "^1.0",
2424
"phpstan/phpstan": "^1.7.1",
2525
"phpunit/phpunit": "^9.1",

user_guide_src/source/database/results/013.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function lastLogin($format)
1616
public function __set($name, $value)
1717
{
1818
if ($name === 'lastLogin') {
19-
$this->lastLogin = DateTime::createFromFormat('U', $value);
19+
$this->lastLogin = DateTime::createFromFormat('!U', $value);
2020
}
2121
}
2222

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
22

33
$response->setLastModified(date('D, d M Y H:i:s'));
4-
$response->setLastModified(DateTime::createFromFormat('U', $timestamp));
4+
$response->setLastModified(DateTime::createFromFormat('!U', $timestamp));

0 commit comments

Comments
 (0)