Skip to content

Commit d3200b5

Browse files
committed
Enable union_types option for phpdoc_to fixers
1 parent beb45cc commit d3200b5

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed

src/Ruleset/Nexus80.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,18 @@ public function __construct()
541541
'allow_before_return_statement' => true,
542542
'ignored_tags' => [],
543543
],
544-
'phpdoc_to_param_type' => ['scalar_types' => true],
545-
'phpdoc_to_property_type' => ['scalar_types' => true],
546-
'phpdoc_to_return_type' => ['scalar_types' => true],
544+
'phpdoc_to_param_type' => [
545+
'scalar_types' => true,
546+
'union_types' => true,
547+
],
548+
'phpdoc_to_property_type' => [
549+
'scalar_types' => true,
550+
'union_types' => true,
551+
],
552+
'phpdoc_to_return_type' => [
553+
'scalar_types' => true,
554+
'union_types' => true,
555+
],
547556
'phpdoc_trim' => true,
548557
'phpdoc_trim_consecutive_blank_line_separation' => true,
549558
'phpdoc_types' => ['groups' => ['simple', 'alias', 'meta']],

src/Ruleset/Nexus81.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,18 @@ public function __construct()
541541
'allow_before_return_statement' => true,
542542
'ignored_tags' => [],
543543
],
544-
'phpdoc_to_param_type' => ['scalar_types' => true],
545-
'phpdoc_to_property_type' => ['scalar_types' => true],
546-
'phpdoc_to_return_type' => ['scalar_types' => true],
544+
'phpdoc_to_param_type' => [
545+
'scalar_types' => true,
546+
'union_types' => true,
547+
],
548+
'phpdoc_to_property_type' => [
549+
'scalar_types' => true,
550+
'union_types' => true,
551+
],
552+
'phpdoc_to_return_type' => [
553+
'scalar_types' => true,
554+
'union_types' => true,
555+
],
547556
'phpdoc_trim' => true,
548557
'phpdoc_trim_consecutive_blank_line_separation' => true,
549558
'phpdoc_types' => ['groups' => ['simple', 'alias', 'meta']],

src/Ruleset/Nexus82.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,18 @@ public function __construct()
541541
'allow_before_return_statement' => true,
542542
'ignored_tags' => [],
543543
],
544-
'phpdoc_to_param_type' => ['scalar_types' => true],
545-
'phpdoc_to_property_type' => ['scalar_types' => true],
546-
'phpdoc_to_return_type' => ['scalar_types' => true],
544+
'phpdoc_to_param_type' => [
545+
'scalar_types' => true,
546+
'union_types' => true,
547+
],
548+
'phpdoc_to_property_type' => [
549+
'scalar_types' => true,
550+
'union_types' => true,
551+
],
552+
'phpdoc_to_return_type' => [
553+
'scalar_types' => true,
554+
'union_types' => true,
555+
],
547556
'phpdoc_trim' => true,
548557
'phpdoc_trim_consecutive_blank_line_separation' => true,
549558
'phpdoc_types' => ['groups' => ['simple', 'alias', 'meta']],

0 commit comments

Comments
 (0)