mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-18 05:58:20 +01:00
Simplify conditional returns
This commit is contained in:
parent
e9511a95f0
commit
bc2fa532d6
@ -362,10 +362,7 @@ class Page extends AbstractPage
|
||||
*/
|
||||
public function isDeletable(): bool
|
||||
{
|
||||
if ($this->hasChildren() || $this->isSite() || $this->isIndexPage() || $this->isErrorPage()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !($this->hasChildren() || $this->isSite() || $this->isIndexPage() || $this->isErrorPage());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,10 +142,7 @@ class HTTPRequest
|
||||
*/
|
||||
public static function isHTTPS(): bool
|
||||
{
|
||||
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' || $_SERVER['SERVER_PORT'] == 443;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user