Skip to content

Commit

Permalink
Updated codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Shevchuk committed Jul 5, 2021
1 parent c80ce30 commit ddb31d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Common/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ trait Options
/**
* @var array options store
*/
protected $options;
protected $options = [];

/**
* Get option by key
Expand Down Expand Up @@ -105,7 +105,7 @@ public function getOptions(): array
*
* @return void
*/
public function setOptions(array $options = null): void
public function setOptions(?array $options = null): void
{
// store options by default
$this->options = (array)$options;
Expand Down
5 changes: 4 additions & 1 deletion src/Db/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ public static function findWhere(...$where): array
$whereAndTerms[] = $self->name . '.' . $keyName . ' IN (' . $keyValue . ')';
} elseif (null === $keyValue) {
$whereAndTerms[] = $self->name . '.' . $keyName . ' IS NULL';
} elseif (is_string($keyValue) && ('%' === substr($keyValue, 0, 1) || '%' === substr($keyValue, -1, 1))) {
} elseif (
is_string($keyValue)
&& ('%' === substr($keyValue, 0, 1) || '%' === substr($keyValue, -1, 1))
) {
$whereAndTerms[] = $self->name . '.' . $keyName . ' LIKE ?';
$whereParams[] = $keyValue;
} else {
Expand Down

0 comments on commit ddb31d2

Please sign in to comment.