Test Failed
Push — master ( bf1804...12692f )
by Hirofumi
03:59
created

FailedToEnqueueStoredJobException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Shippinno\Job\Domain\Model;
4
5
use Throwable;
6
7
class FailedToEnqueueStoredJobException extends Exception
8
{
9
    /**
10
     * @var int
11
     */
12
    private $enqueuedMessagesCount;
13
14
    /**
15
     * @param string $message
0 ignored issues
show
Documentation introduced by
There is no parameter named $message. Did you maybe mean $enqueuedMessagesCount?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
16
     * @param int $code
0 ignored issues
show
Bug introduced by
There is no parameter named $code. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
17
     * @param int $enqueuedMessagesCount
18
     * @param Throwable|null $previous
19
     */
20 1
    public function __construct(int $enqueuedMessagesCount, Throwable $previous = null)
21
    {
22 1
        parent::__construct('Failed to enqueue stored job.', 0, $previous);
23 1
        $this->enqueuedMessagesCount = $enqueuedMessagesCount;
24 1
    }
25
26
    /**
27
     * @return int
28
     */
29
    public function enqueuedMessagesCount(): int
30
    {
31
        return $this->enqueuedMessagesCount;
32
    }
33
}
34