Skip to content

Commit 24f44c2

Browse files
authored
[CLEANUP] Avoid Hungarian notion for the Commentable interface (#804)
Also adapt the implementing classes accordingly. Part of #756.
1 parent 65cacc1 commit 24f44c2

File tree

7 files changed

+58
-58
lines changed

7 files changed

+58
-58
lines changed

src/CSSList/CSSList.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract class CSSList implements Renderable, Commentable
3636
/**
3737
* @var array<array-key, Comment>
3838
*/
39-
protected $aComments;
39+
protected $comments;
4040

4141
/**
4242
* @var array<int, RuleSet|CSSList|Import|Charset>
@@ -53,7 +53,7 @@ abstract class CSSList implements Renderable, Commentable
5353
*/
5454
public function __construct($iLineNo = 0)
5555
{
56-
$this->aComments = [];
56+
$this->comments = [];
5757
$this->aContents = [];
5858
$this->iLineNo = $iLineNo;
5959
}
@@ -456,26 +456,26 @@ public function getContents()
456456
}
457457

458458
/**
459-
* @param array<array-key, Comment> $aComments
459+
* @param array<array-key, Comment> $comments
460460
*/
461-
public function addComments(array $aComments): void
461+
public function addComments(array $comments): void
462462
{
463-
$this->aComments = \array_merge($this->aComments, $aComments);
463+
$this->comments = \array_merge($this->comments, $comments);
464464
}
465465

466466
/**
467467
* @return array<array-key, Comment>
468468
*/
469469
public function getComments()
470470
{
471-
return $this->aComments;
471+
return $this->comments;
472472
}
473473

474474
/**
475-
* @param array<array-key, Comment> $aComments
475+
* @param array<array-key, Comment> $comments
476476
*/
477-
public function setComments(array $aComments): void
477+
public function setComments(array $comments): void
478478
{
479-
$this->aComments = $aComments;
479+
$this->comments = $comments;
480480
}
481481
}

src/Comment/Commentable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
interface Commentable
88
{
99
/**
10-
* @param array<array-key, Comment> $aComments
10+
* @param array<array-key, Comment> $comments
1111
*
1212
* @return void
1313
*/
14-
public function addComments(array $aComments);
14+
public function addComments(array $comments);
1515

1616
/**
1717
* @return array<array-key, Comment>
1818
*/
1919
public function getComments();
2020

2121
/**
22-
* @param array<array-key, Comment> $aComments
22+
* @param array<array-key, Comment> $comments
2323
*
2424
* @return void
2525
*/
26-
public function setComments(array $aComments);
26+
public function setComments(array $comments);
2727
}

src/Property/CSSNamespace.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CSSNamespace implements AtRule
3030
/**
3131
* @var array<array-key, Comment>
3232
*/
33-
protected $aComments;
33+
protected $comments;
3434

3535
/**
3636
* @param string $mUrl
@@ -42,7 +42,7 @@ public function __construct($mUrl, $sPrefix = null, $iLineNo = 0)
4242
$this->mUrl = $mUrl;
4343
$this->sPrefix = $sPrefix;
4444
$this->iLineNo = $iLineNo;
45-
$this->aComments = [];
45+
$this->comments = [];
4646
}
4747

4848
/**
@@ -117,26 +117,26 @@ public function atRuleArgs(): array
117117
}
118118

119119
/**
120-
* @param array<array-key, Comment> $aComments
120+
* @param array<array-key, Comment> $comments
121121
*/
122-
public function addComments(array $aComments): void
122+
public function addComments(array $comments): void
123123
{
124-
$this->aComments = \array_merge($this->aComments, $aComments);
124+
$this->comments = \array_merge($this->comments, $comments);
125125
}
126126

127127
/**
128128
* @return array<array-key, Comment>
129129
*/
130130
public function getComments()
131131
{
132-
return $this->aComments;
132+
return $this->comments;
133133
}
134134

135135
/**
136-
* @param array<array-key, Comment> $aComments
136+
* @param array<array-key, Comment> $comments
137137
*/
138-
public function setComments(array $aComments): void
138+
public function setComments(array $comments): void
139139
{
140-
$this->aComments = $aComments;
140+
$this->comments = $comments;
141141
}
142142
}

src/Property/Charset.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Charset implements AtRule
3131
/**
3232
* @var array<array-key, Comment>
3333
*/
34-
protected $aComments;
34+
protected $comments;
3535

3636
/**
3737
* @param CSSString $oCharset
@@ -41,7 +41,7 @@ public function __construct(CSSString $oCharset, $iLineNo = 0)
4141
{
4242
$this->oCharset = $oCharset;
4343
$this->iLineNo = $iLineNo;
44-
$this->aComments = [];
44+
$this->comments = [];
4545
}
4646

4747
/**
@@ -95,30 +95,30 @@ public function atRuleArgs()
9595
}
9696

9797
/**
98-
* @param array<array-key, Comment> $aComments
98+
* @param array<array-key, Comment> $comments
9999
*
100100
* @return void
101101
*/
102-
public function addComments(array $aComments): void
102+
public function addComments(array $comments): void
103103
{
104-
$this->aComments = \array_merge($this->aComments, $aComments);
104+
$this->comments = \array_merge($this->comments, $comments);
105105
}
106106

