|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace PHPSTORM_META { |
| 4 | + |
| 5 | + registerArgumentsSet( |
| 6 | + "bool", |
| 7 | + true, |
| 8 | + false |
| 9 | + ); |
| 10 | + |
| 11 | + registerArgumentsSet( |
| 12 | + "compression_methods", |
| 13 | + \PhpZip\Constants\ZipCompressionMethod::STORED, |
| 14 | + \PhpZip\Constants\ZipCompressionMethod::DEFLATED, |
| 15 | + \PhpZip\Constants\ZipCompressionMethod::BZIP2 |
| 16 | + ); |
| 17 | + expectedArguments(\PhpZip\ZipFile::addFile(), 2, argumentsSet("compression_methods")); |
| 18 | + expectedArguments(\PhpZip\ZipFile::addFromStream(), 2, argumentsSet("compression_methods")); |
| 19 | + expectedArguments(\PhpZip\ZipFile::addFromString(), 2, argumentsSet("compression_methods")); |
| 20 | + expectedArguments(\PhpZip\ZipFile::addDir(), 2, argumentsSet("compression_methods")); |
| 21 | + expectedArguments(\PhpZip\ZipFile::addDirRecursive(), 2, argumentsSet("compression_methods")); |
| 22 | + expectedArguments(\PhpZip\ZipFile::addFilesFromIterator(), 2, argumentsSet("compression_methods")); |
| 23 | + expectedArguments(\PhpZip\ZipFile::addFilesFromIterator(), 2, argumentsSet("compression_methods")); |
| 24 | + expectedArguments(\PhpZip\ZipFile::addFilesFromGlob(), 3, argumentsSet("compression_methods")); |
| 25 | + expectedArguments(\PhpZip\ZipFile::addFilesFromGlobRecursive(), 3, argumentsSet("compression_methods")); |
| 26 | + expectedArguments(\PhpZip\ZipFile::addFilesFromRegex(), 3, argumentsSet("compression_methods")); |
| 27 | + expectedArguments(\PhpZip\ZipFile::addFilesFromRegexRecursive(), 3, argumentsSet("compression_methods")); |
| 28 | + expectedArguments(\PhpZip\ZipFile::setCompressionMethodEntry(), 1, argumentsSet("compression_methods")); |
| 29 | + expectedArguments(\PhpZip\Model\ZipEntry::setCompressionMethod(), 0, argumentsSet("compression_methods")); |
| 30 | + expectedArguments(\PhpZip\Model\ZipEntry::setMethod(), 0, argumentsSet("compression_methods")); |
| 31 | + |
| 32 | + registerArgumentsSet( |
| 33 | + 'compression_levels', |
| 34 | + \PhpZip\Constants\ZipCompressionLevel::MAXIMUM, |
| 35 | + \PhpZip\Constants\ZipCompressionLevel::NORMAL, |
| 36 | + \PhpZip\Constants\ZipCompressionLevel::FAST, |
| 37 | + \PhpZip\Constants\ZipCompressionLevel::SUPER_FAST |
| 38 | + ); |
| 39 | + expectedArguments(\PhpZip\ZipFile::setCompressionLevel(), 0, argumentsSet("compression_levels")); |
| 40 | + expectedArguments(\PhpZip\ZipFile::setCompressionLevelEntry(), 1, argumentsSet("compression_levels")); |
| 41 | + expectedArguments(\PhpZip\Model\ZipEntry::setCompressionLevel(), 0, argumentsSet("compression_levels")); |
| 42 | + |
| 43 | + registerArgumentsSet( |
| 44 | + 'encryption_methods', |
| 45 | + \PhpZip\Constants\ZipEncryptionMethod::WINZIP_AES_256, |
| 46 | + \PhpZip\Constants\ZipEncryptionMethod::WINZIP_AES_192, |
| 47 | + \PhpZip\Constants\ZipEncryptionMethod::WINZIP_AES_128, |
| 48 | + \PhpZip\Constants\ZipEncryptionMethod::PKWARE |
| 49 | + ); |
| 50 | + expectedArguments(\PhpZip\ZipFile::setPassword(), 1, argumentsSet("encryption_methods")); |
| 51 | + expectedArguments(\PhpZip\ZipFile::setPasswordEntry(), 2, argumentsSet("encryption_methods")); |
| 52 | + expectedArguments(\PhpZip\Model\ZipEntry::setEncryptionMethod(), 0, argumentsSet("encryption_methods")); |
| 53 | + expectedArguments(\PhpZip\Model\ZipEntry::setPassword(), 1, argumentsSet("encryption_methods")); |
| 54 | + |
| 55 | + registerArgumentsSet( |
| 56 | + 'zip_mime_types', |
| 57 | + null, |
| 58 | + 'application/zip', |
| 59 | + 'application/vnd.android.package-archive', |
| 60 | + 'application/java-archive' |
| 61 | + ); |
| 62 | + expectedArguments(\PhpZip\ZipFile::outputAsAttachment(), 1, argumentsSet("zip_mime_types")); |
| 63 | + expectedArguments(\PhpZip\ZipFile::outputAsAttachment(), 2, argumentsSet("bool")); |
| 64 | + |
| 65 | + expectedArguments(\PhpZip\ZipFile::outputAsResponse(), 2, argumentsSet("zip_mime_types")); |
| 66 | + expectedArguments(\PhpZip\ZipFile::outputAsResponse(), 3, argumentsSet("bool")); |
| 67 | + |
| 68 | + registerArgumentsSet( |
| 69 | + 'dos_charset', |
| 70 | + \PhpZip\Constants\DosCodePage::CP_LATIN_US, |
| 71 | + \PhpZip\Constants\DosCodePage::CP_GREEK, |
| 72 | + \PhpZip\Constants\DosCodePage::CP_BALT_RIM, |
| 73 | + \PhpZip\Constants\DosCodePage::CP_LATIN1, |
| 74 | + \PhpZip\Constants\DosCodePage::CP_LATIN2, |
| 75 | + \PhpZip\Constants\DosCodePage::CP_CYRILLIC, |
| 76 | + \PhpZip\Constants\DosCodePage::CP_TURKISH, |
| 77 | + \PhpZip\Constants\DosCodePage::CP_PORTUGUESE, |
| 78 | + \PhpZip\Constants\DosCodePage::CP_ICELANDIC, |
| 79 | + \PhpZip\Constants\DosCodePage::CP_HEBREW, |
| 80 | + \PhpZip\Constants\DosCodePage::CP_CANADA, |
| 81 | + \PhpZip\Constants\DosCodePage::CP_ARABIC, |
| 82 | + \PhpZip\Constants\DosCodePage::CP_NORDIC, |
| 83 | + \PhpZip\Constants\DosCodePage::CP_CYRILLIC_RUSSIAN, |
| 84 | + \PhpZip\Constants\DosCodePage::CP_GREEK2, |
| 85 | + \PhpZip\Constants\DosCodePage::CP_THAI, |
| 86 | + ); |
| 87 | + expectedArguments(\PhpZip\Model\ZipEntry::setCharset(), 0, argumentsSet('dos_charset')); |
| 88 | + expectedArguments(\PhpZip\Constants\DosCodePage::toUTF8(), 1, argumentsSet('dos_charset')); |
| 89 | + expectedArguments(\PhpZip\Constants\DosCodePage::fromUTF8(), 1, argumentsSet('dos_charset')); |
| 90 | + |
| 91 | + registerArgumentsSet( |
| 92 | + "zip_os", |
| 93 | + \PhpZip\Constants\ZipPlatform::OS_UNIX, |
| 94 | + \PhpZip\Constants\ZipPlatform::OS_DOS, |
| 95 | + \PhpZip\Constants\ZipPlatform::OS_MAC_OSX, |
| 96 | + ); |
| 97 | + expectedArguments(\PhpZip\Model\ZipEntry::setCreatedOS(), 0, argumentsSet('zip_os')); |
| 98 | + expectedArguments(\PhpZip\Model\ZipEntry::setExtractedOS(), 0, argumentsSet('zip_os')); |
| 99 | + expectedArguments(\PhpZip\Model\ZipEntry::setPlatform(), 0, argumentsSet('zip_os')); |
| 100 | + |
| 101 | + registerArgumentsSet( |
| 102 | + "zip_gpbf", |
| 103 | + \PhpZip\Constants\GeneralPurposeBitFlag::ENCRYPTION | |
| 104 | + \PhpZip\Constants\GeneralPurposeBitFlag::DATA_DESCRIPTOR | |
| 105 | + \PhpZip\Constants\GeneralPurposeBitFlag::COMPRESSION_FLAG1 | |
| 106 | + \PhpZip\Constants\GeneralPurposeBitFlag::COMPRESSION_FLAG2 | |
| 107 | + \PhpZip\Constants\GeneralPurposeBitFlag::UTF8 |
| 108 | + ); |
| 109 | + expectedArguments(\PhpZip\Model\ZipEntry::setGeneralPurposeBitFlags(), 0, argumentsSet('zip_gpbf')); |
| 110 | +} |
0 commit comments