Skip to content

Commit 02f5357

Browse files
committed
lint fixes
1 parent f8c392e commit 02f5357

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

includes/Services/AppService.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@
66
use NewfoldLabs\WP\Module\Onboarding\Data\Options;
77
use NewfoldLabs\WP\Module\Onboarding\Data\Services\PreviewsService;
88
use NewfoldLabs\WP\Module\Onboarding\Data\Services\SiteGenService as LegacySiteGenService;
9-
use NewfoldLabs\WP\Module\Onboarding\Data\Services\FlowService;
9+
use NewfoldLabs\WP\Module\Onboarding\Services\SiteInfoService;
1010

1111

1212
use function NewfoldLabs\WP\ModuleLoader\container;
1313

14+
/**
15+
* App Service for handling onboarding application lifecycle.
16+
*
17+
* This service manages the start and completion of the onboarding process,
18+
* including initialization of required services, publishing selected content,
19+
* and saving site information for other modules to access.
20+
*/
1421
class AppService {
1522

1623
/**
@@ -46,13 +53,13 @@ public function start(): void {
4653
*
4754
* @param string $selected_sitegen_homepage The selected sitegen homepage to publish.
4855
* @return void
49-
* @throws \Exception
56+
* @throws \Exception When homepage publishing fails.
5057
*/
5158
public function complete( string $selected_sitegen_homepage ): void {
5259
// Publish selected homepage.
5360
$result = ( new SiteGenService() )->publish_homepage( $selected_sitegen_homepage );
5461
if ( \is_wp_error( $result ) ) {
55-
throw new \Exception( $result->get_error_message() );
62+
throw new \Exception( esc_html( $result->get_error_message() ) );
5663
}
5764
// Trash Preview pages.
5865
PreviewsService::trash_preview_pages();
@@ -73,8 +80,8 @@ public function complete( string $selected_sitegen_homepage ): void {
7380
array(
7481
'label_key' => 'value',
7582
),
76-
__( 'Help us improve', 'wp-module-onboarding-data' ),
77-
__( 'How satisfied were you with the ease of creating your website?', 'wp-module-onboarding-data' ),
83+
__( 'Help us improve', 'wp-module-onboarding' ),
84+
__( 'How satisfied were you with the ease of creating your website?', 'wp-module-onboarding' ),
7885
);
7986
}
8087
}

0 commit comments

Comments
 (0)