|
@@ -2,12 +2,13 @@
|
|
|
|
|
|
namespace Mpociot\ApiDoc\Tools\Traits;
|
|
|
|
|
|
-trait ParamHelpers {
|
|
|
-
|
|
|
+trait ParamHelpers
|
|
|
+{
|
|
|
/**
|
|
|
- * Create proper arrays from dot-noted parameter names
|
|
|
+ * Create proper arrays from dot-noted parameter names.
|
|
|
*
|
|
|
* @param array $params
|
|
|
+ *
|
|
|
* @return array
|
|
|
*/
|
|
|
protected function cleanParams(array $params)
|
|
@@ -16,15 +17,17 @@ trait ParamHelpers {
|
|
|
foreach ($params as $name => $details) {
|
|
|
$this->cleanValueFrom($name, $details['value'], $values);
|
|
|
}
|
|
|
+
|
|
|
return $values;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Converts dot notation names to arrays and sets the value at the right depth
|
|
|
+ * Converts dot notation names to arrays and sets the value at the right depth.
|
|
|
*
|
|
|
* @param string $name
|
|
|
* @param mixed $value
|
|
|
* @param array $values The array that holds the result
|
|
|
+ *
|
|
|
* @return void
|
|
|
*/
|
|
|
protected function cleanValueFrom($name, $value, array &$values = [])
|