Skip to content

Commit

Permalink
#hotfix: Fix setParam to else if
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkushman committed Mar 7, 2020
1 parent 908f541 commit 9d63abc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Blocks/ConfigTrait.php
Expand Up @@ -64,13 +64,11 @@ private function setParam(string $param, string $type, string $value, int $tabs
} else {
$value = PhpInterface::PHP_TYPES_BOOL_FALSE;
}
} else {
if ($type !== ApiInterface::RAML_TYPE_NUMBER) {
if ($type === ApiInterface::RAML_TYPE_STRING) {
$value = PhpInterface::QUOTES . $value . PhpInterface::QUOTES;
} else {
settype($value, ApiInterface::RAML_TO_PHP_TYPES[$type]);
}
} else if ($type !== ApiInterface::RAML_TYPE_NUMBER) {
if ($type === ApiInterface::RAML_TYPE_STRING) {
$value = PhpInterface::QUOTES . $value . PhpInterface::QUOTES;
} else {
settype($value, ApiInterface::RAML_TO_PHP_TYPES[$type]);
}
}
$this->setTabs($tabs);
Expand Down

0 comments on commit 9d63abc

Please sign in to comment.