File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ private function hasChangedAttributes(?string $key = null): bool
273
273
{
274
274
// If no parameter was given then check all attributes
275
275
if ($ key === null ) {
276
- foreach ($ this ->attributes as $ key => $ value ) {
276
+ foreach (array_keys ( $ this ->attributes ) as $ key ) {
277
277
if ($ this ->isChanged ($ key )) {
278
278
return true ;
279
279
}
@@ -537,13 +537,11 @@ public function __get(string $key)
537
537
*/
538
538
private function _getCastData (string $ key , array $ data )
539
539
{
540
- $ result = null ;
541
-
542
540
if (array_key_exists ($ key , $ data )) {
543
- $ result = $ this ->castAs ($ data [$ key ], $ key );
541
+ return $ this ->castAs ($ data [$ key ], $ key );
544
542
}
545
543
546
- return $ result ;
544
+ return null ;
547
545
}
548
546
549
547
/**
You can’t perform that action at this time.
0 commit comments