phpsess/openssl-encryption

View on GitHub

Showing 2 of 2 total issues

Remove error control operator '@' on line 114.
Open

    public function decryptSessionData(string $sessionId, string $sessionData): string
    {
        if (!$sessionData) {
            return '';
        }
Severity: Minor
Found in src/OpenSSLEncryption.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Line exceeds 120 characters; contains 124 characters
Open

        $decryptedData = @openssl_decrypt($encryptedData->data, $this->encryptionAlgorithm, $encryptionKey, 0, $initVector);
Severity: Minor
Found in src/OpenSSLEncryption.php by phpcodesniffer
Severity
Category
Status
Source
Language