107107
/**
108108
* @return array<array-key, Comment>
109109
*/
110110
public function getComments()
111111
{
112-
return $this->aComments;
112+
return $this->comments;
113113
}
114114

115115
/**
116-
* @param array<array-key, Comment> $aComments
116+
* @param array<array-key, Comment> $comments
117117
*
118118
* @return void
119119
*/
120-
public function setComments(array $aComments): void
120+
public function setComments(array $comments): void
121121
{
122-
$this->aComments = $aComments;
122+
$this->comments = $comments;
123123
}
124124
}

src/Property/Import.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Import implements AtRule
3131
/**
3232
* @var array<array-key, Comment>
3333
*/
34-
protected $aComments;
34+
protected $comments;
3535

3636
/**
3737
* @param URL $oLocation
@@ -43,7 +43,7 @@ public function __construct(URL $oLocation, $sMediaQuery, $iLineNo = 0)
4343
$this->oLocation = $oLocation;
4444
$this->sMediaQuery = $sMediaQuery;
4545
$this->iLineNo = $iLineNo;
46-
$this->aComments = [];
46+
$this->comments = [];
4747
}
4848

4949
/**
@@ -99,27 +99,27 @@ public function atRuleArgs(): array
9999
}
100100

101101
/**
102-
* @param array<array-key, Comment> $aComments
102+
* @param array<array-key, Comment> $comments
103103
*/
104-
public function addComments(array $aComments): void
104+
public function addComments(array $comments): void
105105
{
106-
$this->aComments = \array_merge($this->aComments, $aComments);
106+
$this->comments = \array_merge($this->comments, $comments);
107107
}
108108

109109
/**
110110
* @return array<array-key, Comment>
111111
*/
112112
public function getComments()
113113
{
114-
return $this->aComments;
114+
return $this->comments;
115115
}
116116

117117
/**
118-
* @param array<array-key, Comment> $aComments
118+
* @param array<array-key, Comment> $comments
119119
*/
120-
public function setComments(array $aComments): void
120+
public function setComments(array $comments): void
121121
{
122-
$this->aComments = $aComments;
122+
$this->comments = $comments;
123123
}
124124

125125
/**

src/Rule/Rule.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Rule implements Renderable, Commentable
5454
/**
5555
* @var array<array-key, Comment>
5656
*/
57-
protected $aComments;
57+
protected $comments;
5858

5959
/**
6060
* @param string $sRule
@@ -69,7 +69,7 @@ public function __construct($sRule, $iLineNo = 0, $iColNo = 0)
6969
$this->aIeHack = [];
7070
$this->iLineNo = $iLineNo;
7171
$this->iColNo = $iColNo;
72-
$this->aComments = [];
72+
$this->comments = [];
7373
}
7474

7575
/**
@@ -284,26 +284,26 @@ public function render(OutputFormat $oOutputFormat): string
284284
}
285285

286286
/**
287-
* @param array<array-key, Comment> $aComments
287+
* @param array<array-key, Comment> $comments
288288
*/
289-
public function addComments(array $aComments): void
289+
public function addComments(array $comments): void
290290
{
291-
$this->aComments = \array_merge($this->aComments, $aComments);
291+
$this->comments = \array_merge($this->comments, $comments);
292292
}
293293

294294
/**
295295
* @return array<array-key, Comment>
296296
*/
297297
public function getComments()
298298
{
299-
return $this->aComments;
299+
return $this->comments;
300300
}
301301

302302
/**
303-
* @param array<array-key, Comment> $aComments
303+
* @param array<array-key, Comment> $comments
304304
*/
305-
public function setComments(array $aComments): void
305+
public function setComments(array $comments): void
306306
{
307-
$this->aComments = $aComments;
307+
$this->comments = $comments;
308308
}
309309
}

src/RuleSet/RuleSet.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class RuleSet implements Renderable, Commentable
3737
/**
3838
* @var array<array-key, Comment>
3939
*/
40-
protected $aComments;
40+
protected $comments;
4141

4242
/**
4343
* @param int $iLineNo
@@ -46,7 +46,7 @@ public function __construct($iLineNo = 0)
4646
{
4747
$this->aRules = [];
4848
$this->iLineNo = $iLineNo;
49-
$this->aComments = [];
49+
$this->comments = [];
5050
}
5151

5252
/**
@@ -294,26 +294,26 @@ protected function renderRules(OutputFormat $oOutputFormat)
294294
}
295295

296296
/**
297-
* @param array<string, Comment> $aComments
297+
* @param array<string, Comment> $comments
298298
*/
299-
public function addComments(array $aComments): void
299+
public function addComments(array $comments): void
300300
{
301-
$this->aComments = \array_merge($this->aComments, $aComments);
301+
$this->comments = \array_merge($this->comments, $comments);
302302
}
303303

304304
/**
305305
* @return array<string, Comment>
306306
*/
307307
public function getComments()
308308
{
309-
return $this->aComments;
309+
return $this->comments;
310310
}
311311

312312
/**
313-
* @param array<string, Comment> $aComments
313+
* @param array<string, Comment> $comments
314314
*/
315-
public function setComments(array $aComments): void
315+
public function setComments(array $comments): void
316316
{
317-
$this->aComments = $aComments;
317+
$this->comments = $comments;
318318
}
319319
}

0 commit comments

Comments
 (0)