Skip to content

Commit

Permalink
fixed phpmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mixisLv committed Dec 6, 2019
1 parent 8ace493 commit 17181cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Params/BaseParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function __set($property, $value)
throw new ApiException(get_class($this) . ' does not accepts property: ' . $property);
}

if (method_exists($this, $functionName = 'sanitize' . ucfirst($property))) {
$functionName = 'sanitize' . ucfirst($property);
if (method_exists($this, $functionName)) {
$this->$property = $this->$functionName($value);
} else {
$this->$property = $value;
Expand Down

0 comments on commit 17181cb

Please sign in to comment.