protonemedia /
laravel-api-health
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace ProtoneMedia\ApiHealth\Checkers; |
||||
| 4 | |||||
| 5 | trait AllowsForRetries |
||||
| 6 | { |
||||
| 7 | /** |
||||
| 8 | * Number of allowed retries. |
||||
| 9 | * |
||||
| 10 | * @var int |
||||
| 11 | */ |
||||
| 12 | protected $allowedRetries; |
||||
| 13 | |||||
| 14 | /** |
||||
| 15 | * Class name of the retry job. |
||||
| 16 | * |
||||
| 17 | * @var string |
||||
| 18 | */ |
||||
| 19 | protected $retryJob; |
||||
| 20 | |||||
| 21 | /** |
||||
| 22 | * Returns the number of allowed retries. |
||||
| 23 | * |
||||
| 24 | * @return int |
||||
| 25 | */ |
||||
| 26 | public function allowedRetries(): int |
||||
| 27 | { |
||||
| 28 | return !is_null($this->allowedRetries) ? $this->allowedRetries : config('api-health.retries.allowed_retries'); |
||||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||||
| 29 | } |
||||
| 30 | |||||
| 31 | /** |
||||
| 32 | * Returns the class name of the retry job. |
||||
| 33 | * |
||||
| 34 | * @return null|string |
||||
| 35 | */ |
||||
| 36 | public function retryJob(): ? string |
||||
| 37 | { |
||||
| 38 | return $this->retryJob ?: config('api-health.retries.job.job'); |
||||
| 39 | } |
||||
| 40 | |||||
| 41 | /** |
||||
| 42 | * Callback for the retry job. |
||||
| 43 | * |
||||
| 44 | * @param mix $job |
||||
|
0 ignored issues
–
show
The type
ProtoneMedia\ApiHealth\Checkers\mix was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||
| 45 | */ |
||||
| 46 | public function withRetryJob($job) |
||||
|
0 ignored issues
–
show
The parameter
$job is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 47 | { |
||||
| 48 | |||||
| 49 | } |
||||
| 50 | } |
||||
| 51 |