Skip to content

Commit

Permalink
Merge eba414e into 22c1418
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredtking committed Apr 16, 2024
2 parents 22c1418 + eba414e commit 9c4314a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Driver/AbstractDriver.php
Expand Up @@ -76,11 +76,11 @@ protected function prefixWhere(array $where, string $tablename): array
// handles $where[property] = value
if (!is_numeric($key)) {
$return[] = [$this->prefixColumn($key, $tablename), $condition];
// handles $where[] = [property, value, '=']
// handles $where[] = [property, value, '=']
} elseif (is_array($condition)) {
$condition[0] = $this->prefixColumn($condition[0], $tablename);
$return[] = $condition;
// handles raw SQL - do nothing
// handles raw SQL - do nothing
} else {
$return[] = [$condition];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Hydrator.php
Expand Up @@ -54,7 +54,7 @@ public static function hydrate(array $result, string|Model $modelClass, array $e
if (isset($relationships[$id])) {
if ($property->persisted) {
$models[$j]->setRelation($k, $relationships[$id]);
// older style properties do not support this type of hydration
// older style properties do not support this type of hydration
} else {
$models[$j]->hydrateValue($k, $relationships[$id]);
}
Expand All @@ -67,7 +67,7 @@ public static function hydrate(array $result, string|Model $modelClass, array $e
if (isset($relationships[$id])) {
if ($property->persisted) {
$models[$j]->setRelation($k, $relationships[$id]);
// older style properties do not support this type of hydration
// older style properties do not support this type of hydration
} else {
$models[$j]->hydrateValue($k, $relationships[$id]);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Query.php
Expand Up @@ -155,10 +155,10 @@ public function where(array|string $where, mixed $value = null, string|null $con
$args = func_num_args();
if ($args > 2) {
$this->where[] = [$where, $value, $condition];
// handles ii.
// handles ii.
} elseif (2 == $args) {
$this->where[$where] = $value;
// handles iv.
// handles iv.
} else {
$this->where[] = $where;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/IteratorTest.php
Expand Up @@ -169,7 +169,7 @@ public function testForeachChangingCount()
if (51 == $i) {
self::$count = 300;
$this->assertCount(300, self::$iterator);
// simulate decreasing the # of records midway
// simulate decreasing the # of records midway
} elseif (101 == $i) {
self::$count = 26;
$this->assertCount(26, self::$iterator);
Expand Down

0 comments on commit 9c4314a

Please sign in to comment.