mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Added missing comments into Env class (#633)
This commit is contained in:
parent
faf2306862
commit
068f58847f
1 changed files with 14 additions and 3 deletions
17
src/Env.php
17
src/Env.php
|
@ -1,4 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||
*
|
||||
* @copyright Copyright (c) 2005-2023 TorrentPier (https://torrentpier.com)
|
||||
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||
*/
|
||||
|
||||
namespace TorrentPier;
|
||||
|
||||
|
@ -6,6 +13,10 @@ use Dotenv\Repository\Adapter\PutenvAdapter;
|
|||
use Dotenv\Repository\RepositoryBuilder;
|
||||
use PhpOption\Option;
|
||||
|
||||
/**
|
||||
* Class Env
|
||||
* @package TorrentPier
|
||||
*/
|
||||
class Env
|
||||
{
|
||||
/**
|
||||
|
@ -67,8 +78,8 @@ class Env
|
|||
/**
|
||||
* Gets the value of an environment variable.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
* @return mixed
|
||||
*/
|
||||
public static function get($key, $default = null)
|
||||
|
@ -96,6 +107,6 @@ class Env
|
|||
|
||||
return $value;
|
||||
})
|
||||
->getOrCall(fn () => value($default));
|
||||
->getOrCall(fn() => value($default));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue