Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stfndamjanovic committed Jan 18, 2024
1 parent e10842f commit 25be2e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ You can add listeners for circuit breaker actions by extending the CircuitBreake
```php
use Stfn\CircuitBreaker\CircuitBreakerListener;

class Logger extends CircuitBreakerListener
class LoggerListener extends CircuitBreakerListener
{
public function onSuccess($result): void
{
Expand All @@ -106,10 +106,8 @@ Attach the listener to the circuit breaker:
```php
use Stfn\CircuitBreaker\CircuitBreaker;

$loggerListener = new Logger();

$breaker = CircuitBreaker::for('test-service')
->listeners([$loggerListener]);
->listeners([new LoggerListener()]);
```

## Testing
Expand Down

0 comments on commit 25be2e3

Please sign in to comment.