1 | <?php |
||
14 | class PersonalAnswersMiddleware implements MiddlewareInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Ai |
||
18 | */ |
||
19 | protected $ai; |
||
20 | |||
21 | /** |
||
22 | * PersonalAnswersMiddleware constructor. |
||
23 | */ |
||
24 | public function __construct() |
||
28 | |||
29 | /** |
||
30 | * @param Message $message |
||
31 | * @return mixed |
||
32 | */ |
||
33 | public function handle(Message $message) |
||
76 | } |
||
77 |
This check looks for the bodies of
if
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
if
bodies can be removed. If you have an empty if but statements in theelse
branch, consider inverting the condition.could be turned into
This is much more concise to read.