mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-29 08:40:42 +02:00
Added some missing typehints
This commit is contained in:
@@ -16,7 +16,13 @@ class Config
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/** Get the value of a configuration variable. */
|
||||
/**
|
||||
* Get the value of a configuration variable.
|
||||
*
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get(string $key, $default = null)
|
||||
{
|
||||
try {
|
||||
|
@@ -6,7 +6,11 @@ use RuntimeException;
|
||||
|
||||
final class InvalidConfiguration extends RuntimeException
|
||||
{
|
||||
/** Create an exception from a configuration option and value. */
|
||||
/**
|
||||
* Create an exception from a configuration option and value.
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public static function fromConfig(string $option, $value): self
|
||||
{
|
||||
return new static(
|
||||
|
@@ -18,7 +18,11 @@ class Config extends ViewFunction
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/** Retrieve an item from the view config. */
|
||||
/**
|
||||
* Retrieve an item from the view config.
|
||||
*
|
||||
* @param mixed $default
|
||||
*/
|
||||
public function __invoke(string $key, $default = null)
|
||||
{
|
||||
return $this->config->get($key, $default);
|
||||
|
Reference in New Issue
Block a user