@@ -116,6 +116,8 @@ public function set(string $key, $value, $expires = null): self
116116 *
117117 * - its age in seconds is less than or equal to `$maxAge`, or
118118 * - `$maxAge` is `0`
119+ *
120+ * @phpstan-impure
119121 */
120122 public function has (string $ key , ?int $ maxAge = null ): bool
121123 {
@@ -148,6 +150,8 @@ public function has(string $key, ?int $maxAge = null): bool
148150 * - `$maxAge` is `0`
149151 *
150152 * @return mixed|null `null` if the item has expired or doesn't exist.
153+ *
154+ * @phpstan-impure
151155 */
152156 public function get (string $ key , ?int $ maxAge = null )
153157 {
@@ -182,6 +186,8 @@ public function get(string $key, ?int $maxAge = null)
182186 * @return T|null `null` if the item has expired or doesn't exist.
183187 * @throws AssertionFailedException if the item stored under `$key` is not
184188 * an instance of `$class`.
189+ *
190+ * @phpstan-impure
185191 */
186192 public function getInstanceOf (string $ key , string $ class , ?int $ maxAge = null ): ?object
187193 {
@@ -200,6 +206,8 @@ public function getInstanceOf(string $key, string $class, ?int $maxAge = null):
200206 * @return mixed[]|null `null` if the item has expired or doesn't exist.
201207 * @throws AssertionFailedException if the item stored under `$key` is not
202208 * an array.
209+ *
210+ * @phpstan-impure
203211 */
204212 public function getArray (string $ key , ?int $ maxAge = null ): ?array
205213 {
@@ -218,6 +226,8 @@ public function getArray(string $key, ?int $maxAge = null): ?array
218226 * @return int|null `null` if the item has expired or doesn't exist.
219227 * @throws AssertionFailedException if the item stored under `$key` is not
220228 * an integer.
229+ *
230+ * @phpstan-impure
221231 */
222232 public function getInt (string $ key , ?int $ maxAge = null ): ?int
223233 {
@@ -236,6 +246,8 @@ public function getInt(string $key, ?int $maxAge = null): ?int
236246 * @return string|null `null` if the item has expired or doesn't exist.
237247 * @throws AssertionFailedException if the item stored under `$key` is not a
238248 * string.
249+ *
250+ * @phpstan-impure
239251 */
240252 public function getString (string $ key , ?int $ maxAge = null ): ?string
241253 {
@@ -319,6 +331,8 @@ public function flush(): self
319331 * Unix timestamp representing its expiration time, or an integer
320332 * representing its lifetime in seconds.
321333 * @return T
334+ *
335+ * @phpstan-impure
322336 */
323337 public function maybeGet (string $ key , callable $ callback , $ expires = null )
324338 {
@@ -341,6 +355,8 @@ public function maybeGet(string $key, callable $callback, $expires = null)
341355 *
342356 * - their age in seconds is less than or equal to `$maxAge`, or
343357 * - `$maxAge` is `0`
358+ *
359+ * @phpstan-impure
344360 */
345361 public function getItemCount (?int $ maxAge = null ): int
346362 {
@@ -373,6 +389,8 @@ public function getItemCount(?int $maxAge = null): int
373389 * - `$maxAge` is `0`
374390 *
375391 * @return string[]
392+ *
393+ * @phpstan-impure
376394 */
377395 public function getAllKeys (?int $ maxAge = null ): array
378396 {
0 commit comments