Skip to content

Commit

Permalink
SDK-5618 Wrong value type fix. #163 from spryker-sdk/bugfix/sdk-5618-…
Browse files Browse the repository at this point in the history
…wrong-value-type

Bugfix/sdk 5618 wrong value type
  • Loading branch information
pavelmaksimov25 authored Dec 1, 2023
2 parents b302292 + 7887564 commit 6563df9
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ protected function createIndent(int $level): string
*/
protected function isComplicatedExpression(string $expression): bool
{
return (bool)preg_match('/[\(\)\?]/', $expression) || $this->isClassIdentifier($expression);
return $this->hasComparison($expression) || $this->isClassIdentifier($expression);
}

/**
* @param string $expression
*
* @return bool
*/
protected function hasComparison(string $expression): bool
{
return (bool)preg_match('/if\(.+\)\{|\?.+:/', $expression);
}

/**
Expand Down

0 comments on commit 6563df9

Please sign in to comment.