Skip to content

Commit f28fc1f

Browse files
authored
[TASK] Use native type declarations in Commentable (#967)
Part of #811
1 parent 132374b commit f28fc1f

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Please also have a look at our
2727
- Make all non-private properties `@internal` (#886)
2828
- Use more native type declarations and strict mode
2929
(#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933, #958,
30-
#964)
30+
#964, #967)
3131
- Add visibility to all class/interface constants (#469)
3232

3333
### Deprecated

src/CSSList/CSSList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ public function addComments(array $comments): void
470470
/**
471471
* @return array<array-key, Comment>
472472
*/
473-
public function getComments()
473+
public function getComments(): array
474474
{
475475
return $this->comments;
476476
}

src/Comment/Commentable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function addComments(array $comments): void;
1414
/**
1515
* @return array<array-key, Comment>
1616
*/
17-
public function getComments();
17+
public function getComments(): array;
1818

1919
/**
2020
* @param array<array-key, Comment> $comments

src/Property/CSSNamespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function addComments(array $comments): void
128128
/**
129129
* @return array<array-key, Comment>
130130
*/
131-
public function getComments()
131+
public function getComments(): array
132132
{
133133
return $this->comments;
134134
}

src/Property/Charset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function addComments(array $comments): void
105105
/**
106106
* @return array<array-key, Comment>
107107
*/
108-
public function getComments()
108+
public function getComments(): array
109109
{
110110
return $this->comments;
111111
}

src/Property/Import.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function addComments(array $comments): void
111111
/**
112112
* @return array<array-key, Comment>
113113
*/
114-
public function getComments()
114+
public function getComments(): array
115115
{
116116
return $this->comments;
117117
}

src/Rule/Rule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public function addComments(array $comments): void
294294
/**
295295
* @return array<array-key, Comment>
296296
*/
297-
public function getComments()
297+
public function getComments(): array
298298
{
299299
return $this->comments;
300300
}

src/RuleSet/RuleSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function addComments(array $comments): void
305305
/**
306306
* @return array<string, Comment>
307307
*/
308-
public function getComments()
308+
public function getComments(): array
309309
{
310310
return $this->comments;
311311
}

0 commit comments

Comments
 (0)