.phpstorm.meta.php 7.3 KB

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