Skip to content

Commit

Permalink
[5.8] Rename $cachedSchema property to $cachedScheme in `Routing\…
Browse files Browse the repository at this point in the history
…UrlGenerator`

 - rename `$cachedSchema` property to `$cachedScheme` in `Routing\UrlGenerator`,
 since in laravel#26640 PR property is deprecated;
  • Loading branch information
TBlindaruk committed Dec 3, 2018
1 parent 56d1170 commit 13ca88e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Illuminate/Routing/UrlGenerator.php
Expand Up @@ -62,10 +62,9 @@ class UrlGenerator implements UrlGeneratorContract
/**
* A cached copy of the URL scheme for the current request.
*
* @deprecated In 5.8, this will change to $cachedScheme
* @var string|null
*/
protected $cachedSchema;
protected $cachedScheme;

/**
* The root namespace being applied to controller actions.
Expand Down Expand Up @@ -300,11 +299,11 @@ public function formatScheme($secure = null)
return $secure ? 'https://' : 'http://';
}

if (is_null($this->cachedSchema)) {
$this->cachedSchema = $this->forceScheme ?: $this->request->getScheme().'://';
if (is_null($this->cachedScheme)) {
$this->cachedScheme = $this->forceScheme ?: $this->request->getScheme().'://';
}

return $this->cachedSchema;
return $this->cachedScheme;
}

/**
Expand Down Expand Up @@ -584,7 +583,7 @@ public function getDefaultParameters()
*/
public function forceScheme($scheme)
{
$this->cachedSchema = null;
$this->cachedScheme = null;

$this->forceScheme = $scheme.'://';
}
Expand Down Expand Up @@ -661,7 +660,7 @@ public function setRequest(Request $request)
$this->request = $request;

$this->cachedRoot = null;
$this->cachedSchema = null;
$this->cachedScheme = null;
$this->routeGenerator = null;
}

Expand Down

0 comments on commit 13ca88e

Please sign in to comment.