/** * Return document root * * @SuppressWarnings(PHPMD.Superglobals) * @return string */ public static function getDocRoot() { $result = '.'; $root = Arr::key('DOCUMENT_ROOT', $_SERVER, true); if ($root) { $result = $root; } $result = FS::clean($result); $result = FS::real($result); if (!$result) { $result = FS::real('.'); // @codeCoverageIgnore } return $result; }