aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Configuration.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-01-01 11:26:56 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-01 11:26:56 +0100
commit3f6aa42b817145a3b00f4d615f87728b55c4413a (patch)
treee5b31941b0acc3a2f4c47e4846afcfe987b9852f /lib/Minz/Configuration.php
parent77e9877316fcfacb26799afdf32d94c8411da80e (diff)
Fix most PHPDocs errors (#4107)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types
Diffstat (limited to 'lib/Minz/Configuration.php')
-rw-r--r--lib/Minz/Configuration.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php
index 9752c21eb..539b1da62 100644
--- a/lib/Minz/Configuration.php
+++ b/lib/Minz/Configuration.php
@@ -12,10 +12,10 @@ class Minz_Configuration {
/**
* Add a new configuration to the list of configuration.
*
- * @param $namespace the name of the current configuration
- * @param $config_filename the filename of the configuration
- * @param $default_filename a filename containing default values for the configuration
- * @param $configuration_setter an optional helper to set values in configuration
+ * @param string $namespace the name of the current configuration
+ * @param string $config_filename the filename of the configuration
+ * @param string $default_filename a filename containing default values for the configuration
+ * @param object $configuration_setter an optional helper to set values in configuration
*/
public static function register($namespace, $config_filename, $default_filename = null, $configuration_setter = null) {
self::$config_list[$namespace] = new Minz_Configuration(
@@ -26,8 +26,8 @@ class Minz_Configuration {
/**
* Parse a file and return its data.
*
- * @param $filename the name of the file to parse.
- * @return an array of values
+ * @param string $filename the name of the file to parse.
+ * @return array of values
* @throws Minz_FileNotExistException if the file does not exist or is invalid.
*/
public static function load($filename) {
@@ -42,7 +42,7 @@ class Minz_Configuration {
/**
* Return the configuration related to a given namespace.
*
- * @param $namespace the name of the configuration to get.
+ * @param string $namespace the name of the configuration to get.
* @return Minz_Configuration object
* @throws Minz_ConfigurationNamespaceException if the namespace does not exist.
*/
@@ -102,10 +102,10 @@ class Minz_Configuration {
/**
* Create a new Minz_Configuration object.
*
- * @param $namespace the name of the current configuration.
- * @param $config_filename the file containing configuration values.
- * @param $default_filename the file containing default values, null by default.
- * @param $configuration_setter an optional helper to set values in configuration
+ * @param string $namespace the name of the current configuration.
+ * @param string $config_filename the file containing configuration values.
+ * @param string $default_filename the file containing default values, null by default.
+ * @param object $configuration_setter an optional helper to set values in configuration
*/
private function __construct($namespace, $config_filename, $default_filename = null, $configuration_setter = null) {
$this->namespace = $namespace;
@@ -130,7 +130,7 @@ class Minz_Configuration {
/**
* Set a configuration setter for the current configuration.
- * @param $configuration_setter the setter to call when modifying data. It
+ * @param object $configuration_setter the setter to call when modifying data. It
* must implement an handle($key, $value) method.
*/
public function _configurationSetter($configuration_setter) {
@@ -155,8 +155,8 @@ class Minz_Configuration {
/**
* Return the value of the given param.
*
- * @param $key the name of the param.
- * @param $default default value to return if key does not exist.
+ * @param string $key the name of the param.
+ * @param mixed $default default value to return if key does not exist.
* @return mixed value corresponding to the key.
* @throws Minz_ConfigurationParamException if the param does not exist
*/
@@ -181,8 +181,8 @@ class Minz_Configuration {
/**
* Set or remove a param.
*
- * @param $key the param name to set.
- * @param $value the value to set. If null, the key is removed from the configuration.
+ * @param string $key the param name to set.
+ * @param mixed $value the value to set. If null, the key is removed from the configuration.
*/
public function _param($key, $value = null) {
if (!is_null($this->configuration_setter) && $this->configuration_setter->support($key)) {