Skip to content

Commit d404ddf

Browse files
committed
TASK: Rename property tagAttributes of TagNode to attributes
1 parent 744c21f commit d404ddf

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

src/Language/AST/Node/Tag/TagNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class TagNode extends Node
3030
public function __construct(
3131
public readonly Range $rangeInSource,
3232
public readonly TagNameNode $name,
33-
public readonly AttributeNodes $tagAttributes,
33+
public readonly AttributeNodes $attributes,
3434
public readonly ChildNodes $children,
3535
public readonly bool $isSelfClosing
3636
) {

src/Language/Parser/Tag/TagParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function parse(\Iterator $tokens): TagNode
6666
$tagSelfCloseToken->boundaries->end
6767
),
6868
name: $tagNameNode,
69-
tagAttributes: $attributeNodes,
69+
attributes: $attributeNodes,
7070
children: new ChildNodes(),
7171
isSelfClosing: true
7272
);
@@ -83,7 +83,7 @@ public function parse(\Iterator $tokens): TagNode
8383
$closingTagEndToken->boundaries->end
8484
),
8585
name: $tagNameNode,
86-
tagAttributes: $attributeNodes,
86+
attributes: $attributeNodes,
8787
children: $children,
8888
isSelfClosing: false
8989
);

test/Unit/Language/Parser/Tag/TagParserTest.php

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function parsesSelfClosingTagWithoutAttributes(): void
6363
),
6464
value: TagName::from('a')
6565
),
66-
tagAttributes: new AttributeNodes(),
66+
attributes: new AttributeNodes(),
6767
children: new ChildNodes(),
6868
isSelfClosing: true
6969
);
@@ -94,7 +94,7 @@ public function parsesSelfClosingTagWithValuelessAttribute(): void
9494
),
9595
value: TagName::from('table')
9696
),
97-
tagAttributes: new AttributeNodes(
97+
attributes: new AttributeNodes(
9898
new AttributeNode(
9999
rangeInSource: Range::from(
100100
new Position(0, 7),
@@ -140,7 +140,7 @@ public function parsesSelfClosingTagWithMultipleValuelessAttributes(): void
140140
),
141141
value: TagName::from('table')
142142
),
143-
tagAttributes: new AttributeNodes(
143+
attributes: new AttributeNodes(
144144
new AttributeNode(
145145
rangeInSource: Range::from(
146146
new Position(0, 7),
@@ -214,7 +214,7 @@ public function parsesSelfClosingTagWithStringAttribute(): void
214214
),
215215
value: TagName::from('a')
216216
),
217-
tagAttributes: new AttributeNodes(
217+
attributes: new AttributeNodes(
218218
new AttributeNode(
219219
rangeInSource: Range::from(
220220
new Position(0, 3),
@@ -266,7 +266,7 @@ public function parsesSelfClosingTagWithMultipleStringAttributes(): void
266266
),
267267
value: TagName::from('div')
268268
),
269-
tagAttributes: new AttributeNodes(
269+
attributes: new AttributeNodes(
270270
new AttributeNode(
271271
rangeInSource: Range::from(
272272
new Position(0, 5),
@@ -358,7 +358,7 @@ public function parsesTagWithEmptyContentAndWithoutAttributes(): void
358358
),
359359
value: TagName::from('a')
360360
),
361-
tagAttributes: new AttributeNodes(),
361+
attributes: new AttributeNodes(),
362362
children: new ChildNodes(),
363363
isSelfClosing: false
364364
);
@@ -412,7 +412,7 @@ public function parsesTagWithEmptyContentAndValuelessAttribute(): void
412412
),
413413
value: TagName::from('a')
414414
),
415-
tagAttributes: new AttributeNodes(
415+
attributes: new AttributeNodes(
416416
new AttributeNode(
417417
rangeInSource: Range::from(
418418
new Position(0, 3),
@@ -458,7 +458,7 @@ public function parsesTagWithEmptyContentAndMultipleValuelessAttributes(): void
458458
),
459459
value: TagName::from('a')
460460
),
461-
tagAttributes: new AttributeNodes(
461+
attributes: new AttributeNodes(
462462
new AttributeNode(
463463
rangeInSource: Range::from(
464464
new Position(0, 3),
@@ -532,7 +532,7 @@ public function parsesTagWithEmptyContentAndStringAttribute(): void
532532
),
533533
value: TagName::from('audio')
534534
),
535-
tagAttributes: new AttributeNodes(
535+
attributes: new AttributeNodes(
536536
new AttributeNode(
537537
rangeInSource: Range::from(
538538
new Position(0, 7),
@@ -584,7 +584,7 @@ public function parsesTagWithEmptyContentAndMultipleStringAttributes(): void
584584
),
585585
value: TagName::from('video')
586586
),
587-
tagAttributes: new AttributeNodes(
587+
attributes: new AttributeNodes(
588588
new AttributeNode(
589589
rangeInSource: Range::from(
590590
new Position(0, 7),
@@ -676,7 +676,7 @@ public function parsesTagWithTextContentAndWithoutAttributes(): void
676676
),
677677
value: TagName::from('a')
678678
),
679-
tagAttributes: new AttributeNodes(),
679+
attributes: new AttributeNodes(),
680680
children: new ChildNodes(
681681
new TextNode(
682682
rangeInSource: Range::from(
@@ -715,7 +715,7 @@ public function parsesTagWithNestedSelfClosingTagContentAndWithoutAttributes():
715715
),
716716
value: TagName::from('a')
717717
),
718-
tagAttributes: new AttributeNodes(),
718+
attributes: new AttributeNodes(),
719719
children: new ChildNodes(
720720
new TagNode(
721721
rangeInSource: Range::from(
@@ -729,7 +729,7 @@ public function parsesTagWithNestedSelfClosingTagContentAndWithoutAttributes():
729729
),
730730
value: TagName::from('b')
731731
),
732-
tagAttributes: new AttributeNodes(),
732+
attributes: new AttributeNodes(),
733733
children: new ChildNodes(),
734734
isSelfClosing: true
735735
)
@@ -763,7 +763,7 @@ public function parsesTagWithNestedTagAndWithoutAttributes(): void
763763
),
764764
value: TagName::from('a')
765765
),
766-
tagAttributes: new AttributeNodes(),
766+
attributes: new AttributeNodes(),
767767
children: new ChildNodes(
768768
new TagNode(
769769
rangeInSource: Range::from(
@@ -777,7 +777,7 @@ public function parsesTagWithNestedTagAndWithoutAttributes(): void
777777
),
778778
value: TagName::from('b')
779779
),
780-
tagAttributes: new AttributeNodes(),
780+
attributes: new AttributeNodes(),
781781
children: new ChildNodes(),
782782
isSelfClosing: false
783783
)
@@ -811,7 +811,7 @@ public function parsesTagWithNestedTagsOnMultipleLevelsAndWithoutAttributes(): v
811811
),
812812
value: TagName::from('a')
813813
),
814-
tagAttributes: new AttributeNodes(),
814+
attributes: new AttributeNodes(),
815815
children: new ChildNodes(
816816
new TagNode(
817817
rangeInSource: Range::from(
@@ -825,7 +825,7 @@ public function parsesTagWithNestedTagsOnMultipleLevelsAndWithoutAttributes(): v
825825
),
826826
value: TagName::from('b')
827827
),
828-
tagAttributes: new AttributeNodes(),
828+
attributes: new AttributeNodes(),
829829
children: new ChildNodes(
830830
new TagNode(
831831
rangeInSource: Range::from(
@@ -839,7 +839,7 @@ public function parsesTagWithNestedTagsOnMultipleLevelsAndWithoutAttributes(): v
839839
),
840840
value: TagName::from('c')
841841
),
842-
tagAttributes: new AttributeNodes(),
842+
attributes: new AttributeNodes(),
843843
children: new ChildNodes(
844844
new TagNode(
845845
rangeInSource: Range::from(
@@ -853,7 +853,7 @@ public function parsesTagWithNestedTagsOnMultipleLevelsAndWithoutAttributes(): v
853853
),
854854
value: TagName::from('d')
855855
),
856-
tagAttributes: new AttributeNodes(),
856+
attributes: new AttributeNodes(),
857857
children: new ChildNodes(),
858858
isSelfClosing: true
859859
)
@@ -893,7 +893,7 @@ public function parsesTagWithNestedTagInBetweenSpacesAndWithoutAttributes(): voi
893893
),
894894
value: TagName::from('a')
895895
),
896-
tagAttributes: new AttributeNodes(),
896+
attributes: new AttributeNodes(),
897897
children: new ChildNodes(
898898
new TagNode(
899899
rangeInSource: Range::from(
@@ -907,7 +907,7 @@ public function parsesTagWithNestedTagInBetweenSpacesAndWithoutAttributes(): voi
907907
),
908908
value: TagName::from('b')
909909
),
910-
tagAttributes: new AttributeNodes(),
910+
attributes: new AttributeNodes(),
911911
children: new ChildNodes(),
912912
isSelfClosing: false
913913
)
@@ -941,7 +941,7 @@ public function parsesTagWithNestedTagInBetweenTextContentPreservingSpaceAroundT
941941
),
942942
value: TagName::from('a')
943943
),
944-
tagAttributes: new AttributeNodes(),
944+
attributes: new AttributeNodes(),
945945
children: new ChildNodes(
946946
new TextNode(
947947
rangeInSource: Range::from(
@@ -962,7 +962,7 @@ public function parsesTagWithNestedTagInBetweenTextContentPreservingSpaceAroundT
962962
),
963963
value: TagName::from('b')
964964
),
965-
tagAttributes: new AttributeNodes(),
965+
attributes: new AttributeNodes(),
966966
children: new ChildNodes(
967967
new TextNode(
968968
rangeInSource: Range::from(
@@ -1011,7 +1011,7 @@ public function parsesTagWithMultipleNestedTagsAsImmediateChildren(): void
10111011
),
10121012
value: TagName::from('a')
10131013
),
1014-
tagAttributes: new AttributeNodes(),
1014+
attributes: new AttributeNodes(),
10151015
children: new ChildNodes(
10161016
new TagNode(
10171017
rangeInSource: Range::from(
@@ -1025,7 +1025,7 @@ public function parsesTagWithMultipleNestedTagsAsImmediateChildren(): void
10251025
),
10261026
value: TagName::from('b')
10271027
),
1028-
tagAttributes: new AttributeNodes(),
1028+
attributes: new AttributeNodes(),
10291029
children: new ChildNodes(),
10301030
isSelfClosing: false
10311031
),
@@ -1041,7 +1041,7 @@ public function parsesTagWithMultipleNestedTagsAsImmediateChildren(): void
10411041
),
10421042
value: TagName::from('c')
10431043
),
1044-
tagAttributes: new AttributeNodes(),
1044+
attributes: new AttributeNodes(),
10451045
children: new ChildNodes(),
10461046
isSelfClosing: true
10471047
),
@@ -1057,7 +1057,7 @@ public function parsesTagWithMultipleNestedTagsAsImmediateChildren(): void
10571057
),
10581058
value: TagName::from('d')
10591059
),
1060-
tagAttributes: new AttributeNodes(),
1060+
attributes: new AttributeNodes(),
10611061
children: new ChildNodes(),
10621062
isSelfClosing: false
10631063
),
@@ -1102,7 +1102,7 @@ public function parsesTagWithMultipleNestedTagsOnMultipleLevelsAllHavingAttribut
11021102
),
11031103
value: TagName::from('div')
11041104
),
1105-
tagAttributes: new AttributeNodes(
1105+
attributes: new AttributeNodes(
11061106
new AttributeNode(
11071107
rangeInSource: Range::from(
11081108
new Position(0, 5),
@@ -1158,7 +1158,7 @@ public function parsesTagWithMultipleNestedTagsOnMultipleLevelsAllHavingAttribut
11581158
),
11591159
value: TagName::from('h1')
11601160
),
1161-
tagAttributes: new AttributeNodes(),
1161+
attributes: new AttributeNodes(),
11621162
children: new ChildNodes(
11631163
new TextNode(
11641164
rangeInSource: Range::from(
@@ -1182,7 +1182,7 @@ public function parsesTagWithMultipleNestedTagsOnMultipleLevelsAllHavingAttribut
11821182
),
11831183
value: TagName::from('a')
11841184
),
1185-
tagAttributes: new AttributeNodes(
1185+
attributes: new AttributeNodes(
11861186
new AttributeNode(
11871187
rangeInSource: Range::from(
11881188
new Position(3, 7),
@@ -1247,7 +1247,7 @@ public function parsesTagWithMultipleNestedTagsOnMultipleLevelsAllHavingAttribut
12471247
),
12481248
value: TagName::from('p')
12491249
),
1250-
tagAttributes: new AttributeNodes(
1250+
attributes: new AttributeNodes(
12511251
new AttributeNode(
12521252
rangeInSource: Range::from(
12531253
new Position(4, 7),
@@ -1289,7 +1289,7 @@ public function parsesTagWithMultipleNestedTagsOnMultipleLevelsAllHavingAttribut
12891289
),
12901290
value: TagName::from('em')
12911291
),
1292-
tagAttributes: new AttributeNodes(),
1292+
attributes: new AttributeNodes(),
12931293
children: new ChildNodes(
12941294
new TextNode(
12951295
rangeInSource: Range::from(
@@ -1320,7 +1320,7 @@ public function parsesTagWithMultipleNestedTagsOnMultipleLevelsAllHavingAttribut
13201320
),
13211321
value: TagName::from('strong')
13221322
),
1323-
tagAttributes: new AttributeNodes(),
1323+
attributes: new AttributeNodes(),
13241324
children: new ChildNodes(
13251325
new TextNode(
13261326
rangeInSource: Range::from(

0 commit comments

Comments
 (0)