mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-10-26 03:26:38 +01:00
added static analysis
This commit is contained in:
@@ -943,13 +943,10 @@ class ZipEntry
|
||||
*/
|
||||
public function setEncryptionMethod(?int $encryptionMethod): self
|
||||
{
|
||||
if ($encryptionMethod === null) {
|
||||
$encryptionMethod = ZipEncryptionMethod::NONE;
|
||||
}
|
||||
$method = $encryptionMethod ?? ZipEncryptionMethod::NONE;
|
||||
|
||||
$encryptionMethod = (int) $encryptionMethod;
|
||||
ZipEncryptionMethod::checkSupport($encryptionMethod);
|
||||
$this->encryptionMethod = $encryptionMethod;
|
||||
ZipEncryptionMethod::checkSupport($method);
|
||||
$this->encryptionMethod = $method;
|
||||
|
||||
$this->setEncrypted($this->encryptionMethod !== ZipEncryptionMethod::NONE);
|
||||
$this->extractVersion = self::UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user