Skip to content

Commit b3a7c14

Browse files
authored
CommentSurroundedBySpacesFixer must run before PhpdocToCommentFixer (#806)
1 parent 9a79c47 commit b3a7c14

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Latest stable version](https://img.shields.io/packagist/v/kubawerlos/php-cs-fixer-custom-fixers.svg?label=current%20version)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
44
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
55
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
6-
![Tests](https://img.shields.io/badge/tests-3451-brightgreen.svg)
6+
![Tests](https://img.shields.io/badge/tests-3454-brightgreen.svg)
77
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
88

99
[![CI Status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/workflows/CI/badge.svg?branch=main)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions)

src/Fixer/CommentSurroundedBySpacesFixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public function getDefinition(): FixerDefinitionInterface
3131
}
3232

3333
/**
34-
* Must run before MultilineCommentOpeningClosingFixer.
34+
* Must run before MultilineCommentOpeningClosingFixer, PhpdocToCommentFixer.
3535
* Must run after CommentedOutFunctionFixer.
3636
*/
3737
public function getPriority(): int
3838
{
39-
return 1;
39+
return 26;
4040
}
4141

4242
public function isCandidate(Tokens $tokens): bool

src/Fixer/CommentedOutFunctionFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function configure(array $configuration): void
6666
*/
6767
public function getPriority(): int
6868
{
69-
return 2;
69+
return 27;
7070
}
7171

7272
public function isCandidate(Tokens $tokens): bool
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--CONFIGURATION--
2+
{ "PhpCsFixerCustomFixers/comment_surrounded_by_spaces": true, "phpdoc_to_comment": true }
3+
--EXPECTED--
4+
<?php
5+
/* foo */
6+
7+
--INPUT--
8+
<?php
9+
/**foo*/

0 commit comments

Comments
 (0)