Issue #2887179 by pasan.gamage, jibran, xjm, larowlan: Fix the typehinting in CurrentPathStack

8.4.x
xjm 2017-06-19 09:48:36 -04:00
parent 1bf679baf2
commit 1239197d6a
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
<?php
namespace Drupal\Core\Path;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
/**
@ -46,7 +48,7 @@ class CurrentPathStack {
* @return string
* Returns the path, without leading slashes.
*/
public function getPath($request = NULL) {
public function getPath(Request $request = NULL) {
if (!isset($request)) {
$request = $this->requestStack->getCurrentRequest();
}
@ -67,7 +69,7 @@ class CurrentPathStack {
*
* @return $this
*/
public function setPath($path, $request = NULL) {
public function setPath($path, Request $request = NULL) {
if (!isset($request)) {
$request = $this->requestStack->getCurrentRequest();
}