Added some missing typehints

This commit is contained in:
Chris Kankiewicz
2020-10-04 18:25:10 -07:00
parent aea533d3b6
commit 92ed495ca9
3 changed files with 17 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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(

View File

@@ -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);