Skip to content

Commit

Permalink
PR modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Khadreal committed Aug 27, 2024
1 parent 36f9f27 commit 5a5f387
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions inc/Engine/Debug/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,12 @@ public function provides( string $id ): bool {
public function boot(): void {
$this->services = $this->getContainer()->get( 'debug_resolver' )->get_services();

if ( ! $this->getContainer()->has('options_debug') ) {
$this->container->add( 'options_debug', Options_Data::class )
->addArgument( $this->container->get( 'options_api' )->get( 'debug', [] ) );
}

if ( empty( $this->services ) ) {
return;
}

$this->provides[] = 'options_debug';

foreach ( $this->services as $service ) {
$this->provides[] = $service['service'];
}
Expand All @@ -70,7 +67,8 @@ public function register(): void {
return;
}


$this->container->add( 'options_debug', Options_Data::class )
->addArgument( $this->container->get( 'options_api' )->get( 'debug', [] ) );

foreach ( $this->services as $service ) {
$this->getContainer()->add( $service['service'], $service['class'] )
Expand Down

0 comments on commit 5a5f387

Please sign in to comment.