Skip to content

Commit 0fd9827

Browse files
committed
refactor: run rector
1 parent 845b663 commit 0fd9827

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

system/Entity/Entity.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private function hasChangedAttributes(?string $key = null): bool
272272
{
273273
// If no parameter was given then check all attributes
274274
if ($key === null) {
275-
foreach ($this->attributes as $key => $value) {
275+
foreach (array_keys($this->attributes) as $key) {
276276
if ($this->isChanged($key)) {
277277
return true;
278278
}
@@ -536,13 +536,11 @@ public function __get(string $key)
536536
*/
537537
private function _getCastData(string $key, array $data)
538538
{
539-
$result = null;
540-
541539
if (array_key_exists($key, $data)) {
542-
$result = $this->castAs($data[$key], $key);
540+
return $this->castAs($data[$key], $key);
543541
}
544542

545-
return $result;
543+
return null;
546544
}
547545

548546
/**

0 commit comments

Comments
 (0)