Skip to content

Commit af163bb

Browse files
paulbalandanelement-code
authored andcommitted
Normalize var and return annotations (codeigniter4#4942)
1 parent c184612 commit af163bb

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

utils/PhpCsFixer/CodeIgniter4.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ public function __construct()
247247
'no_whitespace_in_blank_line' => true,
248248
'non_printable_character' => ['use_escape_sequences_in_strings' => true],
249249
'normalize_index_brace' => true,
250-
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
251250
'not_operator_with_space' => false,
252251
'not_operator_with_successor_space' => true,
252+
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
253253
'object_operator_without_whitespace' => true,
254254
'operator_linebreak' => ['only_booleans' => true, 'position' => 'beginning'],
255255
'ordered_class_elements' => false,
@@ -308,8 +308,9 @@ public function __construct()
308308
'var',
309309
],
310310
],
311-
'phpdoc_indent' => true,
312-
'phpdoc_inline_tag_normalizer' => [
311+
'phpdoc_annotation_without_dot' => false,
312+
'phpdoc_indent' => true,
313+
'phpdoc_inline_tag_normalizer' => [
313314
'tags' => [
314315
'example',
315316
'id',
@@ -358,6 +359,16 @@ public function __construct()
358359
'uses',
359360
],
360361
],
362+
'phpdoc_return_self_reference' => [
363+
'replacements' => [
364+
'this' => '$this',
365+
'@this' => '$this',
366+
'$self' => 'self',
367+
'@self' => 'self',
368+
'$static' => 'static',
369+
'@static' => 'static',
370+
],
371+
],
361372
'phpdoc_scalar' => [
362373
'types' => [
363374
'boolean',
@@ -369,6 +380,8 @@ public function __construct()
369380
],
370381
],
371382
'phpdoc_separation' => true,
383+
'phpdoc_single_line_var_spacing' => true,
384+
'phpdoc_summary' => false,
372385
'phpdoc_trim' => true,
373386
'phpdoc_trim_consecutive_blank_line_separation' => true,
374387
'phpdoc_types' => ['groups' => ['simple', 'alias', 'meta']],
@@ -404,7 +417,7 @@ public function __construct()
404417
'single_class_element_per_statement' => ['elements' => ['const', 'property']],
405418
'single_import_per_statement' => true,
406419
'single_line_after_imports' => true,
407-
'single_line_comment_style' => true,
420+
'single_line_comment_style' => ['comment_types' => ['asterisk', 'hash']],
408421
'single_line_throw' => false,
409422
'single_quote' => ['strings_containing_single_quote_chars' => false],
410423
'single_space_after_construct' => [

0 commit comments

Comments
 (0)