1
0
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:
wapplay
2020-01-06 11:53:17 +03:00
parent 70bb598fa6
commit a16b0e7c15
21 changed files with 1906 additions and 141 deletions

View File

@@ -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
*/