@@ -10,10 +10,10 @@ |
||
10 | 10 | { |
11 | 11 | public function testExceptionIsReportedToSentry() |
12 | 12 | { |
13 | - $this->mock(SentryService::class, function ($mock) { |
|
13 | + $this->mock(SentryService::class, function($mock) { |
|
14 | 14 | $mock->shouldReceive('captureException') |
15 | 15 | ->once() |
16 | - ->withArgs(function ($exception) { |
|
16 | + ->withArgs(function($exception) { |
|
17 | 17 | return $exception instanceof Exception && $exception->getMessage() === 'Test exception'; |
18 | 18 | }); |
19 | 19 | }); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $sentryNotifierMock->shouldReceive('reportSentryNotification') |
37 | 37 | ->once() |
38 | 38 | ->with(Mockery::type(Exception::class)) |
39 | - ->andReturnUsing(function () { |
|
39 | + ->andReturnUsing(function() { |
|
40 | 40 | Notification::send(new NotifableTelegramChannel(123), new TelegramSentryNotification()); |
41 | 41 | }); |
42 | 42 |
@@ -44,11 +44,11 @@ |
||
44 | 44 | |
45 | 45 | $notifableEntityMock = $this->createMock(NotifableEntityInterface::class); |
46 | 46 | |
47 | - $container->bind(MessageFormatterInterface::class, function () use ($formatterMock) { |
|
47 | + $container->bind(MessageFormatterInterface::class, function() use ($formatterMock) { |
|
48 | 48 | return $formatterMock; |
49 | 49 | }); |
50 | 50 | |
51 | - $container->bind(NotifableEntityInterface::class, function () use ($notifableEntityMock) { |
|
51 | + $container->bind(NotifableEntityInterface::class, function() use ($notifableEntityMock) { |
|
52 | 52 | return $notifableEntityMock; |
53 | 53 | }); |
54 | 54 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | ->needs(MessageFormatterInterface::class) |
25 | 25 | ->give(TelegramMessageFormatter::class); |
26 | 26 | |
27 | - $this->app->bind(NotifableTelegramChannel::class, function (Application $app) { |
|
27 | + $this->app->bind(NotifableTelegramChannel::class, function(Application $app) { |
|
28 | 28 | if (empty($app['config']['services']['laravel-sentry-notifications']['telegram']['chat_id'])) { |
29 | 29 | throw new SentryNotifierException('Empty telegram Chat ID'); |
30 | 30 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | public function register(): void |
12 | 12 | { |
13 | - $this->app->singleton(SentryServiceInterface::class, function ($app) { |
|
13 | + $this->app->singleton(SentryServiceInterface::class, function($app) { |
|
14 | 14 | return new SentryService( |
15 | 15 | $app['sentry'], |
16 | 16 | $app['config']['services']['laravel-sentry-notifications']['issues_url'], |
@@ -18,31 +18,31 @@ |
||
18 | 18 | __DIR__ . '/../../config/services.php', 'services' |
19 | 19 | ); |
20 | 20 | |
21 | - $this->app->singleton(SentryNotifier::class, function ($app) { |
|
21 | + $this->app->singleton(SentryNotifier::class, function($app) { |
|
22 | 22 | return new SentryNotifier( |
23 | 23 | app(SentryServiceInterface::class), |
24 | 24 | ); |
25 | 25 | }); |
26 | 26 | |
27 | - $this->app->singleton(MessageFormatterFactory::class, function ($app) { |
|
27 | + $this->app->singleton(MessageFormatterFactory::class, function($app) { |
|
28 | 28 | return new MessageFormatterFactory( |
29 | 29 | $app['config']['services']['laravel-sentry-notifications']['service'] |
30 | 30 | ); |
31 | 31 | }); |
32 | 32 | |
33 | - $this->app->singleton(MessengerClientFactory::class, function ($app) { |
|
33 | + $this->app->singleton(MessengerClientFactory::class, function($app) { |
|
34 | 34 | return new MessengerClientFactory( |
35 | 35 | $app['config']['services']['laravel-sentry-notifications']['service'] |
36 | 36 | ); |
37 | 37 | }); |
38 | 38 | |
39 | - $this->app->singleton(NotificationEntityFactory::class, function ($app) { |
|
39 | + $this->app->singleton(NotificationEntityFactory::class, function($app) { |
|
40 | 40 | return new NotificationEntityFactory( |
41 | 41 | $app['config']['services']['laravel-sentry-notifications']['service'] |
42 | 42 | ); |
43 | 43 | }); |
44 | 44 | |
45 | - $this->app->singleton(NotificationFactory::class, function ($app) { |
|
45 | + $this->app->singleton(NotificationFactory::class, function($app) { |
|
46 | 46 | return new NotificationFactory( |
47 | 47 | $app['config']['services']['laravel-sentry-notifications']['service'] |
48 | 48 | ); |