@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | EnvironmentInterface $env, |
38 | 38 | FinalizerInterface $finalizer, |
39 | 39 | ContainerInterface $container |
40 | - ) { |
|
40 | + ){ |
|
41 | 41 | $this->env = $env; |
42 | 42 | $this->finalizer = $finalizer; |
43 | 43 | $this->container = $container; |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | $consumer = $this->container->get(Consumer::class); |
64 | 64 | $worker = $this->container->get(Worker::class); |
65 | 65 | |
66 | - $consumer->serve($worker, function (\Throwable $e = null) { |
|
67 | - if ($e !== null) { |
|
66 | + $consumer->serve($worker, function (\Throwable $e = null){ |
|
67 | + if ($e !== null){ |
|
68 | 68 | $this->handleException($e); |
69 | 69 | } |
70 | 70 | |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | */ |
78 | 78 | protected function handleException(\Throwable $e) |
79 | 79 | { |
80 | - try { |
|
80 | + try{ |
|
81 | 81 | $this->container->get(SnapshotterInterface::class)->register($e); |
82 | - } catch (\Throwable|ContainerExceptionInterface $se) { |
|
82 | + }catch (\Throwable | ContainerExceptionInterface $se){ |
|
83 | 83 | // no need to notify when unable to register an exception |
84 | 84 | } |
85 | 85 | } |
@@ -63,8 +63,10 @@ discard block |
||
63 | 63 | $consumer = $this->container->get(Consumer::class); |
64 | 64 | $worker = $this->container->get(Worker::class); |
65 | 65 | |
66 | - $consumer->serve($worker, function (\Throwable $e = null) { |
|
67 | - if ($e !== null) { |
|
66 | + $consumer->serve($worker, function (\Throwable $e = null) |
|
67 | + { |
|
68 | + if ($e !== null) |
|
69 | + { |
|
68 | 70 | $this->handleException($e); |
69 | 71 | } |
70 | 72 | |
@@ -77,9 +79,12 @@ discard block |
||
77 | 79 | */ |
78 | 80 | protected function handleException(\Throwable $e) |
79 | 81 | { |
80 | - try { |
|
82 | + try |
|
83 | + { |
|
81 | 84 | $this->container->get(SnapshotterInterface::class)->register($e); |
82 | - } catch (\Throwable|ContainerExceptionInterface $se) { |
|
85 | + } |
|
86 | + catch (\Throwable|ContainerExceptionInterface $se) |
|
87 | + { |
|
83 | 88 | // no need to notify when unable to register an exception |
84 | 89 | } |
85 | 90 | } |