Browse Source

chore: PHPDoc key-value spacing (#7592)

Dariusz Rumiński 1 year ago
parent
commit
ac9c2e055f

+ 1 - 1
src/DocBlock/TypeExpression.php

@@ -594,7 +594,7 @@ final class TypeExpression
     }
 
     /**
-     * @return array<string,string>
+     * @return array<string, string>
      */
     private function getAliases(): array
     {

+ 1 - 1
src/Fixer/Casing/MagicMethodCasingFixer.php

@@ -24,7 +24,7 @@ use PhpCsFixer\Tokenizer\Tokens;
 final class MagicMethodCasingFixer extends AbstractFixer
 {
     /**
-     * @var array<string,string>
+     * @var array<string, string>
      */
     private static array $magicNames = [
         '__call' => '__call',

+ 1 - 1
src/Fixer/PhpUnit/PhpUnitConstructFixer.php

@@ -33,7 +33,7 @@ use PhpCsFixer\Tokenizer\Tokens;
 final class PhpUnitConstructFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
 {
     /**
-     * @var array<string,string>
+     * @var array<string, string>
      */
     private static array $assertionFixers = [
         'assertSame' => 'fixAssertPositive',

+ 1 - 1
src/Fixer/PhpUnit/PhpUnitStrictFixer.php

@@ -34,7 +34,7 @@ use PhpCsFixer\Tokenizer\Tokens;
 final class PhpUnitStrictFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
 {
     /**
-     * @var array<string,string>
+     * @var array<string, string>
      */
     private static array $assertionMap = [
         'assertAttributeEquals' => 'assertAttributeSame',

+ 2 - 2
src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php

@@ -51,7 +51,7 @@ final class PhpUnitTestCaseStaticMethodCallsFixer extends AbstractPhpUnitFixer i
     public const CALL_TYPE_STATIC = 'static';
 
     /**
-     * @var array<string,true>
+     * @var array<string, true>
      */
     private array $staticMethods = [
         // Assert methods
@@ -295,7 +295,7 @@ final class PhpUnitTestCaseStaticMethodCallsFixer extends AbstractPhpUnitFixer i
     ];
 
     /**
-     * @var array<string,bool>
+     * @var array<string, bool>
      */
     private array $allowedValues = [
         self::CALL_TYPE_THIS => true,

+ 1 - 1
src/Fixer/Phpdoc/PhpdocTypesFixer.php

@@ -35,7 +35,7 @@ final class PhpdocTypesFixer extends AbstractPhpdocTypesFixer implements Configu
     /**
      * Available types, grouped.
      *
-     * @var array<string,string[]>
+     * @var array<string, string[]>
      */
     private const POSSIBLE_TYPES = [
         'simple' => [

+ 1 - 1
src/RuleSet/RuleSets.php

@@ -24,7 +24,7 @@ use Symfony\Component\Finder\Finder;
 final class RuleSets
 {
     /**
-     * @var array<string,RuleSetDescriptionInterface>
+     * @var array<string, RuleSetDescriptionInterface>
      */
     private static $setDefinitions;
 

+ 2 - 2
tests/Fixer/FunctionNotation/FunctionDeclarationFixerTest.php

@@ -29,12 +29,12 @@ use PhpCsFixer\Tests\Test\AbstractFixerTestCase;
 final class FunctionDeclarationFixerTest extends AbstractFixerTestCase
 {
     /**
-     * @var array<string,string>
+     * @var array<string, string>
      */
     private static $configurationClosureSpacingNone = ['closure_function_spacing' => FunctionDeclarationFixer::SPACING_NONE];
 
     /**
-     * @var array<string,string>
+     * @var array<string, string>
      */
     private static $configurationArrowSpacingNone = ['closure_fn_spacing' => FunctionDeclarationFixer::SPACING_NONE];
 

+ 16 - 16
tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php

@@ -1185,20 +1185,20 @@ class Foo {}
             [],
             '<?php
             /**
-             * @var string                            $input
-             * @var \Closure                          $fn
-             * @var \Closure(bool):int                $fn2
-             * @var Closure                           $fn3
-             * @var Closure(string):string            $fn4
-             * @var array<string,array<string,mixed>> $data
+             * @var string                              $input
+             * @var \Closure                            $fn
+             * @var \Closure(bool):int                  $fn2
+             * @var Closure                             $fn3
+             * @var Closure(string):string              $fn4
+             * @var array<string, array<string, mixed>> $data
              */
             /**
-             * @param string                            $input
-             * @param \Closure                          $fn
-             * @param \Closure(bool):int                $fn2
-             * @param Closure                           $fn3
-             * @param Closure(string):string            $fn4
-             * @param array<string,array<string,mixed>> $data
+             * @param string                              $input
+             * @param \Closure                            $fn
+             * @param \Closure(bool):int                  $fn2
+             * @param Closure                             $fn3
+             * @param Closure(string):string              $fn4
+             * @param array<string, array<string, mixed>> $data
              */
             /**
              * @var string                   $value
@@ -1211,12 +1211,12 @@ class Foo {}
              * @param Closure(int): bool       $callback2
              */
             /**
-             * @var Closure(array<int,bool>): bool $callback1
-             * @var \Closure(string): string       $callback2
+             * @var Closure(array<int, bool>): bool $callback1
+             * @var \Closure(string): string        $callback2
              */
             /**
-             * @param Closure(array<int,bool>): bool $callback1
-             * @param \Closure(string): string       $callback2
+             * @param Closure(array<int, bool>): bool $callback1
+             * @param \Closure(string): string        $callback2
              */
         ', ];
 

+ 1 - 1
tests/RuleSet/RuleSetTest.php

@@ -494,7 +494,7 @@ final class RuleSetTest extends TestCase
     }
 
     /**
-     * @param array<int|string,mixed> $values
+     * @param array<int|string, mixed> $values
      */
     private function allInteger(array $values): bool
     {

Some files were not shown because too many files changed in this diff