Completed
Pull Request — master (#597)
by Greg
03:01
created
src/Config/Config.php 2 patches
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,6 +69,7 @@  discard block
 block discarded – undo
69 69
      *   - command.foo.bar.options
70 70
      *   - command.foo.options
71 71
      * If any of these contain an option for "$key", then return its value.
72
+     * @param string $key
72 73
      */
73 74
     public function getWithFallback($key, $group, $prefix = '', $postfix = '.')
74 75
     {
@@ -89,6 +90,7 @@  discard block
 block discarded – undo
89 90
     /**
90 91
      * Works like 'getWithFallback', but merges results from all applicable
91 92
      * groups. Settings from most specific group take precedence.
93
+     * @param string $group
92 94
      */
93 95
     public function getWithMerge($key, $group, $prefix = '', $postfix = '.')
94 96
     {
@@ -160,6 +162,7 @@  discard block
 block discarded – undo
160 162
      * of the provided object is a reference to the object itself. All
161 163
      * setter methods should do this. This test is insufficient to guarentee
162 164
      * that the method is valid, but it would catch almost every misuse.
165
+     * @param string $configurationKey
163 166
      */
164 167
     public function applyConfiguration($object, $configurationKey, $group = '', $prefix = '', $postfix = '')
165 168
     {
@@ -198,9 +201,8 @@  discard block
 block discarded – undo
198 201
      * Return the default value for a given configuration item.
199 202
      *
200 203
      * @param string $key
201
-     * @param mixed $defaultOverride
202 204
      *
203
-     * @return mixed
205
+     * @return boolean
204 206
      */
205 207
     public function hasDefault($key)
206 208
     {
@@ -211,7 +213,7 @@  discard block
 block discarded – undo
211 213
      * Return the default value for a given configuration item.
212 214
      *
213 215
      * @param string $key
214
-     * @param mixed $defaultOverride
216
+     * @param string|null $defaultOverride
215 217
      *
216 218
      * @return mixed
217 219
      */
@@ -262,7 +264,6 @@  discard block
 block discarded – undo
262 264
     }
263 265
 
264 266
     /**
265
-     * @param bool $simulated
266 267
      *
267 268
      * @return $this
268 269
      */
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
         $result = [];
97 97
         if ($this->has($configKey)) {
98 98
             $result = $this->get($configKey);
99
-        }
100
-        elseif ($this->hasDefault($configKey)) {
99
+        } elseif ($this->hasDefault($configKey)) {
101 100
             $result = $this->getDefault($configKey);
102 101
         }
103 102
         if (!is_array($result)) {
Please login to merge, or discard this patch.