These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php declare(strict_types = 1); |
||
2 | |||
3 | namespace CircuitBreakerBundle\Event; |
||
4 | |||
5 | use Symfony\Component\EventDispatcher\Event; |
||
6 | |||
7 | class CircuitBreakerEvent extends Event |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $key; |
||
13 | |||
14 | /** |
||
15 | * @var bool |
||
16 | */ |
||
17 | private $status; |
||
18 | |||
19 | /** |
||
20 | * @param string $key |
||
21 | * @param bool $status |
||
22 | */ |
||
23 | public function __construct(string $key, bool $status) |
||
24 | { |
||
25 | $this->key = $key; |
||
0 ignored issues
–
show
|
|||
26 | $this->status = $status; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getKey(): string |
||
33 | { |
||
34 | return $this->key; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function getStatus(): bool |
||
41 | { |
||
42 | return $this->status; |
||
43 | } |
||
44 | } |
||
45 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.