Skip to content

Commit

Permalink
fix: Ensure multisite->enabled() returns a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmackay committed Nov 12, 2018
1 parent 1976517 commit d975f28
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/App/Multisite/MultisiteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ public function __construct($config, SiteRepository $repo, Dispatcher $events)
$this->events = $events;
}

public function getDomain()
public function getDomain() : string
{
return $this->domain;
}

public function enabled()
public function enabled() : bool
{
return $this->enabled;
return (bool) $this->enabled;
}

/**
* @param string $host
* @return void
* @throws SiteNotFoundException
*/
public function setSiteFromHost($host)
public function setSiteFromHost(string $host)
{
// @todo validate host?
Expand Down Expand Up @@ -74,7 +74,7 @@ public function setSiteFromHost($host)
* @return void
* @throws SiteNotFoundException
*/
public function setSiteById($siteId)
public function setSiteById(int $siteId)
{
$site = $this->repo->getById($siteId);

Expand Down

0 comments on commit d975f28

Please sign in to comment.