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 @@ -272,7 +272,7 @@ private function hasChangedAttributes(?string $key = null): bool
272
272
{
273
273
// If no parameter was given then check all attributes
274
274
if ($ key === null ) {
275
- foreach ($ this ->attributes as $ key => $ value ) {
275
+ foreach (array_keys ( $ this ->attributes ) as $ key ) {
276
276
if ($ this ->isChanged ($ key )) {
277
277
return true ;
278
278
}
@@ -536,13 +536,11 @@ public function __get(string $key)
536
536
*/
537
537
private function _getCastData (string $ key , array $ data )
538
538
{
539
- $ result = null ;
540
-
541
539
if (array_key_exists ($ key , $ data )) {
542
- $ result = $ this ->castAs ($ data [$ key ], $ key );
540
+ return $ this ->castAs ($ data [$ key ], $ key );
543
541
}
544
542
545
- return $ result ;
543
+ return null ;
546
544
}
547
545
548
546
/**
You can’t perform that action at this time.
0 commit comments