Skip to content

Commit

Permalink
Refactor: Organize service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielanhaia committed Jul 7, 2020
1 parent f9f8f6c commit e864248
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Providers/CircuitBreakerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
*/
class CircuitBreakerServiceProvider extends ServiceProvider
{
/**
* Boot method.
*/
public function boot()
{
$this->publishes([
__DIR__ . '/../../config/circuit_breaker.php' => config_path('circuit_breaker.php'),
]);
}

/**
* Register method.
*/
Expand All @@ -25,10 +35,6 @@ public function register()
__DIR__ . '/../../config/circuit_breaker.php', 'circuit_breaker'
);

$this->publishes([
__DIR__ . '/../../config/circuit_breaker.php' => config_path('circuit_breaker.php'),
]);

$this->app->bind(CircuitBreakerAdapter::class, RedisCircuitBreaker::class);

$this->app->bind(CircuitBreaker::class, function ($app) {
Expand Down

0 comments on commit e864248

Please sign in to comment.