Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -634,23 +634,16 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
||||
|
||||
/**
|
||||
* Records that an event took place.
|
||||
*
|
||||
* @param Request $request A Request instance
|
||||
* @param string $event The event name
|
||||
*/
|
||||
private function record(Request $request, $event)
|
||||
private function record(Request $request, string $event)
|
||||
{
|
||||
$this->traces[$this->getTraceKey($request)][] = $event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the key we use in the "trace" array for a given request.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getTraceKey(Request $request)
|
||||
private function getTraceKey(Request $request): string
|
||||
{
|
||||
$path = $request->getPathInfo();
|
||||
if ($qs = $request->getQueryString()) {
|
||||
@@ -663,12 +656,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
||||
/**
|
||||
* Checks whether the given (cached) response may be served as "stale" when a revalidation
|
||||
* is currently in progress.
|
||||
*
|
||||
* @param Response $entry
|
||||
*
|
||||
* @return bool true when the stale response may be served, false otherwise
|
||||
*/
|
||||
private function mayServeStaleWhileRevalidate(Response $entry)
|
||||
private function mayServeStaleWhileRevalidate(Response $entry): bool
|
||||
{
|
||||
$timeout = $entry->headers->getCacheControlDirective('stale-while-revalidate');
|
||||
|
||||
@@ -681,12 +670,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
||||
|
||||
/**
|
||||
* Waits for the store to release a locked entry.
|
||||
*
|
||||
* @param Request $request The request to wait for
|
||||
*
|
||||
* @return bool true if the lock was released before the internal timeout was hit; false if the wait timeout was exceeded
|
||||
*/
|
||||
private function waitForLock(Request $request)
|
||||
private function waitForLock(Request $request): bool
|
||||
{
|
||||
$wait = 0;
|
||||
while ($this->store->isLocked($request) && $wait < 100) {
|
||||
|
Reference in New Issue
Block a user