File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 13
13
* Class to manage the flags of a translation.
14
14
*
15
15
* @phpstan-consistent-constructor
16
+ *
17
+ * @phpstan-type FlagsType array<int, string>
18
+ *
19
+ * @implements IteratorAggregate<int, string>
16
20
*/
17
21
class Flags implements JsonSerializable, Countable, IteratorAggregate
18
22
{
23
+ /**
24
+ * @var FlagsType
25
+ */
19
26
protected $ flags = [];
20
27
28
+ /**
29
+ * @param array{flags: FlagsType} $state
30
+ */
21
31
public static function __set_state (array $ state ): Flags
22
32
{
23
33
return new static (...$ state ['flags ' ]);
@@ -83,6 +93,9 @@ public function count(): int
83
93
return count ($ this ->flags );
84
94
}
85
95
96
+ /**
97
+ * @return FlagsType
98
+ */
86
99
public function toArray (): array
87
100
{
88
101
return $ this ->flags ;
You can’t perform that action at this time.
0 commit comments