1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

Cleaning up Parameter::getValue()

This commit is contained in:
Michael Dowling 2013-10-02 13:33:40 -07:00
parent dd22735666
commit 1f773af551

View File

@ -189,9 +189,11 @@ class Parameter
*/
public function getValue($value)
{
return $this->static || ($this->default !== null && $value === null && ($this->type != 'boolean' || $value !== false))
? $this->default
: $value;
if ($this->static || ($this->default !== null && $value === null)) {
return $this->default;
}
return $value;
}
/**