Skip to content

Commit ddb31d2

Browse files
author
Anton Shevchuk
committed
Updated codestyle
1 parent c80ce30 commit ddb31d2

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/Common/Options.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ trait Options
4747
/**
4848
* @var array options store
4949
*/
50-
protected $options;
50+
protected $options = [];
5151

5252
/**
5353
* Get option by key
@@ -105,7 +105,7 @@ public function getOptions(): array
105105
*
106106
* @return void
107107
*/
108-
public function setOptions(array $options = null): void
108+
public function setOptions(?array $options = null): void
109109
{
110110
// store options by default
111111
$this->options = (array)$options;

src/Db/Table.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ public static function findWhere(...$where): array
293293
$whereAndTerms[] = $self->name . '.' . $keyName . ' IN (' . $keyValue . ')';
294294
} elseif (null === $keyValue) {
295295
$whereAndTerms[] = $self->name . '.' . $keyName . ' IS NULL';
296-
} elseif (is_string($keyValue) && ('%' === substr($keyValue, 0, 1) || '%' === substr($keyValue, -1, 1))) {
296+
} elseif (
297+
is_string($keyValue)
298+
&& ('%' === substr($keyValue, 0, 1) || '%' === substr($keyValue, -1, 1))
299+
) {
297300
$whereAndTerms[] = $self->name . '.' . $keyName . ' LIKE ?';
298301
$whereParams[] = $keyValue;
299302
} else {

0 commit comments

Comments
 (0)