|
135 | 135 | use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer; |
136 | 136 | use PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer; |
137 | 137 | use PhpCsFixer\Fixer\Whitespace\TypeDeclarationSpacesFixer; |
| 138 | +use PhpCsFixer\Fixer\Whitespace\TypesSpacesFixer; |
138 | 139 | use SlevomatCodingStandard\Sniffs\Classes\RequireConstructorPropertyPromotionSniff; |
139 | 140 | use SlevomatCodingStandard\Sniffs\ControlStructures\RequireNullSafeObjectOperatorSniff; |
140 | 141 | use SlevomatCodingStandard\Sniffs\Exceptions\ReferenceThrowableOnlySniff; |
|
143 | 144 | use SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSniff; |
144 | 145 | use SlevomatCodingStandard\Sniffs\TypeHints\PropertyTypeHintSniff; |
145 | 146 | use SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSniff; |
146 | | -use SlevomatCodingStandard\Sniffs\TypeHints\UnionTypeHintFormatSniff; |
147 | 147 | use Symplify\CodingStandard\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer; |
148 | 148 | use Symplify\EasyCodingStandard\Config\ECSConfig; |
149 | 149 |
|
|
263 | 263 | FopenFlagsFixer::class, |
264 | 264 | // Add missing space between function's argument and its typehint. |
265 | 265 | TypeDeclarationSpacesFixer::class, |
| 266 | + // None space should be around union type and intersection type operators. |
| 267 | + TypesSpacesFixer::class, |
266 | 268 | // Function `implode` must be called with 2 arguments in the documented order. |
267 | 269 | ImplodeCallFixer::class, |
268 | 270 | // Lambda must not import variables it doesn't use. |
|
505 | 507 | 'use_trait', |
506 | 508 | ], |
507 | 509 | ]) |
508 | | - // Format union types |
509 | | - ->withConfiguredRule(UnionTypeHintFormatSniff::class, ['withSpaces' => 'no']) |
510 | 510 | ->withSkip([ |
511 | 511 | // We allow empty catch statements (but they must have comment - see EmptyCatchCommentSniff) |
512 | 512 | EmptyStatementSniff::class . '.DetectedCatch' => null, |
|
0 commit comments