We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Comments
1 parent 56a99f5 commit 7e3984bCopy full SHA for 7e3984b
src/Comments.php
@@ -13,11 +13,19 @@
13
* Class to manage the comments of a translation.
14
*
15
* @phpstan-consistent-constructor
16
+ *
17
+ * @implements IteratorAggregate<string, string>
18
*/
19
class Comments implements JsonSerializable, Countable, IteratorAggregate
20
{
21
+ /**
22
+ * @var array<string, string>
23
+ */
24
protected $comments = [];
25
26
27
+ * @param array<string, string> $state
28
29
public static function __set_state(array $state): Comments
30
31
return new static(...$state['comments']);
@@ -76,6 +84,9 @@ public function count(): int
76
84
return count($this->comments);
77
85
}
78
86
87
88
+ * @return array<string, string>
89
79
90
public function toArray(): array
80
91
81
92
return $this->comments;
0 commit comments