mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
Introduce type hinting in methods prototype (PHP >= 7.1)
This commit is contained in:
@@ -56,7 +56,7 @@ class GlobalSearch extends UIBlock
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct($aLastQueries = [], $sId = null)
|
||||
public function __construct(array $aLastQueries = [], ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->SetEndpoint(static::DEFAULT_ENDPOINT_REL_URL);
|
||||
@@ -73,9 +73,10 @@ class GlobalSearch extends UIBlock
|
||||
* @return $this
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function SetEndpoint($sEndpoint, $bRelativeUrl = true)
|
||||
public function SetEndpoint(string $sEndpoint, bool $bRelativeUrl = true)
|
||||
{
|
||||
$this->sEndpoint = (($bRelativeUrl) ? utils::GetAbsoluteUrlAppRoot() : '') . $sEndpoint;
|
||||
$this->sEndpoint = (($bRelativeUrl) ? utils::GetAbsoluteUrlAppRoot() : '').$sEndpoint;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -97,9 +98,10 @@ class GlobalSearch extends UIBlock
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetLastQueries($aLastQueries)
|
||||
public function SetLastQueries(array $aLastQueries)
|
||||
{
|
||||
$this->aLastQueries = $aLastQueries;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user