@@ -541,7 +541,6 @@ public function status(): JSONResponse
541541 * @return JSONResponse JSON response containing the auto-configuration results
542542 *
543543 * @NoCSRFRequired
544- *
545544 */
546545 public function autoConfigure (): JSONResponse
547546 {
@@ -555,14 +554,14 @@ public function autoConfigure(): JSONResponse
555554 'configuration ' => $ result ,
556555 ]
557556 );
558- } else {
559- return new JSONResponse (
560- [
561- 'success ' => false ,
562- 'message ' => 'No matching registers or schemas found for auto-configuration ' ,
563- ]
564- );
565557 }
558+
559+ return new JSONResponse (
560+ [
561+ 'success ' => false ,
562+ 'message ' => 'No matching registers or schemas found for auto-configuration ' ,
563+ ]
564+ );
566565 } catch (\Exception $ e ) {
567566 $ this ->logger ->error (
568567 'Failed to auto-configure settings ' ,
@@ -702,7 +701,6 @@ public function getSyncStatus(int $minutesBack=10): JSONResponse
702701 * @return JSONResponse JSON response containing sync results
703702 *
704703 * @NoCSRFRequired
705- *
706704 */
707705 public function performSync (int $ minutesBack =0 ): JSONResponse
708706 {
@@ -724,15 +722,15 @@ public function performSync(int $minutesBack=0): JSONResponse
724722 'isOptimized ' => true ,
725723 ]
726724 );
727- } else {
728- // For incremental sync, use the original method.
729- $ result = $ this ->orgSyncSvc ->performManualSync ($ minutesBack );
725+ }//end if
730726
731- if ( $ result [ ' success ' ] === true ) {
732- }
727+ // For incremental sync, use the original method.
728+ $ result = $ this -> orgSyncSvc -> performManualSync ( $ minutesBack );
733729
734- return new JSONResponse ($ result , 500 );
735- }//end if
730+ if ($ result ['success ' ] === true ) {
731+ }
732+
733+ return new JSONResponse ($ result , 500 );
736734 } catch (\Exception $ e ) {
737735 $ this ->logger ->error (
738736 'Manual sync failed ' ,
@@ -853,7 +851,6 @@ public function getVersionInfo(): JSONResponse
853851 * @return JSONResponse JSON response containing reset results.
854852 *
855853 * @NoCSRFRequired
856- *
857854 */
858855 public function resetAutoConfig (): JSONResponse
859856 {
@@ -924,7 +921,6 @@ public function clearCache(): JSONResponse
924921 * @return JSONResponse JSON response containing import results.
925922 *
926923 * @NoCSRFRequired
927- *
928924 */
929925 public function manualImport (): JSONResponse
930926 {
@@ -1054,7 +1050,6 @@ public function forceUpdate(): JSONResponse
10541050 * @return JSONResponse JSON response containing consolidated results
10551051 *
10561052 * @NoCSRFRequired
1057- *
10581053 */
10591054 public function consolidatedAutoConfigure (): JSONResponse
10601055 {
@@ -1066,14 +1061,12 @@ public function consolidatedAutoConfigure(): JSONResponse
10661061 $ results = $ this ->settingsService ->performConsolidatedAutoConfiguration ($ force );
10671062
10681063 // Determine HTTP status based on results.
1064+ $ httpStatus = 200 ;
10691065 if ($ results ['success ' ] === false ) {
10701066 // Multi-status or Server Error.
1071- $ httpStatus = 500 ;
1067+ $ httpStatus = 500 ;
10721068 if (empty ($ results ['errors ' ]) === false ) {
10731069 }
1074- } else {
1075- // Success.
1076- $ httpStatus = 200 ;
10771070 }
10781071
10791072 return new JSONResponse ($ results , $ httpStatus );
@@ -1377,7 +1370,9 @@ public function importArchiMate(): JSONResponse
13771370 ];
13781371
13791372 $ this ->logger ->info ('JSON payload detected. ' , ['options ' => $ options ]);
1380- } else {
1373+ }//end if
1374+
1375+ if (isset ($ options ) === false ) {
13811376 $ this ->logger ->error (
13821377 'No file uploaded or file path provided — DETAILED DEBUG ' ,
13831378 [
@@ -1414,12 +1409,11 @@ public function importArchiMate(): JSONResponse
14141409 // OPTIMIZATION: Use optimized method if available or if explicitly requested.
14151410 $ useOptimized = $ this ->request ->getParam ('useOptimized ' , 'true ' ) === 'true ' ;
14161411 $ hasOptimized = method_exists ($ this ->archiMateService , 'importArchiMateFileFromPathOptimized ' );
1412+ $ this ->logger ->info ('Using STANDARD ArchiMate import method. ' );
1413+ $ result = $ this ->archiMateService ->importArchiMateFileFromPath ($ options );
14171414 if ($ useOptimized === true && $ hasOptimized === true ) {
14181415 $ this ->logger ->info ('Using OPTIMIZED ArchiMate import method. ' );
14191416 $ result = $ this ->archiMateService ->importArchiMateFileFromPathOptimized ($ options );
1420- } else {
1421- $ this ->logger ->info ('Using STANDARD ArchiMate import method. ' );
1422- $ result = $ this ->archiMateService ->importArchiMateFileFromPath ($ options );
14231417 }
14241418
14251419 return new JSONResponse ($ result );
@@ -1987,7 +1981,6 @@ public function getEmailTemplate(string $templateName): JSONResponse
19871981 *
19881982 * @NoAdminRequired
19891983 * @NoCSRFRequired
1990- *
19911984 */
19921985 public function updateEmailTemplate (string $ templateName ): JSONResponse
19931986 {
@@ -2478,7 +2471,6 @@ public function killArchiMateImport(): JSONResponse
24782471 * @NoCSRFRequired
24792472 *
24802473 * @return JSONResponse Cancellation result
2481- *
24822474 */
24832475 public function cancelArchiMateImport (): JSONResponse
24842476 {
@@ -3124,7 +3116,6 @@ private function getHttpStatusForErrorMessage(string $message): int
31243116 * @NoCSRFRequired
31253117 *
31263118 * @return JSONResponse The sync results
3127- *
31283119 */
31293120 public function syncOrganisations (): JSONResponse
31303121 {
@@ -3274,7 +3265,6 @@ public function getCronjobConfig(): JSONResponse
32743265 * @NoCSRFRequired
32753266 *
32763267 * @return JSONResponse Update result
3277- *
32783268 */
32793269 public function updateCronjobConfig (): JSONResponse
32803270 {
0 commit comments