We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Flags
1 parent ede8f6f commit ad0ae0dCopy full SHA for ad0ae0d
src/Flags.php
@@ -13,11 +13,21 @@
13
* Class to manage the flags of a translation.
14
*
15
* @phpstan-consistent-constructor
16
+ *
17
+ * @phpstan-type FlagsType array<int, string>
18
19
+ * @implements IteratorAggregate<int, string>
20
*/
21
class Flags implements JsonSerializable, Countable, IteratorAggregate
22
{
23
+ /**
24
+ * @var FlagsType
25
+ */
26
protected $flags = [];
27
28
29
+ * @param array{flags: FlagsType} $state
30
31
public static function __set_state(array $state): Flags
32
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;
0 commit comments