package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -24,7 +24,7 @@ class RequestStack
/**
* @var Request[]
*/
private $requests = [];
private array $requests = [];
/**
* Pushes a Request on the stack.
@@ -44,10 +44,8 @@ class RequestStack
*
* This method should generally not be called directly as the stack
* management should be taken care of by the application itself.
*
* @return Request|null
*/
public function pop()
public function pop(): ?Request
{
if (!$this->requests) {
return null;
@@ -56,10 +54,7 @@ class RequestStack
return array_pop($this->requests);
}
/**
* @return Request|null
*/
public function getCurrentRequest()
public function getCurrentRequest(): ?Request
{
return end($this->requests) ?: null;
}
@@ -80,20 +75,6 @@ class RequestStack
return $this->requests[0];
}
/**
* Gets the master request.
*
* @return Request|null
*
* @deprecated since symfony/http-foundation 5.3, use getMainRequest() instead
*/
public function getMasterRequest()
{
trigger_deprecation('symfony/http-foundation', '5.3', '"%s()" is deprecated, use "getMainRequest()" instead.', __METHOD__);
return $this->getMainRequest();
}
/**
* Returns the parent request of the current.
*
@@ -102,10 +83,8 @@ class RequestStack
* like ESI support.
*
* If current Request is the main request, it returns null.
*
* @return Request|null
*/
public function getParentRequest()
public function getParentRequest(): ?Request
{
$pos = \count($this->requests) - 2;