@@ -117,7 +117,7 @@ public function getValue(): string
117117 /**
118118 * {@inheritDoc}
119119 */
120- public function withValue (string $ value ): self
120+ public function withValue (string $ value ): CookieInterface
121121 {
122122 if ($ value === $ this ->value ) {
123123 return $ this ;
@@ -156,7 +156,7 @@ public function isExpired(): bool
156156 /**
157157 * {@inheritDoc}
158158 */
159- public function expire (): self
159+ public function expire (): CookieInterface
160160 {
161161 if ($ this ->isExpired ()) {
162162 return $ this ;
@@ -172,7 +172,7 @@ public function expire(): self
172172 *
173173 * @throws InvalidArgumentException if the expire time is not valid.
174174 */
175- public function withExpires ($ expire = null ): self
175+ public function withExpires ($ expire = null ): CookieInterface
176176 {
177177 if ($ expire === $ this ->expires ) {
178178 return $ this ;
@@ -194,7 +194,7 @@ public function getDomain(): ?string
194194 /**
195195 * {@inheritDoc}
196196 */
197- public function withDomain (?string $ domain ): self
197+ public function withDomain (?string $ domain ): CookieInterface
198198 {
199199 if ($ domain === $ this ->domain ) {
200200 return $ this ;
@@ -216,7 +216,7 @@ public function getPath(): ?string
216216 /**
217217 * {@inheritDoc}
218218 */
219- public function withPath (?string $ path ): self
219+ public function withPath (?string $ path ): CookieInterface
220220 {
221221 if ($ path === $ this ->path ) {
222222 return $ this ;
@@ -238,7 +238,7 @@ public function isSecure(): bool
238238 /**
239239 * {@inheritDoc}
240240 */
241- public function withSecure (bool $ secure = true ): self
241+ public function withSecure (bool $ secure = true ): CookieInterface
242242 {
243243 if ($ secure === $ this ->secure ) {
244244 return $ this ;
@@ -260,7 +260,7 @@ public function isHttpOnly(): bool
260260 /**
261261 * {@inheritDoc}
262262 */
263- public function withHttpOnly (bool $ httpOnly = true ): self
263+ public function withHttpOnly (bool $ httpOnly = true ): CookieInterface
264264 {
265265 if ($ httpOnly === $ this ->httpOnly ) {
266266 return $ this ;
@@ -284,7 +284,7 @@ public function getSameSite(): ?string
284284 *
285285 * @throws InvalidArgumentException if the sameSite is not valid.
286286 */
287- public function withSameSite (?string $ sameSite ): self
287+ public function withSameSite (?string $ sameSite ): CookieInterface
288288 {
289289 if ($ sameSite === $ this ->sameSite ) {
290290 return $ this ;
0 commit comments