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

FailedToEnqueueStoredJobException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A enqueuedMessagesCount() 0 4 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