Skip to content

Commit

Permalink
Update Sys.php
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Nov 6, 2018
1 parent a2fb237 commit 918fddf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Sys.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ public static function isRoot(): bool
/**
* Returns a home directory of current user.
*
* @return string
* @return string|null
*
* @SuppressWarnings(PHPMD.Superglobals)
*/
public static function getHome(): string
public static function getHome()
{
if (Arr::key('HOMEDRIVE', $_SERVER)) {
return $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];
}

return $_SERVER['HOME'];
return $_SERVER['HOME'] ?? null;
}

/**
Expand Down

0 comments on commit 918fddf

Please sign in to comment.