It seems like you do not handle an error condition for touch(). This can introduce security issues, and is generally not recommended.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-unhandled annotation
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
21
}
22
23
1
public function clearLock(int $batchGroupId, LockTypeEnum $type): void
It seems like you do not handle an error condition for unlink(). This can introduce security issues, and is generally not recommended.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-unhandled annotation
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
26
}
27
28
1
public function isLocked(int $entityId, LockTypeEnum $type): bool
The function implicitly returns null when this case condition does not match. This is incompatible with the type-hinted return integer. Consider adding a default case to the switch.
If you suppress an error, we recommend checking for the error condition explicitly: