mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-10-20 17:46:31 +02:00
minor fixes, ZipEntry tests
This commit is contained in:
@@ -281,34 +281,6 @@ class ZipContainer extends ImmutableZipContainer
|
||||
$this->archiveComment = $archiveComment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ZipEntry $entry
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasRecompressData(ZipEntry $entry)
|
||||
{
|
||||
// todo test with rename, check exists ZipSourceData
|
||||
if ($this->sourceContainer && isset($this->sourceContainer->entries[$entry->getName()])) {
|
||||
$sourceEntry = $this->sourceContainer->entries[$entry->getName()];
|
||||
|
||||
if (
|
||||
$sourceEntry->getCompressionLevel() !== $entry->getCompressionLevel() ||
|
||||
$sourceEntry->getCompressionMethod() !== $entry->getCompressionMethod() ||
|
||||
$sourceEntry->isEncrypted() !== $entry->isEncrypted() ||
|
||||
$sourceEntry->getEncryptionMethod() !== $entry->getEncryptionMethod() ||
|
||||
$sourceEntry->getPassword() !== $entry->getPassword() ||
|
||||
$sourceEntry->getCompressedSize() !== $entry->getCompressedSize() ||
|
||||
$sourceEntry->getUncompressedSize() !== $entry->getUncompressedSize() ||
|
||||
$sourceEntry->getCrc() !== $entry->getCrc()
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ZipEntryMatcher
|
||||
*/
|
||||
|
Reference in New Issue
Block a user