2929use cebe \openapi \Reader ;
3030use cebe \openapi \spec \OpenApi ;
3131use EventSauce \ObjectHydrator \ObjectMapperUsingReflection ;
32+ use OndraM \CiDetector \CiDetector ;
3233use PhpParser \Node ;
3334use PhpParser \PrettyPrinter \Standard ;
3435use RuntimeException ;
4950use function is_string ;
5051use function ltrim ;
5152use function md5 ;
53+ use function realpath ;
5254use function Safe \file_get_contents ;
5355use function Safe \file_put_contents ;
5456use function Safe \json_decode ;
5759use function Safe \unlink ;
5860use function str_replace ;
5961use function strlen ;
62+ use function strpos ;
6063use function trim ;
6164use function usleep ;
6265use function WyriHaximus \Twig \render ;
@@ -81,6 +84,7 @@ public function __construct(
8184 $ this ->forceGeneration = is_string (getenv ('FORCE_GENERATION ' )) && strlen (getenv ('FORCE_GENERATION ' )) > 0 ;
8285
8386 $ this ->statusOutput = new StatusOutput (
87+ ! (new CiDetector ())->isCiDetected (),
8488 new Step ('hash_current_spec ' , 'Hashing current spec ' , false ),
8589 new Step ('loading_state ' , 'Loading state ' , false ),
8690 new Step ('loading_spec ' , 'Loading spec ' , false ),
@@ -106,14 +110,13 @@ public function __construct(
106110 new Step ('generating_templates_files_subsplit_package ' , 'Generating: Templates Files: SubSplit Packages ' , true ),
107111 new Step ('generating_subsplit_configuration ' , 'Generating: SubSplit Configuration ' , false ),
108112 );
109- $ this ->statusOutput ->render ();
110113
111- if (!$ this ->configuration ->entryPoints ->operations ){
114+ if (! $ this ->configuration ->entryPoints ->operations ) {
112115 $ this ->statusOutput ->markStepWontDo ('generating_operationsinterface_entry_point ' );
113116 $ this ->statusOutput ->markStepWontDo ('generating_operations_entry_point ' );
114117 }
115118
116- if (!$ this ->configuration ->entryPoints ->webHooks ){
119+ if (! $ this ->configuration ->entryPoints ->webHooks ) {
117120 $ this ->statusOutput ->markStepWontDo ('generating_webhooks ' );
118121 $ this ->statusOutput ->markStepWontDo ('generating_webhooks_entry_point ' );
119122 }
@@ -366,8 +369,10 @@ private function all(string $configurationLocation): iterable
366369 );
367370
368371 $ this ->statusOutput ->markStepBusy ('client_single ' );
372+
369373 /** @phpstan-ignore-next-line */
370374 yield from $ this ->oneClient ($ configurationLocation , $ schemaRegistry , $ throwableSchemaRegistry , $ schemas , $ paths , $ webHooks );
375+
371376 $ this ->statusOutput ->markStepDone ('client_single ' );
372377 } else {
373378 $ this ->statusOutput ->markStepWontDo (
@@ -376,8 +381,10 @@ private function all(string $configurationLocation): iterable
376381 );
377382
378383 $ this ->statusOutput ->markStepBusy ('client_subsplit ' );
384+
379385 /** @phpstan-ignore-next-line */
380386 yield from $ this ->subSplitClient ($ configurationLocation , $ schemaRegistry , $ throwableSchemaRegistry , $ schemas , $ paths , $ webHooks );
387+
381388 $ this ->statusOutput ->markStepDone ('client_subsplit ' );
382389 }
383390 }
@@ -803,7 +810,7 @@ private function subSplitClient(
803810 }
804811 }
805812
806- if (!is_string ($ split )) {
813+ if (! is_string ($ split )) {
807814 continue ;
808815 }
809816
0 commit comments