Added missing comments into Env class (#633)

This commit is contained in:
Roman Kelesidis 2023-03-20 11:42:20 +07:00 committed by GitHub
commit 068f58847f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,11 @@
<?php <?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; namespace TorrentPier;
@ -6,6 +13,10 @@ use Dotenv\Repository\Adapter\PutenvAdapter;
use Dotenv\Repository\RepositoryBuilder; use Dotenv\Repository\RepositoryBuilder;
use PhpOption\Option; use PhpOption\Option;
/**
* Class Env
* @package TorrentPier
*/
class Env class Env
{ {
/** /**
@ -67,8 +78,8 @@ class Env
/** /**
* Gets the value of an environment variable. * Gets the value of an environment variable.
* *
* @param string $key * @param string $key
* @param mixed $default * @param mixed $default
* @return mixed * @return mixed
*/ */
public static function get($key, $default = null) public static function get($key, $default = null)
@ -96,6 +107,6 @@ class Env
return $value; return $value;
}) })
->getOrCall(fn () => value($default)); ->getOrCall(fn() => value($default));
} }
} }