Skip to content

Commit

Permalink
assignProperties() -> populateProperties()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Sep 11, 2024
1 parent b75829e commit 104c23e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AbstractActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public function set(string $name, mixed $value): void
*
* {@see properties()}
*/
public function assignProperties(array $values): void
public function populateProperties(array $values): void
{
$values = array_intersect_key($values, array_flip($this->properties()));

Expand Down
2 changes: 1 addition & 1 deletion tests/ActiveQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,7 @@ public function testOldPropertyAfterInsertAndUpdate(): void

$customer = new Customer();

$customer->assignProperties([
$customer->populateProperties([
'email' => '[email protected]',
'name' => 'Jack',
'address' => '123 Ocean Dr',
Expand Down
2 changes: 1 addition & 1 deletion tests/ActiveRecordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public function testSetProperties(): void

$customer = new Customer();

$customer->assignProperties($properties);
$customer->populateProperties($properties);

$this->assertTrue($customer->save());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/MagicActiveRecordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public function testAssignProperties(): void

$customer = new Customer();

$customer->assignProperties($properties);
$customer->populateProperties($properties);

$this->assertTrue($customer->save());
}
Expand Down

0 comments on commit 104c23e

Please sign in to comment.