7
7
/**
8
8
* @template E
9
9
* @template ExtraProperty
10
- *
10
+ *
11
11
* @implements \IteratorAggregate<E>
12
12
* @implements \ArrayAccess<int, E>
13
13
*/
14
- class Collection implements
15
- \IteratorAggregate,
16
- \Serializable,
17
- \Countable,
18
- \ArrayAccess
14
+ class Collection implements \IteratorAggregate, \Serializable, \Countable, \ArrayAccess
19
15
{
20
16
/**
21
17
* The elements of the collection.
@@ -40,7 +36,7 @@ class Collection implements
40
36
*/
41
37
public function __construct (
42
38
array $ elements = [],
43
- array $ extraProperties = []
39
+ array $ extraProperties = [],
44
40
) {
45
41
$ this ->elements = $ elements ;
46
42
$ this ->extraProperties = $ extraProperties ;
@@ -55,8 +51,6 @@ public function __serialize(): array
55
51
}
56
52
57
53
/**
58
- * {@inheritdoc}
59
- *
60
54
* @param string $values
61
55
*/
62
56
public function __unserialize ($ values ): void
@@ -70,7 +64,7 @@ public function __unserialize($values): void
70
64
71
65
/**
72
66
* Returns inner elements collection.
73
- *
67
+ *
74
68
* @return array<E>
75
69
*/
76
70
public function toArray (): array
@@ -79,8 +73,6 @@ public function toArray(): array
79
73
}
80
74
81
75
/**
82
- * {@inheritdoc}
83
- *
84
76
* @deprecated `serialize` method is deprecated, `__serialize` is used instead. See https://php.watch/versions/8.1/serializable-deprecated
85
77
*/
86
78
public function serialize (): string
@@ -96,9 +88,6 @@ public function unserialize($data): void
96
88
$ this ->__unserialize ($ data );
97
89
}
98
90
99
- /**
100
- * {@inheritdoc}
101
- */
102
91
public function count (): int
103
92
{
104
93
return count ($ this ->elements );
@@ -113,10 +102,8 @@ public function getTotalItems(): int
113
102
}
114
103
115
104
/**
116
- * {@inheritdoc}
117
- *
118
105
* @param mixed|null $offset
119
- * @param mixed $value
106
+ *
120
107
* @phpstan-param E $value
121
108
*/
122
109
public function offsetSet ($ offset , $ value ): void
@@ -129,8 +116,6 @@ public function offsetSet($offset, $value): void
129
116
}
130
117
131
118
/**
132
- * {@inheritdoc}
133
- *
134
119
* @param mixed|null $offset
135
120
*/
136
121
public function offsetExists ($ offset ): bool
@@ -139,8 +124,6 @@ public function offsetExists($offset): bool
139
124
}
140
125
141
126
/**
142
- * {@inheritdoc}
143
- *
144
127
* @param mixed|null $offset
145
128
*/
146
129
public function offsetUnset ($ offset ): void
@@ -149,11 +132,10 @@ public function offsetUnset($offset): void
149
132
}
150
133
151
134
/**
152
- * {@inheritdoc}
153
- *
154
135
* @param mixed|null $offset
155
136
*
156
137
* @return mixed|null
138
+ *
157
139
* @phpstan-return E|null
158
140
*/
159
141
public function offsetGet ($ offset ): mixed
@@ -162,8 +144,6 @@ public function offsetGet($offset): mixed
162
144
}
163
145
164
146
/**
165
- * {@inheritdoc}
166
- *
167
147
* @return \ArrayIterator<int, E>
168
148
*/
169
149
public function getIterator (): \ArrayIterator
0 commit comments