@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /** |
| 3 | 3 | * This file is part of Evacuator package. |
| 4 | 4 | * |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @return Evacuator|$this |
| 90 | 90 | * @throws \InvalidArgumentException |
| 91 | 91 | */ |
| 92 | - public function catch(\Closure $then): Evacuator |
|
| 92 | + public function catch (\Closure $then): Evacuator |
|
| 93 | 93 | { |
| 94 | 94 | $exceptionClass = $this->resolveTypeHint($then, \Throwable::class); |
| 95 | 95 | |
@@ -125,8 +125,8 @@ discard block |
||
| 125 | 125 | // Callback has ony one argument |
| 126 | 126 | if (1 !== count($parameters)) { |
| 127 | 127 | throw new \InvalidArgumentException( |
| 128 | - 'Closure argument of catch(...) method required ' . (count($parameters) > 1 ? 'only ' :'') . |
|
| 129 | - '1 parameter ' . count($parameters) . ' given' |
|
| 128 | + 'Closure argument of catch(...) method required '.(count($parameters) > 1 ? 'only ' : ''). |
|
| 129 | + '1 parameter '.count($parameters).' given' |
|
| 130 | 130 | ); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -146,8 +146,8 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | if (!($typeHintClass->newInstanceWithoutConstructor() instanceof $instanceOf)) { |
| 148 | 148 | throw new \InvalidArgumentException( |
| 149 | - 'Closure argument of catch(...) method type hint must be instance of ' . $instanceOf . |
|
| 150 | - ', ' . $typeHintClass->name . ' given' |
|
| 149 | + 'Closure argument of catch(...) method type hint must be instance of '.$instanceOf. |
|
| 150 | + ', '.$typeHintClass->name.' given' |
|
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | { |
| 191 | 191 | while ( |
| 192 | 192 | $this->retries === static::INFINITY_RETRIES || |
| 193 | - ($this->retries-- + 1) > 0 |
|
| 193 | + ($this->retries-- +1) > 0 |
|
| 194 | 194 | ) { |
| 195 | 195 | try { |
| 196 | 196 | return ($this->context)(...$args); |