Skip to content

Commit 3c65a86

Browse files
committed
Add priority tests
1 parent eca1b05 commit 3c65a86

5 files changed

+47
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![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)
66
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
77
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
8-
![Tests](https://img.shields.io/badge/tests-3781-brightgreen.svg)
8+
![Tests](https://img.shields.io/badge/tests-3787-brightgreen.svg)
99
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
1010

1111
[![CI status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions/workflows/ci.yaml/badge.svg)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions/workflows/ci.yaml)

src/Fixer/PhpdocOnlyAllowedAnnotationsFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function configure(array $configuration): void
7575
}
7676

7777
/**
78-
* Must run before NoEmptyPhpdocFixer.
78+
* Must run before NoEmptyPhpdocFixer, PhpdocTagNoNamedArgumentsFixer.
7979
* Must run after CommentToPhpdocFixer.
8080
*/
8181
public function getPriority(): int

src/Fixer/PhpdocTagNoNamedArgumentsFixer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ public function configure(array $configuration): void
9898
$this->description = $configuration['description'];
9999
}
100100

101+
/**
102+
* Must run before PhpdocSeparationFixer.
103+
* Must run after PhpdocOnlyAllowedAnnotationsFixer.
104+
*/
101105
public function getPriority(): int
102106
{
103107
return 0;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--CONFIGURATION--
2+
{ "PhpCsFixerCustomFixers/phpdoc_only_allowed_annotations": {"elements": ["author"]}, "PhpCsFixerCustomFixers/phpdoc_tag_no_named_arguments": true }
3+
--EXPECTED--
4+
<?php
5+
/**
6+
* @author John Doe
7+
* @no-named-arguments
8+
*/
9+
class Foo
10+
{
11+
}
12+
13+
--INPUT--
14+
<?php
15+
/**
16+
* @author John Doe
17+
*/
18+
class Foo
19+
{
20+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--CONFIGURATION--
2+
{ "phpdoc_separation": true, "PhpCsFixerCustomFixers/phpdoc_tag_no_named_arguments": true }
3+
--EXPECTED--
4+
<?php
5+
/**
6+
* @author John Doe
7+
*
8+
* @no-named-arguments
9+
*/
10+
class Foo
11+
{
12+
}
13+
14+
--INPUT--
15+
<?php
16+
/**
17+
* @author John Doe
18+
*/
19+
class Foo
20+
{
21+
}

0 commit comments

Comments
 (0)