@@ -260,7 +260,7 @@ public function csvProduct(Request $request, CacheUtil $cacheUtil): array|JsonRe
260260                            $ Productnew  Product ();
261261                            $ this entityManager ->persist ($ Product
262262                        } else  {
263-                             if  (preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'id ' ]])) {
263+                             if  (preg_match ('/^\d+$/ ' , $ row$ headerByKey'id ' ]])) {
264264                                $ Product$ this productRepository ->find ($ row$ headerByKey'id ' ]]);
265265                                if  (!$ Product
266266                                    $ messagetrans ('admin.common.csv_invalid_not_found ' , ['%line% '  => $ line'%name% '  => $ headerByKey'id ' ]]);
@@ -299,7 +299,7 @@ public function csvProduct(Request $request, CacheUtil $cacheUtil): array|JsonRe
299299                            $ messagetrans ('admin.common.csv_invalid_required ' , ['%line% '  => $ line'%name% '  => $ headerByKey'status ' ]]);
300300                            $ this addErrors ($ message
301301                        } else  {
302-                             if  (preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'status ' ]])) {
302+                             if  (preg_match ('/^\d+$/ ' , $ row$ headerByKey'status ' ]])) {
303303                                $ ProductStatus$ this productStatusRepository ->find ($ row$ headerByKey'status ' ]]);
304304                                if  (!$ ProductStatus
305305                                    $ messagetrans ('admin.common.csv_invalid_not_found ' , ['%line% '  => $ line'%name% '  => $ headerByKey'status ' ]]);
@@ -340,7 +340,7 @@ public function csvProduct(Request $request, CacheUtil $cacheUtil): array|JsonRe
340340
341341                        if  (isset ($ row$ headerByKey'description_detail ' ]])) {
342342                            if  (StringUtil::isNotBlank ($ row$ headerByKey'description_detail ' ]])) {
343-                                 if  (mb_strlen (( string )  $ row$ headerByKey'description_detail ' ]]) > $ this eccubeConfig ['eccube_ltext_len ' ]) {
343+                                 if  (mb_strlen ($ row$ headerByKey'description_detail ' ]]) > $ this eccubeConfig ['eccube_ltext_len ' ]) {
344344                                    $ messagetrans ('admin.common.csv_invalid_description_detail_upper_limit ' , [
345345                                        '%line% '  => $ line
346346                                        '%name% '  => $ headerByKey'description_detail ' ],
@@ -452,7 +452,7 @@ public function csvProduct(Request $request, CacheUtil $cacheUtil): array|JsonRe
452452
453453                                    // 規格分類1、2をそれぞれセットし作成 
454454                                    $ ClassCategory1null ;
455-                                     if  (preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'class_category1 ' ]])) {
455+                                     if  (preg_match ('/^\d+$/ ' , $ row$ headerByKey'class_category1 ' ]])) {
456456                                        $ ClassCategory1$ this classCategoryRepository ->find ($ row$ headerByKey'class_category1 ' ]]);
457457                                        if  (!$ ClassCategory1
458458                                            $ messagetrans ('admin.common.csv_invalid_not_found ' , ['%line% '  => $ line'%name% '  => $ headerByKey'class_category1 ' ]]);
@@ -466,7 +466,7 @@ public function csvProduct(Request $request, CacheUtil $cacheUtil): array|JsonRe
466466                                    }
467467
468468                                    if  (isset ($ row$ headerByKey'class_category2 ' ]]) && StringUtil::isNotBlank ($ row$ headerByKey'class_category2 ' ]])) {
469-                                         if  (preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'class_category2 ' ]])) {
469+                                         if  (preg_match ('/^\d+$/ ' , $ row$ headerByKey'class_category2 ' ]])) {
470470                                            $ ClassCategory2$ this classCategoryRepository ->find ($ row$ headerByKey'class_category2 ' ]]);
471471                                            if  (!$ ClassCategory2
472472                                                $ messagetrans ('admin.common.csv_invalid_not_found ' , ['%line% '  => $ line'%name% '  => $ headerByKey'class_category2 ' ]]);
@@ -766,8 +766,8 @@ public function csvCategory(Request $request, CacheUtil $cacheUtil): array|JsonR
766766                    foreach  ($ dataas  $ row
767767                        /** @var Category $Category */ 
768768                        $ Categorynew  Category ();
769-                         if  (isset ($ row$ headerByKey'id ' ]]) && strlen (( string )  $ row$ headerByKey'id ' ]]) > 0 ) {
770-                             if  (!preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'id ' ]])) {
769+                         if  (isset ($ row$ headerByKey'id ' ]]) && strlen ($ row$ headerByKey'id ' ]]) > 0 ) {
770+                             if  (!preg_match ('/^\d+$/ ' , $ row$ headerByKey'id ' ]])) {
771771                                $ this addErrors (($ datakey () + 1 ).'行目のカテゴリIDが存在しません。 ' );
772772
773773                                return  $ this renderWithError ($ form$ headers
@@ -815,7 +815,7 @@ public function csvCategory(Request $request, CacheUtil $cacheUtil): array|JsonR
815815
816816                        $ ParentCategorynull ;
817817                        if  (isset ($ row$ headerByKey'parent_category_id ' ]]) && StringUtil::isNotBlank ($ row$ headerByKey'parent_category_id ' ]])) {
818-                             if  (!preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'parent_category_id ' ]])) {
818+                             if  (!preg_match ('/^\d+$/ ' , $ row$ headerByKey'parent_category_id ' ]])) {
819819                                $ this addErrors (($ datakey () + 1 ).'行目の親カテゴリIDは数字で入力してください。 ' );
820820
821821                                return  $ this renderWithError ($ form$ headers
@@ -933,8 +933,8 @@ public function csvClassName(Request $request, CacheUtil $cacheUtil): array|Json
933933                        // dump($row,$headerByKey);exit; 
934934                        /** @var ClassName $ClassName */ 
935935                        $ ClassNamenew  ClassName ();
936-                         if  (isset ($ row$ headerByKey'id ' ]]) && strlen (( string )  $ row$ headerByKey'id ' ]]) > 0 ) {
937-                             if  (!preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'id ' ]])) {
936+                         if  (isset ($ row$ headerByKey'id ' ]]) && strlen ($ row$ headerByKey'id ' ]]) > 0 ) {
937+                             if  (!preg_match ('/^\d+$/ ' , $ row$ headerByKey'id ' ]])) {
938938                                $ this addErrors (($ datakey () + 1 ).'行目の規格IDが存在しません。 ' );
939939
940940                                return  $ this renderWithError ($ form$ headers
@@ -1057,8 +1057,8 @@ public function csvClassCategory(Request $request, CacheUtil $cacheUtil): array|
10571057                        /** @var ClassCategory $ClassCategory */ 
10581058                        $ ClassCategorynew  ClassCategory ();
10591059
1060-                         if  (isset ($ row$ headerByKey'id ' ]]) && strlen (( string )  $ row$ headerByKey'id ' ]]) > 0 ) {
1061-                             if  (!preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'id ' ]])) {
1060+                         if  (isset ($ row$ headerByKey'id ' ]]) && strlen ($ row$ headerByKey'id ' ]]) > 0 ) {
1061+                             if  (!preg_match ('/^\d+$/ ' , $ row$ headerByKey'id ' ]])) {
10621062                                $ this addErrors (($ datakey () + 1 ).'行目の規格分類IDが存在しません。 ' );
10631063
10641064                                return  $ this renderWithError ($ form$ headers
@@ -1071,8 +1071,8 @@ public function csvClassCategory(Request $request, CacheUtil $cacheUtil): array|
10711071                            }
10721072                        }
10731073
1074-                         if  (isset ($ row$ headerByKey'class_name_id ' ]]) && strlen (( string )  $ row$ headerByKey'class_name_id ' ]]) > 0 ) {
1075-                             if  (!preg_match ('/^\d+$/ ' , ( string )  $ row$ headerByKey'class_name_id ' ]])) {
1074+                         if  (isset ($ row$ headerByKey'class_name_id ' ]]) && strlen ($ row$ headerByKey'class_name_id ' ]]) > 0 ) {
1075+                             if  (!preg_match ('/^\d+$/ ' , $ row$ headerByKey'class_name_id ' ]])) {
10761076                                $ this addErrors (($ datakey () + 1 ).'行目の規格IDが存在しません。 ' );
10771077
10781078                                return  $ this renderWithError ($ form$ headers
0 commit comments