File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1841,8 +1841,11 @@ protected function transformDataToArray($row, string $type): array
1841
1841
}
1842
1842
1843
1843
// If it validates with entire rules, all fields are needed.
1844
- $ onlyChanged = ($ this ->skipValidation === false && $ this ->cleanValidationRules === false )
1845
- ? false : ($ type === 'update ' );
1844
+ if ($ this ->skipValidation === false && $ this ->cleanValidationRules === false ) {
1845
+ $ onlyChanged = false ;
1846
+ } else {
1847
+ $ onlyChanged = ($ type === 'update ' && $ this ->updateOnlyChanged );
1848
+ }
1846
1849
1847
1850
if ($ this ->useCasts ()) {
1848
1851
if (is_array ($ row )) {
@@ -1862,13 +1865,6 @@ protected function transformDataToArray($row, string $type): array
1862
1865
// properties representing the collection elements, we need to grab
1863
1866
// them as an array.
1864
1867
elseif (is_object ($ row ) && ! $ row instanceof stdClass) {
1865
- // If it validates with entire rules, all fields are needed.
1866
- if ($ this ->skipValidation === false && $ this ->cleanValidationRules === false ) {
1867
- $ onlyChanged = false ;
1868
- } else {
1869
- $ onlyChanged = ($ type === 'update ' && $ this ->updateOnlyChanged );
1870
- }
1871
-
1872
1868
$ row = $ this ->objectToArray ($ row , $ onlyChanged , true );
1873
1869
}
1874
1870
You can’t perform that action at this time.
0 commit comments