Skip to content

Commit 6b36324

Browse files
authored
MultilineCommentOpeningClosingAloneFixer must run before AlignMultilineCommentFixer (#662)
1 parent b781e1d commit 6b36324

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
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-3060-brightgreen.svg)
6+
![Tests](https://img.shields.io/badge/tests-3063-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&event=push)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions)

src/Fixer/MultilineCommentOpeningClosingAloneFixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public function getDefinition(): FixerDefinitionInterface
2929
}
3030

3131
/**
32-
* Must run before MultilineCommentOpeningClosingFixer.
32+
* Must run before AlignMultilineCommentFixer, MultilineCommentOpeningClosingFixer.
3333
*/
3434
public function getPriority(): int
3535
{
36-
return 1;
36+
return 28;
3737
}
3838

3939
public function isCandidate(Tokens $tokens): bool
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--CONFIGURATION--
2+
{
3+
"PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone": true,
4+
"align_multiline_comment": { "comment_type": "all_multiline" }
5+
}
6+
--EXPECTED--
7+
<?php
8+
/*
9+
* Foo
10+
Bar
11+
Baz
12+
*/
13+
14+
--INPUT--
15+
<?php
16+
/* Foo
17+
Bar
18+
Baz */

0 commit comments

Comments
 (0)