Skip to content

Commit deca226

Browse files
committed
fix: php stan level 10
1 parent ee663a6 commit deca226

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/Builders/CacheHeaderBuilder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Datetime;
66
use SmartonDev\HttpCache\Contracts\HttpHeaderBuilderInterface;
7+
use SmartonDev\HttpCache\Exceptions\DateMalformedStringException;
78
use SmartonDev\HttpCache\Helpers\HttpHeaderHelper;
89
use SmartonDev\HttpCache\Helpers\TimeHelper;
910

@@ -107,7 +108,7 @@ private function resetIfNoCache(): static
107108
*
108109
* @param int|string|Datetime $expires int timestamp, string date (DateTime input) or DateTime object
109110
* @return static
110-
* @throws \DateMalformedStringException
111+
* @throws DateMalformedStringException
111112
*/
112113
public function expires(int|string|Datetime $expires): static
113114
{
@@ -123,7 +124,7 @@ public function expires(int|string|Datetime $expires): static
123124
*
124125
* @param int|string|Datetime $expires int timestamp, string date (DateTime input) or DateTime object
125126
* @return static
126-
* @throws \DateMalformedStringException
127+
* @throws DateMalformedStringException
127128
*/
128129
public function withExpires(int|string|DateTime $expires): static
129130
{
@@ -156,7 +157,7 @@ public function withoutExpires(): static
156157
*
157158
* @param int|string|Datetime $lastModified int timestamp, string date (DateTime input) or DateTime object
158159
* @return static
159-
* @throws \DateMalformedStringException
160+
* @throws DateMalformedStringException
160161
*/
161162
public function lastModified(int|string|DateTime $lastModified): static
162163
{
@@ -172,7 +173,7 @@ public function lastModified(int|string|DateTime $lastModified): static
172173
*
173174
* @param int|string|Datetime $lastModified int timestamp, string date (DateTime input) or DateTime object
174175
* @return static
175-
* @throws \DateMalformedStringException
176+
* @throws DateMalformedStringException
176177
*/
177178
public function withLastModified(int|string|DateTime $lastModified): static
178179
{

src/Matchers/ModifiedMatcher.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace SmartonDev\HttpCache\Matchers;
44

5+
use SmartonDev\HttpCache\Exceptions\DateMalformedStringException;
56
use SmartonDev\HttpCache\Helpers\HttpHeaderHelper;
67
use SmartonDev\HttpCache\Helpers\TimeHelper;
78

@@ -77,7 +78,7 @@ public function isInvalidIfModifiedSinceHeader(): bool
7778
}
7879

7980
/**
80-
* @throws \DateMalformedStringException
81+
* @throws DateMalformedStringException
8182
*/
8283
public function getIfModifiedSinceHeaderAsTimestamp(): ?int
8384
{
@@ -105,7 +106,7 @@ public function hasIfUnmodifiedSinceHeader(): bool
105106
}
106107

107108
/**
108-
* @throws \DateMalformedStringException
109+
* @throws DateMalformedStringException
109110
*/
110111
public function getIfUnmodifiedSinceHeaderAsTimestamp(): ?int
111112
{
@@ -138,7 +139,7 @@ public function isInvalidIfUnmodifiedSinceHeader(): bool
138139

139140
/**
140141
* Modified match result.
141-
* @throws \DateMalformedStringException
142+
* @throws DateMalformedStringException
142143
*/
143144
public function matches(int|string|\DateTime $baseData): ModifiedMatcherResult
144145
{

0 commit comments

Comments
 (0)