Skip to content

Commit 4b7d604

Browse files
committed
DX: HeaderCommentFixer - use non-aliased version of option name in code
1 parent 0945975 commit 4b7d604

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Fixer/Comment/HeaderCommentFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function isCandidate(Tokens $tokens)
117117
*/
118118
public function getPriority()
119119
{
120-
// When this fixer is configured with ["separate" => "bottom", "commentType" => "PHPDoc"]
120+
// When this fixer is configured with ["separate" => "bottom", "comment_type" => "PHPDoc"]
121121
// and the target file has no namespace or declare() construct,
122122
// the fixed header comment gets trimmed by NoBlankLinesAfterPhpdocFixer if we run before it.
123123
return -30;

tests/Fixer/Comment/HeaderCommentFixerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function provideFixCases()
304304
'header' => 'foo',
305305
'location' => 'after_open',
306306
'separate' => 'bottom',
307-
'commentType' => 'PHPDoc',
307+
'comment_type' => 'PHPDoc',
308308
],
309309
'<?php
310310
/**
@@ -332,7 +332,7 @@ public function provideFixCases()
332332
'header' => 'foo',
333333
'location' => 'after_open',
334334
'separate' => 'bottom',
335-
'commentType' => 'PHPDoc',
335+
'comment_type' => 'PHPDoc',
336336
],
337337
'<?php
338338
/**

tests/Fixtures/Integration/misc/header_comment,declare_strict_types.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Integration of fixers: header_comment, declare_strict_types
44
{
55
"header_comment" :
66
{
7-
"commentType": "PHPDoc", "header": "Header Comment", "location": "after_open", "separate": "bottom"
7+
"comment_type": "PHPDoc", "header": "Header Comment", "location": "after_open", "separate": "bottom"
88
},
99
"declare_strict_types": true
1010
}

tests/Fixtures/Integration/priority/declare_strict_types,header_comment.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Integration of fixers: declare_strict_types,header_comment.
44
{
55
"header_comment" :
66
{
7-
"commentType": "PHPDoc", "header": "Header Comment", "location": "after_open", "separate": "bottom"
7+
"comment_type": "PHPDoc", "header": "Header Comment", "location": "after_open", "separate": "bottom"
88
},
99
"declare_strict_types": true
1010
}

0 commit comments

Comments
 (0)