Total Complexity | 6 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class FixExceptionNamesAction |
||
16 | { |
||
17 | public function __construct( |
||
18 | private readonly string $name, |
||
19 | private readonly string $styleName, |
||
20 | private readonly ?Style $style = null, |
||
21 | ) {} |
||
22 | |||
23 | public static function make(string $name, string $styleName, ?Style $style = null): self |
||
24 | { |
||
25 | return new self($name, $styleName, $style); |
||
26 | } |
||
27 | |||
28 | |||
29 | public function run(): string |
||
44 | } |
||
45 | } |
||
46 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.