Skip to content

Commit

Permalink
Merge pull request #347 from staabm/patch-1
Browse files Browse the repository at this point in the history
Added more precise return types on Zend_Controller_Request_Http
  • Loading branch information
develart-projects committed Aug 9, 2023
2 parents 6c5d379 + 17ac38c commit b5c3d04
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions library/Zend/Controller/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ public function setQuery($spec, $value = null)
* @param string $key
* @param mixed $default Default value to use if key not found
* @return mixed Returns null if key does not exist
*
* @phpstan-return ($key is null ? array<string, mixed> : mixed)
*/
public function getQuery($key = null, $default = null)
{
Expand Down Expand Up @@ -313,6 +315,8 @@ public function setPost($spec, $value = null)
* @param string $key
* @param mixed $default Default value to use if key not found
* @return mixed Returns null if key does not exist
*
* @phpstan-return ($key is null ? array<string, mixed> : mixed)
*/
public function getPost($key = null, $default = null)
{
Expand All @@ -332,6 +336,8 @@ public function getPost($key = null, $default = null)
* @param string $key
* @param mixed $default Default value to use if key not found
* @return mixed Returns null if key does not exist
*
* @phpstan-return ($key is null ? array<string, mixed> : mixed)
*/
public function getCookie($key = null, $default = null)
{
Expand All @@ -350,6 +356,8 @@ public function getCookie($key = null, $default = null)
* @param string $key
* @param mixed $default Default value to use if key not found
* @return mixed Returns null if key does not exist
*
* @phpstan-return ($key is null ? array<string, mixed> : mixed)
*/
public function getServer($key = null, $default = null)
{
Expand All @@ -368,6 +376,8 @@ public function getServer($key = null, $default = null)
* @param string $key
* @param mixed $default Default value to use if key not found
* @return mixed Returns null if key does not exist
*
* @phpstan-return ($key is null ? array<string, mixed> : mixed)
*/
public function getEnv($key = null, $default = null)
{
Expand Down

0 comments on commit b5c3d04

Please sign in to comment.