File tree Expand file tree Collapse file tree 1 file changed +10
-20
lines changed
Expand file tree Collapse file tree 1 file changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -261,26 +261,6 @@ protected function mergeData()
261261 * @author ito
262262 */
263263 private function fieldAdjustment ($ data )
264- {
265- // Entity化した際に発生した差分を吸収
266- $ data = $ this ->adjustmentDifference ($ data );
267- $ sampleEntity = $ this ->handleNewEntity ($ data );
268- // バリデーションエラーになったフィールドをセット
269- foreach ($ sampleEntity ->invalid () as $ key => $ value ) {
270- // ファイル形式のデータ場合、フィールドにセットしない
271- if ($ this ->isFileData ($ value )) {
272- continue ;
273- }
274- $ data [$ key ] = $ value ;
275- }
276- return $ data ;
277- }
278-
279- /**
280- * adjustmentDifference
281- * @author ito
282- */
283- private function adjustmentDifference ($ data )
284264 {
285265 $ adjustment = function ($ data ) use (&$ adjustment )
286266 {
@@ -319,10 +299,20 @@ private function adjustmentDifference($data)
319299 unset($ data [$ key ]);
320300 }
321301
302+ // バリデーションエラーになったフィールドをセット
303+ foreach ($ sampleEntity ->invalid () as $ key => $ value ) {
304+ // ファイル形式のデータ場合、フィールドにセットしない
305+ if ($ this ->isFileData ($ value )) {
306+ continue ;
307+ }
308+ $ data [$ key ] = $ value ;
309+ }
310+
322311 return $ data ;
323312 };
324313
325314 return $ adjustment ($ data );
315+
326316 }
327317
328318 /**
You can’t perform that action at this time.
0 commit comments