8000 minor #27402 [HttpFoundation] Change PHPDoc in ResponseHeaderBag::get… · symfony/symfony@785b431 · GitHub
[go: up one dir, main page]

Skip to content

Commit 785b431

Browse files
committed
minor #27402 [HttpFoundation] Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs (dborsatto)
This PR was merged into the 2.8 branch. Discussion ---------- [HttpFoundation] Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs | Q | A | ------------- | --- | Branch? | master <!-- see below --> | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | none Hello, I'm proposing a very small change to `ResponseHeaderBag` in the HttpFoundation component. The change involves changing the PHPDoc return type of `getCookies()` from a simple `array` to `Cookie[]`. This way, IDEs will play nicely and understand that the returned value is in fact an array of Cookie objects. This is the current behavior: ![Before PR](https://user-images.githubusercontent.com/94651/40648899-d6690f84-632f-11e8-8e43-e09d71b9ccec.png) whereas with the proposed change, the IDE correctly understands the type: ![After PR](https://user-images.githubusercontent.com/94651/40648980-109621c4-6330-11e8-8ead-f176307e5bda.png) Commits ------- 479aa90 Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
2 parents 518ec86 + 479aa90 commit 785b431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function removeCookie($name, $path = '/', $domain = null)
160160
*
161161
* @param string $format
162162
*
163-
* @return array
163+
* @return Cookie[]
164164
*
165165
* @throws \InvalidArgumentException When the $format is invalid
166166
*/

0 commit comments

Comments
 (0)
0