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:
parent
dd22735666
commit
1f773af551
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user