X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp%2FMode.php;h=59a47d8284360bf8838c826ebf52dc45f9105c14;hb=319857edaa1257c885ce7f3a91ee168b95feee10;hp=3e7b9f0d1679a0fa07a362c8393c785d0d1452e9;hpb=322b7c856ca9ba53bd9c7da50dd5c1e3c9197d56;p=friendica.git diff --git a/src/App/Mode.php b/src/App/Mode.php index 3e7b9f0d16..59a47d8284 100644 --- a/src/App/Mode.php +++ b/src/App/Mode.php @@ -68,7 +68,6 @@ class Mode 'objects', 'outbox', 'poco', - 'post', 'pubsub', 'pubsubhubbub', 'receive', @@ -130,7 +129,7 @@ class Mode * * @throws \Exception */ - public function determine(BasePath $basepath, Database $database, Cache $configCache) + public function determine(BasePath $basepath, Database $database, Cache $configCache): Mode { $mode = 0; @@ -178,7 +177,7 @@ class Mode * * @return Mode returns the determined mode */ - public function determineRunMode(bool $isBackend, array $server, Arguments $args, MobileDetect $mobileDetect) + public function determineRunMode(bool $isBackend, array $server, Arguments $args, MobileDetect $mobileDetect): Mode { foreach (self::BACKEND_CONTENT_TYPES as $type) { if (strpos(strtolower($server['HTTP_ACCEPT'] ?? ''), $type) !== false) { @@ -201,7 +200,7 @@ class Mode * * @return bool returns true, if the mode is set */ - public function has($mode) + public function has(int $mode): bool { return ($this->mode & $mode) > 0; } @@ -227,7 +226,7 @@ class Mode * * @return int Execution Mode */ - public function getExecutor() + public function getExecutor(): int { return $this->executor; } @@ -235,9 +234,9 @@ class Mode /** * Install mode is when the local config file is missing or the DB schema hasn't been installed yet. * - * @return bool + * @return bool Whether installation mode is active (local/database configuration files present or not) */ - public function isInstall() + public function isInstall(): bool { return !$this->has(Mode::LOCALCONFIGPRESENT) || !$this->has(MODE::DBCONFIGAVAILABLE); @@ -248,7 +247,7 @@ class Mode * * @return bool */ - public function isNormal() + public function isNormal(): bool { return $this->has(Mode::LOCALCONFIGPRESENT) && $this->has(Mode::DBAVAILABLE) && @@ -261,7 +260,7 @@ class Mode * * @return bool Is it a backend call */ - public function isBackend() + public function isBackend(): bool { return $this->isBackend; } @@ -271,7 +270,7 @@ class Mode * * @return bool true if it was an AJAX request */ - public function isAjax() + public function isAjax(): bool { return $this->isAjax; } @@ -281,7 +280,7 @@ class Mode * * @return bool true if it was an mobile request */ - public function isMobile() + public function isMobile(): bool { return $this->isMobile; } @@ -291,7 +290,7 @@ class Mode * * @return bool true if it was an tablet request */ - public function isTablet() + public function isTablet(): bool { return $this->isTablet; }