WooCommerce Payments – Fully Integrated Solution Built and Supported by Woo - Version 0.9.0

Version Description

  • Release for Public Beta
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Payments – Fully Integrated Solution Built and Supported by Woo
Version 0.9.0
Comparing to
See all releases

Version 0.9.0

Files changed (335) hide show
  1. assets/css/admin.css +60 -0
  2. assets/css/wcpay-checkout.css +25 -0
  3. assets/fonts/WCPay.eot +0 -0
  4. assets/fonts/WCPay.svg +11 -0
  5. assets/fonts/WCPay.ttf +0 -0
  6. assets/fonts/WCPay.woff +0 -0
  7. assets/images/cards/amex.svg +14 -0
  8. assets/images/cards/diners.svg +15 -0
  9. assets/images/cards/discover.svg +14 -0
  10. assets/images/cards/jcb.svg +29 -0
  11. assets/images/cards/mastercard.svg +31 -0
  12. assets/images/cards/unionpay.svg +9 -0
  13. assets/images/cards/unknown.svg +1 -0
  14. assets/images/cards/visa.svg +17 -0
  15. assets/js/wcpay-checkout.js +206 -0
  16. changelog.txt +21 -0
  17. dist/index.asset.php +1 -0
  18. dist/index.css +1106 -0
  19. dist/index.js +1 -0
  20. dist/settings.asset.php +1 -0
  21. dist/settings.css +134 -0
  22. dist/settings.js +1 -0
  23. includes/admin/class-wc-payments-admin.php +250 -0
  24. includes/admin/class-wc-payments-rest-controller.php +67 -0
  25. includes/admin/class-wc-rest-payments-charges-controller.php +72 -0
  26. includes/admin/class-wc-rest-payments-deposits-controller.php +66 -0
  27. includes/admin/class-wc-rest-payments-disputes-controller.php +128 -0
  28. includes/admin/class-wc-rest-payments-timeline-controller.php +80 -0
  29. includes/admin/class-wc-rest-payments-transactions-controller.php +86 -0
  30. includes/class-logger.php +156 -0
  31. includes/class-wc-payment-gateway-wcpay.php +610 -0
  32. includes/class-wc-payments-account.php +481 -0
  33. includes/class-wc-payments-utils.php +97 -0
  34. includes/class-wc-payments.php +489 -0
  35. includes/wc-payment-api/class-wc-payments-api-client.php +730 -0
  36. includes/wc-payment-api/class-wc-payments-api-exception.php +63 -0
  37. includes/wc-payment-api/class-wc-payments-http.php +100 -0
  38. includes/wc-payment-api/models/class-wc-payments-api-charge.php +105 -0
  39. includes/wc-payment-api/models/class-wc-payments-api-intention.php +104 -0
  40. readme.txt +106 -0
  41. vendor/autoload.php +7 -0
  42. vendor/composer/ClassLoader.php +445 -0
  43. vendor/composer/LICENSE +21 -0
  44. vendor/composer/autoload_classmap.php +551 -0
  45. vendor/composer/autoload_files.php +11 -0
  46. vendor/composer/autoload_namespaces.php +10 -0
  47. vendor/composer/autoload_psr4.php +16 -0
  48. vendor/composer/autoload_real.php +70 -0
  49. vendor/composer/autoload_static.php +637 -0
  50. vendor/composer/installed.json +2074 -0
  51. vendor/composer/installers/LICENSE +19 -0
  52. vendor/composer/installers/composer.json +105 -0
  53. vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
  54. vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +9 -0
  55. vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
  56. vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +49 -0
  57. vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +9 -0
  58. vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +136 -0
  59. vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +126 -0
  60. vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +9 -0
  61. vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +82 -0
  62. vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +11 -0
  63. vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php +9 -0
  64. vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +10 -0
  65. vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +34 -0
  66. vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
  67. vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +13 -0
  68. vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +35 -0
  69. vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
  70. vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +10 -0
  71. vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +50 -0
  72. vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +16 -0
  73. vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +16 -0
  74. vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
  75. vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +12 -0
  76. vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +29 -0
  77. vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +10 -0
  78. vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
  79. vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +9 -0
  80. vendor/composer/installers/src/Composer/Installers/GravInstaller.php +30 -0
  81. vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +25 -0
  82. vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +11 -0
  83. vendor/composer/installers/src/Composer/Installers/Installer.php +274 -0
  84. vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +9 -0
  85. vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
  86. vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +18 -0
  87. vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +11 -0
  88. vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +10 -0
  89. vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
  90. vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +27 -0
  91. vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
  92. vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +10 -0
  93. vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
  94. vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
  95. vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
  96. vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
  97. vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +37 -0
  98. vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
  99. vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +25 -0
  100. vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +33 -0
  101. vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +51 -0
  102. vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +111 -0
  103. vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +12 -0
  104. vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +57 -0
  105. vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +47 -0
  106. vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +24 -0
  107. vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +14 -0
  108. vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +59 -0
  109. vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
  110. vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +11 -0
  111. vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
  112. vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +21 -0
  113. vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
  114. vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +29 -0
  115. vendor/composer/installers/src/Composer/Installers/Plugin.php +17 -0
  116. vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +9 -0
  117. vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +10 -0
  118. vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +11 -0
  119. vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +63 -0
  120. vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +24 -0
  121. vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +10 -0
  122. vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +10 -0
  123. vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +22 -0
  124. vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +10 -0
  125. vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +60 -0
  126. vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +35 -0
  127. vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +25 -0
  128. vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +49 -0
  129. vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
  130. vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +16 -0
  131. vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +38 -0
  132. vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +12 -0
  133. vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +14 -0
  134. vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +9 -0
  135. vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +10 -0
  136. vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +49 -0
  137. vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +10 -0
  138. vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
  139. vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +12 -0
  140. vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +32 -0
  141. vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
  142. vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
  143. vendor/composer/installers/src/bootstrap.php +13 -0
  144. vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md +21 -0
  145. vendor/dealerdirect/phpcodesniffer-composer-installer/README.md +220 -0
  146. vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json +48 -0
  147. vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php +478 -0
  148. vendor/doctrine/instantiator/CONTRIBUTING.md +35 -0
  149. vendor/doctrine/instantiator/LICENSE +19 -0
  150. vendor/doctrine/instantiator/README.md +40 -0
  151. vendor/doctrine/instantiator/composer.json +45 -0
  152. vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +29 -0
  153. vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php +52 -0
  154. vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +66 -0
  155. vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +216 -0
  156. vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +37 -0
  157. vendor/myclabs/deep-copy/.gitattributes +7 -0
  158. vendor/myclabs/deep-copy/.gitignore +3 -0
  159. vendor/myclabs/deep-copy/.scrutinizer.yml +4 -0
  160. vendor/myclabs/deep-copy/.travis.yml +40 -0
  161. vendor/myclabs/deep-copy/LICENSE +20 -0
  162. vendor/myclabs/deep-copy/README.md +376 -0
  163. vendor/myclabs/deep-copy/composer.json +38 -0
  164. vendor/myclabs/deep-copy/doc/clone.png +0 -0
  165. vendor/myclabs/deep-copy/doc/deep-clone.png +0 -0
  166. vendor/myclabs/deep-copy/doc/deep-copy.png +0 -0
  167. vendor/myclabs/deep-copy/doc/graph.png +0 -0
  168. vendor/myclabs/deep-copy/fixtures/f001/A.php +20 -0
  169. vendor/myclabs/deep-copy/fixtures/f001/B.php +20 -0
  170. vendor/myclabs/deep-copy/fixtures/f002/A.php +33 -0
  171. vendor/myclabs/deep-copy/fixtures/f003/Foo.php +26 -0
  172. vendor/myclabs/deep-copy/fixtures/f004/UnclonableItem.php +13 -0
  173. vendor/myclabs/deep-copy/fixtures/f005/Foo.php +13 -0
  174. vendor/myclabs/deep-copy/fixtures/f006/A.php +26 -0
  175. vendor/myclabs/deep-copy/fixtures/f006/B.php +26 -0
  176. vendor/myclabs/deep-copy/fixtures/f007/FooDateInterval.php +15 -0
  177. vendor/myclabs/deep-copy/fixtures/f007/FooDateTimeZone.php +15 -0
  178. vendor/myclabs/deep-copy/fixtures/f008/A.php +18 -0
  179. vendor/myclabs/deep-copy/fixtures/f008/B.php +7 -0
  180. vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +281 -0
  181. vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php +9 -0
  182. vendor/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php +9 -0
  183. vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php +33 -0
  184. vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php +28 -0
  185. vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php +22 -0
  186. vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php +18 -0
  187. vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php +16 -0
  188. vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php +39 -0
  189. vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php +24 -0
  190. vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php +22 -0
  191. vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php +14 -0
  192. vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php +39 -0
  193. vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php +32 -0
  194. vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php +46 -0
  195. vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php +78 -0
  196. vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php +33 -0
  197. vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php +30 -0
  198. vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php +17 -0
  199. vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php +10 -0
  200. vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php +51 -0
  201. vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php +13 -0
  202. vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php +29 -0
  203. vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php +20 -0
  204. vendor/phar-io/manifest/.gitignore +8 -0
  205. vendor/phar-io/manifest/.php_cs +67 -0
  206. vendor/phar-io/manifest/.travis.yml +33 -0
  207. vendor/phar-io/manifest/LICENSE +31 -0
  208. vendor/phar-io/manifest/README.md +30 -0
  209. vendor/phar-io/manifest/build.xml +50 -0
  210. vendor/phar-io/manifest/composer.json +42 -0
  211. vendor/phar-io/manifest/examples/example-01.php +23 -0
  212. vendor/phar-io/manifest/phive.xml +4 -0
  213. vendor/phar-io/manifest/phpunit.xml +20 -0
  214. vendor/phar-io/manifest/src/ManifestDocumentMapper.php +193 -0
  215. vendor/phar-io/manifest/src/ManifestLoader.php +66 -0
  216. vendor/phar-io/manifest/src/ManifestSerializer.php +163 -0
  217. vendor/phar-io/manifest/src/exceptions/Exception.php +14 -0
  218. vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php +16 -0
  219. vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php +14 -0
  220. vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php +14 -0
  221. vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php +6 -0
  222. vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php +6 -0
  223. vendor/phar-io/manifest/src/exceptions/ManifestElementException.php +6 -0
  224. vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php +6 -0
  225. vendor/phar-io/manifest/src/values/Application.php +20 -0
  226. vendor/phar-io/manifest/src/values/ApplicationName.php +65 -0
  227. vendor/phar-io/manifest/src/values/Author.php +57 -0
  228. vendor/phar-io/manifest/src/values/AuthorCollection.php +43 -0
  229. vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php +56 -0
  230. vendor/phar-io/manifest/src/values/BundledComponent.php +48 -0
  231. vendor/phar-io/manifest/src/values/BundledComponentCollection.php +43 -0
  232. vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php +56 -0
  233. vendor/phar-io/manifest/src/values/CopyrightInformation.php +42 -0
  234. vendor/phar-io/manifest/src/values/Email.php +47 -0
  235. vendor/phar-io/manifest/src/values/Extension.php +75 -0
  236. vendor/phar-io/manifest/src/values/Library.php +20 -0
  237. vendor/phar-io/manifest/src/values/License.php +42 -0
  238. vendor/phar-io/manifest/src/values/Manifest.php +138 -0
  239. vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php +32 -0
  240. vendor/phar-io/manifest/src/values/PhpVersionRequirement.php +31 -0
  241. vendor/phar-io/manifest/src/values/Requirement.php +14 -0
  242. vendor/phar-io/manifest/src/values/RequirementCollection.php +43 -0
  243. vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php +56 -0
  244. vendor/phar-io/manifest/src/values/Type.php +60 -0
  245. vendor/phar-io/manifest/src/values/Url.php +47 -0
  246. vendor/phar-io/manifest/src/xml/AuthorElement.php +21 -0
  247. vendor/phar-io/manifest/src/xml/AuthorElementCollection.php +19 -0
  248. vendor/phar-io/manifest/src/xml/BundlesElement.php +19 -0
  249. vendor/phar-io/manifest/src/xml/ComponentElement.php +21 -0
  250. vendor/phar-io/manifest/src/xml/ComponentElementCollection.php +19 -0
  251. vendor/phar-io/manifest/src/xml/ContainsElement.php +31 -0
  252. vendor/phar-io/manifest/src/xml/CopyrightElement.php +25 -0
  253. vendor/phar-io/manifest/src/xml/ElementCollection.php +58 -0
  254. vendor/phar-io/manifest/src/xml/ExtElement.php +17 -0
  255. vendor/phar-io/manifest/src/xml/ExtElementCollection.php +20 -0
  256. vendor/phar-io/manifest/src/xml/ExtensionElement.php +21 -0
  257. vendor/phar-io/manifest/src/xml/LicenseElement.php +21 -0
  258. vendor/phar-io/manifest/src/xml/ManifestDocument.php +118 -0
  259. vendor/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php +48 -0
  260. vendor/phar-io/manifest/src/xml/ManifestElement.php +100 -0
  261. vendor/phar-io/manifest/src/xml/PhpElement.php +27 -0
  262. vendor/phar-io/manifest/src/xml/RequiresElement.php +19 -0
  263. vendor/phar-io/manifest/tests/ManifestDocumentMapperTest.php +110 -0
  264. vendor/phar-io/manifest/tests/ManifestLoaderTest.php +83 -0
  265. vendor/phar-io/manifest/tests/ManifestSerializerTest.php +114 -0
  266. vendor/phar-io/manifest/tests/_fixture/custom.xml +10 -0
  267. vendor/phar-io/manifest/tests/_fixture/extension-invalidcompatible.xml +13 -0
  268. vendor/phar-io/manifest/tests/_fixture/extension.xml +13 -0
  269. vendor/phar-io/manifest/tests/_fixture/invalidversion.xml +11 -0
  270. vendor/phar-io/manifest/tests/_fixture/invalidversionconstraint.xml +11 -0
  271. vendor/phar-io/manifest/tests/_fixture/library.xml +11 -0
  272. vendor/phar-io/manifest/tests/_fixture/manifest.xml +11 -0
  273. vendor/phar-io/manifest/tests/_fixture/phpunit-5.6.5.xml +46 -0
  274. vendor/phar-io/manifest/tests/_fixture/test.phar +0 -0
  275. vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php +19 -0
  276. vendor/phar-io/manifest/tests/values/ApplicationNameTest.php +48 -0
  277. vendor/phar-io/manifest/tests/values/ApplicationTest.php +44 -0
  278. vendor/phar-io/manifest/tests/values/AuthorCollectionTest.php +62 -0
  279. vendor/phar-io/manifest/tests/values/AuthorTest.php +45 -0
  280. vendor/phar-io/manifest/tests/values/BundledComponentCollectionTest.php +63 -0
  281. vendor/phar-io/manifest/tests/values/BundledComponentTest.php +42 -0
  282. vendor/phar-io/manifest/tests/values/CopyrightInformationTest.php +62 -0
  283. vendor/phar-io/manifest/tests/values/EmailTest.php +35 -0
  284. vendor/phar-io/manifest/tests/values/ExtensionTest.php +109 -0
  285. vendor/phar-io/manifest/tests/values/LibraryTest.php +44 -0
  286. vendor/phar-io/manifest/tests/values/LicenseTest.php +41 -0
  287. vendor/phar-io/manifest/tests/values/ManifestTest.php +187 -0
  288. vendor/phar-io/manifest/tests/values/PhpExtensionRequirementTest.php +26 -0
  289. vendor/phar-io/manifest/tests/values/PhpVersionRequirementTest.php +38 -0
  290. vendor/phar-io/manifest/tests/values/RequirementCollectionTest.php +63 -0
  291. vendor/phar-io/manifest/tests/values/UrlTest.php +35 -0
  292. vendor/phar-io/manifest/tests/xml/AuthorElementCollectionTest.php +18 -0
  293. vendor/phar-io/manifest/tests/xml/AuthorElementTest.php +25 -0
  294. vendor/phar-io/manifest/tests/xml/BundlesElementTest.php +41 -0
  295. vendor/phar-io/manifest/tests/xml/ComponentElementCollectionTest.php +18 -0
  296. vendor/phar-io/manifest/tests/xml/ComponentElementTest.php +25 -0
  297. vendor/phar-io/manifest/tests/xml/ContainsElementTest.php +63 -0
  298. vendor/phar-io/manifest/tests/xml/CopyrightElementTest.php +52 -0
  299. vendor/phar-io/manifest/tests/xml/ExtElementCollectionTest.php +19 -0
  300. vendor/phar-io/manifest/tests/xml/ExtElementTest.php +21 -0
  301. vendor/phar-io/manifest/tests/xml/ExtensionElementTest.php +25 -0
  302. vendor/phar-io/manifest/tests/xml/LicenseElementTest.php +25 -0
  303. vendor/phar-io/manifest/tests/xml/ManifestDocumentTest.php +110 -0
  304. vendor/phar-io/manifest/tests/xml/PhpElementTest.php +48 -0
  305. vendor/phar-io/manifest/tests/xml/RequiresElementTest.php +37 -0
  306. vendor/phar-io/version/.gitignore +7 -0
  307. vendor/phar-io/version/.php_cs +67 -0
  308. vendor/phar-io/version/.travis.yml +33 -0
  309. vendor/phar-io/version/LICENSE +31 -0
  310. vendor/phar-io/version/README.md +16 -0
  311. vendor/phar-io/version/build.xml +41 -0
  312. vendor/phar-io/version/composer.json +34 -0
  313. vendor/phar-io/version/phive.xml +5 -0
  314. vendor/phar-io/version/phpunit.xml +19 -0
  315. vendor/phar-io/version/src/AbstractVersionConstraint.php +32 -0
  316. vendor/phar-io/version/src/AndVersionConstraintGroup.php +43 -0
  317. vendor/phar-io/version/src/AnyVersionConstraint.php +29 -0
  318. vendor/phar-io/version/src/ExactVersionConstraint.php +22 -0
  319. vendor/phar-io/version/src/Exception.php +14 -0
  320. vendor/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php +38 -0
  321. vendor/phar-io/version/src/InvalidVersionException.php +5 -0
  322. vendor/phar-io/version/src/OrVersionConstraintGroup.php +43 -0
  323. vendor/phar-io/version/src/PreReleaseSuffix.php +41 -0
  324. vendor/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php +48 -0
  325. vendor/phar-io/version/src/SpecificMajorVersionConstraint.php +37 -0
  326. vendor/phar-io/version/src/UnsupportedVersionConstraintException.php +14 -0
  327. vendor/phar-io/version/src/Version.php +162 -0
  328. vendor/phar-io/version/src/VersionConstraint.php +26 -0
  329. vendor/phar-io/version/src/VersionConstraintParser.php +122 -0
  330. vendor/phar-io/version/src/VersionConstraintValue.php +123 -0
  331. vendor/phar-io/version/src/VersionNumber.php +41 -0
  332. vendor/phar-io/version/tests/Integration/VersionConstraintParserTest.php +125 -0
  333. vendor/phar-io/version/tests/Unit/AbstractVersionConstraintTest.php +25 -0
  334. vendor/phar-io/version/tests/Unit/AndVersionConstraintGroupTest.php +52 -0
  335. vendor/phar-io/version/tests/Unit/AnyVersionConstraintTest.php +15 -0
assets/css/admin.css ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* TODO: When merging into WooCommerce Core, integrate these icons into the WooCommerce.ttf icon font */
2
+ @font-face {
3
+ font-family: 'WCPay';
4
+ src: url('../fonts/WCPay.eot');
5
+ src: url('../fonts/WCPay.eot?#iefix') format('embedded-opentype'),
6
+ url('../fonts/WCPay.woff') format('woff'),
7
+ url('../fonts/WCPay.ttf') format('truetype'),
8
+ url('../fonts/WCPay.svg#WCPay') format('svg');
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ }
12
+
13
+ #adminmenu #toplevel_page_wc-admin-path--payments-deposits .menu-icon-generic div.wp-menu-image::before,
14
+ #adminmenu #toplevel_page_wc-admin-path--payments-connect .menu-icon-generic div.wp-menu-image::before {
15
+ font-family: 'WCPay' !important;
16
+ content: '\e900';
17
+ width: 24px;
18
+ font-size: 24px;
19
+ margin-top: -2px;
20
+ }
21
+
22
+ .payment-method__brand {
23
+ display: inline-block;
24
+ height: 20px;
25
+ height: 1.25rem;
26
+ width: 32px;
27
+ width: 2rem;
28
+ }
29
+
30
+ .payment-method__brand--amex {
31
+ background: no-repeat url('../images/cards/amex.svg');
32
+ }
33
+
34
+ .payment-method__brand--diners {
35
+ background: no-repeat url('../images/cards/diners.svg');
36
+ }
37
+
38
+ .payment-method__brand--discover {
39
+ background: no-repeat url('../images/cards/discover.svg');
40
+ }
41
+
42
+ .payment-method__brand--jcb {
43
+ background: no-repeat url('../images/cards/jcb.svg');
44
+ }
45
+
46
+ .payment-method__brand--mastercard {
47
+ background: no-repeat url('../images/cards/mastercard.svg');
48
+ }
49
+
50
+ .payment-method__brand--unionpay {
51
+ background: no-repeat url('../images/cards/unionpay.svg');
52
+ }
53
+
54
+ .payment-method__brand--visa {
55
+ background: no-repeat url('../images/cards/visa.svg');
56
+ }
57
+
58
+ .payment-method__brand--unknown {
59
+ background: no-repeat url('../images/cards/unknown.svg');
60
+ }
assets/css/wcpay-checkout.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #payment .payment_methods li .payment_box.payment_method_woocommerce_payments fieldset {
2
+ padding: 0;
3
+ }
4
+
5
+ #payment .payment_method_woocommerce_payments > fieldset > legend {
6
+ padding-top: 0;
7
+ }
8
+
9
+ #payment .payment_method_woocommerce_payments .testmode-info {
10
+ margin-bottom: 0.5em;
11
+ }
12
+
13
+ #payment .payment_method_woocommerce_payments .woocommerce-error {
14
+ margin: 1em 0 0;
15
+ }
16
+
17
+ #wcpay-card-element {
18
+ border: 1px solid #ddd;
19
+ padding: 5px 7px;
20
+ min-height: 29px;
21
+ }
22
+
23
+ .wcpay-card-mounted {
24
+ background-color: #fff;
25
+ }
assets/fonts/WCPay.eot ADDED
Binary file
assets/fonts/WCPay.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="WCPay" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe900;" glyph-name="local_atm" d="M854 170.667v512h-684v-512h684zM854 768.667c48 0 84-38 84-86v-512c0-48-36-86-84-86h-684c-48 0-84 38-84 86v512c0 48 36 86 84 86h684zM470 212.667v44h-86v84h170v44h-128c-24 0-42 18-42 42v128c0 24 18 42 42 42h44v44h84v-44h86v-84h-170v-44h128c24 0 42-18 42-42v-128c0-24-18-42-42-42h-44v-44h-84z" />
11
+ </font></defs></svg>
assets/fonts/WCPay.ttf ADDED
Binary file
assets/fonts/WCPay.woff ADDED
Binary file
assets/images/cards/amex.svg ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg viewBox="0 0 752 471" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" preserveAspectRatio="xMidYMid meet">
3
+ <!-- Generator: Sketch 3.3.1 (12005) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <g id="amex" sketch:type="MSLayerGroup">
9
+ <rect id="Rectangle-1" fill="#2557D6" sketch:type="MSShapeGroup" x="1" y="0" width="750" height="471" rx="40"></rect>
10
+ <path d="M1.002688,221.18508 L37.026849,221.18508 L45.149579,201.67506 L63.334596,201.67506 L71.436042,221.18508 L142.31637,221.18508 L142.31637,206.26909 L148.64322,221.24866 L185.43894,221.24866 L191.76579,206.04654 L191.76579,221.18508 L367.91701,221.18508 L367.83451,189.15941 L371.2427,189.15941 C373.62924,189.24161 374.3263,189.46144 374.3263,193.38516 L374.3263,221.18508 L465.43232,221.18508 L465.43232,213.72973 C472.78082,217.6508 484.21064,221.18508 499.25086,221.18508 L537.57908,221.18508 L545.78163,201.67506 L563.96664,201.67506 L571.98828,221.18508 L645.84844,221.18508 L645.84844,202.65269 L657.0335,221.18508 L716.22061,221.18508 L716.22061,98.67789 L657.64543,98.67789 L657.64543,113.14614 L649.44288,98.67789 L589.33787,98.67789 L589.33787,113.14614 L581.80579,98.67789 L500.61839,98.67789 C487.02818,98.67789 475.08221,100.5669 465.43232,105.83121 L465.43232,98.67789 L409.40596,98.67789 L409.40596,105.83121 C403.26536,100.40529 394.89786,98.67789 385.59383,98.67789 L180.90796,98.67789 L167.17407,130.3194 L153.07037,98.67789 L88.59937,98.67789 L88.59937,113.14614 L81.516924,98.67789 L26.533518,98.67789 L0.999997,156.92445 L0.999997,221.18508 L1.002597,221.18508 L1.002688,221.18508 Z M228.39922,203.51436 L206.78472,203.51436 L206.70492,134.72064 L176.13228,203.51436 L157.62,203.51436 L126.96754,134.6597 L126.96754,203.51436 L84.084427,203.51436 L75.982981,183.92222 L32.083524,183.92222 L23.8996,203.51436 L1.000047,203.51436 L38.756241,115.67692 L70.08183,115.67692 L105.94103,198.84086 L105.94103,115.67692 L140.35289,115.67692 L167.94569,175.26406 L193.29297,115.67692 L228.39657,115.67692 L228.39657,203.51436 L228.39957,203.51436 L228.39922,203.51436 Z M68.777214,165.69287 L54.346265,130.67606 L39.997794,165.69287 L68.777214,165.69287 L68.777214,165.69287 Z M314.41947,203.51436 L243.98611,203.51436 L243.98611,115.67692 L314.41947,115.67692 L314.41947,133.96821 L265.07116,133.96821 L265.07116,149.8009 L313.23551,149.8009 L313.23551,167.80606 L265.07116,167.80606 L265.07116,185.34759 L314.41947,185.34759 L314.41947,203.51436 L314.41947,203.51436 Z M413.67528,139.33321 C413.67528,153.33782 404.28877,160.57326 398.81863,162.74575 C403.43206,164.49434 407.37237,167.58351 409.24808,170.14281 C412.22525,174.51164 412.73875,178.41416 412.73875,186.25897 L412.73875,203.51436 L391.47278,203.51436 L391.39298,192.43732 C391.39298,187.1518 391.90115,179.55074 388.0646,175.32499 C384.98366,172.23581 380.28774,171.56552 372.69714,171.56552 L350.06363,171.56552 L350.06363,203.51436 L328.98125,203.51436 L328.98125,115.67692 L377.47552,115.67692 C388.25084,115.67692 396.18999,115.9604 403.00639,119.88413 C409.67644,123.80786 413.67529,129.53581 413.67529,139.33321 L413.67528,139.33321 Z M387.02277,152.37632 C384.1254,154.12756 380.69859,154.18584 376.59333,154.18584 L350.97998,154.18584 L350.97998,134.67583 L376.94186,134.67583 C380.61611,134.67583 384.44999,134.8401 386.94029,136.26016 C389.67536,137.53981 391.36749,140.26337 391.36749,144.02548 C391.36749,147.86443 389.75784,150.95361 387.02277,152.37632 L387.02277,152.37632 Z M447.48908,203.51436 L425.97569,203.51436 L425.97569,115.67692 L447.48908,115.67692 L447.48908,203.51436 L447.48908,203.51436 Z M697.22856,203.51436 L667.35032,203.51436 L627.38585,137.58727 L627.38585,203.51436 L584.44687,203.51436 L576.24166,183.92222 L532.44331,183.92222 L524.48287,203.51436 L499.81137,203.51436 C489.56284,203.51436 476.58722,201.25709 469.23872,193.79909 C461.82903,186.3411 457.97386,176.23903 457.97386,160.26593 C457.97386,147.23895 460.27791,135.33 469.33983,125.91941 C476.15621,118.90916 486.83044,115.67692 501.35982,115.67692 L521.77174,115.67692 L521.77174,134.49809 L501.78818,134.49809 C494.0938,134.49809 489.74909,135.63733 485.564,139.70147 C481.96957,143.4 479.50322,150.39171 479.50322,159.59829 C479.50322,169.00887 481.38158,175.79393 485.30061,180.22633 C488.5465,183.70232 494.445,184.75677 499.99495,184.75677 L509.46393,184.75677 L539.17987,115.67957 L570.77152,115.67957 L606.46843,198.76138 L606.46843,115.67957 L638.5709,115.67957 L675.6327,176.85368 L675.6327,115.67957 L697.22856,115.67957 L697.22856,203.51436 L697.22856,203.51436 Z M569.07051,165.69287 L554.47993,130.67606 L539.96916,165.69287 L569.07051,165.69287 L569.07051,165.69287 Z" id="Path" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
11
+ <path d="M750.95644,343.76716 C745.83485,351.22516 735.85504,355.00582 722.34464,355.00582 L681.62723,355.00582 L681.62723,336.1661 L722.17969,336.1661 C726.20248,336.1661 729.01736,335.63887 730.71215,333.99096 C732.18079,332.63183 733.2051,330.65804 733.2051,328.26036 C733.2051,325.70107 732.18079,323.66899 730.62967,322.45028 C729.09984,321.10969 726.87294,320.50033 723.20135,320.50033 C703.40402,319.83005 678.70592,321.10969 678.70592,293.30714 C678.70592,280.56363 686.83131,267.14983 708.95664,267.14983 L750.95379,267.14983 L750.95379,249.66925 L711.93382,249.66925 C700.15812,249.66925 691.60438,252.47759 685.54626,256.84375 L685.54626,249.66925 L627.83044,249.66925 C618.60091,249.66925 607.76706,251.94771 602.64279,256.84375 L602.64279,249.66925 L499.57751,249.66925 L499.57751,256.84375 C491.37496,250.95154 477.53466,249.66925 471.14663,249.66925 L403.16366,249.66925 L403.16366,256.84375 C396.67452,250.58593 382.24357,249.66925 373.44772,249.66925 L297.3633,249.66925 L279.95252,268.43213 L263.64586,249.66925 L149.99149,249.66925 L149.99149,372.26121 L261.50676,372.26121 L279.447,353.20159 L296.34697,372.26121 L365.08554,372.32211 L365.08554,343.48364 L371.84339,343.48364 C380.96384,343.62405 391.72054,343.25845 401.21079,339.17311 L401.21079,372.25852 L457.90762,372.25852 L457.90762,340.30704 L460.64268,340.30704 C464.13336,340.30704 464.47657,340.45011 464.47657,343.92344 L464.47657,372.25587 L636.71144,372.25587 C647.64639,372.25587 659.07621,369.46873 665.40571,364.41107 L665.40571,372.25587 L720.03792,372.25587 C731.40656,372.25587 742.50913,370.66889 750.95644,366.60475 L750.95644,343.76712 L750.95644,343.76716 Z M409.45301,296.61266 C409.45301,321.01872 391.16689,326.05784 372.7371,326.05784 L346.42935,326.05784 L346.42935,355.52685 L305.44855,355.52685 L279.48667,326.44199 L252.5058,355.52685 L168.9904,355.52685 L168.9904,267.66822 L253.79086,267.66822 L279.73144,296.46694 L306.55002,267.66822 L373.92106,267.66822 C390.6534,267.66822 409.45301,272.28078 409.45301,296.61266 L409.45301,296.61266 Z M241.82781,337.04655 L189.9892,337.04655 L189.9892,319.56596 L236.27785,319.56596 L236.27785,301.64028 L189.9892,301.64028 L189.9892,285.66718 L242.84947,285.66718 L265.91132,311.27077 L241.82781,337.04655 L241.82781,337.04655 Z M325.3545,347.10668 L292.9833,311.3189 L325.3545,276.6677 L325.3545,347.10668 L325.3545,347.10668 Z M373.2272,308.04117 L345.98027,308.04117 L345.98027,285.66718 L373.47197,285.66718 C381.08388,285.66718 386.36777,288.75636 386.36777,296.43956 C386.36777,304.03796 381.32865,308.04117 373.2272,308.04117 L373.2272,308.04117 Z M515.97053,267.66822 L586.34004,267.66822 L586.34004,285.83764 L536.96778,285.83764 L536.96778,301.81074 L585.1348,301.81074 L585.1348,319.73642 L536.96778,319.73642 L536.96778,337.21701 L586.34004,337.29641 L586.34004,355.52678 L515.97053,355.52678 L515.97053,267.66815 L515.97053,267.66822 Z M488.91724,314.6973 C493.61049,316.42205 497.44703,319.51387 499.24559,322.07317 C502.22276,326.36251 502.65378,330.36571 502.73891,338.10985 L502.73891,355.52685 L481.5714,355.52685 L481.5714,344.53458 C481.5714,339.24908 482.08223,331.42282 478.1632,327.33748 C475.08226,324.19002 470.38635,323.4376 462.69463,323.4376 L440.16223,323.4376 L440.16223,355.52685 L418.97609,355.52685 L418.97609,267.66822 L467.65393,267.66822 C478.32816,267.66822 486.10236,268.13716 493.02251,271.81449 C499.6766,275.8177 503.86168,281.30191 503.86168,291.3245 C503.85868,305.34765 494.46719,312.50362 488.91724,314.6973 L488.91724,314.6973 Z M476.99899,303.59022 C474.17879,305.25668 470.69077,305.39975 466.58817,305.39975 L440.97483,305.39975 L440.97483,285.66718 L466.9367,285.66718 C470.69077,285.66718 474.4475,285.74658 476.99899,287.25416 C479.7314,288.67687 481.36499,291.39779 481.36499,295.15725 C481.36499,298.91672 479.7314,301.94496 476.99899,303.59022 L476.99899,303.59022 Z M667.33539,309.1866 C671.44067,313.41766 673.64095,318.7588 673.64095,327.80112 C673.64095,346.70178 661.78278,355.5242 640.51948,355.5242 L599.45353,355.5242 L599.45353,336.68449 L640.35453,336.68449 C644.35337,336.68449 647.18954,336.15726 648.9668,334.50934 C650.41681,333.15021 651.45709,331.17643 651.45709,328.77875 C651.45709,326.21944 650.33167,324.18738 648.88433,322.96866 C647.27201,321.62807 645.04778,321.01872 641.37619,321.01872 C621.65868,320.34843 596.9659,321.62807 596.9659,293.82551 C596.9659,281.08201 605.00615,267.66822 627.11019,267.66822 L669.37872,267.66822 L669.37872,286.36752 L630.70196,286.36752 C626.86809,286.36752 624.37512,286.51059 622.25464,287.9545 C619.94527,289.37721 619.08856,291.48876 619.08856,294.2759 C619.08856,297.59028 621.04941,299.8449 623.702,300.81987 C625.92624,301.59084 628.31543,301.81603 631.9072,301.81603 L643.25722,302.12071 C654.703,302.39889 662.55967,304.37003 667.33539,309.1866 L667.33539,309.1866 Z M751,285.66718 L712.57335,285.66718 C708.7368,285.66718 706.18797,285.81025 704.04088,287.25416 C701.81665,288.67687 700.95995,290.78843 700.95995,293.57558 C700.95995,296.88994 702.83831,299.14456 705.57071,300.11953 C707.79495,300.8905 710.18415,301.1157 713.6961,301.1157 L725.12327,301.42038 C736.65419,301.70387 744.35123,303.67765 749.04448,308.49157 C749.89852,309.16186 750.41202,309.91428 751,310.6667 L751,285.66718 L751,285.66718 Z" id="path13" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
12
+ </g>
13
+ </g>
14
+ </svg>
assets/images/cards/diners.svg ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg viewBox="0 0 750 471" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" preserveAspectRatio="xMidYMid meet">
3
+ <!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
4
+ <title>diners</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <g id="diners" sketch:type="MSLayerGroup">
9
+ <rect id="rectangle" fill="#0079BE" sketch:type="MSShapeGroup" x="0" y="0" width="750" height="471" rx="40"></rect>
10
+ <path d="M584.933911,237.947339 C584.933911,138.53154 501.952976,69.8140806 411.038924,69.8471464 L332.79674,69.8471464 C240.793699,69.8140806 165.066089,138.552041 165.066089,237.947339 C165.066089,328.877778 240.793699,403.587432 332.79674,403.150963 L411.038924,403.150963 C501.952976,403.586771 584.933911,328.857939 584.933911,237.947339 L584.933911,237.947339 Z" id="Shape-path" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
11
+ <path d="M333.280302,83.9308394 C249.210378,83.9572921 181.085889,152.238282 181.066089,236.510581 C181.085889,320.768331 249.209719,389.042708 333.280302,389.069161 C417.370025,389.042708 485.508375,320.768331 485.520254,236.510581 C485.507715,152.238282 417.370025,83.9572921 333.280302,83.9308394 L333.280302,83.9308394 Z" id="Shape-path" fill="#0079BE" sketch:type="MSShapeGroup"></path>
12
+ <path d="M237.066089,236.09774 C237.145288,194.917524 262.812421,159.801587 299.006443,145.847134 L299.006443,326.327183 C262.812421,312.380667 237.144628,277.283907 237.066089,236.09774 Z M368.066089,326.372814 L368.066089,145.847134 C404.273312,159.767859 429.980043,194.903637 430.046043,236.103692 C429.980043,277.316312 404.273312,312.425636 368.066089,326.372814 Z" id="Path" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
13
+ </g>
14
+ </g>
15
+ </svg>
assets/images/cards/discover.svg ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg viewBox="0 0 780 501" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" preserveAspectRatio="xMidYMid meet">
3
+ <!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
4
+ <title>discover</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <g id="discover" sketch:type="MSLayerGroup">
9
+ <path d="M54.992188,0 C24.626565,0 -4.7369516e-15,24.629374 0,55.003906 L0,445.99609 C0,476.37636 24.618673,501 54.992188,501 L725.00781,501 C755.37344,501 780,476.37062 780,445.99609 L780,268.55664 L780,55.003906 C780,24.623637 755.38133,-4.7369516e-15 725.00781,0 L54.992188,0 L54.992188,0 Z" id="rectangle" fill="#4D4D4D" sketch:type="MSShapeGroup"></path>
10
+ <path d="M415.13086,161.21289 C446.07103,161.21289 471.15234,184.79287 471.15234,213.92188 L471.15234,213.95508 C471.15234,243.08408 446.07103,266.69727 415.13086,266.69727 C384.19069,266.69727 359.10938,243.08408 359.10938,213.95508 L359.10938,213.92188 C359.10938,184.79287 384.19069,161.21289 415.13086,161.21289 L415.13086,161.21289 Z M327.15234,161.89258 C335.9889,161.89258 343.40028,163.67723 352.41992,167.98242 L352.41992,190.73438 C343.87628,182.87089 336.46483,179.58008 326.66406,179.58008 C307.4002,179.58008 292.25,194.59455 292.25,213.63086 C292.25,233.70517 306.93133,247.82617 327.61914,247.82617 C336.93171,247.82617 344.20582,244.70584 352.41992,236.96875 L352.41992,259.73242 C343.07888,263.87291 335.50876,265.50781 326.66406,265.50781 C295.38621,265.50781 271.08203,242.91198 271.08203,213.77148 C271.08203,184.94507 296.03316,161.89258 327.15234,161.89258 L327.15234,161.89258 Z M230.03906,162.51953 C241.58477,162.51953 252.14952,166.24004 260.98242,173.51367 L250.23438,186.76172 C244.88362,181.11594 239.82337,178.73438 233.66992,178.73438 C224.81668,178.73437 218.36914,183.47936 218.36914,189.72266 C218.36914,195.07734 221.98883,197.91138 234.31445,202.20508 C257.67927,210.24859 264.60352,217.3809 264.60352,233.13086 C264.60352,252.32421 249.62806,265.68359 228.2832,265.68359 C212.65323,265.68359 201.29008,259.88895 191.82617,246.8125 L205.09375,234.78125 C209.82489,243.39164 217.71615,248.00391 227.51367,248.00391 C236.67693,248.00391 243.46094,242.05155 243.46094,234.01953 C243.46094,229.85606 241.40612,226.28585 237.30273,223.76172 C235.2368,222.56668 231.1447,220.78491 223.10352,218.11523 C203.81198,211.57701 197.19336,204.58834 197.19336,190.92969 C197.19336,174.70478 211.40702,162.51953 230.03906,162.51953 L230.03906,162.51953 Z M464.76172,164.24805 L487.19922,164.24805 L515.2832,230.83984 L543.72852,164.24805 L565.99609,164.24805 L520.50195,265.93359 L509.44922,265.93359 L464.76172,164.24805 L464.76172,164.24805 Z M67.414062,164.40039 L97.564453,164.40039 C130.87609,164.40039 154.09766,184.78179 154.09766,214.04102 C154.09766,228.63041 146.99364,242.73654 134.98047,252.09766 C124.87172,259.99945 113.35396,263.54297 97.40625,263.54297 L67.414062,263.54297 L67.414062,164.40039 L67.414062,164.40039 Z M163.54883,164.40039 L184.08984,164.40039 L184.08984,263.54297 L163.54883,263.54297 L163.54883,164.40039 L163.54883,164.40039 Z M575.2832,164.40039 L633.53516,164.40039 L633.53516,181.19922 L595.80859,181.19922 L595.80859,203.20508 L632.14453,203.20508 L632.14453,219.99609 L595.80859,219.99609 L595.80859,246.75781 L633.53516,246.75781 L633.53516,263.54297 L575.2832,263.54297 L575.2832,164.40039 L575.2832,164.40039 Z M647.14062,164.40039 L677.5957,164.40039 C701.28599,164.40039 714.86133,175.11052 714.86133,193.67188 C714.86133,208.85113 706.34712,218.81273 690.875,221.77734 L724.02344,263.54297 L698.76367,263.54297 L670.33398,223.71484 L667.65625,223.71484 L667.65625,263.54297 L647.14062,263.54297 L647.14062,164.40039 L647.14062,164.40039 Z M667.65625,180.01562 L667.65625,210.04102 L673.6582,210.04102 C686.77472,210.04102 693.72656,204.67918 693.72656,194.71289 C693.72656,185.06451 686.77347,180.01562 673.98242,180.01562 L667.65625,180.01562 L667.65625,180.01562 Z M87.939453,181.19922 L87.939453,246.75781 L93.451172,246.75781 C106.72432,246.75781 115.10685,244.36382 121.56055,238.87891 C128.66438,232.92288 132.9375,223.41276 132.9375,213.89844 C132.9375,204.39943 128.66438,195.17283 121.56055,189.2168 C114.77608,183.43696 106.72432,181.19922 93.451172,181.19922 L87.939453,181.19922 L87.939453,181.19922 Z" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
11
+ <path d="M779.981917,288.361069 C753.932037,306.691919 558.904907,437.700579 221.228007,500.98412 L724.989727,500.98412 C755.355357,500.98412 779.981917,476.35474 779.981917,445.980209 L779.981917,288.361069 L779.981917,288.361069 Z" id="Shape-9" fill="#F47216" sketch:type="MSShapeGroup"></path>
12
+ </g>
13
+ </g>
14
+ </svg>
assets/images/cards/jcb.svg ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg viewBox="0 0 750 471" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" preserveAspectRatio="xMidYMid meet">
3
+ <!-- Generator: Sketch 3.3.1 (12005) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <linearGradient x1="0.031607858%" y1="49.9998574%" x2="99.9743153%" y2="49.9998574%" id="linearGradient-1">
8
+ <stop stop-color="#007B40" offset="0%"></stop>
9
+ <stop stop-color="#55B330" offset="100%"></stop>
10
+ </linearGradient>
11
+ <linearGradient x1="0.471693172%" y1="49.999826%" x2="99.9860086%" y2="49.999826%" id="linearGradient-2">
12
+ <stop stop-color="#1D2970" offset="0%"></stop>
13
+ <stop stop-color="#006DBA" offset="100%"></stop>
14
+ </linearGradient>
15
+ <linearGradient x1="0.113880772%" y1="50.0008964%" x2="99.9860003%" y2="50.0008964%" id="linearGradient-3">
16
+ <stop stop-color="#6E2B2F" offset="0%"></stop>
17
+ <stop stop-color="#E30138" offset="100%"></stop>
18
+ </linearGradient>
19
+ </defs>
20
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
21
+ <g id="jcb" sketch:type="MSLayerGroup">
22
+ <rect id="Rectangle-1" fill="#0E4C96" sketch:type="MSShapeGroup" x="0" y="0" width="750" height="471" rx="40"></rect>
23
+ <path d="M617.243183,346.766281 C617.243183,388.380887 583.514892,422.125974 541.88349,422.125974 L132.756823,422.125974 L132.756823,124.244916 C132.756823,82.6186826 166.489851,48.8744567 208.121683,48.8744567 L617.242752,48.874026 L617.242752,346.766281 L617.243183,346.766281 L617.243183,346.766281 Z" id="path3494" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
24
+ <path d="M483.858874,242.044797 C495.542699,242.298285 507.296188,241.528806 518.936004,242.444883 C530.723244,244.645678 533.563915,262.487874 523.09234,268.332511 C515.950746,272.182115 507.459496,269.764696 499.713328,270.446208 L483.858874,270.446208 L483.858874,242.044797 L483.858874,242.044797 Z M525.691826,209.900487 C528.288491,219.064679 519.453903,227.292118 510.625917,226.030566 L483.858874,226.030566 C484.043758,217.388441 483.491345,208.008973 484.131053,199.821663 C494.854942,200.123386 505.679576,199.205849 516.340394,200.301853 C520.921799,201.451558 524.753935,205.217712 525.691826,209.900487 L525.691826,209.900487 Z M590.120412,73.9972254 C590.617872,91.498454 590.191471,109.92365 590.33359,127.780192 C590.299137,200.376358 590.405942,272.974174 590.278896,345.569303 C589.81042,372.776592 565.696524,396.413678 538.678749,396.956694 C511.63292,397.068451 484.584297,396.972628 457.537396,397.004497 L457.537396,287.253291 C487.007,287.099803 516.49604,287.561 545.953521,287.021594 C559.62072,286.162769 574.586027,277.145695 575.22328,262.107374 C576.833661,247.005483 562.592128,236.557185 549.071096,234.905684 C543.872773,234.770542 544.027132,233.390846 549.071096,232.788972 C561.96307,230.002483 572.090675,216.655787 568.296786,203.290229 C565.06052,189.232374 549.523839,183.79142 536.600366,183.817768 C510.248548,183.638612 483.891299,183.792359 457.537396,183.74111 C457.708585,163.252408 457.182916,142.740653 457.82271,122.267364 C459.910361,95.5513766 484.628603,73.5195319 511.269759,73.997656 C537.553166,73.9973692 563.837737,73.9982301 590.120412,73.9972254 L590.120412,73.9972254 Z" id="path3496" fill="url(#linearGradient-1)" sketch:type="MSShapeGroup"></path>
25
+ <path d="M159.740429,125.040498 C160.413689,97.8766592 184.628619,74.4290299 211.614797,74.0325398 C238.559493,73.9499686 265.506204,74.0209119 292.451671,73.9972254 C292.37764,164.882488 292.599905,255.773672 292.340301,346.655222 C291.302298,373.488802 267.350548,396.488661 240.661356,396.962292 C213.665015,397.060957 186.666275,396.976074 159.669012,397.004497 L159.669012,283.550875 C185.891623,289.745491 213.391138,292.382518 240.142406,288.272242 C256.134509,285.697368 273.629935,277.848026 279.044261,261.257567 C283.030122,247.066267 280.785723,232.131602 281.378027,217.566465 L281.378027,183.741541 L235.081246,183.741541 C234.873106,206.112145 235.507258,228.522447 234.746146,250.867107 C233.49785,264.601214 219.900147,273.326996 206.946428,272.861801 C190.879747,273.030535 159.04755,261.221796 159.04755,261.221796 C158.967492,219.3048 159.514314,166.814385 159.740429,125.040498 L159.740429,125.040498 Z" id="path3498" fill="url(#linearGradient-2)" sketch:type="MSShapeGroup"></path>
26
+ <path d="M309.719995,197.390136 C307.285788,197.90738 309.229141,189.089459 308.606298,185.743964 C308.772233,164.593637 308.260045,143.420951 308.889718,122.285827 C310.972541,95.4570827 335.881262,73.3701105 362.628748,73.997656 L441.39456,73.997656 C441.320658,164.882346 441.542493,255.77294 441.283406,346.653934 C440.244412,373.488027 416.291344,396.487102 389.602087,396.962292 C362.604605,397.061991 335.604707,396.976504 308.606298,397.004928 L308.606298,272.707624 C327.04641,287.835846 352.105738,290.192248 375.077953,290.233484 C392.39501,290.227455 409.611861,287.557865 426.428143,283.562934 L426.428143,260.790297 C407.474658,270.236609 385.194808,276.235815 364.184745,270.807966 C349.529051,267.157367 338.89089,252.996683 339.128513,237.872204 C337.43001,222.143684 346.652631,205.536885 362.110237,200.860855 C381.300923,194.852545 402.217787,199.448454 420.206344,207.258795 C424.060526,209.27695 427.97066,211.780342 426.428143,205.338044 L426.428143,187.438358 C396.343581,180.280951 364.326644,177.646405 334.099438,185.433619 C325.351193,187.901774 316.82819,191.644647 309.719995,197.390136 L309.719995,197.390136 Z" id="path3500" fill="url(#linearGradient-3)" sketch:type="MSShapeGroup"></path>
27
+ </g>
28
+ </g>
29
+ </svg>
assets/images/cards/mastercard.svg ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg viewBox="0 0 750 471" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet">
3
+ <!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="mastercard">
9
+ <rect id="Rectangle-1" fill="#F4F4F4" x="0" y="0" width="750" height="471" rx="40"></rect>
10
+ <g id="mark" transform="translate(125.719997, 41.850862)">
11
+ <g id="text" transform="translate(25.142679, 328.360022)" fill="#000000">
12
+ <path d="M467.715561,51.9326899 C466.502604,51.9623585 465.503405,52.3648948 464.717962,53.1403001 C463.932516,53.9157321 463.526027,54.8861098 463.498494,56.0514362 C463.526027,57.2079497 463.932516,58.1758036 464.717963,58.9550005 C465.503406,59.7342125 466.502604,60.1392726 467.715561,60.1701825 C468.900764,60.1392726 469.887352,59.7342123 470.675326,58.9550002 C471.463285,58.175803 471.872297,57.2079493 471.902362,56.0514362 C471.872927,54.8861098 471.465177,53.915732 470.679109,53.1402998 C469.893026,52.3648943 468.905178,51.9623581 467.715561,51.9326899 L467.715561,51.9326899 L467.715561,51.9326899 Z M467.715561,59.2616355 C466.791392,59.2389292 466.029277,58.9259854 465.429214,58.3228033 C464.829145,57.7196374 464.518499,56.9625159 464.497273,56.0514362 C464.518499,55.1363804 464.829146,54.379679 465.429214,53.78133 C466.029277,53.1830062 466.791392,52.8730071 467.715561,52.8513318 C468.620383,52.8730076 469.370728,53.1830066 469.966597,53.7813302 C470.562452,54.379679 470.871417,55.1363804 470.893494,56.0514362 C470.871417,56.9625161 470.562452,57.7196378 469.966597,58.3228033 C469.370728,58.925985 468.620384,59.2389287 467.715561,59.2616355 L467.715561,59.2616355 L467.715561,59.2616355 Z M467.957689,54.1232975 L466.19217,54.1232975 L466.19217,57.9492899 L467.009353,57.9492899 L467.009353,56.5158046 L467.382634,56.5158046 L468.542832,57.9492899 L469.521434,57.9492899 L468.270438,56.5057097 C468.661158,56.4567169 468.961716,56.330109 469.172113,56.1258861 C469.382498,55.9216836 469.488849,55.6613181 469.491168,55.3447885 C469.488429,54.9670796 469.355174,54.6701195 469.091404,54.4539073 C468.827621,54.237719 468.449717,54.1275158 467.957689,54.1232975 L467.957689,54.1232975 L467.957689,54.1232975 Z M467.9476,54.8400402 C468.166813,54.840262 468.338741,54.8827453 468.463383,54.9674885 C468.588015,55.0522552 468.651489,55.1780218 468.653808,55.3447882 C468.651483,55.5164129 468.588015,55.6451235 468.463383,55.73092 C468.338741,55.8167385 468.166813,55.8596412 467.9476,55.859631 L467.009353,55.859631 L467.009353,54.8400393 L467.9476,54.8400402 L467.9476,54.8400402 Z" id="path3078"></path>
13
+ <path d="M9.34331724,57.5428029 L0.588175916,57.5428029 L0.588175916,16.6600045 L9.17164757,16.6600045 L9.17164757,21.6415186 C9.17164757,21.6415186 16.7107355,15.5532485 21.1885083,15.6293508 C29.8949298,15.7773317 35.093729,23.1875098 35.093729,23.1875098 C35.093729,23.1875098 39.3109893,15.6293508 48.8272918,15.6293508 C62.8997988,15.6293508 64.9642149,28.5125858 64.9642149,28.5125858 L64.9642149,57.3710273 L56.5524108,57.3710273 L56.5524108,31.9481087 C56.5524108,31.9481087 56.5825922,24.2181741 47.4539323,24.2181741 C38.0139747,24.2181741 37.1537629,31.9481087 37.1537629,31.9481087 L37.1537629,57.3710273 L28.3986215,57.3710273 L28.3986215,31.7763331 C28.3986215,31.7763331 27.5575496,23.7028366 19.6434834,23.7028366 C9.3650113,23.7028366 9.17164757,31.9481087 9.17164757,31.9481087 L9.34331724,57.5428029 L9.34331724,57.5428029 Z" id="path3006"></path>
14
+ <path d="M275.596898,15.623773 C271.119122,15.5476814 263.580741,21.6355967 263.580741,21.6355967 L263.580741,16.6649268 L254.988182,16.6649268 L254.988182,57.5386115 L263.748565,57.5386115 L263.580741,31.9463783 C263.580741,31.9463783 263.77445,23.7179044 274.052923,23.7179044 C275.961824,23.7179044 277.444363,24.180569 278.61772,24.8934007 L278.61772,24.8598688 L281.470718,16.9000798 C279.749092,16.1750176 277.791223,15.6610664 275.596898,15.623773 L275.596898,15.623773 L275.596898,15.623773 Z" id="path3008"></path>
15
+ <path d="M398.92774,15.623773 C394.449964,15.5476814 386.911582,21.6355967 386.911582,21.6355967 L386.911582,16.6649268 L378.319023,16.6649268 L378.319023,57.5386115 L387.079406,57.5386115 L386.911582,31.9463783 C386.911582,31.9463783 387.105291,23.7179044 397.383764,23.7179044 C399.292666,23.7179044 400.775204,24.180569 401.948561,24.8934007 L401.948561,24.8598688 L404.801559,16.9000798 C403.079933,16.1750713 401.122064,15.6611201 398.92774,15.6238267 L398.92774,15.623773 L398.92774,15.623773 Z" id="path3013"></path>
16
+ <path d="M93.2735295,15.4558449 C80.1708646,15.4558449 73.2368626,27.2396859 73.2018479,37.0849763 C73.1658666,47.1762746 81.0955959,58.8148646 93.6427411,58.8148646 C100.962678,58.8148646 106.976041,53.4075817 106.976041,53.4075817 L106.960145,57.5721971 L115.577998,57.5721971 L115.577998,16.6488272 L106.929792,16.6488272 L106.929792,21.8035248 C106.929792,21.8035248 101.282654,15.4558449 93.2735725,15.4558449 L93.2735295,15.4558449 L93.2735295,15.4558449 Z M94.9517638,23.7850756 C101.991433,23.7850756 107.706344,29.9122942 107.706344,37.454418 C107.706344,44.9965418 101.991433,51.0901748 94.9517638,51.0901748 C87.9120947,51.0901748 82.2307482,44.9965418 82.2307482,37.454418 C82.2307482,29.9122942 87.9120947,23.7850756 94.9517638,23.7850756 L94.9517638,23.7850756 L94.9517638,23.7850756 Z" id="path3015"></path>
17
+ <path d="M344.597578,15.4558449 C331.494913,15.4558449 324.560911,27.2396859 324.525896,37.0849763 C324.489915,47.1762746 332.419644,58.8148646 344.966789,58.8148646 C352.286726,58.8148646 358.300089,53.4075817 358.300089,53.4075817 L358.284193,57.5721971 L366.902046,57.5721971 L366.902046,16.6488272 L358.25384,16.6488272 L358.25384,21.8035248 C358.25384,21.8035248 352.606702,15.4558449 344.59762,15.4558449 L344.597578,15.4558449 L344.597578,15.4558449 Z M346.275812,23.7850756 C353.315481,23.7850756 359.030392,29.9122942 359.030392,37.454418 C359.030392,44.9965418 353.315481,51.0901748 346.275812,51.0901748 C339.236143,51.0901748 333.554796,44.9965418 333.554796,37.454418 C333.554796,29.9122942 339.236143,23.7850756 346.275812,23.7850756 L346.275812,23.7850756 L346.275812,23.7850756 Z" id="path3020"></path>
18
+ <path d="M427.342249,15.4558449 C414.239584,15.4558449 407.305582,27.2396859 407.270567,37.0849763 C407.234586,47.1762746 415.164315,58.8148646 427.71146,58.8148646 C435.031397,58.8148646 441.04476,53.4075817 441.04476,53.4075817 L441.028864,57.5721971 L449.646718,57.5721971 L449.646718,0.49407462 L440.998511,0.49407462 L440.998511,21.8035248 C440.998511,21.8035248 435.351373,15.4558449 427.342292,15.4558449 L427.342249,15.4558449 L427.342249,15.4558449 Z M429.020483,23.7850756 C436.060152,23.7850756 441.775063,29.9122942 441.775063,37.454418 C441.775063,44.9965418 436.060152,51.0901748 429.020483,51.0901748 C421.980814,51.0901748 416.299467,44.9965418 416.299467,37.454418 C416.299467,29.9122942 421.980814,23.7850756 429.020483,23.7850756 L429.020483,23.7850756 L429.020483,23.7850756 Z" id="path3022"></path>
19
+ <path d="M141.872122,58.9170078 C132.94558,58.9170078 124.705176,53.4201669 124.705176,53.4201669 L128.481907,47.5797641 C128.481907,47.5797641 136.278978,51.1870733 141.872122,51.1870733 C145.50613,51.1870733 151.583937,50.0128667 151.657274,46.3773348 C151.734822,42.5349478 141.442945,41.39581 141.442945,41.39581 C141.442945,41.39581 126.078536,41.1860853 126.078536,28.5125858 C126.078536,20.5421246 133.751938,15.4575752 143.588818,15.4575752 C149.272667,15.4575752 159.89741,20.4390893 159.89741,20.4390893 L155.605674,27.1383702 C155.605674,27.1383702 147.402218,23.858921 143.073802,23.7028366 C139.418806,23.5710413 135.005346,25.3221465 135.005346,28.5125858 C135.005346,37.1806926 160.584084,27.837198 160.584084,45.3466704 C160.584084,56.8338188 150.166691,58.9170078 141.872122,58.9170078 L141.872122,58.9170078 L141.872122,58.9170078 Z" id="path3024"></path>
20
+ <path d="M174.802149,4.80920724 L174.802149,16.6985124 L167.182966,16.6985124 L167.182966,25.296428 L174.802149,25.296428 L174.802149,45.85082 C174.802149,45.85082 174.127827,59.7552616 189.067141,59.7552616 C193.19753,59.7552616 201.284686,56.6989713 201.284686,56.6989713 L197.827523,47.7651996 C197.827523,47.7651996 194.611468,50.5102454 190.980328,50.4184626 C184.076195,50.2440217 184.267391,45.8172343 184.267391,45.8172343 L184.267391,25.296428 L198.498817,25.296428 L198.498817,16.6985124 L184.267391,16.6985124 L184.267391,4.80920724 L174.802149,4.80920724 L174.802149,4.80920724 L174.802149,4.80920724 Z" id="path3026"></path>
21
+ <path d="M226.659588,15.959629 C212.610087,15.959629 205.590417,27.5389793 205.648095,37.5887604 C205.707384,47.9238419 212.040304,59.5537479 227.498705,59.5537479 C234.115072,59.5537479 243.408366,53.7434378 243.408366,53.7434378 L239.414168,46.791217 C239.414168,46.791217 233.072548,51.2916884 227.498705,51.2916884 C216.339172,51.2916884 215.616806,40.3763659 215.616806,40.3763659 L245.489376,40.3763659 C245.489376,40.3763659 247.717985,15.959629 226.659588,15.959629 L226.659588,15.959629 L226.659588,15.959629 Z M225.38413,23.9865893 C225.715416,23.9677813 226.070568,23.9865893 226.424635,23.9865893 C236.937954,23.9865893 236.863252,33.9279292 236.863252,33.9279292 L215.616806,33.9279292 C215.616806,33.9279292 215.114206,24.5707962 225.38413,23.9865893 L225.38413,23.9865893 L225.38413,23.9865893 Z" id="path3034"></path>
22
+ <path d="M315.5162,46.686 L319.52203,54.7026427 C319.52203,54.7026427 313.17302,58.8324258 306.047898,58.8324258 C291.296557,58.8324258 283.105442,47.7234997 283.105442,37.2117848 C283.105442,20.6912339 296.140698,15.8340672 304.955397,15.8340672 C312.956369,15.8340672 319.886193,20.4497077 319.886193,20.4497077 L315.394819,28.4663505 C315.394819,28.4663505 312.671859,24.2151004 304.712614,24.2151004 C296.766655,24.2151004 292.573755,31.0702185 292.573755,37.5761752 C292.573755,44.8669927 297.454114,51.0587064 304.834005,51.0587064 C310.623393,51.0587064 315.5162,46.686 315.5162,46.686 L315.5162,46.686 L315.5162,46.686 Z" id="path3037"></path>
23
+ </g>
24
+ <path d="M498.787985,236.781279 L498.787985,231.260623 L497.347484,231.260623 L495.690436,235.057252 L494.033388,231.260623 L492.592886,231.260623 L492.592886,236.781279 L493.609711,236.781279 L493.609711,232.617235 L495.163193,236.206603 L496.217678,236.206603 L497.771161,232.607814 L497.771161,236.781279 L498.787985,236.781279 L498.787985,236.781279 Z M489.664807,236.781279 L489.664807,232.202715 L491.510156,232.202715 L491.510156,231.270044 L486.812049,231.270044 L486.812049,232.202715 L488.657397,232.202715 L488.657397,236.781279 L489.664807,236.781279 L489.664807,236.781279 Z" id="path3057" fill="#F79F1A"></path>
25
+ <path d="M499.076678,154.709802 C499.076678,240.135159 429.999707,309.386105 344.788929,309.386105 C259.578151,309.386105 190.501159,240.135159 190.501159,154.709802 C190.501159,69.2844326 259.578151,0.0334920174 344.788929,0.0334920174 C429.999707,0.0334920174 499.076678,69.2844326 499.076678,154.709802 L499.076678,154.709802 L499.076678,154.709802 Z" id="path2997" fill="#F79F1A"></path>
26
+ <path d="M308.73932,154.709802 C308.73932,240.135159 239.662349,309.386105 154.451571,309.386105 C69.2407931,309.386105 0.163801275,240.135159 0.163801275,154.709802 C0.163801275,69.2844326 69.2407931,0.0334920174 154.451571,0.0334920174 C239.662349,0.0334920174 308.73932,69.2844326 308.73932,154.709802 L308.73932,154.709802 L308.73932,154.709802 Z" id="path2995" fill="#EA001B"></path>
27
+ <path d="M249.620562,32.9474812 C213.621326,61.2636823 190.513152,105.265345 190.513152,154.695309 C190.513152,204.125274 213.621326,248.16052 249.620562,276.476723 C285.619799,248.16052 308.727973,204.125274 308.727973,154.695309 C308.727973,105.265345 285.619799,61.2636823 249.620562,32.9474812 L249.620562,32.9474812 L249.620562,32.9474812 Z" id="path2999" fill="#FF5F01"></path>
28
+ </g>
29
+ </g>
30
+ </g>
31
+ </svg>
assets/images/cards/unionpay.svg ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg viewBox="0 0 256 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid meet">
3
+ <g>
4
+ <path d="M50.041631,0.000667563305 L113.820211,0.000667563305 C122.723127,0.000667563305 128.260438,7.25731345 126.183558,16.1897657 L96.4900715,143.675416 C94.3945365,152.576777 85.480739,159.839641 76.571605,159.839641 L12.7992433,159.839641 C3.908764,159.839641 -1.64098444,152.576777 0.435896208,143.675416 L30.1418186,16.1897657 C32.2186993,7.25731345 41.1278333,0.000667563305 50.041631,0.000667563305" fill="#E21836"></path>
5
+ <path d="M108.513283,0.000667563305 L181.857018,0.000667563305 C190.758378,0.000667563305 186.744527,7.25731345 184.650546,16.1897657 L154.961724,143.675416 C152.878625,152.576777 153.528427,159.839641 144.608411,159.839641 L71.2646775,159.839641 C62.3446615,159.839641 56.8244495,152.576777 58.919985,143.675416 L88.6072525,16.1897657 C90.715224,7.25731345 99.6057035,0.000667563305 108.513283,0.000667563305" fill="#00447C"></path>
6
+ <path d="M178.94783,0.000667563305 L242.726409,0.000667563305 C251.641762,0.000667563305 257.179074,7.25731345 255.085093,16.1897657 L225.396271,143.675416 C223.300736,152.576777 214.380719,159.839641 205.466922,159.839641 L141.717879,159.839641 C132.797863,159.839641 127.265215,152.576777 129.354532,143.675416 L159.048017,16.1897657 C161.124899,7.25731345 170.027814,0.000667563305 178.94783,0.000667563305" fill="#007B84"></path>
7
+ <path d="M66.698338,40.8561434 C60.139686,40.9229891 58.202715,40.8561434 57.5840035,40.7100156 C57.346157,41.8401744 52.920349,62.256098 52.9079125,62.273198 C51.9549725,66.403641 51.261643,69.347961 48.9064975,71.2491775 C47.5695833,72.3544635 46.0088137,72.8876745 44.1993159,72.8876745 C41.2907503,72.8876745 39.5962892,71.4434965 39.3118063,68.704377 L39.2573971,67.7638735 C39.2573971,67.7638735 40.1434913,62.231225 40.1434913,62.200134 C40.1434913,62.200134 44.7884909,43.5952629 45.6201759,41.1359627 C45.6637033,40.9960531 45.6761397,40.9229891 45.6870215,40.8561434 C36.6457507,40.9354255 35.0430082,40.8561434 34.9326351,40.7100156 C34.8720075,40.9105527 34.6481522,42.0640298 34.6481522,42.0640298 L29.9052159,63.0333735 L29.4979234,64.8117805 L28.7097659,70.6289115 C28.7097659,72.3544635 29.0486581,73.762887 29.7233334,74.9536735 C31.8841598,78.729679 38.0479561,79.2955355 41.5348148,79.2955355 C46.0274683,79.2955355 50.241857,78.341041 53.089795,76.598389 C58.0332685,73.677387 59.3266555,69.1116695 60.4801325,65.0542905 L61.014898,62.972746 C61.014898,62.972746 65.7998075,43.6496723 66.6128375,41.1359627 C66.643929,40.9960531 66.656365,40.9229891 66.698338,40.8561434 Z M82.9786885,56.444252 C81.825211,56.444252 79.7172395,56.724071 77.823796,57.6521385 C77.1366845,58.0050215 76.486882,58.412314 75.8013245,58.818052 L76.420036,56.5841615 L76.081144,56.20796 C72.0657375,57.0209905 71.167207,57.129809 67.4580475,57.6521385 L67.147137,57.8588935 C66.7165265,61.4296985 66.3341065,64.1144085 64.7375825,71.133208 C64.129753,73.7199815 63.498605,76.331628 62.8659025,78.912183 L63.036903,79.2401935 C66.8377815,79.0396565 67.9912585,79.0396565 71.29468,79.0940655 L71.562063,78.8033645 C71.981792,76.65342 72.036201,76.1497455 72.965823,71.795447 C73.402652,69.7310025 74.313619,65.1948215 74.7628845,63.579643 C75.588351,63.197223 76.402936,62.8210215 77.1802115,62.8210215 C79.0316825,62.8210215 78.8062725,64.4362005 78.734763,65.079785 C78.655481,66.160198 77.9808055,69.68903 77.2890305,72.7188505 L76.8273285,74.674476 C76.5055365,76.1186545 76.152653,77.522414 75.830861,78.954156 L75.9707705,79.2401935 C79.7172395,79.0396565 80.859835,79.0396565 84.0591015,79.0940655 L84.435303,78.8033645 C85.013596,75.4455335 85.183042,74.547003 86.209046,69.6579385 L86.725157,67.411612 C87.727843,63.0153405 88.2315175,60.786114 87.4728965,58.970398 C86.670748,56.93549 84.7462135,56.444252 82.9786885,56.444252 Z M101.165696,61.047123 C99.1743155,61.429543 97.904247,61.684489 96.6419515,61.8492715 C95.3905375,62.049809 94.1702145,62.2316915 92.24568,62.499074 L92.093334,62.637429 L91.9534245,62.7478025 C91.7528875,64.181099 91.6129775,65.420076 91.3471495,66.876691 C91.1217395,68.383051 90.7750745,70.094612 90.2107725,72.5539125 C89.7739435,74.436474 89.5485335,75.092495 89.299805,75.754734 C89.057295,76.4169725 88.7899125,77.060557 88.298674,78.9120275 L88.413711,79.0830285 L88.510093,79.240038 C90.308709,79.1545375 91.4855045,79.09391 92.6949455,79.0830285 C93.902832,79.039501 95.1542455,79.0830285 97.0912165,79.09391 L97.260663,78.955555 L97.4425455,78.803209 C97.7223645,77.133621 97.7643375,76.6843555 97.935338,75.8697705 C98.104784,74.9961125 98.39704,73.786672 99.113688,70.556314 C99.4525805,69.039072 99.8303365,67.5264935 100.181665,65.97816 C100.546985,64.436045 100.929404,62.9172485 101.293169,61.4000065 L101.23876,61.2165695 L101.165696,61.047123 Z M101.208135,54.841043 C99.3986375,53.7730665 96.222689,54.1119585 94.0851805,55.587228 C91.953891,57.0329605 91.711381,59.0849685 93.5146605,60.166936 C95.293067,61.2053765 98.481452,60.896021 100.600305,59.408315 C102.726932,57.9314915 102.99276,55.898138 101.208135,54.841043 Z M112.151399,79.574733 C115.812368,79.574733 119.565055,78.565829 122.389675,75.571763 C124.562938,73.143554 125.559405,69.5307765 125.904516,68.043071 C127.028457,63.112034 126.153244,60.809743 125.054176,59.407538 C123.384588,57.2700295 120.43405,56.5844725 117.373138,56.5844725 C115.532549,56.5844725 111.148714,56.766355 107.724038,59.923649 C105.264737,62.2010665 104.12836,65.291515 103.442803,68.2544895 C102.751028,71.2734285 101.955097,76.70814 106.95298,78.7306115 C108.495095,79.3928505 110.718104,79.574733 112.151399,79.574733 Z M111.865362,68.4798995 C112.709484,64.7458675 113.705951,61.6118915 116.249197,61.6118915 C118.242132,61.6118915 118.386705,63.943719 117.500611,67.6901875 C117.342047,68.5218725 116.614517,71.6138755 115.630486,72.9305805 C114.943374,73.902175 114.130344,74.49135 113.231813,74.49135 C112.96443,74.49135 111.374124,74.49135 111.349251,72.1299865 C111.336815,70.964073 111.574661,69.7732865 111.865362,68.4798995 Z M135.05616,79.094532 L135.342197,78.803831 C135.747935,76.6538865 135.814781,76.148657 136.713312,71.7959135 C137.162577,69.731469 138.092198,65.195288 138.529028,63.580109 C139.356049,63.196135 140.156643,62.8199335 140.958791,62.8199335 C142.797825,62.8199335 142.57397,64.4351125 142.500907,65.0786965 C142.43406,66.1606645 141.759386,69.6879415 141.055173,72.717762 L140.618345,74.673388 C140.284116,76.1191205 139.920351,77.521326 139.598559,78.9546225 L139.738469,79.24066 C143.497374,79.0401225 144.596441,79.0401225 147.814363,79.094532 L148.203001,78.803831 C148.767303,75.4444455 148.919649,74.5459145 149.976744,69.658405 L150.480419,67.410524 C151.487768,63.0142525 151.99766,60.7865805 151.251476,58.9708645 C150.426009,56.9359565 148.489038,56.4447185 146.746386,56.4447185 C145.591354,56.4447185 143.472501,56.722983 141.589939,57.652605 C140.916819,58.005488 140.242143,58.411226 139.579904,58.8185185 L140.156643,56.584628 L139.847287,56.206872 C135.833436,57.021457 134.91625,57.1302755 131.211754,57.652605 L130.927271,57.85936 C130.478006,61.4301645 130.112686,64.1133205 128.516162,71.1336745 C127.908333,73.720448 127.277185,76.332094 126.646037,78.9126495 L126.815483,79.24066 C130.622579,79.0401225 131.758957,79.0401225 135.05616,79.094532 Z M162.673542,79.2398825 C162.909834,78.0864055 164.313594,71.2494885 164.32603,71.2494885 C164.32603,71.2494885 165.52148,66.232951 165.594545,66.0510685 C165.594545,66.0510685 165.970746,65.5287395 166.346947,65.321984 L166.900367,65.321984 C172.122106,65.321984 178.018519,65.321984 182.6402,61.92218 C185.785058,59.590353 187.935002,56.1470215 188.89416,51.9621695 C189.142889,50.9361655 189.326326,49.7158426 189.326326,48.4955199 C189.326326,46.8927774 189.004534,45.3071349 188.074912,44.0681575 C185.718212,40.770954 181.025022,40.7103265 175.60741,40.6854536 C175.59031,40.6854536 172.93669,40.7103265 172.93669,40.7103265 C166.001837,40.7958268 163.220744,40.770954 162.078149,40.6310444 C161.981767,41.1362735 161.799884,42.0348043 161.799884,42.0348043 C161.799884,42.0348043 159.315711,53.547812 159.315711,53.5664665 C159.315711,53.5664665 153.371107,78.0444325 153.091287,79.1979095 C159.146265,79.124846 161.628884,79.124846 162.673542,79.2398825 Z M167.276569,58.7882045 C167.276569,58.7882045 169.917752,47.2985153 169.905316,47.3420427 L169.990815,46.7528678 L170.028125,46.3036024 L171.083665,46.4124209 C171.083665,46.4124209 176.530813,46.8803409 176.658287,46.8927774 C178.808231,47.7244624 179.694325,49.8681887 179.075614,52.666381 C178.511312,55.223618 176.852606,57.373563 174.721316,58.412003 C172.966227,59.291879 170.816282,59.364943 168.601047,59.364943 L167.167751,59.364943 L167.276569,58.7882045 Z M183.721236,68.692718 C183.023242,71.668129 182.221093,77.102841 187.194103,79.039812 C188.779745,79.714487 190.200605,79.915024 191.644784,79.8419605 C193.169799,79.759569 194.582886,78.99473 195.891818,77.8941075 C195.773673,78.346482 195.655527,78.7988565 195.537381,79.2527855 L195.76279,79.5434865 C199.339813,79.392695 200.449763,79.392695 204.325259,79.4222315 L204.676588,79.1548485 C205.242445,75.8281085 205.775656,72.597751 207.246262,66.2334175 C207.962909,63.184942 208.678003,60.1660035 209.413306,57.1299645 L209.29827,56.795736 C205.296854,57.537257 204.227323,57.6958215 200.378253,58.241469 L200.085998,58.479315 C200.047134,58.788671 200.006716,59.08559 199.969406,59.3825095 C199.370904,58.4155785 198.503465,57.590112 197.164996,57.0755555 C195.453434,56.4024345 191.433365,57.269874 187.977597,60.416286 C185.549388,62.662613 184.383475,65.7406245 183.721236,68.692718 Z M192.12514,68.8746005 C192.981698,65.2074135 193.965729,62.104529 196.515194,62.104529 C198.127263,62.104529 198.976048,63.5922345 198.803493,66.1292625 C198.666693,66.761965 198.51901,67.4288675 198.343345,68.182825 C198.0884,69.2725655 197.811689,70.3529785 197.542752,71.4349465 C197.26915,72.174913 196.950468,72.8729065 196.600694,73.3377175 C195.944673,74.267339 194.383904,74.8440775 193.485373,74.8440775 C193.230426,74.8440775 191.65722,74.8440775 191.602811,72.524687 C191.590374,71.3696555 191.828221,70.1804235 192.12514,68.8746005 Z M236.010903,56.766044 L235.701548,56.413161 C231.742105,57.2153095 231.025456,57.3427825 227.387807,57.834021 L227.120423,58.1014035 C227.107988,58.144931 227.097105,58.211777 227.078451,58.2724045 L227.066014,58.211777 C224.357986,64.459519 224.437268,63.111723 222.232914,68.0303235 C222.220477,67.806468 222.220477,67.6665585 222.208042,67.428712 L221.656175,56.766044 L221.30951,56.413161 C217.161968,57.2153095 217.064031,57.3427825 213.233616,57.834021 L212.935143,58.1014035 C212.893169,58.228877 212.893169,58.3687865 212.868297,58.5211325 L212.893169,58.575542 C213.371971,61.022406 213.256934,60.4767585 213.737291,64.338264 C213.961146,66.233262 214.25962,68.139142 214.483475,70.010822 C214.861232,73.143243 215.072651,74.685358 215.534352,79.4656035 C212.947578,83.7344015 212.335085,85.3495805 209.844694,89.0960495 L209.861794,89.1333585 L208.10826,91.906678 C207.907723,92.198934 207.725841,92.399471 207.470894,92.4849715 C207.191075,92.6233265 206.82731,92.648199 206.32208,92.648199 L205.350486,92.648199 L203.906308,97.451763 L208.860663,97.5372635 C211.769228,97.524827 213.597381,96.1645945 214.581412,94.336442 L217.696733,88.9981125 L217.646987,88.9981125 L217.974998,88.621911 C220.070533,84.110603 236.010903,56.766044 236.010903,56.766044 Z M183.72108,119.853625 L181.619326,119.853625 L189.398302,94.1242455 L191.978857,94.1242455 L192.798105,91.4737355 L192.877387,94.421165 C192.781005,96.243099 194.214302,97.858278 197.979425,97.5908955 L202.333723,97.5908955 L203.832311,92.63654 L202.193814,92.63654 C201.251756,92.63654 200.814927,92.3986935 200.869337,91.888801 L200.790054,88.890071 L192.726596,88.890071 L192.726596,88.9056165 C190.119614,88.960026 182.33442,89.1558995 180.758105,89.5756285 C178.850671,90.0668665 176.840635,91.5125995 176.840635,91.5125995 L177.630347,88.85898 L170.087664,88.85898 L168.516013,94.1242455 L160.632883,120.246927 L159.103204,120.246927 L157.603062,125.165528 L172.626247,125.165528 L172.122572,126.805579 L179.525345,126.805579 L180.016584,125.165528 L182.093465,125.165528 L183.72108,119.853625 Z M177.557284,99.352202 C176.349398,99.6864305 174.101516,100.699998 174.101516,100.699998 L176.100669,94.1242455 L182.093465,94.1242455 L180.647732,98.915373 C180.647732,98.915373 178.796261,99.0241915 177.557284,99.352202 Z M177.672321,108.746356 C177.672321,108.746356 175.789759,108.982648 174.550781,109.262467 C173.330458,109.632451 171.042159,110.798364 171.042159,110.798364 L173.106603,103.955229 L179.13049,103.955229 L177.672321,108.746356 Z M174.31449,119.914253 L168.30304,119.914253 L170.045692,114.139095 L176.038487,114.139095 L174.31449,119.914253 Z M188.791404,103.955229 L197.456474,103.955229 L196.211278,107.987735 L187.431173,107.987735 L186.112912,112.396443 L193.795505,112.396443 L187.978375,120.587374 C187.571082,121.188986 187.205762,121.401959 186.800025,121.571405 C186.392732,121.77816 185.857967,122.02067 185.239255,122.02067 L183.107965,122.02067 L181.643577,126.849107 L187.218198,126.849107 C190.115882,126.849107 191.827443,125.530847 193.091294,123.800631 L197.080273,118.341047 L197.936831,123.884578 C198.118713,124.923017 198.864898,125.530847 199.370127,125.767139 C199.928211,126.046958 200.50495,126.527315 201.319535,126.598824 C202.193192,126.636133 202.82434,126.66567 203.244069,126.66567 L205.983189,126.66567 L207.627904,121.262049 L206.547491,121.262049 C205.927224,121.262049 204.859248,121.157894 204.677366,120.963575 C204.495483,120.727283 204.495483,120.363518 204.397546,119.810098 L203.528552,114.254131 L199.970183,114.254131 L201.530954,112.396443 L210.293959,112.396443 L211.641755,107.987735 L203.528552,107.987735 L204.792402,103.955229 L212.880733,103.955229 L214.380875,98.982219 L190.266674,98.982219 L188.791404,103.955229 Z M115.605924,121.037106 L117.628395,114.309008 L125.940582,114.309008 L127.459378,109.304907 L119.139419,109.304907 L120.409488,105.163582 L128.539791,105.163582 L130.046152,100.318045 L109.703292,100.318045 L108.228023,105.163582 L112.849704,105.163582 L111.616945,109.304907 L106.982827,109.304907 L105.446931,114.394508 L110.067057,114.394508 L107.371465,123.295869 C107.0077,124.474219 107.542466,124.923484 107.881358,125.470686 C108.228023,126.003897 108.579352,126.35678 109.369064,126.557317 C110.183649,126.7392 110.741733,126.848018 111.500354,126.848018 L120.87119,126.848018 L122.540778,121.304488 L118.387016,121.875009 C117.584868,121.875009 115.363414,121.778627 115.605924,121.037106 Z M116.55933,88.8286665 L114.452913,92.635763 C114.002093,93.4674475 113.596355,93.983559 113.231036,94.221405 C112.909244,94.4219425 112.271878,94.505888 111.348474,94.505888 L110.249406,94.505888 L108.780355,99.3762975 L112.430442,99.3762975 C114.18553,99.3762975 115.533326,98.7327135 116.176911,98.410921 C116.868686,98.040938 117.050568,98.252357 117.585334,97.736246 L118.818094,96.668269 L130.216064,96.668269 L131.728643,91.5973225 L123.385365,91.5973225 L124.84198,88.8286665 L116.55933,88.8286665 Z M133.386416,121.134887 C133.192097,120.855067 133.332007,120.362275 133.628926,119.336271 L136.744247,109.024932 L147.826644,109.024932 C149.441823,109.001614 150.607736,108.982959 151.366357,108.92855 C152.180942,108.843049 153.067037,108.552348 154.032413,108.030019 C155.028881,107.482817 155.538773,106.906078 155.969384,106.243839 C156.44974,105.583155 157.220798,104.137422 157.883037,101.908196 L161.798952,88.859291 L150.298381,88.926137 C150.298381,88.926137 146.757113,89.448466 145.197898,90.0252045 C143.624692,90.668789 141.37681,92.4658505 141.37681,92.4658505 L142.415251,88.8888275 L135.31095,88.8888275 L125.364931,121.874854 C125.012048,123.155803 124.775756,124.085425 124.721347,124.643509 C124.702692,125.245121 125.479968,125.840514 125.983643,126.289779 C126.579036,126.739045 127.458911,126.665981 128.303033,126.739045 C129.190682,126.805891 130.452978,126.847863 132.195629,126.847863 L137.655214,126.847863 L139.33102,121.189296 L134.443511,121.650998 C133.921182,121.650998 133.543426,121.371178 133.386416,121.134887 Z M138.754282,102.060541 L150.394763,102.060541 L149.654797,104.379932 C149.550642,104.434341 149.301913,104.264895 148.117345,104.404805 L138.037634,104.404805 L138.754282,102.060541 Z M141.086109,94.2815665 L152.824526,94.2815665 L151.980405,97.075095 C151.980405,97.075095 146.447757,97.020686 145.561663,97.1839135 C141.662847,97.858589 139.38543,99.941688 139.38543,99.941688 L141.086109,94.2815665 Z M149.915339,112.146937 C149.818957,112.493602 149.666611,112.705021 149.453638,112.863585 C149.217345,113.015931 148.834926,113.07034 148.264406,113.07034 L146.605699,113.07034 L146.703636,110.245721 L139.804537,110.245721 L139.524718,124.054801 C139.513836,125.051268 139.610218,125.628007 140.339303,126.089709 C141.068387,126.666447 143.314714,126.739511 146.338316,126.739511 L150.661524,126.739511 L152.222294,121.570628 L148.458724,121.777383 L147.207311,121.850447 C147.03631,121.777383 146.873082,121.710537 146.6912,121.528655 C146.532635,121.371645 146.265253,121.468028 146.30878,120.47156 L146.338316,116.931847 L150.285323,116.768619 C152.416613,116.768619 153.32758,116.075288 154.104855,115.414604 C154.846376,114.781902 155.088886,114.054372 155.368706,113.07034 L156.030945,109.936365 L150.607114,109.936365 L149.915339,112.146937 Z" fill="#FEFEFE"></path>
8
+ </g>
9
+ </svg>
assets/images/cards/unknown.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 471" preserveAspectRatio="xMidYMid meet"><defs><style>.cls-1{fill:#75787c;}</style></defs><title>credit-card</title><g id="Page-1"><g id="amex"><g id="Rectangle-1"><path class="cls-1" d="M711,40V431H41V40H711m0-40H41A40,40,0,0,0,1,40V431a40,40,0,0,0,40,40H711a40,40,0,0,0,40-40V40A40,40,0,0,0,711,0Z" transform="translate(-1)"/></g></g></g><rect class="cls-1" x="11" y="113" width="728" height="100.73"/><rect class="cls-1" x="45" y="354.08" width="93" height="32.92"/><rect class="cls-1" x="172" y="354.08" width="155.94" height="32.92"/></svg>
assets/images/cards/visa.svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg viewBox="0 0 750 471" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" preserveAspectRatio="xMidYMid meet">
3
+ <!-- Generator: Sketch 3.3.1 (12005) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <g id="visa" sketch:type="MSLayerGroup">
9
+ <rect id="Rectangle-1" fill="#0E4595" sketch:type="MSShapeGroup" x="0" y="0" width="750" height="471" rx="40"></rect>
10
+ <path d="M278.1975,334.2275 L311.5585,138.4655 L364.9175,138.4655 L331.5335,334.2275 L278.1975,334.2275 L278.1975,334.2275 Z" id="Shape" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
11
+ <path d="M524.3075,142.6875 C513.7355,138.7215 497.1715,134.4655 476.4845,134.4655 C423.7605,134.4655 386.6205,161.0165 386.3045,199.0695 C386.0075,227.1985 412.8185,242.8905 433.0585,252.2545 C453.8275,261.8495 460.8105,267.9695 460.7115,276.5375 C460.5795,289.6595 444.1255,295.6545 428.7885,295.6545 C407.4315,295.6545 396.0855,292.6875 378.5625,285.3785 L371.6865,282.2665 L364.1975,326.0905 C376.6605,331.5545 399.7065,336.2895 423.6355,336.5345 C479.7245,336.5345 516.1365,310.2875 516.5505,269.6525 C516.7515,247.3835 502.5355,230.4355 471.7515,216.4645 C453.1005,207.4085 441.6785,201.3655 441.7995,192.1955 C441.7995,184.0585 451.4675,175.3575 472.3565,175.3575 C489.8055,175.0865 502.4445,178.8915 512.2925,182.8575 L517.0745,185.1165 L524.3075,142.6875" id="path13" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
12
+ <path d="M661.6145,138.4655 L620.3835,138.4655 C607.6105,138.4655 598.0525,141.9515 592.4425,154.6995 L513.1975,334.1025 L569.2285,334.1025 C569.2285,334.1025 578.3905,309.9805 580.4625,304.6845 C586.5855,304.6845 641.0165,304.7685 648.7985,304.7685 C650.3945,311.6215 655.2905,334.1025 655.2905,334.1025 L704.8025,334.1025 L661.6145,138.4655 L661.6145,138.4655 Z M596.1975,264.8725 C600.6105,253.5935 617.4565,210.1495 617.4565,210.1495 C617.1415,210.6705 621.8365,198.8155 624.5315,191.4655 L628.1385,208.3435 C628.1385,208.3435 638.3555,255.0725 640.4905,264.8715 L596.1975,264.8715 L596.1975,264.8725 L596.1975,264.8725 Z" id="Path" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
13
+ <path d="M232.9025,138.4655 L180.6625,271.9605 L175.0965,244.8315 C165.3715,213.5575 135.0715,179.6755 101.1975,162.7125 L148.9645,333.9155 L205.4195,333.8505 L289.4235,138.4655 L232.9025,138.4655" id="path16" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
14
+ <path d="M131.9195,138.4655 L45.8785,138.4655 L45.1975,142.5385 C112.1365,158.7425 156.4295,197.9015 174.8155,244.9525 L156.1065,154.9925 C152.8765,142.5965 143.5085,138.8975 131.9195,138.4655" id="path18" fill="#F2AE14" sketch:type="MSShapeGroup"></path>
15
+ </g>
16
+ </g>
17
+ </svg>
assets/js/wcpay-checkout.js ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* eslint-disable strict, no-var */
2
+ /* global jQuery, Stripe, wcpay_config */
3
+ jQuery( function( $ ) {
4
+ 'use strict';
5
+
6
+ /* eslint-disable-next-line camelcase */
7
+ var stripe = new Stripe( wcpay_config.publishableKey, {
8
+ /* eslint-disable-next-line camelcase */
9
+ stripeAccount: wcpay_config.accountId,
10
+ } );
11
+ var elements = stripe.elements();
12
+
13
+ // In the future this object will be loaded with customer information through `wp_localize_script`.
14
+ var preparedCustomerData = {};
15
+
16
+ // Create a card element.
17
+ var cardElement = elements.create( 'card', {
18
+ hidePostalCode: true,
19
+ classes: { base: 'wcpay-card-mounted' },
20
+ } );
21
+
22
+ // Only attempt to mount the card element once that section of the page has loaded. We can use the updated_checkout
23
+ // event for this. This part of the page can also reload based on changes to checkout details, so we call unmount
24
+ // first to ensure the card element is re-mounted correctly.
25
+ $( document.body ).on( 'updated_checkout', function() {
26
+ // Don't re-mount if already mounted in DOM.
27
+ if ( $( '#wcpay-card-element' ).children().length ) {
28
+ return;
29
+ }
30
+
31
+ cardElement.unmount();
32
+ cardElement.mount( '#wcpay-card-element' );
33
+ } );
34
+
35
+ if ( $( 'form#add_payment_method' ).length || $( 'form#order_review' ).length ) {
36
+ cardElement.mount( '#wcpay-card-element' );
37
+ }
38
+
39
+ // Update the validation state based on the element's state.
40
+ cardElement.addEventListener( 'change', function( event ) {
41
+ var displayError = jQuery( '#wcpay-errors' );
42
+ if ( event.error ) {
43
+ displayError.html( '<ul class="woocommerce-error"><li /></ul>' )
44
+ .find( 'li' ).text( event.error.message );
45
+ } else {
46
+ displayError.empty();
47
+ }
48
+ } );
49
+
50
+ /**
51
+ * Adds a customer value to an object if the value exists and is non-empty.
52
+ *
53
+ * @param {object} customerObj The object that the value should be loaded to.
54
+ * @param {string} prop The name of the prop in the object.
55
+ * @param {string} inputId The ID of the input on the page (or the data, preloaded by the server.)
56
+ */
57
+ var setCustomerValue = function( customerObj, prop, inputId ) {
58
+ var value;
59
+
60
+ // Try to load the value from the fields on the page.
61
+ if ( 'name' === inputId ) {
62
+ // If and whenever the first/last name fields do not exist on the page, this will be an empty string.
63
+ value = ( $( '#billing_first_name' ).val() + ' ' + $( '#billing_last_name' ).val() ).trim();
64
+ } else {
65
+ // No need to check whether the element exists, `$.fn.val()` would return `undefined`.
66
+ value = $( '#' + inputId ).val();
67
+ }
68
+
69
+ // Fall back to the value in `preparedCustomerData`.
70
+ if ( ( 'undefined' === typeof value ) || 0 === value.length ) {
71
+ value = preparedCustomerData[ inputId ]; // `undefined` if not set.
72
+ }
73
+
74
+ if ( ( 'undefined' !== typeof value ) && 0 < value.length ) {
75
+ customerObj[ prop ] = value;
76
+ }
77
+ };
78
+
79
+ /**
80
+ * Loads all necessary billing details for payment methods.
81
+ *
82
+ * @return {object} An object, containing email, name, phone & an address.
83
+ */
84
+ var loadBillingDetails = function() {
85
+ var billingDetails = {},
86
+ billingAddress = {};
87
+
88
+ // Populate billing details.
89
+ setCustomerValue( billingDetails, 'name', 'name' );
90
+ setCustomerValue( billingDetails, 'email', 'billing_email' );
91
+ setCustomerValue( billingDetails, 'phone', 'billing_phone' );
92
+
93
+ // Populate the billing address.
94
+ setCustomerValue( billingAddress, 'city', 'billing_city' );
95
+ setCustomerValue( billingAddress, 'country', 'billing_country' );
96
+ setCustomerValue( billingAddress, 'line1', 'billing_address_1' );
97
+ setCustomerValue( billingAddress, 'line2', 'billing_address_2' );
98
+ setCustomerValue( billingAddress, 'postal_code', 'billing_postcode' );
99
+ setCustomerValue( billingAddress, 'state', 'billing_state' );
100
+
101
+ billingDetails.address = billingAddress;
102
+ return billingDetails;
103
+ };
104
+
105
+ // Show error notice at top of checkout form.
106
+ var showError = function( errorMessage ) {
107
+ var messageWrapper = '<ul class="woocommerce-error" role="alert">' + errorMessage + '</ul>';
108
+ var $container = $( '.woocommerce-notices-wrapper, form.checkout' ).first();
109
+
110
+ if ( ! $container.length ) {
111
+ return;
112
+ }
113
+
114
+ // Adapted from WooCommerce core @ ea9aa8c, assets/js/frontend/checkout.js#L514-L529
115
+ $( '.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message' ).remove();
116
+ $container.prepend( '<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">' + messageWrapper + '</div>' );
117
+ $container.find( '.input-text, select, input:checkbox' ).trigger( 'validate' ).blur();
118
+
119
+ var scrollElement = $( '.woocommerce-NoticeGroup-checkout' );
120
+ if ( ! scrollElement.length ) {
121
+ scrollElement = $container;
122
+ }
123
+
124
+ $.scroll_to_notices( scrollElement );
125
+ $( document.body ).trigger( 'checkout_error' );
126
+ };
127
+
128
+ // Create payment method on submission.
129
+ var paymentMethodGenerated;
130
+
131
+ /**
132
+ * Generates a payment method, saves its ID in a hidden input, and re-submits the form.
133
+ *
134
+ * @param {object} $form The jQuery object for the form.
135
+ * @return {boolean} A flag for the event handler.
136
+ */
137
+ var handleOnPaymentFormSubmit = function( $form ) {
138
+ // We'll resubmit the form after populating our payment method, so if this is the second time this event
139
+ // is firing we should let the form submission happen.
140
+ if ( paymentMethodGenerated ) {
141
+ paymentMethodGenerated = null;
142
+ return;
143
+ }
144
+
145
+ // Block UI to indicate processing and avoid duplicate submission.
146
+ $form.addClass( 'processing' ).block( {
147
+ message: null,
148
+ overlayCSS: {
149
+ background: '#fff',
150
+ opacity: 0.6,
151
+ },
152
+ } );
153
+
154
+ var paymentMethodArgs = {
155
+ type: 'card',
156
+ card: cardElement,
157
+ // eslint-disable-next-line camelcase
158
+ billing_details: loadBillingDetails(),
159
+ };
160
+
161
+ stripe.createPaymentMethod( paymentMethodArgs )
162
+ .then( function( result ) {
163
+ var paymentMethod = result.paymentMethod;
164
+ var error = result.error;
165
+
166
+ if ( error ) {
167
+ throw error;
168
+ }
169
+
170
+ return paymentMethod;
171
+ } )
172
+ .then( function( paymentMethod ) {
173
+ var id = paymentMethod.id;
174
+
175
+ // Flag that the payment method has been successfully generated so that we can allow the form
176
+ // submission next time.
177
+ paymentMethodGenerated = true;
178
+
179
+ // Populate form with the payment method.
180
+ var paymentMethodInput = document.getElementById( 'wcpay-payment-method' );
181
+ paymentMethodInput.value = id;
182
+
183
+ // Re-submit the form.
184
+ $form.removeClass( 'processing' ).submit();
185
+ } )
186
+ .catch( function( error ) {
187
+ $form.removeClass( 'processing' ).unblock();
188
+ showError( error.message );
189
+ } );
190
+
191
+ // Prevent form submission so that we can fire it once a payment method has been generated.
192
+ return false;
193
+ };
194
+
195
+ // Handle the checkout form when WooCommerce Payments is chosen.
196
+ $( 'form.checkout' ).on( 'checkout_place_order_woocommerce_payments', function() {
197
+ return handleOnPaymentFormSubmit( $( this ) );
198
+ } );
199
+
200
+ // Handle the Pay for Order form if WooCommerce Payments is chosen.
201
+ $( '#order_review' ).on( 'submit', function() {
202
+ if ( $( '#payment_method_woocommerce_payments' ).is( ':checked' ) ) {
203
+ return handleOnPaymentFormSubmit( $( '#order_review' ) );
204
+ }
205
+ } );
206
+ } );
changelog.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *** WooCommerce Payments Changelog ***
2
+
3
+ 2020-04-08 - version 0.9.0
4
+ * Release for Public Beta
5
+
6
+ 2020-03-10 - version 0.8.2
7
+ * Add - Dispute file evidence upload support
8
+ * Add - Basic support for Pay for Order
9
+ * Fix - Styling improvements in wp-admin
10
+ * Fix - Undefined variable PHP notice in cancel_authorization
11
+ * Fix - Remove unused variable in authentication
12
+ * Fix - Improve Jetpack connection checking
13
+
14
+ 2020-02-25 - version 0.8.1
15
+ * Update link to test card documentation
16
+
17
+ 2020-02-24 - version 0.8.0
18
+ * First beta release
19
+
20
+ 2020-02-05 - version 0.7.0
21
+ * Alpha release
dist/index.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'wc-components', 'wc-currency', 'wc-navigation', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '6058e4881d47739ad25d2473ed8839d4');
dist/index.css ADDED
@@ -0,0 +1,1106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Colors
3
+ */
4
+ /**
5
+ * Often re-used variables
6
+ */
7
+ /**
8
+ * Breakpoint mixins
9
+ */
10
+ /**
11
+ * Long content fade mixin
12
+ *
13
+ * Creates a fading overlay to signify that the content is longer
14
+ * than the space allows.
15
+ */
16
+ /**
17
+ * Button states and focus styles
18
+ */
19
+ /**
20
+ * Applies editor left position to the selector passed as argument
21
+ */
22
+ /**
23
+ * Applies editor right position to the selector passed as argument
24
+ */
25
+ /**
26
+ * Styles that are reused verbatim in a few places
27
+ */
28
+ /**
29
+ * Allows users to opt-out of animations via OS-level preferences.
30
+ */
31
+ /**
32
+ * Reset default styles for JavaScript UI based pages.
33
+ * This is a WP-admin agnostic reset
34
+ */
35
+ /**
36
+ * Reset the WP Admin page styles for Gutenberg-like pages.
37
+ */
38
+ /**
39
+ * Breakpoints & Media Queries
40
+ */
41
+ /** @format */
42
+ /**
43
+ * Colors
44
+ */
45
+ /** @format */
46
+ /* stylelint-disable block-closing-brace-newline-after */
47
+ /** @format */
48
+ /** @format */
49
+ /**
50
+ * Colors
51
+ */
52
+ /** @format */
53
+ /** @format */
54
+ /* stylelint-disable block-closing-brace-newline-after */
55
+ /* Fix top padding when layout breaks at 782px */
56
+ @media screen and (max-width: 782px) {
57
+ .woocommerce-layout .woocommerce-layout__main {
58
+ padding-top: 16px;
59
+ padding-bottom: 16px; } }
60
+
61
+ .woocommerce-card__body > :first-child {
62
+ margin-top: 0; }
63
+
64
+ .woocommerce-card__body > :last-child {
65
+ margin-bottom: 0; }
66
+
67
+ .woocommerce-card__body hr.full-width {
68
+ /* Accounting for woocommerce-card__body padding */
69
+ margin: 0 -16px;
70
+ margin-bottom: -1px; }
71
+
72
+ .woocommerce-card__body textarea {
73
+ /* Make textarea take full width of the card */
74
+ width: 100%;
75
+ padding: 6px 8px;
76
+ /**
77
+ * This styling makes focused textarea look like other inputs.
78
+ * Original styling is defined here https://github.com/woocommerce/woocommerce-admin/blob/c5811495987a05010513ce51e3dfcf538d52049a/client/stylesheets/shared/_global.scss.
79
+ * TODO: remove if PR released (https://github.com/woocommerce/woocommerce-admin/pull/3655).
80
+ */ }
81
+ .woocommerce-card__body textarea:focus {
82
+ color: #32373c;
83
+ border-color: #674399;
84
+ box-shadow: 0 0 2px rgba(103, 67, 153, 0.8); }
85
+
86
+ .woocommerce-table {
87
+ font-weight: 300;
88
+ letter-spacing: 0.012rem;
89
+ color: #50575e; }
90
+ .woocommerce-table .woocommerce-card__header {
91
+ border-bottom: 1px solid #ccd0d4; }
92
+ .woocommerce-table .woocommerce-table__summary {
93
+ border-radius: 0 0 3px 3px; }
94
+ .woocommerce-table .woocommerce-card__menu {
95
+ margin: -6px 0; }
96
+ .woocommerce-table .woocommerce-table__item {
97
+ white-space: nowrap; }
98
+ .woocommerce-table .info-button {
99
+ width: 40px;
100
+ padding-right: 0; }
101
+ .woocommerce-table .info-button > a {
102
+ height: 18px;
103
+ fill: #8e9196; }
104
+ .woocommerce-table .info-button + .woocommerce-table__header {
105
+ border-left: none; }
106
+ .woocommerce-table .info-button .is-placeholder {
107
+ display: none; }
108
+ .woocommerce-table .payment-method__brand {
109
+ display: block;
110
+ margin: 0 auto; }
111
+
112
+ /**
113
+ * This styling changes the appearance of warning notices to match our designs.
114
+ * In particular it removes margins that aren't supposed to be present, and
115
+ * fixes the background color.
116
+ */
117
+ .wcpay-test-mode-notice.components-notice.is-warning {
118
+ margin: 24px 0;
119
+ padding: 12px;
120
+ background-color: #f5e1b3; }
121
+
122
+ .wcpay-payment-details .woocommerce-card__header {
123
+ border-bottom: 1px solid #dcdcde; }
124
+
125
+ .payment-method-details {
126
+ display: flex;
127
+ align-items: flex-start; }
128
+ @media screen and (max-width: 1023px) {
129
+ .payment-method-details {
130
+ display: block; } }
131
+ .payment-method-details__column {
132
+ flex: 0 0 50%; }
133
+
134
+ .payment-method-detail {
135
+ display: flex;
136
+ align-items: flex-start;
137
+ font-size: 14px;
138
+ line-height: 28px; }
139
+ .payment-method-detail__label {
140
+ margin: 0;
141
+ color: #50575e;
142
+ flex: 0 0 36%;
143
+ font-weight: normal;
144
+ line-height: 20px;
145
+ padding: 4px 0; }
146
+ .payment-method-detail__value {
147
+ margin: 0;
148
+ color: #2c3338;
149
+ line-height: 20px;
150
+ padding: 4px 0; }
151
+
152
+ /**
153
+ * Colors
154
+ */
155
+ /**
156
+ * Often re-used variables
157
+ */
158
+ /**
159
+ * Breakpoint mixins
160
+ */
161
+ /**
162
+ * Long content fade mixin
163
+ *
164
+ * Creates a fading overlay to signify that the content is longer
165
+ * than the space allows.
166
+ */
167
+ /**
168
+ * Button states and focus styles
169
+ */
170
+ /**
171
+ * Applies editor left position to the selector passed as argument
172
+ */
173
+ /**
174
+ * Applies editor right position to the selector passed as argument
175
+ */
176
+ /**
177
+ * Styles that are reused verbatim in a few places
178
+ */
179
+ /**
180
+ * Allows users to opt-out of animations via OS-level preferences.
181
+ */
182
+ /**
183
+ * Reset default styles for JavaScript UI based pages.
184
+ * This is a WP-admin agnostic reset
185
+ */
186
+ /**
187
+ * Reset the WP Admin page styles for Gutenberg-like pages.
188
+ */
189
+ /**
190
+ * Breakpoints & Media Queries
191
+ */
192
+ /** @format */
193
+ /**
194
+ * Colors
195
+ */
196
+ /** @format */
197
+ /* stylelint-disable block-closing-brace-newline-after */
198
+ /** @format */
199
+ .connect-account .connect-account__card .woocommerce-card__body {
200
+ line-height: 1.5; }
201
+ .connect-account .connect-account__card .woocommerce-card__body p,
202
+ .connect-account .connect-account__card .woocommerce-card__body h2 {
203
+ text-align: center; }
204
+ .connect-account .connect-account__card .woocommerce-card__body h2 {
205
+ font-size: 20px;
206
+ font-size: 1.2rem;
207
+ font-weight: 300;
208
+ margin: 16px 0 8px; }
209
+ .connect-account .connect-account__card .woocommerce-card__body .gridicons-credit-card {
210
+ height: 144px;
211
+ width: 144px;
212
+ fill: #8e9196; }
213
+
214
+ .connect-account .connect-account__card svg {
215
+ margin-top: -16px;
216
+ margin-left: -16px;
217
+ display: block; }
218
+
219
+ .connect-account .connect-account__card .connect-account__terms {
220
+ margin: 0 0 16px;
221
+ font-weight: 300;
222
+ font-size: 12px;
223
+ color: #50575e; }
224
+
225
+ .connect-account .connect-account__card .connect-account__action {
226
+ margin-top: 16px; }
227
+ .connect-account .connect-account__card .connect-account__action .is-button {
228
+ height: 32px;
229
+ line-height: 30px;
230
+ padding: 0 20px 2px; }
231
+
232
+ /**
233
+ * Colors
234
+ */
235
+ /**
236
+ * Often re-used variables
237
+ */
238
+ /**
239
+ * Breakpoint mixins
240
+ */
241
+ /**
242
+ * Long content fade mixin
243
+ *
244
+ * Creates a fading overlay to signify that the content is longer
245
+ * than the space allows.
246
+ */
247
+ /**
248
+ * Button states and focus styles
249
+ */
250
+ /**
251
+ * Applies editor left position to the selector passed as argument
252
+ */
253
+ /**
254
+ * Applies editor right position to the selector passed as argument
255
+ */
256
+ /**
257
+ * Styles that are reused verbatim in a few places
258
+ */
259
+ /**
260
+ * Allows users to opt-out of animations via OS-level preferences.
261
+ */
262
+ /**
263
+ * Reset default styles for JavaScript UI based pages.
264
+ * This is a WP-admin agnostic reset
265
+ */
266
+ /**
267
+ * Reset the WP Admin page styles for Gutenberg-like pages.
268
+ */
269
+ /**
270
+ * Breakpoints & Media Queries
271
+ */
272
+ /** @format */
273
+ /**
274
+ * Colors
275
+ */
276
+ /** @format */
277
+ /* stylelint-disable block-closing-brace-newline-after */
278
+ /** @format */
279
+ .woocommerce-payments-page {
280
+ margin: 0 auto;
281
+ max-width: 1200px; }
282
+ .woocommerce-payments-page.is-narrow {
283
+ max-width: 680px; }
284
+
285
+ /**
286
+ * Colors
287
+ */
288
+ /**
289
+ * Often re-used variables
290
+ */
291
+ /**
292
+ * Breakpoint mixins
293
+ */
294
+ /**
295
+ * Long content fade mixin
296
+ *
297
+ * Creates a fading overlay to signify that the content is longer
298
+ * than the space allows.
299
+ */
300
+ /**
301
+ * Button states and focus styles
302
+ */
303
+ /**
304
+ * Applies editor left position to the selector passed as argument
305
+ */
306
+ /**
307
+ * Applies editor right position to the selector passed as argument
308
+ */
309
+ /**
310
+ * Styles that are reused verbatim in a few places
311
+ */
312
+ /**
313
+ * Allows users to opt-out of animations via OS-level preferences.
314
+ */
315
+ /**
316
+ * Reset default styles for JavaScript UI based pages.
317
+ * This is a WP-admin agnostic reset
318
+ */
319
+ /**
320
+ * Reset the WP Admin page styles for Gutenberg-like pages.
321
+ */
322
+ /**
323
+ * Breakpoints & Media Queries
324
+ */
325
+ /** @format */
326
+ /**
327
+ * Colors
328
+ */
329
+ /** @format */
330
+ /* stylelint-disable block-closing-brace-newline-after */
331
+ /** @format */
332
+ .transactions-list .date-time {
333
+ min-width: 195px; }
334
+
335
+ /**
336
+ * Colors
337
+ */
338
+ /**
339
+ * Often re-used variables
340
+ */
341
+ /**
342
+ * Breakpoint mixins
343
+ */
344
+ /**
345
+ * Long content fade mixin
346
+ *
347
+ * Creates a fading overlay to signify that the content is longer
348
+ * than the space allows.
349
+ */
350
+ /**
351
+ * Button states and focus styles
352
+ */
353
+ /**
354
+ * Applies editor left position to the selector passed as argument
355
+ */
356
+ /**
357
+ * Applies editor right position to the selector passed as argument
358
+ */
359
+ /**
360
+ * Styles that are reused verbatim in a few places
361
+ */
362
+ /**
363
+ * Allows users to opt-out of animations via OS-level preferences.
364
+ */
365
+ /**
366
+ * Reset default styles for JavaScript UI based pages.
367
+ * This is a WP-admin agnostic reset
368
+ */
369
+ /**
370
+ * Reset the WP Admin page styles for Gutenberg-like pages.
371
+ */
372
+ /**
373
+ * Breakpoints & Media Queries
374
+ */
375
+ /** @format */
376
+ /**
377
+ * Colors
378
+ */
379
+ /** @format */
380
+ /* stylelint-disable block-closing-brace-newline-after */
381
+ /** @format */
382
+ .is-loadable-placeholder {
383
+ animation: loading-fade 1.6s ease-in-out infinite;
384
+ background-color: #e2e4e7;
385
+ color: transparent;
386
+ display: inline-block; }
387
+ @media screen and (prefers-reduced-motion: reduce) {
388
+ .is-loadable-placeholder {
389
+ animation: none; } }
390
+ .is-loadable-placeholder.is-inline {
391
+ display: inline; }
392
+ .is-loadable-placeholder.is-block {
393
+ display: block;
394
+ margin-top: 1em; }
395
+ .is-loadable-placeholder.is-block:first-child {
396
+ margin-top: 0; }
397
+ .is-loadable-placeholder.is-block p {
398
+ margin: 0; }
399
+
400
+ /**
401
+ * Colors
402
+ */
403
+ /**
404
+ * Often re-used variables
405
+ */
406
+ /**
407
+ * Breakpoint mixins
408
+ */
409
+ /**
410
+ * Long content fade mixin
411
+ *
412
+ * Creates a fading overlay to signify that the content is longer
413
+ * than the space allows.
414
+ */
415
+ /**
416
+ * Button states and focus styles
417
+ */
418
+ /**
419
+ * Applies editor left position to the selector passed as argument
420
+ */
421
+ /**
422
+ * Applies editor right position to the selector passed as argument
423
+ */
424
+ /**
425
+ * Styles that are reused verbatim in a few places
426
+ */
427
+ /**
428
+ * Allows users to opt-out of animations via OS-level preferences.
429
+ */
430
+ /**
431
+ * Reset default styles for JavaScript UI based pages.
432
+ * This is a WP-admin agnostic reset
433
+ */
434
+ /**
435
+ * Reset the WP Admin page styles for Gutenberg-like pages.
436
+ */
437
+ /**
438
+ * Breakpoints & Media Queries
439
+ */
440
+ /** @format */
441
+ /**
442
+ * Colors
443
+ */
444
+ /** @format */
445
+ /* stylelint-disable block-closing-brace-newline-after */
446
+ /** @format */
447
+ .wcpay-deposit-overview .woocommerce-card__body {
448
+ display: flex;
449
+ flex-direction: row; }
450
+
451
+ .wcpay-deposit-overview .wcpay-deposit-detail {
452
+ flex-grow: 1; }
453
+
454
+ .wcpay-deposit-overview .wcpay-deposit-date {
455
+ font-size: 11px;
456
+ line-height: 18px;
457
+ text-transform: uppercase;
458
+ color: #8f98a1;
459
+ margin-bottom: 12px; }
460
+
461
+ .wcpay-deposit-overview .wcpay-deposit-bank-account {
462
+ font-size: 13px;
463
+ line-height: 18px;
464
+ font-weight: 300;
465
+ color: #555d66;
466
+ margin-top: 12px; }
467
+
468
+ .wcpay-deposit-overview .wcpay-deposit-status {
469
+ font-size: 20px;
470
+ line-height: 18px;
471
+ color: #191e23; }
472
+ .wcpay-deposit-overview .wcpay-deposit-status .woocommerce-order-status__indicator {
473
+ width: 0.85em;
474
+ height: 0.85em; }
475
+ .wcpay-deposit-overview .wcpay-deposit-status .woocommerce-order-status__indicator.is-paid {
476
+ background: #008a20;
477
+ border-color: #b8e6bf; }
478
+ .wcpay-deposit-overview .wcpay-deposit-status .woocommerce-order-status__indicator.is-pending, .wcpay-deposit-overview .wcpay-deposit-status .woocommerce-order-status__indicator.is-in_transit {
479
+ background: #dbae17;
480
+ border-color: #f5e1b3; }
481
+ .wcpay-deposit-overview .wcpay-deposit-status .woocommerce-order-status__indicator.is-failed {
482
+ background: #d63638;
483
+ border-color: #facfd2; }
484
+
485
+ .wcpay-deposit-overview .wcpay-deposit-hero {
486
+ flex-grow: 5;
487
+ border-left: 1px solid #e2e4e7;
488
+ margin: -16px 0;
489
+ padding: 16px 0; }
490
+
491
+ .wcpay-deposit-overview .wcpay-deposit-amount {
492
+ text-align: right;
493
+ font-size: 36px;
494
+ line-height: 72px;
495
+ color: #191e23;
496
+ padding-right: 18px; }
497
+
498
+ /**
499
+ * Colors
500
+ */
501
+ /**
502
+ * Often re-used variables
503
+ */
504
+ /**
505
+ * Breakpoint mixins
506
+ */
507
+ /**
508
+ * Long content fade mixin
509
+ *
510
+ * Creates a fading overlay to signify that the content is longer
511
+ * than the space allows.
512
+ */
513
+ /**
514
+ * Button states and focus styles
515
+ */
516
+ /**
517
+ * Applies editor left position to the selector passed as argument
518
+ */
519
+ /**
520
+ * Applies editor right position to the selector passed as argument
521
+ */
522
+ /**
523
+ * Styles that are reused verbatim in a few places
524
+ */
525
+ /**
526
+ * Allows users to opt-out of animations via OS-level preferences.
527
+ */
528
+ /**
529
+ * Reset default styles for JavaScript UI based pages.
530
+ * This is a WP-admin agnostic reset
531
+ */
532
+ /**
533
+ * Reset the WP Admin page styles for Gutenberg-like pages.
534
+ */
535
+ /**
536
+ * Breakpoints & Media Queries
537
+ */
538
+ /** @format */
539
+ /**
540
+ * Colors
541
+ */
542
+ /** @format */
543
+ /* stylelint-disable block-closing-brace-newline-after */
544
+ /** @format */
545
+ /** @format */
546
+ .chip {
547
+ font-size: 14px;
548
+ font-size: 0.875rem;
549
+ display: inline-block;
550
+ padding: 0.25rem 0.75rem;
551
+ border-radius: 1rem;
552
+ white-space: nowrap; }
553
+ .chip.chip-primary {
554
+ background: #c5d9ed;
555
+ color: #043959; }
556
+ .chip.chip-light {
557
+ background: #dcdcde;
558
+ color: #2c3338; }
559
+ .chip.chip-alert {
560
+ background: #facfd2;
561
+ color: #691c1c; }
562
+ .chip.chip-warning {
563
+ background: #f5e1b3;
564
+ color: #907300; }
565
+ .chip.is-compact {
566
+ padding: 0.06rem 0.65rem 0.1rem; }
567
+
568
+ /**
569
+ * Colors
570
+ */
571
+ /**
572
+ * Often re-used variables
573
+ */
574
+ /**
575
+ * Breakpoint mixins
576
+ */
577
+ /**
578
+ * Long content fade mixin
579
+ *
580
+ * Creates a fading overlay to signify that the content is longer
581
+ * than the space allows.
582
+ */
583
+ /**
584
+ * Button states and focus styles
585
+ */
586
+ /**
587
+ * Applies editor left position to the selector passed as argument
588
+ */
589
+ /**
590
+ * Applies editor right position to the selector passed as argument
591
+ */
592
+ /**
593
+ * Styles that are reused verbatim in a few places
594
+ */
595
+ /**
596
+ * Allows users to opt-out of animations via OS-level preferences.
597
+ */
598
+ /**
599
+ * Reset default styles for JavaScript UI based pages.
600
+ * This is a WP-admin agnostic reset
601
+ */
602
+ /**
603
+ * Reset the WP Admin page styles for Gutenberg-like pages.
604
+ */
605
+ /**
606
+ * Breakpoints & Media Queries
607
+ */
608
+ /** @format */
609
+ /**
610
+ * Colors
611
+ */
612
+ /** @format */
613
+ /* stylelint-disable block-closing-brace-newline-after */
614
+ /** @format */
615
+ /** @format **/
616
+ .payment-method-details .payment-method__brand {
617
+ width: 28px;
618
+ width: 1.75rem;
619
+ height: 17px;
620
+ height: 1.063rem;
621
+ margin-bottom: -4px;
622
+ margin-bottom: -0.25rem; }
623
+
624
+ /**
625
+ * Colors
626
+ */
627
+ /**
628
+ * Often re-used variables
629
+ */
630
+ /**
631
+ * Breakpoint mixins
632
+ */
633
+ /**
634
+ * Long content fade mixin
635
+ *
636
+ * Creates a fading overlay to signify that the content is longer
637
+ * than the space allows.
638
+ */
639
+ /**
640
+ * Button states and focus styles
641
+ */
642
+ /**
643
+ * Applies editor left position to the selector passed as argument
644
+ */
645
+ /**
646
+ * Applies editor right position to the selector passed as argument
647
+ */
648
+ /**
649
+ * Styles that are reused verbatim in a few places
650
+ */
651
+ /**
652
+ * Allows users to opt-out of animations via OS-level preferences.
653
+ */
654
+ /**
655
+ * Reset default styles for JavaScript UI based pages.
656
+ * This is a WP-admin agnostic reset
657
+ */
658
+ /**
659
+ * Reset the WP Admin page styles for Gutenberg-like pages.
660
+ */
661
+ /**
662
+ * Breakpoints & Media Queries
663
+ */
664
+ /** @format */
665
+ /**
666
+ * Colors
667
+ */
668
+ /** @format */
669
+ /* stylelint-disable block-closing-brace-newline-after */
670
+ /** @format */
671
+ /** @format */
672
+ .woocommerce-card__body .woocommerce-list--horizontal {
673
+ /* Account for Card margin when applying borders between lines */
674
+ margin: 0 -16px 0 -16px; }
675
+
676
+ .woocommerce-card__body .woocommerce-list--horizontal,
677
+ .woocommerce-list--horizontal {
678
+ text-transform: capitalize;
679
+ display: flex;
680
+ align-items: stretch;
681
+ flex-direction: column; }
682
+ @media (min-width: 801px) {
683
+ .woocommerce-card__body .woocommerce-list--horizontal,
684
+ .woocommerce-list--horizontal {
685
+ flex-direction: initial;
686
+ margin: 1rem 0 0 0; } }
687
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item,
688
+ .woocommerce-list--horizontal .woocommerce-list__item {
689
+ padding: 0.75rem 1rem;
690
+ border-left: 0;
691
+ border-bottom: 1px solid #dcdcde; }
692
+ @media (min-width: 801px) {
693
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item,
694
+ .woocommerce-list--horizontal .woocommerce-list__item {
695
+ padding: 0 1rem;
696
+ border-left: 1px solid #dcdcde;
697
+ border-bottom: 0; } }
698
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item .woocommerce-list__item-inner,
699
+ .woocommerce-list--horizontal .woocommerce-list__item .woocommerce-list__item-inner {
700
+ margin: 0;
701
+ padding: 0; }
702
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item .woocommerce-list__item-title,
703
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item .woocommerce-list__item-content,
704
+ .woocommerce-list--horizontal .woocommerce-list__item .woocommerce-list__item-title,
705
+ .woocommerce-list--horizontal .woocommerce-list__item .woocommerce-list__item-content {
706
+ color: #555d66;
707
+ margin-top: 0; }
708
+ @media (min-width: 801px) {
709
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item:first-child,
710
+ .woocommerce-list--horizontal .woocommerce-list__item:first-child {
711
+ border-left: 0;
712
+ padding-left: 0; } }
713
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item:last-child,
714
+ .woocommerce-list--horizontal .woocommerce-list__item:last-child {
715
+ border-bottom: 0;
716
+ padding-bottom: 0; }
717
+ @media (min-width: 801px) {
718
+ .woocommerce-card__body .woocommerce-list--horizontal .woocommerce-list__item:last-child,
719
+ .woocommerce-list--horizontal .woocommerce-list__item:last-child {
720
+ padding-right: 0; } }
721
+
722
+ /**
723
+ * Colors
724
+ */
725
+ /**
726
+ * Often re-used variables
727
+ */
728
+ /**
729
+ * Breakpoint mixins
730
+ */
731
+ /**
732
+ * Long content fade mixin
733
+ *
734
+ * Creates a fading overlay to signify that the content is longer
735
+ * than the space allows.
736
+ */
737
+ /**
738
+ * Button states and focus styles
739
+ */
740
+ /**
741
+ * Applies editor left position to the selector passed as argument
742
+ */
743
+ /**
744
+ * Applies editor right position to the selector passed as argument
745
+ */
746
+ /**
747
+ * Styles that are reused verbatim in a few places
748
+ */
749
+ /**
750
+ * Allows users to opt-out of animations via OS-level preferences.
751
+ */
752
+ /**
753
+ * Reset default styles for JavaScript UI based pages.
754
+ * This is a WP-admin agnostic reset
755
+ */
756
+ /**
757
+ * Reset the WP Admin page styles for Gutenberg-like pages.
758
+ */
759
+ /**
760
+ * Breakpoints & Media Queries
761
+ */
762
+ /** @format */
763
+ /**
764
+ * Colors
765
+ */
766
+ /** @format */
767
+ /* stylelint-disable block-closing-brace-newline-after */
768
+ /** @format */
769
+ /** @format */
770
+ .payment-details-summary {
771
+ display: flex;
772
+ margin-bottom: 1rem; }
773
+ @media (max-width: 660px) {
774
+ .payment-details-summary {
775
+ flex-direction: column; } }
776
+ .payment-details-summary .payment-details-summary__section {
777
+ flex-grow: 1; }
778
+ .payment-details-summary .payment-details-summary__amount {
779
+ font-size: 32px;
780
+ font-size: 2rem;
781
+ font-weight: 300;
782
+ padding: 0;
783
+ margin: 0;
784
+ display: flex;
785
+ align-items: center; }
786
+ .payment-details-summary .payment-details-summary__amount .payment-details-summary__amount-currency {
787
+ font-size: 16px;
788
+ font-size: 1rem;
789
+ text-transform: uppercase;
790
+ margin: 0 1rem 0 0.25rem;
791
+ color: #50575e; }
792
+ .payment-details-summary .payment-details-summary__breakdown p {
793
+ font-size: 14px;
794
+ font-size: 0.875rem;
795
+ color: #555d66;
796
+ display: inline-block;
797
+ margin: 0.5rem 0.75rem 0 0; }
798
+ .payment-details-summary .payment-details-summary__breakdown p:last-child {
799
+ margin-right: 0; }
800
+ .payment-details-summary .payment-details-summary__actions {
801
+ height: 100%;
802
+ display: flex;
803
+ align-items: center;
804
+ justify-content: initial; }
805
+ @media (min-width: 661px) {
806
+ .payment-details-summary .payment-details-summary__actions {
807
+ justify-content: flex-end; } }
808
+ .payment-details-summary .payment-details-summary__actions .payment-details-summary__actions-item {
809
+ margin-top: 1rem; }
810
+ @media (min-width: 661px) {
811
+ .payment-details-summary .payment-details-summary__actions .payment-details-summary__actions-item {
812
+ margin-top: 0; } }
813
+
814
+ .payment-details-summary-details .woocommerce-list--horizontal .woocommerce-list__item:last-child {
815
+ flex-grow: 1;
816
+ border-left: 0; }
817
+ .payment-details-summary-details .woocommerce-list--horizontal .woocommerce-list__item:last-child .woocommerce-list__item-text {
818
+ width: 100%;
819
+ text-transform: none; }
820
+ @media (min-width: 801px) {
821
+ .payment-details-summary-details .woocommerce-list--horizontal .woocommerce-list__item:last-child .woocommerce-list__item-text {
822
+ text-align: right;
823
+ color: #787c82; }
824
+ .payment-details-summary-details .woocommerce-list--horizontal .woocommerce-list__item:last-child .woocommerce-list__item-text .woocommerce-list__item-content {
825
+ font-size: 12px;
826
+ font-size: 0.75rem; } }
827
+
828
+ .payment-details-summary-details .woocommerce-list--horizontal .woocommerce-list__item-inner .woocommerce-list__item-title,
829
+ .payment-details-summary-details .woocommerce-list--horizontal .woocommerce-list__item-inner .woocommerce-list__item-content {
830
+ font-size: 14px;
831
+ font-size: 0.875rem; }
832
+
833
+ /**
834
+ * Colors
835
+ */
836
+ /**
837
+ * Often re-used variables
838
+ */
839
+ /**
840
+ * Breakpoint mixins
841
+ */
842
+ /**
843
+ * Long content fade mixin
844
+ *
845
+ * Creates a fading overlay to signify that the content is longer
846
+ * than the space allows.
847
+ */
848
+ /**
849
+ * Button states and focus styles
850
+ */
851
+ /**
852
+ * Applies editor left position to the selector passed as argument
853
+ */
854
+ /**
855
+ * Applies editor right position to the selector passed as argument
856
+ */
857
+ /**
858
+ * Styles that are reused verbatim in a few places
859
+ */
860
+ /**
861
+ * Allows users to opt-out of animations via OS-level preferences.
862
+ */
863
+ /**
864
+ * Reset default styles for JavaScript UI based pages.
865
+ * This is a WP-admin agnostic reset
866
+ */
867
+ /**
868
+ * Reset the WP Admin page styles for Gutenberg-like pages.
869
+ */
870
+ /**
871
+ * Breakpoints & Media Queries
872
+ */
873
+ /** @format */
874
+ /**
875
+ * Colors
876
+ */
877
+ /** @format */
878
+ /* stylelint-disable block-closing-brace-newline-after */
879
+ /** @format */
880
+ .woocommerce-card__body .woocommerce-card__footer {
881
+ /* Add margin and padding to align with .woocommerce-card__body padding */
882
+ margin: 16px -16px 0;
883
+ padding: 16px;
884
+ border-top: 1px solid #dcdcde; }
885
+ .woocommerce-card__body .woocommerce-card__footer:last-child {
886
+ padding-bottom: 0; }
887
+
888
+ /**
889
+ * Colors
890
+ */
891
+ /**
892
+ * Often re-used variables
893
+ */
894
+ /**
895
+ * Breakpoint mixins
896
+ */
897
+ /**
898
+ * Long content fade mixin
899
+ *
900
+ * Creates a fading overlay to signify that the content is longer
901
+ * than the space allows.
902
+ */
903
+ /**
904
+ * Button states and focus styles
905
+ */
906
+ /**
907
+ * Applies editor left position to the selector passed as argument
908
+ */
909
+ /**
910
+ * Applies editor right position to the selector passed as argument
911
+ */
912
+ /**
913
+ * Styles that are reused verbatim in a few places
914
+ */
915
+ /**
916
+ * Allows users to opt-out of animations via OS-level preferences.
917
+ */
918
+ /**
919
+ * Reset default styles for JavaScript UI based pages.
920
+ * This is a WP-admin agnostic reset
921
+ */
922
+ /**
923
+ * Reset the WP Admin page styles for Gutenberg-like pages.
924
+ */
925
+ /**
926
+ * Breakpoints & Media Queries
927
+ */
928
+ /** @format */
929
+ /**
930
+ * Colors
931
+ */
932
+ /** @format */
933
+ /* stylelint-disable block-closing-brace-newline-after */
934
+ /** @format */
935
+ .wcpay-dispute-info-item:first-child {
936
+ margin-top: 0; }
937
+
938
+ .wcpay-dispute-info-key {
939
+ font-weight: 600; }
940
+
941
+ /**
942
+ * Colors
943
+ */
944
+ /**
945
+ * Often re-used variables
946
+ */
947
+ /**
948
+ * Breakpoint mixins
949
+ */
950
+ /**
951
+ * Long content fade mixin
952
+ *
953
+ * Creates a fading overlay to signify that the content is longer
954
+ * than the space allows.
955
+ */
956
+ /**
957
+ * Button states and focus styles
958
+ */
959
+ /**
960
+ * Applies editor left position to the selector passed as argument
961
+ */
962
+ /**
963
+ * Applies editor right position to the selector passed as argument
964
+ */
965
+ /**
966
+ * Styles that are reused verbatim in a few places
967
+ */
968
+ /**
969
+ * Allows users to opt-out of animations via OS-level preferences.
970
+ */
971
+ /**
972
+ * Reset default styles for JavaScript UI based pages.
973
+ * This is a WP-admin agnostic reset
974
+ */
975
+ /**
976
+ * Reset the WP Admin page styles for Gutenberg-like pages.
977
+ */
978
+ /**
979
+ * Breakpoints & Media Queries
980
+ */
981
+ /** @format */
982
+ /**
983
+ * Colors
984
+ */
985
+ /** @format */
986
+ /* stylelint-disable block-closing-brace-newline-after */
987
+ /** @format */
988
+ .wcpay-dispute-details .woocommerce-card__header,
989
+ .wcpay-dispute-details .woocommerce-card__body,
990
+ .wcpay-dispute-evidence .woocommerce-card__header,
991
+ .wcpay-dispute-evidence .woocommerce-card__body {
992
+ padding: 16px 24px; }
993
+
994
+ .wcpay-dispute-details .woocommerce-card__header,
995
+ .wcpay-dispute-evidence .woocommerce-card__header {
996
+ border-bottom: 1px solid #dcdcde; }
997
+
998
+ .wcpay-dispute-details .woocommerce-card__title,
999
+ .wcpay-dispute-evidence .woocommerce-card__title {
1000
+ padding: 3px 0;
1001
+ font-size: 20px;
1002
+ font-size: 1.2rem;
1003
+ font-weight: 300; }
1004
+
1005
+ .wcpay-dispute-details .woocommerce-card__body,
1006
+ .wcpay-dispute-evidence .woocommerce-card__body {
1007
+ font-weight: 300;
1008
+ letter-spacing: 0.012rem;
1009
+ line-height: 1.5; }
1010
+ .wcpay-dispute-details .woocommerce-card__body,
1011
+ .wcpay-dispute-details .woocommerce-card__body p,
1012
+ .wcpay-dispute-details .woocommerce-card__body h3,
1013
+ .wcpay-dispute-evidence .woocommerce-card__body,
1014
+ .wcpay-dispute-evidence .woocommerce-card__body p,
1015
+ .wcpay-dispute-evidence .woocommerce-card__body h3 {
1016
+ font-size: 1rem; }
1017
+ .wcpay-dispute-details .woocommerce-card__body .woocommerce-card__footer,
1018
+ .wcpay-dispute-evidence .woocommerce-card__body .woocommerce-card__footer {
1019
+ margin-left: -24px;
1020
+ margin-right: -24px;
1021
+ padding-left: 24px;
1022
+ padding-right: 24px; }
1023
+
1024
+ .wcpay-dispute-details .is-button.is-large,
1025
+ .wcpay-dispute-evidence .is-button.is-large {
1026
+ height: 40px;
1027
+ line-height: 38px;
1028
+ font-size: 14px;
1029
+ font-weight: 500;
1030
+ padding: 0 15px 2px; }
1031
+
1032
+ .wcpay-dispute-details .components-form-file-upload .is-button.is-large,
1033
+ .wcpay-dispute-evidence .components-form-file-upload .is-button.is-large {
1034
+ padding-left: 14px;
1035
+ padding-bottom: 0; }
1036
+ .wcpay-dispute-details .components-form-file-upload .is-button.is-large svg,
1037
+ .wcpay-dispute-evidence .components-form-file-upload .is-button.is-large svg {
1038
+ margin-right: 6px; }
1039
+
1040
+ .wcpay-dispute-details .is-button + .is-button,
1041
+ .wcpay-dispute-evidence .is-button + .is-button {
1042
+ margin-left: 10px; }
1043
+
1044
+ .wcpay-dispute-details .components-base-control .components-base-control__label,
1045
+ .wcpay-dispute-evidence .components-base-control .components-base-control__label {
1046
+ font-size: 12px;
1047
+ color: #555d66; }
1048
+
1049
+ .wcpay-dispute-details .components-base-control + .components-base-control,
1050
+ .wcpay-dispute-evidence .components-base-control + .components-base-control {
1051
+ margin: 16px 0 0; }
1052
+
1053
+ .wcpay-dispute-details .components-base-control:first-child,
1054
+ .wcpay-dispute-evidence .components-base-control:first-child {
1055
+ margin-top: 4px; }
1056
+
1057
+ .wcpay-dispute-details .components-base-control:last-child > p,
1058
+ .wcpay-dispute-evidence .components-base-control:last-child > p {
1059
+ margin-bottom: 8px; }
1060
+
1061
+ .wcpay-dispute-details .components-base-control > .components-base-control__help,
1062
+ .wcpay-dispute-evidence .components-base-control > .components-base-control__help {
1063
+ font-style: normal;
1064
+ font-weight: 300;
1065
+ font-size: 12px;
1066
+ line-height: 16px;
1067
+ color: #787c82;
1068
+ margin-top: 0; }
1069
+
1070
+ .wcpay-dispute-details .file-upload,
1071
+ .wcpay-dispute-evidence .file-upload {
1072
+ display: flex;
1073
+ flex-direction: row;
1074
+ align-items: center; }
1075
+ .wcpay-dispute-details .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']):hover,
1076
+ .wcpay-dispute-evidence .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']):hover {
1077
+ background-color: #ab235a;
1078
+ border-color: #ab235a; }
1079
+ .wcpay-dispute-details .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-success,
1080
+ .wcpay-dispute-evidence .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-success {
1081
+ background-color: #008a20;
1082
+ border-color: #008a20; }
1083
+ .wcpay-dispute-details .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-success:hover,
1084
+ .wcpay-dispute-evidence .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-success:hover {
1085
+ background-color: #007017;
1086
+ border-color: #007017; }
1087
+ .wcpay-dispute-details .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-destructive,
1088
+ .wcpay-dispute-evidence .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-destructive {
1089
+ background-color: #d63638;
1090
+ border-color: #d63638; }
1091
+ .wcpay-dispute-details .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-destructive:hover,
1092
+ .wcpay-dispute-evidence .file-upload .components-icon-button.is-primary:not(:disabled):not([aria-disabled='true']).is-destructive:hover {
1093
+ background-color: #b32d2e;
1094
+ border-color: #b32d2e; }
1095
+ .wcpay-dispute-details .file-upload .components-icon-button.delete-uploaded-file-button:not(:disabled):not([aria-disabled='true']):hover,
1096
+ .wcpay-dispute-evidence .file-upload .components-icon-button.delete-uploaded-file-button:not(:disabled):not([aria-disabled='true']):hover {
1097
+ color: #b32d2e;
1098
+ box-shadow: none; }
1099
+ .wcpay-dispute-details .file-upload .upload-message,
1100
+ .wcpay-dispute-evidence .file-upload .upload-message {
1101
+ padding-left: 24px;
1102
+ color: #787c82; }
1103
+ .wcpay-dispute-details .file-upload .upload-message.is-destructive,
1104
+ .wcpay-dispute-evidence .file-upload .upload-message.is-destructive {
1105
+ color: #d63638; }
1106
+
dist/index.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){for(var a in t)e[a]=t[a]}(this,function(e){var t={};function a(c){if(t[c])return t[c].exports;var n=t[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=e,a.c=t,a.d=function(e,t,c){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(c,n,function(t){return e[t]}.bind(null,n));return c},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=54)}([function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wc.components}()},function(e,t,a){var c=a(5);e.exports=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),n.forEach(function(t){c(e,t,a[t])})}return e}},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){e.exports=function(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){!function(){e.exports=this.moment}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.dataControls}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wc.navigation}()},function(e,t){!function(){e.exports=this.wc.currency}()},function(e,t,a){var c=a(45),n=a(46),r=a(47);e.exports=function(e,t){return c(e)||n(e,t)||r()}},function(e,t){function a(e,t,a,c,n,r,o){try{var l=e[r](o),s=l.value}catch(e){return void a(e)}l.done?t(s):Promise.resolve(s).then(c,n)}e.exports=function(e){return function(){var t=this,c=arguments;return new Promise(function(n,r){var o=e.apply(t,c);function l(e){a(o,n,r,l,s,"next",e)}function s(e){a(o,n,r,l,s,"throw",e)}l(void 0)})}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t,a){"use strict";var c=a(1),n=(a(24),["primary","light","warning","alert"]);t.a=function(e){var t=e.message,a=e.type,r=e.isCompact,o=["chip","chip-".concat(n.find(function(e){return e===a})||"primary"),r?"is-compact":""];return Object(c.createElement)("span",{className:o.join(" ").trim()},t)}},function(e,t){function a(){return e.exports=a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c])}return e},a.apply(this,arguments)}e.exports=a},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t,a=1;a<arguments.length;a++)for(var c in t=arguments[a])Object.prototype.hasOwnProperty.call(t,c)&&(e[c]=t[c]);return e},n=function(){function e(e,t){for(var a,c=0;c<t.length;c++)(a=t[c]).enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}return function(t,a,c){return a&&e(t.prototype,a),c&&e(t,c),t}}(),r=a(10),o=s(r),l=s(a(35));function s(e){return e&&e.__esModule?e:{default:e}}var i=function(e,t){return 0<=t.indexOf(e)},m=function(e){return 0==e%18},d=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle","gridicons-reader-follow","gridicons-reader-following"],u=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"],h=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"],p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.PureComponent),n(t,[{key:"render",value:function(){var e=this.props,t=e.size,a=e.onClick,n=e.icon,r=e.className,l=function(e,t){var a={};for(var c in e)0<=t.indexOf(c)||Object.prototype.hasOwnProperty.call(e,c)&&(a[c]=e[c]);return a}(e,["size","onClick","icon","className"]),s="gridicons-"+n,p=void 0,v=["gridicon",s,r,!!(i(s,d)&&m(t))&&"needs-offset",!!(i(s,u)&&m(t))&&"needs-offset-x",!!(i(s,h)&&m(t))&&"needs-offset-y"].filter(Boolean).join(" ");switch(s){default:p=o.default.createElement("svg",c({height:t,width:t},l));break;case"gridicons-add-image":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-bell":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 15h-4v-2H2v6c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2v-6h-8v2zm6-9h-2V4c0-1.105-.895-2-2-2H8c-1.105 0-2 .895-2 2v2H4c-1.105 0-2 .895-2 2v4h20V8c0-1.105-.895-2-2-2zm-4 0H8V4h8v2z"})));break;case"gridicons-bug":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14h4v-2h-4v-2h1a2 2 0 0 0 2-2V6h-2v2H5V6H3v2a2 2 0 0 0 2 2h1v2H2v2h4v1a6 6 0 0 0 .09 1H5a2 2 0 0 0-2 2v2h2v-2h1.81A6 6 0 0 0 11 20.91V10h2v10.91A6 6 0 0 0 17.19 18H19v2h2v-2a2 2 0 0 0-2-2h-1.09a6 6 0 0 0 .09-1zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z"})));break;case"gridicons-calendar":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-caption":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 15l2-2v5c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h13l-2 2H4v12h16v-3zm2.44-8.56l-.88-.88c-.586-.585-1.534-.585-2.12 0L12 13v2H6v2h9v-1l7.44-7.44c.585-.586.585-1.534 0-2.12z"})));break;case"gridicons-cart":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-chat":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 12c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H9v3l-3-3H3zM21 18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-6v1c0 2.2-1.8 4-4 4v2c0 1.1.9 2 2 2h2v3l3-3h3z"})));break;case"gridicons-checkmark-circle":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 12l-5.45 6.5L16 17.21 20.39 12 16 6.79l1.55-1.29zM8 6.79L6.45 5.5 1 12l5.45 6.5L8 17.21 3.61 12zm.45 14.61l1.93.52L15.55 2.6l-1.93-.52z"})));break;case"gridicons-cog":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"})));break;case"gridicons-computer":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-coupon":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 16v2h-2v-2h2zm3-3h2v-2h-2v2zm2 8h-2v2h2v-2zm3-5v2h2v-2h-2zm-1-3c.552 0 1 .448 1 1h2c0-1.657-1.343-3-3-3v2zm1 7c0 .552-.448 1-1 1v2c1.657 0 3-1.343 3-3h-2zm-7 1c-.552 0-1-.448-1-1h-2c0 1.657 1.343 3 3 3v-2zm3.21-5.21c-.78.78-2.047.782-2.828.002l-.002-.002L10 11.41l-1.43 1.44c.28.506.427 1.073.43 1.65C9 16.433 7.433 18 5.5 18S2 16.433 2 14.5 3.567 11 5.5 11c.577.003 1.144.15 1.65.43L8.59 10 7.15 8.57c-.506.28-1.073.427-1.65.43C3.567 9 2 7.433 2 5.5S3.567 2 5.5 2 9 3.567 9 5.5c-.003.577-.15 1.144-.43 1.65L10 8.59l3.88-3.88c.78-.78 2.047-.782 2.828-.002l.002.002-5.3 5.29 5.8 5.79zM5.5 7C6.328 7 7 6.328 7 5.5S6.328 4 5.5 4 4 4.672 4 5.5 4.672 7 5.5 7zM7 14.5c0-.828-.672-1.5-1.5-1.5S4 13.672 4 14.5 4.672 16 5.5 16 7 15.328 7 14.5z"})));break;case"gridicons-create":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"}),o.default.createElement("path",{d:"M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"})));break;case"gridicons-credit-card":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-circle":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})));break;case"gridicons-cross-small":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"})));break;case"gridicons-custom-post-type":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-domains":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm6.918 6h-3.215c-.188-1.424-.42-2.65-.565-3.357 1.593.682 2.916 1.87 3.78 3.357zm-5.904-3.928c.068.352.387 2.038.645 3.928h-3.32c.26-1.89.578-3.576.646-3.928C11.32 4.03 11.656 4 12 4s.68.03 1.014.072zM14 12c0 .598-.043 1.286-.11 2h-3.78c-.067-.714-.11-1.402-.11-2s.043-1.286.11-2h3.78c.067.714.11 1.402.11 2zM8.862 4.643C8.717 5.35 8.485 6.576 8.297 8H5.082c.864-1.487 2.187-2.675 3.78-3.357zM4.262 10h3.822c-.05.668-.084 1.344-.084 2s.033 1.332.085 2H4.263C4.097 13.36 4 12.692 4 12s.098-1.36.263-2zm.82 6h3.215c.188 1.424.42 2.65.565 3.357-1.593-.682-2.916-1.87-3.78-3.357zm5.904 3.928c-.068-.353-.388-2.038-.645-3.928h3.32c-.26 1.89-.578 3.576-.646 3.928-.333.043-.67.072-1.014.072s-.68-.03-1.014-.072zm4.152-.57c.145-.708.377-1.934.565-3.358h3.215c-.864 1.487-2.187 2.675-3.78 3.357zm4.6-5.358h-3.822c.05-.668.084-1.344.084-2s-.033-1.332-.085-2h3.82c.167.64.265 1.308.265 2s-.097 1.36-.263 2z"})));break;case"gridicons-dropdown":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis-circle":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM7.5 13.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5S9 11.2 9 12s-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z"})));break;case"gridicons-ellipsis":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-filter":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"})));break;case"gridicons-flag":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-fullscreen-exit":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 10V4h2v2.59l3.29-3.29 1.41 1.41L17.41 8H20v2zM4 10V8h2.59l-3.3-3.29 1.42-1.42L8 6.59V4h2v6zm16 4v2h-2.59l3.29 3.29-1.41 1.41L16 17.41V20h-2v-6zm-10 0v6H8v-2.59l-3.29 3.3-1.42-1.42L6.59 16H4v-2z"})));break;case"gridicons-fullscreen":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})));break;case"gridicons-gift":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 6h-4.8c.5-.5.8-1.2.8-2 0-1.7-1.3-3-3-3s-3 1.3-3 3c0-1.7-1.3-3-3-3S6 2.3 6 4c0 .8.3 1.5.8 2H2v6h1v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h1V6zm-2 4h-7V8h7v2zm-5-7c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM9 3c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM4 8h7v2H4V8zm1 4h6v8H5v-8zm14 8h-6v-8h6v8z"})));break;case"gridicons-globe":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading-h1":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 7h2v10h-2v-4H7v4H5V7h2v4h4V7zm6.57 0c-.594.95-1.504 1.658-2.57 2v1h2v7h2V7h-1.43z"})));break;case"gridicons-heading-h2":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 7h2v10H9v-4H5v4H3V7h2v4h4V7zm8 8c.51-.41.6-.62 1.06-1.05.437-.4.848-.828 1.23-1.28.334-.39.62-.82.85-1.28.2-.39.305-.822.31-1.26.005-.44-.087-.878-.27-1.28-.177-.385-.437-.726-.76-1-.346-.283-.743-.497-1.17-.63-.485-.153-.99-.227-1.5-.22-.36 0-.717.033-1.07.1-.343.06-.678.158-1 .29-.304.13-.593.295-.86.49-.287.21-.56.437-.82.68l1.24 1.22c.308-.268.643-.502 1-.7.35-.2.747-.304 1.15-.3.455-.03.906.106 1.27.38.31.278.477.684.45 1.1-.014.396-.14.78-.36 1.11-.285.453-.62.872-1 1.25-.44.43-.98.92-1.59 1.43-.61.51-1.41 1.06-2.16 1.65V17h8v-2h-4z"})));break;case"gridicons-heading-h3":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.11 14.218c.355.287.75.523 1.17.7.434.18.9.273 1.37.27.484.017.965-.086 1.4-.3.333-.146.55-.476.55-.84.003-.203-.05-.403-.15-.58-.123-.19-.3-.34-.51-.43-.32-.137-.655-.228-1-.27-.503-.073-1.012-.106-1.52-.1v-1.57c.742.052 1.485-.07 2.17-.36.37-.164.615-.525.63-.93.026-.318-.12-.627-.38-.81-.34-.203-.734-.3-1.13-.28-.395.013-.784.108-1.14.28-.375.167-.73.375-1.06.62l-1.22-1.39c.5-.377 1.053-.68 1.64-.9.608-.224 1.252-.336 1.9-.33.525-.007 1.05.05 1.56.17.43.1.84.277 1.21.52.325.21.595.495.79.83.19.342.287.73.28 1.12.01.48-.177.943-.52 1.28-.417.39-.916.685-1.46.86v.06c.61.14 1.175.425 1.65.83.437.382.68.94.66 1.52.005.42-.113.835-.34 1.19-.23.357-.538.657-.9.88-.408.253-.853.44-1.32.55-.514.128-1.04.192-1.57.19-.786.02-1.57-.106-2.31-.37-.59-.214-1.126-.556-1.57-1l1.12-1.41zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})));break;case"gridicons-heading-h4":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm10-2h-1v2h-2v-2h-5v-2l4.05-6H20v6h1v2zm-3-2V9l-2.79 4H18z"})));break;case"gridicons-heading-h5":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.09 14.19c.352.27.73.5 1.13.69.42.196.877.296 1.34.29.51.014 1.01-.125 1.44-.4.378-.253.594-.686.57-1.14.02-.45-.197-.877-.57-1.13-.406-.274-.89-.41-1.38-.39h-.47c-.135.014-.27.04-.4.08l-.41.15-.48.23-1.02-.57.28-5h6.4v1.92h-4.31L16 10.76c.222-.077.45-.138.68-.18.235-.037.472-.054.71-.05.463-.004.924.057 1.37.18.41.115.798.305 1.14.56.33.248.597.57.78.94.212.422.322.888.32 1.36.007.497-.11.99-.34 1.43-.224.417-.534.782-.91 1.07-.393.3-.837.527-1.31.67-.497.164-1.016.252-1.54.26-.788.023-1.573-.11-2.31-.39-.584-.238-1.122-.577-1.59-1l1.09-1.42zM11 17H9v-4H5v4H3V7h2v4h4V7h2v10z"})));break;case"gridicons-heading-h6":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm8.58-7.508c-.248-.204-.524-.37-.82-.49-.625-.242-1.317-.242-1.94 0-.3.11-.566.287-.78.52-.245.27-.432.586-.55.93-.16.46-.243.943-.25 1.43.367-.33.79-.59 1.25-.77.405-.17.84-.262 1.28-.27.415-.006.83.048 1.23.16.364.118.704.304 1 .55.295.253.528.57.68.93.193.403.302.843.32 1.29.01.468-.094.93-.3 1.35-.206.387-.49.727-.83 1-.357.287-.764.504-1.2.64-.98.31-2.033.293-3-.05-.507-.182-.968-.472-1.35-.85-.437-.416-.778-.92-1-1.48-.243-.693-.352-1.426-.32-2.16-.02-.797.11-1.59.38-2.34.215-.604.556-1.156 1-1.62.406-.416.897-.74 1.44-.95.54-.21 1.118-.314 1.7-.31.682-.02 1.36.096 2 .34.5.19.962.464 1.37.81l-1.31 1.34zm-2.39 5.84c.202 0 .405-.03.6-.09.183-.046.356-.128.51-.24.15-.136.27-.303.35-.49.092-.225.136-.467.13-.71.037-.405-.123-.804-.43-1.07-.328-.23-.72-.347-1.12-.33-.346-.002-.687.07-1 .21-.383.17-.724.418-1 .73.046.346.143.683.29 1 .108.23.257.44.44.62.152.15.337.26.54.33.225.055.46.068.69.04z"})));break;case"gridicons-heading":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"})));break;case"gridicons-help":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"})));break;case"gridicons-history":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),o.default.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image-remove":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20.587 3.423L22 4.837 20 6.84V18c0 1.105-.895 2-2 2H6.84l-2.007 2.006-1.414-1.414 17.167-17.17zM12.42 14.42l1 1 1-1c.63-.504 1.536-.456 2.11.11L18 16V8.84l-5.58 5.58zM15.16 6H6v6.38l2.19-2.19 1.39 1.39L4 17.163V6c0-1.105.895-2 2-2h11.162l-2 2z"})));break;case"gridicons-image":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 6v12c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H6v6.38l2.19-2.19 5.23 5.23 1-1c.63-.504 1.536-.456 2.11.11L18 16V6zm-5 3.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5z"})));break;case"gridicons-indent-left":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-line-graph":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v2H3zm3-3c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3L8.8 10H9c.5 0 1-.2 1.3-.5l2.7 1.4v.1c0 1.1.9 2 2 2s2-.9 2-2c0-.5-.2-.9-.5-1.3L17.8 7h.2c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2c0 .5.2 1 .5 1.3L15.2 9H15c-.5 0-1 .2-1.3.5L11 8.2V8c0-1.1-.9-2-2-2s-2 .9-2 2c0 .5.2 1 .5 1.3L6.2 12H6c-1.1 0-2 .9-2 2s.9 2 2 2z"})));break;case"gridicons-link-break":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered-rtl":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h13v-2H3v2zm0-6h13v-2H3v2zm0-8v2h13V5H3zm16.587.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H19.97L18.5 4.915l.6.738.487-.4zm.448 7.826c.475-.426.785-.715.93-.867.146-.15.262-.296.35-.434.088-.138.153-.278.195-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608-.12-.18-.29-.32-.507-.417-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067-.177.045-.34.11-.49.195-.15.084-.337.225-.558.422l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.03.304.096.072.064.108.152.108.264 0 .09-.018.176-.054.258-.035.082-.1.18-.19.294-.093.114-.288.328-.587.64L18.547 13.3v.762h3.108v-.955h-1.62v-.03zm.46 4.747v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.175-.6-.263-1.043-.263-.308 0-.58.033-.817.1s-.47.178-.696.334l.48.774c.293-.184.576-.275.85-.275.147 0 .263.026.35.08.087.056.13.14.13.253 0 .3-.294.45-.882.45h-.27v.87h.264c.216 0 .392.017.526.05.135.03.232.08.293.143.06.064.09.154.09.27 0 .153-.058.265-.174.337-.116.07-.3.106-.555.106-.163 0-.342-.023-.537-.07-.194-.045-.385-.116-.573-.212v.96c.228.09.44.15.637.183.196.034.41.05.64.05.56 0 .998-.113 1.314-.342.316-.228.474-.542.474-.94.003-.585-.355-.923-1.07-1.013z"})));break;case"gridicons-list-ordered":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 0 0 0 20v-2a8 8 0 1 1 8-8v.5a1.5 1.5 0 0 1-3 0V7h-2v1a5 5 0 1 0 1 7 3.5 3.5 0 0 0 6-2.46V12A10 10 0 0 0 12 2zm0 13a3 3 0 1 1 3-3 3 3 0 0 1-3 3z"})));break;case"gridicons-menu":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9v1a7 7 0 0 1-6 6.92V20h3v2H8v-2h3v-3.08A7 7 0 0 1 5 10V9h2v1a5 5 0 0 0 10 0V9zm-7 4a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3z"})));break;case"gridicons-minus-small":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-money":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 5v14h20V5H2zm5 12c0-1.657-1.343-3-3-3v-4c1.657 0 3-1.343 3-3h10c0 1.657 1.343 3 3 3v4c-1.657 0-3 1.343-3 3H7zm5-8c1.1 0 2 1.3 2 3s-.9 3-2 3-2-1.3-2-3 .9-3 2-3z"})));break;case"gridicons-multiple-users":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M24 14.6c0 .6-1.2 1-2.6 1.2-.9-1.7-2.7-3-4.8-3.9.2-.3.4-.5.6-.8h.8c3.1-.1 6 1.8 6 3.5zM6.8 11H6c-3.1 0-6 1.9-6 3.6 0 .6 1.2 1 2.6 1.2.9-1.7 2.7-3 4.8-3.9l-.6-.9zm5.2 1c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0 1c-4.1 0-8 2.6-8 5 0 2 8 2 8 2s8 0 8-2c0-2.4-3.9-5-8-5zm5.7-3h.3c1.7 0 3-1.3 3-3s-1.3-3-3-3c-.5 0-.9.1-1.3.3.8 1 1.3 2.3 1.3 3.7 0 .7-.1 1.4-.3 2zM6 10h.3C6.1 9.4 6 8.7 6 8c0-1.4.5-2.7 1.3-3.7C6.9 4.1 6.5 4 6 4 4.3 4 3 5.3 3 7s1.3 3 3 3z"})));break;case"gridicons-my-sites-horizon":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-nametag":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6a1 1 0 1 1-1 1 1 1 0 0 1 1-1zm-6 8h12v3H6zm14-8h-4V3H8v3H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM10 5h4v5h-4zm10 14H4v-9h4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h4z"})));break;case"gridicons-next-page":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-8V6h8v2zm4-4v8l-6 6H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H8v12h6v-4c0-1.105.895-2 2-2h4V4zM4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6z"})));break;case"gridicons-not-visible":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-offline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 3h8l-4 6h4L6 21l4-9H6l4-9"})));break;case"gridicons-pages":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pause":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"})));break;case"gridicons-pencil":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-pin":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 17c0-2.038-1.188-3.836-3-4.92V5h.5c.828 0 1.5-.672 1.5-1.5S17.328 2 16.5 2h-9C6.672 2 6 2.672 6 3.5S6.672 5 7.5 5H8v7.08C6.188 13.164 5 14.962 5 17h6v4c0 .55.45 1 1 1s1-.45 1-1v-4h6z"})));break;case"gridicons-plans":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm-1 12H6l5-10v10zm2 6V10h5l-5 10z"})));break;case"gridicons-play":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"})));break;case"gridicons-plugins":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 13h-8v8h-2v-8H3v-2h8V3h2v8h8v2z"})));break;case"gridicons-popout":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-product-downloadable":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-6-10v5.17l2.59-2.58L17 14l-5 5-5-5 1.41-1.42L11 15.17V10h2z"})));break;case"gridicons-product-external":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-2-9v6h-2v-2.59l-3.29 3.29-1.41-1.41L13.59 13H11v-2h6z"})));break;case"gridicons-product-virtual":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM7 16.45c0-1.005.815-1.82 1.82-1.82h.09c-.335-1.59.68-3.148 2.27-3.483s3.148.68 3.483 2.27c.02.097.036.195.046.293 1.252-.025 2.29.97 2.314 2.224.017.868-.462 1.67-1.235 2.066H7.87c-.54-.33-.87-.917-.87-1.55z"})));break;case"gridicons-product":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM9 11h6c0 1.105-.895 2-2 2h-2c-1.105 0-2-.895-2-2z"})));break;case"gridicons-quote":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-read-more":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"})));break;case"gridicons-reader-follow-conversation":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 14v-3h-2v3h-3v2h3v3h2v-3h3v-2"}),o.default.createElement("path",{d:"M13 16h-2l-5 5v-5H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v4h-4v3h-3v4z"})));break;case"gridicons-reader-follow":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 16v2h-3v3h-2v-3h-3v-2h3v-3h2v3h3zM20 2v9h-4v3h-3v4H4c-1.1 0-2-.9-2-2V2h18zM8 13v-1H4v1h4zm3-3H4v1h7v-1zm0-2H4v1h7V8zm7-4H4v2h14V4z"})));break;case"gridicons-reader-following-conversation":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.8 14.5l3.2-3.2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h2v5l8.7-8.7 2.1 2.2z"}),o.default.createElement("path",{d:"M22.6 11.1l-6.1 6.1-2.1-2.2-1.4 1.4 3.5 3.6 7.5-7.6"})));break;case"gridicons-reader-following":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 13.482L15.508 21 12 17.4l1.412-1.388 2.106 2.188 6.094-6.094L23 13.482zm-7.455 1.862L20 10.89V2H2v14c0 1.1.9 2 2 2h4.538l4.913-4.832 2.095 2.176zM8 13H4v-1h4v1zm3-2H4v-1h7v1zm0-2H4V8h7v1zm7-3H4V4h14v2z"})));break;case"gridicons-reader":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reblog":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-refund":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13.91 2.91L11.83 5H14c4.418 0 8 3.582 8 8h-2c0-3.314-2.686-6-6-6h-2.17l2.09 2.09-1.42 1.41L8 6l1.41-1.41L12.5 1.5l1.41 1.41zM2 12v10h16V12H2zm2 6.56v-3.11c.6-.35 1.1-.85 1.45-1.45h9.1c.35.6.85 1.1 1.45 1.45v3.11c-.593.35-1.085.845-1.43 1.44H5.45c-.35-.597-.85-1.094-1.45-1.44zm6 .44c.828 0 1.5-.895 1.5-2s-.672-2-1.5-2-1.5.895-1.5 2 .672 2 1.5 2z"})));break;case"gridicons-reply":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h7.2l-2.6 2.6L15 20l5-5-5-5-1.4 1.4 2.6 2.6H9c-2.2 0-4-1.8-4-4s1.8-4 4-4h2V4H9c-3.3 0-6 2.7-6 6s2.7 6 6 6z"})));break;case"gridicons-resize":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));break;case"gridicons-rotate":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-computer":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6v2H7v2h10v-2h-3v-2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 14H4V4h16zm-3.25-3a1.75 1.75 0 0 1-3.5 0L10 11.36a1.71 1.71 0 1 1 0-2.71L13.25 7a1.77 1.77 0 1 1 .68 1.37L10.71 10l3.22 1.61A1.74 1.74 0 0 1 16.75 13z"})));break;case"gridicons-share-ios":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-shipping":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-2V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10h2c0 1.657 1.343 3 3 3s3-1.343 3-3h4c0 1.657 1.343 3 3 3s3-1.343 3-3h2v-5l-4-4zM7 18.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5zM4 14V7h10v7H4zm13 4.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5z"})));break;case"gridicons-shutter":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.9 4.8s-.7 5.6-3.5 10.2c1.7-.3 3.9-.9 6.6-2 0 0 .7-4.6-3.1-8.2zm-6 2.8c-1.1-1.3-2.7-3-5-4.7C5.1 4.2 3 6.6 2.3 9.6 7 7.7 11 7.5 12.9 7.6zm3.4 2.9c.6-1.6 1.2-3.9 1.6-6.7-4.1-3-8.6-1.5-8.6-1.5s4.4 3.4 7 8.2zm-5.2 6c1.1 1.3 2.7 3 5 4.7 0 0 4.3-1.6 5.6-6.7 0-.1-5.3 2.1-10.6 2zm-3.4-3.1c-.6 1.6-1.2 3.8-1.5 6.7 0 0 3.6 2.9 8.6 1.5 0 0-4.6-3.4-7.1-8.2zM2 11.1s-.7 4.5 3.1 8.2c0 0 .7-5.7 3.5-10.3-1.7.3-4 .9-6.6 2.1z"})));break;case"gridicons-sign-out":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-site":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm-5 14H6v-7h7zm5 0h-3v-7h3zm0-9H6V6h12z"})));break;case"gridicons-spam":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats-down-alt":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 3H4v14h4V3zm6 3h-4v11h4V6zm6 4h-4v7h4v-7z"})));break;case"gridicons-stats-down":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7V7h2v10zm4 0h-2v-7h2v7zm4 0h-2v-5h2v5z"})));break;case"gridicons-stats-up-alt":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-4h-4v11h4V6zm6-3h-4v14h4V3z"})));break;case"gridicons-stats-up":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2v-7h2v7zm4 0h-2V7h2v10z"})));break;case"gridicons-stats":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-add":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("circle",{cx:"15",cy:"8",r:"4"}),o.default.createElement("path",{d:"M15 20s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2zM6 10V7H4v3H1v2h3v3h2v-3h3v-2z"})));break;case"gridicons-user-circle":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video-remove":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.42 4.59l1.167-1.167L22 4.837 20 6.84V18c0 1.105-.895 2-2 2v-2h-2v2H6.84l-2.007 2.006-1.414-1.414 1.17-1.172-.01-.01L8 16 18 6l1.41-1.42.01.01zM15.84 11H18V8.84L15.84 11zM16 8.01l.01-.01H16v.01zM6 15.17l-2 2V6c0-1.105.895-2 2-2v2h2V4h9.17l-9 9H6v2.17zM6 8v3h2V8H6zm12 8v-3h-2v3h2z"})));break;case"gridicons-video":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4h8v1.997h2V4c1.105 0 2 .896 2 2v12c0 1.104-.895 2-2 2v-2.003h-2V20H8v-2.003H6V20c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2v1.997h2V4zm2 11l4.5-3L10 9v6zm8 .997v-3h-2v3h2zm0-5v-3h-2v3h2zm-10 5v-3H6v3h2zm0-5v-3H6v3h2z"})));break;case"gridicons-visible":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})));break;case"gridicons-zoom-in":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15.8 13.8c.7-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7 3.1 7 7 7c1.4 0 2.7-.4 3.8-1.2L19 21l2-2-5.2-5.2zM10 15c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z"}),o.default.createElement("path",{d:"M11 7H9v2H7v2h2v2h2v-2h2V9h-2"})));break;case"gridicons-zoom-out":p=o.default.createElement("svg",c({className:v,height:t,width:t,onClick:a},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 10c0 3.9 3.1 7 7 7 1.4 0 2.7-.5 3.8-1.2L19 21l2-2-5.2-5.2c.8-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7zm2 0c0-2.8 2.2-5 5-5s5 2.2 5 5-2.2 5-5 5-5-2.2-5-5z"}),o.default.createElement("path",{d:"M7 9h6v2H7z"})))}return p}}]),t}();p.defaultProps={size:24},p.propTypes={icon:l.default.string.isRequired,size:l.default.number,onClick:l.default.func,className:l.default.string},t.default=p,e.exports=t.default},function(e,t,a){var c=a(39);e.exports=function(e,t){if(null==e)return{};var a,n,r=c(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}},function(e,t,a){},function(e,t){function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(t){return"function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?e.exports=c=function(e){return a(e)}:e.exports=c=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},c(t)}e.exports=c},,,function(e,t,a){},,,,function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){e.exports=a(36)()},function(e,t,a){"use strict";var c=a(37);function n(){}function r(){}r.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,r,o){if(o!==c){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:n};return a.PropTypes=a,a}},function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,a){},function(e,t){e.exports=function(e,t){if(null==e)return{};var a,c,n={},r=Object.keys(e);for(c=0;c<r.length;c++)a=r[c],t.indexOf(a)>=0||(n[a]=e[a]);return n}},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t,a){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var a=[],c=!0,n=!1,r=void 0;try{for(var o,l=e[Symbol.iterator]();!(c=(o=l.next()).done)&&(a.push(o.value),!t||a.length!==t);c=!0);}catch(e){n=!0,r=e}finally{try{c||null==l.return||l.return()}finally{if(n)throw r}}return a}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,a){},function(e,t,a){},,,,,function(e,t,a){"use strict";a.r(t);var c={};a.r(c),a.d(c,"getDeposit",function(){return Z}),a.d(c,"getDeposits",function(){return Y}),a.d(c,"getDepositQueryError",function(){return Q});var n={};a.r(n),a.d(n,"updateDeposit",function(){return W}),a.d(n,"updateDeposits",function(){return G}),a.d(n,"updateErrorForDepositQuery",function(){return $});var r={};a.r(r),a.d(r,"getDeposit",function(){return ce}),a.d(r,"getDeposits",function(){return ne});var o={};a.r(o),a.d(o,"getTransactions",function(){return me}),a.d(o,"getTransactionsError",function(){return de}),a.d(o,"getTransactionsSummary",function(){return he}),a.d(o,"getTransactionsSummaryError",function(){return pe});var l={};a.r(l),a.d(l,"updateTransactions",function(){return ve}),a.d(l,"updateErrorForTransactions",function(){return ge}),a.d(l,"updateTransactionsSummary",function(){return we}),a.d(l,"updateErrorForTransactionsSummary",function(){return fe});var s={};a.r(s),a.d(s,"getTransactions",function(){return Ee}),a.d(s,"getTransactionsSummary",function(){return _e});var i={};a.r(i),a.d(i,"getCharge",function(){return ke}),a.d(i,"getChargeError",function(){return je});var m={};a.r(m),a.d(m,"updateCharge",function(){return ze}),a.d(m,"updateErrorForCharge",function(){return xe});var d={};a.r(d),a.d(d,"getCharge",function(){return Me});var u={};a.r(u),a.d(u,"getTimeline",function(){return Le}),a.d(u,"getTimelineError",function(){return Se});var h={};a.r(h),a.d(h,"updateTimeline",function(){return Be}),a.d(h,"updateErrorForTimeline",function(){return Te});var p={};a.r(p),a.d(p,"getTimeline",function(){return Ie});var v=a(0),g=a(21),w=(a(32),a(1)),f=a(2),b=a(9),y=a(55),E=(a(33),a(34),function(e){var t=e.children,a=e.maxWidth,c=e.isNarrow,n=e.className,r=a?{maxWidth:a}:null,o=[void 0===n?"":n,"woocommerce-payments-page"];return c&&o.push("is-narrow"),Object(w.createElement)("div",{className:o.join(" "),style:r},t)}),_=function(){return Object(w.createElement)("svg",{width:"680",height:"244",viewBox:"0 0 680 244",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(w.createElement)("rect",{width:"680",height:"244",fill:"#F6F7F7"}),Object(w.createElement)("rect",{width:"680",height:"244",fill:"#F6F7F7"}),Object(w.createElement)("rect",{y:"184",width:"680",height:"60",fill:"url(#paint0_linear)"}),Object(w.createElement)("rect",{width:"680",height:"186",fill:"url(#paint1_linear)"}),Object(w.createElement)("g",{clipPath:"url(#clip0)"},Object(w.createElement)("path",{d:"M229.372 117.65C229.372 117.65 226.842 148.114 226.298 154.642C225.926 158.734 225.012 162.758 223.581 166.609C223.581 166.609 222.495 168.785 222.495 170.961V198.704C222.495 198.704 220.321 198.704 220.865 200.88C221.408 203.056 221.951 206.864 221.951 206.864H230.102C230.102 206.864 229.558 205.232 231.189 204.688C232.819 204.144 231.189 199.792 231.189 199.792L239.882 167.153L252.923 139.954C252.923 139.954 260.53 164.433 262.16 167.153C262.16 167.153 268.137 197.616 269.224 200.336C270.311 203.056 270.854 203.056 270.311 204.144C269.767 205.232 269.767 206.32 270.311 206.864C270.854 207.408 281.178 206.864 281.178 206.864L278.461 168.241L273.571 122.003L248.576 114.387L229.372 117.65Z",fill:"#2F2E41"}),Object(w.createElement)("path",{d:"M227.929 202.512C227.929 202.512 225.212 192.721 220.865 200.336C216.518 207.952 216.518 210.672 216.518 210.672C216.518 210.672 209.454 221.008 219.235 219.92C229.015 218.832 226.842 213.936 226.842 213.936C226.842 213.936 230.645 211.76 230.645 210.128C230.645 208.496 227.929 202.512 227.929 202.512Z",fill:"#2F2E41"}),Object(w.createElement)("path",{d:"M271.941 201.424C271.941 201.424 274.658 191.633 279.005 199.248C283.352 206.864 283.352 209.584 283.352 209.584C283.352 209.584 290.415 219.92 280.635 218.832C270.854 217.744 273.028 212.848 273.028 212.848C273.028 212.848 269.224 210.672 269.224 209.04C269.224 207.408 271.941 201.424 271.941 201.424Z",fill:"#2F2E41"}),Object(w.createElement)("path",{d:"M246.403 44.2132C246.403 44.2132 247.489 51.2849 244.229 52.9169C240.969 54.5488 251.293 60.5327 254.01 60.5327C256.727 60.5327 261.617 55.0928 261.617 55.0928C261.617 55.0928 258.9 46.9331 259.443 45.3011L246.403 44.2132Z",fill:"#A0616A"}),Object(w.createElement)("path",{d:"M252.38 49.653C258.682 49.653 263.79 44.5384 263.79 38.2293C263.79 31.9202 258.682 26.8057 252.38 26.8057C246.078 26.8057 240.969 31.9202 240.969 38.2293C240.969 44.5384 246.078 49.653 252.38 49.653Z",fill:"#A0616A"}),Object(w.createElement)("path",{d:"M274.658 61.6206L261.074 53.3813C261.074 53.3813 253.345 62.1646 244.984 52.3729L230.645 56.1808L232.819 93.1716C232.819 93.1716 229.559 107.859 230.645 110.579C231.732 113.299 227.928 114.387 229.015 114.931C230.102 115.475 229.015 119.283 229.015 119.283C229.015 119.283 250.206 130.162 273.571 122.003L271.398 114.931C271.693 114.007 271.749 113.022 271.559 112.07C271.368 111.118 270.939 110.231 270.311 109.491C270.311 109.491 272.484 106.227 269.767 103.507C269.767 103.507 270.854 98.6115 268.137 96.4355L267.594 88.8198L269.224 85.0119L274.658 61.6206Z",fill:"#CFCCE0"}),Object(w.createElement)("path",{d:"M246.54 32.925C246.54 32.925 245.18 35.8724 250.621 34.6934C250.621 34.6934 252.662 35.8724 252.662 34.104C252.662 34.104 255.383 37.0513 256.063 35.2829C256.743 33.5145 258.103 35.8724 258.103 35.8724L259.464 32.925L260.824 34.6934H265.585C265.585 34.6934 266.946 22.9039 250.621 24.0829C234.297 25.2618 242.328 43.9412 242.328 43.9412C242.328 43.9412 242.459 40.5882 243.819 42.3566C245.18 44.1251 246.54 32.925 246.54 32.925Z",fill:"#2F2E41"}),Object(w.createElement)("path",{d:"M279.548 83.38L280.091 94.8036C280.091 94.8036 282.265 116.019 277.918 125.267V130.163C277.918 130.163 276.831 142.674 271.398 142.13C265.964 141.586 273.028 124.179 273.028 124.179L271.941 100.243L270.854 86.6439L279.548 83.38Z",fill:"#A0616A"}),Object(w.createElement)("path",{d:"M268.681 62.1646L274.101 61.2829C278.006 65.0388 280.665 69.9033 281.721 75.2202C283.351 83.9239 283.895 85.5559 283.895 85.5559L270.854 88.8198L263.79 75.2202L268.681 62.1646Z",fill:"#CFCCE0"}),Object(w.createElement)("path",{d:"M331.09 55.9565H245.342V98.6006H331.09V55.9565Z",fill:"white"}),Object(w.createElement)("path",{d:"M254.706 58.5209C252.503 57.1946 249.846 57.2959 248.837 57.3972C249.221 58.3372 250.375 60.7346 252.578 62.0616C254.786 63.3912 257.439 63.2869 258.447 63.1863C258.063 62.2467 256.909 59.8482 254.706 58.5209Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M265.057 84.8388H251.289C250.882 84.8383 250.478 84.9182 250.102 85.0739C249.726 85.2295 249.384 85.4579 249.096 85.746C248.808 86.034 248.58 86.3761 248.424 86.7526C248.268 87.1291 248.187 87.5327 248.188 87.9402C248.187 88.3478 248.268 88.7514 248.424 89.1279C248.58 89.5044 248.808 89.8465 249.096 90.1345C249.384 90.4226 249.726 90.6509 250.102 90.8066C250.478 90.9623 250.882 91.0422 251.289 91.0417H265.057C265.465 91.0422 265.868 90.9623 266.244 90.8066C266.62 90.6509 266.962 90.4226 267.25 90.1345C267.538 89.8465 267.767 89.5044 267.923 89.1279C268.079 88.7514 268.159 88.3478 268.159 87.9402C268.159 87.5327 268.079 87.1291 267.923 86.7526C267.767 86.3761 267.538 86.034 267.25 85.746C266.962 85.4579 266.62 85.2295 266.244 85.0739C265.868 84.9182 265.465 84.8383 265.057 84.8388Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M327.407 52.1009H250.21C249.312 52.1009 248.423 52.278 247.593 52.622C246.764 52.9661 246.01 53.4703 245.375 54.106C244.74 54.7418 244.236 55.4965 243.892 56.3271C243.549 57.1577 243.372 58.0479 243.372 58.9469V96.6016C243.372 98.4172 244.092 100.159 245.375 101.442C246.657 102.726 248.396 103.448 250.21 103.448H327.407C329.22 103.448 330.96 102.726 332.242 101.442C333.524 100.159 334.245 98.4172 334.245 96.6016V58.9469C334.245 58.0479 334.068 57.1577 333.724 56.3271C333.381 55.4965 332.877 54.7418 332.242 54.106C331.607 53.4703 330.853 52.9661 330.023 52.622C329.194 52.278 328.305 52.1009 327.407 52.1009ZM248.3 56.7709C248.453 56.7433 252.067 56.1275 255.061 57.9306C258.054 59.7334 259.204 63.2196 259.251 63.367L259.372 63.7429L258.984 63.8119C258.429 63.8985 257.869 63.9397 257.308 63.935C255.529 63.9691 253.773 63.526 252.223 62.6518C249.23 60.8494 248.08 57.3632 248.033 57.2158L247.912 56.8399L248.3 56.7709ZM265.057 91.7309H251.289C250.285 91.7309 249.322 91.3315 248.611 90.6206C247.901 89.9097 247.502 88.9456 247.502 87.9402C247.502 86.9348 247.901 85.9707 248.611 85.2598C249.322 84.5489 250.285 84.1495 251.289 84.1495H265.057C266.062 84.1495 267.025 84.5489 267.735 85.2598C268.445 85.9707 268.844 86.9348 268.844 87.9402C268.844 88.9456 268.445 89.9097 267.735 90.6206C267.025 91.3315 266.062 91.7309 265.057 91.7309ZM327.705 91.0417C327.702 92.1374 327.265 93.1874 326.491 93.9622C325.717 94.7371 324.669 95.1738 323.574 95.177H313.248C312.153 95.1738 311.104 94.7371 310.33 93.9622C309.556 93.1874 309.12 92.1374 309.117 91.0417V84.8387C309.12 83.743 309.556 82.693 310.33 81.9182C311.104 81.1433 312.153 80.7066 313.248 80.7034H323.574C324.669 80.7066 325.717 81.1433 326.491 81.9182C327.265 82.693 327.702 83.743 327.705 84.8387V91.0417Z",fill:"#533582"}),Object(w.createElement)("path",{d:"M316.518 89.8356H312.043C311.723 89.8356 311.417 89.9626 311.191 90.1888C310.965 90.415 310.838 90.7218 310.838 91.0417C310.838 91.3616 310.965 91.6684 311.191 91.8946C311.417 92.1208 311.723 92.2478 312.043 92.2478H316.518C316.837 92.2478 317.144 92.1208 317.37 91.8946C317.596 91.6684 317.722 91.3616 317.722 91.0417C317.722 90.7218 317.596 90.415 317.37 90.1888C317.144 89.9626 316.837 89.8356 316.518 89.8356ZM316.518 91.5586H312.043C311.975 91.5588 311.908 91.5456 311.845 91.5197C311.782 91.4938 311.725 91.4557 311.677 91.4077C311.629 91.3597 311.591 91.3026 311.565 91.2398C311.539 91.177 311.525 91.1097 311.525 91.0417C311.525 90.9737 311.539 90.9064 311.565 90.8436C311.591 90.7808 311.629 90.7237 311.677 90.6757C311.725 90.6277 311.782 90.5896 311.845 90.5637C311.908 90.5378 311.975 90.5246 312.043 90.5248H316.518C316.654 90.5251 316.785 90.5798 316.882 90.6767C316.978 90.7736 317.033 90.9048 317.033 91.0417C317.033 91.1786 316.978 91.3098 316.882 91.4067C316.785 91.5036 316.654 91.5583 316.518 91.5586Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M324.779 89.8356H320.304C319.985 89.8356 319.678 89.9626 319.452 90.1888C319.226 90.415 319.099 90.7218 319.099 91.0417C319.099 91.3616 319.226 91.6684 319.452 91.8946C319.678 92.1208 319.985 92.2478 320.304 92.2478H324.779C325.098 92.2478 325.405 92.1208 325.631 91.8946C325.857 91.6684 325.984 91.3616 325.984 91.0417C325.984 90.7218 325.857 90.415 325.631 90.1888C325.405 89.9626 325.098 89.8356 324.779 89.8356ZM324.779 91.5586H320.304C320.236 91.5588 320.169 91.5456 320.106 91.5197C320.043 91.4938 319.986 91.4557 319.938 91.4077C319.89 91.3597 319.852 91.3026 319.826 91.2398C319.8 91.177 319.786 91.1097 319.786 91.0417C319.786 90.9737 319.8 90.9064 319.826 90.8436C319.852 90.7808 319.89 90.7237 319.938 90.6757C319.986 90.6277 320.043 90.5896 320.106 90.5637C320.169 90.5378 320.236 90.5246 320.304 90.5248H324.779C324.916 90.5251 325.047 90.5798 325.143 90.6767C325.24 90.7736 325.294 90.9048 325.294 91.0417C325.294 91.1786 325.24 91.3098 325.143 91.4067C325.047 91.5036 324.916 91.5583 324.779 91.5586Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M316.518 86.7341H312.043C311.723 86.7341 311.417 86.8612 311.191 87.0874C310.965 87.3136 310.838 87.6203 310.838 87.9402C310.838 88.2601 310.965 88.5669 311.191 88.7931C311.417 89.0193 311.723 89.1464 312.043 89.1464H316.518C316.837 89.1464 317.144 89.0193 317.37 88.7931C317.596 88.5669 317.722 88.2601 317.722 87.9402C317.722 87.6203 317.596 87.3136 317.37 87.0874C317.144 86.8612 316.837 86.7341 316.518 86.7341ZM316.518 88.4571H312.043C311.975 88.4571 311.908 88.4438 311.845 88.4178C311.783 88.3918 311.726 88.3537 311.678 88.3057C311.63 88.2577 311.592 88.2007 311.566 88.138C311.54 88.0753 311.527 88.0081 311.527 87.9402C311.527 87.8723 311.54 87.8051 311.566 87.7424C311.592 87.6797 311.63 87.6227 311.678 87.5747C311.726 87.5267 311.783 87.4886 311.845 87.4627C311.908 87.4367 311.975 87.4233 312.043 87.4233H316.518C316.585 87.4233 316.653 87.4367 316.715 87.4627C316.778 87.4886 316.835 87.5267 316.883 87.5747C316.931 87.6227 316.969 87.6797 316.995 87.7424C317.021 87.8051 317.034 87.8723 317.034 87.9402C317.034 88.0081 317.021 88.0753 316.995 88.138C316.969 88.2007 316.931 88.2577 316.883 88.3057C316.835 88.3537 316.778 88.3918 316.715 88.4178C316.653 88.4438 316.585 88.4571 316.518 88.4571Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M324.779 86.7341H320.304C319.985 86.7341 319.678 86.8612 319.452 87.0874C319.226 87.3136 319.099 87.6203 319.099 87.9402C319.099 88.2601 319.226 88.5669 319.452 88.7931C319.678 89.0193 319.985 89.1464 320.304 89.1464H324.779C325.098 89.1464 325.405 89.0193 325.631 88.7931C325.857 88.5669 325.984 88.2601 325.984 87.9402C325.984 87.6203 325.857 87.3136 325.631 87.0874C325.405 86.8612 325.098 86.7341 324.779 86.7341ZM324.779 88.4571H320.304C320.236 88.4571 320.169 88.4438 320.107 88.4178C320.044 88.3918 319.987 88.3537 319.939 88.3057C319.891 88.2577 319.853 88.2007 319.827 88.138C319.801 88.0753 319.788 88.0081 319.788 87.9402C319.788 87.8723 319.801 87.8051 319.827 87.7424C319.853 87.6797 319.891 87.6227 319.939 87.5747C319.987 87.5267 320.044 87.4886 320.107 87.4627C320.169 87.4367 320.236 87.4233 320.304 87.4233H324.779C324.847 87.4233 324.914 87.4367 324.977 87.4627C325.039 87.4886 325.096 87.5267 325.144 87.5747C325.192 87.6227 325.23 87.6797 325.256 87.7424C325.282 87.8051 325.295 87.8723 325.295 87.9402C325.295 88.0081 325.282 88.0753 325.256 88.138C325.23 88.2007 325.192 88.2577 325.144 88.3057C325.096 88.3537 325.039 88.3918 324.977 88.4178C324.914 88.4438 324.847 88.4571 324.779 88.4571Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M316.518 83.6326H312.043C311.723 83.6326 311.417 83.7597 311.191 83.9859C310.965 84.2121 310.838 84.5189 310.838 84.8387C310.838 85.1586 310.965 85.4654 311.191 85.6916C311.417 85.9178 311.723 86.0449 312.043 86.0449H316.518C316.837 86.0449 317.144 85.9178 317.37 85.6916C317.596 85.4654 317.722 85.1586 317.722 84.8387C317.722 84.5189 317.596 84.2121 317.37 83.9859C317.144 83.7597 316.837 83.6326 316.518 83.6326ZM316.518 85.3556H312.043C311.975 85.3558 311.908 85.3426 311.845 85.3167C311.782 85.2908 311.725 85.2528 311.677 85.2047C311.629 85.1567 311.591 85.0997 311.565 85.0369C311.539 84.9741 311.525 84.9067 311.525 84.8387C311.525 84.7707 311.539 84.7034 311.565 84.6406C311.591 84.5778 311.629 84.5207 311.677 84.4727C311.725 84.4247 311.782 84.3867 311.845 84.3608C311.908 84.3349 311.975 84.3216 312.043 84.3218H316.518C316.654 84.3222 316.785 84.3768 316.882 84.4737C316.978 84.5706 317.033 84.7019 317.033 84.8387C317.033 84.9756 316.978 85.1069 316.882 85.2038C316.785 85.3007 316.654 85.3553 316.518 85.3556Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M324.779 83.6326H320.304C319.985 83.6326 319.678 83.7597 319.452 83.9859C319.226 84.2121 319.099 84.5189 319.099 84.8387C319.099 85.1586 319.226 85.4654 319.452 85.6916C319.678 85.9178 319.985 86.0449 320.304 86.0449H324.779C325.098 86.0449 325.405 85.9178 325.631 85.6916C325.857 85.4654 325.984 85.1586 325.984 84.8387C325.984 84.5189 325.857 84.2121 325.631 83.9859C325.405 83.7597 325.098 83.6326 324.779 83.6326ZM324.779 85.3556H320.304C320.236 85.3558 320.169 85.3426 320.106 85.3167C320.043 85.2908 319.986 85.2528 319.938 85.2047C319.89 85.1567 319.852 85.0997 319.826 85.0369C319.8 84.9741 319.786 84.9067 319.786 84.8387C319.786 84.7707 319.8 84.7034 319.826 84.6406C319.852 84.5778 319.89 84.5207 319.938 84.4727C319.986 84.4247 320.043 84.3867 320.106 84.3608C320.169 84.3349 320.236 84.3216 320.304 84.3218H324.779C324.916 84.3222 325.047 84.3768 325.143 84.4737C325.24 84.5706 325.294 84.7019 325.294 84.8387C325.294 84.9756 325.24 85.1069 325.143 85.2038C325.047 85.3007 324.916 85.3553 324.779 85.3556Z",fill:"#7F54B3"}),Object(w.createElement)("path",{d:"M222.495 76.8522C222.495 76.8522 217.605 97.5235 223.582 97.5235C229.559 97.5235 243.686 74.1322 243.686 74.1322C243.686 74.1322 258.357 66.5165 252.38 63.7966C246.403 61.0766 238.796 68.1484 238.796 68.1484L230.018 80.3487L229.559 74.1322L222.495 76.8522Z",fill:"#A0616A"}),Object(w.createElement)("path",{d:"M233.905 59.4447L230.645 56.1808C230.645 56.1808 224.125 59.9886 223.582 63.7965C223.038 67.6044 220.321 79.572 220.321 79.572L230.374 80.388L233.634 75.4922L233.905 59.4447Z",fill:"#CFCCE0"}),Object(w.createElement)("path",{d:"M408.018 104.68C410.039 104.68 411.678 103.04 411.678 101.017C411.678 98.9933 410.039 97.3529 408.018 97.3529C405.997 97.3529 404.359 98.9933 404.359 101.017C404.359 103.04 405.997 104.68 408.018 104.68Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M372.096 65.5535C371.687 64.3435 366.554 60.2302 369.699 59.5388L372.279 62.9822L384.138 51.1094L385.331 52.3035L372.096 65.5535Z",fill:"#984A9C"}),Object(w.createElement)("path",{d:"M372.096 105.926C371.687 104.716 366.554 100.603 369.699 99.9112L372.279 103.355L384.138 91.4819L385.331 92.676L372.096 105.926Z",fill:"#984A9C"}),Object(w.createElement)("path",{d:"M372.096 146.875C371.687 145.665 366.554 141.552 369.699 140.86L372.279 144.304L384.138 132.431L385.331 133.625L372.096 146.875Z",fill:"#984A9C"}),Object(w.createElement)("path",{d:"M408.018 64.308C410.039 64.308 411.678 62.6677 411.678 60.6442C411.678 58.6208 410.039 56.9805 408.018 56.9805C405.997 56.9805 404.359 58.6208 404.359 60.6442C404.359 62.6677 405.997 64.308 408.018 64.308Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M480.661 60.2778H421.742V61.0106H480.661V60.2778Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M480.661 100.65H421.742V101.383H480.661V100.65Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M408.018 145.63C410.039 145.63 411.678 143.989 411.678 141.966C411.678 139.942 410.039 138.302 408.018 138.302C405.997 138.302 404.359 139.942 404.359 141.966C404.359 143.989 405.997 145.63 408.018 145.63Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M480.661 141.599H421.742V142.332H480.661V141.599Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M381.34 152.334H363.042V133.649H375.484V134.382H363.774V151.601H380.608V143.175H381.34V152.334Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M381.34 111.3H363.042V92.6149H375.484V93.3476H363.774V110.567H380.608V102.141H381.34V111.3Z",fill:"#3F3D56"}),Object(w.createElement)("path",{d:"M381.34 69.5332H363.042V50.848H375.484V51.5808H363.774V68.8004H380.608V60.3738H381.34V69.5332Z",fill:"#3F3D56"})),Object(w.createElement)("defs",null,Object(w.createElement)("linearGradient",{id:"paint0_linear",x1:"340",y1:"184",x2:"340",y2:"244",gradientUnits:"userSpaceOnUse"},Object(w.createElement)("stop",{stopColor:"#ECECEC"}),Object(w.createElement)("stop",{offset:"0.614583",stopColor:"#F6F7F7"})),Object(w.createElement)("linearGradient",{id:"paint1_linear",x1:"340",y1:"0",x2:"340",y2:"186",gradientUnits:"userSpaceOnUse"},Object(w.createElement)("stop",{stopColor:"#ECECEC"}),Object(w.createElement)("stop",{offset:"0.614583",stopColor:"#F6F7F7"})),Object(w.createElement)("clipPath",{id:"clip0"},Object(w.createElement)("rect",{x:"178",y:"24",width:"325",height:"196",fill:"white"}))))},O=function(){return Object(w.createElement)(E,{isNarrow:!0,className:"connect-account"},Object(w.createElement)(f.Card,{className:"connect-account__card"},Object(w.createElement)(_,null),Object(w.createElement)("h2",null,Object(v.__)("Accept credit cards online using WooCommerce Payments.","woocommerce-payments"),Object(w.createElement)("br",null),Object(v.__)("Simply verify your business details to get started.","woocommerce-payments")),wcpaySettings.onBoardingDisabled?Object(w.createElement)("p",null,Object(v.__)("We've temporarily paused new account creation.","woocommmerce-payments"),Object(w.createElement)("br",null),Object(v.__)("We'll notify you when we resume!","woocommmerce-payments")):Object(w.createElement)(w.Fragment,null,Object(w.createElement)("p",{className:"connect-account__terms"},Object(y.a)(Object(v.__)("By clicking “Verify details,” you agree to the <a>Terms of Service</a>.","woocommerce-payments"),{a:Object(w.createElement)("a",{href:"https://wordpress.com/tos"})})),Object(w.createElement)("hr",{className:"full-width"}),Object(w.createElement)("p",{className:"connect-account__action"},Object(w.createElement)(b.Button,{isPrimary:!0,isLarge:!0,href:wcpaySettings.connectUrl},Object(v.__)("Verify details","woocommerce-payments"))))))},C=a(6),k=a(7),j=a.n(k),z=a(15),x=a.n(z),H=a(14),M=a(3),V=a.n(M),N=a(11),L=a(12),S="/wc/v3/payments",B="wc/payments",T=a(5),R=a.n(T),I=a(13),A={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS:"SET_DEPOSITS",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY"},D=function(e){return JSON.stringify(e,Object.keys(e).sort())},P={byId:{},queries:{}},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0,a=t.type,c=t.query,n=void 0===c?{}:c,r=t.data,o=void 0===r?[]:r,l=t.error,s=D(n);switch(a){case A.SET_DEPOSIT:return V()({},e,{byId:V()({},e.byId,R()({},o.id,o))});case A.SET_DEPOSITS:return V()({},e,{byId:V()({},e.byId,{},Object(I.keyBy)(o,"id")),queries:V()({},e.queries,R()({},s,{data:Object(I.map)(o,"id")}))});case A.SET_ERROR_FOR_DEPOSIT_QUERY:return V()({},e,{queries:V()({},e.queries,R()({},s,{error:l}))})}return e},q=function(e){return e&&e.deposits||{}},Z=function(e,t){return(q(e).byId||{})[t]},U=function(e,t){var a=D(t);return(q(e).queries||{})[a]||{}},Y=function(e,t){return(U(e,t).data||[]).map(Z.bind(void 0,e))},Q=function(e,t){return U(e,t).error||{}};function W(e){return{type:A.SET_DEPOSIT,data:e}}function G(e,t){return{type:A.SET_DEPOSITS,query:e,data:t}}function $(e,t,a){return{type:A.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:a}}var J=a(4),K=a.n(J),X=a(8),ee=K.a.mark(ce),te=K.a.mark(ne),ae=function(e){return{id:e.id,date:+new Date(1e3*e.arrival_date),type:e.amount>0?"deposit":"withdrawal",amount:e.amount,status:e.status,bankAccount:e.destination.bank_name&&"".concat(e.destination.bank_name," ")+"•••• ".concat(e.destination.last4," ")+"(".concat(e.destination.currency.toUpperCase(),")")}};function ce(e){var t,a;return K.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(X.addQueryArgs)("".concat(S,"/deposits/").concat(e)),c.prev=1,c.next=4,Object(L.apiFetch)({path:t});case 4:return"payout"===(a=c.sent).object&&(a=ae(a)),c.next=8,W(a);case 8:c.next=14;break;case 10:return c.prev=10,c.t0=c.catch(1),c.next=14,Object(L.dispatch)("core/notices","createErrorNotice",Object(v.__)("Error retrieving deposit.","woocommerce-payments"));case 14:case"end":return c.stop()}},ee,null,[[1,10]])}function ne(e){var t,a,c;return K.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=Object(X.addQueryArgs)("".concat(S,"/deposits"),{page:e.paged,pagesize:e.perPage}),n.prev=1,n.next=4,Object(L.apiFetch)({path:t})||{};case 4:return(a=n.sent).data&&a.data.length&&"payout"===a.data[0].object&&(a.data=a.data.map(ae)),n.next=8,G(e,a.data);case 8:n.t0=K.a.keys(a.data);case 9:if((n.t1=n.t0()).done){n.next=15;break}return c=n.t1.value,n.next=13,Object(L.dispatch)(B,"finishResolution","getDeposit",[a.data[c].id]);case 13:n.next=9;break;case 15:n.next=23;break;case 17:return n.prev=17,n.t2=n.catch(1),n.next=21,Object(L.dispatch)("core/notices","createErrorNotice",Object(v.__)("Error retrieving deposits.","woocommerce-payments"));case 21:return n.next=23,$(e,null,n.t2);case 23:case"end":return n.stop()}},te,null,[[1,17]])}var re={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY"},oe={summary:{}},le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe,t=arguments.length>1?arguments[1]:void 0,a=t.type,c=t.query,n=void 0===c?{}:c,r=t.data,o=void 0===r?[]:r,l=t.error,s=D(n);switch(a){case re.SET_TRANSACTIONS:return V()({},e,R()({},s,{data:o}));case re.SET_ERROR_FOR_TRANSACTIONS:return V()({},e,R()({},s,{error:l}));case re.SET_TRANSACTIONS_SUMMARY:return V()({},e,{summary:V()({},e.summary,R()({},s,{data:o}))});case re.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return V()({},e,{summary:V()({},e.summary,R()({},s,{error:l}))})}return e},se=function(e){return e&&e.transactions||{}},ie=function(e,t){var a=D(t);return se(e)[a]||{}},me=function(e,t){return ie(e,t).data||[]},de=function(e,t){return ie(e,t).error||{}},ue=function(e,t){var a=D(t);return se(e).summary[a]||{}},he=function(e,t){return ue(e,t).data||{}},pe=function(e,t){return ue(e,t).error||{}};function ve(e,t){return{type:re.SET_TRANSACTIONS,query:e,data:t}}function ge(e,t,a){return{type:re.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:a}}function we(e,t){return{type:re.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function fe(e,t,a){return{type:re.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:a}}var be=K.a.mark(Ee),ye=K.a.mark(_e);function Ee(e){var t,a;return K.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(X.addQueryArgs)("".concat(S,"/transactions"),{page:e.paged,pagesize:e.perPage,deposit_id:e.depositId}),c.prev=1,c.next=4,Object(L.apiFetch)({path:t});case 4:return a=c.sent,c.next=7,ve(e,a.data||[]);case 7:c.next=13;break;case 9:return c.prev=9,c.t0=c.catch(1),c.next=13,ge(e,null,c.t0);case 13:case"end":return c.stop()}},be,null,[[1,9]])}function _e(e){var t,a;return K.a.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(X.addQueryArgs)("".concat(S,"/transactions/summary"),{deposit_id:e.depositId}),c.prev=1,c.next=4,Object(L.apiFetch)({path:t});case 4:return a=c.sent,c.next=7,we(e,a);case 7:c.next=13;break;case 9:return c.prev=9,c.t0=c.catch(1),c.next=13,fe(e,null,c.t0);case 13:case"end":return c.stop()}},ye,null,[[1,9]])}var Oe={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,a=t.type,c=t.id,n=t.data,r=t.error;switch(a){case Oe.SET_CHARGE:e=V()({},e,R()({},c,V()({},e[c],{data:n})));break;case Oe.SET_ERROR_FOR_CHARGE:e=V()({},e,R()({},c,V()({},e[c],{error:r})))}return e},ke=function(e,t){return e.charges[t]&&e.charges[t].data?e.charges[t].data:{}},je=function(e,t){return e.charges[t]&&e.charges[t].error?e.charges[t].error:{}};function ze(e,t){return{type:Oe.SET_CHARGE,id:e,data:t}}function xe(e,t,a){return{type:Oe.SET_ERROR_FOR_CHARGE,id:e,data:t,error:a}}var He=K.a.mark(Me);function Me(e){var t;return K.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(L.apiFetch)({path:"".concat(S,"/charges/").concat(e)});case 3:return t=a.sent,a.next=6,ze(e,t);case 6:a.next=12;break;case 8:return a.prev=8,a.t0=a.catch(0),a.next=12,xe(e,null,a.t0);case 12:case"end":return a.stop()}},He,null,[[0,8]])}var Ve={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,a=t.type,c=t.id,n=t.data,r=t.error;switch(a){case Ve.SET_TIMELINE:e=V()({},e,R()({},c,{data:n}));break;case Ve.SET_ERROR_FOR_TIMELINE:e=V()({},e,R()({},c,V()({},e[c],{error:r})))}return e},Le=function(e,t){return e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{}},Se=function(e,t){return e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{}};function Be(e,t){return{id:e,type:Ve.SET_TIMELINE,data:t}}function Te(e,t){return{id:e,type:Ve.SET_ERROR_FOR_TIMELINE,error:t}}var Re=K.a.mark(Ie);function Ie(e){var t;return K.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(L.apiFetch)({path:"".concat(S,"/timeline/").concat(e)});case 3:return t=a.sent,a.next=6,Be(e,t.data);case 6:a.next=12;break;case 8:return a.prev=8,a.t0=a.catch(0),a.next=12,Te(e,a.t0);case 12:case"end":return a.stop()}},Re,null,[[0,8]])}Object(N.registerStore)(B,{reducer:Object(N.combineReducers)({deposits:F,transactions:le,charges:Ce,timeline:Ne}),actions:V()({},n,{},l,{},m,{},h),controls:L.controls,selectors:V()({},c,{},o,{},i,{},u),resolvers:V()({},r,{},s,{},d,{},p)});var Ae={deposit:Object(v.__)("Deposit","woocommerce-payments"),withdrawal:Object(v.__)("Withdrawal","woocommerce-payments")},De={paid:Object(v.__)("Paid","woocommerce-payments"),pending:Object(v.__)("Pending","woocommerce-payments"),in_transit:Object(v.__)("In Transit","woocommerce-payments"),canceled:Object(v.__)("Canceled","woocommerce-payments"),failed:Object(v.__)("Failed","woocommerce-payments"),estimated:Object(v.__)("Estimated","woocommerce-payments")},Pe=function(e){return Object(I.capitalize)(e).replace(/_/g," ")},Fe=a(22),qe=a.n(Fe),Ze=function(e,t){return Object(X.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/".concat(t,"/details"),id:e})},Ue=function(e){var t=e.id,a=e.parentSegment;return t?Object(w.createElement)(f.Link,{href:Ze(t,a)},Object(w.createElement)(qe.a,{icon:"info-outline",size:18})):null},Ye=new x.a,Qe=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"date",label:Object(v.__)("Date","woocommerce-payments"),required:!0,isLeftAligned:!0,defaultOrder:"desc",cellClassName:"date-time"},{key:"type",label:Object(v.__)("Type","woocommerce-payments"),required:!0},{key:"amount",label:Object(v.__)("Amount","woocommerce-payments"),isNumeric:!0,required:!0},{key:"status",label:Object(v.__)("Status","woocommerce-payments"),required:!0},{key:"bankAccount",label:Object(v.__)("Bank Account","woocommerce-payments")}],We=function(){var e,t,a,c=(e=Object(H.getQuery)(),t=e.paged,a=e.per_page,Object(N.useSelect)(function(e){var c=e(B),n=c.getDeposits,r=c.getDepositQueryError,o=c.isResolving,l={paged:Number.isNaN(parseInt(t,10))?"1":t,perPage:Number.isNaN(parseInt(a,10))?"25":a};return{deposits:n(l),depositsError:r(l),isLoading:o("getDeposits",[l])}},[t,a])),n=c.deposits,r=c.isLoading,o=n.map(function(e){var t=Object(w.createElement)(Ue,{id:e.id,parentSegment:"deposits"}),a=Object(w.createElement)(f.Link,{href:Ze(e.id,"deposits")},Object(C.dateI18n)("M j, Y / g:iA",j.a.utc(e.date).local())),c={details:{value:e.id,display:t},date:{value:e.date,display:a},type:{value:e.type,display:Ae[e.type]},amount:{value:e.amount/100,display:Ye.formatCurrency(e.amount/100)},status:{value:e.status,display:De[e.status]||Pe(e.status)},bankAccount:{value:e.bankAccount,display:e.bankAccount}};return Qe.map(function(e){var t=e.key;return c[t]||{display:null}})});return Object(w.createElement)(f.TableCard,{title:Object(v.__)("Deposit History","woocommerce-payments"),isLoading:r,rowsPerPage:10,totalRows:10,headers:Qe,rows:o,query:Object(H.getQuery)(),onQueryChange:H.onQueryChange})},Ge=function(e){var t=e.order;return t?Object(w.createElement)(f.Link,{href:t.url,type:"external"},t.number):Object(w.createElement)("span",null,"–")},$e=[Object(v.__)("Normal","woocommerce-payments"),Object(v.__)("Elevated","woocommerce-payments"),Object(v.__)("Highest","woocommerce-payments")],Je=["green","orange","red"],Ke=function(e){var t=e.risk;return Object(w.createElement)("span",{style:{color:Je[t]}},$e[t])},Xe={charge:Object(v.__)("Charge","woocommerce-payments"),payment:Object(v.__)("Payment","woocommerce-payments"),payment_failure_refund:Object(v.__)("Payment Failure Refund","woocommerce-payments"),payment_refund:Object(v.__)("Payment Refund","woocommerce-payments"),refund:Object(v.__)("Refund","woocommerce-payments"),refund_failure:Object(v.__)("Refund Failure","woocommerce-payments"),dispute:Object(v.__)("Dispute","woocommerce-payments"),dispute_reversal:Object(v.__)("Dispute Reversal","woocommerce-payments")},et=function(e){var t=e.depositId,a=e.dateAvailable,c=Object(X.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/deposits/details",id:t}),n=null!=a&&Object(C.dateI18n)("M j, Y",j.a.utc(a));return t?Object(w.createElement)(f.Link,{href:c},n||Object(v.__)("Deposit details","woocommerce-payments")):n||Object(v.__)("Pending","woocommerce-payments")},tt=(a(38),new x.a),at=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"created",label:Object(v.__)("Date / Time","woocommerce-payments"),required:!0,isLeftAligned:!0,defaultOrder:"desc",cellClassName:"date-time"},{key:"type",label:Object(v.__)("Type","woocommerce-payments"),required:!0},{key:"amount",label:Object(v.__)("Amount","woocommerce-payments"),isNumeric:!0},{key:"fee",label:Object(v.__)("Fees","woocommerce-payments"),isNumeric:!0},{key:"net",label:Object(v.__)("Net","woocommerce-payments"),isNumeric:!0,required:!0},{key:"order",label:Object(v.__)("Order #","woocommerce-payments"),required:!0},{key:"source",label:Object(v.__)("Source","woocommerce-payments")},{key:"customer",label:Object(v.__)("Customer","woocommerce-payments")},{key:"email",label:Object(v.__)("Email","woocommerce-payments"),visible:!1},{key:"country",label:Object(v.__)("Country","woocommerce-payments"),visible:!1},{key:"riskLevel",label:Object(v.__)("Risk Level","woocommerce-payments"),visible:!1}],ct={key:"deposit",label:Object(v.__)("Deposit","woocommerce-payments"),cellClassName:"deposit"},nt=function(e){var t,a,c,n,r=(t=Object(H.getQuery)(),a=e.depositId,c=t.paged,n=t.per_page,Object(N.useSelect)(function(e){var t=e(B),r=t.getTransactions,o=t.getTransactionsError,l=t.isResolving,s={paged:Number.isNaN(parseInt(c,10))?"1":c,perPage:Number.isNaN(parseInt(n,10))?"25":n,depositId:a||null};return{transactions:r(s),transactionsError:o(s),isLoading:l("getTransactions",[s])}},[c,n,a])),o=r.transactions,l=r.isLoading,s=function(e){return Object(N.useSelect)(function(t){var a=t(B),c=a.getTransactionsSummary,n=a.isResolving,r={depositId:e||null};return{transactionsSummary:c(r),isLoading:n("getTransactionsSummary",[r])}},[e])}(e.depositId),i=s.transactionsSummary,m=s.isLoading,d=e.depositId?at:[].concat(at,[ct]),u=o.map(function(e){var t=Object(w.createElement)(Ue,{id:e.charge_id,parentSegment:"transactions"}),a=Object(w.createElement)(Ge,{order:e.order}),c=Object(w.createElement)(Ke,{risk:e.risk_level}),n=Object(w.createElement)(et,{depositId:e.deposit_id,dateAvailable:e.date_available}),r={details:{value:e.transaction_id,display:t},created:{value:e.date,display:Object(C.dateI18n)("M j, Y / g:iA",j.a.utc(e.date).local())},type:{value:e.type,display:Xe[e.type]||Pe(e.type)},source:{value:e.source,display:Object(w.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(e.source)})},order:{value:e.order_id,display:a},customer:{value:e.customer_name,display:e.customer_name},email:{value:e.customer_email,display:e.customer_email},country:{value:e.customer_country,display:e.customer_country},amount:{value:e.amount/100,display:tt.formatCurrency(e.amount/100)},fee:{value:e.fees/100,display:tt.formatCurrency(e.fees/100*-1)},net:{value:e.net/100,display:tt.formatCurrency(e.net/100)},riskLevel:{value:e.risk_level,display:c},deposit:{value:e.deposit_id,display:n}};return d.map(function(e){var t=e.key;return r[t]||{display:null}})}),h=[{label:"transactions",value:"".concat(i.count)},{label:"total",value:"".concat(tt.formatCurrency(i.total/100))},{label:"fees",value:"".concat(tt.formatCurrency(i.fees/100))},{label:"net",value:"".concat(tt.formatCurrency(i.net/100))}];return Object(w.createElement)(f.TableCard,{className:"transactions-list",title:e.depositId?Object(v.__)("Deposit Transactions","woocommerce-payments"):Object(v.__)("Transactions","woocommerce-payments"),isLoading:l,rowsPerPage:Object(H.getQuery)().per_page||25,totalRows:i.count||0,headers:d,rows:u,summary:m?null:h,query:Object(H.getQuery)(),onQueryChange:H.onQueryChange})},rt=a(20),ot=a.n(rt),lt=a(23),st=a.n(lt),it=(a(40),function(e){var t=e.isLoading,a=e.display,c=e.placeholder,n=e.value,r=e.children;return t?Object(w.createElement)("span",{className:a?"is-loadable-placeholder is-".concat(a):"is-loadable-placeholder","aria-busy":"true"},void 0===c?r||n:c):r||n||null}),mt=function(e){var t=e.numLines,a=void 0===t?1:t,c=st()(e,["numLines"]),n=Object(w.createElement)("p",{style:{lineHeight:a}},"Block placeholder");return Object(w.createElement)(it,ot()({},c,{placeholder:n,display:"block"}))},dt=it,ut=(a(41),new x.a),ht=function(e){var t=e.status;return Object(w.createElement)(f.OrderStatus,{order:{status:t},orderStatusMap:De})},pt=function(e){var t,a=e.depositId,c=(t=a,Object(N.useSelect)(function(e){var a=e(B),c=a.getDeposit,n=a.isResolving;return{deposit:c(t),isLoading:n("getDeposit",[t])}},[t])),n=c.deposit,r=void 0===n?{}:n,o=c.isLoading;return Object(w.createElement)(f.Card,{className:"wcpay-deposit-overview"},Object(w.createElement)("div",{className:"wcpay-deposit-detail"},Object(w.createElement)("div",{className:"wcpay-deposit-date"},Object(w.createElement)(dt,{isLoading:o,placeholder:"Date placeholder"},"".concat(Object(v.__)("Deposit date","woocommerce-payments"),": "),Object(C.dateI18n)("M j, Y",j.a.utc(r.date).local()))),Object(w.createElement)("div",{className:"wcpay-deposit-status"},Object(w.createElement)(dt,{isLoading:o,placeholder:"Status"},Object(w.createElement)(ht,{status:r.status}))),Object(w.createElement)("div",{className:"wcpay-deposit-bank-account"},Object(w.createElement)(dt,{isLoading:o,placeholder:"Bank account placeholder"},r.bankAccount))),Object(w.createElement)("div",{className:"wcpay-deposit-hero"},Object(w.createElement)("div",{className:"wcpay-deposit-amount"},Object(w.createElement)(dt,{isLoading:o,placeholder:"Amount",display:"inline"},ut.formatCurrency(r.amount/100)))))},vt=function(e){var t=e.query.id;return Object(w.createElement)(w.Fragment,null,Object(w.createElement)(pt,{depositId:t}),Object(w.createElement)(nt,{depositId:t}))},gt=["issuer_declined","invalid"],wt=["blocked"],ft=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.status||null},bt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.outcome?e.outcome.type:null},yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"succeeded"===e.status&&!0===e.paid},Et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"failed"===e.status&&gt.includes(bt(e))},_t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"failed"===e.status&&wt.includes(bt(e))},Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.captured},Ct=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.disputed},kt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.amount_refunded>0},jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!0===e.refunded},zt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return kt(e)&&!jt(e)},xt=function(e){switch(e){case"warning_needs_response":case"needs_response":return"disputed_needs_response";case"warning_under_review":case"under_review":return"disputed_under_review";case"won":return"disputed_won";case"lost":return"disputed_lost";default:return"disputed"}},Ht=a(19),Mt={refunded_partial:{type:"light",message:Object(v.__)("Partial refund","woocommerce-payments")},refunded_full:{type:"light",message:Object(v.__)("Refunded","woocommerce-payments")},paid:{type:"light",message:Object(v.__)("Paid","woocommerce-payments")},authorized:{type:"primary",message:Object(v.__)("Payment authorized","woocommerce-payments")},failed:{type:"alert",message:Object(v.__)("Payment failed","woocommerce-payments")},blocked:{type:"alert",message:Object(v.__)("Payment blocked","woocommerce-payments")},disputed_needs_response:{type:"primary",message:Object(v.__)("Disputed: Needs response","woocommerce-payments")},disputed_under_review:{type:"light",message:Object(v.__)("Disputed: In review","woocommerce-payments")},disputed_won:{type:"light",message:Object(v.__)("Disputed: Won","woocommerce-payments")},disputed_lost:{type:"light",message:Object(v.__)("Disputed: Lost","woocommerce-payments")},default:{type:"light",message:""}},Vt=function(e){var t=e.charge,a=Mt[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Et(e)?"failed":_t(e)?"blocked":Ct(e)?xt(ft(e.dispute)):zt(e)?"refunded_partial":jt(e)?"refunded_full":yt(e)?Ot(e)?"paid":"authorized":""}(t)]||Mt.default;return Object(w.createElement)(Ht.a,{message:a.message,type:a.type})},Nt=(a(42),function(e){var t=e.payment,a=t?t[t.type]:null;return a?Object(w.createElement)("span",{className:"payment-method-details"},Object(w.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(a.brand)})," •••• ",a.last4):Object(w.createElement)("span",null,"–")}),Lt=(a(43),function(e){var t=e.items;return Object(w.createElement)(f.List,{className:"woocommerce-list--horizontal",items:t})}),St=(a(44),new x.a),Bt={net:0,fee:0,refunded:null},Tt=function(e){var t=e.charge;return[{title:Object(v.__)("Date","woocommerce-payments"),content:t.created?Object(C.dateI18n)("M j, Y, g:ia",j()(1e3*t.created)):"–"},{title:Object(v.__)("Customer","woocommerce-payments"),content:Object(I.get)(t,"billing_details.name")||"–"},{title:Object(v.__)("Payment Method","woocommerce-payments"),content:Object(w.createElement)(Nt,{payment:t.payment_method_details})},{title:Object(v.__)("Risk Evaluation","woocommerce-payments"),content:Object(I.get)(t,"outcome.risk_level")||"–"},{content:t.id||"–"}]},Rt=function(e){var t=e.charge,a=void 0===t?{}:t,c=e.isLoading,n=a.amount?function(e){var t,a;return a=e.application_fee_amount,t=0,Ct(e)&&"won"!==e.dispute.status?(a+=1500,t=e.dispute.amount):kt(e)&&(t=e.amount_refunded),{net:e.amount-a-(t||0),fee:a,refunded:t}}(a):Bt,r=n.net,o=n.fee,l=n.refunded;return Object(w.createElement)(f.Card,{className:"payment-details-summary-details"},Object(w.createElement)("div",{className:"payment-details-summary"},Object(w.createElement)("div",{className:"payment-details-summary__section"},Object(w.createElement)("p",{className:"payment-details-summary__amount"},Object(w.createElement)(dt,{isLoading:c,placeholder:"Amount placeholder"},St.formatCurrency((a.amount||0)/100),Object(w.createElement)("span",{className:"payment-details-summary__amount-currency"},a.currency||"cur"),Object(w.createElement)(Vt,{charge:a}))),Object(w.createElement)("div",{className:"payment-details-summary__breakdown"},l?Object(w.createElement)("p",null,"".concat(Object(v.__)("Refunded","woocommerce-payments"),": "),St.formatCurrency(-l/100)):"",Object(w.createElement)("p",null,Object(w.createElement)(dt,{isLoading:c,placeholder:"Fee amount"},"".concat(Object(v.__)("Fee","woocommerce-payments"),": "),St.formatCurrency(-o/100))),Object(w.createElement)("p",null,Object(w.createElement)(dt,{isLoading:c,placeholder:"Net amount"},"".concat(Object(v.__)("Net","woocommerce-payments"),": "),St.formatCurrency(r/100))))),Object(w.createElement)("div",{className:"payment-details-summary__section"},Object(w.createElement)("div",{className:"payment-details-summary__actions"},a.order?Object(w.createElement)(b.Button,{className:"payment-details-summary__actions-item",isDefault:!0,isLarge:!0,href:a.order.url},"".concat(Object(v.__)("View order")," ").concat(a.order.number)):""))),Object(w.createElement)("hr",{className:"full-width"}),Object(w.createElement)(mt,{isLoading:c,numLines:4},Object(w.createElement)(Lt,{items:Tt({charge:a})})))},It=function(){return null},At=function(e){var t=e.label,a=e.children,c=e.isLoading;return Object(w.createElement)("div",{className:"payment-method-detail"},Object(w.createElement)("h4",{className:"payment-method-detail__label"},Object(w.createElement)(dt,{isLoading:c,display:"block",value:t})),Object(w.createElement)("p",{className:"payment-method-detail__value"},Object(w.createElement)(dt,{isLoading:c,value:a})))},Dt=function(e){switch(e.checked){case"pass":return Object(v.__)("Passed","woocommerce-payments");case"fail":return Object(v.__)("Failed","woocommerce-payments");case"unavailable":return Object(v.__)("Unavailable","woocommerce-payments");default:return Object(v.__)("Not checked","woocommerce-payments")}},Pt={last4:"0000",fingerprint:"fingerprint placeholder",date:"date placeholder",cardType:"card type placeholder",id:"id placeholder",name:"name placeholder",email:"email placeholder",formattedAddress:"address placeholder",country:"country placeholder",cvcCheck:null,line1Check:null,postalCodeCheck:null},Ft=function(e){var t=e.charge,a=void 0===t?{}:t,c=e.isLoading,n=a&&a.payment_method_details?function(e){var t=e.billing_details,a=e.payment_method,c=e.payment_method_details.card,n=c.last4,r=c.fingerprint,o=c.exp_month,l=c.exp_year,s=c.funding,i=c.network,m=c.country,d=c.checks,u=t.name,h=t.email,p=t.formatted_address,g=d.cvc_check,w=d.address_line1_check,f=d.address_postal_code_check,b=o+" / "+l,y={credit:Object(v.__)("credit","woocommerce-payments"),debit:Object(v.__)("debit","woocommerce-payments"),prepaid:Object(v.__)("prepaid","woocommerce-payments"),unknown:Object(v.__)("unknown","woocommerce-payments")};return{last4:n,fingerprint:r,date:b,cardType:Object(v.sprintf)(Object(v.__)("%1$s %2$s card","woocommerce-payments"),i.charAt(0).toUpperCase()+i.slice(1),y[s]),id:a,name:u,email:h,country:wcSettings.countries[m],cvcCheck:g,line1Check:w,postalCodeCheck:f,formattedAddress:p}}(a):Pt,r=n.last4,o=n.fingerprint,l=n.date,s=n.cardType,i=n.id,m=n.name,d=n.email,u=n.country,h=n.cvcCheck,p=n.line1Check,g=n.postalCodeCheck,b=n.formattedAddress,y=At,E=Dt;return Object(w.createElement)(f.Card,{title:Object(w.createElement)(dt,{isLoading:c,value:Object(v.__)("Payment method","woocommerce-payments")})},Object(w.createElement)("div",{className:"payment-method-details"},Object(w.createElement)("div",{className:"payment-method-details__column"},Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Number","woocommerce-payments")},"•••• ",r),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Fingerprint","woocommerce-payments")},o),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Expires","woocommerce-payments")},l),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Type","woocommerce-payments")},s),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("ID","woocommerce-payments")},i)),Object(w.createElement)("div",{className:"payment-method-details__column"},Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Owner","woocommerce-payments")},m),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Owner Email","woocommerce-payments")},d),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Address","woocommerce-payments")},Object(w.createElement)("span",{dangerouslySetInnerHTML:{__html:b}})),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Origin","woocommerce-payments")},u),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("CVC check","woocommerce-payments")},Object(w.createElement)(E,{checked:h})),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Street check","woocommerce-payments")},Object(w.createElement)(E,{checked:p})),Object(w.createElement)(y,{isLoading:c,label:Object(v.__)("Zip check","woocommerce-payments")},Object(w.createElement)(E,{checked:g})))))},qt=function(e){var t=function(e){return Object(N.useSelect)(function(t){var a=t(B),c=a.getCharge,n=a.getChargeError,r=a.isResolving;return{charge:c(e),chargeError:n(e),isLoading:r("getCharge",[e])}},[e])}(e.query.id),a=t.charge,c=t.isLoading,n=t.chargeError;return!c&&n instanceof Error?Object(w.createElement)(E,{maxWidth:1032,className:"wcpay-payment-details"},Object(w.createElement)(f.Card,null,Object(w.createElement)("div",null,Object(v.__)("Payment details not loaded","woocommerce-payments")))):Object(w.createElement)(E,{maxWidth:1032,className:"wcpay-payment-details"},Object(w.createElement)(Rt,{charge:a,isLoading:c}),Object(w.createElement)(It,{charge:a}),!1,Object(w.createElement)(Ft,{charge:a,isLoading:c}),!1)},Zt=a(17),Ut=a.n(Zt),Yt=a(16),Qt=a.n(Yt),Wt=a(18),Gt=a.n(Wt),$t={warning_needs_response:{type:"primary",message:Object(v.__)("Inquiry: Needs Response","woocommerce-payments")},warning_under_review:{type:"light",message:Object(v.__)("Inquiry: Under Review","woocommerce-payments")},warning_closed:{type:"light",message:Object(v.__)("Inquiry: Closed","woocommerce-payments")},needs_response:{type:"primary",message:Object(v.__)("Needs Response","woocommerce-payments")},under_review:{type:"light",message:Object(v.__)("Under Review","woocommerce-payments")},charge_refunded:{type:"light",message:Object(v.__)("Charge Refunded","woocommerce-payments")},won:{type:"light",message:Object(v.__)("Won","woocommerce-payments")},lost:{type:"light",message:Object(v.__)("Lost","woocommerce-payments")}},Jt=function(e){var t=e.status,a=$t[t]||{},c=a.message||Pe(t),n=a.type||"light";return Object(w.createElement)(Ht.a,{message:c,type:n,isCompact:!0})},Kt={bank_cannot_process:{display:Object(v.__)("Bank Cannot Process","woocommerce-payments")},check_returned:{display:Object(v.__)("Check Returned","woocommerce-payments")},credit_not_processed:{display:Object(v.__)("Credit Not Processed","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments")],required:[Object(v.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments")],respond:[Object(v.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),Object(v.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments")]},customer_initiated:{display:Object(v.__)("Customer Initiated","woocommerce-payments")},debit_not_authorized:{display:Object(v.__)("Debit Not Authorized","woocommerce-payments")},duplicate:{display:Object(v.__)("Duplicate","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments")],required:[Object(v.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments")],respond:[Object(v.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),Object(v.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),Object(v.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),Object(v.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments")]},fraudulent:{display:Object(v.__)("Fraudulent","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting fraudulent payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make a fraudulent purchase. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments")],required:[Object(v.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments")],respond:[Object(v.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),Object(v.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(v.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments")]},general:{display:Object(v.__)("General","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments")],summary:[Object(v.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments")]},incorrect_account_details:{display:Object(v.__)("Incorrect Account Details","woocommerce-payments")},insufficient_funds:{display:Object(v.__)("Insufficient Funds","woocommerce-payments")},product_not_received:{display:Object(v.__)("Product Not Received","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments")],required:[Object(v.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments")],respond:[Object(v.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),Object(v.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments")]},product_unacceptable:{display:Object(v.__)("Product Unacceptable","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments")],required:[Object(v.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments")],respond:[Object(v.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),Object(v.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),Object(v.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),Object(v.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),Object(v.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments")]},subscription_canceled:{display:Object(v.__)("Subscription Canceled","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments")],required:[Object(v.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")],respond:[Object(v.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),Object(v.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(v.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments")]},unrecognized:{display:Object(v.__)("Unrecognized","woocommerce-payments"),overview:[Object(v.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next the next screen.","woocommerce-payments"),Object(v.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancelation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments")],summary:[Object(v.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments")],required:[Object(v.__)("As with fraudulent disputes, get your customer to withdraw the dispute by helping them identify the payment. Otherwise challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments")],respond:[Object(v.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),Object(v.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments")]}},Xt=new x.a,ea=[{key:"details",label:"",required:!0,cellClassName:"info-button"},{key:"amount",label:Object(v.__)("Amount","woocommerce-payments"),required:!0},{key:"status",label:Object(v.__)("Status","woocommerce-payments"),required:!0},{key:"reason",label:Object(v.__)("Reason","woocommerce-payments"),required:!0},{key:"source",label:Object(v.__)("Source","woocommerce-payments"),required:!0},{key:"order",label:Object(v.__)("Order #","woocommerce-payments"),required:!0},{key:"customer",label:Object(v.__)("Customer","woocommerce-payments")},{key:"email",label:Object(v.__)("Email","woocommerce-payments"),visible:!1},{key:"country",label:Object(v.__)("Country","woocommerce-payments"),visible:!1},{key:"created",label:Object(v.__)("Disputed On","woocommerce-payments"),required:!0},{key:"dueBy",label:Object(v.__)("Respond By","woocommerce-payments"),required:!0}],ta=function(e){var t=e.disputes,a=e.showPlaceholder,c=(t.data||[]).map(function(e){var t=e.order?{value:e.order.number,display:Object(w.createElement)(Ge,{order:e.order})}:null,a=Object(w.createElement)(Ue,{id:e.id,parentSegment:"disputes"}),c=Kt[e.reason],n=c?c.display:Pe(e.reason),r=e.charge||{},o=((r.payment_method_details||{}).card||{}).brand,l=r.billing_details||{},s={amount:{value:e.amount/100,display:Xt.formatCurrency(e.amount/100)},status:{value:e.status,display:Object(w.createElement)(Jt,{status:e.status})},reason:{value:e.reason,display:n},source:{value:o,display:Object(w.createElement)("span",{className:"payment-method__brand payment-method__brand--".concat(o)})},created:{value:1e3*e.created,display:Object(C.dateI18n)("M j, Y",j()(1e3*e.created))},dueBy:{value:1e3*e.evidence_details.due_by,display:Object(C.dateI18n)("M j, Y / g:iA",j()(1e3*e.evidence_details.due_by))},order:t,customer:{value:l.name,display:l.name},email:{value:l.email,display:l.email},country:{value:(l.address||{}).country,display:(l.address||{}).country},details:{value:e.id,display:a}};return ea.map(function(e){var t=e.key;return s[t]||{display:null}})});return Object(w.createElement)(f.TableCard,{title:Object(v.__)("Disputes","woocommerce-payments"),isLoading:a,rowsPerPage:10,totalRows:10,headers:ea,rows:c})},aa=function(){var e=Object(w.useState)([]),t=Qt()(e,2),a=t[0],c=t[1],n=Object(w.useState)(!1),r=Qt()(n,2),o=r[0],l=r[1],s=function(){var e=Ut()(K.a.mark(function e(){return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.prev=1,e.t0=c,e.next=5,Gt()({path:"/wc/v3/payments/disputes"});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,l(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();return Object(w.useEffect)(function(){s()},[]),Object(w.createElement)(ta,{disputes:a,showPlaceholder:o})},ca=(a(48),function(e){var t=e.children;return Object(w.createElement)("div",{className:"woocommerce-card__footer"},t)}),na=function(e){var t=e.id,a=e.needsResponse,c=e.isSubmitted,n=e.onAccept;if(!a&&!c)return null;var r=Object(X.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes/challenge",id:t}),o=Object(v.__)("Are you sure you'd like to accept this dispute? This action can not be undone.","woocommerce-payments");return Object(w.createElement)(ca,null,Object(w.createElement)(f.Link,{href:r,className:"components-button is-button is-primary is-large"},a?Object(v.__)("Challenge Dispute","woocommerce-payments"):Object(v.__)("View Submitted Evidence","woocommerce-payments")),a&&Object(w.createElement)(b.Button,{isDefault:!0,isLarge:!0,onClick:function(){return window.confirm(o)&&n()}},Object(v.__)("Accept Dispute","woocommerce-payments")))},ra=a(25),oa=a.n(ra),la=(a(49),new x.a),sa=[{key:"created",label:Object(v.__)("Dispute date","woocommerce-payments")},{key:"amount",label:Object(v.__)("Disputed amount","woocommerce-payments")},{key:"dueBy",label:Object(v.__)("Respond by","woocommerce-payments")},{key:"reason",label:Object(v.__)("Reason","woocommerce-payments")},{key:"order",label:Object(v.__)("Order","woocommerce-payments")},{key:"customer",label:Object(v.__)("Customer","woocommerce-payments")},{key:"transactionId",label:Object(v.__)("Transaction ID","woocommerce-payments")}],ia=function(e){var t="object"===oa()(e.charge)?e.charge.id:e.charge;return Object(w.createElement)(f.Link,{href:Ze(t,"transactions")},t)},ma=function(e){var t=Kt[e.reason];return t?t.display:Pe(e.reason)},da=function(e){var t=e.dispute,a=e.isLoading,c=a?{created:"Created date",amount:"Amount",dueBy:"Due by date",reason:"Dispute reason",order:"Order link",customer:"Customer name",transactionId:"Transaction link"}:{created:Object(C.dateI18n)("M j, Y",j()(1e3*t.created)),amount:"".concat(la.formatCurrency(t.amount/100)," ").concat(la.code),dueBy:Object(C.dateI18n)("M j, Y - g:iA",j()(1e3*t.evidence_details.due_by)),reason:ma(t),order:t.order?Object(w.createElement)(Ge,{order:t.order}):null,customer:"object"===oa()(t.charge)?t.charge.billing_details.name:null,transactionId:ia(t)};return Object(w.createElement)("div",{className:"wcpay-dispute-info"},sa.map(function(e){var t=e.key,n=e.label;return null==c[t]?null:Object(w.createElement)("div",{key:t,className:"wcpay-dispute-info-item"},Object(w.createElement)(dt,{isLoading:a,display:"inline"},Object(w.createElement)("span",{className:"wcpay-dispute-info-key"},"".concat(n,": ")),Object(w.createElement)("span",{className:"wcpay-dispute-info-value"},c[t])))}))},ua=function(e){var t=e.children;return(void 0===t?[]:t).map(function(e,t){return Object(w.createElement)("p",{key:t},e)})},ha=(a(28),function(e){var t=e.isLoading,a=e.dispute,c=void 0===a?{}:a,n=e.onAccept,r=!t&&c.id,o=r&&Object(w.createElement)(na,{id:c.id,needsResponse:"needs_response"===c.status||"warning_needs_response"===c.status,isSubmitted:c.evidence_details&&c.evidence_details.submission_count>0,onAccept:n}),l=Kt[c.reason]||{};return t||r?Object(w.createElement)(E,{isNarrow:!0,className:"wcpay-dispute-details"},Object(w.createElement)(f.Card,{title:Object(w.createElement)(dt,{isLoading:t,value:Object(v.__)("Dispute Overview","woocommerce-payments")})},Object(w.createElement)(da,{dispute:c,isLoading:t}),Object(w.createElement)(mt,{isLoading:t,numLines:4},Object(w.createElement)(ua,null,l.overview)),Object(w.createElement)(mt,{isLoading:t,numLines:6},o)),Object(w.createElement)(f.Card,{title:Object(w.createElement)(dt,{isLoading:t,value:l.display?Object(v.sprintf)(Object(v.__)("%s Dispute","woocommerce-payments"),l.display):Object(v.__)("Dispute type","woocommerce-payments")})},Object(w.createElement)(mt,{isLoading:t,numLines:4},Object(w.createElement)(ua,null,l.summary)),Object(w.createElement)(mt,{isLoading:t,numLines:6},l.required&&Object(w.createElement)("h3",null," ",Object(v.__)("Required to overturn dispute","woocommerce-payments")," "),Object(w.createElement)(ua,null,l.required)),Object(w.createElement)(mt,{isLoading:t,numLines:6},l.respond&&Object(w.createElement)("h3",null,Object(v.__)("How to respond","woocommerce-payments")),Object(w.createElement)(ua,null,l.respond),o))):Object(w.createElement)(E,{isNarrow:!0,className:"wcpay-dispute-details"},Object(w.createElement)(f.Card,null,Object(w.createElement)("div",null,Object(v.__)("Dispute not loaded","woocommerce-payments"))))}),pa=function(e){var t=e.query,a="/wc/v3/payments/disputes/".concat(t.id),c=Object(w.useState)(),n=Qt()(c,2),r=n[0],o=n[1],l=Object(w.useState)(!0),s=Qt()(l,2),i=s[0],m=s[1],d=Object(N.useDispatch)("core/notices"),u=d.createSuccessNotice,h=d.createErrorNotice,p=function(){var e=Ut()(K.a.mark(function e(){return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,Gt()({path:a});case 5:e.t1=e.sent,(0,e.t0)(e.t1);case 7:return e.prev=7,m(!1),e.finish(7);case 10:case"end":return e.stop()}},e,null,[[1,,7,10]])}));return function(){return e.apply(this,arguments)}}();Object(w.useEffect)(function(){p()},[]);var g=function(){var e=Ut()(K.a.mark(function e(){return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.t0=o,e.next=5,Gt()({path:"".concat(a,"/close"),method:"post"});case 5:e.t1=e.sent,(0,e.t0)(e.t1),t=void 0,t=r.order?Object(v.sprintf)(Object(v.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),r.order.number):Object(v.__)("You have accepted the dispute.","woocommerce-payments"),u(t),Object(H.getHistory)().push(Object(X.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes"})),e.next=13;break;case 10:e.prev=10,e.t2=e.catch(1),h(Object(v.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments"));case 13:return e.prev=13,m(!1),e.finish(13);case 16:case"end":return e.stop()}var t},e,null,[[1,10,13,16]])}));return function(){return e.apply(this,arguments)}}();return Object(w.createElement)(ha,{isLoading:i,dispute:r,onAccept:g})},va=[{key:"general",title:Object(v.__)("General Evidence","woocommerce-payments"),description:Object(v.__)("Provide general evidence about the customer and the order.","woocommerce-payments"),fields:[{key:"product_description",label:Object(v.__)("Product Description","woocommerce-payments"),type:"textarea",description:Object(v.__)("A description of the product or service and any relevant details on how this was presented to the customer at the time of purchase.","woocommerce-payments")},{key:"customer_name",label:Object(v.__)("Customer Name","woocommerce-payments"),type:"text"},{key:"customer_email_address",label:Object(v.__)("Customer Email","woocommerce-payments"),type:"text"},{key:"customer_signature",label:Object(v.__)("Customer Signature","woocommerce-payments"),type:"file",description:Object(v.__)("A relevant document or contract showing the customer's signature (if available).","woocommerce-payments")},{key:"billing_address",label:Object(v.__)("Customer Billing Address","woocommerce-payments"),type:"textarea"},{key:"customer_purchase_ip",label:Object(v.__)("Customer IP Address","woocommerce-payments"),type:"text"},{key:"receipt",label:Object(v.__)("Receipt","woocommerce-payments"),type:"file",description:Object(v.__)("Any receipt or message sent to the customer notifying them of the charge. This field will be automatically filled with a Stripe generated email receipt if any such receipt was sent.","woocommerce-payments")},{key:"customer_communication",label:Object(v.__)("Customer Communication","woocommerce-payments"),type:"file",description:Object(v.__)("Any communication with the customer that you feel is relevant to your case (e.g. emails proving that they received the product or service, or demonstrating their use of or satisfaction with the product or service).","woocommerce-payments")}]},{key:"refund_policy_info",title:Object(v.__)("Refund Policy Info","woocommerce-payments"),fields:[{key:"refund_policy",label:Object(v.__)("Refund Policy","woocommerce-payments"),type:"file",description:Object(v.__)("Your refund policy, as shown or provided to the customer.","woocommerce-payments")},{key:"refund_policy_disclosure",label:Object(v.__)("Refund policy disclosure","woocommerce-payments"),type:"textarea",description:Object(v.__)("An explanation of how and when the customer was shown or provided your refund policy prior to purchase.","woocommerce-payments")},{key:"refund_refusal_explanation",label:Object(v.__)("Refund refusal explanation","woocommerce-payments"),type:"textarea",description:Object(v.__)("Your explanation for why the customer is not entitled to a refund.","woocommerce-payments")}],reason:"credit_not_processed"},{key:"duplicate_charge_info",title:Object(v.__)("Duplicate Charge Info","woocommerce-payments"),fields:[{key:"duplicate_charge_id",label:Object(v.__)("Duplicate charge ID","woocommerce-payments"),type:"text",description:Object(v.__)("The charge ID for the previous payment that appears to be a duplicate of the one that is disputed.","woocommerce-payments")},{key:"duplicate_charge_explanation",label:Object(v.__)("Explanation of duplicate charge","woocommerce-payments"),type:"textarea",description:Object(v.__)("An explanation of the difference between the disputed payment and the prior one that appears to be a duplicate.","woocommerce-payments")},{key:"duplicate_charge_documentation",label:Object(v.__)("Duplicate charge documentation","woocommerce-payments"),type:"file",description:Object(v.__)("Upload documentation for the prior payment that can uniquely identify it, such as a separate receipt. This document should be paired with a similar document from the disputed payment that proves the two are separate. This should also include a separate shipping label or receipt for the other payment. If multiple products were shipped together, provide a packing list that shows each purchase.","woocommerce-payments")},{key:"shipping_documentation",label:Object(v.__)("Shipping documentation","woocommerce-payments"),type:"file",description:Object(v.__)("A shipping label or receipt for the disputed payment.","woocommerce-payments"),denormalized:!0,productType:"physical_product"},{key:"service_documentation",label:Object(v.__)("Service documentation","woocommerce-payments"),type:"file",description:Object(v.__)("A copy of a service agreement or documentation for the disputed payment.","woocommerce-payments"),denormalized:!0,productType:"offline_service"}],reason:"duplicate"},{key:"shipping_information",title:Object(v.__)("Shipping Information","woocommerce-payments"),fields:[{key:"shipping_carrier",label:Object(v.__)("Shipping carrier","woocommerce-payments"),type:"text",description:Object(v.__)("The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.","woocommerce-payments")},{key:"shipping_tracking_number",label:Object(v.__)("Tracking number","woocommerce-payments"),type:"text",description:Object(v.__)("The tracking number (if available) for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. When we compile your evidence into a single document, these tracking numbers will be expanded to include detailed delivery information from the carrier.","woocommerce-payments")},{key:"shipping_documentation",label:Object(v.__)("Proof of shipping","woocommerce-payments"),type:"file",description:Object(v.__)("Provide documentation as proof that a product was shipped to the cardholder at the same address the cardholder provided to you. This could include a copy of the shipment receipt or label, and show the full shipping address of the cardholder, if possible.","woocommerce-payments")},{key:"shipping_date",label:Object(v.__)("Date of shipment","woocommerce-payments"),type:"text",description:Object(v.__)("The date on which a physical product began its route to the shipping address. This date should be prior to the date of the dispute.","woocommerce-payments")},{key:"shipping_address",label:Object(v.__)("Shipping Address","woocommerce-payments"),type:"textarea",description:Object(v.__)("The address to which a physical product was shipped. The shipping address must match a billing address verified with AVS. (A signature is not required as evidence of delivery).","woocommerce-payments")}],reason:["fraudulent","product_not_received","product_unacceptable","unrecognized"],productType:"physical_product"},{key:"cancellation_policy_info",title:Object(v.__)("Cancellation Policy Info","woocommerce-payments"),fields:[{key:"cancellation_policy",label:Object(v.__)("Cancellation Policy","woocommerce-payments"),type:"file",description:Object(v.__)("Your subscription cancellation policy, as shown to the customer.","woocommerce-payments")},{key:"cancellation_policy_disclosure",label:Object(v.__)("Cancellation policy disclosure","woocommerce-payments"),type:"textarea",description:Object(v.__)("An explanation of how and when the customer was shown your cancellation policy prior to purchase.","woocommerce-payments")},{key:"cancellation_rebuttal",label:Object(v.__)("Cancellation Rebuttal","woocommerce-payments"),type:"textarea",description:Object(v.__)("A justification for why the customer's subscription was not canceled.","woocommerce-payments")}],reason:"subscription_canceled"},{key:"download_and_activity_logs",title:Object(v.__)("Download and activity logs","woocommerce-payments"),fields:[{key:"access_activity_log",type:"file",description:[Object(v.__)("Provide at least two of the following pieces of information:","woocommerce-payments"),Object(v.__)("• Customer's IP address and their device's geographical location at the time of purchase","woocommerce-payments"),Object(v.__)("• Device ID and name of the device","woocommerce-payments"),Object(v.__)("• Customer name and email address linked to their customer profile","woocommerce-payments"),Object(v.__)("• Evidence that the customer logged into their account for your business before the transaction date","woocommerce-payments"),Object(v.__)("• Evidence that your website or app was accessed by the cardholder for purchase or services on or after the transaction date","woocommerce-payments"),Object(v.__)("• Evidence that the same device and card used in the disputed payment was used in a previous payment that was not disputed","woocommerce-payments")]}],reason:["fraudulent","product_not_received"],productType:"digital_product_or_service"},{key:"download_and_activity_logs",title:Object(v.__)("Download and activity logs","woocommerce-payments"),fields:[{key:"access_activity_log",type:"file",description:Object(v.__)("Any server or activity logs showing proof that the cardholder accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.","woocommerce-payments")}],reason:["product_unacceptable","subscription_canceled","unrecognized"],productType:"digital_product_or_service",denormalized:!0},{key:"service_details",title:Object(v.__)("Service details","woocommerce-payments"),fields:[{key:"service_date",label:Object(v.__)("Service date","woocommerce-payments"),type:"text",description:Object(v.__)("The date on which the cardholder received or began receiving the purchased service.","woocommerce-payments")},{key:"service_documentation",label:Object(v.__)("Proof of service","woocommerce-payments"),type:"file",description:Object(v.__)("Documentation showing proof that a service was provided to the cardholder. This could include a copy of a signed contract, work order, or other form of written agreement.","woocommerce-payments")}],reason:["fraudulent","product_not_received","product_unacceptable","subscription_canceled","unrecognized"],productType:"offline_service"},{key:"uncategorized",title:Object(v.__)("Additional Details","woocommerce-payments"),description:Object(v.__)("Provide any extra evidence or statements you'd like the bank to see, either as text or by uploading a document.","woocommerce-payments"),fields:[{key:"uncategorized_text",label:Object(v.__)("Additional Details","woocommerce-payments"),type:"textarea"},{key:"uncategorized_file",type:"file"}]}],ga=function(e){var t=e.fileName,a=e.field,c=e.disabled,n=e.isDone,r=e.isLoading,o=e.accept,l=e.error,s=e.onFileChange,i=e.onFileRemove,m=e.help,d=l&&l.length>0;return Object(w.createElement)(b.BaseControl,{id:"form-file-upload-base-control-".concat(a.key),label:a.label,help:m},Object(w.createElement)("div",{className:"file-upload"},Object(w.createElement)(b.FormFileUpload,{id:"form-file-upload-".concat(a.key),className:n&&!d?"is-success":null,isLarge:!0,isPrimary:!0,isDestructive:d,isBusy:r,disabled:c||r,icon:Object(w.createElement)(qe.a,{icon:n&&!d?"checkmark":"add-outline",size:18}),accept:o,onChange:function(e){return s(a.key,e.target.files[0])}},Object(v.__)("Upload File","woocommerce-payments")),d?Object(w.createElement)("span",{className:"upload-message is-destructive"},l):Object(w.createElement)("span",{className:"upload-message"},t),n&&!c?Object(w.createElement)(b.IconButton,{className:"delete-uploaded-file-button",icon:Object(w.createElement)(qe.a,{icon:"trash",size:18}),onClick:function(){return i(a.key)}}):null))},wa=function(e){return Array.isArray(e)?Object(I.flatten)(e.map(function(e,t){return[e,Object(w.createElement)("br",{key:t})]})):e},fa=function(e){var t=e.fields,a=e.evidence,c=e.onChange,n=e.onFileChange,r=e.onFileRemove,o=e.onSave,l=e.readOnly;if(!t||!t.length)return null;var s=function(e){return{label:e.label,value:a[e.key]||"",onChange:function(t){return c(e.key,t)},disabled:l,help:wa(e.description)}},i=function(e){switch(e.type){case"file":return Object(w.createElement)(ga,ot()({key:e.key},function(e){var t=a.metadata&&a.metadata[e.key]||"",c=a.isUploading&&(a.isUploading[e.key]||!1),o=a.uploadingErrors&&(a.uploadingErrors[e.key]||""),s=!c&&t.length>0;return{field:e,fileName:t,accept:".pdf, image/png, image/jpeg",onFileChange:n,onFileRemove:r,disabled:l,isLoading:c,isDone:s,error:o,help:wa(e.description)}}(e)));case"text":return Object(w.createElement)(b.TextControl,ot()({key:e.key},s(e)));default:return Object(w.createElement)(b.TextareaControl,ot()({key:e.key},s(e)))}},m=t.map(function(e){return Object(w.createElement)(f.Card,{key:e.key,title:e.title},e.description&&Object(w.createElement)("p",null,e.description),e.fields.map(i))}),d=Object(v.__)("Are you sure you're ready to submit this evidence? Evidence submissions are final.","woocommerce-payments");return Object(w.createElement)(w.Fragment,null,m,l?null:Object(w.createElement)(f.Card,null,Object(w.createElement)("p",null,Object(v.__)("When you submit your evidence, we'll format it and send it to the cardholder's bank, then email you once the dispute has been decided.","woocommerce-payments")),Object(w.createElement)("p",null,Object(w.createElement)("strong",null,Object(v.__)("Evidence submission is final.","woocommerce-payments"))," ",Object(v.__)("You can also save this evidence for later instead of submitting it immediately.","woocommerce-payments")," ",Object(w.createElement)("strong",null,Object(v.__)("We will automatically submit any saved evidence at the due date.","woocommerce-payments"))),Object(w.createElement)(ca,null,Object(w.createElement)(b.Button,{isPrimary:!0,isLarge:!0,onClick:function(){return window.confirm(d)&&o(!0)}},Object(v.__)("Submit Evidence","woocommerce-payments")),Object(w.createElement)(b.Button,{isDefault:!0,isLarge:!0,onClick:function(){return o(!1)}},Object(v.__)("Save For Later","woocommerce-payments")))))},ba=function(e){var t=e.isLoading,a=e.dispute,c=void 0===a?{}:a,n=e.productType,r=e.onChangeProductType,o=st()(e,["isLoading","dispute","productType","onChangeProductType"]),l=c&&"needs_response"!==c.status&&"warning_needs_response"!==c.status,s=!t&&c.id;return t||s?Object(w.createElement)(E,{isNarrow:!0,className:"wcpay-dispute-evidence"},Object(w.createElement)(f.Card,{title:Object(w.createElement)(dt,{isLoading:t,value:Object(v.__)("Challenge Dispute","woocommerce-payments")})},Object(w.createElement)(da,{dispute:c,isLoading:t})),Object(w.createElement)(f.Card,{title:Object(w.createElement)(dt,{isLoading:t,value:Object(v.__)("Product Type","woocommerce-payments")})},Object(w.createElement)(mt,{isLoading:t,numLines:2},Object(w.createElement)(b.SelectControl,{value:n,onChange:r,options:[{label:Object(v.__)("Select one…","woocommerce-payments"),disabled:!0,value:""},{label:Object(v.__)("Physical product","woocommerce-payments"),value:"physical_product"},{label:Object(v.__)("Digital product or service","woocommerce-payments"),value:"digital_product_or_service"},{label:Object(v.__)("Offline service","woocommerce-payments"),value:"offline_service"},{label:Object(v.__)("Multiple product types","woocommerce-payments"),value:"multiple"}],disabled:l}))),!t&&Object(w.createElement)(fa,ot()({},o,{readOnly:l}))):Object(w.createElement)(E,{isNarrow:!0,className:"wcpay-dispute-details"},Object(w.createElement)("div",null,Object(v.__)("Dispute not loaded","woocommerce-payments")))},ya=function(e){var t=e.query,a="/wc/v3/payments/disputes/".concat(t.id),c=Object(w.useState)(),n=Qt()(c,2),r=n[0],o=n[1],l=Object(w.useState)(!1),s=Qt()(l,2),i=s[0],m=s[1],d=Object(w.useState)({}),u=Qt()(d,2),h=u[0],p=u[1],g=Object(N.useDispatch)("core/notices"),f=g.createSuccessNotice,b=g.createErrorNotice,y=g.createInfoNotice,E=function(){var e=Ut()(K.a.mark(function e(){var t,c;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.next=4,Gt()({path:a});case 4:t=e.sent,c=t&&t.evidence||{},o(t),p(c);case 8:return e.prev=8,m(!1),e.finish(8);case 11:case"end":return e.stop()}},e,null,[[1,,8,11]])}));return function(){return e.apply(this,arguments)}}();Object(w.useEffect)(function(){E()},[]);var _=function(e,t){return p(function(a){return V()({},a,R()({},e,t))})},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(function(t){return Object(I.merge)({},t,e)})},C=function(){var e=Ut()(K.a.mark(function e(t,a){var c,n;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return");case 2:return(c=new FormData).append("file",a),c.append("purpose","dispute_evidence"),O({isUploading:R()({},t,!0),uploadingErrors:R()({},t,"")}),_(t,""),e.prev=7,e.next=10,Gt()({path:"/wc/v3/payments/file",method:"post",body:c});case 10:n=e.sent,O({metadata:R()({},t,n.filename),isUploading:R()({},t,!1)}),_(t,n.id),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(7),O({isUploading:R()({},t,!1),uploadingErrors:R()({},t,e.t0.message)}),_(t,"");case 19:case"end":return e.stop()}},e,null,[[7,15]])}));return function(t,a){return e.apply(this,arguments)}}(),k=function(e){var t=e?Object(v.__)("Evidence submitted!","woocommerce-payments"):Object(v.__)("Evidence saved!","woocommerce-payments"),a=Object(X.addQueryArgs)("admin.php",{page:"wc-admin",path:"/payments/disputes"});f(t),Object(H.getHistory)().push(a)},j=function(e){var t=e?Object(v.__)("Failed to submit evidence!","woocommerce-payments"):Object(v.__)("Failed to save evidence!","woocommerce-payments");b(t)},z=function(){var e=Ut()(K.a.mark(function e(t){var c,n;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(I.some)(r.isUploading)){e.next=3;break}return y(Object(v.__)("Please wait until file upload is finished"),"woocommerce-payments"),e.abrupt("return");case 3:return m(!0),e.prev=4,c=r.metadata,e.next=8,Gt()({path:a,method:"post",data:{evidence:h,metadata:c,submit:t}});case 8:n=e.sent,o(n),k(t),p({}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),j(t);case 17:return e.prev=17,m(!1),e.finish(17);case 20:case"end":return e.stop()}},e,null,[[4,14,17,20]])}));return function(t){return e.apply(this,arguments)}}(),x=function(e){if(!e)return"";var t=e.metadata.__product_type||"";return!t&&e.evidence_details&&e.evidence_details.has_evidence&&(t="multiple"),t}(r),M=Object(w.useMemo)(function(){return function(e,t){return e&&t?"multiple"===t?va.map(function(e){return e.denormalized?null:V()({},e,{fields:e.fields.filter(function(e){return!e.denormalized})})}).filter(Boolean):va.map(function(a){var c=a.reason&&!Object(I.includes)(a.reason,e),n=a.productType&&a.productType!==t;if(c||n)return null;var r=a.fields.filter(function(e){return!e.productType||e.productType===t});return V()({},a,{fields:r})}).filter(Boolean):[]}(r&&r.reason,x)},[r&&r.reason,x]);return Object(w.createElement)(ba,{isLoading:i,dispute:r,evidence:r?V()({},r.evidence,{},h,{metadata:r.metadata||{},isUploading:r.isUploading||{},uploadingErrors:r.uploadingErrors||{}}):{},onChange:_,onFileChange:C,onFileRemove:function(e){_(e,""),O({metadata:R()({},e,""),uploadingErrors:R()({},e,"")})},onSave:z,productType:x,onChangeProductType:function(e){return O({metadata:R()({},"__product_type",e)})},fields:M})},Ea={transactions:Object(v.__)("Viewing test transactions. To view live transactions, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),paymentDetails:Object(v.__)("Test payment:","woocommerce-payments"),deposits:Object(v.__)("Viewing test deposits. To view live deposits, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),depositDetails:Object(v.__)("Test deposit:","woocommerce-payments"),disputes:Object(v.__)("Viewing test disputes. To view live disputes, disable test mode in WooCommerce Payments settings.","woocommerce-payments"),disputeDetails:Object(v.__)("Test dispute:","woocommerce-payments")},_a=[Ea.paymentDetails,Ea.disputeDetails,Ea.depositDetails],Oa=function(e){var t=Object(w.createElement)("a",{href:Object(X.addQueryArgs)("admin.php",{page:"wc-settings",tab:"checkout",section:"woocommerce_payments"})},Object(v.__)("View WooCommerce Payments settings.","woocommerce-payments"));return _a.includes(e)?Object(w.createElement)("span",null,Object(w.createElement)("b",null,e)," ",function(e){return Object(v._n)("WooCommerce Payments was in test mode when this order was placed.","WooCommerce Payments was in test mode when these orders were placed.",Ea.depositDetails===e?2:1,"woocommerce-payments")}(e)," ",t):Object(w.createElement)("span",null,e," ",t)},Ca=function(e,t){return function(a,c){return Object(w.createElement)("div",null,function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"undefined"==typeof wcpaySettings?e:"1"===wcpaySettings.testMode||e}()?(n=t,Object(w.createElement)(b.Notice,{className:"wcpay-test-mode-notice",status:"warning",isDismissible:!1},Oa(n))):null,e(a,c));var n}};Object(g.addFilter)("woocommerce_admin_pages_list","woocommerce-payments",function(e){var t,a=(t=document.querySelector("#toplevel_page_wc-admin-path--payments-connect")?"connect":"deposits",{menuID:"toplevel_page_wc-admin-path--payments-".concat(t),rootLink:["/payments/".concat(t),Object(v.__)("Payments","woocommerce-payments")]}),c=a.menuID,n=a.rootLink;return e.push({container:O,path:"/payments/connect",wpOpenMenu:c,breadcrumbs:[n,Object(v.__)("Connect","woocommerce-payments")]}),e.push({container:Ca(We,Ea.deposits),path:"/payments/deposits",wpOpenMenu:c,breadcrumbs:[n,Object(v.__)("Deposits","woocommerce-payments")]}),e.push({container:Ca(vt,Ea.depositDetails),path:"/payments/deposits/details",wpOpenMenu:c,breadcrumbs:[n,["/payments/deposits",Object(v.__)("Deposits","woocommerce-payments")],Object(v.__)("Deposit Details","woocommerce-payments")]}),e.push({container:Ca(nt,Ea.transactions),path:"/payments/transactions",wpOpenMenu:c,breadcrumbs:[n,Object(v.__)("Transactions","woocommerce-payments")]}),e.push({container:Ca(qt,Ea.paymentDetails),path:"/payments/transactions/details",wpOpenMenu:c,breadcrumbs:[n,["/payments/transactions",Object(v.__)("Transactions","woocommerce-payments")],Object(v.__)("Payment Details","woocommerce-payments")]}),e.push({container:Ca(aa,Ea.disputes),path:"/payments/disputes",wpOpenMenu:c,breadcrumbs:[n,Object(v.__)("Disputes","woocommerce-payments")]}),e.push({container:Ca(pa,Ea.disputeDetails),path:"/payments/disputes/details",wpOpenMenu:c,breadcrumbs:[n,["/payments/disputes",Object(v.__)("Disputes","woocommerce-payments")],Object(v.__)("Dispute Details","woocommerce-payments")]}),e.push({container:Ca(ya,Ea.disputeDetails),path:"/payments/disputes/challenge",wpOpenMenu:c,breadcrumbs:[n,["/payments/disputes",Object(v.__)("Disputes","woocommerce-payments")],Object(v.__)("Challenge Dispute","woocommerce-payments")]}),e})},function(e,t,a){"use strict";function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var a=[],c=!0,n=!1,r=void 0;try{for(var o,l=e[Symbol.iterator]();!(c=(o=l.next()).done)&&(a.push(o.value),!t||a.length!==t);c=!0);}catch(e){n=!0,r=e}finally{try{c||null==l.return||l.return()}finally{if(n)throw r}}return a}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return function(e){if(Array.isArray(e)){for(var t=0,a=new Array(e.length);t<e.length;t++)a[t]=e[t];return a}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var o,l,s,i,m=a(10),d=/<(\/)?(\w+)\s*(\/)?>/g;function u(e,t,a,c,n){return{element:e,tokenStart:t,tokenLength:a,prevOffset:c,leadingTextStart:n,children:[]}}var h=function(e){var t="object"===n(e),a=t&&Object.values(e);return t&&a.length&&a.every(function(e){return Object(m.isValidElement)(e)})};function p(e){var t=function(){var e=d.exec(o);if(null===e)return["no-more-tokens"];var t=e.index,a=c(e,4),n=a[0],r=a[1],l=a[2],s=a[3],i=n.length;if(s)return["self-closed",l,t,i];if(r)return["closer",l,t,i];return["opener",l,t,i]}(),a=c(t,4),n=a[0],h=a[1],p=a[2],w=a[3],f=i.length,b=p>l?l:null;if(!e[h])return v(),!1;switch(n){case"no-more-tokens":if(0!==f){var y=i.pop(),E=y.leadingTextStart,_=y.tokenStart;s.push(o.substr(E,_))}return v(),!1;case"self-closed":return 0===f?(null!==b&&s.push(o.substr(b,p-b)),s.push(e[h]),l=p+w,!0):(g(new u(e[h],p,w)),l=p+w,!0);case"opener":return i.push(new u(e[h],p,w,p+w,b)),l=p+w,!0;case"closer":if(1===f)return function(e){var t=i.pop(),a=t.element,c=t.leadingTextStart,n=t.prevOffset,l=t.tokenStart,d=t.children,u=e?o.substr(n,e-n):o.substr(n);u&&d.push(u);null!==c&&s.push(o.substr(c,l-c));s.push(m.cloneElement.apply(void 0,[a,null].concat(r(d))))}(p),l=p+w,!0;var O=i.pop(),C=o.substr(O.prevOffset,p-O.prevOffset);O.children.push(C),O.prevOffset=p+w;var k=new u(O.element,O.tokenStart,O.tokenLength,p+w);return k.children=O.children,g(k),l=p+w,!0;default:return v(),!1}}function v(){var e=o.length-l;0!==e&&s.push(o.substr(l,e))}function g(e){var t=e.element,a=e.tokenStart,c=e.tokenLength,n=e.prevOffset,l=e.children,s=i[i.length-1],d=o.substr(s.prevOffset,a-s.prevOffset);d&&s.children.push(d),s.children.push(m.cloneElement.apply(void 0,[t,null].concat(r(l)))),s.prevOffset=n||a+c}t.a=function(e,t){if(o=e,l=0,s=[],i=[],d.lastIndex=0,!h(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(p(t));return m.createElement.apply(void 0,[m.Fragment,null].concat(r(s)))}}]));
dist/settings.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('moment', 'react', 'react-dom', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'e3d34911c3dd93fc94b0d88875defcba');
dist/settings.css ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Colors
3
+ */
4
+ /**
5
+ * Often re-used variables
6
+ */
7
+ /**
8
+ * Breakpoint mixins
9
+ */
10
+ /**
11
+ * Long content fade mixin
12
+ *
13
+ * Creates a fading overlay to signify that the content is longer
14
+ * than the space allows.
15
+ */
16
+ /**
17
+ * Button states and focus styles
18
+ */
19
+ /**
20
+ * Applies editor left position to the selector passed as argument
21
+ */
22
+ /**
23
+ * Applies editor right position to the selector passed as argument
24
+ */
25
+ /**
26
+ * Styles that are reused verbatim in a few places
27
+ */
28
+ /**
29
+ * Allows users to opt-out of animations via OS-level preferences.
30
+ */
31
+ /**
32
+ * Reset default styles for JavaScript UI based pages.
33
+ * This is a WP-admin agnostic reset
34
+ */
35
+ /**
36
+ * Reset the WP Admin page styles for Gutenberg-like pages.
37
+ */
38
+ /**
39
+ * Breakpoints & Media Queries
40
+ */
41
+ /** @format */
42
+ /**
43
+ * Colors
44
+ */
45
+ /** @format */
46
+ /* stylelint-disable block-closing-brace-newline-after */
47
+ /** @format */
48
+ /** @format */
49
+ .chip {
50
+ font-size: 14px;
51
+ font-size: 0.875rem;
52
+ display: inline-block;
53
+ padding: 0.25rem 0.75rem;
54
+ border-radius: 1rem;
55
+ white-space: nowrap; }
56
+ .chip.chip-primary {
57
+ background: #c5d9ed;
58
+ color: #043959; }
59
+ .chip.chip-light {
60
+ background: #dcdcde;
61
+ color: #2c3338; }
62
+ .chip.chip-alert {
63
+ background: #facfd2;
64
+ color: #691c1c; }
65
+ .chip.chip-warning {
66
+ background: #f5e1b3;
67
+ color: #907300; }
68
+ .chip.is-compact {
69
+ padding: 0.06rem 0.65rem 0.1rem; }
70
+
71
+ /**
72
+ * Colors
73
+ */
74
+ /**
75
+ * Often re-used variables
76
+ */
77
+ /**
78
+ * Breakpoint mixins
79
+ */
80
+ /**
81
+ * Long content fade mixin
82
+ *
83
+ * Creates a fading overlay to signify that the content is longer
84
+ * than the space allows.
85
+ */
86
+ /**
87
+ * Button states and focus styles
88
+ */
89
+ /**
90
+ * Applies editor left position to the selector passed as argument
91
+ */
92
+ /**
93
+ * Applies editor right position to the selector passed as argument
94
+ */
95
+ /**
96
+ * Styles that are reused verbatim in a few places
97
+ */
98
+ /**
99
+ * Allows users to opt-out of animations via OS-level preferences.
100
+ */
101
+ /**
102
+ * Reset default styles for JavaScript UI based pages.
103
+ * This is a WP-admin agnostic reset
104
+ */
105
+ /**
106
+ * Reset the WP Admin page styles for Gutenberg-like pages.
107
+ */
108
+ /**
109
+ * Breakpoints & Media Queries
110
+ */
111
+ /** @format */
112
+ /**
113
+ * Colors
114
+ */
115
+ /** @format */
116
+ /* stylelint-disable block-closing-brace-newline-after */
117
+ /** @format */
118
+ .account-status__info {
119
+ margin-left: 1.6rem; }
120
+ .account-status__info .account-status__info__green {
121
+ fill: #008a20;
122
+ color: #008a20; }
123
+ .account-status__info .account-status__info__red {
124
+ fill: #b32d2e;
125
+ color: #b32d2e; }
126
+ .account-status__info svg {
127
+ margin: 0 0.2rem;
128
+ position: relative;
129
+ top: 4px; }
130
+
131
+ .account-status__desc {
132
+ margin-top: 1rem;
133
+ font-style: italic; }
134
+
dist/settings.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(this,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=56)}([function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.element}()},,,,,function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){!function(){e.exports=this.moment}()},,,function(e,t){!function(){e.exports=this.React}()},,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=(n(24),["primary","light","warning","alert"]);t.a=function(e){var t=e.message,n=e.type,c=e.isCompact,a=["chip","chip-".concat(o.find(function(e){return e===n})||"primary"),c?"is-compact":""];return Object(r.createElement)("span",{className:a.join(" ").trim()},t)}},,function(e,t){!function(){e.exports=this.wp.hooks}()},,,function(e,t,n){},,function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,c=(e.icon,e.className),i=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-checkmark-circle",c,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:s,height:n,width:n,onClick:o},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})))};var o,c=n(10),a=(o=c)&&o.__esModule?o:{default:o};e.exports=t.default},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,o=void 0===n?24:n,c=e.onClick,i=(e.icon,e.className),s=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-notice",i,(t=o,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:u,height:o,width:o,onClick:c},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})))};var o,c=n(10),a=(o=c)&&o.__esModule?o:{default:o};e.exports=t.default},,function(e,t,n){var r=n(50),o=n(51),c=n(52);e.exports=function(e){return r(e)||o(e)||c()}},function(e,t){!function(){e.exports=this.ReactDOM}()},,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){},,function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a,i,s,u,l=n(10),f=/<(\/)?(\w+)\s*(\/)?>/g;function m(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var p=function(e){var t="object"===o(e),n=t&&Object.values(e);return t&&n.length&&n.every(function(e){return Object(l.isValidElement)(e)})};function d(e){var t=function(){var e=f.exec(a);if(null===e)return["no-more-tokens"];var t=e.index,n=r(e,4),o=n[0],c=n[1],i=n[2],s=n[3],u=o.length;if(s)return["self-closed",i,t,u];if(c)return["closer",i,t,u];return["opener",i,t,u]}(),n=r(t,4),o=n[0],p=n[1],d=n[2],h=n[3],v=u.length,_=d>i?i:null;if(!e[p])return b(),!1;switch(o){case"no-more-tokens":if(0!==v){var j=u.pop(),O=j.leadingTextStart,w=j.tokenStart;s.push(a.substr(O,w))}return b(),!1;case"self-closed":return 0===v?(null!==_&&s.push(a.substr(_,d-_)),s.push(e[p]),i=d+h,!0):(y(new m(e[p],d,h)),i=d+h,!0);case"opener":return u.push(new m(e[p],d,h,d+h,_)),i=d+h,!0;case"closer":if(1===v)return function(e){var t=u.pop(),n=t.element,r=t.leadingTextStart,o=t.prevOffset,i=t.tokenStart,f=t.children,m=e?a.substr(o,e-o):a.substr(o);m&&f.push(m);null!==r&&s.push(a.substr(r,i-r));s.push(l.cloneElement.apply(void 0,[n,null].concat(c(f))))}(d),i=d+h,!0;var g=u.pop(),E=a.substr(g.prevOffset,d-g.prevOffset);g.children.push(E),g.prevOffset=d+h;var x=new m(g.element,g.tokenStart,g.tokenLength,d+h);return x.children=g.children,y(x),i=d+h,!0;default:return b(),!1}}function b(){var e=a.length-i;0!==e&&s.push(a.substr(i,e))}function y(e){var t=e.element,n=e.tokenStart,r=e.tokenLength,o=e.prevOffset,i=e.children,s=u[u.length-1],f=a.substr(s.prevOffset,n-s.prevOffset);f&&s.children.push(f),s.children.push(l.cloneElement.apply(void 0,[t,null].concat(c(i)))),s.prevOffset=o||n+r}t.a=function(e,t){if(a=e,i=0,s=[],u=[],f.lastIndex=0,!p(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(d(t));return l.createElement.apply(void 0,[l.Fragment,null].concat(c(s)))}},function(e,t,n){"use strict";n.r(t);var r=n(29),o=n.n(r),c=n(1),a=(n(10),n(30)),i=n.n(a),s=n(21),u=n(0),l=n(6),f=n(7),m=n.n(f),p=n(55),d=n(26),b=n.n(d),y=n(27),h=n.n(y),v=n(19),_=(n(53),function(e){var t,n,r,o=e.accountStatus;return o.error?Object(c.createElement)("div",null,Object(u.__)("Error determining the connection status.")):Object(c.createElement)("div",null,Object(c.createElement)("div",null,(t=o.status,n=Object(u.__)("Unknown","woocommerce-payments"),r="light","complete"===t?(n=Object(u.__)("Complete","woocommerce-payments"),r="primary"):"restricted_soon"===t?(n=Object(u.__)("Restricted Soon","woocommerce-payments"),r="warning"):"restricted"===t?(n=Object(u.__)("Restricted","woocommerce-payments"),r="alert"):t.startsWith("rejected")&&(n=Object(u.__)("Rejected","woocommerce-payments"),r="light"),Object(c.createElement)(v.a,{message:n,type:r,isCompact:!0})),function(e){var t,n,r;return e?(n=Object(u.__)("Enabled","woocommerce-payments"),r=Object(c.createElement)(b.a,{size:18}),t="account-status__info__green"):(n=Object(u.__)("Disabled","woocommerce-payments"),r=Object(c.createElement)(h.a,{size:18}),t="account-status__info__red"),Object(c.createElement)("span",{className:"account-status__info"},Object(u.__)("Payments:","woocommerce-payments"),Object(c.createElement)("span",{className:t},r,n))}(o.paymentsEnabled),function(e){var t,n="account-status__info__green",r=Object(c.createElement)(b.a,{size:18});return"disabled"===e?(t=Object(u.__)("Disabled","woocommerce-payments"),n="account-status__info__red",r=Object(c.createElement)(h.a,{size:18})):t="daily"===e?Object(u.__)("Daily","woocommerce-payments"):"weekly"===e?Object(u.__)("Weekly","woocommerce-payments"):"monthly"===e?Object(u.__)("Monthly","woocommerce-payments"):"manual"===e?Object(u.__)("Manual","woocommerce-payments"):Object(u.__)("Unknown","woocommerce-payments"),Object(c.createElement)("span",{className:"account-status__info"},Object(u.__)("Deposits:","woocommerce-payments"),Object(c.createElement)("span",{className:n},r,t))}(o.depositsStatus)),function(e){var t=e.status,n=e.currentDeadline,r=e.accountLink;if("complete"===t)return"";var o="";return"restricted_soon"===t?o=Object(p.a)(Object(u.sprintf)(Object(u.__)("To avoid disrupting deposits, <a>update this account</a> by %s with more information about the business.","woocommerce-payments"),Object(l.dateI18n)("ga M j, Y",m()(1e3*n))),{a:Object(c.createElement)("a",{href:r})}):"restricted"===t&&(o=Object(p.a)(Object(u.__)("Payments and deposits are disabled for this account until missing business information is updated. <a>Update now</a>","woocommerce-payments"),{a:Object(c.createElement)("a",{href:r})})),"rejected.fraud"===t?o=Object(u.__)("This account has been rejected because of suspected fraudulent activity.","woocommerce-payments"):"rejected.terms_of_service"===t?o=Object(u.__)("This account has been rejected due to a Terms of Service violation.","woocommerce-payments"):t.startsWith("rejected")&&(o=Object(u.__)("This account has been rejected.","woocommerce-payments")),o?Object(c.createElement)("div",{className:"account-status__desc"},o):""}(o))});Object(s.addFilter)("woocommerce_admin_notices_to_show","plugin-domain",function(e){return[].concat(o()(e),[["wcpay-test-mode-notice",null,null],[null,["wcpay-settings-notice"],null]])}),i.a.render(Object(c.createElement)(_,wcpayAdminSettings),document.getElementById("wcpay-account-status-container"))}]));
includes/admin/class-wc-payments-admin.php ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Set up top-level menus for WCPay.
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * WC_Payments_Admin Class.
12
+ */
13
+ class WC_Payments_Admin {
14
+
15
+ /**
16
+ * WCPay Gateway instance to get information regarding WooCommerce Payments setup.
17
+ *
18
+ * @var WC_Payment_Gateway_WCPay
19
+ */
20
+ private $wcpay_gateway;
21
+
22
+ /**
23
+ * WC_Payments_Account instance to get information about the account
24
+ *
25
+ * @var WC_Payments_Account
26
+ */
27
+ private $account;
28
+
29
+ /**
30
+ * Hook in admin menu items.
31
+ *
32
+ * @param WC_Payment_Gateway_WCPay $gateway WCPay Gateway instance to get information regarding WooCommerce Payments setup.
33
+ * @param WC_Payments_Account $account Account instance.
34
+ */
35
+ public function __construct( WC_Payment_Gateway_WCPay $gateway, WC_Payments_Account $account ) {
36
+ $this->wcpay_gateway = $gateway;
37
+ $this->account = $account;
38
+
39
+ // Add menu items.
40
+ add_action( 'admin_menu', array( $this, 'add_payments_menu' ), 9 );
41
+ add_action( 'init', array( $this, 'register_payments_scripts' ) );
42
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_payments_scripts' ) );
43
+ }
44
+
45
+ /**
46
+ * Add payments menu items.
47
+ */
48
+ public function add_payments_menu() {
49
+ global $submenu;
50
+
51
+ try {
52
+ $stripe_connected = $this->account->try_is_stripe_connected();
53
+ } catch ( Exception $e ) {
54
+ // do not render the menu if the server is unreachable.
55
+ return;
56
+ }
57
+
58
+ $top_level_link = $stripe_connected ? '/payments/deposits' : '/payments/connect';
59
+
60
+ wc_admin_register_page(
61
+ array(
62
+ 'id' => 'wc-payments',
63
+ 'title' => __( 'Payments', 'woocommerce-payments' ),
64
+ 'capability' => 'manage_woocommerce',
65
+ 'path' => $top_level_link,
66
+ 'position' => '55.7', // After WooCommerce & Product menu items.
67
+ )
68
+ );
69
+
70
+ if ( $stripe_connected ) {
71
+ wc_admin_register_page(
72
+ array(
73
+ 'id' => 'wc-payments-deposits',
74
+ 'title' => __( 'Deposits', 'woocommerce-payments' ),
75
+ 'parent' => 'wc-payments',
76
+ 'path' => '/payments/deposits',
77
+ )
78
+ );
79
+
80
+ wc_admin_register_page(
81
+ array(
82
+ 'id' => 'wc-payments-transactions',
83
+ 'title' => __( 'Transactions', 'woocommerce-payments' ),
84
+ 'parent' => 'wc-payments',
85
+ 'path' => '/payments/transactions',
86
+ )
87
+ );
88
+
89
+ wc_admin_register_page(
90
+ array(
91
+ 'id' => 'wc-payments-disputes',
92
+ 'title' => __( 'Disputes', 'woocommerce-payments' ),
93
+ 'parent' => 'wc-payments',
94
+ 'path' => '/payments/disputes',
95
+ )
96
+ );
97
+
98
+ wc_admin_connect_page(
99
+ array(
100
+ 'id' => 'woocommerce-settings-payments-woocommerce-payments',
101
+ 'parent' => 'woocommerce-settings-payments',
102
+ 'screen_id' => 'woocommerce_page_wc-settings-checkout-woocommerce_payments',
103
+ 'title' => __( 'WooCommerce Payments', 'woocommerce-payments' ),
104
+ )
105
+ );
106
+ // Add the Settings submenu directly to the array, it's the only way to make it link to an absolute URL.
107
+ $submenu_keys = array_keys( $submenu );
108
+ $last_submenu_key = $submenu_keys[ count( $submenu ) - 1 ];
109
+ $submenu[ $last_submenu_key ][] = array( // PHPCS:Ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
110
+ __( 'Settings', 'woocommerce' ), // PHPCS:Ignore WordPress.WP.I18n.TextDomainMismatch
111
+ 'manage_woocommerce',
112
+ admin_url(
113
+ add_query_arg(
114
+ array(
115
+ 'page' => 'wc-settings',
116
+ 'tab' => 'checkout',
117
+ 'section' => WC_Payment_Gateway_WCPay::GATEWAY_ID,
118
+ ),
119
+ 'admin.php'
120
+ )
121
+ ),
122
+ );
123
+
124
+ // Temporary fix to settings menu disappearance is to register the page after settings menu has been manually added.
125
+ // TODO: More robust solution is to be implemented by https://github.com/Automattic/woocommerce-payments/issues/231.
126
+ wc_admin_register_page(
127
+ array(
128
+ 'id' => 'wc-payments-deposit-details',
129
+ 'title' => __( 'Deposit Details', 'woocommerce-payments' ),
130
+ 'parent' => 'wc-payments-transactions', // Not (top level) deposits, as workaround for showing up as submenu page.
131
+ 'path' => '/payments/deposits/details',
132
+ )
133
+ );
134
+ wc_admin_register_page(
135
+ array(
136
+ 'id' => 'wc-payments-transaction-details',
137
+ 'title' => __( 'Payment Details', 'woocommerce-payments' ),
138
+ 'parent' => 'wc-payments-transactions',
139
+ 'path' => '/payments/transactions/details',
140
+ )
141
+ );
142
+ wc_admin_register_page(
143
+ array(
144
+ 'id' => 'wc-payments-disputes-details',
145
+ 'title' => __( 'Dispute Details', 'woocommerce-payments' ),
146
+ 'parent' => 'wc-payments-disputes',
147
+ 'path' => '/payments/disputes/details',
148
+ )
149
+ );
150
+ wc_admin_register_page(
151
+ array(
152
+ 'id' => 'wc-payments-disputes-challenge',
153
+ 'title' => __( 'Challenge Dispute', 'woocommerce-payments' ),
154
+ 'parent' => 'wc-payments-disputes-details',
155
+ 'path' => '/payments/disputes/challenge',
156
+ )
157
+ );
158
+ }
159
+
160
+ wp_enqueue_style(
161
+ 'wcpay-admin-css',
162
+ plugins_url( 'assets/css/admin.css', WCPAY_PLUGIN_FILE ),
163
+ array(),
164
+ WC_Payments::get_file_version( 'assets/css/admin.css' )
165
+ );
166
+ }
167
+
168
+ /**
169
+ * Register the CSS and JS scripts
170
+ */
171
+ public function register_payments_scripts() {
172
+ $script_src_url = plugins_url( 'dist/index.js', WCPAY_PLUGIN_FILE );
173
+ $script_asset_path = WCPAY_ABSPATH . 'dist/index.asset.php';
174
+ $script_asset = file_exists( $script_asset_path ) ? require_once $script_asset_path : null;
175
+ wp_register_script(
176
+ 'WCPAY_DASH_APP',
177
+ $script_src_url,
178
+ $script_asset['dependencies'],
179
+ WC_Payments::get_file_version( 'dist/index.js' ),
180
+ true
181
+ );
182
+
183
+ // Has on-boarding been disabled? Set the flag for use in the front-end so messages and notices can be altered
184
+ // as appropriate.
185
+ $on_boarding_disabled = WC_Payments_Account::is_on_boarding_disabled();
186
+
187
+ wp_localize_script(
188
+ 'WCPAY_DASH_APP',
189
+ 'wcpaySettings',
190
+ array(
191
+ 'connectUrl' => WC_Payments_Account::get_connect_url(),
192
+ 'testMode' => $this->wcpay_gateway->is_in_test_mode(),
193
+ 'onBoardingDisabled' => $on_boarding_disabled,
194
+ )
195
+ );
196
+
197
+ wp_register_style(
198
+ 'WCPAY_DASH_APP',
199
+ plugins_url( 'dist/index.css', WCPAY_PLUGIN_FILE ),
200
+ array( 'wc-components' ),
201
+ WC_Payments::get_file_version( 'dist/index.css' )
202
+ );
203
+
204
+ $settings_script_src_url = plugins_url( 'dist/settings.js', WCPAY_PLUGIN_FILE );
205
+ $settings_script_asset_path = WCPAY_ABSPATH . 'dist/settings.asset.php';
206
+ $settings_script_asset = file_exists( $settings_script_asset_path ) ? require_once $settings_script_asset_path : null;
207
+ wp_register_script(
208
+ 'WCPAY_ADMIN_SETTINGS',
209
+ $settings_script_src_url,
210
+ $settings_script_asset['dependencies'],
211
+ WC_Payments::get_file_version( 'dist/settings.js' ),
212
+ true
213
+ );
214
+
215
+ wp_localize_script(
216
+ 'WCPAY_ADMIN_SETTINGS',
217
+ 'wcpayAdminSettings',
218
+ array(
219
+ 'accountStatus' => $this->account->get_account_status_data(),
220
+ )
221
+ );
222
+
223
+ wp_register_style(
224
+ 'WCPAY_ADMIN_SETTINGS',
225
+ plugins_url( 'dist/settings.css', WCPAY_PLUGIN_FILE ),
226
+ array( 'wc-components' ),
227
+ WC_Payments::get_file_version( 'dist/settings.css' )
228
+ );
229
+ }
230
+
231
+ /**
232
+ * Load the assets
233
+ */
234
+ public function enqueue_payments_scripts() {
235
+ global $current_tab, $current_section;
236
+ if ( $current_tab && $current_section
237
+ && 'checkout' === $current_tab
238
+ && 'woocommerce_payments' === $current_section ) {
239
+ // Output the settings JS and CSS only on the settings page.
240
+ wp_enqueue_script( 'WCPAY_ADMIN_SETTINGS' );
241
+ wp_enqueue_style( 'WCPAY_ADMIN_SETTINGS' );
242
+ }
243
+
244
+ // TODO: Try to enqueue the JS and CSS bundles lazily (will require changes on WC-Admin).
245
+ if ( wc_admin_is_registered_page() ) {
246
+ wp_enqueue_script( 'WCPAY_DASH_APP' );
247
+ wp_enqueue_style( 'WCPAY_DASH_APP' );
248
+ }
249
+ }
250
+ }
includes/admin/class-wc-payments-rest-controller.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Payments_REST_Controller
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * REST controller for transactions.
12
+ */
13
+ class WC_Payments_REST_Controller extends WP_REST_Controller {
14
+
15
+ /**
16
+ * Endpoint namespace.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $namespace = 'wc/v3';
21
+
22
+ /**
23
+ * Client for making requests to the WooCommerce Payments API
24
+ *
25
+ * @var WC_Payments_API_Client
26
+ */
27
+ protected $api_client;
28
+
29
+ /**
30
+ * WC_Payments_REST_Controller constructor.
31
+ *
32
+ * @param WC_Payments_API_Client $api_client - WooCommerce Payments API client.
33
+ */
34
+ public function __construct( WC_Payments_API_Client $api_client ) {
35
+ $this->api_client = $api_client;
36
+ }
37
+
38
+ /**
39
+ * Forwards request to API client with taking care of WC_Payments_API_Exception.
40
+ *
41
+ * @param string $api_method - API method name.
42
+ * @param array $args - API method args.
43
+ * @param string $err_code - Optional error code to use for WP_Error.
44
+ *
45
+ * @return WP_Error|mixed - Method result of WP_Error in case of WC_Payments_API_Exception.
46
+ */
47
+ public function forward_request( $api_method, $args, $err_code = '' ) {
48
+ $response;
49
+ try {
50
+ $response = call_user_func_array( [ $this->api_client, $api_method ], $args );
51
+ } catch ( WC_Payments_API_Exception $e ) {
52
+ $code = $err_code ?: 'wcpay_' . $api_method;
53
+ $response = new WP_Error( $code, $e->getMessage() );
54
+ }
55
+
56
+ return rest_ensure_response( $response );
57
+ }
58
+
59
+ /**
60
+ * Verify access.
61
+ *
62
+ * Override this method if custom perimissions required.
63
+ */
64
+ public function check_permission() {
65
+ return current_user_can( 'manage_woocommerce' );
66
+ }
67
+ }
includes/admin/class-wc-rest-payments-charges-controller.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_REST_Payments_Charges_Controller
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * REST controller for charges.
12
+ */
13
+ class WC_REST_Payments_Charges_Controller extends WC_Payments_REST_Controller {
14
+
15
+ /**
16
+ * Endpoint path.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $rest_base = 'payments/charges';
21
+
22
+ /**
23
+ * Configure REST API routes.
24
+ */
25
+ public function register_routes() {
26
+ register_rest_route(
27
+ $this->namespace,
28
+ '/' . $this->rest_base . '/(?P<charge_id>\w+)',
29
+ array(
30
+ 'methods' => WP_REST_Server::READABLE,
31
+ 'callback' => array( $this, 'get_charge' ),
32
+ 'permission_callback' => array( $this, 'check_permission' ),
33
+ )
34
+ );
35
+ }
36
+
37
+ /**
38
+ * Retrieve charge to respond with via API.
39
+ *
40
+ * @param WP_REST_Request $request Full data about the request.
41
+ */
42
+ public function get_charge( $request ) {
43
+ $charge_id = $request->get_params()['charge_id'];
44
+
45
+ try {
46
+ $charge = $this->api_client->get_charge( $charge_id );
47
+ } catch ( WC_Payments_API_Exception $e ) {
48
+ return rest_ensure_response( new WP_Error( 'wcpay_get_charge', $e->getMessage() ) );
49
+ }
50
+
51
+ $raw_details = $charge['billing_details']['address'];
52
+ $billing_details = array();
53
+
54
+ $billing_details['city'] = ( ! empty( $raw_details['city'] ) ) ? $raw_details['city'] : '';
55
+ $billing_details['country'] = ( ! empty( $raw_details['country'] ) ) ? $raw_details['country'] : '';
56
+ $billing_details['address_1'] = ( ! empty( $raw_details['line1'] ) ) ? $raw_details['line1'] : '';
57
+ $billing_details['address_2'] = ( ! empty( $raw_details['line2'] ) ) ? $raw_details['line2'] : '';
58
+ $billing_details['postcode'] = ( ! empty( $raw_details['postal_code'] ) ) ? $raw_details['postal_code'] : '';
59
+ $billing_details['state'] = ( ! empty( $raw_details['state'] ) ) ? $raw_details['state'] : '';
60
+
61
+ $charge['billing_details']['formatted_address'] = WC()->countries->get_formatted_address( $billing_details );
62
+
63
+ return rest_ensure_response( $charge );
64
+ }
65
+
66
+ /**
67
+ * Verify access.
68
+ */
69
+ public function check_permission() {
70
+ return current_user_can( 'manage_woocommerce' );
71
+ }
72
+ }
includes/admin/class-wc-rest-payments-deposits-controller.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_REST_Payments_Deposits_Controller
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * REST controller for deposits.
12
+ */
13
+ class WC_REST_Payments_Deposits_Controller extends WC_Payments_REST_Controller {
14
+
15
+ /**
16
+ * Endpoint path.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $rest_base = 'payments/deposits';
21
+
22
+ /**
23
+ * Configure REST API routes.
24
+ */
25
+ public function register_routes() {
26
+ register_rest_route(
27
+ $this->namespace,
28
+ '/' . $this->rest_base,
29
+ array(
30
+ 'methods' => WP_REST_Server::READABLE,
31
+ 'callback' => array( $this, 'get_deposits' ),
32
+ 'permission_callback' => array( $this, 'check_permission' ),
33
+ )
34
+ );
35
+ register_rest_route(
36
+ $this->namespace,
37
+ '/' . $this->rest_base . '/(?P<deposit_id>\w+)',
38
+ array(
39
+ 'methods' => WP_REST_Server::READABLE,
40
+ 'callback' => array( $this, 'get_deposit' ),
41
+ 'permission_callback' => array( $this, 'check_permission' ),
42
+ )
43
+ );
44
+ }
45
+
46
+ /**
47
+ * Retrieve deposits to respond with via API.
48
+ *
49
+ * @param WP_REST_Request $request Full data about the request.
50
+ */
51
+ public function get_deposits( $request ) {
52
+ $page = intval( $request->get_params()['page'] );
53
+ $page_size = intval( $request->get_params()['pagesize'] );
54
+ return $this->forward_request( 'list_deposits', [ $page, $page_size ] );
55
+ }
56
+
57
+ /**
58
+ * Retrieve deposit to respond with via API.
59
+ *
60
+ * @param WP_REST_Request $request Full data about the request.
61
+ */
62
+ public function get_deposit( $request ) {
63
+ $deposit_id = $request->get_params()['deposit_id'];
64
+ return $this->forward_request( 'get_deposit', [ $deposit_id ] );
65
+ }
66
+ }
includes/admin/class-wc-rest-payments-disputes-controller.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_REST_Payments_Disputes_Controller
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * REST controller for disputes.
12
+ */
13
+ class WC_REST_Payments_Disputes_Controller extends WC_Payments_REST_Controller {
14
+
15
+ /**
16
+ * Endpoint path.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $rest_base = 'payments/disputes';
21
+
22
+ /**
23
+ * Configure REST API routes.
24
+ */
25
+ public function register_routes() {
26
+ register_rest_route(
27
+ $this->namespace,
28
+ '/' . $this->rest_base,
29
+ array(
30
+ 'methods' => WP_REST_Server::READABLE,
31
+ 'callback' => array( $this, 'get_disputes' ),
32
+ 'permission_callback' => array( $this, 'check_permission' ),
33
+ )
34
+ );
35
+ register_rest_route(
36
+ $this->namespace,
37
+ '/' . $this->rest_base . '/(?P<dispute_id>\w+)',
38
+ array(
39
+ 'methods' => WP_REST_Server::READABLE,
40
+ 'callback' => array( $this, 'get_dispute' ),
41
+ 'permission_callback' => array( $this, 'check_permission' ),
42
+ )
43
+ );
44
+ register_rest_route(
45
+ $this->namespace,
46
+ '/' . $this->rest_base . '/(?P<dispute_id>\w+)',
47
+ array(
48
+ 'methods' => WP_REST_Server::CREATABLE,
49
+ 'callback' => array( $this, 'update_dispute' ),
50
+ 'permission_callback' => array( $this, 'check_permission' ),
51
+ )
52
+ );
53
+
54
+ register_rest_route(
55
+ $this->namespace,
56
+ '/payments/file',
57
+ array(
58
+ 'methods' => WP_REST_Server::CREATABLE,
59
+ 'callback' => array( $this, 'upload_evidence' ),
60
+ 'permission_callback' => array( $this, 'check_permission' ),
61
+ )
62
+ );
63
+
64
+ register_rest_route(
65
+ $this->namespace,
66
+ '/' . $this->rest_base . '/(?P<dispute_id>\w+)/close',
67
+ array(
68
+ 'methods' => WP_REST_Server::CREATABLE,
69
+ 'callback' => array( $this, 'close_dispute' ),
70
+ 'permission_callback' => array( $this, 'check_permission' ),
71
+ )
72
+ );
73
+ }
74
+
75
+ /**
76
+ * Retrieve disputes to respond with via API.
77
+ */
78
+ public function get_disputes() {
79
+ return $this->forward_request( 'list_disputes', [] );
80
+ }
81
+
82
+ /**
83
+ * Retrieve dispute to respond with via API.
84
+ *
85
+ * @param WP_REST_Request $request Full data about the request.
86
+ */
87
+ public function get_dispute( $request ) {
88
+ $dispute_id = $request->get_params()['dispute_id'];
89
+ return $this->forward_request( 'get_dispute', [ $dispute_id ] );
90
+ }
91
+
92
+ /**
93
+ * Update and respond with dispute via API.
94
+ *
95
+ * @param WP_REST_Request $request Full data about the request.
96
+ */
97
+ public function update_dispute( $request ) {
98
+ $params = $request->get_params();
99
+ return $this->forward_request(
100
+ 'update_dispute',
101
+ [
102
+ $params['dispute_id'],
103
+ $params['evidence'],
104
+ $params['submit'],
105
+ $params['metadata'],
106
+ ]
107
+ );
108
+ }
109
+
110
+ /**
111
+ * Create file and respond with file object via API.
112
+ *
113
+ * @param WP_REST_Request $request Full data about the request.
114
+ */
115
+ public function upload_evidence( $request ) {
116
+ return $this->forward_request( 'upload_evidence', [ $request ] );
117
+ }
118
+
119
+ /**
120
+ * Close and respond with dispute via API.
121
+ *
122
+ * @param WP_REST_Request $request Full data about the request.
123
+ */
124
+ public function close_dispute( $request ) {
125
+ $dispute_id = $request->get_params()['dispute_id'];
126
+ return $this->forward_request( 'close_dispute', [ $dispute_id ] );
127
+ }
128
+ }
includes/admin/class-wc-rest-payments-timeline-controller.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_REST_Payments_Timeline_Controller
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * REST controller for the timeline, which includes all events related to an intention.
12
+ */
13
+ class WC_REST_Payments_Timeline_Controller extends WP_REST_Controller {
14
+
15
+ /**
16
+ * Endpoint namespace.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $namespace = 'wc/v3';
21
+
22
+ /**
23
+ * Endpoint path.
24
+ *
25
+ * @var string
26
+ */
27
+ protected $rest_base = 'payments/timeline';
28
+
29
+ /**
30
+ * Client for making requests to the WooCommerce Payments API
31
+ *
32
+ * @var WC_Payments_API_Client
33
+ */
34
+ private $api_client;
35
+
36
+ /**
37
+ * WC_REST_Payments_Timeline_Controller constructor.
38
+ *
39
+ * @param WC_Payments_API_Client $api_client - WooCommerce Payments API client.
40
+ */
41
+ public function __construct( WC_Payments_API_Client $api_client ) {
42
+ $this->api_client = $api_client;
43
+ }
44
+
45
+ /**
46
+ * Configure REST API routes.
47
+ */
48
+ public function register_routes() {
49
+ register_rest_route(
50
+ $this->namespace,
51
+ '/' . $this->rest_base . '/(?P<intention_id>\w+)',
52
+ array(
53
+ 'methods' => WP_REST_Server::READABLE,
54
+ 'callback' => array( $this, 'get_timeline' ),
55
+ 'permission_callback' => array( $this, 'check_permission' ),
56
+ )
57
+ );
58
+ }
59
+
60
+ /**
61
+ * Retrieve timeline to respond with via API.
62
+ *
63
+ * @param WP_REST_Request $request Full data about the request.
64
+ */
65
+ public function get_timeline( $request ) {
66
+ try {
67
+ $intention_id = $request->get_params()['intention_id'];
68
+ return $this->api_client->get_timeline( $intention_id );
69
+ } catch ( WC_Payments_API_Exception $e ) {
70
+ return rest_ensure_response( new WP_Error( 'wcpay_get_timeline', $e->getMessage() ) );
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Verify access.
76
+ */
77
+ public function check_permission() {
78
+ return current_user_can( 'manage_woocommerce' );
79
+ }
80
+ }
includes/admin/class-wc-rest-payments-transactions-controller.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_REST_Payments_Transactions_Controller
4
+ *
5
+ * @package WooCommerce\Payments\Admin
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * REST controller for transactions.
12
+ */
13
+ class WC_REST_Payments_Transactions_Controller extends WC_Payments_REST_Controller {
14
+
15
+ /**
16
+ * Endpoint path.
17
+ *
18
+ * @var string
19
+ */
20
+ protected $rest_base = 'payments/transactions';
21
+
22
+ /**
23
+ * Configure REST API routes.
24
+ */
25
+ public function register_routes() {
26
+ register_rest_route(
27
+ $this->namespace,
28
+ '/' . $this->rest_base,
29
+ array(
30
+ 'methods' => WP_REST_Server::READABLE,
31
+ 'callback' => array( $this, 'get_transactions' ),
32
+ 'permission_callback' => array( $this, 'check_permission' ),
33
+ )
34
+ );
35
+ register_rest_route(
36
+ $this->namespace,
37
+ '/' . $this->rest_base . '/summary',
38
+ array(
39
+ 'methods' => WP_REST_Server::READABLE,
40
+ 'callback' => array( $this, 'get_transactions_summary' ),
41
+ 'permission_callback' => array( $this, 'check_permission' ),
42
+ )
43
+ );
44
+ register_rest_route(
45
+ $this->namespace,
46
+ '/' . $this->rest_base . '/(?P<transaction_id>\w+)',
47
+ array(
48
+ 'methods' => WP_REST_Server::READABLE,
49
+ 'callback' => array( $this, 'get_transaction' ),
50
+ 'permission_callback' => array( $this, 'check_permission' ),
51
+ )
52
+ );
53
+ }
54
+
55
+ /**
56
+ * Retrieve transactions to respond with via API.
57
+ *
58
+ * @param WP_REST_Request $request Full data about the request.
59
+ */
60
+ public function get_transactions( $request ) {
61
+ $page = intval( $request->get_params()['page'] );
62
+ $page_size = intval( $request->get_params()['pagesize'] );
63
+ $deposit_id = $request->get_params()['deposit_id'];
64
+ return $this->forward_request( 'list_transactions', [ $page, $page_size, $deposit_id ] );
65
+ }
66
+
67
+ /**
68
+ * Retrieve transaction to respond with via API.
69
+ *
70
+ * @param WP_REST_Request $request Full data about the request.
71
+ */
72
+ public function get_transaction( $request ) {
73
+ $transaction_id = $request->get_params()['transaction_id'];
74
+ return $this->forward_request( 'get_transactions', [ 'transaction_id' ] );
75
+ }
76
+
77
+ /**
78
+ * Retrieve transactions summary to respond with via API.
79
+ *
80
+ * @param WP_REST_Request $request Full data about the request.
81
+ */
82
+ public function get_transactions_summary( $request ) {
83
+ $deposit_id = $request->get_params()['deposit_id'];
84
+ return $this->forward_request( 'get_transactions_summary', [ $deposit_id ] );
85
+ }
86
+ }
includes/class-logger.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Logger
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ namespace WCPay;
9
+
10
+ use WC_Payments;
11
+
12
+ defined( 'ABSPATH' ) || exit; // block direct access.
13
+
14
+ /**
15
+ * A wrapper class for interacting with WC_Logger.
16
+ */
17
+ class Logger {
18
+ /**
19
+ * The holding property for our WC_Logger instance.
20
+ *
21
+ * @var WC_Logger $logger
22
+ */
23
+ private static $logger;
24
+
25
+ const LOG_FILENAME = 'woocommerce-payments';
26
+
27
+ /**
28
+ * Add a log entry.
29
+ *
30
+ * Note that this depends on WC_Payments gateway property to be initialized as
31
+ * we need this to access the plugins debug setting to figure out if the setting
32
+ * is turned on.
33
+ *
34
+ * @param string $message Log message.
35
+ *
36
+ * @param string $level One of the following:
37
+ * 'emergency': System is unusable.
38
+ * 'alert': Action must be taken immediately.
39
+ * 'critical': Critical conditions.
40
+ * 'error': Error conditions.
41
+ * 'warning': Warning conditions.
42
+ * 'notice': Normal but significant condition.
43
+ * 'info': Informational messages.
44
+ * 'debug': Debug-level messages.
45
+ */
46
+ public static function log( $message, $level = 'info' ) {
47
+ if ( ! self::can_log() ) {
48
+ return;
49
+ }
50
+
51
+ self::init_logger();
52
+ self::$logger->log( $level, $message, [ 'source' => self::LOG_FILENAME ] );
53
+ }
54
+
55
+ /**
56
+ * Initiate logger property with the WooCommerce core logger only if it's not set already
57
+ */
58
+ public static function init_logger() {
59
+ if ( ! isset( self::$logger ) && ! is_object( self::$logger ) ) {
60
+ self::$logger = wc_get_logger();
61
+ }
62
+ }
63
+
64
+ /**
65
+ * Checks if the gateway setting logging toggle is enabled.
66
+ *
67
+ * @return bool Depending on the enable_logging setting.
68
+ */
69
+ public static function can_log() {
70
+ if ( ! function_exists( 'wc_get_logger' ) ) {
71
+ return false;
72
+ }
73
+
74
+ if ( is_null( WC_Payments::get_gateway() ) ) {
75
+ return false;
76
+ }
77
+
78
+ if ( WC_Payments::get_gateway()->is_in_dev_mode() ) {
79
+ return true;
80
+ }
81
+
82
+ return 'yes' === WC_Payments::get_gateway()->get_option( 'enable_logging' );
83
+ }
84
+
85
+ /**
86
+ * Creates a log entry of type emergency
87
+ *
88
+ * @param string $message To send to the log file.
89
+ */
90
+ public static function emergency( $message ) {
91
+ self::log( $message, 'emergency' );
92
+ }
93
+
94
+ /**
95
+ * Creates a log entry of type alert
96
+ *
97
+ * @param string $message To send to the log file.
98
+ */
99
+ public static function alert( $message ) {
100
+ self::log( $message, 'alert' );
101
+ }
102
+
103
+ /**
104
+ * Creates a log entry of type critical
105
+ *
106
+ * @param string $message To send to the log file.
107
+ */
108
+ public static function critical( $message ) {
109
+ self::log( $message, 'critical' );
110
+ }
111
+
112
+ /**
113
+ * Creates a log entry of type error
114
+ *
115
+ * @param string $message To send to the log file.
116
+ */
117
+ public static function error( $message ) {
118
+ self::log( $message, 'error' );
119
+ }
120
+
121
+ /**
122
+ * Creates a log entry of type warning
123
+ *
124
+ * @param string $message To send to the log file.
125
+ */
126
+ public static function warning( $message ) {
127
+ self::log( $message, 'warning' );
128
+ }
129
+
130
+ /**
131
+ * Creates a log entry of type notice
132
+ *
133
+ * @param string $message To send to the log file.
134
+ */
135
+ public static function notice( $message ) {
136
+ self::log( $message, 'notice' );
137
+ }
138
+
139
+ /**
140
+ * Creates a log entry of type info
141
+ *
142
+ * @param string $message To send to the log file.
143
+ */
144
+ public static function info( $message ) {
145
+ self::log( $message, 'info' );
146
+ }
147
+
148
+ /**
149
+ * Creates a log entry of type debug
150
+ *
151
+ * @param string $message To send to the log file.
152
+ */
153
+ public static function debug( $message ) {
154
+ self::log( $message, 'debug' );
155
+ }
156
+ }
includes/class-wc-payment-gateway-wcpay.php ADDED
@@ -0,0 +1,610 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Payment_Gateway_WCPay
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ use WCPay\Logger;
13
+
14
+ /**
15
+ * Gateway class for WooCommerce Payments
16
+ */
17
+ class WC_Payment_Gateway_WCPay extends WC_Payment_Gateway_CC {
18
+
19
+ /**
20
+ * Internal ID of the payment gateway.
21
+ *
22
+ * @type string
23
+ */
24
+ const GATEWAY_ID = 'woocommerce_payments';
25
+
26
+ /**
27
+ * Client for making requests to the WooCommerce Payments API
28
+ *
29
+ * @var WC_Payments_API_Client
30
+ */
31
+ private $payments_api_client;
32
+
33
+ /**
34
+ * WC_Payments_Account instance to get information about the account
35
+ *
36
+ * @var WC_Payments_Account
37
+ */
38
+ private $account;
39
+
40
+ /**
41
+ * Check the defined constant to determine the current plugin mode.
42
+ *
43
+ * @return bool
44
+ */
45
+ public function is_in_dev_mode() {
46
+ return apply_filters( 'wcpay_dev_mode', defined( 'WCPAY_DEV_MODE' ) && WCPAY_DEV_MODE );
47
+ }
48
+
49
+ /**
50
+ * Returns whether test_mode or dev_mode is active for the gateway
51
+ *
52
+ * @return boolean Test mode enabled if true, disabled if false
53
+ */
54
+ public function is_in_test_mode() {
55
+ if ( $this->is_in_dev_mode() ) {
56
+ return true;
57
+ }
58
+
59
+ return 'yes' === $this->get_option( 'test_mode' );
60
+ }
61
+
62
+ /**
63
+ * Returns the URL of the configuration screen for this gateway, for use in internal links.
64
+ *
65
+ * @return string URL of the configuration screen for this gateway
66
+ */
67
+ public static function get_settings_url() {
68
+ return admin_url( 'admin.php?page=wc-settings&tab=checkout&section=' . self::GATEWAY_ID );
69
+ }
70
+
71
+ /**
72
+ * WC_Payment_Gateway_WCPay constructor.
73
+ *
74
+ * @param WC_Payments_API_Client $payments_api_client - WooCommerce Payments API client.
75
+ * @param WC_Payments_Account $account - Account class instance.
76
+ */
77
+ public function __construct( WC_Payments_API_Client $payments_api_client, WC_Payments_Account $account ) {
78
+ $this->payments_api_client = $payments_api_client;
79
+ $this->account = $account;
80
+
81
+ $this->id = self::GATEWAY_ID;
82
+ $this->icon = ''; // TODO: icon.
83
+ $this->has_fields = true;
84
+ $this->method_title = __( 'WooCommerce Payments', 'woocommerce-payments' );
85
+ $this->method_description = __( 'Accept payments via credit card.', 'woocommerce-payments' );
86
+ $this->title = __( 'Credit Card', 'woocommerce-payments' );
87
+ $this->description = __( 'Enter your card details', 'woocommerce-payments' );
88
+ $this->supports = array(
89
+ 'products',
90
+ 'refunds',
91
+ );
92
+
93
+ // Define setting fields.
94
+ $this->form_fields = array(
95
+ 'enabled' => array(
96
+ 'title' => __( 'Enable/Disable', 'woocommerce-payments' ),
97
+ 'label' => __( 'Enable WooCommerce Payments', 'woocommerce-payments' ),
98
+ 'type' => 'checkbox',
99
+ 'description' => '',
100
+ 'default' => 'no',
101
+ ),
102
+ 'account_details' => array(
103
+ 'type' => 'account_actions',
104
+ ),
105
+ 'account_status' => array(
106
+ 'type' => 'account_status',
107
+ ),
108
+ 'manual_capture' => array(
109
+ 'title' => __( 'Manual Capture', 'woocommerce-payments' ),
110
+ 'label' => __( 'Issue an authorization on checkout, and capture later', 'woocommerce-payments' ),
111
+ 'type' => 'checkbox',
112
+ 'description' => __( 'Manually capture funds within 7 days after the customer authorizes payment on checkout.', 'woocommerce-payments' ),
113
+ 'default' => 'no',
114
+ 'desc_tip' => true,
115
+ ),
116
+ 'test_mode' => array(
117
+ 'title' => __( 'Test Mode', 'woocommerce-payments' ),
118
+ 'label' => __( 'Enable test mode', 'woocommerce-payments' ),
119
+ 'type' => 'checkbox',
120
+ 'description' => __( 'Simulate transactions using test card numbers.', 'woocommerce-payments' ),
121
+ 'default' => 'no',
122
+ 'desc_tip' => true,
123
+ ),
124
+ 'enable_logging' => array(
125
+ 'title' => __( 'Debug Log', 'woocommerce-payments' ),
126
+ 'label' => __( 'When enabled debug notes will be added to the log.', 'woocommerce-payments' ),
127
+ 'type' => 'checkbox',
128
+ 'description' => '',
129
+ 'default' => 'no',
130
+ ),
131
+ );
132
+
133
+ if ( $this->is_in_dev_mode() ) {
134
+ $this->form_fields['test_mode']['custom_attributes']['disabled'] = 'disabled';
135
+ $this->form_fields['test_mode']['label'] = __( 'Dev Mode is active so all transactions will be in test mode. This setting is only available to live accounts.', 'woocommerce-payments' );
136
+ $this->form_fields['enable_logging']['custom_attributes']['disabled'] = 'disabled';
137
+ $this->form_fields['enable_logging']['label'] = __( 'Dev Mode is active so logging is on by default.', 'woocommerce-payments' );
138
+ }
139
+
140
+ // Load the settings.
141
+ $this->init_settings();
142
+
143
+ add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
144
+ add_action( 'woocommerce_order_actions', array( $this, 'add_order_actions' ) );
145
+ add_action( 'woocommerce_order_action_capture_charge', array( $this, 'capture_charge' ) );
146
+ add_action( 'woocommerce_order_action_cancel_authorization', array( $this, 'cancel_authorization' ) );
147
+ }
148
+
149
+ /**
150
+ * Checks if the gateway is enabled, and also if it's configured enough to accept payments from customers.
151
+ *
152
+ * Use parent method value alongside other business rules to make the decision.
153
+ *
154
+ * @return bool Whether the gateway is enabled and ready to accept payments.
155
+ */
156
+ public function is_available() {
157
+ if ( 'USD' !== get_woocommerce_currency() ) {
158
+ return false;
159
+ }
160
+
161
+ return parent::is_available() && $this->account->is_stripe_connected( false );
162
+ }
163
+
164
+ /**
165
+ * Add notice to WooCommerce Payments settings page explaining test mode when it's enabled.
166
+ */
167
+ public function admin_options() {
168
+ if ( $this->is_in_test_mode() ) {
169
+ ?>
170
+ <div id="wcpay-test-mode-notice" class="notice notice-warning">
171
+ <p>
172
+ <b><?php esc_html_e( 'Test Mode Active: ', 'woocommerce-payments' ); ?></b>
173
+ <?php esc_html_e( "All transactions are simulated. Customers can't make real purchases through WooCommerce Payments.", 'woocommerce-payments' ); ?>
174
+ </p>
175
+ </div>
176
+ <?php
177
+ }
178
+
179
+ parent::admin_options();
180
+ }
181
+
182
+ /**
183
+ * Renders the Credit Card input fields needed to get the user's payment information on the checkout page.
184
+ *
185
+ * We also add the JavaScript which drives the UI.
186
+ */
187
+ public function payment_fields() {
188
+ try {
189
+ // Add JavaScript for the payment form.
190
+ $js_config = array(
191
+ 'publishableKey' => $this->account->get_publishable_key( $this->is_in_test_mode() ),
192
+ 'accountId' => $this->account->get_stripe_account_id(),
193
+ );
194
+
195
+ // Register Stripe's JavaScript using the same ID as the Stripe Gateway plugin. This prevents this JS being
196
+ // loaded twice in the event a site has both plugins enabled. We still run the risk of different plugins
197
+ // loading different versions however.
198
+ wp_register_script(
199
+ 'stripe',
200
+ 'https://js.stripe.com/v3/',
201
+ array(),
202
+ '3.0',
203
+ true
204
+ );
205
+
206
+ wp_register_script(
207
+ 'wcpay-checkout',
208
+ plugins_url( 'assets/js/wcpay-checkout.js', WCPAY_PLUGIN_FILE ),
209
+ array( 'stripe', 'wc-checkout' ),
210
+ WC_Payments::get_file_version( 'assets/js/wcpay-checkout.js' ),
211
+ true
212
+ );
213
+
214
+ wp_localize_script( 'wcpay-checkout', 'wcpay_config', $js_config );
215
+ wp_enqueue_script( 'wcpay-checkout' );
216
+
217
+ wp_enqueue_style(
218
+ 'wcpay-checkout',
219
+ plugins_url( 'assets/css/wcpay-checkout.css', WCPAY_PLUGIN_FILE ),
220
+ array(),
221
+ WC_Payments::get_file_version( 'assets/css/wcpay-checkout.css' )
222
+ );
223
+
224
+ // Output the form HTML.
225
+ ?>
226
+ <fieldset>
227
+ <?php if ( ! empty( $this->get_description() ) ) : ?>
228
+ <legend><?php echo wp_kses_post( $this->get_description() ); ?></legend>
229
+ <?php endif; ?>
230
+
231
+ <?php if ( $this->is_in_test_mode() ) : ?>
232
+ <p class="testmode-info">
233
+ <?php
234
+ echo WC_Payments_Utils::esc_interpolated_html(
235
+ /* translators: link to Stripe testing page */
236
+ __( '<strong>Test mode:</strong> use test card numbers listed <a>here</a>.', 'woocommerce-payments' ),
237
+ [
238
+ 'strong' => '<strong>',
239
+ 'a' => '<a href="https://docs.woocommerce.com/document/payments/testing/#test-cards" target="_blank">',
240
+ ]
241
+ );
242
+ ?>
243
+ </p>
244
+ <?php endif; ?>
245
+
246
+ <div id="wcpay-card-element"></div>
247
+ <div id="wcpay-errors" role="alert"></div>
248
+ <input id="wcpay-payment-method" type="hidden" name="wcpay-payment-method" />
249
+ </fieldset>
250
+ <?php
251
+ } catch ( Exception $e ) {
252
+ // Output the error message.
253
+ ?>
254
+ <div>
255
+ <?php
256
+ echo esc_html__( 'An error was encountered when preparing the payment form. Please try again later.', 'woocommerce-payments' );
257
+ ?>
258
+ </div>
259
+ <?php
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Process the payment for a given order.
265
+ *
266
+ * @param int $order_id Order ID to process the payment for.
267
+ *
268
+ * @return array|null
269
+ */
270
+ public function process_payment( $order_id ) {
271
+ $order = wc_get_order( $order_id );
272
+
273
+ try {
274
+ $amount = $order->get_total();
275
+
276
+ $transaction_id = '';
277
+
278
+ if ( $amount > 0 ) {
279
+ // Get the payment method from the request (generated when the user entered their card details).
280
+ $payment_method = $this->get_payment_method_from_request();
281
+
282
+ $manual_capture = 'yes' === $this->get_option( 'manual_capture' );
283
+
284
+ // Create intention, try to confirm it & capture the charge (if 3DS is not required).
285
+ $intent = $this->payments_api_client->create_and_confirm_intention(
286
+ round( (float) $amount * 100 ),
287
+ 'usd',
288
+ $payment_method,
289
+ $manual_capture
290
+ );
291
+
292
+ // TODO: We're not handling *all* sorts of things here. For example, redirecting to a 3DS auth flow.
293
+ $transaction_id = $intent->get_id();
294
+ $status = $intent->get_status();
295
+
296
+ if ( 'requires_capture' === $status ) {
297
+ $note = sprintf(
298
+ WC_Payments_Utils::esc_interpolated_html(
299
+ /* translators: %1: the authorized amount, %2: transaction ID of the payment */
300
+ __( 'A payment of %1$s was <strong>authorized</strong> using WooCommerce Payments (<code>%2$s</code>).', 'woocommerce-payments' ),
301
+ [
302
+ 'strong' => '<strong>',
303
+ 'code' => '<code>',
304
+ ]
305
+ ),
306
+ wc_price( $amount ),
307
+ $transaction_id
308
+ );
309
+ $order->update_status( 'on-hold', $note );
310
+ $order->set_transaction_id( $transaction_id );
311
+ } else {
312
+ $note = sprintf(
313
+ WC_Payments_Utils::esc_interpolated_html(
314
+ /* translators: %1: the successfully charged amount, %2: transaction ID of the payment */
315
+ __( 'A payment of %1$s was <strong>successfully charged</strong> using WooCommerce Payments (<code>%2$s</code>).', 'woocommerce-payments' ),
316
+ [
317
+ 'strong' => '<strong>',
318
+ 'code' => '<code>',
319
+ ]
320
+ ),
321
+ wc_price( $amount ),
322
+ $transaction_id
323
+ );
324
+ $order->add_order_note( $note );
325
+ $order->payment_complete( $transaction_id );
326
+ }
327
+
328
+ $order->update_meta_data( '_charge_id', $intent->get_charge_id() );
329
+ $order->update_meta_data( '_intention_status', $status );
330
+ $order->save();
331
+ } else {
332
+ $order->payment_complete();
333
+ }
334
+
335
+ wc_reduce_stock_levels( $order_id );
336
+ WC()->cart->empty_cart();
337
+
338
+ return array(
339
+ 'result' => 'success',
340
+ 'redirect' => $this->get_return_url( $order ),
341
+ );
342
+ } catch ( Exception $e ) {
343
+ // TODO: Create plugin specific exceptions so that we can be smarter about what we create notices for.
344
+ wc_add_notice( $e->getMessage(), 'error' );
345
+
346
+ $order->update_status( 'failed' );
347
+
348
+ return array(
349
+ 'result' => 'fail',
350
+ 'redirect' => '',
351
+ );
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Extract the payment method from the request's POST variables
357
+ *
358
+ * @return string
359
+ * @throws Exception - If no payment method is found.
360
+ */
361
+ private function get_payment_method_from_request() {
362
+ // phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
363
+ if ( ! isset( $_POST['wcpay-payment-method'] ) ) {
364
+ // If no payment method is set then stop here with an error.
365
+ throw new Exception( __( 'Payment method not found.', 'woocommerce-payments' ) );
366
+ }
367
+
368
+ $payment_method = wc_clean( $_POST['wcpay-payment-method'] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash
369
+ // phpcs:enable WordPress.Security.NonceVerification.NoNonceVerification
370
+
371
+ return $payment_method;
372
+ }
373
+
374
+ /**
375
+ * Can the order be refunded?
376
+ *
377
+ * @param WC_Order $order Order object.
378
+ * @return bool
379
+ */
380
+ public function can_refund_order( $order ) {
381
+ return $order && $order->get_meta( '_charge_id', true );
382
+ }
383
+
384
+ /**
385
+ * Refund a charge.
386
+ *
387
+ * @param int $order_id - the Order ID to process the refund for.
388
+ * @param float $amount - the amount to refund.
389
+ * @param string $reason - the reason for refunding.
390
+ *
391
+ * @return bool - Whether the refund went through.
392
+ */
393
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
394
+ $order = wc_get_order( $order_id );
395
+
396
+ if ( ! $order ) {
397
+ return false;
398
+ }
399
+
400
+ $charge_id = $order->get_meta( '_charge_id', true );
401
+
402
+ try {
403
+ if ( is_null( $amount ) ) {
404
+ $refund = $this->payments_api_client->refund_charge( $charge_id );
405
+ } else {
406
+ $refund = $this->payments_api_client->refund_charge( $charge_id, round( (float) $amount * 100 ) );
407
+ }
408
+ } catch ( Exception $e ) {
409
+
410
+ $note = sprintf(
411
+ /* translators: %1: the successfully charged amount, %2: error message */
412
+ __( 'A refund of %1$s failed to complete: %2$s', 'woocommerce-payments' ),
413
+ wc_price( $amount ),
414
+ $e->getMessage()
415
+ );
416
+
417
+ Logger::log( $note );
418
+ $order->add_order_note( $note );
419
+
420
+ return new WP_Error( $e->getMessage() );
421
+ }
422
+
423
+ if ( empty( $reason ) ) {
424
+ $note = sprintf(
425
+ /* translators: %1: the successfully charged amount */
426
+ __( 'A refund of %1$s was successfully processed using WooCommerce Payments.', 'woocommerce-payments' ),
427
+ wc_price( $amount )
428
+ );
429
+ } else {
430
+ $note = sprintf(
431
+ /* translators: %1: the successfully charged amount, %2: reason */
432
+ __( 'A refund of %1$s was successfully processed using WooCommerce Payments. Reason: %2$s', 'woocommerce-payments' ),
433
+ wc_price( $amount ),
434
+ $reason
435
+ );
436
+ }
437
+ $order->add_order_note( $note );
438
+
439
+ return true;
440
+ }
441
+
442
+ /**
443
+ * Overrides the original method in woo's WC_Settings_API in order to conditionally render the enabled checkbox.
444
+ *
445
+ * @param string $key Field key.
446
+ * @param array $data Field data.
447
+ *
448
+ * @return string Checkbox markup or empty string.
449
+ */
450
+ public function generate_checkbox_html( $key, $data ) {
451
+ if ( 'enabled' === $key && ! $this->account->is_stripe_connected( false ) ) {
452
+ return '';
453
+ }
454
+ return parent::generate_checkbox_html( $key, $data );
455
+ }
456
+
457
+ /**
458
+ * Outputs the container for account status information.
459
+ *
460
+ * @return string Container markup or empty if the account is not connected.
461
+ */
462
+ public function generate_account_status_html() {
463
+ if ( ! $this->account->is_stripe_connected( false ) ) {
464
+ return '';
465
+ }
466
+
467
+ ob_start();
468
+ ?>
469
+ <tr valign="top">
470
+ <th scope="row">
471
+ <?php echo esc_html( __( 'Account Status', 'woocommerce-payments' ) ); ?>
472
+ </th>
473
+ <td>
474
+ <div id="wcpay-account-status-container"></div>
475
+ </td>
476
+ </tr>
477
+ <?php
478
+ return ob_get_clean();
479
+ }
480
+
481
+ /**
482
+ * Generate markup for account actions
483
+ */
484
+ public function generate_account_actions_html() {
485
+ try {
486
+ $stripe_connected = $this->account->try_is_stripe_connected();
487
+ if ( $stripe_connected ) {
488
+ $description = WC_Payments_Utils::esc_interpolated_html(
489
+ /* translators: 1) dashboard login URL */
490
+ __( '<a>View and edit account details</a>', 'woocommerce-payments' ),
491
+ [
492
+ 'a' => '<a href="' . WC_Payments_Account::get_login_url() . '">',
493
+ ]
494
+ );
495
+ } else {
496
+ $description = WC_Payments_Account::get_connection_message_html();
497
+ }
498
+ } catch ( Exception $e ) {
499
+ // do not render the actions if the server is unreachable.
500
+ $description = esc_html__( 'Error determining the connection status.', 'woocommerce-payments' );
501
+ }
502
+
503
+ ob_start();
504
+ ?>
505
+ <tr valign="top">
506
+ <th scope="row">
507
+ <?php echo esc_html( __( 'Account', 'woocommerce-payments' ) ); ?>
508
+ </th>
509
+ <td>
510
+ <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
511
+ </td>
512
+ </tr>
513
+ <?php
514
+ return ob_get_clean();
515
+ }
516
+
517
+ /**
518
+ * Add capture and cancel actions for orders with an authorized charge.
519
+ *
520
+ * @param array $actions - Actions to make available in order actions metabox.
521
+ */
522
+ public function add_order_actions( $actions ) {
523
+ global $theorder;
524
+
525
+ if ( $this->id !== $theorder->get_payment_method() ) {
526
+ return $actions;
527
+ }
528
+
529
+ if ( 'requires_capture' !== $theorder->get_meta( '_intention_status', true ) ) {
530
+ return $actions;
531
+ }
532
+
533
+ $new_actions = array(
534
+ 'capture_charge' => __( 'Capture charge', 'woocommerce-payments' ),
535
+ 'cancel_authorization' => __( 'Cancel authorization', 'woocommerce-payments' ),
536
+ );
537
+
538
+ return array_merge( $new_actions, $actions );
539
+ }
540
+
541
+ /**
542
+ * Capture previously authorized charge.
543
+ *
544
+ * @param WC_Order $order - Order to capture charge on.
545
+ */
546
+ public function capture_charge( $order ) {
547
+ $amount = $order->get_total();
548
+ $intent = $this->payments_api_client->capture_intention(
549
+ $order->get_transaction_id(),
550
+ round( (float) $amount * 100 )
551
+ );
552
+ $status = $intent->get_status();
553
+
554
+ $order->update_meta_data( '_intention_status', $status );
555
+ $order->save();
556
+
557
+ if ( 'succeeded' === $status ) {
558
+ $note = sprintf(
559
+ WC_Payments_Utils::esc_interpolated_html(
560
+ /* translators: %1: the successfully charged amount */
561
+ __( 'A payment of %1$s was <strong>successfully captured</strong> using WooCommerce Payments.', 'woocommerce-payments' ),
562
+ [ 'strong' => '<strong>' ]
563
+ ),
564
+ wc_price( $amount )
565
+ );
566
+ $order->add_order_note( $note );
567
+ $order->payment_complete();
568
+ } else {
569
+ $note = sprintf(
570
+ WC_Payments_Utils::esc_interpolated_html(
571
+ /* translators: %1: the successfully charged amount */
572
+ __( 'A capture of %1$s <strong>failed</strong> to complete.', 'woocommerce-payments' ),
573
+ [ 'strong' => '<strong>' ]
574
+ ),
575
+ wc_price( $amount )
576
+ );
577
+ $order->add_order_note( $note );
578
+ }
579
+ }
580
+
581
+ /**
582
+ * Cancel previously authorized charge.
583
+ *
584
+ * @param WC_Order $order - Order to cancel authorization on.
585
+ */
586
+ public function cancel_authorization( $order ) {
587
+ $intent = $this->payments_api_client->cancel_intention( $order->get_transaction_id() );
588
+ $status = $intent->get_status();
589
+
590
+ $order->update_meta_data( '_intention_status', $status );
591
+ $order->save();
592
+
593
+ if ( 'canceled' === $status ) {
594
+ $order->update_status(
595
+ 'cancelled',
596
+ WC_Payments_Utils::esc_interpolated_html(
597
+ __( 'Payment authorization was successfully <strong>cancelled</strong>.', 'woocommerce-payments' ),
598
+ [ 'strong' => '<strong>' ]
599
+ )
600
+ );
601
+ } else {
602
+ $order->add_order_note(
603
+ WC_Payments_Utils::esc_interpolated_html(
604
+ __( 'Canceling authorization <strong>failed</strong> to complete.', 'woocommerce-payments' ),
605
+ [ 'strong' => '<strong>' ]
606
+ )
607
+ );
608
+ }
609
+ }
610
+ }
includes/class-wc-payments-account.php ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Payments_Account
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * Class handling any account connection functionality
14
+ */
15
+ class WC_Payments_Account {
16
+
17
+ const ACCOUNT_TRANSIENT = 'wcpay_account_data';
18
+ const ON_BOARDING_DISABLED_TRANSIENT = 'wcpay_on_boarding_disabled';
19
+
20
+ /**
21
+ * Client for making requests to the WooCommerce Payments API
22
+ *
23
+ * @var WC_Payments_API_Client
24
+ */
25
+ private $payments_api_client;
26
+
27
+ /**
28
+ * Class constructor
29
+ *
30
+ * @param WC_Payments_API_Client $payments_api_client Payments API client.
31
+ */
32
+ public function __construct( WC_Payments_API_Client $payments_api_client ) {
33
+ $this->payments_api_client = $payments_api_client;
34
+
35
+ add_action( 'admin_init', array( $this, 'check_stripe_account_status' ) );
36
+ add_action( 'woocommerce_init', array( $this, 'maybe_handle_oauth' ) );
37
+ add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) );
38
+ }
39
+
40
+ /**
41
+ * Return connected account ID
42
+ *
43
+ * @return string|null Account ID if connected, null if not connected or on error
44
+ *
45
+ * @throws Exception Bubbles up if get_account_data call fails.
46
+ */
47
+ public function get_stripe_account_id() {
48
+ $account = $this->get_cached_account_data();
49
+
50
+ if ( empty( $account ) ) {
51
+ return null;
52
+ }
53
+
54
+ return $account['account_id'];
55
+ }
56
+
57
+ /**
58
+ * Gets public key for the connected account
59
+ *
60
+ * @param bool $is_test true to get the test key, false otherwise.
61
+ *
62
+ * @return string|null public key if connected, null if not connected.
63
+ *
64
+ * @throws Exception Bubbles up if get_account_data call fails.
65
+ */
66
+ public function get_publishable_key( $is_test ) {
67
+ $account = $this->get_cached_account_data();
68
+
69
+ if ( empty( $account ) ) {
70
+ return null;
71
+ }
72
+
73
+ if ( $is_test ) {
74
+ return $account['test_publishable_key'];
75
+ }
76
+
77
+ return $account['live_publishable_key'];
78
+ }
79
+
80
+ /**
81
+ * Checks if the account is connected, assumes the value of $on_error on server error
82
+ *
83
+ * @param bool $on_error Value to return on server error, defaults to false.
84
+ *
85
+ * @return bool True if the account is connected, false otherwise, $on_error on error.
86
+ */
87
+ public function is_stripe_connected( $on_error = false ) {
88
+ try {
89
+ return $this->try_is_stripe_connected();
90
+ } catch ( Exception $e ) {
91
+ return $on_error;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Checks if the account is connected, throws on server error
97
+ *
98
+ * @return bool True if the account is connected, false otherwise.
99
+ *
100
+ * @throws Exception Bubbles up if get_account_data call fails.
101
+ */
102
+ public function try_is_stripe_connected() {
103
+ $account = $this->get_cached_account_data();
104
+
105
+ if ( is_array( $account ) && empty( $account ) ) {
106
+ // empty array means no account.
107
+ return false;
108
+ }
109
+
110
+ return true;
111
+ }
112
+
113
+ /**
114
+ * Gets the account status data for rendering on the settings page.
115
+ *
116
+ * @return array An array containing the status data.
117
+ */
118
+ public function get_account_status_data() {
119
+ try {
120
+ $account = $this->get_cached_account_data();
121
+ } catch ( Exception $e ) {
122
+ return array(
123
+ 'error' => true,
124
+ );
125
+ }
126
+
127
+ if ( is_array( $account ) && empty( $account ) ) {
128
+ // empty array means no account. This data should not be used when the account is not connected.
129
+ return array(
130
+ 'error' => true,
131
+ );
132
+ }
133
+
134
+ if ( ! isset( $account['status'] )
135
+ || ! isset( $account['payments_enabled'] )
136
+ || ! isset( $account['deposits_status'] ) ) {
137
+ // return an error if any of the account data is missing.
138
+ return array(
139
+ 'error' => true,
140
+ );
141
+ }
142
+
143
+ return array(
144
+ 'status' => $account['status'],
145
+ 'paymentsEnabled' => $account['payments_enabled'],
146
+ 'depositsStatus' => $account['deposits_status'],
147
+ 'currentDeadline' => isset( $account['current_deadline'] ) ? $account['current_deadline'] : false,
148
+ 'accountLink' => $this->get_login_url(),
149
+ );
150
+ }
151
+
152
+ /**
153
+ * Checks if Stripe account is connected and displays admin notices if it is not.
154
+ *
155
+ * @return bool True if the account is connected properly.
156
+ */
157
+ public function check_stripe_account_status() {
158
+ try {
159
+ $account = $this->get_cached_account_data();
160
+ } catch ( Exception $e ) {
161
+ // Return early. The exceptions have been logged in the http client.
162
+ return false;
163
+ }
164
+
165
+ if ( empty( $account ) ) {
166
+ if ( ! self::is_on_boarding_disabled() ) {
167
+ $message = self::get_connection_message_html();
168
+ } else {
169
+ // On-boarding has been disabled on the server, so show a message to that effect.
170
+ $message = esc_html__(
171
+ 'Thank you for installing and activating WooCommerce Payments! We\'ve temporarily paused new account creation. We\'ll notify you when we resume!',
172
+ 'woocommerce-payments'
173
+ );
174
+ }
175
+
176
+ add_filter(
177
+ 'admin_notices',
178
+ function () use ( $message ) {
179
+ WC_Payments::display_admin_notice(
180
+ $message,
181
+ 'notice-success'
182
+ );
183
+ }
184
+ );
185
+ return false;
186
+ }
187
+
188
+ return true;
189
+ }
190
+
191
+ /**
192
+ * Filter function to add Stripe to the list of allowed redirect hosts
193
+ *
194
+ * @param array $hosts - array of allowed hosts.
195
+ *
196
+ * @return array allowed hosts
197
+ */
198
+ public function allowed_redirect_hosts( $hosts ) {
199
+ $hosts[] = 'connect.stripe.com';
200
+ return $hosts;
201
+ }
202
+
203
+ /**
204
+ * Handle OAuth (login/init/redirect) routes
205
+ */
206
+ public function maybe_handle_oauth() {
207
+ if ( ! is_admin() ) {
208
+ return;
209
+ }
210
+
211
+ if ( isset( $_GET['wcpay-login'] ) && check_admin_referer( 'wcpay-login' ) ) {
212
+ try {
213
+ $this->redirect_to_login();
214
+ } catch ( Exception $e ) {
215
+ $this->add_notice_to_settings_page(
216
+ __( 'There was a problem redirecting you to the account dashboard. Please try again.', 'woocommerce-payments' ),
217
+ 'notice-error'
218
+ );
219
+ }
220
+ return;
221
+ }
222
+
223
+ if ( isset( $_GET['wcpay-connection-success'] ) ) {
224
+ $this->add_notice_to_settings_page(
225
+ __( 'Thanks for verifying your business details. You\'re ready to start taking payments!', 'woocommerce-payments' ),
226
+ 'notice-success'
227
+ );
228
+ }
229
+
230
+ if ( isset( $_GET['wcpay-connect'] ) && check_admin_referer( 'wcpay-connect' ) ) {
231
+ try {
232
+ $this->init_oauth();
233
+ } catch ( Exception $e ) {
234
+ $this->add_notice_to_settings_page(
235
+ __( 'There was a problem redirecting you to the account connection page. Please try again.', 'woocommerce-payments' ),
236
+ 'notice-error'
237
+ );
238
+ }
239
+ return;
240
+ }
241
+
242
+ if (
243
+ isset( $_GET['wcpay-state'] )
244
+ && isset( $_GET['wcpay-mode'] )
245
+ ) {
246
+ $state = sanitize_text_field( wp_unslash( $_GET['wcpay-state'] ) );
247
+ $mode = sanitize_text_field( wp_unslash( $_GET['wcpay-mode'] ) );
248
+ $this->finalize_connection( $state, $mode );
249
+ return;
250
+ }
251
+ }
252
+
253
+ /**
254
+ * Returns html markup containing the connection message.
255
+ *
256
+ * @return string Connection message.
257
+ */
258
+ public static function get_connection_message_html() {
259
+ ob_start();
260
+ ?>
261
+ <p>
262
+ <?php
263
+ esc_html_e(
264
+ 'Accept credit cards online using WooCommerce Payments. Simply verify your business details to get started.',
265
+ 'woocommerce-payments'
266
+ );
267
+ ?>
268
+ </p>
269
+ <p>
270
+ <?php
271
+ echo WC_Payments_Utils::esc_interpolated_html(
272
+ __( 'By clicking “Verify details,” you agree to the <a>Terms of Service</a>.', 'woocommerce-payments' ),
273
+ [ 'a' => '<a href="https://wordpress.com/tos">' ]
274
+ );
275
+ ?>
276
+ </p>
277
+ <p>
278
+ <a href="<?php echo esc_attr( self::get_connect_url() ); ?>" class="button">
279
+ <?php esc_html_e( ' Verify details', 'woocommerce-payments' ); ?>
280
+ </a>
281
+ </p>
282
+ <?php
283
+ return ob_get_clean();
284
+ }
285
+
286
+ /**
287
+ * Get Stripe login url
288
+ *
289
+ * @return string Stripe account login url.
290
+ */
291
+ public static function get_login_url() {
292
+ return add_query_arg(
293
+ [
294
+ 'wcpay-login' => '1',
295
+ '_wpnonce' => wp_create_nonce( 'wcpay-login' ),
296
+ ]
297
+ );
298
+ }
299
+
300
+ /**
301
+ * Get Stripe connect url
302
+ *
303
+ * @return string Stripe account login url.
304
+ */
305
+ public static function get_connect_url() {
306
+ return wp_nonce_url( add_query_arg( [ 'wcpay-connect' => '1' ] ), 'wcpay-connect' );
307
+ }
308
+
309
+ /**
310
+ * Has on-boarding been disabled?
311
+ *
312
+ * @return boolean
313
+ */
314
+ public static function is_on_boarding_disabled() {
315
+ // If the transient isn't set at all, we'll get false indicating that the server hasn't informed us that
316
+ // on-boarding has been disabled (i.e. it's enabled as far as we know).
317
+ return get_transient( self::ON_BOARDING_DISABLED_TRANSIENT );
318
+ }
319
+
320
+ /**
321
+ * For the connected account, fetches the login url from the API and redirects to it
322
+ */
323
+ private function redirect_to_login() {
324
+ // Clear account transient when generating Stripe dashboard's login link.
325
+ delete_transient( self::ACCOUNT_TRANSIENT );
326
+
327
+ $login_data = $this->payments_api_client->get_login_data( WC_Payment_Gateway_WCPay::get_settings_url() );
328
+ wp_safe_redirect( $login_data['url'] );
329
+ exit;
330
+ }
331
+
332
+ /**
333
+ * Initializes the OAuth flow by fetching the URL from the API and redirecting to it
334
+ */
335
+ private function init_oauth() {
336
+ // Clear account transient when generating Stripe's oauth data.
337
+ delete_transient( self::ACCOUNT_TRANSIENT );
338
+
339
+ $current_user = wp_get_current_user();
340
+
341
+ $oauth_data = $this->payments_api_client->get_oauth_data(
342
+ WC_Payment_Gateway_WCPay::get_settings_url(),
343
+ array(
344
+ 'email' => $current_user->user_email,
345
+ 'business_name' => get_bloginfo( 'name' ),
346
+ )
347
+ );
348
+
349
+ if ( false === $oauth_data['url'] ) {
350
+ WC_Payments::get_gateway()->update_option( 'enabled', 'yes' );
351
+ wp_safe_redirect(
352
+ add_query_arg(
353
+ array( 'wcpay-connection-success' => '1' ),
354
+ WC_Payment_Gateway_WCPay::get_settings_url()
355
+ )
356
+ );
357
+ exit;
358
+ }
359
+
360
+ set_transient( 'wcpay_oauth_state', $oauth_data['state'], DAY_IN_SECONDS );
361
+
362
+ wp_safe_redirect( $oauth_data['url'] );
363
+ exit;
364
+ }
365
+
366
+ /**
367
+ * Once the API redirects back to the site after the OAuth flow, verifies the parameters and stores the data
368
+ *
369
+ * @param string $state Secret string.
370
+ * @param string $mode Mode in which this account has been connected. Either 'test' or 'live'.
371
+ */
372
+ private function finalize_connection( $state, $mode ) {
373
+ if ( get_transient( 'wcpay_oauth_state' ) !== $state ) {
374
+ $this->add_notice_to_settings_page(
375
+ __( 'There was a problem processing your account data. Please try again.', 'woocommerce-payments' ),
376
+ 'notice-error'
377
+ );
378
+ return;
379
+ }
380
+ delete_transient( 'wcpay_oauth_state' );
381
+ delete_transient( self::ACCOUNT_TRANSIENT );
382
+
383
+ WC_Payments::get_gateway()->update_option( 'enabled', 'yes' );
384
+ WC_Payments::get_gateway()->update_option( 'test_mode', 'test' === $mode ? 'yes' : 'no' );
385
+
386
+ wp_safe_redirect(
387
+ add_query_arg(
388
+ array( 'wcpay-connection-success' => '1' ),
389
+ WC_Payment_Gateway_WCPay::get_settings_url()
390
+ )
391
+ );
392
+ exit;
393
+ }
394
+
395
+ /**
396
+ * Gets and caches the data for the account connected to this site.
397
+ *
398
+ * @return array Account data;
399
+ *
400
+ * @throws WC_Payments_API_Exception Bubbles up if get_account_data call fails.
401
+ */
402
+ private function get_cached_account_data() {
403
+ $account = get_transient( self::ACCOUNT_TRANSIENT );
404
+
405
+ if ( $this->is_valid_cached_account( $account ) ) {
406
+ return $account;
407
+ }
408
+
409
+ try {
410
+ // Since we're about to call the server again, clear out the on-boarding disabled flag. We can let the code
411
+ // below re-create it if the server tells us on-boarding is still disabled.
412
+ delete_transient( self::ON_BOARDING_DISABLED_TRANSIENT );
413
+
414
+ $account = $this->payments_api_client->get_account_data();
415
+ } catch ( WC_Payments_API_Exception $e ) {
416
+ if ( 'wcpay_account_not_found' === $e->get_error_code() ) {
417
+ // Special case - detect account not connected and cache it.
418
+ $account = array();
419
+ } elseif ( 'wcpay_on_boarding_disabled' === $e->get_error_code() ) {
420
+ // Special case - detect account not connected and on-boarding disabled. This will get updated the
421
+ // next time we call the server for account information, but just in case we set the expiry time for
422
+ // this setting an hour longer than the account details transient.
423
+ $account = array();
424
+ set_transient( self::ON_BOARDING_DISABLED_TRANSIENT, true, 2 * HOUR_IN_SECONDS );
425
+ } else {
426
+ throw $e;
427
+ }
428
+ }
429
+
430
+ // Cache the account details so we don't call the server every time.
431
+ set_transient( self::ACCOUNT_TRANSIENT, $account, 2 * HOUR_IN_SECONDS );
432
+ return $account;
433
+ }
434
+
435
+ /**
436
+ * Checks if the cached account can be used in the current plugin state.
437
+ *
438
+ * @param bool|array $account cached account data.
439
+ *
440
+ * @return bool True if the cached account is valid.
441
+ */
442
+ private function is_valid_cached_account( $account ) {
443
+ // false means no account has been cached.
444
+ if ( false === $account ) {
445
+ return false;
446
+ }
447
+
448
+ // empty array - special value to indicate that there's no account connected.
449
+ if ( empty( $account ) ) {
450
+ return true;
451
+ }
452
+
453
+ // live accounts are always valid.
454
+ if ( $account['is_live'] ) {
455
+ return true;
456
+ }
457
+
458
+ // test accounts are valid only when in dev mode.
459
+ if ( WC_Payments::get_gateway()->is_in_dev_mode() ) {
460
+ return true;
461
+ }
462
+
463
+ return false;
464
+ }
465
+
466
+ /**
467
+ * Adds a notice that will be forced to be visible on the settings page, despite WcAdmin hiding other notices.
468
+ *
469
+ * @param string $message Notice message.
470
+ * @param string $classes Classes to apply, for example notice-error, notice-success.
471
+ */
472
+ private function add_notice_to_settings_page( $message, $classes ) {
473
+ $classes .= ' wcpay-settings-notice'; // add a class that will be shown on the settings page.
474
+ add_filter(
475
+ 'admin_notices',
476
+ function () use ( $message, $classes ) {
477
+ WC_Payments::display_admin_notice( $message, $classes );
478
+ }
479
+ );
480
+ }
481
+ }
includes/class-wc-payments-utils.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Payments_Utils
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * WC Payments Utils class
14
+ */
15
+ class WC_Payments_Utils {
16
+ /**
17
+ * Mirrors JS's createInterpolateElement functionality.
18
+ * Returns a string where angle brackets expressions are replaced with unescaped html while the rest is escaped.
19
+ *
20
+ * @param string $string string to process.
21
+ * @param array $element_map map of elements to not escape.
22
+ *
23
+ * @return string String where all of the html was escaped, except for the tags specified in element map.
24
+ */
25
+ public static function esc_interpolated_html( $string, $element_map ) {
26
+ // Regex to match string expressions wrapped in angle brackets.
27
+ $tokenizer = '/<(\/)?(\w+)\s*(\/)?>/';
28
+ $string_queue = [];
29
+ $token_queue = [];
30
+ $last_mapped = true;
31
+ // Start with a copy of the string.
32
+ $processed = $string;
33
+
34
+ // Match every angle bracket expression.
35
+ while ( preg_match( $tokenizer, $processed, $matches ) ) {
36
+ $matched = $matches[0];
37
+ $token = $matches[2];
38
+ // Determine if the expression is closing (</a>) or self-closed (<img />).
39
+ $is_closing = ! empty( $matches[1] );
40
+ $is_self_closed = ! empty( $matches[3] );
41
+
42
+ // Split the string on the current matched token.
43
+ $split = explode( $matched, $processed, 2 );
44
+ if ( $last_mapped ) {
45
+ // If the previous token was present in the element map, or we're at the start, put the string between it and the current token in the queue.
46
+ $string_queue[] = $split[0];
47
+ } else {
48
+ // If the previous token was not found in the elements map, append it together with the string before the current token to the last item in the queue.
49
+ $string_queue[ count( $string_queue ) - 1 ] .= $split[0];
50
+ }
51
+ // String is now the bit after the current token.
52
+ $processed = $split[1];
53
+
54
+ // Check if the current token is in the map.
55
+ if ( isset( $element_map[ $token ] ) ) {
56
+ $map_matched = preg_match( '/^<(\w+)(\s.+?)?\/?>$/', $element_map[ $token ], $map_matches );
57
+ if ( ! $map_matches ) {
58
+ // Should not happen with the properly formatted html as map value. Return the whole string escaped.
59
+ return esc_html( $string );
60
+ }
61
+ // Add the matched token and its attributes into the token queue. It will not be escaped when constructing the final string.
62
+ $tag = $map_matches[1];
63
+ $attrs = isset( $map_matches[2] ) ? $map_matches[2] : '';
64
+ if ( $is_closing ) {
65
+ $token_queue[] = '</' . $tag . '>';
66
+ } elseif ( $is_self_closed ) {
67
+ $token_queue[] = '<' . $tag . $attrs . '/>';
68
+ } else {
69
+ $token_queue[] = '<' . $tag . $attrs . '>';
70
+ }
71
+
72
+ // Mark the current token as found in the map.
73
+ $last_mapped = true;
74
+ } else {
75
+ // Append the current token into the string queue. It will be escaped.
76
+ $string_queue[ count( $string_queue ) - 1 ] .= $matched;
77
+ // Mark the current token as not found in the map.
78
+ $last_mapped = false;
79
+ }
80
+ }
81
+
82
+ // No mapped tokens were found in the string, or token and string queues are not of equal length.
83
+ // The latter should not happen - token queue and string queue should be the same length.
84
+ if ( empty( $token_queue ) || count( $token_queue ) !== count( $string_queue ) ) {
85
+ return esc_html( $string );
86
+ }
87
+
88
+ // Construct the final string by escaping the string queue values and not escaping the token queue.
89
+ $result = '';
90
+ while ( ! empty( $token_queue ) ) {
91
+ $result .= esc_html( array_shift( $string_queue ) ) . array_shift( $token_queue );
92
+ }
93
+ $result .= esc_html( $processed );
94
+
95
+ return $result;
96
+ }
97
+ }
includes/class-wc-payments.php ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Payments
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ use WCPay\Logger;
13
+
14
+ /**
15
+ * Main class for the WooCommerce Payments extension. Its responsibility is to initialize the extension.
16
+ */
17
+ class WC_Payments {
18
+
19
+ /**
20
+ * Instance of WC_Payment_Gateway_WCPay, created in init function.
21
+ *
22
+ * @var WC_Payment_Gateway_WCPay
23
+ */
24
+ private static $gateway;
25
+
26
+ /**
27
+ * Instance of WC_Payments_API_Client, created in init function.
28
+ *
29
+ * @var WC_Payments_API_Client
30
+ */
31
+ private static $api_client;
32
+
33
+ /**
34
+ * Instance of WC_Payments_Account, created in init function.
35
+ *
36
+ * @var WC_Payments_Account
37
+ */
38
+ private static $account;
39
+
40
+ /**
41
+ * Cache for plugin headers to avoid multiple calls to get_file_data
42
+ *
43
+ * @var array
44
+ */
45
+ private static $plugin_headers = null;
46
+
47
+ /**
48
+ * Entry point to the initialization logic.
49
+ */
50
+ public static function init() {
51
+ define( 'WCPAY_VERSION_NUMBER', self::get_plugin_headers()['Version'] );
52
+
53
+ include_once dirname( __FILE__ ) . '/class-wc-payments-utils.php';
54
+
55
+ if ( ! self::check_plugin_dependencies( true ) ) {
56
+ add_filter( 'admin_notices', array( __CLASS__, 'check_plugin_dependencies' ) );
57
+ return;
58
+ }
59
+
60
+ if ( ! self::check_multi_currency_disabled() ) {
61
+ return;
62
+ };
63
+
64
+ add_filter( 'plugin_action_links_' . plugin_basename( WCPAY_PLUGIN_FILE ), array( __CLASS__, 'add_plugin_links' ) );
65
+
66
+ self::$api_client = self::create_api_client();
67
+
68
+ include_once dirname( __FILE__ ) . '/class-wc-payments-account.php';
69
+ include_once dirname( __FILE__ ) . '/class-logger.php';
70
+ include_once dirname( __FILE__ ) . '/class-wc-payment-gateway-wcpay.php';
71
+ self::$account = new WC_Payments_Account( self::$api_client );
72
+ self::$gateway = new WC_Payment_Gateway_WCPay( self::$api_client, self::$account );
73
+
74
+ add_filter( 'woocommerce_payment_gateways', array( __CLASS__, 'register_gateway' ) );
75
+ add_filter( 'option_woocommerce_gateway_order', array( __CLASS__, 'set_gateway_top_of_list' ), 2 );
76
+ add_filter( 'default_option_woocommerce_gateway_order', array( __CLASS__, 'set_gateway_top_of_list' ), 3 );
77
+
78
+ // Add admin screens.
79
+ if ( is_admin() ) {
80
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-payments-admin.php';
81
+ new WC_Payments_Admin( self::$gateway, self::$account );
82
+ }
83
+
84
+ add_action( 'rest_api_init', array( __CLASS__, 'init_rest_api' ) );
85
+ }
86
+
87
+ /**
88
+ * Prints the given message in an "admin notice" wrapper with "error" class.
89
+ *
90
+ * @param string $message Message to print. Can contain HTML.
91
+ */
92
+ public static function display_admin_error( $message ) {
93
+ self::display_admin_notice( $message, 'notice-error' );
94
+ }
95
+
96
+ /**
97
+ * Prints the given message in an "admin notice" wrapper with provided classes.
98
+ *
99
+ * @param string $message Message to print. Can contain HTML.
100
+ * @param string $classes Space separated list of classes to be applied to notice element.
101
+ */
102
+ public static function display_admin_notice( $message, $classes ) {
103
+ ?>
104
+ <div class="notice wcpay-notice <?php echo esc_attr( $classes ); ?>">
105
+ <p><b><?php echo esc_html( __( 'WooCommerce Payments', 'woocommerce-payments' ) ); ?></b></p>
106
+ <p><?php echo $message; // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
107
+ </div>
108
+ <?php
109
+ }
110
+
111
+ /**
112
+ * Get plugin headers and cache the result to avoid reopening the file.
113
+ * First call should execute get_file_data and fetch headers from plugin details comment.
114
+ * Subsequent calls return the value stored in the variable $plugin_headers.
115
+ *
116
+ * @return array Array with plugin headers
117
+ */
118
+ public static function get_plugin_headers() {
119
+ if ( null === self::$plugin_headers ) {
120
+ self::$plugin_headers = get_file_data(
121
+ WCPAY_PLUGIN_FILE,
122
+ array(
123
+ // Mirrors the functionality on WooCommerce core: https://github.com/woocommerce/woocommerce/blob/ff2eadeccec64aa76abd02c931bf607dd819bbf0/includes/wc-core-functions.php#L1916 .
124
+ 'WCRequires' => 'WC requires at least',
125
+ // The "Requires WP" plugin header is proposed and being implemented here: https://core.trac.wordpress.org/ticket/43992
126
+ // TODO: Check before release if the "Requires WP" header name has been accepted, or we should use a header on the readme.txt file instead.
127
+ 'RequiresWP' => 'Requires WP',
128
+ 'Version' => 'Version',
129
+ )
130
+ );
131
+ }
132
+ return self::$plugin_headers;
133
+ }
134
+
135
+ /**
136
+ * Checks if all the dependencies needed to run this plugin are present
137
+ * TODO: Before public launch, revisit these dependencies. We may need to bump the WC dependency so we require one where WC-Admin is already in Core.
138
+ *
139
+ * @param bool $silent True if the function should just return true/false, False if this function should display notice messages for failed dependencies.
140
+ * @return bool True if all dependencies are met, false otherwise
141
+ */
142
+ public static function check_plugin_dependencies( $silent ) {
143
+ if ( defined( 'WCPAY_TEST_ENV' ) && WCPAY_TEST_ENV ) {
144
+ return true;
145
+ }
146
+
147
+ $plugin_headers = self::get_plugin_headers();
148
+
149
+ // Do not show alerts while installing plugins.
150
+ if ( ! $silent && self::is_at_plugin_install_page() ) {
151
+ return true;
152
+ }
153
+
154
+ $wc_version = $plugin_headers['WCRequires'];
155
+ $wp_version = $plugin_headers['RequiresWP'];
156
+
157
+ $plugin_dependencies = array(
158
+ array(
159
+ 'name' => 'WooCommerce',
160
+ 'class' => 'WooCommerce',
161
+ 'slug' => 'woocommerce',
162
+ 'file' => 'woocommerce/woocommerce.php',
163
+ ),
164
+ array(
165
+ 'name' => 'WooCommerce Admin',
166
+ 'class' => '\Automattic\WooCommerce\Admin\FeaturePlugin',
167
+ 'slug' => 'woocommerce-admin',
168
+ 'file' => 'woocommerce-admin/woocommerce-admin.php',
169
+ ),
170
+ array(
171
+ 'name' => 'Jetpack',
172
+ 'class' => 'Jetpack',
173
+ 'slug' => 'jetpack',
174
+ 'file' => 'jetpack/jetpack.php',
175
+ ),
176
+ );
177
+
178
+ // Check if WooCommerce and other dependencies are installed and active.
179
+ foreach ( $plugin_dependencies as $plugin_data ) {
180
+ if ( ! class_exists( $plugin_data['class'] ) ) {
181
+ if ( ! $silent ) {
182
+ $message = WC_Payments_Utils::esc_interpolated_html(
183
+ sprintf(
184
+ /* translators: %1: plugin name */
185
+ __( 'WooCommerce Payments requires <a>%1$s</a> to be installed and active.', 'woocommerce-payments' ),
186
+ $plugin_data['name']
187
+ ),
188
+ [ 'a' => '<a href="https://wordpress.org/plugins/' . trailingslashit( $plugin_data['slug'] ) . '">' ]
189
+ );
190
+
191
+ if ( current_user_can( 'install_plugins' ) ) {
192
+ if ( is_wp_error( validate_plugin( $plugin_data['file'] ) ) ) {
193
+ // The plugin is not installed.
194
+ $activate_url = wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=' . $plugin_data['slug'] ), 'install-plugin_' . $plugin_data['slug'] );
195
+ /* translators: %1: plugin name */
196
+ $activate_text = sprintf( __( 'Install %1$s', 'woocommerce-payments' ), $plugin_data['name'] );
197
+ } else {
198
+ // The plugin is installed, so it just needs to be enabled.
199
+ $activate_url = wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $plugin_data['file'] ), 'activate-plugin_' . $plugin_data['file'] );
200
+ /* translators: %1: plugin name */
201
+ $activate_text = sprintf( __( 'Activate %1$s', 'woocommerce-payments' ), $plugin_data['name'] );
202
+ }
203
+ $message .= ' <a href="' . $activate_url . '">' . $activate_text . '</a>';
204
+ }
205
+
206
+ self::display_admin_error( $message );
207
+ }
208
+ return false;
209
+ }
210
+ }
211
+
212
+ // Check if the current WooCommerce version has WooCommerce Admin bundled (WC 4.0+) but it's disabled using a filter.
213
+ if ( ! defined( 'WC_ADMIN_VERSION_NUMBER' ) ) {
214
+ if ( ! $silent ) {
215
+ self::display_admin_error(
216
+ WC_Payments_Utils::esc_interpolated_html(
217
+ __( 'WooCommerce Payments requires WooCommerce Admin to be enabled. Please remove the <code>woocommerce_admin_disabled</code> filter to use WooCommerce Payments.', 'woocommerce-payments' ),
218
+ [ 'code' => '<code>' ]
219
+ )
220
+ );
221
+ }
222
+ return false;
223
+ }
224
+
225
+ // Check if the version of WooCommerce Admin is compatible with WooCommerce Payments.
226
+ if ( version_compare( WC_ADMIN_VERSION_NUMBER, WCPAY_MIN_WC_ADMIN_VERSION, '<' ) ) {
227
+ if ( ! $silent ) {
228
+ $message = WC_Payments_Utils::esc_interpolated_html(
229
+ sprintf(
230
+ /* translators: %1: required WC-Admin version number, %2: currently installed WC-Admin version number */
231
+ __( 'WooCommerce Payments requires <strong>WooCommerce Admin %1$s</strong> or greater to be installed (you are using %2$s).', 'woocommerce-payments' ),
232
+ WCPAY_MIN_WC_ADMIN_VERSION,
233
+ WC_ADMIN_VERSION_NUMBER
234
+ ),
235
+ [ 'strong' => '<strong>' ]
236
+ );
237
+
238
+ if ( defined( 'WC_ADMIN_PACKAGE_EXISTS' ) ) { // Let's assume for now that any WC-Admin version bundled with WooCommerce will meet our minimum requirements.
239
+ $message .= ' ' . __( 'There is a newer version of WooCommerce Admin bundled with WooCommerce.', 'woocommerce-payments' );
240
+ if ( current_user_can( 'deactivate_plugins' ) ) {
241
+ $deactivate_url = wp_nonce_url( admin_url( 'plugins.php?action=deactivate&plugin=woocommerce-admin/woocommerce-admin.php' ), 'deactivate-plugin_woocommerce-admin/woocommerce-admin.php' );
242
+ $message .= ' <a href="' . $deactivate_url . '">' . __( 'Use the bundled version of WooCommerce Admin', 'woocommerce-payments' ) . '</a>';
243
+ }
244
+ } else {
245
+ if ( current_user_can( 'update_plugins' ) ) {
246
+ $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-plugin&plugin=woocommerce-admin/woocommerce-admin.php' ), 'upgrade-plugin_woocommerce-admin/woocommerce-admin.php' );
247
+ $message .= ' <a href="' . $update_url . '">' . __( 'Update WooCommerce Admin', 'woocommerce-payments' ) . '</a>';
248
+ }
249
+ }
250
+ self::display_admin_error( $message );
251
+ }
252
+ return false;
253
+ }
254
+
255
+ // Check if the version of WooCommerce is compatible with WooCommerce Payments.
256
+ if ( version_compare( WC_VERSION, $wc_version, '<' ) ) {
257
+ if ( ! $silent ) {
258
+ $message = WC_Payments_Utils::esc_interpolated_html(
259
+ sprintf(
260
+ /* translators: %1: required WC version number, %2: currently installed WC version number */
261
+ __( 'WooCommerce Payments requires <strong>WooCommerce %1$s</strong> or greater to be installed (you are using %2$s).', 'woocommerce-payments' ),
262
+ $wc_version,
263
+ WC_VERSION
264
+ ),
265
+ [ 'strong' => '<strong>' ]
266
+ );
267
+ if ( current_user_can( 'update_plugins' ) ) {
268
+ // Take the user to the "plugins" screen instead of trying to update WooCommerce inline. WooCommerce adds important information
269
+ // on its plugin row regarding the currently installed extensions and their compatibility with the latest WC version.
270
+ $message .= ' <a href="' . admin_url( 'plugins.php' ) . '">' . __( 'Update WooCommerce', 'woocommerce-payments' ) . '</a>';
271
+ }
272
+ self::display_admin_error( $message );
273
+ }
274
+ return false;
275
+ }
276
+
277
+ // Check if the version of WordPress is compatible with WooCommerce Payments.
278
+ if ( version_compare( get_bloginfo( 'version' ), $wp_version, '<' ) ) {
279
+ if ( ! $silent ) {
280
+ $message = WC_Payments_Utils::esc_interpolated_html(
281
+ sprintf(
282
+ /* translators: %1: required WP version number, %2: currently installed WP version number */
283
+ __( 'WooCommerce Payments requires <strong>WordPress %1$s</strong> or greater (you are using %2$s).', 'woocommerce-payments' ),
284
+ $wp_version,
285
+ get_bloginfo( 'version' )
286
+ ),
287
+ [ 'strong' => '<strong>' ]
288
+ );
289
+ if ( current_user_can( 'update_core' ) ) {
290
+ $message .= ' <a href="' . admin_url( 'update-core.php' ) . '">' . __( 'Update WordPress', 'woocommerce-payments' ) . '</a>';
291
+ }
292
+ self::display_admin_error( $message );
293
+ }
294
+ return false;
295
+ }
296
+
297
+ // Check if Jetpack is connected.
298
+ if ( ! self::is_jetpack_connected() ) {
299
+ // Do not show an alert on Jetpack admin pages.
300
+ if ( ! $silent && ! self::is_at_jetpack_admin_page() ) {
301
+ $set_up_url = wp_nonce_url( 'admin.php?page=jetpack' );
302
+ $message = WC_Payments_Utils::esc_interpolated_html(
303
+ sprintf(
304
+ /* translators: %1: WooCommerce Payments version */
305
+ __( 'To use WooCommerce Payments %1$s you\'ll need to <a>set up</a> the Jetpack plugin.', 'woocommerce-payments' ),
306
+ WCPAY_VERSION_NUMBER
307
+ ),
308
+ [ 'a' => '<a href="' . $set_up_url . '">' ]
309
+ );
310
+ self::display_admin_error( $message );
311
+ }
312
+
313
+ return false;
314
+ }
315
+
316
+ return true;
317
+ }
318
+
319
+ /**
320
+ * Checks if current page is plugin installation process page.
321
+ *
322
+ * @return bool True when installing plugin.
323
+ */
324
+ private static function is_at_plugin_install_page() {
325
+ $cur_screen = get_current_screen();
326
+ return 'update' === $cur_screen->id && 'plugins' === $cur_screen->parent_base;
327
+ }
328
+
329
+ /**
330
+ * Checks if current page is Jetpack admin page.
331
+ *
332
+ * @return bool True when current page is one of the Jetpack admin pages.
333
+ */
334
+ private static function is_at_jetpack_admin_page() {
335
+ $cur_screen = get_current_screen();
336
+ return 'jetpack' === $cur_screen->parent_base;
337
+ }
338
+
339
+ /**
340
+ * Checks if Jetpack is connected.
341
+ *
342
+ * @return bool true if Jetpack connection is available and authenticated.
343
+ */
344
+ public static function is_jetpack_connected() {
345
+ require_once dirname( __FILE__ ) . '/wc-payment-api/class-wc-payments-http.php';
346
+ return WC_Payments_Http::is_connected();
347
+ }
348
+
349
+ /**
350
+ * Checks whether Woo Multi-Currency is disabled and displays admin error message if enabled.
351
+ * TODO: Once Multi-Currency support is implemented, remove this check.
352
+ *
353
+ * @return bool True if Woo Multi-Currency is not enabled, false otherwise.
354
+ */
355
+ public static function check_multi_currency_disabled() {
356
+ if ( class_exists( 'WOOMC\MultiCurrency\App' ) ) {
357
+ $message = sprintf(
358
+ /* translators: %1: WooCommerce Payments version */
359
+ __( 'WooCommerce Payments %1$s does not support WooCommerce Multi-Currency and has not been loaded.', 'woocommerce-payments' ),
360
+ WCPAY_VERSION_NUMBER
361
+ );
362
+
363
+ add_filter(
364
+ 'admin_notices',
365
+ function () use ( $message ) {
366
+ self::display_admin_error( $message );
367
+ }
368
+ );
369
+ return false;
370
+ }
371
+
372
+ return true;
373
+ }
374
+
375
+ /**
376
+ * Adds links to the plugin's row in the "Plugins" Wp-Admin page.
377
+ *
378
+ * @see https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
379
+ * @param array $links The existing list of links that will be rendered.
380
+ * @return array The list of links that will be rendered, after adding some links specific to this plugin.
381
+ */
382
+ public static function add_plugin_links( $links ) {
383
+ $plugin_links = array(
384
+ '<a href="' . esc_attr( WC_Payment_Gateway_WCPay::get_settings_url() ) . '">' . esc_html__( 'Settings', 'woocommerce-payments' ) . '</a>',
385
+ );
386
+
387
+ return array_merge( $plugin_links, $links );
388
+ }
389
+
390
+ /**
391
+ * Adds the WooCommerce Payments' gateway class to the list of installed payment gateways.
392
+ *
393
+ * @param array $gateways Existing list of gateway classes that will be available for the merchant to configure.
394
+ * @return array The list of payment gateways that will be available, including WooCommerce Payments' Gateway class.
395
+ */
396
+ public static function register_gateway( $gateways ) {
397
+ $gateways[] = self::$gateway;
398
+
399
+ return $gateways;
400
+ }
401
+
402
+ /**
403
+ * By default, new payment gateways are put at the bottom of the list on the admin "Payments" settings screen.
404
+ * For visibility, we want WooCommerce Payments to be at the top of the list.
405
+ *
406
+ * @param array $ordering Existing ordering of the payment gateways.
407
+ *
408
+ * @return array Modified ordering.
409
+ */
410
+ public static function set_gateway_top_of_list( $ordering ) {
411
+ $ordering = (array) $ordering;
412
+ $id = self::$gateway->id;
413
+ // Only tweak the ordering if the list hasn't been reordered with WooCommerce Payments in it already.
414
+ if ( ! isset( $ordering[ $id ] ) || ! is_numeric( $ordering[ $id ] ) ) {
415
+ $ordering[ $id ] = empty( $ordering ) ? 0 : ( min( $ordering ) - 1 );
416
+ }
417
+ return $ordering;
418
+ }
419
+
420
+ /**
421
+ * Create the API client.
422
+ *
423
+ * @return WC_Payments_API_Client
424
+ */
425
+ public static function create_api_client() {
426
+ require_once dirname( __FILE__ ) . '/wc-payment-api/models/class-wc-payments-api-charge.php';
427
+ require_once dirname( __FILE__ ) . '/wc-payment-api/models/class-wc-payments-api-intention.php';
428
+ require_once dirname( __FILE__ ) . '/wc-payment-api/class-wc-payments-api-client.php';
429
+ require_once dirname( __FILE__ ) . '/wc-payment-api/class-wc-payments-api-exception.php';
430
+ require_once dirname( __FILE__ ) . '/wc-payment-api/class-wc-payments-http.php';
431
+
432
+ $payments_api_client = new WC_Payments_API_Client(
433
+ 'WooCommerce Payments/' . WCPAY_VERSION_NUMBER,
434
+ new WC_Payments_Http()
435
+ );
436
+
437
+ return $payments_api_client;
438
+ }
439
+
440
+ /**
441
+ * Initialize the REST API controllers.
442
+ */
443
+ public static function init_rest_api() {
444
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-payments-rest-controller.php';
445
+
446
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-rest-payments-deposits-controller.php';
447
+ $deposits_controller = new WC_REST_Payments_Deposits_Controller( self::$api_client );
448
+ $deposits_controller->register_routes();
449
+
450
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-rest-payments-transactions-controller.php';
451
+ $transactions_controller = new WC_REST_Payments_Transactions_Controller( self::$api_client );
452
+ $transactions_controller->register_routes();
453
+
454
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-rest-payments-disputes-controller.php';
455
+ $disputes_controller = new WC_REST_Payments_Disputes_Controller( self::$api_client );
456
+ $disputes_controller->register_routes();
457
+
458
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-rest-payments-charges-controller.php';
459
+ $charges_controller = new WC_REST_Payments_Charges_Controller( self::$api_client );
460
+ $charges_controller->register_routes();
461
+
462
+ include_once WCPAY_ABSPATH . 'includes/admin/class-wc-rest-payments-timeline-controller.php';
463
+ $timeline_controller = new WC_REST_Payments_Timeline_Controller( self::$api_client );
464
+ $timeline_controller->register_routes();
465
+ }
466
+
467
+ /**
468
+ * Gets the file modified time as a cache buster if we're in dev mode, or the plugin version otherwise.
469
+ *
470
+ * @param string $file Local path to the file.
471
+ * @return string The cache buster value to use for the given file.
472
+ */
473
+ public static function get_file_version( $file ) {
474
+ if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
475
+ $file = trim( $file, '/' );
476
+ return filemtime( WCPAY_ABSPATH . $file );
477
+ }
478
+ return WCPAY_VERSION_NUMBER;
479
+ }
480
+
481
+ /**
482
+ * Returns the WC_Payment_Gateway_WCPay instance
483
+ *
484
+ * @return WC_Payment_Gateway_WCPay gateway instance
485
+ */
486
+ public static function get_gateway() {
487
+ return self::$gateway;
488
+ }
489
+ }
includes/wc-payment-api/class-wc-payments-api-client.php ADDED
@@ -0,0 +1,730 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WC_Payments_API_Client class
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ use WCPay\Logger;
11
+
12
+ /**
13
+ * Communicates with WooCommerce Payments API.
14
+ */
15
+ class WC_Payments_API_Client {
16
+
17
+ const ENDPOINT_BASE = 'https://public-api.wordpress.com/wpcom/v2';
18
+ const ENDPOINT_SITE_FRAGMENT = 'sites/%s';
19
+ const ENDPOINT_REST_BASE = 'wcpay';
20
+
21
+ const POST = 'POST';
22
+ const GET = 'GET';
23
+
24
+ const ACCOUNTS_API = 'accounts';
25
+ const CHARGES_API = 'charges';
26
+ const INTENTIONS_API = 'intentions';
27
+ const REFUNDS_API = 'refunds';
28
+ const DEPOSITS_API = 'deposits';
29
+ const TRANSACTIONS_API = 'transactions';
30
+ const DISPUTES_API = 'disputes';
31
+ const FILES_API = 'files';
32
+ const OAUTH_API = 'oauth';
33
+ const TIMELINE_API = 'timeline';
34
+
35
+ /**
36
+ * User agent string to report in requests.
37
+ *
38
+ * @var string
39
+ */
40
+ private $user_agent;
41
+
42
+ /**
43
+ * An HTTP client implementation used to send HTTP requests.
44
+ *
45
+ * @var WC_Payments_Http
46
+ */
47
+ private $http_client;
48
+
49
+ /**
50
+ * WC_Payments_API_Client constructor.
51
+ *
52
+ * @param string $user_agent - User agent string to report in requests.
53
+ * @param WC_Payments_Http $http_client - Used to send HTTP requests.
54
+ */
55
+ public function __construct( $user_agent, $http_client ) {
56
+ $this->user_agent = $user_agent;
57
+ $this->http_client = $http_client;
58
+ }
59
+
60
+ /**
61
+ * Create a charge
62
+ *
63
+ * @param int $amount - Amount to charge.
64
+ * @param string $source_id - ID of the source to associate with charge.
65
+ *
66
+ * @return WC_Payments_API_Charge
67
+ * @throws WC_Payments_API_Exception - Exception thrown on payment failure.
68
+ */
69
+ public function create_charge( $amount, $source_id ) {
70
+
71
+ $request = array();
72
+ $request['amount'] = $amount;
73
+ $request['source'] = $source_id;
74
+
75
+ $response_array = $this->request( $request, self::CHARGES_API, self::POST );
76
+
77
+ return $this->deserialize_charge_object_from_array( $response_array );
78
+ }
79
+
80
+ /**
81
+ * Create an intention, and automatically confirm it.
82
+ *
83
+ * @param int $amount - Amount to charge.
84
+ * @param string $currency_code - Currency to charge in.
85
+ * @param string $payment_method_id - ID of payment method to process charge with.
86
+ * @param bool $manual_capture - Whether to capture funds via manual action.
87
+ *
88
+ * @return WC_Payments_API_Intention
89
+ * @throws WC_Payments_API_Exception - Exception thrown on intention creation failure.
90
+ */
91
+ public function create_and_confirm_intention(
92
+ $amount,
93
+ $currency_code,
94
+ $payment_method_id,
95
+ $manual_capture = false
96
+ ) {
97
+ // TODO: There's scope to have amount and currency bundled up into an object.
98
+ $request = array();
99
+ $request['amount'] = $amount;
100
+ $request['currency'] = $currency_code;
101
+ $request['confirm'] = 'true';
102
+ $request['payment_method'] = $payment_method_id;
103
+ $request['capture_method'] = $manual_capture ? 'manual' : 'automatic';
104
+
105
+ $response_array = $this->request( $request, self::INTENTIONS_API, self::POST );
106
+
107
+ return $this->deserialize_intention_object_from_array( $response_array );
108
+ }
109
+
110
+ /**
111
+ * Confirm an intention
112
+ *
113
+ * @param WC_Payments_API_Intention $intent - The intention to confirm.
114
+ * @param string $payment_method_id - ID of payment method to process charge with.
115
+ *
116
+ * @return WC_Payments_API_Intention
117
+ * @throws WC_Payments_API_Exception - Exception thrown on intention confirmation failure.
118
+ */
119
+ public function confirm_intention( WC_Payments_API_Intention $intent, $payment_method_id ) {
120
+ $request = array();
121
+ $request['payment_method'] = $payment_method_id;
122
+
123
+ $response_array = $this->request(
124
+ $request,
125
+ self::INTENTIONS_API . '/' . $intent->get_id() . '/confirm',
126
+ self::POST
127
+ );
128
+
129
+ return $this->deserialize_intention_object_from_array( $response_array );
130
+ }
131
+
132
+ /**
133
+ * Refund a charge
134
+ *
135
+ * @param string $charge_id - The charge to refund.
136
+ * @param int $amount - Amount to charge.
137
+ *
138
+ * @return array
139
+ * @throws WC_Payments_API_Exception - Exception thrown on refund creation failure.
140
+ */
141
+ public function refund_charge( $charge_id, $amount = null ) {
142
+ $request = array();
143
+ $request['charge'] = $charge_id;
144
+ $request['amount'] = $amount;
145
+
146
+ return $this->request( $request, self::REFUNDS_API, self::POST );
147
+ }
148
+
149
+ /**
150
+ * Capture an intention
151
+ *
152
+ * @param string $intention_id - The ID of the intention to capture.
153
+ * @param int $amount - Amount to capture.
154
+ *
155
+ * @return WC_Payments_API_Intention
156
+ * @throws WC_Payments_API_Exception - Exception thrown on intention capture failure.
157
+ */
158
+ public function capture_intention( $intention_id, $amount ) {
159
+ $request = array();
160
+ $request['amount_to_capture'] = $amount;
161
+
162
+ $response_array = $this->request(
163
+ $request,
164
+ self::INTENTIONS_API . '/' . $intention_id . '/capture',
165
+ self::POST
166
+ );
167
+
168
+ return $this->deserialize_intention_object_from_array( $response_array );
169
+ }
170
+
171
+ /**
172
+ * Cancel an intention
173
+ *
174
+ * @param string $intention_id - The ID of the intention to cancel.
175
+ *
176
+ * @return WC_Payments_API_Intention
177
+ * @throws WC_Payments_API_Exception - Exception thrown on intention cancellation failure.
178
+ */
179
+ public function cancel_intention( $intention_id ) {
180
+ $response_array = $this->request(
181
+ array(),
182
+ self::INTENTIONS_API . '/' . $intention_id . '/cancel',
183
+ self::POST
184
+ );
185
+
186
+ return $this->deserialize_intention_object_from_array( $response_array );
187
+ }
188
+
189
+ /**
190
+ * Retrive an order ID from the DB using a corresponding Stripe charge ID.
191
+ *
192
+ * @param string $charge_id Charge ID corresponding to an order ID.
193
+ *
194
+ * @return null|string
195
+ */
196
+ private function order_id_from_charge_id( $charge_id ) {
197
+ global $wpdb;
198
+
199
+ // The order ID is saved to DB in `WC_Payment_Gateway_WCPay::process_payment()`.
200
+ $order_id = $wpdb->get_var(
201
+ $wpdb->prepare(
202
+ "SELECT DISTINCT ID FROM $wpdb->posts as posts LEFT JOIN $wpdb->postmeta as meta ON posts.ID = meta.post_id WHERE meta.meta_value = %s AND meta.meta_key = '_charge_id'",
203
+ $charge_id
204
+ )
205
+ );
206
+ return $order_id;
207
+ }
208
+
209
+ /**
210
+ * Retrieve an order from the DB using a corresponding Stripe charge ID.
211
+ *
212
+ * @param string $charge_id Charge ID corresponding to an order ID.
213
+ *
214
+ * @return boolean|WC_Order|WC_Order_Refund
215
+ */
216
+ private function order_from_charge_id( $charge_id ) {
217
+ $order_id = $this->order_id_from_charge_id( $charge_id );
218
+
219
+ if ( $order_id ) {
220
+ return wc_get_order( $order_id );
221
+ }
222
+ return false;
223
+ }
224
+
225
+ /**
226
+ * List deposits
227
+ *
228
+ * @param int $page The requested page.
229
+ * @param int $page_size The size of the requested page.
230
+ *
231
+ * @return array
232
+ * @throws WC_Payments_API_Exception - Exception thrown on request failure.
233
+ */
234
+ public function list_deposits( $page = 0, $page_size = 25 ) {
235
+ $query = [
236
+ 'page' => $page,
237
+ 'pagesize' => $page_size,
238
+ ];
239
+
240
+ return $this->request( $query, self::DEPOSITS_API, self::GET );
241
+ }
242
+
243
+ /**
244
+ * Fetch a single deposit with provided id.
245
+ *
246
+ * @param string $deposit_id id of requested deposit.
247
+ * @return array deposit object.
248
+ */
249
+ public function get_deposit( $deposit_id ) {
250
+ return $this->request( array(), self::DEPOSITS_API . '/' . $deposit_id, self::GET );
251
+ }
252
+
253
+ /**
254
+ * Return summary for transactions.
255
+ *
256
+ * @param string $deposit_id The deposit to filter on.
257
+ *
258
+ * @return array The transactions summary.
259
+ * @throws WC_Payments_API_Exception Exception thrown on request failure.
260
+ */
261
+ public function get_transactions_summary( $deposit_id = null ) {
262
+ $query = [
263
+ 'deposit_id' => $deposit_id,
264
+ ];
265
+
266
+ return $this->request( $query, self::TRANSACTIONS_API . '/summary', self::GET );
267
+ }
268
+
269
+ /**
270
+ * List transactions
271
+ *
272
+ * @param int $page The requested page.
273
+ * @param int $page_size The size of the requested page.
274
+ * @param string $deposit_id The deposit to filter on.
275
+ *
276
+ * @return array
277
+ * @throws WC_Payments_API_Exception - Exception thrown on request failure.
278
+ */
279
+ public function list_transactions( $page = 0, $page_size = 25, $deposit_id = null ) {
280
+ $query = [
281
+ 'page' => $page,
282
+ 'pagesize' => $page_size,
283
+ 'deposit_id' => $deposit_id,
284
+ ];
285
+
286
+ $transactions = $this->request( $query, self::TRANSACTIONS_API, self::GET );
287
+
288
+ // Add order information to each transaction available.
289
+ // TODO: Throw exception when `$transactions` or `$transaction` don't have the fields expected?
290
+ if ( isset( $transactions['data'] ) ) {
291
+ foreach ( $transactions['data'] as &$transaction ) {
292
+ $transaction = $this->add_order_info_to_object( $transaction['charge_id'], $transaction );
293
+ }
294
+ }
295
+
296
+ return $transactions;
297
+ }
298
+
299
+ /**
300
+ * Fetch a single transaction with provided id.
301
+ *
302
+ * @param string $transaction_id id of requested transaction.
303
+ * @return array transaction object.
304
+ */
305
+ public function get_transaction( $transaction_id ) {
306
+ $transaction = $this->request( array(), self::TRANSACTIONS_API . '/' . $transaction_id, self::GET );
307
+
308
+ if ( is_wp_error( $transaction ) ) {
309
+ return $transaction;
310
+ }
311
+
312
+ return $this->add_order_info_to_object( $transaction['charge_id'], $transaction );
313
+ }
314
+
315
+ /**
316
+ * Fetch a single charge with provided id.
317
+ *
318
+ * @param string $charge_id id of requested charge.
319
+ * @return array charge object.
320
+ */
321
+ public function get_charge( $charge_id ) {
322
+ $charge = $this->request( array(), self::CHARGES_API . '/' . $charge_id, self::GET );
323
+
324
+ if ( is_wp_error( $charge ) ) {
325
+ return $charge;
326
+ }
327
+
328
+ return $this->add_order_info_to_object( $charge['id'], $charge );
329
+ }
330
+
331
+ /**
332
+ * List disputes
333
+ *
334
+ * @return array
335
+ * @throws WC_Payments_API_Exception - Exception thrown on request failure.
336
+ */
337
+ public function list_disputes() {
338
+ $query = [
339
+ 'limit' => 100,
340
+ ];
341
+
342
+ $disputes = $this->request( $query, self::DISPUTES_API, self::GET );
343
+
344
+ // Add WooCommerce order information to each dispute.
345
+ if ( isset( $disputes['data'] ) ) {
346
+ foreach ( $disputes['data'] as &$dispute ) {
347
+ try {
348
+ // Wrap with try/catch to avoid failing whole request because of a single dispute.
349
+ $dispute = $this->add_order_info_to_object( $dispute['charge']['id'], $dispute );
350
+ } catch ( Exception $e ) {
351
+ // TODO: Log the error once Logger PR (#326) is merged.
352
+ continue;
353
+ }
354
+ }
355
+ }
356
+
357
+ return $disputes;
358
+ }
359
+
360
+ /**
361
+ * Fetch a single dispute with provided id.
362
+ *
363
+ * @param string $dispute_id id of requested dispute.
364
+ * @return array dispute object.
365
+ */
366
+ public function get_dispute( $dispute_id ) {
367
+ $dispute = $this->request( array(), self::DISPUTES_API . '/' . $dispute_id, self::GET );
368
+
369
+ if ( is_wp_error( $dispute ) ) {
370
+ return $dispute;
371
+ }
372
+
373
+ $charge_id = is_array( $dispute['charge'] ) ? $dispute['charge']['id'] : $dispute['charge'];
374
+ return $this->add_order_info_to_object( $charge_id, $dispute );
375
+ }
376
+
377
+ /**
378
+ * Update dispute with provided id.
379
+ *
380
+ * @param string $dispute_id id of dispute to update.
381
+ * @param array $evidence evidence to upload.
382
+ * @param bool $submit whether to submit (rather than stage) evidence.
383
+ * @param array $metadata metadata associated with this dispute.
384
+ *
385
+ * @return array dispute object.
386
+ */
387
+ public function update_dispute( $dispute_id, $evidence, $submit, $metadata ) {
388
+ $request = array(
389
+ 'evidence' => $evidence,
390
+ 'submit' => $submit,
391
+ 'metadata' => $metadata,
392
+ );
393
+
394
+ $dispute = $this->request( $request, self::DISPUTES_API . '/' . $dispute_id, self::POST );
395
+
396
+ if ( is_wp_error( $dispute ) ) {
397
+ return $dispute;
398
+ }
399
+
400
+ $charge_id = is_array( $dispute['charge'] ) ? $dispute['charge']['id'] : $dispute['charge'];
401
+ return $this->add_order_info_to_object( $charge_id, $dispute );
402
+ }
403
+
404
+ /**
405
+ * Close dispute with provided id.
406
+ *
407
+ * @param string $dispute_id id of dispute to close.
408
+ * @return array dispute object.
409
+ */
410
+ public function close_dispute( $dispute_id ) {
411
+ return $this->request( array(), self::DISPUTES_API . '/' . $dispute_id . '/close', self::POST );
412
+ }
413
+
414
+ /**
415
+ * Upload evidence and return file object.
416
+ *
417
+ * @param string $request request object received.
418
+ *
419
+ * @return array file object.
420
+ * @throws WC_Payments_API_Exception - If request throws.
421
+ */
422
+ public function upload_evidence( $request ) {
423
+ $purpose = $request->get_param( 'purpose' );
424
+ $file_params = $request->get_file_params();
425
+ $file_name = $file_params['file']['name'];
426
+ $file_type = $file_params['file']['type'];
427
+
428
+ // Sometimes $file_params is empty array for large files (8+ MB).
429
+ $file_error = empty( $file_params ) || $file_params['file']['error'];
430
+
431
+ if ( $file_error ) {
432
+ // TODO - Add better error message by specifiying which limit is reached (host or Stripe).
433
+ throw new WC_Payments_API_Exception(
434
+ __( 'Max file size exceeded.', 'woocommerce-payments' ),
435
+ 'wcpay_evidence_file_max_size',
436
+ 400
437
+ );
438
+ }
439
+
440
+ $body = [
441
+ // We disable php linting here because otherwise it will show a warning on improper
442
+ // use of `file_get_contents()` and say you should "use `wp_remote_get()` for
443
+ // remote URLs instead", which is unrelated to our use here.
444
+ // phpcs:disable
445
+ 'file' => base64_encode( file_get_contents( $file_params['file']['tmp_name'] ) ),
446
+ // phpcs:enable
447
+ 'file_name' => $file_name,
448
+ 'file_type' => $file_type,
449
+ 'purpose' => $purpose,
450
+ ];
451
+
452
+ try {
453
+ return $this->request( $body, self::FILES_API, self::POST );
454
+ } catch ( WC_Payments_API_Exception $e ) {
455
+ // TODO - Send better error messages to the client once the server is updated.
456
+ // Throw generic error without details to the client.
457
+ throw new WC_Payments_API_Exception(
458
+ __( 'Upload failed.', 'woocommerce-payments' ),
459
+ 'wcpay_evidence_file_upload_error',
460
+ $e->get_http_code()
461
+ );
462
+ }
463
+ }
464
+
465
+ /**
466
+ * Get timeline of events for an intention
467
+ *
468
+ * @param string $intention_id The payment intention ID.
469
+ *
470
+ * @return array
471
+ *
472
+ * @throws Exception - Exception thrown on request failure.
473
+ */
474
+ public function get_timeline( $intention_id ) {
475
+ return $this->request( array(), self::TIMELINE_API . '/' . $intention_id, self::GET );
476
+ }
477
+
478
+ /**
479
+ * Get current account data
480
+ *
481
+ * @return array An array describing an account object.
482
+ */
483
+ public function get_account_data() {
484
+ return $this->request(
485
+ array(
486
+ 'test_mode' => WC_Payments::get_gateway()->is_in_dev_mode(), // only send a test mode request if in dev mode.
487
+ ),
488
+ self::ACCOUNTS_API,
489
+ self::GET
490
+ );
491
+ }
492
+
493
+ /**
494
+ * Get data needed to initialize the OAuth flow
495
+ *
496
+ * @param string $return_url - URL to redirect to at the end of the flow.
497
+ * @param array $business_data - data to prefill the form.
498
+ *
499
+ * @return array An array containing the url and state fields.
500
+ */
501
+ public function get_oauth_data( $return_url, $business_data = array() ) {
502
+ $request_args = apply_filters(
503
+ 'wc_payments_get_oauth_data_args',
504
+ [
505
+ 'return_url' => $return_url,
506
+ 'business_data' => $business_data,
507
+ 'create_live_account' => ! WC_Payments::get_gateway()->is_in_dev_mode(),
508
+ ]
509
+ );
510
+
511
+ return $this->request( $request_args, self::OAUTH_API . '/init', self::POST );
512
+ }
513
+
514
+ /**
515
+ * Get one-time dashboard login url
516
+ *
517
+ * @param string $redirect_url - URL to navigate back to from the dashboard.
518
+ *
519
+ * @return array An array containing the url field
520
+ */
521
+ public function get_login_data( $redirect_url ) {
522
+ return $this->request(
523
+ array(
524
+ 'redirect_url' => $redirect_url,
525
+ 'test_mode' => WC_Payments::get_gateway()->is_in_dev_mode(), // only send a test mode request if in dev mode.
526
+ ),
527
+ self::ACCOUNTS_API . '/login_links',
528
+ self::POST
529
+ );
530
+ }
531
+
532
+ /**
533
+ * Send the request to the WooCommerce Payment API
534
+ *
535
+ * @param array $params - Request parameters to send as either JSON or GET string. Defaults to test_mode=1 if either in dev or test mode, 0 otherwise.
536
+ * @param string $api - The API endpoint to call.
537
+ * @param string $method - The HTTP method to make the request with.
538
+ * @param bool $is_site_specific - If true, the site ID will be included in the request url.
539
+ *
540
+ * @return array
541
+ * @throws WC_Payments_API_Exception - If the account ID hasn't been set.
542
+ */
543
+ private function request( $params, $api, $method, $is_site_specific = true ) {
544
+ // Apply the default params that can be overriden by the calling method.
545
+ $params = wp_parse_args(
546
+ $params,
547
+ array(
548
+ 'test_mode' => WC_Payments::get_gateway()->is_in_test_mode(),
549
+ )
550
+ );
551
+
552
+ // Build the URL we want to send the URL to.
553
+ $url = self::ENDPOINT_BASE;
554
+ if ( $is_site_specific ) {
555
+ $url .= '/' . self::ENDPOINT_SITE_FRAGMENT;
556
+ }
557
+ $url .= '/' . self::ENDPOINT_REST_BASE . '/' . $api;
558
+
559
+ $body = null;
560
+
561
+ if ( self::GET === $method ) {
562
+ $url .= '?' . http_build_query( $params );
563
+ } else {
564
+ // Encode the request body as JSON.
565
+ $body = wp_json_encode( $params );
566
+ if ( ! $body ) {
567
+ throw new WC_Payments_API_Exception(
568
+ __( 'Unable to encode body for request to WooCommerce Payments API.', 'woocommerce-payments' ),
569
+ 'wcpay_client_unable_to_encode_json',
570
+ 0
571
+ );
572
+ }
573
+ }
574
+
575
+ // Create standard headers.
576
+ $headers = array();
577
+ $headers['Content-Type'] = 'application/json; charset=utf-8';
578
+ $headers['User-Agent'] = $this->user_agent;
579
+
580
+ Logger::log( "REQUEST $method $url" );
581
+ $response = $this->http_client->remote_request(
582
+ array(
583
+ 'url' => $url,
584
+ 'method' => $method,
585
+ 'headers' => apply_filters( 'wcpay_api_request_headers', $headers ),
586
+ ),
587
+ $body,
588
+ $is_site_specific
589
+ );
590
+
591
+ $response_body = $this->extract_response_body( $response );
592
+ Logger::log( 'RESPONSE ' . var_export( $response_body, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
593
+
594
+ return $response_body;
595
+ }
596
+
597
+ /**
598
+ * From a given response extract the body. Invalid HTTP codes will result in an error.
599
+ *
600
+ * @param array $response That was given to us by http_client remote_request.
601
+ *
602
+ * @return array $response_body
603
+ *
604
+ * @throws WC_Payments_API_Exception Standard exception in case we can't extract the body.
605
+ */
606
+ protected function extract_response_body( $response ) {
607
+ $response_code = wp_remote_retrieve_response_code( $response );
608
+ if ( ! $response_code ) {
609
+ $response_code = 0;
610
+ }
611
+
612
+ $response_body_json = wp_remote_retrieve_body( $response );
613
+ $response_body = json_decode( $response_body_json, true );
614
+ if ( null === $response_body ) {
615
+ $message = __( 'Unable to decode response from WooCommerce Payments API', 'woocommerce-payments' );
616
+ Logger::error( $message );
617
+ throw new WC_Payments_API_Exception(
618
+ $message,
619
+ 'wcpay_unparseable_or_null_body',
620
+ $response_code
621
+ );
622
+ }
623
+
624
+ // Check error codes for 4xx and 5xx responses.
625
+ if ( 400 <= $response_code ) {
626
+ if ( isset( $response_body['error'] ) ) {
627
+ $error_code = $response_body['error']['code'];
628
+ $error_message = $response_body['error']['message'];
629
+ } elseif ( isset( $response_body['code'] ) ) {
630
+ $error_code = $response_body['code'];
631
+ $error_message = $response_body['message'];
632
+ } else {
633
+ $error_code = 'wcpay_client_error_code_missing';
634
+ $error_message = __( 'Server error. Please try again.', 'woocommerce-payments' );
635
+ }
636
+
637
+ $message = sprintf(
638
+ // translators: This is an error API response.
639
+ _x( 'Error: %1$s', 'API error message to throw as Exception', 'woocommerce-payments' ),
640
+ $error_message
641
+ );
642
+
643
+ Logger::error( "Error: $error_message ($error_code)" );
644
+ throw new WC_Payments_API_Exception( $message, $error_code, $response_code );
645
+ }
646
+
647
+ // Make sure empty metadata serialized on the client as an empty object {} rather than array [].
648
+ if ( isset( $response_body['metadata'] ) && empty( $response_body['metadata'] ) ) {
649
+ $response_body['metadata'] = new stdClass();
650
+ }
651
+
652
+ return $response_body;
653
+ }
654
+
655
+ /**
656
+ * Returns a transaction with order information when it exists.
657
+ *
658
+ * @param string $charge_id related charge id.
659
+ * @param array $object object to add order information.
660
+ * @return array new object with order information.
661
+ */
662
+ private function add_order_info_to_object( $charge_id, $object ) {
663
+ $order = $this->order_from_charge_id( $charge_id );
664
+
665
+ // Add order information to the `$transaction`.
666
+ // If the order couldn't be retrieved, return an empty order.
667
+ $object['order'] = null;
668
+ if ( $order ) {
669
+ $object['order'] = array(
670
+ 'number' => $order->get_order_number(),
671
+ 'url' => $order->get_edit_order_url(),
672
+ );
673
+ }
674
+
675
+ return $object;
676
+ }
677
+
678
+ /**
679
+ * De-serialize a charge array into a charge object
680
+ *
681
+ * @param array $charge_array - The charge array to de-serialize.
682
+ *
683
+ * @return WC_Payments_API_Charge
684
+ * @throws WC_Payments_API_Exception - Unable to deserialize charge array.
685
+ */
686
+ private function deserialize_charge_object_from_array( array $charge_array ) {
687
+ // TODO: Throw an exception if the response array doesn't contain mandatory properties.
688
+ $created = new DateTime();
689
+ $created->setTimestamp( $charge_array['created'] );
690
+
691
+ $charge = new WC_Payments_API_Charge(
692
+ $charge_array['id'],
693
+ $charge_array['amount'],
694
+ $created
695
+ );
696
+
697
+ if ( isset( $charge_array['captured'] ) ) {
698
+ $charge->set_captured( $charge_array['captured'] );
699
+ }
700
+
701
+ return $charge;
702
+ }
703
+
704
+ /**
705
+ * De-serialize an intention array into a intention object
706
+ *
707
+ * @param array $intention_array - The intention array to de-serialize.
708
+ *
709
+ * @return WC_Payments_API_Intention
710
+ * @throws WC_Payments_API_Exception - Unable to deserialize intention array.
711
+ */
712
+ private function deserialize_intention_object_from_array( array $intention_array ) {
713
+ // TODO: Throw an exception if the response array doesn't contain mandatory properties.
714
+ $created = new DateTime();
715
+ $created->setTimestamp( $intention_array['created'] );
716
+
717
+ $charge = 0 < $intention_array['charges']['total_count'] ? end( $intention_array['charges']['data'] ) : null;
718
+
719
+ $intent = new WC_Payments_API_Intention(
720
+ $intention_array['id'],
721
+ $intention_array['amount'],
722
+ $created,
723
+ $intention_array['status'],
724
+ $charge ? $charge['id'] : null
725
+ );
726
+
727
+ return $intent;
728
+ }
729
+
730
+ }
includes/wc-payment-api/class-wc-payments-api-exception.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class WC_Payments_Exception
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit; // Exit if accessed directly.
10
+ }
11
+
12
+ /**
13
+ * Class representing WC_Payments_API_Exception
14
+ */
15
+ class WC_Payments_API_Exception extends Exception {
16
+ /**
17
+ * String error code, for example wcpay_account_not_found.
18
+ *
19
+ * @var string
20
+ */
21
+ private $error_code = '';
22
+
23
+ /**
24
+ * HTTP error code, for example 404, 500 etc.
25
+ *
26
+ * @var int
27
+ */
28
+ private $http_code = 0;
29
+
30
+ /**
31
+ * Constructor
32
+ *
33
+ * @param string $message The Exception message to throw.
34
+ * @param string $error_code Error code returned by the server, for example wcpay_account_not_found.
35
+ * @param int $http_code HTTP response code.
36
+ * @param int $code The Exception code.
37
+ * @param Throwable $previous The previous exception used for the exception chaining.
38
+ */
39
+ public function __construct( $message, $error_code, $http_code, $code = 0, $previous = null ) {
40
+ $this->error_code = $error_code;
41
+ $this->http_code = $http_code;
42
+
43
+ return parent::__construct( $message, $code, $previous );
44
+ }
45
+
46
+ /**
47
+ * Returns the error code.
48
+ *
49
+ * @return string Error code, for example wcpay_account_not_found.
50
+ */
51
+ public function get_error_code() {
52
+ return $this->error_code;
53
+ }
54
+
55
+ /**
56
+ * Returns the HTTP code.
57
+ *
58
+ * @return int HTTP code, for example 404.
59
+ */
60
+ public function get_http_code() {
61
+ return $this->http_code;
62
+ }
63
+ }
includes/wc-payment-api/class-wc-payments-http.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WC_Payments_Http class.
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ use WCPay\Logger;
11
+
12
+ /**
13
+ * A wrapper around Jetpack HTTP request library. Necessary to increase
14
+ * the testability of WC_Payments_API_Client, and allow dependency
15
+ * injection.
16
+ */
17
+ class WC_Payments_Http {
18
+
19
+ /**
20
+ * Sends a remote request through Jetpack (?).
21
+ *
22
+ * @param array $args - The arguments to passed to Jetpack.
23
+ * @param string $body - The body passed on to the HTTP request.
24
+ * @param bool $is_site_specific - If true, the site ID will be included in the request url.
25
+ *
26
+ * @return array HTTP response on success.
27
+ * @throws WC_Payments_API_Exception - If not connected or request failed.
28
+ */
29
+ public function remote_request( $args, $body = null, $is_site_specific = true ) {
30
+ $args['blog_id'] = Jetpack_Options::get_option( 'id' );
31
+ $args['user_id'] = JETPACK_MASTER_USER;
32
+
33
+ if ( $is_site_specific ) {
34
+ $args['url'] = sprintf( $args['url'], $args['blog_id'] );
35
+ }
36
+
37
+ // Make sure we're not sendign requests if Jetpack is not connected.
38
+ if ( ! self::is_connected() ) {
39
+ Logger::error( 'HTTP_REQUEST_ERROR Jetpack is not connected' );
40
+ throw new WC_Payments_API_Exception(
41
+ __( 'Jetpack is not connected', 'woocommerce-payments' ),
42
+ 'wcpay_jetpack_not_connected',
43
+ 409 // HTTP Conflict status code.
44
+ );
45
+ }
46
+
47
+ return self::make_request( $args, $body );
48
+ }
49
+
50
+ /**
51
+ * Makes a request through Jetpack.
52
+ *
53
+ * @param array $args - The arguments passed to Jetpack.
54
+ * @param string $body - The body passed to the HTTP request.
55
+ *
56
+ * @return array HTTP response on success.
57
+ * @throws WC_Payments_API_Exception - If request returns WP_Error.
58
+ */
59
+ private static function make_request( $args, $body ) {
60
+ $response = null;
61
+ // TODO: Either revamp this auth before releasing WCPay, or properly check that Jetpack is installed & connected.
62
+ if ( class_exists( 'Automattic\Jetpack\Connection\Client' ) ) {
63
+ $response = Automattic\Jetpack\Connection\Client::remote_request( $args, $body );
64
+ } else {
65
+ $response = Jetpack_Client::remote_request( $args, $body );
66
+ }
67
+
68
+ if ( is_wp_error( $response ) ) {
69
+ Logger::error( 'HTTP_REQUEST_ERROR ' . var_export( $response, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
70
+ $message = sprintf(
71
+ // translators: %1: original error message.
72
+ __( 'Http request failed. Reason: %1$s', 'woocommerce-payments' ),
73
+ $response->get_error_message()
74
+ );
75
+ throw new WC_Payments_API_Exception( $message, 'wcpay_http_request_failed', 500 );
76
+ }
77
+
78
+ return $response;
79
+ }
80
+
81
+ /**
82
+ * Checks if Jetpack is connected.
83
+ *
84
+ * Checks if connection is authenticated in the same way as Jetpack_Client or Jetpack Connection Client does.
85
+ *
86
+ * @return bool true if Jetpack connection has access token.
87
+ */
88
+ public static function is_connected() {
89
+ if ( class_exists( 'Automattic\Jetpack\Connection\Manager' ) ) {
90
+ return ( new Automattic\Jetpack\Connection\Manager() )->is_active();
91
+ }
92
+
93
+ if ( class_exists( 'Jetpack_Data' ) ) {
94
+ // Pass true as an argument to check user token rather than blog token.
95
+ return (bool) Jetpack_Data::get_access_token( true );
96
+ }
97
+
98
+ return false;
99
+ }
100
+ }
includes/wc-payment-api/models/class-wc-payments-api-charge.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WC_Payments_API_Charge class
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * A charge object used by the WooCommerce Payments API.
12
+ */
13
+ class WC_Payments_API_Charge {
14
+ /**
15
+ * Charge ID
16
+ *
17
+ * @var string
18
+ */
19
+ private $id;
20
+
21
+ /**
22
+ * Charge amount
23
+ *
24
+ * @var int
25
+ */
26
+ private $amount;
27
+
28
+ /**
29
+ * Time charge created
30
+ *
31
+ * Server-side times are presumed to be UTC, (de)serializers should take care to set/respect the timezone on the
32
+ * DateTime object.
33
+ *
34
+ * @var DateTime
35
+ */
36
+ private $created;
37
+
38
+ /**
39
+ * Flag indicated whether the charge has been captured or not
40
+ *
41
+ * @var bool
42
+ */
43
+ private $captured;
44
+
45
+ /**
46
+ * WC_Payments_API_Charge constructor.
47
+ *
48
+ * @param string $id - ID of the charge.
49
+ * @param integer $amount - Amount charged.
50
+ * @param DateTime $created - Time charge created.
51
+ */
52
+ public function __construct( $id, $amount, DateTime $created ) {
53
+ $this->id = $id;
54
+ $this->amount = $amount;
55
+ $this->created = $created;
56
+
57
+ // Set default properties.
58
+ $this->captured = false;
59
+ }
60
+
61
+ /**
62
+ * Gets charge ID
63
+ *
64
+ * @return string
65
+ */
66
+ public function get_id() {
67
+ return $this->id;
68
+ }
69
+
70
+ /**
71
+ * Gets charge amount
72
+ *
73
+ * @return int
74
+ */
75
+ public function get_amount() {
76
+ return $this->amount;
77
+ }
78
+
79
+ /**
80
+ * Gets charge created time
81
+ *
82
+ * @return DateTime
83
+ */
84
+ public function get_created() {
85
+ return $this->created;
86
+ }
87
+
88
+ /**
89
+ * Is the charge captured?
90
+ *
91
+ * @return bool
92
+ */
93
+ public function is_captured() {
94
+ return $this->captured;
95
+ }
96
+
97
+ /**
98
+ * Sets charge captured flag
99
+ *
100
+ * @param bool $captured - Flag indicating capture status of charge.
101
+ */
102
+ public function set_captured( $captured ) {
103
+ $this->captured = $captured;
104
+ }
105
+ }
includes/wc-payment-api/models/class-wc-payments-api-intention.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WC_Payments_API_Intention class
4
+ *
5
+ * @package WooCommerce\Payments
6
+ */
7
+
8
+ /**
9
+ * An intention object used by the WooCommerce Payments API.
10
+ */
11
+ class WC_Payments_API_Intention {
12
+ /**
13
+ * Intention ID
14
+ *
15
+ * @var string
16
+ */
17
+ private $id;
18
+
19
+ /**
20
+ * Charge amount
21
+ *
22
+ * @var int
23
+ */
24
+ private $amount;
25
+
26
+ /**
27
+ * Time charge created
28
+ *
29
+ * Server-side times are presumed to be UTC, (de)serializers should take care to set/respect the timezone on the
30
+ * DateTime object.
31
+ *
32
+ * @var DateTime
33
+ */
34
+ private $created;
35
+
36
+ /**
37
+ * The status of the intention
38
+ *
39
+ * @var string
40
+ */
41
+ private $status;
42
+
43
+ /**
44
+ * WC_Payments_API_Intention constructor.
45
+ *
46
+ * @param string $id - ID of the intention.
47
+ * @param integer $amount - Amount charged.
48
+ * @param DateTime $created - Time charge created.
49
+ * @param string $status - Intention status.
50
+ * @param string $charge_id - ID of charge associated with intention.
51
+ */
52
+ public function __construct( $id, $amount, DateTime $created, $status, $charge_id ) {
53
+ $this->id = $id;
54
+ $this->amount = $amount;
55
+ $this->created = $created;
56
+ $this->status = $status;
57
+ $this->charge_id = $charge_id;
58
+ }
59
+
60
+ /**
61
+ * Gets charge ID
62
+ *
63
+ * @return string
64
+ */
65
+ public function get_id() {
66
+ return $this->id;
67
+ }
68
+
69
+ /**
70
+ * Gets charge amount
71
+ *
72
+ * @return int
73
+ */
74
+ public function get_amount() {
75
+ return $this->amount;
76
+ }
77
+
78
+ /**
79
+ * Gets charge created time
80
+ *
81
+ * @return DateTime
82
+ */
83
+ public function get_created() {
84
+ return $this->created;
85
+ }
86
+
87
+ /**
88
+ * Gets intention status
89
+ *
90
+ * @return string
91
+ */
92
+ public function get_status() {
93
+ return $this->status;
94
+ }
95
+
96
+ /**
97
+ * Returns the charge ID associated with this intention
98
+ *
99
+ * @return string
100
+ */
101
+ public function get_charge_id() {
102
+ return $this->charge_id;
103
+ }
104
+ }
readme.txt ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WooCommerce Payments ===
2
+ Contributors: automattic
3
+ Tags: woocommerce, payment, payment request, credit card, automattic
4
+ Requires at least: 5.0
5
+ Tested up to: 5.4
6
+ Requires PHP: 7.0
7
+ Stable tag: 0.9.0
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Securely accept credit and debit cards on your site. Manage transactions without leaving your WordPress dashboard. Only with WooCommerce Payments
12
+
13
+ == Description ==
14
+
15
+ Securely accept major credit and debit cards on your WooCommerce site. View and manage your transactions without leaving your WordPress dashboard.
16
+
17
+ The only payments plugin designed exclusively for WooCommerce, by WooCommerce.
18
+
19
+ Currently in public beta.
20
+
21
+ **See and manage all transactions in your WooCommerce Payments integrated dashboard**
22
+
23
+ Features normally only available at your payment provider's website are now part of your site's dashboard.
24
+
25
+ - View the details of [payments, refunds and other transactions](https://docs.woocommerce.com/document/payments/#section-4)
26
+ - View and respond to [disputes / chargebacks](https://docs.woocommerce.com/document/payments/disputes/)
27
+ - [View deposits](https://docs.woocommerce.com/document/payments/#section-5) from your account balance to your bank account or debit card
28
+
29
+ **Accept all major credit and debit cards**
30
+
31
+ Increase conversion rates by securely accepting all major credit and debit cards directly on your site.
32
+
33
+ **Pay as you go**
34
+
35
+ No set up fees. No monthly fees. Just 2.9% + $0.30 per transaction on U.S.-issued cards. See all the [fees](https://docs.woocommerce.com/document/payments/faq/fees/).
36
+
37
+ == Getting Started ==
38
+
39
+ = Requirements =
40
+
41
+ * United States-based business.
42
+ * WordPress 5.3 or newer.
43
+ * WooCommerce 3.9 or newer.
44
+ * WooCommerce Admin 1.0 or newer (if running a WooCommerce version less than 4.0)
45
+ * [Jetpack](http://wordpress.org/plugins/jetpack) 5.3 or newer.
46
+ * PHP version 7.0 or newer. PHP 7.2 or newer is recommended.
47
+
48
+ == Installation ==
49
+
50
+ Install and activate the WooCommerce and Jetpack plugins, if you haven't already done so, and connect your site to WordPress.com
51
+
52
+ 1. Log in to your WordPress dashboard.
53
+ 1. Go to: Plugins > Add New.
54
+ 1. Enter "WooCommerce Payments" in the Search field.
55
+ 1. Click "Install Now".
56
+ 1. Go to: Payments
57
+ 1. Create your WooCommerce Payments account.
58
+
59
+ == Frequently Asked Questions ==
60
+
61
+ = What countries and currencies are supported? =
62
+
63
+ If you are an individual or business based in the United States, you can sign-up with WooCommerce Payments. After completing sign up, you can accept payments from customers anywhere in the world in USD. [Learn more](https://docs.woocommerce.com/document/payments/countries/).
64
+
65
+ = This works with WooCommerce, right? =
66
+
67
+ Yep! WooCommerce version 3.9 or newer, please.
68
+
69
+ = Why is a WordPress.com account and connection required? =
70
+
71
+ WooCommerce Payments uses the WordPress.com connection to authenticate each request, connecting your store with our payments partner.
72
+
73
+ = How is WooCommerce Payments related to Stripe? =
74
+
75
+ WooCommerce Payments is proudly powered by [Stripe](https://stripe.com/). When you sign up for WooCommerce Payments, your personal and business information is verified with Stripe and stored in an account connected to the WooCommerce Payments service. This account is then used in the background for managing your business account information and activity via WooCommerce Payments. [Learn more](https://docs.woocommerce.com/document/payments/powered-by-stripe/).
76
+
77
+ = Are there Terms of Service and data usage policies? =
78
+
79
+ You can read our Terms of Service [here](https://en.wordpress.com/tos).
80
+
81
+ == Screenshots ==
82
+
83
+ == Changelog ==
84
+
85
+ = 0.9.0 =
86
+ * Release for Public Beta
87
+
88
+ = 0.8.2 =
89
+
90
+ * Add - Dispute file evidence upload support
91
+ * Add - Basic support for Pay for Order
92
+ * Fix - Styling improvements in wp-admin
93
+ * Fix - Undefined variable PHP notice in cancel_authorization
94
+ * Fix - Remove unused variable in authentication
95
+ * Fix - Improve Jetpack connection checking
96
+
97
+ == Upgrade Notice ==
98
+
99
+ = 0.8.2 =
100
+
101
+ * Add - Dispute file evidence upload support
102
+ * Add - Basic support for Pay for Order
103
+ * Fix - Styling improvements in wp-admin
104
+ * Fix - Undefined variable PHP notice in cancel_authorization
105
+ * Fix - Remove unused variable in authentication
106
+ * Fix - Improve Jetpack connection checking
vendor/autoload.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
+
7
+ return ComposerAutoloaderInit34163a5f4df13994eea60300a32e221d::getLoader();
vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,445 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
+ *
18
+ * $loader = new \Composer\Autoload\ClassLoader();
19
+ *
20
+ * // register classes with namespaces
21
+ * $loader->add('Symfony\Component', __DIR__.'/component');
22
+ * $loader->add('Symfony', __DIR__.'/framework');
23
+ *
24
+ * // activate the autoloader
25
+ * $loader->register();
26
+ *
27
+ * // to enable searching the include path (eg. for PEAR packages)
28
+ * $loader->setUseIncludePath(true);
29
+ *
30
+ * In this example, if you try to use a class in the Symfony\Component
31
+ * namespace or one of its children (Symfony\Component\Console for instance),
32
+ * the autoloader will first look for the class under the component/
33
+ * directory, and it will then fallback to the framework/ directory if not
34
+ * found before giving up.
35
+ *
36
+ * This class is loosely based on the Symfony UniversalClassLoader.
37
+ *
38
+ * @author Fabien Potencier <fabien@symfony.com>
39
+ * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see http://www.php-fig.org/psr/psr-0/
41
+ * @see http://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ // PSR-4
46
+ private $prefixLengthsPsr4 = array();
47
+ private $prefixDirsPsr4 = array();
48
+ private $fallbackDirsPsr4 = array();
49
+
50
+ // PSR-0
51
+ private $prefixesPsr0 = array();
52
+ private $fallbackDirsPsr0 = array();
53
+
54
+ private $useIncludePath = false;
55
+ private $classMap = array();
56
+ private $classMapAuthoritative = false;
57
+ private $missingClasses = array();
58
+ private $apcuPrefix;
59
+
60
+ public function getPrefixes()
61
+ {
62
+ if (!empty($this->prefixesPsr0)) {
63
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
64
+ }
65
+
66
+ return array();
67
+ }
68
+
69
+ public function getPrefixesPsr4()
70
+ {
71
+ return $this->prefixDirsPsr4;
72
+ }
73
+
74
+ public function getFallbackDirs()
75
+ {
76
+ return $this->fallbackDirsPsr0;
77
+ }
78
+
79
+ public function getFallbackDirsPsr4()
80
+ {
81
+ return $this->fallbackDirsPsr4;
82
+ }
83
+
84
+ public function getClassMap()
85
+ {
86
+ return $this->classMap;
87
+ }
88
+
89
+ /**
90
+ * @param array $classMap Class to filename map
91
+ */
92
+ public function addClassMap(array $classMap)
93
+ {
94
+ if ($this->classMap) {
95
+ $this->classMap = array_merge($this->classMap, $classMap);
96
+ } else {
97
+ $this->classMap = $classMap;
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Registers a set of PSR-0 directories for a given prefix, either
103
+ * appending or prepending to the ones previously set for this prefix.
104
+ *
105
+ * @param string $prefix The prefix
106
+ * @param array|string $paths The PSR-0 root directories
107
+ * @param bool $prepend Whether to prepend the directories
108
+ */
109
+ public function add($prefix, $paths, $prepend = false)
110
+ {
111
+ if (!$prefix) {
112
+ if ($prepend) {
113
+ $this->fallbackDirsPsr0 = array_merge(
114
+ (array) $paths,
115
+ $this->fallbackDirsPsr0
116
+ );
117
+ } else {
118
+ $this->fallbackDirsPsr0 = array_merge(
119
+ $this->fallbackDirsPsr0,
120
+ (array) $paths
121
+ );
122
+ }
123
+
124
+ return;
125
+ }
126
+
127
+ $first = $prefix[0];
128
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
129
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
130
+
131
+ return;
132
+ }
133
+ if ($prepend) {
134
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
135
+ (array) $paths,
136
+ $this->prefixesPsr0[$first][$prefix]
137
+ );
138
+ } else {
139
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
140
+ $this->prefixesPsr0[$first][$prefix],
141
+ (array) $paths
142
+ );
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Registers a set of PSR-4 directories for a given namespace, either
148
+ * appending or prepending to the ones previously set for this namespace.
149
+ *
150
+ * @param string $prefix The prefix/namespace, with trailing '\\'
151
+ * @param array|string $paths The PSR-4 base directories
152
+ * @param bool $prepend Whether to prepend the directories
153
+ *
154
+ * @throws \InvalidArgumentException
155
+ */
156
+ public function addPsr4($prefix, $paths, $prepend = false)
157
+ {
158
+ if (!$prefix) {
159
+ // Register directories for the root namespace.
160
+ if ($prepend) {
161
+ $this->fallbackDirsPsr4 = array_merge(
162
+ (array) $paths,
163
+ $this->fallbackDirsPsr4
164
+ );
165
+ } else {
166
+ $this->fallbackDirsPsr4 = array_merge(
167
+ $this->fallbackDirsPsr4,
168
+ (array) $paths
169
+ );
170
+ }
171
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172
+ // Register directories for a new namespace.
173
+ $length = strlen($prefix);
174
+ if ('\\' !== $prefix[$length - 1]) {
175
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
176
+ }
177
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
179
+ } elseif ($prepend) {
180
+ // Prepend directories for an already registered namespace.
181
+ $this->prefixDirsPsr4[$prefix] = array_merge(
182
+ (array) $paths,
183
+ $this->prefixDirsPsr4[$prefix]
184
+ );
185
+ } else {
186
+ // Append directories for an already registered namespace.
187
+ $this->prefixDirsPsr4[$prefix] = array_merge(
188
+ $this->prefixDirsPsr4[$prefix],
189
+ (array) $paths
190
+ );
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Registers a set of PSR-0 directories for a given prefix,
196
+ * replacing any others previously set for this prefix.
197
+ *
198
+ * @param string $prefix The prefix
199
+ * @param array|string $paths The PSR-0 base directories
200
+ */
201
+ public function set($prefix, $paths)
202
+ {
203
+ if (!$prefix) {
204
+ $this->fallbackDirsPsr0 = (array) $paths;
205
+ } else {
206
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Registers a set of PSR-4 directories for a given namespace,
212
+ * replacing any others previously set for this namespace.
213
+ *
214
+ * @param string $prefix The prefix/namespace, with trailing '\\'
215
+ * @param array|string $paths The PSR-4 base directories
216
+ *
217
+ * @throws \InvalidArgumentException
218
+ */
219
+ public function setPsr4($prefix, $paths)
220
+ {
221
+ if (!$prefix) {
222
+ $this->fallbackDirsPsr4 = (array) $paths;
223
+ } else {
224
+ $length = strlen($prefix);
225
+ if ('\\' !== $prefix[$length - 1]) {
226
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
227
+ }
228
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
230
+ }
231
+ }
232
+
233
+ /**
234
+ * Turns on searching the include path for class files.
235
+ *
236
+ * @param bool $useIncludePath
237
+ */
238
+ public function setUseIncludePath($useIncludePath)
239
+ {
240
+ $this->useIncludePath = $useIncludePath;
241
+ }
242
+
243
+ /**
244
+ * Can be used to check if the autoloader uses the include path to check
245
+ * for classes.
246
+ *
247
+ * @return bool
248
+ */
249
+ public function getUseIncludePath()
250
+ {
251
+ return $this->useIncludePath;
252
+ }
253
+
254
+ /**
255
+ * Turns off searching the prefix and fallback directories for classes
256
+ * that have not been registered with the class map.
257
+ *
258
+ * @param bool $classMapAuthoritative
259
+ */
260
+ public function setClassMapAuthoritative($classMapAuthoritative)
261
+ {
262
+ $this->classMapAuthoritative = $classMapAuthoritative;
263
+ }
264
+
265
+ /**
266
+ * Should class lookup fail if not found in the current class map?
267
+ *
268
+ * @return bool
269
+ */
270
+ public function isClassMapAuthoritative()
271
+ {
272
+ return $this->classMapAuthoritative;
273
+ }
274
+
275
+ /**
276
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
+ *
278
+ * @param string|null $apcuPrefix
279
+ */
280
+ public function setApcuPrefix($apcuPrefix)
281
+ {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
+ }
284
+
285
+ /**
286
+ * The APCu prefix in use, or null if APCu caching is not enabled.
287
+ *
288
+ * @return string|null
289
+ */
290
+ public function getApcuPrefix()
291
+ {
292
+ return $this->apcuPrefix;
293
+ }
294
+
295
+ /**
296
+ * Registers this instance as an autoloader.
297
+ *
298
+ * @param bool $prepend Whether to prepend the autoloader or not
299
+ */
300
+ public function register($prepend = false)
301
+ {
302
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
303
+ }
304
+
305
+ /**
306
+ * Unregisters this instance as an autoloader.
307
+ */
308
+ public function unregister()
309
+ {
310
+ spl_autoload_unregister(array($this, 'loadClass'));
311
+ }
312
+
313
+ /**
314
+ * Loads the given class or interface.
315
+ *
316
+ * @param string $class The name of the class
317
+ * @return bool|null True if loaded, null otherwise
318
+ */
319
+ public function loadClass($class)
320
+ {
321
+ if ($file = $this->findFile($class)) {
322
+ includeFile($file);
323
+
324
+ return true;
325
+ }
326
+ }
327
+
328
+ /**
329
+ * Finds the path to the file where the class is defined.
330
+ *
331
+ * @param string $class The name of the class
332
+ *
333
+ * @return string|false The path if found, false otherwise
334
+ */
335
+ public function findFile($class)
336
+ {
337
+ // class map lookup
338
+ if (isset($this->classMap[$class])) {
339
+ return $this->classMap[$class];
340
+ }
341
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
+ return false;
343
+ }
344
+ if (null !== $this->apcuPrefix) {
345
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
+ if ($hit) {
347
+ return $file;
348
+ }
349
+ }
350
+
351
+ $file = $this->findFileWithExtension($class, '.php');
352
+
353
+ // Search for Hack files if we are running on HHVM
354
+ if (false === $file && defined('HHVM_VERSION')) {
355
+ $file = $this->findFileWithExtension($class, '.hh');
356
+ }
357
+
358
+ if (null !== $this->apcuPrefix) {
359
+ apcu_add($this->apcuPrefix.$class, $file);
360
+ }
361
+
362
+ if (false === $file) {
363
+ // Remember that this class does not exist.
364
+ $this->missingClasses[$class] = true;
365
+ }
366
+
367
+ return $file;
368
+ }
369
+
370
+ private function findFileWithExtension($class, $ext)
371
+ {
372
+ // PSR-4 lookup
373
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
374
+
375
+ $first = $class[0];
376
+ if (isset($this->prefixLengthsPsr4[$first])) {
377
+ $subPath = $class;
378
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
379
+ $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
+ if (isset($this->prefixDirsPsr4[$search])) {
382
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
+ if (file_exists($file = $dir . $pathEnd)) {
385
+ return $file;
386
+ }
387
+ }
388
+ }
389
+ }
390
+ }
391
+
392
+ // PSR-4 fallback dirs
393
+ foreach ($this->fallbackDirsPsr4 as $dir) {
394
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
395
+ return $file;
396
+ }
397
+ }
398
+
399
+ // PSR-0 lookup
400
+ if (false !== $pos = strrpos($class, '\\')) {
401
+ // namespaced class name
402
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
403
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404
+ } else {
405
+ // PEAR-like class name
406
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
407
+ }
408
+
409
+ if (isset($this->prefixesPsr0[$first])) {
410
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411
+ if (0 === strpos($class, $prefix)) {
412
+ foreach ($dirs as $dir) {
413
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
414
+ return $file;
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+
421
+ // PSR-0 fallback dirs
422
+ foreach ($this->fallbackDirsPsr0 as $dir) {
423
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
424
+ return $file;
425
+ }
426
+ }
427
+
428
+ // PSR-0 include paths.
429
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
+ return $file;
431
+ }
432
+
433
+ return false;
434
+ }
435
+ }
436
+
437
+ /**
438
+ * Scope isolated include.
439
+ *
440
+ * Prevents access to $this/self from included files.
441
+ */
442
+ function includeFile($file)
443
+ {
444
+ include $file;
445
+ }
vendor/composer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,551 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
10
+ 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
11
+ 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
12
+ 'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
13
+ 'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
14
+ 'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
15
+ 'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php',
16
+ 'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php',
17
+ 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
18
+ 'PHPUnit\\Framework\\Constraint\\ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
19
+ 'PHPUnit\\Framework\\Constraint\\Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
20
+ 'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
21
+ 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
22
+ 'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
23
+ 'PHPUnit\\Framework\\Constraint\\Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
24
+ 'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
25
+ 'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
26
+ 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
27
+ 'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
28
+ 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
29
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
30
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php',
31
+ 'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
32
+ 'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
33
+ 'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
34
+ 'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
35
+ 'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
36
+ 'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
37
+ 'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
38
+ 'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
39
+ 'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
40
+ 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
41
+ 'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
42
+ 'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
43
+ 'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
44
+ 'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
45
+ 'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
46
+ 'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
47
+ 'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
48
+ 'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
49
+ 'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
50
+ 'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
51
+ 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php',
52
+ 'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php',
53
+ 'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php',
54
+ 'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php',
55
+ 'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
56
+ 'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php',
57
+ 'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
58
+ 'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
59
+ 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
60
+ 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php',
61
+ 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
62
+ 'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
63
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
64
+ 'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php',
65
+ 'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
66
+ 'PHPUnit\\Framework\\Error\\Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
67
+ 'PHPUnit\\Framework\\Error\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Error.php',
68
+ 'PHPUnit\\Framework\\Error\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php',
69
+ 'PHPUnit\\Framework\\Error\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php',
70
+ 'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php',
71
+ 'PHPUnit\\Framework\\ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
72
+ 'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php',
73
+ 'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
74
+ 'PHPUnit\\Framework\\IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
75
+ 'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php',
76
+ 'PHPUnit\\Framework\\InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php',
77
+ 'PHPUnit\\Framework\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php',
78
+ 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Exception/BadMethodCallException.php',
79
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/Identity.php',
80
+ 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/InvocationMocker.php',
81
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/Match.php',
82
+ 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/MethodNameMatch.php',
83
+ 'PHPUnit\\Framework\\MockObject\\Builder\\NamespaceMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/NamespaceMatch.php',
84
+ 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/ParametersMatch.php',
85
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Builder/Stub.php',
86
+ 'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Exception/Exception.php',
87
+ 'PHPUnit\\Framework\\MockObject\\Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Generator.php',
88
+ 'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Invocation/Invocation.php',
89
+ 'PHPUnit\\Framework\\MockObject\\InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/InvocationMocker.php',
90
+ 'PHPUnit\\Framework\\MockObject\\Invocation\\ObjectInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Invocation/ObjectInvocation.php',
91
+ 'PHPUnit\\Framework\\MockObject\\Invocation\\StaticInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Invocation/StaticInvocation.php',
92
+ 'PHPUnit\\Framework\\MockObject\\Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Invokable.php',
93
+ 'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher.php',
94
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/AnyInvokedCount.php',
95
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/AnyParameters.php',
96
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/ConsecutiveParameters.php',
97
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/Invocation.php',
98
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtIndex.php',
99
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtLeastCount.php',
100
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtLeastOnce.php',
101
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtMostCount.php',
102
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedCount.php',
103
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedRecorder.php',
104
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/MethodName.php',
105
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/Parameters.php',
106
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Matcher/StatelessInvocation.php',
107
+ 'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/MockBuilder.php',
108
+ 'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/ForwardCompatibility/MockObject.php',
109
+ 'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Exception/RuntimeException.php',
110
+ 'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub.php',
111
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ConsecutiveCalls.php',
112
+ 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/Exception.php',
113
+ 'PHPUnit\\Framework\\MockObject\\Stub\\MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/MatcherCollection.php',
114
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ReturnArgument.php',
115
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ReturnCallback.php',
116
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ReturnReference.php',
117
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ReturnSelf.php',
118
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ReturnStub.php',
119
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Stub/ReturnValueMap.php',
120
+ 'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Verifiable.php',
121
+ 'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php',
122
+ 'PHPUnit\\Framework\\RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php',
123
+ 'PHPUnit\\Framework\\RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php',
124
+ 'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
125
+ 'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php',
126
+ 'PHPUnit\\Framework\\SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
127
+ 'PHPUnit\\Framework\\SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php',
128
+ 'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php',
129
+ 'PHPUnit\\Framework\\SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php',
130
+ 'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php',
131
+ 'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php',
132
+ 'PHPUnit\\Framework\\TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php',
133
+ 'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php',
134
+ 'PHPUnit\\Framework\\TestListenerDefaultImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
135
+ 'PHPUnit\\Framework\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php',
136
+ 'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php',
137
+ 'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
138
+ 'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php',
139
+ 'PHPUnit\\Framework\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php',
140
+ 'PHPUnit\\Framework\\WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
141
+ 'PHPUnit\\Runner\\BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
142
+ 'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php',
143
+ 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
144
+ 'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
145
+ 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
146
+ 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
147
+ 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
148
+ 'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
149
+ 'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
150
+ 'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
151
+ 'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php',
152
+ 'PHPUnit\\TextUI\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php',
153
+ 'PHPUnit\\TextUI\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
154
+ 'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php',
155
+ 'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
156
+ 'PHPUnit\\Util\\Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php',
157
+ 'PHPUnit\\Util\\ConfigurationGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
158
+ 'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
159
+ 'PHPUnit\\Util\\Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php',
160
+ 'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
161
+ 'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
162
+ 'PHPUnit\\Util\\Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php',
163
+ 'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
164
+ 'PHPUnit\\Util\\InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php',
165
+ 'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php',
166
+ 'PHPUnit\\Util\\Log\\JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php',
167
+ 'PHPUnit\\Util\\Log\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
168
+ 'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
169
+ 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
170
+ 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
171
+ 'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php',
172
+ 'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php',
173
+ 'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php',
174
+ 'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
175
+ 'PHPUnit\\Util\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
176
+ 'PHPUnit\\Util\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
177
+ 'PHPUnit\\Util\\TestDox\\TextResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
178
+ 'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
179
+ 'PHPUnit\\Util\\TextTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
180
+ 'PHPUnit\\Util\\Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php',
181
+ 'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml.php',
182
+ 'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
183
+ 'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/MockObject.php',
184
+ 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
185
+ 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
186
+ 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
187
+ 'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
188
+ 'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
189
+ 'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
190
+ 'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
191
+ 'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
192
+ 'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
193
+ 'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
194
+ 'PHP_Token_ASYNC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
195
+ 'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
196
+ 'PHP_Token_AWAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
197
+ 'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
198
+ 'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
199
+ 'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
200
+ 'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
201
+ 'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
202
+ 'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
203
+ 'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
204
+ 'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
205
+ 'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
206
+ 'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
207
+ 'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
208
+ 'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
209
+ 'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
210
+ 'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
211
+ 'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
212
+ 'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
213
+ 'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
214
+ 'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
215
+ 'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
216
+ 'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
217
+ 'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
218
+ 'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
219
+ 'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
220
+ 'PHP_Token_COMPILER_HALT_OFFSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
221
+ 'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
222
+ 'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
223
+ 'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
224
+ 'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
225
+ 'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
226
+ 'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
227
+ 'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
228
+ 'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
229
+ 'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
230
+ 'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
231
+ 'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
232
+ 'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
233
+ 'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
234
+ 'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
235
+ 'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
236
+ 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
237
+ 'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
238
+ 'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
239
+ 'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
240
+ 'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
241
+ 'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
242
+ 'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
243
+ 'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
244
+ 'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
245
+ 'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
246
+ 'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
247
+ 'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
248
+ 'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
249
+ 'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
250
+ 'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
251
+ 'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
252
+ 'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
253
+ 'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
254
+ 'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
255
+ 'PHP_Token_ENUM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
256
+ 'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
257
+ 'PHP_Token_EQUALS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
258
+ 'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
259
+ 'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
260
+ 'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
261
+ 'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
262
+ 'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
263
+ 'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
264
+ 'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
265
+ 'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
266
+ 'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
267
+ 'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
268
+ 'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
269
+ 'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
270
+ 'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
271
+ 'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
272
+ 'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
273
+ 'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
274
+ 'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
275
+ 'PHP_Token_IN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
276
+ 'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
277
+ 'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
278
+ 'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
279
+ 'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
280
+ 'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
281
+ 'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
282
+ 'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
283
+ 'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
284
+ 'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
285
+ 'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
286
+ 'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
287
+ 'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
288
+ 'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
289
+ 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
290
+ 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
291
+ 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
292
+ 'PHP_Token_JOIN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
293
+ 'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
294
+ 'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
295
+ 'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
296
+ 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
297
+ 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
298
+ 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
299
+ 'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
300
+ 'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
301
+ 'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
302
+ 'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
303
+ 'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
304
+ 'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
305
+ 'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
306
+ 'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
307
+ 'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
308
+ 'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
309
+ 'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
310
+ 'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
311
+ 'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
312
+ 'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
313
+ 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
314
+ 'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
315
+ 'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
316
+ 'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
317
+ 'PHP_Token_ONUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
318
+ 'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
319
+ 'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
320
+ 'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
321
+ 'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
322
+ 'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
323
+ 'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
324
+ 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
325
+ 'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
326
+ 'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
327
+ 'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
328
+ 'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
329
+ 'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
330
+ 'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
331
+ 'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
332
+ 'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
333
+ 'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
334
+ 'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
335
+ 'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
336
+ 'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
337
+ 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
338
+ 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
339
+ 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
340
+ 'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
341
+ 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
342
+ 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
343
+ 'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
344
+ 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
345
+ 'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
346
+ 'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
347
+ 'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
348
+ 'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
349
+ 'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
350
+ 'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
351
+ 'PHP_Token_SUPER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
352
+ 'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
353
+ 'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php',
354
+ 'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
355
+ 'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
356
+ 'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
357
+ 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
358
+ 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
359
+ 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
360
+ 'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
361
+ 'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
362
+ 'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
363
+ 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
364
+ 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
365
+ 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
366
+ 'PHP_Token_USE_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
367
+ 'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
368
+ 'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
369
+ 'PHP_Token_WHERE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
370
+ 'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
371
+ 'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
372
+ 'PHP_Token_XHP_ATTRIBUTE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
373
+ 'PHP_Token_XHP_CATEGORY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
374
+ 'PHP_Token_XHP_CATEGORY_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
375
+ 'PHP_Token_XHP_CHILDREN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
376
+ 'PHP_Token_XHP_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
377
+ 'PHP_Token_XHP_REQUIRED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
378
+ 'PHP_Token_XHP_TAG_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
379
+ 'PHP_Token_XHP_TAG_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
380
+ 'PHP_Token_XHP_TEXT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
381
+ 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
382
+ 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
383
+ 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
384
+ 'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php',
385
+ 'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php',
386
+ 'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php',
387
+ 'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php',
388
+ 'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
389
+ 'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php',
390
+ 'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
391
+ 'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php',
392
+ 'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php',
393
+ 'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
394
+ 'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php',
395
+ 'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php',
396
+ 'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
397
+ 'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php',
398
+ 'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php',
399
+ 'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php',
400
+ 'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php',
401
+ 'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php',
402
+ 'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php',
403
+ 'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php',
404
+ 'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php',
405
+ 'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php',
406
+ 'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php',
407
+ 'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
408
+ 'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
409
+ 'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
410
+ 'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php',
411
+ 'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php',
412
+ 'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php',
413
+ 'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php',
414
+ 'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php',
415
+ 'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
416
+ 'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php',
417
+ 'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php',
418
+ 'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
419
+ 'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php',
420
+ 'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
421
+ 'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php',
422
+ 'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
423
+ 'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php',
424
+ 'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php',
425
+ 'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
426
+ 'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
427
+ 'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php',
428
+ 'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php',
429
+ 'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
430
+ 'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php',
431
+ 'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php',
432
+ 'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php',
433
+ 'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/AbstractVersionConstraint.php',
434
+ 'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/AndVersionConstraintGroup.php',
435
+ 'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/AnyVersionConstraint.php',
436
+ 'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/ExactVersionConstraint.php',
437
+ 'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/Exception.php',
438
+ 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php',
439
+ 'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/InvalidVersionException.php',
440
+ 'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/OrVersionConstraintGroup.php',
441
+ 'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php',
442
+ 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php',
443
+ 'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/SpecificMajorVersionConstraint.php',
444
+ 'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/UnsupportedVersionConstraintException.php',
445
+ 'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php',
446
+ 'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/VersionConstraint.php',
447
+ 'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
448
+ 'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
449
+ 'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
450
+ 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
451
+ 'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
452
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
453
+ 'SebastianBergmann\\CodeCoverage\\Driver\\HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/HHVM.php',
454
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
455
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
456
+ 'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php',
457
+ 'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php',
458
+ 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
459
+ 'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
460
+ 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
461
+ 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
462
+ 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
463
+ 'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
464
+ 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
465
+ 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php',
466
+ 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
467
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
468
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
469
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
470
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
471
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
472
+ 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php',
473
+ 'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php',
474
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
475
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
476
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
477
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
478
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
479
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
480
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
481
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
482
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
483
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
484
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
485
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
486
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
487
+ 'SebastianBergmann\\CodeCoverage\\RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
488
+ 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
489
+ 'SebastianBergmann\\CodeCoverage\\Util' => $vendorDir . '/phpunit/php-code-coverage/src/Util.php',
490
+ 'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php',
491
+ 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
492
+ 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php',
493
+ 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php',
494
+ 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php',
495
+ 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php',
496
+ 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php',
497
+ 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php',
498
+ 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php',
499
+ 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php',
500
+ 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php',
501
+ 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php',
502
+ 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php',
503
+ 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php',
504
+ 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php',
505
+ 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php',
506
+ 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php',
507
+ 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php',
508
+ 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php',
509
+ 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php',
510
+ 'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php',
511
+ 'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
512
+ 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php',
513
+ 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
514
+ 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
515
+ 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
516
+ 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
517
+ 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
518
+ 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
519
+ 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php',
520
+ 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
521
+ 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php',
522
+ 'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php',
523
+ 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
524
+ 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
525
+ 'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php',
526
+ 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
527
+ 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php',
528
+ 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php',
529
+ 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php',
530
+ 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php',
531
+ 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php',
532
+ 'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php',
533
+ 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
534
+ 'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php',
535
+ 'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php',
536
+ 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php',
537
+ 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
538
+ 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
539
+ 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
540
+ 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
541
+ 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
542
+ 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
543
+ 'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
544
+ 'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
545
+ 'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php',
546
+ 'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php',
547
+ 'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php',
548
+ 'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
549
+ 'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
550
+ 'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
551
+ );
vendor/composer/autoload_files.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_files.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
10
+ '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
11
+ );
vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'),
10
+ );
vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
10
+ 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
11
+ 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
12
+ 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
13
+ 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
14
+ 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'),
15
+ 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
16
+ );
vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit34163a5f4df13994eea60300a32e221d
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ public static function getLoader()
17
+ {
18
+ if (null !== self::$loader) {
19
+ return self::$loader;
20
+ }
21
+
22
+ spl_autoload_register(array('ComposerAutoloaderInit34163a5f4df13994eea60300a32e221d', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit34163a5f4df13994eea60300a32e221d', 'loadClassLoader'));
25
+
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
+ if ($useStaticLoader) {
28
+ require_once __DIR__ . '/autoload_static.php';
29
+
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit34163a5f4df13994eea60300a32e221d::getInitializer($loader));
31
+ } else {
32
+ $map = require __DIR__ . '/autoload_namespaces.php';
33
+ foreach ($map as $namespace => $path) {
34
+ $loader->set($namespace, $path);
35
+ }
36
+
37
+ $map = require __DIR__ . '/autoload_psr4.php';
38
+ foreach ($map as $namespace => $path) {
39
+ $loader->setPsr4($namespace, $path);
40
+ }
41
+
42
+ $classMap = require __DIR__ . '/autoload_classmap.php';
43
+ if ($classMap) {
44
+ $loader->addClassMap($classMap);
45
+ }
46
+ }
47
+
48
+ $loader->register(true);
49
+
50
+ if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit34163a5f4df13994eea60300a32e221d::$files;
52
+ } else {
53
+ $includeFiles = require __DIR__ . '/autoload_files.php';
54
+ }
55
+ foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire34163a5f4df13994eea60300a32e221d($fileIdentifier, $file);
57
+ }
58
+
59
+ return $loader;
60
+ }
61
+ }
62
+
63
+ function composerRequire34163a5f4df13994eea60300a32e221d($fileIdentifier, $file)
64
+ {
65
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
+ require $file;
67
+
68
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
69
+ }
70
+ }
vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,637 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit34163a5f4df13994eea60300a32e221d
8
+ {
9
+ public static $files = array (
10
+ '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
11
+ '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
12
+ );
13
+
14
+ public static $prefixLengthsPsr4 = array (
15
+ 'p' =>
16
+ array (
17
+ 'phpDocumentor\\Reflection\\' => 25,
18
+ ),
19
+ 'W' =>
20
+ array (
21
+ 'Webmozart\\Assert\\' => 17,
22
+ ),
23
+ 'S' =>
24
+ array (
25
+ 'Symfony\\Polyfill\\Ctype\\' => 23,
26
+ ),
27
+ 'D' =>
28
+ array (
29
+ 'Doctrine\\Instantiator\\' => 22,
30
+ 'DeepCopy\\' => 9,
31
+ 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 55,
32
+ ),
33
+ 'C' =>
34
+ array (
35
+ 'Composer\\Installers\\' => 20,
36
+ ),
37
+ );
38
+
39
+ public static $prefixDirsPsr4 = array (
40
+ 'phpDocumentor\\Reflection\\' =>
41
+ array (
42
+ 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src',
43
+ 1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
44
+ 2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
45
+ ),
46
+ 'Webmozart\\Assert\\' =>
47
+ array (
48
+ 0 => __DIR__ . '/..' . '/webmozart/assert/src',
49
+ ),
50
+ 'Symfony\\Polyfill\\Ctype\\' =>
51
+ array (
52
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
53
+ ),
54
+ 'Doctrine\\Instantiator\\' =>
55
+ array (
56
+ 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
57
+ ),
58
+ 'DeepCopy\\' =>
59
+ array (
60
+ 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
61
+ ),
62
+ 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' =>
63
+ array (
64
+ 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src',
65
+ ),
66
+ 'Composer\\Installers\\' =>
67
+ array (
68
+ 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
69
+ ),
70
+ );
71
+
72
+ public static $prefixesPsr0 = array (
73
+ 'P' =>
74
+ array (
75
+ 'Prophecy\\' =>
76
+ array (
77
+ 0 => __DIR__ . '/..' . '/phpspec/prophecy/src',
78
+ ),
79
+ ),
80
+ );
81
+
82
+ public static $classMap = array (
83
+ 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
84
+ 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
85
+ 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
86
+ 'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
87
+ 'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
88
+ 'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
89
+ 'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php',
90
+ 'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php',
91
+ 'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
92
+ 'PHPUnit\\Framework\\Constraint\\ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
93
+ 'PHPUnit\\Framework\\Constraint\\Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
94
+ 'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
95
+ 'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
96
+ 'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
97
+ 'PHPUnit\\Framework\\Constraint\\Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
98
+ 'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
99
+ 'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
100
+ 'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
101
+ 'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
102
+ 'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
103
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
104
+ 'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegularExpression.php',
105
+ 'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
106
+ 'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
107
+ 'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
108
+ 'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
109
+ 'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
110
+ 'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
111
+ 'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
112
+ 'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
113
+ 'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
114
+ 'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
115
+ 'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
116
+ 'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
117
+ 'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
118
+ 'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
119
+ 'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
120
+ 'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
121
+ 'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
122
+ 'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
123
+ 'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
124
+ 'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
125
+ 'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalAnd.php',
126
+ 'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalNot.php',
127
+ 'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalOr.php',
128
+ 'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LogicalXor.php',
129
+ 'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
130
+ 'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/RegularExpression.php',
131
+ 'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
132
+ 'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
133
+ 'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
134
+ 'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatchesFormatDescription.php',
135
+ 'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
136
+ 'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
137
+ 'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
138
+ 'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php',
139
+ 'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
140
+ 'PHPUnit\\Framework\\Error\\Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
141
+ 'PHPUnit\\Framework\\Error\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Error.php',
142
+ 'PHPUnit\\Framework\\Error\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php',
143
+ 'PHPUnit\\Framework\\Error\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php',
144
+ 'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php',
145
+ 'PHPUnit\\Framework\\ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
146
+ 'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php',
147
+ 'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
148
+ 'PHPUnit\\Framework\\IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
149
+ 'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php',
150
+ 'PHPUnit\\Framework\\InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php',
151
+ 'PHPUnit\\Framework\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php',
152
+ 'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Exception/BadMethodCallException.php',
153
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/Identity.php',
154
+ 'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/InvocationMocker.php',
155
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/Match.php',
156
+ 'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/MethodNameMatch.php',
157
+ 'PHPUnit\\Framework\\MockObject\\Builder\\NamespaceMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/NamespaceMatch.php',
158
+ 'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/ParametersMatch.php',
159
+ 'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Builder/Stub.php',
160
+ 'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Exception/Exception.php',
161
+ 'PHPUnit\\Framework\\MockObject\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Generator.php',
162
+ 'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Invocation/Invocation.php',
163
+ 'PHPUnit\\Framework\\MockObject\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/InvocationMocker.php',
164
+ 'PHPUnit\\Framework\\MockObject\\Invocation\\ObjectInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Invocation/ObjectInvocation.php',
165
+ 'PHPUnit\\Framework\\MockObject\\Invocation\\StaticInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Invocation/StaticInvocation.php',
166
+ 'PHPUnit\\Framework\\MockObject\\Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Invokable.php',
167
+ 'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher.php',
168
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/AnyInvokedCount.php',
169
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/AnyParameters.php',
170
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/ConsecutiveParameters.php',
171
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/Invocation.php',
172
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtIndex.php',
173
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtLeastCount.php',
174
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtLeastOnce.php',
175
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedAtMostCount.php',
176
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedCount.php',
177
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/InvokedRecorder.php',
178
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/MethodName.php',
179
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/Parameters.php',
180
+ 'PHPUnit\\Framework\\MockObject\\Matcher\\StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Matcher/StatelessInvocation.php',
181
+ 'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/MockBuilder.php',
182
+ 'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/ForwardCompatibility/MockObject.php',
183
+ 'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Exception/RuntimeException.php',
184
+ 'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub.php',
185
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ConsecutiveCalls.php',
186
+ 'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/Exception.php',
187
+ 'PHPUnit\\Framework\\MockObject\\Stub\\MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/MatcherCollection.php',
188
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ReturnArgument.php',
189
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ReturnCallback.php',
190
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ReturnReference.php',
191
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ReturnSelf.php',
192
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ReturnStub.php',
193
+ 'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Stub/ReturnValueMap.php',
194
+ 'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Verifiable.php',
195
+ 'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php',
196
+ 'PHPUnit\\Framework\\RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php',
197
+ 'PHPUnit\\Framework\\RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php',
198
+ 'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
199
+ 'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php',
200
+ 'PHPUnit\\Framework\\SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
201
+ 'PHPUnit\\Framework\\SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php',
202
+ 'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php',
203
+ 'PHPUnit\\Framework\\SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php',
204
+ 'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php',
205
+ 'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php',
206
+ 'PHPUnit\\Framework\\TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php',
207
+ 'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php',
208
+ 'PHPUnit\\Framework\\TestListenerDefaultImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
209
+ 'PHPUnit\\Framework\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php',
210
+ 'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php',
211
+ 'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
212
+ 'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php',
213
+ 'PHPUnit\\Framework\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php',
214
+ 'PHPUnit\\Framework\\WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
215
+ 'PHPUnit\\Runner\\BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
216
+ 'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php',
217
+ 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
218
+ 'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
219
+ 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
220
+ 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
221
+ 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
222
+ 'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
223
+ 'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
224
+ 'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
225
+ 'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php',
226
+ 'PHPUnit\\TextUI\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php',
227
+ 'PHPUnit\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
228
+ 'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php',
229
+ 'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
230
+ 'PHPUnit\\Util\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php',
231
+ 'PHPUnit\\Util\\ConfigurationGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
232
+ 'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
233
+ 'PHPUnit\\Util\\Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php',
234
+ 'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
235
+ 'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
236
+ 'PHPUnit\\Util\\Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php',
237
+ 'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
238
+ 'PHPUnit\\Util\\InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php',
239
+ 'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php',
240
+ 'PHPUnit\\Util\\Log\\JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php',
241
+ 'PHPUnit\\Util\\Log\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
242
+ 'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
243
+ 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
244
+ 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
245
+ 'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php',
246
+ 'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php',
247
+ 'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php',
248
+ 'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
249
+ 'PHPUnit\\Util\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
250
+ 'PHPUnit\\Util\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
251
+ 'PHPUnit\\Util\\TestDox\\TextResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
252
+ 'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
253
+ 'PHPUnit\\Util\\TextTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
254
+ 'PHPUnit\\Util\\Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php',
255
+ 'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml.php',
256
+ 'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
257
+ 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/MockObject.php',
258
+ 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
259
+ 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
260
+ 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
261
+ 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
262
+ 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
263
+ 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
264
+ 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
265
+ 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
266
+ 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
267
+ 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
268
+ 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
269
+ 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
270
+ 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
271
+ 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
272
+ 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
273
+ 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
274
+ 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
275
+ 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
276
+ 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
277
+ 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
278
+ 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
279
+ 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
280
+ 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
281
+ 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
282
+ 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
283
+ 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
284
+ 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
285
+ 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
286
+ 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
287
+ 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
288
+ 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
289
+ 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
290
+ 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
291
+ 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
292
+ 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
293
+ 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
294
+ 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
295
+ 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
296
+ 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
297
+ 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
298
+ 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
299
+ 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
300
+ 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
301
+ 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
302
+ 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
303
+ 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
304
+ 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
305
+ 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
306
+ 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
307
+ 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
308
+ 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
309
+ 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
310
+ 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
311
+ 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
312
+ 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
313
+ 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
314
+ 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
315
+ 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
316
+ 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
317
+ 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
318
+ 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
319
+ 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
320
+ 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
321
+ 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
322
+ 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
323
+ 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
324
+ 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
325
+ 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
326
+ 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
327
+ 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
328
+ 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
329
+ 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
330
+ 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
331
+ 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
332
+ 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
333
+ 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
334
+ 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
335
+ 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
336
+ 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
337
+ 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
338
+ 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
339
+ 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
340
+ 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
341
+ 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
342
+ 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
343
+ 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
344
+ 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
345
+ 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
346
+ 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
347
+ 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
348
+ 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
349
+ 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
350
+ 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
351
+ 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
352
+ 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
353
+ 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
354
+ 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
355
+ 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
356
+ 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
357
+ 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
358
+ 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
359
+ 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
360
+ 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
361
+ 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
362
+ 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
363
+ 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
364
+ 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
365
+ 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
366
+ 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
367
+ 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
368
+ 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
369
+ 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
370
+ 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
371
+ 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
372
+ 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
373
+ 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
374
+ 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
375
+ 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
376
+ 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
377
+ 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
378
+ 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
379
+ 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
380
+ 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
381
+ 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
382
+ 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
383
+ 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
384
+ 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
385
+ 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
386
+ 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
387
+ 'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
388
+ 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
389
+ 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
390
+ 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
391
+ 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
392
+ 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
393
+ 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
394
+ 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
395
+ 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
396
+ 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
397
+ 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
398
+ 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
399
+ 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
400
+ 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
401
+ 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
402
+ 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
403
+ 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
404
+ 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
405
+ 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
406
+ 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
407
+ 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
408
+ 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
409
+ 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
410
+ 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
411
+ 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
412
+ 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
413
+ 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
414
+ 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
415
+ 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
416
+ 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
417
+ 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
418
+ 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
419
+ 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
420
+ 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
421
+ 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
422
+ 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
423
+ 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
424
+ 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
425
+ 'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
426
+ 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
427
+ 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php',
428
+ 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
429
+ 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
430
+ 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
431
+ 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
432
+ 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
433
+ 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
434
+ 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
435
+ 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
436
+ 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
437
+ 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
438
+ 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
439
+ 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
440
+ 'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
441
+ 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
442
+ 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
443
+ 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
444
+ 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
445
+ 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
446
+ 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
447
+ 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
448
+ 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
449
+ 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
450
+ 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
451
+ 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
452
+ 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
453
+ 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
454
+ 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
455
+ 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
456
+ 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
457
+ 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
458
+ 'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php',
459
+ 'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php',
460
+ 'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php',
461
+ 'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php',
462
+ 'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
463
+ 'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php',
464
+ 'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
465
+ 'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php',
466
+ 'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php',
467
+ 'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
468
+ 'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php',
469
+ 'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php',
470
+ 'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
471
+ 'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php',
472
+ 'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php',
473
+ 'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php',
474
+ 'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php',
475
+ 'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php',
476
+ 'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php',
477
+ 'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php',
478
+ 'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php',
479
+ 'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php',
480
+ 'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php',
481
+ 'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
482
+ 'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
483
+ 'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
484
+ 'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php',
485
+ 'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php',
486
+ 'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php',
487
+ 'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php',
488
+ 'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php',
489
+ 'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
490
+ 'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php',
491
+ 'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php',
492
+ 'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
493
+ 'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php',
494
+ 'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
495
+ 'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php',
496
+ 'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
497
+ 'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php',
498
+ 'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php',
499
+ 'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
500
+ 'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
501
+ 'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php',
502
+ 'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php',
503
+ 'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
504
+ 'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php',
505
+ 'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php',
506
+ 'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php',
507
+ 'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/AbstractVersionConstraint.php',
508
+ 'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/AndVersionConstraintGroup.php',
509
+ 'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/AnyVersionConstraint.php',
510
+ 'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/ExactVersionConstraint.php',
511
+ 'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/Exception.php',
512
+ 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php',
513
+ 'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/InvalidVersionException.php',
514
+ 'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/OrVersionConstraintGroup.php',
515
+ 'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php',
516
+ 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php',
517
+ 'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/SpecificMajorVersionConstraint.php',
518
+ 'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/UnsupportedVersionConstraintException.php',
519
+ 'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php',
520
+ 'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraint.php',
521
+ 'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
522
+ 'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
523
+ 'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
524
+ 'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
525
+ 'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
526
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
527
+ 'SebastianBergmann\\CodeCoverage\\Driver\\HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/HHVM.php',
528
+ 'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
529
+ 'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
530
+ 'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php',
531
+ 'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php',
532
+ 'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
533
+ 'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
534
+ 'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
535
+ 'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
536
+ 'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
537
+ 'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
538
+ 'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
539
+ 'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php',
540
+ 'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
541
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
542
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
543
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
544
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
545
+ 'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
546
+ 'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php',
547
+ 'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php',
548
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
549
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
550
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
551
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
552
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
553
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
554
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
555
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
556
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
557
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
558
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
559
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
560
+ 'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
561
+ 'SebastianBergmann\\CodeCoverage\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
562
+ 'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
563
+ 'SebastianBergmann\\CodeCoverage\\Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util.php',
564
+ 'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php',
565
+ 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
566
+ 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php',
567
+ 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php',
568
+ 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php',
569
+ 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php',
570
+ 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php',
571
+ 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php',
572
+ 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php',
573
+ 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php',
574
+ 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php',
575
+ 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php',
576
+ 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php',
577
+ 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php',
578
+ 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php',
579
+ 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php',
580
+ 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php',
581
+ 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php',
582
+ 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php',
583
+ 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php',
584
+ 'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php',
585
+ 'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
586
+ 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php',
587
+ 'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
588
+ 'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
589
+ 'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
590
+ 'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
591
+ 'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
592
+ 'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
593
+ 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php',
594
+ 'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
595
+ 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php',
596
+ 'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php',
597
+ 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
598
+ 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
599
+ 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php',
600
+ 'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
601
+ 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php',
602
+ 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php',
603
+ 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php',
604
+ 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php',
605
+ 'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php',
606
+ 'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php',
607
+ 'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
608
+ 'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php',
609
+ 'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php',
610
+ 'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php',
611
+ 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
612
+ 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
613
+ 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
614
+ 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
615
+ 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
616
+ 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
617
+ 'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
618
+ 'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
619
+ 'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php',
620
+ 'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php',
621
+ 'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php',
622
+ 'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
623
+ 'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
624
+ 'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
625
+ );
626
+
627
+ public static function getInitializer(ClassLoader $loader)
628
+ {
629
+ return \Closure::bind(function () use ($loader) {
630
+ $loader->prefixLengthsPsr4 = ComposerStaticInit34163a5f4df13994eea60300a32e221d::$prefixLengthsPsr4;
631
+ $loader->prefixDirsPsr4 = ComposerStaticInit34163a5f4df13994eea60300a32e221d::$prefixDirsPsr4;
632
+ $loader->prefixesPsr0 = ComposerStaticInit34163a5f4df13994eea60300a32e221d::$prefixesPsr0;
633
+ $loader->classMap = ComposerStaticInit34163a5f4df13994eea60300a32e221d::$classMap;
634
+
635
+ }, null, ClassLoader::class);
636
+ }
637
+ }
vendor/composer/installed.json ADDED
@@ -0,0 +1,2074 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "composer/installers",
4
+ "version": "v1.6.0",
5
+ "version_normalized": "1.6.0.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/composer/installers.git",
9
+ "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
10
+ },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
14
+ "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
15
+ "shasum": ""
16
+ },
17
+ "require": {
18
+ "composer-plugin-api": "^1.0"
19
+ },
20
+ "replace": {
21
+ "roundcube/plugin-installer": "*",
22
+ "shama/baton": "*"
23
+ },
24
+ "require-dev": {
25
+ "composer/composer": "1.0.*@dev",
26
+ "phpunit/phpunit": "^4.8.36"
27
+ },
28
+ "time": "2018-08-27T06:10:37+00:00",
29
+ "type": "composer-plugin",
30
+ "extra": {
31
+ "class": "Composer\\Installers\\Plugin",
32
+ "branch-alias": {
33
+ "dev-master": "1.0-dev"
34
+ }
35
+ },
36
+ "installation-source": "dist",
37
+ "autoload": {
38
+ "psr-4": {
39
+ "Composer\\Installers\\": "src/Composer/Installers"
40
+ }
41
+ },
42
+ "notification-url": "https://packagist.org/downloads/",
43
+ "license": [
44
+ "MIT"
45
+ ],
46
+ "authors": [
47
+ {
48
+ "name": "Kyle Robinson Young",
49
+ "email": "kyle@dontkry.com",
50
+ "homepage": "https://github.com/shama"
51
+ }
52
+ ],
53
+ "description": "A multi-framework Composer library installer",
54
+ "homepage": "https://composer.github.io/installers/",
55
+ "keywords": [
56
+ "Craft",
57
+ "Dolibarr",
58
+ "Eliasis",
59
+ "Hurad",
60
+ "ImageCMS",
61
+ "Kanboard",
62
+ "Lan Management System",
63
+ "MODX Evo",
64
+ "Mautic",
65
+ "Maya",
66
+ "OXID",
67
+ "Plentymarkets",
68
+ "Porto",
69
+ "RadPHP",
70
+ "SMF",
71
+ "Thelia",
72
+ "WolfCMS",
73
+ "agl",
74
+ "aimeos",
75
+ "annotatecms",
76
+ "attogram",
77
+ "bitrix",
78
+ "cakephp",
79
+ "chef",
80
+ "cockpit",
81
+ "codeigniter",
82
+ "concrete5",
83
+ "croogo",
84
+ "dokuwiki",
85
+ "drupal",
86
+ "eZ Platform",
87
+ "elgg",
88
+ "expressionengine",
89
+ "fuelphp",
90
+ "grav",
91
+ "installer",
92
+ "itop",
93
+ "joomla",
94
+ "kohana",
95
+ "laravel",
96
+ "lavalite",
97
+ "lithium",
98
+ "magento",
99
+ "majima",
100
+ "mako",
101
+ "mediawiki",
102
+ "modulework",
103
+ "modx",
104
+ "moodle",
105
+ "osclass",
106
+ "phpbb",
107
+ "piwik",
108
+ "ppi",
109
+ "puppet",
110
+ "pxcms",
111
+ "reindex",
112
+ "roundcube",
113
+ "shopware",
114
+ "silverstripe",
115
+ "sydes",
116
+ "symfony",
117
+ "typo3",
118
+ "wordpress",
119
+ "yawik",
120
+ "zend",
121
+ "zikula"
122
+ ]
123
+ },
124
+ {
125
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
126
+ "version": "v0.5.0",
127
+ "version_normalized": "0.5.0.0",
128
+ "source": {
129
+ "type": "git",
130
+ "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
131
+ "reference": "e749410375ff6fb7a040a68878c656c2e610b132"
132
+ },
133
+ "dist": {
134
+ "type": "zip",
135
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
136
+ "reference": "e749410375ff6fb7a040a68878c656c2e610b132",
137
+ "shasum": ""
138
+ },
139
+ "require": {
140
+ "composer-plugin-api": "^1.0",
141
+ "php": "^5.3|^7",
142
+ "squizlabs/php_codesniffer": "^2|^3"
143
+ },
144
+ "require-dev": {
145
+ "composer/composer": "*",
146
+ "phpcompatibility/php-compatibility": "^9.0",
147
+ "sensiolabs/security-checker": "^4.1.0"
148
+ },
149
+ "time": "2018-10-26T13:21:45+00:00",
150
+ "type": "composer-plugin",
151
+ "extra": {
152
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
153
+ },
154
+ "installation-source": "dist",
155
+ "autoload": {
156
+ "psr-4": {
157
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
158
+ }
159
+ },
160
+ "notification-url": "https://packagist.org/downloads/",
161
+ "license": [
162
+ "MIT"
163
+ ],
164
+ "authors": [
165
+ {
166
+ "name": "Franck Nijhof",
167
+ "email": "franck.nijhof@dealerdirect.com",
168
+ "homepage": "http://www.frenck.nl",
169
+ "role": "Developer / IT Manager"
170
+ }
171
+ ],
172
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
173
+ "homepage": "http://www.dealerdirect.com",
174
+ "keywords": [
175
+ "PHPCodeSniffer",
176
+ "PHP_CodeSniffer",
177
+ "code quality",
178
+ "codesniffer",
179
+ "composer",
180
+ "installer",
181
+ "phpcs",
182
+ "plugin",
183
+ "qa",
184
+ "quality",
185
+ "standard",
186
+ "standards",
187
+ "style guide",
188
+ "stylecheck",
189
+ "tests"
190
+ ]
191
+ },
192
+ {
193
+ "name": "doctrine/instantiator",
194
+ "version": "1.1.0",
195
+ "version_normalized": "1.1.0.0",
196
+ "source": {
197
+ "type": "git",
198
+ "url": "https://github.com/doctrine/instantiator.git",
199
+ "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda"
200
+ },
201
+ "dist": {
202
+ "type": "zip",
203
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
204
+ "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda",
205
+ "shasum": ""
206
+ },
207
+ "require": {
208
+ "php": "^7.1"
209
+ },
210
+ "require-dev": {
211
+ "athletic/athletic": "~0.1.8",
212
+ "ext-pdo": "*",
213
+ "ext-phar": "*",
214
+ "phpunit/phpunit": "^6.2.3",
215
+ "squizlabs/php_codesniffer": "^3.0.2"
216
+ },
217
+ "time": "2017-07-22T11:58:36+00:00",
218
+ "type": "library",
219
+ "extra": {
220
+ "branch-alias": {
221
+ "dev-master": "1.2.x-dev"
222
+ }
223
+ },
224
+ "installation-source": "dist",
225
+ "autoload": {
226
+ "psr-4": {
227
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
228
+ }
229
+ },
230
+ "notification-url": "https://packagist.org/downloads/",
231
+ "license": [
232
+ "MIT"
233
+ ],
234
+ "authors": [
235
+ {
236
+ "name": "Marco Pivetta",
237
+ "email": "ocramius@gmail.com",
238
+ "homepage": "http://ocramius.github.com/"
239
+ }
240
+ ],
241
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
242
+ "homepage": "https://github.com/doctrine/instantiator",
243
+ "keywords": [
244
+ "constructor",
245
+ "instantiate"
246
+ ]
247
+ },
248
+ {
249
+ "name": "myclabs/deep-copy",
250
+ "version": "1.8.1",
251
+ "version_normalized": "1.8.1.0",
252
+ "source": {
253
+ "type": "git",
254
+ "url": "https://github.com/myclabs/DeepCopy.git",
255
+ "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
256
+ },
257
+ "dist": {
258
+ "type": "zip",
259
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
260
+ "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
261
+ "shasum": ""
262
+ },
263
+ "require": {
264
+ "php": "^7.1"
265
+ },
266
+ "replace": {
267
+ "myclabs/deep-copy": "self.version"
268
+ },
269
+ "require-dev": {
270
+ "doctrine/collections": "^1.0",
271
+ "doctrine/common": "^2.6",
272
+ "phpunit/phpunit": "^7.1"
273
+ },
274
+ "time": "2018-06-11T23:09:50+00:00",
275
+ "type": "library",
276
+ "installation-source": "dist",
277
+ "autoload": {
278
+ "psr-4": {
279
+ "DeepCopy\\": "src/DeepCopy/"
280
+ },
281
+ "files": [
282
+ "src/DeepCopy/deep_copy.php"
283
+ ]
284
+ },
285
+ "notification-url": "https://packagist.org/downloads/",
286
+ "license": [
287
+ "MIT"
288
+ ],
289
+ "description": "Create deep copies (clones) of your objects",
290
+ "keywords": [
291
+ "clone",
292
+ "copy",
293
+ "duplicate",
294
+ "object",
295
+ "object graph"
296
+ ]
297
+ },
298
+ {
299
+ "name": "phar-io/manifest",
300
+ "version": "1.0.1",
301
+ "version_normalized": "1.0.1.0",
302
+ "source": {
303
+ "type": "git",
304
+ "url": "https://github.com/phar-io/manifest.git",
305
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
306
+ },
307
+ "dist": {
308
+ "type": "zip",
309
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
310
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
311
+ "shasum": ""
312
+ },
313
+ "require": {
314
+ "ext-dom": "*",
315
+ "ext-phar": "*",
316
+ "phar-io/version": "^1.0.1",
317
+ "php": "^5.6 || ^7.0"
318
+ },
319
+ "time": "2017-03-05T18:14:27+00:00",
320
+ "type": "library",
321
+ "extra": {
322
+ "branch-alias": {
323
+ "dev-master": "1.0.x-dev"
324
+ }
325
+ },
326
+ "installation-source": "dist",
327
+ "autoload": {
328
+ "classmap": [
329
+ "src/"
330
+ ]
331
+ },
332
+ "notification-url": "https://packagist.org/downloads/",
333
+ "license": [
334
+ "BSD-3-Clause"
335
+ ],
336
+ "authors": [
337
+ {
338
+ "name": "Arne Blankerts",
339
+ "email": "arne@blankerts.de",
340
+ "role": "Developer"
341
+ },
342
+ {
343
+ "name": "Sebastian Heuer",
344
+ "email": "sebastian@phpeople.de",
345
+ "role": "Developer"
346
+ },
347
+ {
348
+ "name": "Sebastian Bergmann",
349
+ "email": "sebastian@phpunit.de",
350
+ "role": "Developer"
351
+ }
352
+ ],
353
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)"
354
+ },
355
+ {
356
+ "name": "phar-io/version",
357
+ "version": "1.0.1",
358
+ "version_normalized": "1.0.1.0",
359
+ "source": {
360
+ "type": "git",
361
+ "url": "https://github.com/phar-io/version.git",
362
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
363
+ },
364
+ "dist": {
365
+ "type": "zip",
366
+ "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
367
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
368
+ "shasum": ""
369
+ },
370
+ "require": {
371
+ "php": "^5.6 || ^7.0"
372
+ },
373
+ "time": "2017-03-05T17:38:23+00:00",
374
+ "type": "library",
375
+ "installation-source": "dist",
376
+ "autoload": {
377
+ "classmap": [
378
+ "src/"
379
+ ]
380
+ },
381
+ "notification-url": "https://packagist.org/downloads/",
382
+ "license": [
383
+ "BSD-3-Clause"
384
+ ],
385
+ "authors": [
386
+ {
387
+ "name": "Arne Blankerts",
388
+ "email": "arne@blankerts.de",
389
+ "role": "Developer"
390
+ },
391
+ {
392
+ "name": "Sebastian Heuer",
393
+ "email": "sebastian@phpeople.de",
394
+ "role": "Developer"
395
+ },
396
+ {
397
+ "name": "Sebastian Bergmann",
398
+ "email": "sebastian@phpunit.de",
399
+ "role": "Developer"
400
+ }
401
+ ],
402
+ "description": "Library for handling version information and constraints"
403
+ },
404
+ {
405
+ "name": "phpcompatibility/php-compatibility",
406
+ "version": "9.1.1",
407
+ "version_normalized": "9.1.1.0",
408
+ "source": {
409
+ "type": "git",
410
+ "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
411
+ "reference": "2b63c5d284ab8857f7b1d5c240ddb507a6b2293c"
412
+ },
413
+ "dist": {
414
+ "type": "zip",
415
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/2b63c5d284ab8857f7b1d5c240ddb507a6b2293c",
416
+ "reference": "2b63c5d284ab8857f7b1d5c240ddb507a6b2293c",
417
+ "shasum": ""
418
+ },
419
+ "require": {
420
+ "php": ">=5.3",
421
+ "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
422
+ },
423
+ "conflict": {
424
+ "squizlabs/php_codesniffer": "2.6.2"
425
+ },
426
+ "require-dev": {
427
+ "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
428
+ },
429
+ "suggest": {
430
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
431
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
432
+ },
433
+ "time": "2018-12-30T23:16:27+00:00",
434
+ "type": "phpcodesniffer-standard",
435
+ "installation-source": "dist",
436
+ "notification-url": "https://packagist.org/downloads/",
437
+ "license": [
438
+ "LGPL-3.0-or-later"
439
+ ],
440
+ "authors": [
441
+ {
442
+ "name": "Contributors",
443
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
444
+ },
445
+ {
446
+ "name": "Wim Godden",
447
+ "homepage": "https://github.com/wimg",
448
+ "role": "lead"
449
+ },
450
+ {
451
+ "name": "Juliette Reinders Folmer",
452
+ "homepage": "https://github.com/jrfnl",
453
+ "role": "lead"
454
+ }
455
+ ],
456
+ "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
457
+ "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
458
+ "keywords": [
459
+ "compatibility",
460
+ "phpcs",
461
+ "standards"
462
+ ]
463
+ },
464
+ {
465
+ "name": "phpcompatibility/phpcompatibility-paragonie",
466
+ "version": "1.0.1",
467
+ "version_normalized": "1.0.1.0",
468
+ "source": {
469
+ "type": "git",
470
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
471
+ "reference": "9160de79fcd683b5c99e9c4133728d91529753ea"
472
+ },
473
+ "dist": {
474
+ "type": "zip",
475
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/9160de79fcd683b5c99e9c4133728d91529753ea",
476
+ "reference": "9160de79fcd683b5c99e9c4133728d91529753ea",
477
+ "shasum": ""
478
+ },
479
+ "require": {
480
+ "phpcompatibility/php-compatibility": "^9.0"
481
+ },
482
+ "require-dev": {
483
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
484
+ },
485
+ "suggest": {
486
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
487
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
488
+ },
489
+ "time": "2018-12-16T19:10:44+00:00",
490
+ "type": "phpcodesniffer-standard",
491
+ "installation-source": "dist",
492
+ "notification-url": "https://packagist.org/downloads/",
493
+ "license": [
494
+ "LGPL-3.0-or-later"
495
+ ],
496
+ "authors": [
497
+ {
498
+ "name": "Wim Godden",
499
+ "role": "lead"
500
+ },
501
+ {
502
+ "name": "Juliette Reinders Folmer",
503
+ "role": "lead"
504
+ }
505
+ ],
506
+ "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
507
+ "homepage": "http://phpcompatibility.com/",
508
+ "keywords": [
509
+ "compatibility",
510
+ "paragonie",
511
+ "phpcs",
512
+ "polyfill",
513
+ "standards"
514
+ ]
515
+ },
516
+ {
517
+ "name": "phpcompatibility/phpcompatibility-wp",
518
+ "version": "2.0.0",
519
+ "version_normalized": "2.0.0.0",
520
+ "source": {
521
+ "type": "git",
522
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
523
+ "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd"
524
+ },
525
+ "dist": {
526
+ "type": "zip",
527
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
528
+ "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd",
529
+ "shasum": ""
530
+ },
531
+ "require": {
532
+ "phpcompatibility/php-compatibility": "^9.0",
533
+ "phpcompatibility/phpcompatibility-paragonie": "^1.0"
534
+ },
535
+ "require-dev": {
536
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
537
+ },
538
+ "suggest": {
539
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
540
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
541
+ },
542
+ "time": "2018-10-07T18:31:37+00:00",
543
+ "type": "phpcodesniffer-standard",
544
+ "installation-source": "dist",
545
+ "notification-url": "https://packagist.org/downloads/",
546
+ "license": [
547
+ "LGPL-3.0-or-later"
548
+ ],
549
+ "authors": [
550
+ {
551
+ "name": "Wim Godden",
552
+ "role": "lead"
553
+ },
554
+ {
555
+ "name": "Juliette Reinders Folmer",
556
+ "role": "lead"
557
+ }
558
+ ],
559
+ "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
560
+ "homepage": "http://phpcompatibility.com/",
561
+ "keywords": [
562
+ "compatibility",
563
+ "phpcs",
564
+ "standards",
565
+ "wordpress"
566
+ ]
567
+ },
568
+ {
569
+ "name": "phpdocumentor/reflection-common",
570
+ "version": "1.0.1",
571
+ "version_normalized": "1.0.1.0",
572
+ "source": {
573
+ "type": "git",
574
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
575
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
576
+ },
577
+ "dist": {
578
+ "type": "zip",
579
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
580
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
581
+ "shasum": ""
582
+ },
583
+ "require": {
584
+ "php": ">=5.5"
585
+ },
586
+ "require-dev": {
587
+ "phpunit/phpunit": "^4.6"
588
+ },
589
+ "time": "2017-09-11T18:02:19+00:00",
590
+ "type": "library",
591
+ "extra": {
592
+ "branch-alias": {
593
+ "dev-master": "1.0.x-dev"
594
+ }
595
+ },
596
+ "installation-source": "dist",
597
+ "autoload": {
598
+ "psr-4": {
599
+ "phpDocumentor\\Reflection\\": [
600
+ "src"
601
+ ]
602
+ }
603
+ },
604
+ "notification-url": "https://packagist.org/downloads/",
605
+ "license": [
606
+ "MIT"
607
+ ],
608
+ "authors": [
609
+ {
610
+ "name": "Jaap van Otterdijk",
611
+ "email": "opensource@ijaap.nl"
612
+ }
613
+ ],
614
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
615
+ "homepage": "http://www.phpdoc.org",
616
+ "keywords": [
617
+ "FQSEN",
618
+ "phpDocumentor",
619
+ "phpdoc",
620
+ "reflection",
621
+ "static analysis"
622
+ ]
623
+ },
624
+ {
625
+ "name": "phpdocumentor/reflection-docblock",
626
+ "version": "4.3.0",
627
+ "version_normalized": "4.3.0.0",
628
+ "source": {
629
+ "type": "git",
630
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
631
+ "reference": "94fd0001232e47129dd3504189fa1c7225010d08"
632
+ },
633
+ "dist": {
634
+ "type": "zip",
635
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
636
+ "reference": "94fd0001232e47129dd3504189fa1c7225010d08",
637
+ "shasum": ""
638
+ },
639
+ "require": {
640
+ "php": "^7.0",
641
+ "phpdocumentor/reflection-common": "^1.0.0",
642
+ "phpdocumentor/type-resolver": "^0.4.0",
643
+ "webmozart/assert": "^1.0"
644
+ },
645
+ "require-dev": {
646
+ "doctrine/instantiator": "~1.0.5",
647
+ "mockery/mockery": "^1.0",
648
+ "phpunit/phpunit": "^6.4"
649
+ },
650
+ "time": "2017-11-30T07:14:17+00:00",
651
+ "type": "library",
652
+ "extra": {
653
+ "branch-alias": {
654
+ "dev-master": "4.x-dev"
655
+ }
656
+ },
657
+ "installation-source": "dist",
658
+ "autoload": {
659
+ "psr-4": {
660
+ "phpDocumentor\\Reflection\\": [
661
+ "src/"
662
+ ]
663
+ }
664
+ },
665
+ "notification-url": "https://packagist.org/downloads/",
666
+ "license": [
667
+ "MIT"
668
+ ],
669
+ "authors": [
670
+ {
671
+ "name": "Mike van Riel",
672
+ "email": "me@mikevanriel.com"
673
+ }
674
+ ],
675
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock."
676
+ },
677
+ {
678
+ "name": "phpdocumentor/type-resolver",
679
+ "version": "0.4.0",
680
+ "version_normalized": "0.4.0.0",
681
+ "source": {
682
+ "type": "git",
683
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
684
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
685
+ },
686
+ "dist": {
687
+ "type": "zip",
688
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
689
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
690
+ "shasum": ""
691
+ },
692
+ "require": {
693
+ "php": "^5.5 || ^7.0",
694
+ "phpdocumentor/reflection-common": "^1.0"
695
+ },
696
+ "require-dev": {
697
+ "mockery/mockery": "^0.9.4",
698
+ "phpunit/phpunit": "^5.2||^4.8.24"
699
+ },
700
+ "time": "2017-07-14T14:27:02+00:00",
701
+ "type": "library",
702
+ "extra": {
703
+ "branch-alias": {
704
+ "dev-master": "1.0.x-dev"
705
+ }
706
+ },
707
+ "installation-source": "dist",
708
+ "autoload": {
709
+ "psr-4": {
710
+ "phpDocumentor\\Reflection\\": [
711
+ "src/"
712
+ ]
713
+ }
714
+ },
715
+ "notification-url": "https://packagist.org/downloads/",
716
+ "license": [
717
+ "MIT"
718
+ ],
719
+ "authors": [
720
+ {
721
+ "name": "Mike van Riel",
722
+ "email": "me@mikevanriel.com"
723
+ }
724
+ ]
725
+ },
726
+ {
727
+ "name": "phpspec/prophecy",
728
+ "version": "1.8.0",
729
+ "version_normalized": "1.8.0.0",
730
+ "source": {
731
+ "type": "git",
732
+ "url": "https://github.com/phpspec/prophecy.git",
733
+ "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
734
+ },
735
+ "dist": {
736
+ "type": "zip",
737
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
738
+ "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
739
+ "shasum": ""
740
+ },
741
+ "require": {
742
+ "doctrine/instantiator": "^1.0.2",
743
+ "php": "^5.3|^7.0",
744
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
745
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
746
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
747
+ },
748
+ "require-dev": {
749
+ "phpspec/phpspec": "^2.5|^3.2",
750
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
751
+ },
752
+ "time": "2018-08-05T17:53:17+00:00",
753
+ "type": "library",
754
+ "extra": {
755
+ "branch-alias": {
756
+ "dev-master": "1.8.x-dev"
757
+ }
758
+ },
759
+ "installation-source": "dist",
760
+ "autoload": {
761
+ "psr-0": {
762
+ "Prophecy\\": "src/"
763
+ }
764
+ },
765
+ "notification-url": "https://packagist.org/downloads/",
766
+ "license": [
767
+ "MIT"
768
+ ],
769
+ "authors": [
770
+ {
771
+ "name": "Konstantin Kudryashov",
772
+ "email": "ever.zet@gmail.com",
773
+ "homepage": "http://everzet.com"
774
+ },
775
+ {
776
+ "name": "Marcello Duarte",
777
+ "email": "marcello.duarte@gmail.com"
778
+ }
779
+ ],
780
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
781
+ "homepage": "https://github.com/phpspec/prophecy",
782
+ "keywords": [
783
+ "Double",
784
+ "Dummy",
785
+ "fake",
786
+ "mock",
787
+ "spy",
788
+ "stub"
789
+ ]
790
+ },
791
+ {
792
+ "name": "phpunit/php-code-coverage",
793
+ "version": "5.3.2",
794
+ "version_normalized": "5.3.2.0",
795
+ "source": {
796
+ "type": "git",
797
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
798
+ "reference": "c89677919c5dd6d3b3852f230a663118762218ac"
799
+ },
800
+ "dist": {
801
+ "type": "zip",
802
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
803
+ "reference": "c89677919c5dd6d3b3852f230a663118762218ac",
804
+ "shasum": ""
805
+ },
806
+ "require": {
807
+ "ext-dom": "*",
808
+ "ext-xmlwriter": "*",
809
+ "php": "^7.0",
810
+ "phpunit/php-file-iterator": "^1.4.2",
811
+ "phpunit/php-text-template": "^1.2.1",
812
+ "phpunit/php-token-stream": "^2.0.1",
813
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
814
+ "sebastian/environment": "^3.0",
815
+ "sebastian/version": "^2.0.1",
816
+ "theseer/tokenizer": "^1.1"
817
+ },
818
+ "require-dev": {
819
+ "phpunit/phpunit": "^6.0"
820
+ },
821
+ "suggest": {
822
+ "ext-xdebug": "^2.5.5"
823
+ },
824
+ "time": "2018-04-06T15:36:58+00:00",
825
+ "type": "library",
826
+ "extra": {
827
+ "branch-alias": {
828
+ "dev-master": "5.3.x-dev"
829
+ }
830
+ },
831
+ "installation-source": "dist",
832
+ "autoload": {
833
+ "classmap": [
834
+ "src/"
835
+ ]
836
+ },
837
+ "notification-url": "https://packagist.org/downloads/",
838
+ "license": [
839
+ "BSD-3-Clause"
840
+ ],
841
+ "authors": [
842
+ {
843
+ "name": "Sebastian Bergmann",
844
+ "email": "sebastian@phpunit.de",
845
+ "role": "lead"
846
+ }
847
+ ],
848
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
849
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
850
+ "keywords": [
851
+ "coverage",
852
+ "testing",
853
+ "xunit"
854
+ ]
855
+ },
856
+ {
857
+ "name": "phpunit/php-file-iterator",
858
+ "version": "1.4.5",
859
+ "version_normalized": "1.4.5.0",
860
+ "source": {
861
+ "type": "git",
862
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
863
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
864
+ },
865
+ "dist": {
866
+ "type": "zip",
867
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
868
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
869
+ "shasum": ""
870
+ },
871
+ "require": {
872
+ "php": ">=5.3.3"
873
+ },
874
+ "time": "2017-11-27T13:52:08+00:00",
875
+ "type": "library",
876
+ "extra": {
877
+ "branch-alias": {
878
+ "dev-master": "1.4.x-dev"
879
+ }
880
+ },
881
+ "installation-source": "dist",
882
+ "autoload": {
883
+ "classmap": [
884
+ "src/"
885
+ ]
886
+ },
887
+ "notification-url": "https://packagist.org/downloads/",
888
+ "license": [
889
+ "BSD-3-Clause"
890
+ ],
891
+ "authors": [
892
+ {
893
+ "name": "Sebastian Bergmann",
894
+ "email": "sb@sebastian-bergmann.de",
895
+ "role": "lead"
896
+ }
897
+ ],
898
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
899
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
900
+ "keywords": [
901
+ "filesystem",
902
+ "iterator"
903
+ ]
904
+ },
905
+ {
906
+ "name": "phpunit/php-text-template",
907
+ "version": "1.2.1",
908
+ "version_normalized": "1.2.1.0",
909
+ "source": {
910
+ "type": "git",
911
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
912
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
913
+ },
914
+ "dist": {
915
+ "type": "zip",
916
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
917
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
918
+ "shasum": ""
919
+ },
920
+ "require": {
921
+ "php": ">=5.3.3"
922
+ },
923
+ "time": "2015-06-21T13:50:34+00:00",
924
+ "type": "library",
925
+ "installation-source": "dist",
926
+ "autoload": {
927
+ "classmap": [
928
+ "src/"
929
+ ]
930
+ },
931
+ "notification-url": "https://packagist.org/downloads/",
932
+ "license": [
933
+ "BSD-3-Clause"
934
+ ],
935
+ "authors": [
936
+ {
937
+ "name": "Sebastian Bergmann",
938
+ "email": "sebastian@phpunit.de",
939
+ "role": "lead"
940
+ }
941
+ ],
942
+ "description": "Simple template engine.",
943
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
944
+ "keywords": [
945
+ "template"
946
+ ]
947
+ },
948
+ {
949
+ "name": "phpunit/php-timer",
950
+ "version": "1.0.9",
951
+ "version_normalized": "1.0.9.0",
952
+ "source": {
953
+ "type": "git",
954
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
955
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
956
+ },
957
+ "dist": {
958
+ "type": "zip",
959
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
960
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
961
+ "shasum": ""
962
+ },
963
+ "require": {
964
+ "php": "^5.3.3 || ^7.0"
965
+ },
966
+ "require-dev": {
967
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
968
+ },
969
+ "time": "2017-02-26T11:10:40+00:00",
970
+ "type": "library",
971
+ "extra": {
972
+ "branch-alias": {
973
+ "dev-master": "1.0-dev"
974
+ }
975
+ },
976
+ "installation-source": "dist",
977
+ "autoload": {
978
+ "classmap": [
979
+ "src/"
980
+ ]
981
+ },
982
+ "notification-url": "https://packagist.org/downloads/",
983
+ "license": [
984
+ "BSD-3-Clause"
985
+ ],
986
+ "authors": [
987
+ {
988
+ "name": "Sebastian Bergmann",
989
+ "email": "sb@sebastian-bergmann.de",
990
+ "role": "lead"
991
+ }
992
+ ],
993
+ "description": "Utility class for timing",
994
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
995
+ "keywords": [
996
+ "timer"
997
+ ]
998
+ },
999
+ {
1000
+ "name": "phpunit/php-token-stream",
1001
+ "version": "2.0.2",
1002
+ "version_normalized": "2.0.2.0",
1003
+ "source": {
1004
+ "type": "git",
1005
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
1006
+ "reference": "791198a2c6254db10131eecfe8c06670700904db"
1007
+ },
1008
+ "dist": {
1009
+ "type": "zip",
1010
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
1011
+ "reference": "791198a2c6254db10131eecfe8c06670700904db",
1012
+ "shasum": ""
1013
+ },
1014
+ "require": {
1015
+ "ext-tokenizer": "*",
1016
+ "php": "^7.0"
1017
+ },
1018
+ "require-dev": {
1019
+ "phpunit/phpunit": "^6.2.4"
1020
+ },
1021
+ "time": "2017-11-27T05:48:46+00:00",
1022
+ "type": "library",
1023
+ "extra": {
1024
+ "branch-alias": {
1025
+ "dev-master": "2.0-dev"
1026
+ }
1027
+ },
1028
+ "installation-source": "dist",
1029
+ "autoload": {
1030
+ "classmap": [
1031
+ "src/"
1032
+ ]
1033
+ },
1034
+ "notification-url": "https://packagist.org/downloads/",
1035
+ "license": [
1036
+ "BSD-3-Clause"
1037
+ ],
1038
+ "authors": [
1039
+ {
1040
+ "name": "Sebastian Bergmann",
1041
+ "email": "sebastian@phpunit.de"
1042
+ }
1043
+ ],
1044
+ "description": "Wrapper around PHP's tokenizer extension.",
1045
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
1046
+ "keywords": [
1047
+ "tokenizer"
1048
+ ]
1049
+ },
1050
+ {
1051
+ "name": "phpunit/phpunit",
1052
+ "version": "6.5.13",
1053
+ "version_normalized": "6.5.13.0",
1054
+ "source": {
1055
+ "type": "git",
1056
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
1057
+ "reference": "0973426fb012359b2f18d3bd1e90ef1172839693"
1058
+ },
1059
+ "dist": {
1060
+ "type": "zip",
1061
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693",
1062
+ "reference": "0973426fb012359b2f18d3bd1e90ef1172839693",
1063
+ "shasum": ""
1064
+ },
1065
+ "require": {
1066
+ "ext-dom": "*",
1067
+ "ext-json": "*",
1068
+ "ext-libxml": "*",
1069
+ "ext-mbstring": "*",
1070
+ "ext-xml": "*",
1071
+ "myclabs/deep-copy": "^1.6.1",
1072
+ "phar-io/manifest": "^1.0.1",
1073
+ "phar-io/version": "^1.0",
1074
+ "php": "^7.0",
1075
+ "phpspec/prophecy": "^1.7",
1076
+ "phpunit/php-code-coverage": "^5.3",
1077
+ "phpunit/php-file-iterator": "^1.4.3",
1078
+ "phpunit/php-text-template": "^1.2.1",
1079
+ "phpunit/php-timer": "^1.0.9",
1080
+ "phpunit/phpunit-mock-objects": "^5.0.9",
1081
+ "sebastian/comparator": "^2.1",
1082
+ "sebastian/diff": "^2.0",
1083
+ "sebastian/environment": "^3.1",
1084
+ "sebastian/exporter": "^3.1",
1085
+ "sebastian/global-state": "^2.0",
1086
+ "sebastian/object-enumerator": "^3.0.3",
1087
+ "sebastian/resource-operations": "^1.0",
1088
+ "sebastian/version": "^2.0.1"
1089
+ },
1090
+ "conflict": {
1091
+ "phpdocumentor/reflection-docblock": "3.0.2",
1092
+ "phpunit/dbunit": "<3.0"
1093
+ },
1094
+ "require-dev": {
1095
+ "ext-pdo": "*"
1096
+ },
1097
+ "suggest": {
1098
+ "ext-xdebug": "*",
1099
+ "phpunit/php-invoker": "^1.1"
1100
+ },
1101
+ "time": "2018-09-08T15:10:43+00:00",
1102
+ "bin": [
1103
+ "phpunit"
1104
+ ],
1105
+ "type": "library",
1106
+ "extra": {
1107
+ "branch-alias": {
1108
+ "dev-master": "6.5.x-dev"
1109
+ }
1110
+ },
1111
+ "installation-source": "dist",
1112
+ "autoload": {
1113
+ "classmap": [
1114
+ "src/"
1115
+ ]
1116
+ },
1117
+ "notification-url": "https://packagist.org/downloads/",
1118
+ "license": [
1119
+ "BSD-3-Clause"
1120
+ ],
1121
+ "authors": [
1122
+ {
1123
+ "name": "Sebastian Bergmann",
1124
+ "email": "sebastian@phpunit.de",
1125
+ "role": "lead"
1126
+ }
1127
+ ],
1128
+ "description": "The PHP Unit Testing framework.",
1129
+ "homepage": "https://phpunit.de/",
1130
+ "keywords": [
1131
+ "phpunit",
1132
+ "testing",
1133
+ "xunit"
1134
+ ]
1135
+ },
1136
+ {
1137
+ "name": "phpunit/phpunit-mock-objects",
1138
+ "version": "5.0.10",
1139
+ "version_normalized": "5.0.10.0",
1140
+ "source": {
1141
+ "type": "git",
1142
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
1143
+ "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f"
1144
+ },
1145
+ "dist": {
1146
+ "type": "zip",
1147
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f",
1148
+ "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f",
1149
+ "shasum": ""
1150
+ },
1151
+ "require": {
1152
+ "doctrine/instantiator": "^1.0.5",
1153
+ "php": "^7.0",
1154
+ "phpunit/php-text-template": "^1.2.1",
1155
+ "sebastian/exporter": "^3.1"
1156
+ },
1157
+ "conflict": {
1158
+ "phpunit/phpunit": "<6.0"
1159
+ },
1160
+ "require-dev": {
1161
+ "phpunit/phpunit": "^6.5.11"
1162
+ },
1163
+ "suggest": {
1164
+ "ext-soap": "*"
1165
+ },
1166
+ "time": "2018-08-09T05:50:03+00:00",
1167
+ "type": "library",
1168
+ "extra": {
1169
+ "branch-alias": {
1170
+ "dev-master": "5.0.x-dev"
1171
+ }
1172
+ },
1173
+ "installation-source": "dist",
1174
+ "autoload": {
1175
+ "classmap": [
1176
+ "src/"
1177
+ ]
1178
+ },
1179
+ "notification-url": "https://packagist.org/downloads/",
1180
+ "license": [
1181
+ "BSD-3-Clause"
1182
+ ],
1183
+ "authors": [
1184
+ {
1185
+ "name": "Sebastian Bergmann",
1186
+ "email": "sebastian@phpunit.de",
1187
+ "role": "lead"
1188
+ }
1189
+ ],
1190
+ "description": "Mock Object library for PHPUnit",
1191
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
1192
+ "keywords": [
1193
+ "mock",
1194
+ "xunit"
1195
+ ],
1196
+ "abandoned": true
1197
+ },
1198
+ {
1199
+ "name": "sebastian/code-unit-reverse-lookup",
1200
+ "version": "1.0.1",
1201
+ "version_normalized": "1.0.1.0",
1202
+ "source": {
1203
+ "type": "git",
1204
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1205
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
1206
+ },
1207
+ "dist": {
1208
+ "type": "zip",
1209
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1210
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1211
+ "shasum": ""
1212
+ },
1213
+ "require": {
1214
+ "php": "^5.6 || ^7.0"
1215
+ },
1216
+ "require-dev": {
1217
+ "phpunit/phpunit": "^5.7 || ^6.0"
1218
+ },
1219
+ "time": "2017-03-04T06:30:41+00:00",
1220
+ "type": "library",
1221
+ "extra": {
1222
+ "branch-alias": {
1223
+ "dev-master": "1.0.x-dev"
1224
+ }
1225
+ },
1226
+ "installation-source": "dist",
1227
+ "autoload": {
1228
+ "classmap": [
1229
+ "src/"
1230
+ ]
1231
+ },
1232
+ "notification-url": "https://packagist.org/downloads/",
1233
+ "license": [
1234
+ "BSD-3-Clause"
1235
+ ],
1236
+ "authors": [
1237
+ {
1238
+ "name": "Sebastian Bergmann",
1239
+ "email": "sebastian@phpunit.de"
1240
+ }
1241
+ ],
1242
+ "description": "Looks up which function or method a line of code belongs to",
1243
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/"
1244
+ },
1245
+ {
1246
+ "name": "sebastian/comparator",
1247
+ "version": "2.1.3",
1248
+ "version_normalized": "2.1.3.0",
1249
+ "source": {
1250
+ "type": "git",
1251
+ "url": "https://github.com/sebastianbergmann/comparator.git",
1252
+ "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
1253
+ },
1254
+ "dist": {
1255
+ "type": "zip",
1256
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
1257
+ "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
1258
+ "shasum": ""
1259
+ },
1260
+ "require": {
1261
+ "php": "^7.0",
1262
+ "sebastian/diff": "^2.0 || ^3.0",
1263
+ "sebastian/exporter": "^3.1"
1264
+ },
1265
+ "require-dev": {
1266
+ "phpunit/phpunit": "^6.4"
1267
+ },
1268
+ "time": "2018-02-01T13:46:46+00:00",
1269
+ "type": "library",
1270
+ "extra": {
1271
+ "branch-alias": {
1272
+ "dev-master": "2.1.x-dev"
1273
+ }
1274
+ },
1275
+ "installation-source": "dist",
1276
+ "autoload": {
1277
+ "classmap": [
1278
+ "src/"
1279
+ ]
1280
+ },
1281
+ "notification-url": "https://packagist.org/downloads/",
1282
+ "license": [
1283
+ "BSD-3-Clause"
1284
+ ],
1285
+ "authors": [
1286
+ {
1287
+ "name": "Jeff Welch",
1288
+ "email": "whatthejeff@gmail.com"
1289
+ },
1290
+ {
1291
+ "name": "Volker Dusch",
1292
+ "email": "github@wallbash.com"
1293
+ },
1294
+ {
1295
+ "name": "Bernhard Schussek",
1296
+ "email": "bschussek@2bepublished.at"
1297
+ },
1298
+ {
1299
+ "name": "Sebastian Bergmann",
1300
+ "email": "sebastian@phpunit.de"
1301
+ }
1302
+ ],
1303
+ "description": "Provides the functionality to compare PHP values for equality",
1304
+ "homepage": "https://github.com/sebastianbergmann/comparator",
1305
+ "keywords": [
1306
+ "comparator",
1307
+ "compare",
1308
+ "equality"
1309
+ ]
1310
+ },
1311
+ {
1312
+ "name": "sebastian/diff",
1313
+ "version": "2.0.1",
1314
+ "version_normalized": "2.0.1.0",
1315
+ "source": {
1316
+ "type": "git",
1317
+ "url": "https://github.com/sebastianbergmann/diff.git",
1318
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
1319
+ },
1320
+ "dist": {
1321
+ "type": "zip",
1322
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
1323
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
1324
+ "shasum": ""
1325
+ },
1326
+ "require": {
1327
+ "php": "^7.0"
1328
+ },
1329
+ "require-dev": {
1330
+ "phpunit/phpunit": "^6.2"
1331
+ },
1332
+ "time": "2017-08-03T08:09:46+00:00",
1333
+ "type": "library",
1334
+ "extra": {
1335
+ "branch-alias": {
1336
+ "dev-master": "2.0-dev"
1337
+ }
1338
+ },
1339
+ "installation-source": "dist",
1340
+ "autoload": {
1341
+ "classmap": [
1342
+ "src/"
1343
+ ]
1344
+ },
1345
+ "notification-url": "https://packagist.org/downloads/",
1346
+ "license": [
1347
+ "BSD-3-Clause"
1348
+ ],
1349
+ "authors": [
1350
+ {
1351
+ "name": "Kore Nordmann",
1352
+ "email": "mail@kore-nordmann.de"
1353
+ },
1354
+ {
1355
+ "name": "Sebastian Bergmann",
1356
+ "email": "sebastian@phpunit.de"
1357
+ }
1358
+ ],
1359
+ "description": "Diff implementation",
1360
+ "homepage": "https://github.com/sebastianbergmann/diff",
1361
+ "keywords": [
1362
+ "diff"
1363
+ ]
1364
+ },
1365
+ {
1366
+ "name": "sebastian/environment",
1367
+ "version": "3.1.0",
1368
+ "version_normalized": "3.1.0.0",
1369
+ "source": {
1370
+ "type": "git",
1371
+ "url": "https://github.com/sebastianbergmann/environment.git",
1372
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
1373
+ },
1374
+ "dist": {
1375
+ "type": "zip",
1376
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
1377
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
1378
+ "shasum": ""
1379
+ },
1380
+ "require": {
1381
+ "php": "^7.0"
1382
+ },
1383
+ "require-dev": {
1384
+ "phpunit/phpunit": "^6.1"
1385
+ },
1386
+ "time": "2017-07-01T08:51:00+00:00",
1387
+ "type": "library",
1388
+ "extra": {
1389
+ "branch-alias": {
1390
+ "dev-master": "3.1.x-dev"
1391
+ }
1392
+ },
1393
+ "installation-source": "dist",
1394
+ "autoload": {
1395
+ "classmap": [
1396
+ "src/"
1397
+ ]
1398
+ },
1399
+ "notification-url": "https://packagist.org/downloads/",
1400
+ "license": [
1401
+ "BSD-3-Clause"
1402
+ ],
1403
+ "authors": [
1404
+ {
1405
+ "name": "Sebastian Bergmann",
1406
+ "email": "sebastian@phpunit.de"
1407
+ }
1408
+ ],
1409
+ "description": "Provides functionality to handle HHVM/PHP environments",
1410
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
1411
+ "keywords": [
1412
+ "Xdebug",
1413
+ "environment",
1414
+ "hhvm"
1415
+ ]
1416
+ },
1417
+ {
1418
+ "name": "sebastian/exporter",
1419
+ "version": "3.1.0",
1420
+ "version_normalized": "3.1.0.0",
1421
+ "source": {
1422
+ "type": "git",
1423
+ "url": "https://github.com/sebastianbergmann/exporter.git",
1424
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
1425
+ },
1426
+ "dist": {
1427
+ "type": "zip",
1428
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
1429
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
1430
+ "shasum": ""
1431
+ },
1432
+ "require": {
1433
+ "php": "^7.0",
1434
+ "sebastian/recursion-context": "^3.0"
1435
+ },
1436
+ "require-dev": {
1437
+ "ext-mbstring": "*",
1438
+ "phpunit/phpunit": "^6.0"
1439
+ },
1440
+ "time": "2017-04-03T13:19:02+00:00",
1441
+ "type": "library",
1442
+ "extra": {
1443
+ "branch-alias": {
1444
+ "dev-master": "3.1.x-dev"
1445
+ }
1446
+ },
1447
+ "installation-source": "dist",
1448
+ "autoload": {
1449
+ "classmap": [
1450
+ "src/"
1451
+ ]
1452
+ },
1453
+ "notification-url": "https://packagist.org/downloads/",
1454
+ "license": [
1455
+ "BSD-3-Clause"
1456
+ ],
1457
+ "authors": [
1458
+ {
1459
+ "name": "Jeff Welch",
1460
+ "email": "whatthejeff@gmail.com"
1461
+ },
1462
+ {
1463
+ "name": "Volker Dusch",
1464
+ "email": "github@wallbash.com"
1465
+ },
1466
+ {
1467
+ "name": "Bernhard Schussek",
1468
+ "email": "bschussek@2bepublished.at"
1469
+ },
1470
+ {
1471
+ "name": "Sebastian Bergmann",
1472
+ "email": "sebastian@phpunit.de"
1473
+ },
1474
+ {
1475
+ "name": "Adam Harvey",
1476
+ "email": "aharvey@php.net"
1477
+ }
1478
+ ],
1479
+ "description": "Provides the functionality to export PHP variables for visualization",
1480
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
1481
+ "keywords": [
1482
+ "export",
1483
+ "exporter"
1484
+ ]
1485
+ },
1486
+ {
1487
+ "name": "sebastian/global-state",
1488
+ "version": "2.0.0",
1489
+ "version_normalized": "2.0.0.0",
1490
+ "source": {
1491
+ "type": "git",
1492
+ "url": "https://github.com/sebastianbergmann/global-state.git",
1493
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
1494
+ },
1495
+ "dist": {
1496
+ "type": "zip",
1497
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
1498
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
1499
+ "shasum": ""
1500
+ },
1501
+ "require": {
1502
+ "php": "^7.0"
1503
+ },
1504
+ "require-dev": {
1505
+ "phpunit/phpunit": "^6.0"
1506
+ },
1507
+ "suggest": {
1508
+ "ext-uopz": "*"
1509
+ },
1510
+ "time": "2017-04-27T15:39:26+00:00",
1511
+ "type": "library",
1512
+ "extra": {
1513
+ "branch-alias": {
1514
+ "dev-master": "2.0-dev"
1515
+ }
1516
+ },
1517
+ "installation-source": "dist",
1518
+ "autoload": {
1519
+ "classmap": [
1520
+ "src/"
1521
+ ]
1522
+ },
1523
+ "notification-url": "https://packagist.org/downloads/",
1524
+ "license": [
1525
+ "BSD-3-Clause"
1526
+ ],
1527
+ "authors": [
1528
+ {
1529
+ "name": "Sebastian Bergmann",
1530
+ "email": "sebastian@phpunit.de"
1531
+ }
1532
+ ],
1533
+ "description": "Snapshotting of global state",
1534
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
1535
+ "keywords": [
1536
+ "global state"
1537
+ ]
1538
+ },
1539
+ {
1540
+ "name": "sebastian/object-enumerator",
1541
+ "version": "3.0.3",
1542
+ "version_normalized": "3.0.3.0",
1543
+ "source": {
1544
+ "type": "git",
1545
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
1546
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
1547
+ },
1548
+ "dist": {
1549
+ "type": "zip",
1550
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
1551
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
1552
+ "shasum": ""
1553
+ },
1554
+ "require": {
1555
+ "php": "^7.0",
1556
+ "sebastian/object-reflector": "^1.1.1",
1557
+ "sebastian/recursion-context": "^3.0"
1558
+ },
1559
+ "require-dev": {
1560
+ "phpunit/phpunit": "^6.0"
1561
+ },
1562
+ "time": "2017-08-03T12:35:26+00:00",
1563
+ "type": "library",
1564
+ "extra": {
1565
+ "branch-alias": {
1566
+ "dev-master": "3.0.x-dev"
1567
+ }
1568
+ },
1569
+ "installation-source": "dist",
1570
+ "autoload": {
1571
+ "classmap": [
1572
+ "src/"
1573
+ ]
1574
+ },
1575
+ "notification-url": "https://packagist.org/downloads/",
1576
+ "license": [
1577
+ "BSD-3-Clause"
1578
+ ],
1579
+ "authors": [
1580
+ {
1581
+ "name": "Sebastian Bergmann",
1582
+ "email": "sebastian@phpunit.de"
1583
+ }
1584
+ ],
1585
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
1586
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/"
1587
+ },
1588
+ {
1589
+ "name": "sebastian/object-reflector",
1590
+ "version": "1.1.1",
1591
+ "version_normalized": "1.1.1.0",
1592
+ "source": {
1593
+ "type": "git",
1594
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
1595
+ "reference": "773f97c67f28de00d397be301821b06708fca0be"
1596
+ },
1597
+ "dist": {
1598
+ "type": "zip",
1599
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
1600
+ "reference": "773f97c67f28de00d397be301821b06708fca0be",
1601
+ "shasum": ""
1602
+ },
1603
+ "require": {
1604
+ "php": "^7.0"
1605
+ },
1606
+ "require-dev": {
1607
+ "phpunit/phpunit": "^6.0"
1608
+ },
1609
+ "time": "2017-03-29T09:07:27+00:00",
1610
+ "type": "library",
1611
+ "extra": {
1612
+ "branch-alias": {
1613
+ "dev-master": "1.1-dev"
1614
+ }
1615
+ },
1616
+ "installation-source": "dist",
1617
+ "autoload": {
1618
+ "classmap": [
1619
+ "src/"
1620
+ ]
1621
+ },
1622
+ "notification-url": "https://packagist.org/downloads/",
1623
+ "license": [
1624
+ "BSD-3-Clause"
1625
+ ],
1626
+ "authors": [
1627
+ {
1628
+ "name": "Sebastian Bergmann",
1629
+ "email": "sebastian@phpunit.de"
1630
+ }
1631
+ ],
1632
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
1633
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/"
1634
+ },
1635
+ {
1636
+ "name": "sebastian/recursion-context",
1637
+ "version": "3.0.0",
1638
+ "version_normalized": "3.0.0.0",
1639
+ "source": {
1640
+ "type": "git",
1641
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
1642
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
1643
+ },
1644
+ "dist": {
1645
+ "type": "zip",
1646
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
1647
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
1648
+ "shasum": ""
1649
+ },
1650
+ "require": {
1651
+ "php": "^7.0"
1652
+ },
1653
+ "require-dev": {
1654
+ "phpunit/phpunit": "^6.0"
1655
+ },
1656
+ "time": "2017-03-03T06:23:57+00:00",
1657
+ "type": "library",
1658
+ "extra": {
1659
+ "branch-alias": {
1660
+ "dev-master": "3.0.x-dev"
1661
+ }
1662
+ },
1663
+ "installation-source": "dist",
1664
+ "autoload": {
1665
+ "classmap": [
1666
+ "src/"
1667
+ ]
1668
+ },
1669
+ "notification-url": "https://packagist.org/downloads/",
1670
+ "license": [
1671
+ "BSD-3-Clause"
1672
+ ],
1673
+ "authors": [
1674
+ {
1675
+ "name": "Jeff Welch",
1676
+ "email": "whatthejeff@gmail.com"
1677
+ },
1678
+ {
1679
+ "name": "Sebastian Bergmann",
1680
+ "email": "sebastian@phpunit.de"
1681
+ },
1682
+ {
1683
+ "name": "Adam Harvey",
1684
+ "email": "aharvey@php.net"
1685
+ }
1686
+ ],
1687
+ "description": "Provides functionality to recursively process PHP variables",
1688
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context"
1689
+ },
1690
+ {
1691
+ "name": "sebastian/resource-operations",
1692
+ "version": "1.0.0",
1693
+ "version_normalized": "1.0.0.0",
1694
+ "source": {
1695
+ "type": "git",
1696
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
1697
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
1698
+ },
1699
+ "dist": {
1700
+ "type": "zip",
1701
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1702
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1703
+ "shasum": ""
1704
+ },
1705
+ "require": {
1706
+ "php": ">=5.6.0"
1707
+ },
1708
+ "time": "2015-07-28T20:34:47+00:00",
1709
+ "type": "library",
1710
+ "extra": {
1711
+ "branch-alias": {
1712
+ "dev-master": "1.0.x-dev"
1713
+ }
1714
+ },
1715
+ "installation-source": "dist",
1716
+ "autoload": {
1717
+ "classmap": [
1718
+ "src/"
1719
+ ]
1720
+ },
1721
+ "notification-url": "https://packagist.org/downloads/",
1722
+ "license": [
1723
+ "BSD-3-Clause"
1724
+ ],
1725
+ "authors": [
1726
+ {
1727
+ "name": "Sebastian Bergmann",
1728
+ "email": "sebastian@phpunit.de"
1729
+ }
1730
+ ],
1731
+ "description": "Provides a list of PHP built-in functions that operate on resources",
1732
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations"
1733
+ },
1734
+ {
1735
+ "name": "sebastian/version",
1736
+ "version": "2.0.1",
1737
+ "version_normalized": "2.0.1.0",
1738
+ "source": {
1739
+ "type": "git",
1740
+ "url": "https://github.com/sebastianbergmann/version.git",
1741
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
1742
+ },
1743
+ "dist": {
1744
+ "type": "zip",
1745
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
1746
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
1747
+ "shasum": ""
1748
+ },
1749
+ "require": {
1750
+ "php": ">=5.6"
1751
+ },
1752
+ "time": "2016-10-03T07:35:21+00:00",
1753
+ "type": "library",
1754
+ "extra": {
1755
+ "branch-alias": {
1756
+ "dev-master": "2.0.x-dev"
1757
+ }
1758
+ },
1759
+ "installation-source": "dist",
1760
+ "autoload": {
1761
+ "classmap": [
1762
+ "src/"
1763
+ ]
1764
+ },
1765
+ "notification-url": "https://packagist.org/downloads/",
1766
+ "license": [
1767
+ "BSD-3-Clause"
1768
+ ],
1769
+ "authors": [
1770
+ {
1771
+ "name": "Sebastian Bergmann",
1772
+ "email": "sebastian@phpunit.de",
1773
+ "role": "lead"
1774
+ }
1775
+ ],
1776
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1777
+ "homepage": "https://github.com/sebastianbergmann/version"
1778
+ },
1779
+ {
1780
+ "name": "squizlabs/php_codesniffer",
1781
+ "version": "3.4.0",
1782
+ "version_normalized": "3.4.0.0",
1783
+ "source": {
1784
+ "type": "git",
1785
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1786
+ "reference": "379deb987e26c7cd103a7b387aea178baec96e48"
1787
+ },
1788
+ "dist": {
1789
+ "type": "zip",
1790
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
1791
+ "reference": "379deb987e26c7cd103a7b387aea178baec96e48",
1792
+ "shasum": ""
1793
+ },
1794
+ "require": {
1795
+ "ext-simplexml": "*",
1796
+ "ext-tokenizer": "*",
1797
+ "ext-xmlwriter": "*",
1798
+ "php": ">=5.4.0"
1799
+ },
1800
+ "require-dev": {
1801
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
1802
+ },
1803
+ "time": "2018-12-19T23:57:18+00:00",
1804
+ "bin": [
1805
+ "bin/phpcs",
1806
+ "bin/phpcbf"
1807
+ ],
1808
+ "type": "library",
1809
+ "extra": {
1810
+ "branch-alias": {
1811
+ "dev-master": "3.x-dev"
1812
+ }
1813
+ },
1814
+ "installation-source": "dist",
1815
+ "notification-url": "https://packagist.org/downloads/",
1816
+ "license": [
1817
+ "BSD-3-Clause"
1818
+ ],
1819
+ "authors": [
1820
+ {
1821
+ "name": "Greg Sherwood",
1822
+ "role": "lead"
1823
+ }
1824
+ ],
1825
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
1826
+ "homepage": "http://www.squizlabs.com/php-codesniffer",
1827
+ "keywords": [
1828
+ "phpcs",
1829
+ "standards"
1830
+ ]
1831
+ },
1832
+ {
1833
+ "name": "symfony/polyfill-ctype",
1834
+ "version": "v1.10.0",
1835
+ "version_normalized": "1.10.0.0",
1836
+ "source": {
1837
+ "type": "git",
1838
+ "url": "https://github.com/symfony/polyfill-ctype.git",
1839
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
1840
+ },
1841
+ "dist": {
1842
+ "type": "zip",
1843
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
1844
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
1845
+ "shasum": ""
1846
+ },
1847
+ "require": {
1848
+ "php": ">=5.3.3"
1849
+ },
1850
+ "suggest": {
1851
+ "ext-ctype": "For best performance"
1852
+ },
1853
+ "time": "2018-08-06T14:22:27+00:00",
1854
+ "type": "library",
1855
+ "extra": {
1856
+ "branch-alias": {
1857
+ "dev-master": "1.9-dev"
1858
+ }
1859
+ },
1860
+ "installation-source": "dist",
1861
+ "autoload": {
1862
+ "psr-4": {
1863
+ "Symfony\\Polyfill\\Ctype\\": ""
1864
+ },
1865
+ "files": [
1866
+ "bootstrap.php"
1867
+ ]
1868
+ },
1869
+ "notification-url": "https://packagist.org/downloads/",
1870
+ "license": [
1871
+ "MIT"
1872
+ ],
1873
+ "authors": [
1874
+ {
1875
+ "name": "Symfony Community",
1876
+ "homepage": "https://symfony.com/contributors"
1877
+ },
1878
+ {
1879
+ "name": "Gert de Pagter",
1880
+ "email": "backendtea@gmail.com"
1881
+ }
1882
+ ],
1883
+ "description": "Symfony polyfill for ctype functions",
1884
+ "homepage": "https://symfony.com",
1885
+ "keywords": [
1886
+ "compatibility",
1887
+ "ctype",
1888
+ "polyfill",
1889
+ "portable"
1890
+ ]
1891
+ },
1892
+ {
1893
+ "name": "theseer/tokenizer",
1894
+ "version": "1.1.0",
1895
+ "version_normalized": "1.1.0.0",
1896
+ "source": {
1897
+ "type": "git",
1898
+ "url": "https://github.com/theseer/tokenizer.git",
1899
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
1900
+ },
1901
+ "dist": {
1902
+ "type": "zip",
1903
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
1904
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
1905
+ "shasum": ""
1906
+ },
1907
+ "require": {
1908
+ "ext-dom": "*",
1909
+ "ext-tokenizer": "*",
1910
+ "ext-xmlwriter": "*",
1911
+ "php": "^7.0"
1912
+ },
1913
+ "time": "2017-04-07T12:08:54+00:00",
1914
+ "type": "library",
1915
+ "installation-source": "dist",
1916
+ "autoload": {
1917
+ "classmap": [
1918
+ "src/"
1919
+ ]
1920
+ },
1921
+ "notification-url": "https://packagist.org/downloads/",
1922
+ "license": [
1923
+ "BSD-3-Clause"
1924
+ ],
1925
+ "authors": [
1926
+ {
1927
+ "name": "Arne Blankerts",
1928
+ "email": "arne@blankerts.de",
1929
+ "role": "Developer"
1930
+ }
1931
+ ],
1932
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats"
1933
+ },
1934
+ {
1935
+ "name": "webmozart/assert",
1936
+ "version": "1.4.0",
1937
+ "version_normalized": "1.4.0.0",
1938
+ "source": {
1939
+ "type": "git",
1940
+ "url": "https://github.com/webmozart/assert.git",
1941
+ "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
1942
+ },
1943
+ "dist": {
1944
+ "type": "zip",
1945
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
1946
+ "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
1947
+ "shasum": ""
1948
+ },
1949
+ "require": {
1950
+ "php": "^5.3.3 || ^7.0",
1951
+ "symfony/polyfill-ctype": "^1.8"
1952
+ },
1953
+ "require-dev": {
1954
+ "phpunit/phpunit": "^4.6",
1955
+ "sebastian/version": "^1.0.1"
1956
+ },
1957
+ "time": "2018-12-25T11:19:39+00:00",
1958
+ "type": "library",
1959
+ "extra": {
1960
+ "branch-alias": {
1961
+ "dev-master": "1.3-dev"
1962
+ }
1963
+ },
1964
+ "installation-source": "dist",
1965
+ "autoload": {
1966
+ "psr-4": {
1967
+ "Webmozart\\Assert\\": "src/"
1968
+ }
1969
+ },
1970
+ "notification-url": "https://packagist.org/downloads/",
1971
+ "license": [
1972
+ "MIT"
1973
+ ],
1974
+ "authors": [
1975
+ {
1976
+ "name": "Bernhard Schussek",
1977
+ "email": "bschussek@gmail.com"
1978
+ }
1979
+ ],
1980
+ "description": "Assertions to validate method input/output with nice error messages.",
1981
+ "keywords": [
1982
+ "assert",
1983
+ "check",
1984
+ "validate"
1985
+ ]
1986
+ },
1987
+ {
1988
+ "name": "woocommerce/woocommerce-sniffs",
1989
+ "version": "0.0.6",
1990
+ "version_normalized": "0.0.6.0",
1991
+ "source": {
1992
+ "type": "git",
1993
+ "url": "https://github.com/woocommerce/woocommerce-sniffs.git",
1994
+ "reference": "a3032bdddd60c71d1330f591e1a9128e115f81ee"
1995
+ },
1996
+ "dist": {
1997
+ "type": "zip",
1998
+ "url": "https://api.github.com/repos/woocommerce/woocommerce-sniffs/zipball/a3032bdddd60c71d1330f591e1a9128e115f81ee",
1999
+ "reference": "a3032bdddd60c71d1330f591e1a9128e115f81ee",
2000
+ "shasum": ""
2001
+ },
2002
+ "require": {
2003
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
2004
+ "php": ">=7.0",
2005
+ "phpcompatibility/phpcompatibility-wp": "2.0.0",
2006
+ "wp-coding-standards/wpcs": "^1.2"
2007
+ },
2008
+ "time": "2019-03-11T15:30:23+00:00",
2009
+ "type": "phpcodesniffer-standard",
2010
+ "installation-source": "dist",
2011
+ "notification-url": "https://packagist.org/downloads/",
2012
+ "license": [
2013
+ "MIT"
2014
+ ],
2015
+ "authors": [
2016
+ {
2017
+ "name": "Claudio Sanches",
2018
+ "email": "claudio@automattic.com"
2019
+ }
2020
+ ],
2021
+ "description": "WooCommerce sniffs",
2022
+ "keywords": [
2023
+ "phpcs",
2024
+ "standards",
2025
+ "woocommerce",
2026
+ "wordpress"
2027
+ ]
2028
+ },
2029
+ {
2030
+ "name": "wp-coding-standards/wpcs",
2031
+ "version": "1.2.1",
2032
+ "version_normalized": "1.2.1.0",
2033
+ "source": {
2034
+ "type": "git",
2035
+ "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
2036
+ "reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c"
2037
+ },
2038
+ "dist": {
2039
+ "type": "zip",
2040
+ "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c",
2041
+ "reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c",
2042
+ "shasum": ""
2043
+ },
2044
+ "require": {
2045
+ "php": ">=5.3",
2046
+ "squizlabs/php_codesniffer": "^2.9.0 || ^3.0.2"
2047
+ },
2048
+ "require-dev": {
2049
+ "phpcompatibility/php-compatibility": "^9.0"
2050
+ },
2051
+ "suggest": {
2052
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
2053
+ },
2054
+ "time": "2018-12-18T09:43:51+00:00",
2055
+ "type": "phpcodesniffer-standard",
2056
+ "installation-source": "dist",
2057
+ "notification-url": "https://packagist.org/downloads/",
2058
+ "license": [
2059
+ "MIT"
2060
+ ],
2061
+ "authors": [
2062
+ {
2063
+ "name": "Contributors",
2064
+ "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
2065
+ }
2066
+ ],
2067
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
2068
+ "keywords": [
2069
+ "phpcs",
2070
+ "standards",
2071
+ "wordpress"
2072
+ ]
2073
+ }
2074
+ ]
vendor/composer/installers/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2012 Kyle Robinson Young
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
vendor/composer/installers/composer.json ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "composer/installers",
3
+ "type": "composer-plugin",
4
+ "license": "MIT",
5
+ "description": "A multi-framework Composer library installer",
6
+ "keywords": [
7
+ "installer",
8
+ "Aimeos",
9
+ "AGL",
10
+ "AnnotateCms",
11
+ "Attogram",
12
+ "Bitrix",
13
+ "CakePHP",
14
+ "Chef",
15
+ "Cockpit",
16
+ "CodeIgniter",
17
+ "concrete5",
18
+ "Craft",
19
+ "Croogo",
20
+ "DokuWiki",
21
+ "Dolibarr",
22
+ "Drupal",
23
+ "Elgg",
24
+ "Eliasis",
25
+ "ExpressionEngine",
26
+ "eZ Platform",
27
+ "FuelPHP",
28
+ "Grav",
29
+ "Hurad",
30
+ "ImageCMS",
31
+ "iTop",
32
+ "Joomla",
33
+ "Kanboard",
34
+ "Kohana",
35
+ "Lan Management System",
36
+ "Laravel",
37
+ "Lavalite",
38
+ "Lithium",
39
+ "Magento",
40
+ "majima",
41
+ "Mako",
42
+ "Mautic",
43
+ "Maya",
44
+ "MODX",
45
+ "MODX Evo",
46
+ "MediaWiki",
47
+ "OXID",
48
+ "osclass",
49
+ "MODULEWork",
50
+ "Moodle",
51
+ "Piwik",
52
+ "pxcms",
53
+ "phpBB",
54
+ "Plentymarkets",
55
+ "PPI",
56
+ "Puppet",
57
+ "Porto",
58
+ "RadPHP",
59
+ "ReIndex",
60
+ "Roundcube",
61
+ "shopware",
62
+ "SilverStripe",
63
+ "SMF",
64
+ "SyDES",
65
+ "symfony",
66
+ "Thelia",
67
+ "TYPO3",
68
+ "WolfCMS",
69
+ "WordPress",
70
+ "YAWIK",
71
+ "Zend",
72
+ "Zikula"
73
+ ],
74
+ "homepage": "https://composer.github.io/installers/",
75
+ "authors": [
76
+ {
77
+ "name": "Kyle Robinson Young",
78
+ "email": "kyle@dontkry.com",
79
+ "homepage": "https://github.com/shama"
80
+ }
81
+ ],
82
+ "autoload": {
83
+ "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
84
+ },
85
+ "extra": {
86
+ "class": "Composer\\Installers\\Plugin",
87
+ "branch-alias": {
88
+ "dev-master": "1.0-dev"
89
+ }
90
+ },
91
+ "replace": {
92
+ "shama/baton": "*",
93
+ "roundcube/plugin-installer": "*"
94
+ },
95
+ "require": {
96
+ "composer-plugin-api": "^1.0"
97
+ },
98
+ "require-dev": {
99
+ "composer/composer": "1.0.*@dev",
100
+ "phpunit/phpunit": "^4.8.36"
101
+ },
102
+ "scripts": {
103
+ "test": "phpunit"
104
+ }
105
+ }
vendor/composer/installers/src/Composer/Installers/AglInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AglInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'More/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
16
+ return strtoupper($matches[1]);
17
+ }, $vars['name']);
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AimeosInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AnnotateCmsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'addons/modules/{$name}/',
8
+ 'component' => 'addons/components/{$name}/',
9
+ 'service' => 'addons/services/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AsgardInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'Modules/{$name}/',
8
+ 'theme' => 'Themes/{$name}/'
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type asgard-module, cut off a trailing '-plugin' if present.
15
+ *
16
+ * For package type asgard-theme, cut off a trailing '-theme' if present.
17
+ *
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] === 'asgard-module') {
22
+ return $this->inflectPluginVars($vars);
23
+ }
24
+
25
+ if ($vars['type'] === 'asgard-theme') {
26
+ return $this->inflectThemeVars($vars);
27
+ }
28
+
29
+ return $vars;
30
+ }
31
+
32
+ protected function inflectPluginVars($vars)
33
+ {
34
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
35
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
36
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
44
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
45
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
46
+
47
+ return $vars;
48
+ }
49
+ }
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class AttogramInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\IO\IOInterface;
5
+ use Composer\Composer;
6
+ use Composer\Package\PackageInterface;
7
+
8
+ abstract class BaseInstaller
9
+ {
10
+ protected $locations = array();
11
+ protected $composer;
12
+ protected $package;
13
+ protected $io;
14
+
15
+ /**
16
+ * Initializes base installer.
17
+ *
18
+ * @param PackageInterface $package
19
+ * @param Composer $composer
20
+ * @param IOInterface $io
21
+ */
22
+ public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
23
+ {
24
+ $this->composer = $composer;
25
+ $this->package = $package;
26
+ $this->io = $io;
27
+ }
28
+
29
+ /**
30
+ * Return the install path based on package type.
31
+ *
32
+ * @param PackageInterface $package
33
+ * @param string $frameworkType
34
+ * @return string
35
+ */
36
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
37
+ {
38
+ $type = $this->package->getType();
39
+
40
+ $prettyName = $this->package->getPrettyName();
41
+ if (strpos($prettyName, '/') !== false) {
42
+ list($vendor, $name) = explode('/', $prettyName);
43
+ } else {
44
+ $vendor = '';
45
+ $name = $prettyName;
46
+ }
47
+
48
+ $availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
49
+
50
+ $extra = $package->getExtra();
51
+ if (!empty($extra['installer-name'])) {
52
+ $availableVars['name'] = $extra['installer-name'];
53
+ }
54
+
55
+ if ($this->composer->getPackage()) {
56
+ $extra = $this->composer->getPackage()->getExtra();
57
+ if (!empty($extra['installer-paths'])) {
58
+ $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
59
+ if ($customPath !== false) {
60
+ return $this->templatePath($customPath, $availableVars);
61
+ }
62
+ }
63
+ }
64
+
65
+ $packageType = substr($type, strlen($frameworkType) + 1);
66
+ $locations = $this->getLocations();
67
+ if (!isset($locations[$packageType])) {
68
+ throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
69
+ }
70
+
71
+ return $this->templatePath($locations[$packageType], $availableVars);
72
+ }
73
+
74
+ /**
75
+ * For an installer to override to modify the vars per installer.
76
+ *
77
+ * @param array $vars
78
+ * @return array
79
+ */
80
+ public function inflectPackageVars($vars)
81
+ {
82
+ return $vars;
83
+ }
84
+
85
+ /**
86
+ * Gets the installer's locations
87
+ *
88
+ * @return array
89
+ */
90
+ public function getLocations()
91
+ {
92
+ return $this->locations;
93
+ }
94
+
95
+ /**
96
+ * Replace vars in a path
97
+ *
98
+ * @param string $path
99
+ * @param array $vars
100
+ * @return string
101
+ */
102
+ protected function templatePath($path, array $vars = array())
103
+ {
104
+ if (strpos($path, '{') !== false) {
105
+ extract($vars);
106
+ preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
107
+ if (!empty($matches[1])) {
108
+ foreach ($matches[1] as $var) {
109
+ $path = str_replace('{$' . $var . '}', $$var, $path);
110
+ }
111
+ }
112
+ }
113
+
114
+ return $path;
115
+ }
116
+
117
+ /**
118
+ * Search through a passed paths array for a custom install path.
119
+ *
120
+ * @param array $paths
121
+ * @param string $name
122
+ * @param string $type
123
+ * @param string $vendor = NULL
124
+ * @return string
125
+ */
126
+ protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
127
+ {
128
+ foreach ($paths as $path => $names) {
129
+ if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
130
+ return $path;
131
+ }
132
+ }
133
+
134
+ return false;
135
+ }
136
+ }
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Util\Filesystem;
6
+
7
+ /**
8
+ * Installer for Bitrix Framework. Supported types of extensions:
9
+ * - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
10
+ * - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
11
+ * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
12
+ *
13
+ * You can set custom path to directory with Bitrix kernel in `composer.json`:
14
+ *
15
+ * ```json
16
+ * {
17
+ * "extra": {
18
+ * "bitrix-dir": "s1/bitrix"
19
+ * }
20
+ * }
21
+ * ```
22
+ *
23
+ * @author Nik Samokhvalov <nik@samokhvalov.info>
24
+ * @author Denis Kulichkin <onexhovia@gmail.com>
25
+ */
26
+ class BitrixInstaller extends BaseInstaller
27
+ {
28
+ protected $locations = array(
29
+ 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
30
+ 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
31
+ 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
32
+ 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
33
+ 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
34
+ 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
35
+ );
36
+
37
+ /**
38
+ * @var array Storage for informations about duplicates at all the time of installation packages.
39
+ */
40
+ private static $checkedDuplicates = array();
41
+
42
+ /**
43
+ * {@inheritdoc}
44
+ */
45
+ public function inflectPackageVars($vars)
46
+ {
47
+ if ($this->composer->getPackage()) {
48
+ $extra = $this->composer->getPackage()->getExtra();
49
+
50
+ if (isset($extra['bitrix-dir'])) {
51
+ $vars['bitrix_dir'] = $extra['bitrix-dir'];
52
+ }
53
+ }
54
+
55
+ if (!isset($vars['bitrix_dir'])) {
56
+ $vars['bitrix_dir'] = 'bitrix';
57
+ }
58
+
59
+ return parent::inflectPackageVars($vars);
60
+ }
61
+
62
+ /**
63
+ * {@inheritdoc}
64
+ */
65
+ protected function templatePath($path, array $vars = array())
66
+ {
67
+ $templatePath = parent::templatePath($path, $vars);
68
+ $this->checkDuplicates($templatePath, $vars);
69
+
70
+ return $templatePath;
71
+ }
72
+
73
+ /**
74
+ * Duplicates search packages.
75
+ *
76
+ * @param string $path
77
+ * @param array $vars
78
+ */
79
+ protected function checkDuplicates($path, array $vars = array())
80
+ {
81
+ $packageType = substr($vars['type'], strlen('bitrix') + 1);
82
+ $localDir = explode('/', $vars['bitrix_dir']);
83
+ array_pop($localDir);
84
+ $localDir[] = 'local';
85
+ $localDir = implode('/', $localDir);
86
+
87
+ $oldPath = str_replace(
88
+ array('{$bitrix_dir}', '{$name}'),
89
+ array($localDir, $vars['name']),
90
+ $this->locations[$packageType]
91
+ );
92
+
93
+ if (in_array($oldPath, static::$checkedDuplicates)) {
94
+ return;
95
+ }
96
+
97
+ if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
98
+
99
+ $this->io->writeError(' <error>Duplication of packages:</error>');
100
+ $this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
101
+
102
+ while (true) {
103
+ switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
104
+ case 'y':
105
+ $fs = new Filesystem();
106
+ $fs->removeDirectory($oldPath);
107
+ break 2;
108
+
109
+ case 'n':
110
+ break 2;
111
+
112
+ case '?':
113
+ default:
114
+ $this->io->writeError(array(
115
+ ' y - delete package ' . $oldPath . ' and to continue with the installation',
116
+ ' n - don\'t delete and to continue with the installation',
117
+ ));
118
+ $this->io->writeError(' ? - print help');
119
+ break;
120
+ }
121
+ }
122
+ }
123
+
124
+ static::$checkedDuplicates[] = $oldPath;
125
+ }
126
+ }
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class BonefishInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'Packages/{$vendor}/{$name}/'
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\DependencyResolver\Pool;
5
+
6
+ class CakePHPInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'plugin' => 'Plugin/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name to CamelCase
14
+ */
15
+ public function inflectPackageVars($vars)
16
+ {
17
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
18
+ return $vars;
19
+ }
20
+
21
+ $nameParts = explode('/', $vars['name']);
22
+ foreach ($nameParts as &$value) {
23
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
24
+ $value = str_replace(array('-', '_'), ' ', $value);
25
+ $value = str_replace(' ', '', ucwords($value));
26
+ }
27
+ $vars['name'] = implode('/', $nameParts);
28
+
29
+ return $vars;
30
+ }
31
+
32
+ /**
33
+ * Change the default plugin location when cakephp >= 3.0
34
+ */
35
+ public function getLocations()
36
+ {
37
+ if ($this->matchesCakeVersion('>=', '3.0.0')) {
38
+ $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
39
+ }
40
+ return $this->locations;
41
+ }
42
+
43
+ /**
44
+ * Check if CakePHP version matches against a version
45
+ *
46
+ * @param string $matcher
47
+ * @param string $version
48
+ * @return bool
49
+ */
50
+ protected function matchesCakeVersion($matcher, $version)
51
+ {
52
+ if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
53
+ $multiClass = 'Composer\Semver\Constraint\MultiConstraint';
54
+ $constraintClass = 'Composer\Semver\Constraint\Constraint';
55
+ } else {
56
+ $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
57
+ $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
58
+ }
59
+
60
+ $repositoryManager = $this->composer->getRepositoryManager();
61
+ if ($repositoryManager) {
62
+ $repos = $repositoryManager->getLocalRepository();
63
+ if (!$repos) {
64
+ return false;
65
+ }
66
+ $cake3 = new $multiClass(array(
67
+ new $constraintClass($matcher, $version),
68
+ new $constraintClass('!=', '9999999-dev'),
69
+ ));
70
+ $pool = new Pool('dev');
71
+ $pool->addRepository($repos);
72
+ $packages = $pool->whatProvides('cakephp/cakephp');
73
+ foreach ($packages as $package) {
74
+ $installed = new $constraintClass('=', $package->getVersion());
75
+ if ($cake3->matches($installed)) {
76
+ return true;
77
+ }
78
+ }
79
+ }
80
+ return false;
81
+ }
82
+ }
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ChefInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'cookbook' => 'Chef/{$vendor}/{$name}/',
8
+ 'role' => 'Chef/roles/{$name}/',
9
+ );
10
+ }
11
+
vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CiviCrmInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'ext' => 'ext/{$name}/'
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ClanCatsFrameworkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'ship' => 'CCF/orbit/{$name}/',
8
+ 'theme' => 'CCF/app/themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CockpitInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'cockpit/modules/addons/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format module name.
12
+ *
13
+ * Strip `module-` prefix from package name.
14
+ *
15
+ * @param array @vars
16
+ *
17
+ * @return array
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] == 'cockpit-module') {
22
+ return $this->inflectModuleVars($vars);
23
+ }
24
+
25
+ return $vars;
26
+ }
27
+
28
+ public function inflectModuleVars($vars)
29
+ {
30
+ $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
31
+
32
+ return $vars;
33
+ }
34
+ }
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CodeIgniterInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'application/libraries/{$name}/',
8
+ 'third-party' => 'application/third_party/{$name}/',
9
+ 'module' => 'application/modules/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class Concrete5Installer extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'concrete/',
8
+ 'block' => 'application/blocks/{$name}/',
9
+ 'package' => 'packages/{$name}/',
10
+ 'theme' => 'application/themes/{$name}/',
11
+ 'update' => 'updates/{$name}/',
12
+ );
13
+ }
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Installer for Craft Plugins
6
+ */
7
+ class CraftInstaller extends BaseInstaller
8
+ {
9
+ const NAME_PREFIX = 'craft';
10
+ const NAME_SUFFIX = 'plugin';
11
+
12
+ protected $locations = array(
13
+ 'plugin' => 'craft/plugins/{$name}/',
14
+ );
15
+
16
+ /**
17
+ * Strip `craft-` prefix and/or `-plugin` suffix from package names
18
+ *
19
+ * @param array $vars
20
+ *
21
+ * @return array
22
+ */
23
+ final public function inflectPackageVars($vars)
24
+ {
25
+ return $this->inflectPluginVars($vars);
26
+ }
27
+
28
+ private function inflectPluginVars($vars)
29
+ {
30
+ $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
31
+ $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
32
+
33
+ return $vars;
34
+ }
35
+ }
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class CroogoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'Plugin/{$name}/',
8
+ 'theme' => 'View/Themed/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DecibelInstaller extends BaseInstaller
5
+ {
6
+ /** @var array */
7
+ protected $locations = array(
8
+ 'app' => 'app/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DokuWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'lib/plugins/{$name}/',
8
+ 'template' => 'lib/tpl/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type dokuwiki-plugin, cut off a trailing '-plugin',
15
+ * or leading dokuwiki_ if present.
16
+ *
17
+ * For package type dokuwiki-template, cut off a trailing '-template' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+
23
+ if ($vars['type'] === 'dokuwiki-plugin') {
24
+ return $this->inflectPluginVars($vars);
25
+ }
26
+
27
+ if ($vars['type'] === 'dokuwiki-template') {
28
+ return $this->inflectTemplateVars($vars);
29
+ }
30
+
31
+ return $vars;
32
+ }
33
+
34
+ protected function inflectPluginVars($vars)
35
+ {
36
+ $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
37
+ $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
38
+
39
+ return $vars;
40
+ }
41
+
42
+ protected function inflectTemplateVars($vars)
43
+ {
44
+ $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
45
+ $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
46
+
47
+ return $vars;
48
+ }
49
+
50
+ }
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class DolibarrInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ * @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
9
+ */
10
+ class DolibarrInstaller extends BaseInstaller
11
+ {
12
+ //TODO: Add support for scripts and themes
13
+ protected $locations = array(
14
+ 'module' => 'htdocs/custom/{$name}/',
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class DrupalInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'theme' => 'themes/{$name}/',
10
+ 'library' => 'libraries/{$name}/',
11
+ 'profile' => 'profiles/{$name}/',
12
+ 'drush' => 'drush/{$name}/',
13
+ 'custom-theme' => 'themes/custom/{$name}/',
14
+ 'custom-module' => 'modules/custom/{$name}/',
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ElggInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'mod/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class EliasisInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'plugin' => 'plugins/{$name}/',
10
+ 'template' => 'templates/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class ExpressionEngineInstaller extends BaseInstaller
7
+ {
8
+
9
+ protected $locations = array();
10
+
11
+ private $ee2Locations = array(
12
+ 'addon' => 'system/expressionengine/third_party/{$name}/',
13
+ 'theme' => 'themes/third_party/{$name}/',
14
+ );
15
+
16
+ private $ee3Locations = array(
17
+ 'addon' => 'system/user/addons/{$name}/',
18
+ 'theme' => 'themes/user/{$name}/',
19
+ );
20
+
21
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
22
+ {
23
+
24
+ $version = "{$frameworkType}Locations";
25
+ $this->locations = $this->$version;
26
+
27
+ return parent::getInstallPath($package, $frameworkType);
28
+ }
29
+ }
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class EzPlatformInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'meta-assets' => 'web/assets/ezplatform/',
8
+ 'assets' => 'web/assets/ezplatform/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'fuel/app/modules/{$name}/',
8
+ 'package' => 'fuel/packages/{$name}/',
9
+ 'theme' => 'fuel/app/themes/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class FuelphpInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/GravInstaller.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class GravInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'user/plugins/{$name}/',
8
+ 'theme' => 'user/themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name
13
+ *
14
+ * @param array $vars
15
+ *
16
+ * @return array
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $restrictedWords = implode('|', array_keys($this->locations));
21
+
22
+ $vars['name'] = strtolower($vars['name']);
23
+ $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
24
+ '$1',
25
+ $vars['name']
26
+ );
27
+
28
+ return $vars;
29
+ }
30
+ }
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class HuradInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'plugins/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ $nameParts = explode('/', $vars['name']);
17
+ foreach ($nameParts as &$value) {
18
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
19
+ $value = str_replace(array('-', '_'), ' ', $value);
20
+ $value = str_replace(' ', '', ucwords($value));
21
+ }
22
+ $vars['name'] = implode('/', $nameParts);
23
+ return $vars;
24
+ }
25
+ }
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ImageCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'template' => 'templates/{$name}/',
8
+ 'module' => 'application/modules/{$name}/',
9
+ 'library' => 'application/libraries/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/Installer.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Composer;
6
+ use Composer\Installer\BinaryInstaller;
7
+ use Composer\Installer\LibraryInstaller;
8
+ use Composer\IO\IOInterface;
9
+ use Composer\Package\PackageInterface;
10
+ use Composer\Repository\InstalledRepositoryInterface;
11
+ use Composer\Util\Filesystem;
12
+
13
+ class Installer extends LibraryInstaller
14
+ {
15
+
16
+ /**
17
+ * Package types to installer class map
18
+ *
19
+ * @var array
20
+ */
21
+ private $supportedTypes = array(
22
+ 'aimeos' => 'AimeosInstaller',
23
+ 'asgard' => 'AsgardInstaller',
24
+ 'attogram' => 'AttogramInstaller',
25
+ 'agl' => 'AglInstaller',
26
+ 'annotatecms' => 'AnnotateCmsInstaller',
27
+ 'bitrix' => 'BitrixInstaller',
28
+ 'bonefish' => 'BonefishInstaller',
29
+ 'cakephp' => 'CakePHPInstaller',
30
+ 'chef' => 'ChefInstaller',
31
+ 'civicrm' => 'CiviCrmInstaller',
32
+ 'ccframework' => 'ClanCatsFrameworkInstaller',
33
+ 'cockpit' => 'CockpitInstaller',
34
+ 'codeigniter' => 'CodeIgniterInstaller',
35
+ 'concrete5' => 'Concrete5Installer',
36
+ 'craft' => 'CraftInstaller',
37
+ 'croogo' => 'CroogoInstaller',
38
+ 'dokuwiki' => 'DokuWikiInstaller',
39
+ 'dolibarr' => 'DolibarrInstaller',
40
+ 'decibel' => 'DecibelInstaller',
41
+ 'drupal' => 'DrupalInstaller',
42
+ 'elgg' => 'ElggInstaller',
43
+ 'eliasis' => 'EliasisInstaller',
44
+ 'ee3' => 'ExpressionEngineInstaller',
45
+ 'ee2' => 'ExpressionEngineInstaller',
46
+ 'ezplatform' => 'EzPlatformInstaller',
47
+ 'fuel' => 'FuelInstaller',
48
+ 'fuelphp' => 'FuelphpInstaller',
49
+ 'grav' => 'GravInstaller',
50
+ 'hurad' => 'HuradInstaller',
51
+ 'imagecms' => 'ImageCMSInstaller',
52
+ 'itop' => 'ItopInstaller',
53
+ 'joomla' => 'JoomlaInstaller',
54
+ 'kanboard' => 'KanboardInstaller',
55
+ 'kirby' => 'KirbyInstaller',
56
+ 'kodicms' => 'KodiCMSInstaller',
57
+ 'kohana' => 'KohanaInstaller',
58
+ 'lms' => 'LanManagementSystemInstaller',
59
+ 'laravel' => 'LaravelInstaller',
60
+ 'lavalite' => 'LavaLiteInstaller',
61
+ 'lithium' => 'LithiumInstaller',
62
+ 'magento' => 'MagentoInstaller',
63
+ 'majima' => 'MajimaInstaller',
64
+ 'mako' => 'MakoInstaller',
65
+ 'maya' => 'MayaInstaller',
66
+ 'mautic' => 'MauticInstaller',
67
+ 'mediawiki' => 'MediaWikiInstaller',
68
+ 'microweber' => 'MicroweberInstaller',
69
+ 'modulework' => 'MODULEWorkInstaller',
70
+ 'modx' => 'ModxInstaller',
71
+ 'modxevo' => 'MODXEvoInstaller',
72
+ 'moodle' => 'MoodleInstaller',
73
+ 'october' => 'OctoberInstaller',
74
+ 'ontowiki' => 'OntoWikiInstaller',
75
+ 'oxid' => 'OxidInstaller',
76
+ 'osclass' => 'OsclassInstaller',
77
+ 'pxcms' => 'PxcmsInstaller',
78
+ 'phpbb' => 'PhpBBInstaller',
79
+ 'pimcore' => 'PimcoreInstaller',
80
+ 'piwik' => 'PiwikInstaller',
81
+ 'plentymarkets'=> 'PlentymarketsInstaller',
82
+ 'ppi' => 'PPIInstaller',
83
+ 'puppet' => 'PuppetInstaller',
84
+ 'radphp' => 'RadPHPInstaller',
85
+ 'phifty' => 'PhiftyInstaller',
86
+ 'porto' => 'PortoInstaller',
87
+ 'redaxo' => 'RedaxoInstaller',
88
+ 'reindex' => 'ReIndexInstaller',
89
+ 'roundcube' => 'RoundcubeInstaller',
90
+ 'shopware' => 'ShopwareInstaller',
91
+ 'sitedirect' => 'SiteDirectInstaller',
92
+ 'silverstripe' => 'SilverStripeInstaller',
93
+ 'smf' => 'SMFInstaller',
94
+ 'sydes' => 'SyDESInstaller',
95
+ 'symfony1' => 'Symfony1Installer',
96
+ 'thelia' => 'TheliaInstaller',
97
+ 'tusk' => 'TuskInstaller',
98
+ 'typo3-cms' => 'TYPO3CmsInstaller',
99
+ 'typo3-flow' => 'TYPO3FlowInstaller',
100
+ 'userfrosting' => 'UserFrostingInstaller',
101
+ 'vanilla' => 'VanillaInstaller',
102
+ 'whmcs' => 'WHMCSInstaller',
103
+ 'wolfcms' => 'WolfCMSInstaller',
104
+ 'wordpress' => 'WordPressInstaller',
105
+ 'yawik' => 'YawikInstaller',
106
+ 'zend' => 'ZendInstaller',
107
+ 'zikula' => 'ZikulaInstaller',
108
+ 'prestashop' => 'PrestashopInstaller'
109
+ );
110
+
111
+ /**
112
+ * Installer constructor.
113
+ *
114
+ * Disables installers specified in main composer extra installer-disable
115
+ * list
116
+ *
117
+ * @param IOInterface $io
118
+ * @param Composer $composer
119
+ * @param string $type
120
+ * @param Filesystem|null $filesystem
121
+ * @param BinaryInstaller|null $binaryInstaller
122
+ */
123
+ public function __construct(
124
+ IOInterface $io,
125
+ Composer $composer,
126
+ $type = 'library',
127
+ Filesystem $filesystem = null,
128
+ BinaryInstaller $binaryInstaller = null
129
+ ) {
130
+ parent::__construct($io, $composer, $type, $filesystem,
131
+ $binaryInstaller);
132
+ $this->removeDisabledInstallers();
133
+ }
134
+
135
+ /**
136
+ * {@inheritDoc}
137
+ */
138
+ public function getInstallPath(PackageInterface $package)
139
+ {
140
+ $type = $package->getType();
141
+ $frameworkType = $this->findFrameworkType($type);
142
+
143
+ if ($frameworkType === false) {
144
+ throw new \InvalidArgumentException(
145
+ 'Sorry the package type of this package is not yet supported.'
146
+ );
147
+ }
148
+
149
+ $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
150
+ $installer = new $class($package, $this->composer, $this->getIO());
151
+
152
+ return $installer->getInstallPath($package, $frameworkType);
153
+ }
154
+
155
+ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
156
+ {
157
+ parent::uninstall($repo, $package);
158
+ $installPath = $this->getPackageBasePath($package);
159
+ $this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
160
+ }
161
+
162
+ /**
163
+ * {@inheritDoc}
164
+ */
165
+ public function supports($packageType)
166
+ {
167
+ $frameworkType = $this->findFrameworkType($packageType);
168
+
169
+ if ($frameworkType === false) {
170
+ return false;
171
+ }
172
+
173
+ $locationPattern = $this->getLocationPattern($frameworkType);
174
+
175
+ return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
176
+ }
177
+
178
+ /**
179
+ * Finds a supported framework type if it exists and returns it
180
+ *
181
+ * @param string $type
182
+ * @return string
183
+ */
184
+ protected function findFrameworkType($type)
185
+ {
186
+ $frameworkType = false;
187
+
188
+ krsort($this->supportedTypes);
189
+
190
+ foreach ($this->supportedTypes as $key => $val) {
191
+ if ($key === substr($type, 0, strlen($key))) {
192
+ $frameworkType = substr($type, 0, strlen($key));
193
+ break;
194
+ }
195
+ }
196
+
197
+ return $frameworkType;
198
+ }
199
+
200
+ /**
201
+ * Get the second part of the regular expression to check for support of a
202
+ * package type
203
+ *
204
+ * @param string $frameworkType
205
+ * @return string
206
+ */
207
+ protected function getLocationPattern($frameworkType)
208
+ {
209
+ $pattern = false;
210
+ if (!empty($this->supportedTypes[$frameworkType])) {
211
+ $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
212
+ /** @var BaseInstaller $framework */
213
+ $framework = new $frameworkClass(null, $this->composer, $this->getIO());
214
+ $locations = array_keys($framework->getLocations());
215
+ $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
216
+ }
217
+
218
+ return $pattern ? : '(\w+)';
219
+ }
220
+
221
+ /**
222
+ * Get I/O object
223
+ *
224
+ * @return IOInterface
225
+ */
226
+ private function getIO()
227
+ {
228
+ return $this->io;
229
+ }
230
+
231
+ /**
232
+ * Look for installers set to be disabled in composer's extra config and
233
+ * remove them from the list of supported installers.
234
+ *
235
+ * Globals:
236
+ * - true, "all", and "*" - disable all installers.
237
+ * - false - enable all installers (useful with
238
+ * wikimedia/composer-merge-plugin or similar)
239
+ *
240
+ * @return void
241
+ */
242
+ protected function removeDisabledInstallers()
243
+ {
244
+ $extra = $this->composer->getPackage()->getExtra();
245
+
246
+ if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
247
+ // No installers are disabled
248
+ return;
249
+ }
250
+
251
+ // Get installers to disable
252
+ $disable = $extra['installer-disable'];
253
+
254
+ // Ensure $disabled is an array
255
+ if (!is_array($disable)) {
256
+ $disable = array($disable);
257
+ }
258
+
259
+ // Check which installers should be disabled
260
+ $all = array(true, "all", "*");
261
+ $intersect = array_intersect($all, $disable);
262
+ if (!empty($intersect)) {
263
+ // Disable all installers
264
+ $this->supportedTypes = array();
265
+ } else {
266
+ // Disable specified installers
267
+ foreach ($disable as $key => $installer) {
268
+ if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
269
+ unset($this->supportedTypes[$installer]);
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ItopInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'extensions/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class JoomlaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'component' => 'components/{$name}/',
8
+ 'module' => 'modules/{$name}/',
9
+ 'template' => 'templates/{$name}/',
10
+ 'plugin' => 'plugins/{$name}/',
11
+ 'library' => 'libraries/{$name}/',
12
+ );
13
+
14
+ // TODO: Add inflector for mod_ and com_ names
15
+ }
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ *
6
+ * Installer for kanboard plugins
7
+ *
8
+ * kanboard.net
9
+ *
10
+ * Class KanboardInstaller
11
+ * @package Composer\Installers
12
+ */
13
+ class KanboardInstaller extends BaseInstaller
14
+ {
15
+ protected $locations = array(
16
+ 'plugin' => 'plugins/{$name}/',
17
+ );
18
+ }
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KirbyInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'site/plugins/{$name}/',
8
+ 'field' => 'site/fields/{$name}/',
9
+ 'tag' => 'site/tags/{$name}/'
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KodiCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'cms/plugins/{$name}/',
8
+ 'media' => 'cms/media/vendor/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class KohanaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class LanManagementSystemInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'plugin' => 'plugins/{$name}/',
10
+ 'template' => 'templates/{$name}/',
11
+ 'document-template' => 'documents/templates/{$name}/',
12
+ 'userpanel-module' => 'userpanel/modules/{$name}/',
13
+ );
14
+
15
+ /**
16
+ * Format package name to CamelCase
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
21
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
22
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
23
+
24
+ return $vars;
25
+ }
26
+
27
+ }
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LaravelInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LavaLiteInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'packages/{$vendor}/{$name}/',
8
+ 'theme' => 'public/themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class LithiumInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'libraries/{$name}/',
8
+ 'source' => 'libraries/_source/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MODULEWorkInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle MODX Evolution specifics when installing packages.
6
+ */
7
+ class MODXEvoInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'snippet' => 'assets/snippets/{$name}/',
11
+ 'plugin' => 'assets/plugins/{$name}/',
12
+ 'module' => 'assets/modules/{$name}/',
13
+ 'template' => 'assets/templates/{$name}/',
14
+ 'lib' => 'assets/lib/{$name}/'
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MagentoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'app/design/frontend/{$name}/',
8
+ 'skin' => 'skin/frontend/default/{$name}/',
9
+ 'library' => 'lib/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin/theme installer for majima
6
+ * @author David Neustadt
7
+ */
8
+ class MajimaInstaller extends BaseInstaller
9
+ {
10
+ protected $locations = array(
11
+ 'plugin' => 'plugins/{$name}/',
12
+ );
13
+
14
+ /**
15
+ * Transforms the names
16
+ * @param array $vars
17
+ * @return array
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ return $this->correctPluginName($vars);
22
+ }
23
+
24
+ /**
25
+ * Change hyphenated names to camelcase
26
+ * @param array $vars
27
+ * @return array
28
+ */
29
+ private function correctPluginName($vars)
30
+ {
31
+ $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
32
+ return strtoupper($matches[0][1]);
33
+ }, $vars['name']);
34
+ $vars['name'] = ucfirst($camelCasedName);
35
+ return $vars;
36
+ }
37
+ }
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MakoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'package' => 'app/packages/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MauticInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name of mautic-plugins to CamelCase
13
+ */
14
+ public function inflectPackageVars($vars)
15
+ {
16
+ if ($vars['type'] == 'mautic-plugin') {
17
+ $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
18
+ return strtoupper($matches[0][1]);
19
+ }, ucfirst($vars['name']));
20
+ }
21
+
22
+ return $vars;
23
+ }
24
+
25
+ }
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MayaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name.
12
+ *
13
+ * For package type maya-module, cut off a trailing '-module' if present.
14
+ *
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ if ($vars['type'] === 'maya-module') {
19
+ return $this->inflectModuleVars($vars);
20
+ }
21
+
22
+ return $vars;
23
+ }
24
+
25
+ protected function inflectModuleVars($vars)
26
+ {
27
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
28
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
29
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
30
+
31
+ return $vars;
32
+ }
33
+ }
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MediaWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'core' => 'core/',
8
+ 'extension' => 'extensions/{$name}/',
9
+ 'skin' => 'skins/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name.
14
+ *
15
+ * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
16
+ * to CamelCase keeping existing uppercase chars.
17
+ *
18
+ * For package type mediawiki-skin, cut off a trailing '-skin' if present.
19
+ *
20
+ */
21
+ public function inflectPackageVars($vars)
22
+ {
23
+
24
+ if ($vars['type'] === 'mediawiki-extension') {
25
+ return $this->inflectExtensionVars($vars);
26
+ }
27
+
28
+ if ($vars['type'] === 'mediawiki-skin') {
29
+ return $this->inflectSkinVars($vars);
30
+ }
31
+
32
+ return $vars;
33
+ }
34
+
35
+ protected function inflectExtensionVars($vars)
36
+ {
37
+ $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
38
+ $vars['name'] = str_replace('-', ' ', $vars['name']);
39
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
40
+
41
+ return $vars;
42
+ }
43
+
44
+ protected function inflectSkinVars($vars)
45
+ {
46
+ $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
47
+
48
+ return $vars;
49
+ }
50
+
51
+ }
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MicroweberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'userfiles/modules/{$name}/',
8
+ 'module-skin' => 'userfiles/modules/{$name}/templates/',
9
+ 'template' => 'userfiles/templates/{$name}/',
10
+ 'element' => 'userfiles/elements/{$name}/',
11
+ 'vendor' => 'vendor/{$name}/',
12
+ 'components' => 'components/{$name}/'
13
+ );
14
+
15
+ /**
16
+ * Format package name.
17
+ *
18
+ * For package type microweber-module, cut off a trailing '-module' if present
19
+ *
20
+ * For package type microweber-template, cut off a trailing '-template' if present.
21
+ *
22
+ */
23
+ public function inflectPackageVars($vars)
24
+ {
25
+ if ($vars['type'] === 'microweber-template') {
26
+ return $this->inflectTemplateVars($vars);
27
+ }
28
+ if ($vars['type'] === 'microweber-templates') {
29
+ return $this->inflectTemplatesVars($vars);
30
+ }
31
+ if ($vars['type'] === 'microweber-core') {
32
+ return $this->inflectCoreVars($vars);
33
+ }
34
+ if ($vars['type'] === 'microweber-adapter') {
35
+ return $this->inflectCoreVars($vars);
36
+ }
37
+ if ($vars['type'] === 'microweber-module') {
38
+ return $this->inflectModuleVars($vars);
39
+ }
40
+ if ($vars['type'] === 'microweber-modules') {
41
+ return $this->inflectModulesVars($vars);
42
+ }
43
+ if ($vars['type'] === 'microweber-skin') {
44
+ return $this->inflectSkinVars($vars);
45
+ }
46
+ if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
47
+ return $this->inflectElementVars($vars);
48
+ }
49
+
50
+ return $vars;
51
+ }
52
+
53
+ protected function inflectTemplateVars($vars)
54
+ {
55
+ $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
56
+ $vars['name'] = preg_replace('/template-$/', '', $vars['name']);
57
+
58
+ return $vars;
59
+ }
60
+
61
+ protected function inflectTemplatesVars($vars)
62
+ {
63
+ $vars['name'] = preg_replace('/-templates$/', '', $vars['name']);
64
+ $vars['name'] = preg_replace('/templates-$/', '', $vars['name']);
65
+
66
+ return $vars;
67
+ }
68
+
69
+ protected function inflectCoreVars($vars)
70
+ {
71
+ $vars['name'] = preg_replace('/-providers$/', '', $vars['name']);
72
+ $vars['name'] = preg_replace('/-provider$/', '', $vars['name']);
73
+ $vars['name'] = preg_replace('/-adapter$/', '', $vars['name']);
74
+
75
+ return $vars;
76
+ }
77
+
78
+ protected function inflectModuleVars($vars)
79
+ {
80
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
81
+ $vars['name'] = preg_replace('/module-$/', '', $vars['name']);
82
+
83
+ return $vars;
84
+ }
85
+
86
+ protected function inflectModulesVars($vars)
87
+ {
88
+ $vars['name'] = preg_replace('/-modules$/', '', $vars['name']);
89
+ $vars['name'] = preg_replace('/modules-$/', '', $vars['name']);
90
+
91
+ return $vars;
92
+ }
93
+
94
+ protected function inflectSkinVars($vars)
95
+ {
96
+ $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
97
+ $vars['name'] = preg_replace('/skin-$/', '', $vars['name']);
98
+
99
+ return $vars;
100
+ }
101
+
102
+ protected function inflectElementVars($vars)
103
+ {
104
+ $vars['name'] = preg_replace('/-elements$/', '', $vars['name']);
105
+ $vars['name'] = preg_replace('/elements-$/', '', $vars['name']);
106
+ $vars['name'] = preg_replace('/-element$/', '', $vars['name']);
107
+ $vars['name'] = preg_replace('/element-$/', '', $vars['name']);
108
+
109
+ return $vars;
110
+ }
111
+ }
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle MODX specifics when installing packages.
6
+ */
7
+ class ModxInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'extra' => 'core/packages/{$name}/'
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class MoodleInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'mod' => 'mod/{$name}/',
8
+ 'admin_report' => 'admin/report/{$name}/',
9
+ 'atto' => 'lib/editor/atto/plugins/{$name}/',
10
+ 'tool' => 'admin/tool/{$name}/',
11
+ 'assignment' => 'mod/assignment/type/{$name}/',
12
+ 'assignsubmission' => 'mod/assign/submission/{$name}/',
13
+ 'assignfeedback' => 'mod/assign/feedback/{$name}/',
14
+ 'auth' => 'auth/{$name}/',
15
+ 'availability' => 'availability/condition/{$name}/',
16
+ 'block' => 'blocks/{$name}/',
17
+ 'booktool' => 'mod/book/tool/{$name}/',
18
+ 'cachestore' => 'cache/stores/{$name}/',
19
+ 'cachelock' => 'cache/locks/{$name}/',
20
+ 'calendartype' => 'calendar/type/{$name}/',
21
+ 'format' => 'course/format/{$name}/',
22
+ 'coursereport' => 'course/report/{$name}/',
23
+ 'datafield' => 'mod/data/field/{$name}/',
24
+ 'datapreset' => 'mod/data/preset/{$name}/',
25
+ 'editor' => 'lib/editor/{$name}/',
26
+ 'enrol' => 'enrol/{$name}/',
27
+ 'filter' => 'filter/{$name}/',
28
+ 'gradeexport' => 'grade/export/{$name}/',
29
+ 'gradeimport' => 'grade/import/{$name}/',
30
+ 'gradereport' => 'grade/report/{$name}/',
31
+ 'gradingform' => 'grade/grading/form/{$name}/',
32
+ 'local' => 'local/{$name}/',
33
+ 'logstore' => 'admin/tool/log/store/{$name}/',
34
+ 'ltisource' => 'mod/lti/source/{$name}/',
35
+ 'ltiservice' => 'mod/lti/service/{$name}/',
36
+ 'message' => 'message/output/{$name}/',
37
+ 'mnetservice' => 'mnet/service/{$name}/',
38
+ 'plagiarism' => 'plagiarism/{$name}/',
39
+ 'portfolio' => 'portfolio/{$name}/',
40
+ 'qbehaviour' => 'question/behaviour/{$name}/',
41
+ 'qformat' => 'question/format/{$name}/',
42
+ 'qtype' => 'question/type/{$name}/',
43
+ 'quizaccess' => 'mod/quiz/accessrule/{$name}/',
44
+ 'quiz' => 'mod/quiz/report/{$name}/',
45
+ 'report' => 'report/{$name}/',
46
+ 'repository' => 'repository/{$name}/',
47
+ 'scormreport' => 'mod/scorm/report/{$name}/',
48
+ 'search' => 'search/engine/{$name}/',
49
+ 'theme' => 'theme/{$name}/',
50
+ 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
51
+ 'profilefield' => 'user/profile/field/{$name}/',
52
+ 'webservice' => 'webservice/{$name}/',
53
+ 'workshopallocation' => 'mod/workshop/allocation/{$name}/',
54
+ 'workshopeval' => 'mod/workshop/eval/{$name}/',
55
+ 'workshopform' => 'mod/workshop/form/{$name}/'
56
+ );
57
+ }
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OctoberInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'plugin' => 'plugins/{$vendor}/{$name}/',
9
+ 'theme' => 'themes/{$name}/'
10
+ );
11
+
12
+ /**
13
+ * Format package name.
14
+ *
15
+ * For package type october-plugin, cut off a trailing '-plugin' if present.
16
+ *
17
+ * For package type october-theme, cut off a trailing '-theme' if present.
18
+ *
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+ if ($vars['type'] === 'october-plugin') {
23
+ return $this->inflectPluginVars($vars);
24
+ }
25
+
26
+ if ($vars['type'] === 'october-theme') {
27
+ return $this->inflectThemeVars($vars);
28
+ }
29
+
30
+ return $vars;
31
+ }
32
+
33
+ protected function inflectPluginVars($vars)
34
+ {
35
+ $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
36
+ $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
44
+
45
+ return $vars;
46
+ }
47
+ }
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class OntoWikiInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'extensions/{$name}/',
8
+ 'theme' => 'extensions/themes/{$name}/',
9
+ 'translation' => 'extensions/translations/{$name}/',
10
+ );
11
+
12
+ /**
13
+ * Format package name to lower case and remove ".ontowiki" suffix
14
+ */
15
+ public function inflectPackageVars($vars)
16
+ {
17
+ $vars['name'] = strtolower($vars['name']);
18
+ $vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
19
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
20
+ $vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
21
+
22
+ return $vars;
23
+ }
24
+ }
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+
5
+ class OsclassInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'plugin' => 'oc-content/plugins/{$name}/',
10
+ 'theme' => 'oc-content/themes/{$name}/',
11
+ 'language' => 'oc-content/languages/{$name}/',
12
+ );
13
+
14
+ }
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class OxidInstaller extends BaseInstaller
7
+ {
8
+ const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
9
+
10
+ protected $locations = array(
11
+ 'module' => 'modules/{$name}/',
12
+ 'theme' => 'application/views/{$name}/',
13
+ 'out' => 'out/{$name}/',
14
+ );
15
+
16
+ /**
17
+ * getInstallPath
18
+ *
19
+ * @param PackageInterface $package
20
+ * @param string $frameworkType
21
+ * @return void
22
+ */
23
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+ {
25
+ $installPath = parent::getInstallPath($package, $frameworkType);
26
+ $type = $this->package->getType();
27
+ if ($type === 'oxid-module') {
28
+ $this->prepareVendorDirectory($installPath);
29
+ }
30
+ return $installPath;
31
+ }
32
+
33
+ /**
34
+ * prepareVendorDirectory
35
+ *
36
+ * Makes sure there is a vendormetadata.php file inside
37
+ * the vendor folder if there is a vendor folder.
38
+ *
39
+ * @param string $installPath
40
+ * @return void
41
+ */
42
+ protected function prepareVendorDirectory($installPath)
43
+ {
44
+ $matches = '';
45
+ $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
46
+ if (!$hasVendorDirectory) {
47
+ return;
48
+ }
49
+
50
+ $vendorDirectory = $matches['vendor'];
51
+ $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
52
+ if (!file_exists($vendorPath)) {
53
+ mkdir($vendorPath, 0755, true);
54
+ }
55
+
56
+ $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
57
+ touch($vendorMetaDataPath);
58
+ }
59
+ }
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PPIInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PhiftyInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'bundle' => 'bundles/{$name}/',
8
+ 'library' => 'libraries/{$name}/',
9
+ 'framework' => 'frameworks/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PhpBBInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'extension' => 'ext/{$vendor}/{$name}/',
8
+ 'language' => 'language/{$name}/',
9
+ 'style' => 'styles/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PimcoreInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
16
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
17
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
18
+
19
+ return $vars;
20
+ }
21
+ }
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Class PiwikInstaller
6
+ *
7
+ * @package Composer\Installers
8
+ */
9
+ class PiwikInstaller extends BaseInstaller
10
+ {
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $locations = array(
15
+ 'plugin' => 'plugins/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Format package name to CamelCase
20
+ * @param array $vars
21
+ *
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PlentymarketsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => '{$name}/'
8
+ );
9
+
10
+ /**
11
+ * Remove hyphen, "plugin" and format to camelcase
12
+ * @param array $vars
13
+ *
14
+ * @return array
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ $vars['name'] = explode("-", $vars['name']);
19
+ foreach ($vars['name'] as $key => $name) {
20
+ $vars['name'][$key] = ucfirst($vars['name'][$key]);
21
+ if (strcasecmp($name, "Plugin") == 0) {
22
+ unset($vars['name'][$key]);
23
+ }
24
+ }
25
+ $vars['name'] = implode("",$vars['name']);
26
+
27
+ return $vars;
28
+ }
29
+ }
vendor/composer/installers/src/Composer/Installers/Plugin.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ use Composer\Composer;
6
+ use Composer\IO\IOInterface;
7
+ use Composer\Plugin\PluginInterface;
8
+
9
+ class Plugin implements PluginInterface
10
+ {
11
+
12
+ public function activate(Composer $composer, IOInterface $io)
13
+ {
14
+ $installer = new Installer($io, $composer);
15
+ $composer->getInstallationManager()->addInstaller($installer);
16
+ }
17
+ }
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PortoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'container' => 'app/Containers/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PrestashopInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class PuppetInstaller extends BaseInstaller
6
+ {
7
+
8
+ protected $locations = array(
9
+ 'module' => 'modules/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class PxcmsInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'app/Modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * @param array $vars
15
+ *
16
+ * @return array
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ if ($vars['type'] === 'pxcms-module') {
21
+ return $this->inflectModuleVars($vars);
22
+ }
23
+
24
+ if ($vars['type'] === 'pxcms-theme') {
25
+ return $this->inflectThemeVars($vars);
26
+ }
27
+
28
+ return $vars;
29
+ }
30
+
31
+ /**
32
+ * For package type pxcms-module, cut off a trailing '-plugin' if present.
33
+ *
34
+ * return string
35
+ */
36
+ protected function inflectModuleVars($vars)
37
+ {
38
+ $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
39
+ $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
40
+ $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
41
+ $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
42
+ $vars['name'] = ucwords($vars['name']); // make module name camelcased
43
+
44
+ return $vars;
45
+ }
46
+
47
+
48
+ /**
49
+ * For package type pxcms-module, cut off a trailing '-plugin' if present.
50
+ *
51
+ * return string
52
+ */
53
+ protected function inflectThemeVars($vars)
54
+ {
55
+ $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
56
+ $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
57
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
58
+ $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
59
+ $vars['name'] = ucwords($vars['name']); // make module name camelcased
60
+
61
+ return $vars;
62
+ }
63
+ }
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RadPHPInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'bundle' => 'src/{$name}/'
8
+ );
9
+
10
+ /**
11
+ * Format package name to CamelCase
12
+ */
13
+ public function inflectPackageVars($vars)
14
+ {
15
+ $nameParts = explode('/', $vars['name']);
16
+ foreach ($nameParts as &$value) {
17
+ $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
18
+ $value = str_replace(array('-', '_'), ' ', $value);
19
+ $value = str_replace(' ', '', ucwords($value));
20
+ }
21
+ $vars['name'] = implode('/', $nameParts);
22
+ return $vars;
23
+ }
24
+ }
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ReIndexInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'theme' => 'themes/{$name}/',
8
+ 'plugin' => 'plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RedaxoInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'addon' => 'redaxo/include/addons/{$name}/',
8
+ 'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class RoundcubeInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ );
9
+
10
+ /**
11
+ * Lowercase name and changes the name to a underscores
12
+ *
13
+ * @param array $vars
14
+ * @return array
15
+ */
16
+ public function inflectPackageVars($vars)
17
+ {
18
+ $vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
19
+
20
+ return $vars;
21
+ }
22
+ }
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class SMFInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'Sources/{$name}/',
8
+ 'theme' => 'Themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin/theme installer for shopware
6
+ * @author Benjamin Boit
7
+ */
8
+ class ShopwareInstaller extends BaseInstaller
9
+ {
10
+ protected $locations = array(
11
+ 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
12
+ 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
13
+ 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
14
+ 'theme' => 'templates/{$name}/',
15
+ 'plugin' => 'custom/plugins/{$name}/',
16
+ 'frontend-theme' => 'themes/Frontend/{$name}/',
17
+ );
18
+
19
+ /**
20
+ * Transforms the names
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ if ($vars['type'] === 'shopware-theme') {
27
+ return $this->correctThemeName($vars);
28
+ }
29
+
30
+ return $this->correctPluginName($vars);
31
+ }
32
+
33
+ /**
34
+ * Changes the name to a camelcased combination of vendor and name
35
+ * @param array $vars
36
+ * @return array
37
+ */
38
+ private function correctPluginName($vars)
39
+ {
40
+ $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
41
+ return strtoupper($matches[0][1]);
42
+ }, $vars['name']);
43
+
44
+ $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
45
+
46
+ return $vars;
47
+ }
48
+
49
+ /**
50
+ * Changes the name to a underscore separated name
51
+ * @param array $vars
52
+ * @return array
53
+ */
54
+ private function correctThemeName($vars)
55
+ {
56
+ $vars['name'] = str_replace('-', '_', $vars['name']);
57
+
58
+ return $vars;
59
+ }
60
+ }
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ use Composer\Package\PackageInterface;
5
+
6
+ class SilverStripeInstaller extends BaseInstaller
7
+ {
8
+ protected $locations = array(
9
+ 'module' => '{$name}/',
10
+ 'theme' => 'themes/{$name}/',
11
+ );
12
+
13
+ /**
14
+ * Return the install path based on package type.
15
+ *
16
+ * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
17
+ * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
18
+ *
19
+ * @param PackageInterface $package
20
+ * @param string $frameworkType
21
+ * @return string
22
+ */
23
+ public function getInstallPath(PackageInterface $package, $frameworkType = '')
24
+ {
25
+ if (
26
+ $package->getName() == 'silverstripe/framework'
27
+ && preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
28
+ && version_compare($package->getVersion(), '2.999.999') < 0
29
+ ) {
30
+ return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
31
+ }
32
+
33
+ return parent::getInstallPath($package, $frameworkType);
34
+ }
35
+ }
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class SiteDirectInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'module' => 'modules/{$vendor}/{$name}/',
9
+ 'plugin' => 'plugins/{$vendor}/{$name}/'
10
+ );
11
+
12
+ public function inflectPackageVars($vars)
13
+ {
14
+ return $this->parseVars($vars);
15
+ }
16
+
17
+ protected function parseVars($vars)
18
+ {
19
+ $vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
20
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
21
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
22
+
23
+ return $vars;
24
+ }
25
+ }
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class SyDESInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'app/modules/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+
11
+ /**
12
+ * Format module name.
13
+ *
14
+ * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
15
+ *
16
+ * @param array @vars
17
+ *
18
+ * @return array
19
+ */
20
+ public function inflectPackageVars($vars)
21
+ {
22
+ if ($vars['type'] == 'sydes-module') {
23
+ return $this->inflectModuleVars($vars);
24
+ }
25
+
26
+ if ($vars['type'] === 'sydes-theme') {
27
+ return $this->inflectThemeVars($vars);
28
+ }
29
+
30
+ return $vars;
31
+ }
32
+
33
+ public function inflectModuleVars($vars)
34
+ {
35
+ $vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
36
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
37
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
38
+
39
+ return $vars;
40
+ }
41
+
42
+ protected function inflectThemeVars($vars)
43
+ {
44
+ $vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
45
+ $vars['name'] = strtolower($vars['name']);
46
+
47
+ return $vars;
48
+ }
49
+ }
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Plugin installer for symfony 1.x
6
+ *
7
+ * @author Jérôme Tamarelle <jerome@tamarelle.net>
8
+ */
9
+ class Symfony1Installer extends BaseInstaller
10
+ {
11
+ protected $locations = array(
12
+ 'plugin' => 'plugins/{$name}/',
13
+ );
14
+
15
+ /**
16
+ * Format package name to CamelCase
17
+ */
18
+ public function inflectPackageVars($vars)
19
+ {
20
+ $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
21
+ return strtoupper($matches[0][1]);
22
+ }, $vars['name']);
23
+
24
+ return $vars;
25
+ }
26
+ }
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * Extension installer for TYPO3 CMS
6
+ *
7
+ * @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
8
+ *
9
+ * @author Sascha Egerer <sascha.egerer@dkd.de>
10
+ */
11
+ class TYPO3CmsInstaller extends BaseInstaller
12
+ {
13
+ protected $locations = array(
14
+ 'extension' => 'typo3conf/ext/{$name}/',
15
+ );
16
+ }
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ /**
5
+ * An installer to handle TYPO3 Flow specifics when installing packages.
6
+ */
7
+ class TYPO3FlowInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'package' => 'Packages/Application/{$name}/',
11
+ 'framework' => 'Packages/Framework/{$name}/',
12
+ 'plugin' => 'Packages/Plugins/{$name}/',
13
+ 'site' => 'Packages/Sites/{$name}/',
14
+ 'boilerplate' => 'Packages/Boilerplates/{$name}/',
15
+ 'build' => 'Build/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Modify the package name to be a TYPO3 Flow style key.
20
+ *
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $autoload = $this->package->getAutoload();
27
+ if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
28
+ $namespace = key($autoload['psr-0']);
29
+ $vars['name'] = str_replace('\\', '.', $namespace);
30
+ }
31
+ if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
32
+ $namespace = key($autoload['psr-4']);
33
+ $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
34
+ }
35
+
36
+ return $vars;
37
+ }
38
+ }
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class TheliaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'local/modules/{$name}/',
8
+ 'frontoffice-template' => 'templates/frontOffice/{$name}/',
9
+ 'backoffice-template' => 'templates/backOffice/{$name}/',
10
+ 'email-template' => 'templates/email/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+ /**
4
+ * Composer installer for 3rd party Tusk utilities
5
+ * @author Drew Ewing <drew@phenocode.com>
6
+ */
7
+ class TuskInstaller extends BaseInstaller
8
+ {
9
+ protected $locations = array(
10
+ 'task' => '.tusk/tasks/{$name}/',
11
+ 'command' => '.tusk/commands/{$name}/',
12
+ 'asset' => 'assets/tusk/{$name}/',
13
+ );
14
+ }
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class UserFrostingInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'sprinkle' => 'app/sprinkles/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class VanillaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'plugins/{$name}/',
8
+ 'theme' => 'themes/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class VgmcpInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'bundle' => 'src/{$vendor}/{$name}/',
8
+ 'theme' => 'themes/{$name}/'
9
+ );
10
+
11
+ /**
12
+ * Format package name.
13
+ *
14
+ * For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
15
+ *
16
+ * For package type vgmcp-theme, cut off a trailing '-theme' if present.
17
+ *
18
+ */
19
+ public function inflectPackageVars($vars)
20
+ {
21
+ if ($vars['type'] === 'vgmcp-bundle') {
22
+ return $this->inflectPluginVars($vars);
23
+ }
24
+
25
+ if ($vars['type'] === 'vgmcp-theme') {
26
+ return $this->inflectThemeVars($vars);
27
+ }
28
+
29
+ return $vars;
30
+ }
31
+
32
+ protected function inflectPluginVars($vars)
33
+ {
34
+ $vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
35
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
36
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
37
+
38
+ return $vars;
39
+ }
40
+
41
+ protected function inflectThemeVars($vars)
42
+ {
43
+ $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
44
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
45
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
46
+
47
+ return $vars;
48
+ }
49
+ }
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer\Installers;
4
+
5
+ class WHMCSInstaller extends BaseInstaller
6
+ {
7
+ protected $locations = array(
8
+ 'gateway' => 'modules/gateways/{$name}/',
9
+ );
10
+ }
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WolfCMSInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wolf/plugins/{$name}/',
8
+ );
9
+ }
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class WordPressInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'plugin' => 'wp-content/plugins/{$name}/',
8
+ 'theme' => 'wp-content/themes/{$name}/',
9
+ 'muplugin' => 'wp-content/mu-plugins/{$name}/',
10
+ 'dropin' => 'wp-content/{$name}/',
11
+ );
12
+ }
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: cbleek
5
+ * Date: 25.03.16
6
+ * Time: 20:55
7
+ */
8
+
9
+ namespace Composer\Installers;
10
+
11
+
12
+ class YawikInstaller extends BaseInstaller
13
+ {
14
+ protected $locations = array(
15
+ 'module' => 'module/{$name}/',
16
+ );
17
+
18
+ /**
19
+ * Format package name to CamelCase
20
+ * @param array $vars
21
+ *
22
+ * @return array
23
+ */
24
+ public function inflectPackageVars($vars)
25
+ {
26
+ $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
27
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
28
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
29
+
30
+ return $vars;
31
+ }
32
+ }
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZendInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'library' => 'library/{$name}/',
8
+ 'extra' => 'extras/library/{$name}/',
9
+ 'module' => 'module/{$name}/',
10
+ );
11
+ }
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Composer\Installers;
3
+
4
+ class ZikulaInstaller extends BaseInstaller
5
+ {
6
+ protected $locations = array(
7
+ 'module' => 'modules/{$vendor}-{$name}/',
8
+ 'theme' => 'themes/{$vendor}-{$name}/'
9
+ );
10
+ }
vendor/composer/installers/src/bootstrap.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function includeIfExists($file)
3
+ {
4
+ if (file_exists($file)) {
5
+ return include $file;
6
+ }
7
+ }
8
+ if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
9
+ die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
10
+ 'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
11
+ 'php composer.phar install'.PHP_EOL);
12
+ }
13
+ return $loader;
vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2016-2018 Dealerdirect B.V.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
vendor/dealerdirect/phpcodesniffer-composer-installer/README.md ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PHP_CodeSniffer Standards Composer Installer Plugin
2
+
3
+ ![Project Stage][project-stage-shield]
4
+ ![Last Commit][last-updated-shield]
5
+ ![Awesome][awesome-shield]
6
+ [![License][license-shield]](LICENSE.md)
7
+
8
+ [![Travis][travis-shield]][travis]
9
+ [![Scrutinizer][scrutinizer-shield]][scrutinizer]
10
+ [![Latest Version on Packagist][packagist-version-shield]][packagist-version]
11
+ [![Packagist][packagist-shield]][packagist]
12
+
13
+ This composer installer plugin allows for easy installation of [PHP_CodeSniffer][codesniffer] coding standards (rulesets).
14
+
15
+ No more symbolic linking of directories, checking out repositories on specific locations or changing
16
+ the `phpcs` configuration.
17
+
18
+ _Note: This plugin is compatible with both version 2.x and 3.x of_ [PHP_CodeSniffer][codesniffer]
19
+
20
+ ## Usage
21
+
22
+ Installation can be done with [composer], by requiring this package as a development dependency:
23
+
24
+ ```bash
25
+ composer require --dev dealerdirect/phpcodesniffer-composer-installer
26
+ ```
27
+
28
+ That's it.
29
+
30
+ ### How it works
31
+
32
+ Basically, this plugin executes the following steps:
33
+
34
+ - This plugin search for `phpcodesniffer-standard` packages in all of your currently installed Composer packages.
35
+ - Matching packages and the project itself are scanned for PHP_CodeSniffer rulesets.
36
+ - The plugin will call PHP_CodeSniffer and configure the `installed_paths` option.
37
+
38
+ ### Example project
39
+
40
+ The following is an example Composer project and has included
41
+ multiple `phpcodesniffer-standard` packages.
42
+
43
+ ```json
44
+ {
45
+ "name": "dealerdirect/example-project",
46
+ "description": "Just an example project",
47
+ "type": "project",
48
+ "require": {},
49
+ "require-dev": {
50
+ "dealerdirect/phpcodesniffer-composer-installer": "*",
51
+ "object-calisthenics/phpcs-calisthenics-rules": "*",
52
+ "phpcompatibility/php-compatibility": "*",
53
+ "wp-coding-standards/wpcs": "*"
54
+ }
55
+ }
56
+ ```
57
+
58
+ After running `composer install` PHP_CodeSniffer just works:
59
+
60
+ ```bash
61
+ $ ./vendor/bin/phpcs -i
62
+ The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz, Zend, PHPCompatibility, WordPress,
63
+ WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress-VIP
64
+ ```
65
+
66
+ ### Calling the plugin directly
67
+
68
+ In some circumstances, it is desirable to call this plugin's functionality
69
+ directly. For instance, during development or in [CI][definition-ci] environments.
70
+
71
+ As the plugin requires Composer to work, direct calls need to be wired through a
72
+ project's `composer.json`.
73
+
74
+ This is done by adding a call to the `Plugin::run` function in the `script`
75
+ section of the `composer.json`:
76
+
77
+ ```json
78
+ {
79
+ "scripts": {
80
+ "install-codestandards": [
81
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
82
+ ]
83
+ }
84
+ }
85
+
86
+ ```
87
+
88
+ The command can then be called using `composer run-script install-codestandards` or
89
+ referenced from other script configurations, as follows:
90
+
91
+ ```json
92
+ {
93
+ "scripts": {
94
+ "install-codestandards": [
95
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
96
+ ],
97
+ "post-install-cmd": [
98
+ "@install-codestandards"
99
+ ]
100
+ }
101
+ }
102
+
103
+ ```
104
+
105
+ For more details about Composer scripts, please refer to [the section on scripts
106
+ in the Composer manual][composer-manual-scripts].
107
+
108
+ ### Changing the Coding Standards search depth
109
+
110
+ By default, this plugin searches up for Coding Standards up to three directories
111
+ deep. In most cases, this should be sufficient. However, this plugin allows
112
+ you to customize the search depth setting if needed.
113
+
114
+ ```json
115
+ {
116
+ "extra": {
117
+ "phpcodesniffer-search-depth": 5
118
+ }
119
+ }
120
+ ```
121
+
122
+ ### Caveats
123
+
124
+ When this plugin is installed globally, composer will load the _global_ plugin rather
125
+ than the one from the local repository. Despite [this behavior being documented
126
+ in the composer manual][using-composer-plugins], it could potentially confuse
127
+ as another version of the plugin could be run and not the one specified by the project.
128
+
129
+ ## Developing Coding Standards
130
+
131
+ Coding standard can be developed normally, as documented by [PHP_CodeSniffer][codesniffer], in the [Coding Standard Tutorial][tutorial].
132
+
133
+ Create a composer package of your coding standard by adding a `composer.json` file.
134
+
135
+ ```json
136
+ {
137
+ "name" : "acme/phpcodesniffer-our-standards",
138
+ "description" : "Package contains all coding standards of the Acme company",
139
+ "require" : {
140
+ "php" : ">=5.4.0,<8.0.0-dev",
141
+ "squizlabs/php_codesniffer" : "^3.0"
142
+ },
143
+ "type" : "phpcodesniffer-standard"
144
+ }
145
+ ```
146
+
147
+ Requirements:
148
+ * The repository may contain one or more standards.
149
+ * Each standard can have a separate directory no deeper than 3 levels from the repository root.
150
+ * The package `type` must be `phpcodesniffer-standard`. Without this, the plugin will not trigger.
151
+
152
+ ## Changelog
153
+
154
+ This repository does not contain a `CHANGELOG.md` file, however, we do publish a changelog on each release
155
+ using the [GitHub releases][changelog] functionality.
156
+
157
+ ## Contributing
158
+
159
+ This is an active open-source project. We are always open to people who want to
160
+ use the code or contribute to it.
161
+
162
+ We've set up a separate document for our [contribution guidelines][contributing-guidelines].
163
+
164
+ Thank you for being involved! :heart_eyes:
165
+
166
+ ## Authors & contributors
167
+
168
+ The original idea and setup of this repository is by [Franck Nijhof][frenck], employee @ Dealerdirect.
169
+
170
+ For a full list of all author and/or contributors, check [the contributors page][contributors].
171
+
172
+ ## License
173
+
174
+ The MIT License (MIT)
175
+
176
+ Copyright (c) 2016-2018 Dealerdirect B.V.
177
+
178
+ Permission is hereby granted, free of charge, to any person obtaining a copy
179
+ of this software and associated documentation files (the "Software"), to deal
180
+ in the Software without restriction, including without limitation the rights
181
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
182
+ copies of the Software, and to permit persons to whom the Software is
183
+ furnished to do so, subject to the following conditions:
184
+
185
+ The above copyright notice and this permission notice shall be included in
186
+ all copies or substantial portions of the Software.
187
+
188
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
189
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
190
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
191
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
192
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
193
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
194
+ THE SOFTWARE.
195
+
196
+ [awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg
197
+ [changelog]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases
198
+ [codesniffer]: https://github.com/squizlabs/PHP_CodeSniffer
199
+ [composer-manual-scripts]: https://getcomposer.org/doc/articles/scripts.md
200
+ [composer]: https://getcomposer.org/
201
+ [contributing-guidelines]: CONTRIBUTING.md
202
+ [contributors]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors
203
+ [dealerdirectcom]: http://www.dealerdirect.com/en
204
+ [definition-ci]: https://en.wikipedia.org/wiki/Continuous_integration
205
+ [frenck]: https://github.com/frenck
206
+ [get-in-touch]: https://www.dealerdirect.com/en/contact
207
+ [license-shield]: https://img.shields.io/github/license/dealerdirect/phpcodesniffer-composer-installer.svg
208
+ [last-updated-shield]: https://img.shields.io/github/last-commit/Dealerdirect/phpcodesniffer-composer-installer.svg
209
+ [packagist-shield]: https://img.shields.io/packagist/dt/dealerdirect/phpcodesniffer-composer-installer.svg
210
+ [packagist-version-shield]: https://img.shields.io/packagist/v/dealerdirect/phpcodesniffer-composer-installer.svg
211
+ [packagist-version]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
212
+ [packagist]: https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
213
+ [project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Development-yellowgreen.svg
214
+ [scrutinizer-shield]: https://img.shields.io/scrutinizer/g/dealerdirect/phpcodesniffer-composer-installer.svg
215
+ [scrutinizer]: https://scrutinizer-ci.com/g/dealerdirect/phpcodesniffer-composer-installer/
216
+ [travis-shield]: https://img.shields.io/travis/Dealerdirect/phpcodesniffer-composer-installer.svg
217
+ [travis]: https://travis-ci.org/Dealerdirect/phpcodesniffer-composer-installer
218
+ [tutorial]: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial
219
+ [using-composer-plugins]: https://getcomposer.org/doc/articles/plugins.md#using-plugins
220
+ [vacancies]: https://www.dealerdirect.com/en/vacancies
vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
3
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
4
+ "type": "composer-plugin",
5
+ "keywords": [
6
+ "composer", "installer", "plugin",
7
+ "phpcs", "codesniffer", "phpcodesniffer", "php_codesniffer",
8
+ "standard", "standards", "style guide", "stylecheck",
9
+ "qa", "quality", "code quality", "tests"
10
+ ],
11
+ "homepage": "http://www.dealerdirect.com",
12
+ "license": "MIT",
13
+ "authors": [
14
+ {
15
+ "name": "Franck Nijhof",
16
+ "email": "franck.nijhof@dealerdirect.com",
17
+ "homepage": "http://www.frenck.nl",
18
+ "role": "Developer / IT Manager"
19
+ }
20
+ ],
21
+ "support": {
22
+ "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
23
+ "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
24
+ },
25
+ "require": {
26
+ "php": "^5.3|^7",
27
+ "composer-plugin-api": "^1.0",
28
+ "squizlabs/php_codesniffer": "^2|^3"
29
+ },
30
+ "require-dev": {
31
+ "composer/composer": "*",
32
+ "sensiolabs/security-checker": "^4.1.0",
33
+ "phpcompatibility/php-compatibility": "^9.0"
34
+ },
35
+ "autoload": {
36
+ "psr-4": {
37
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
38
+ }
39
+ },
40
+ "extra": {
41
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
42
+ },
43
+ "scripts": {
44
+ "install-codestandards": [
45
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
46
+ ]
47
+ }
48
+ }
vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php ADDED
@@ -0,0 +1,478 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file is part of the Dealerdirect PHP_CodeSniffer Standards
5
+ * Composer Installer Plugin package.
6
+ *
7
+ * @copyright 2016-2018 Dealerdirect B.V.
8
+ * @license MIT
9
+ */
10
+
11
+ namespace Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer;
12
+
13
+ use Composer\Composer;
14
+ use Composer\EventDispatcher\EventSubscriberInterface;
15
+ use Composer\IO\IOInterface;
16
+ use Composer\Package\AliasPackage;
17
+ use Composer\Package\PackageInterface;
18
+ use Composer\Package\RootpackageInterface;
19
+ use Composer\Plugin\PluginInterface;
20
+ use Composer\Script\Event;
21
+ use Composer\Script\ScriptEvents;
22
+ use Composer\Util\Filesystem;
23
+ use Composer\Util\ProcessExecutor;
24
+ use Symfony\Component\Finder\Finder;
25
+ use Symfony\Component\Process\Exception\LogicException;
26
+ use Symfony\Component\Process\Exception\ProcessFailedException;
27
+ use Symfony\Component\Process\Exception\RuntimeException;
28
+
29
+ /**
30
+ * PHP_CodeSniffer standard installation manager.
31
+ *
32
+ * @author Franck Nijhof <franck.nijhof@dealerdirect.com>
33
+ */
34
+ class Plugin implements PluginInterface, EventSubscriberInterface
35
+ {
36
+
37
+ const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth';
38
+
39
+ const MESSAGE_ERROR_WRONG_MAX_DEPTH =
40
+ 'The value of "%s" (in the composer.json "extra".section) must be an integer larger then %d, %s given.';
41
+ const MESSAGE_NOT_INSTALLED = 'PHPCodeSniffer is not installed';
42
+ const MESSAGE_NOTHING_TO_INSTALL = 'Nothing to install or update';
43
+ const MESSAGE_RUNNING_INSTALLER = 'Running PHPCodeSniffer Composer Installer';
44
+
45
+ const PACKAGE_NAME = 'squizlabs/php_codesniffer';
46
+ const PACKAGE_TYPE = 'phpcodesniffer-standard';
47
+
48
+ const PHPCS_CONFIG_KEY = 'installed_paths';
49
+
50
+ /**
51
+ * @var Composer
52
+ */
53
+ private $composer;
54
+
55
+ /**
56
+ * @var string
57
+ */
58
+ private $cwd;
59
+
60
+ /**
61
+ * @var Filesystem
62
+ */
63
+ private $filesystem;
64
+
65
+ /**
66
+ * @var array
67
+ */
68
+ private $installedPaths;
69
+
70
+ /**
71
+ * @var IOInterface
72
+ */
73
+ private $io;
74
+
75
+ /**
76
+ * @var ProcessExecutor
77
+ */
78
+ private $processExecutor;
79
+
80
+ /**
81
+ * Triggers the plugin's main functionality.
82
+ *
83
+ * Makes it possible to run the plugin as a custom command.
84
+ *
85
+ * @param Event $event
86
+ *
87
+ * @throws \InvalidArgumentException
88
+ * @throws \RuntimeException
89
+ * @throws LogicException
90
+ * @throws ProcessFailedException
91
+ * @throws RuntimeException
92
+ */
93
+ public static function run(Event $event)
94
+ {
95
+ $io = $event->getIO();
96
+ $composer = $event->getComposer();
97
+
98
+ $instance = new static();
99
+
100
+ $instance->io = $io;
101
+ $instance->composer = $composer;
102
+ $instance->init();
103
+ $instance->onDependenciesChangedEvent();
104
+ }
105
+
106
+ /**
107
+ * {@inheritDoc}
108
+ *
109
+ * @throws \RuntimeException
110
+ * @throws LogicException
111
+ * @throws ProcessFailedException
112
+ * @throws RuntimeException
113
+ */
114
+ public function activate(Composer $composer, IOInterface $io)
115
+ {
116
+ $this->composer = $composer;
117
+ $this->io = $io;
118
+
119
+ $this->init();
120
+ }
121
+
122
+ /**
123
+ * Prepares the plugin so it's main functionality can be run.
124
+ *
125
+ * @throws \RuntimeException
126
+ * @throws LogicException
127
+ * @throws ProcessFailedException
128
+ * @throws RuntimeException
129
+ */
130
+ private function init()
131
+ {
132
+ $this->cwd = getcwd();
133
+ $this->installedPaths = array();
134
+
135
+ $this->processExecutor = new ProcessExecutor($this->io);
136
+ $this->filesystem = new Filesystem($this->processExecutor);
137
+ }
138
+
139
+ /**
140
+ * {@inheritDoc}
141
+ */
142
+ public static function getSubscribedEvents()
143
+ {
144
+ return array(
145
+ ScriptEvents::POST_INSTALL_CMD => array(
146
+ array('onDependenciesChangedEvent', 0),
147
+ ),
148
+ ScriptEvents::POST_UPDATE_CMD => array(
149
+ array('onDependenciesChangedEvent', 0),
150
+ ),
151
+ );
152
+ }
153
+
154
+ /**
155
+ * Entry point for post install and post update events.
156
+ *
157
+ * @throws \InvalidArgumentException
158
+ * @throws LogicException
159
+ * @throws ProcessFailedException
160
+ * @throws RuntimeException
161
+ */
162
+ public function onDependenciesChangedEvent()
163
+ {
164
+ $io = $this->io;
165
+ $isVerbose = $io->isVerbose();
166
+
167
+ if ($isVerbose) {
168
+ $io->write(sprintf('<info>%s</info>', self::MESSAGE_RUNNING_INSTALLER));
169
+ }
170
+
171
+ if ($this->isPHPCodeSnifferInstalled() === true) {
172
+ $this->loadInstalledPaths();
173
+ $installPathCleaned = $this->cleanInstalledPaths();
174
+ $installPathUpdated = $this->updateInstalledPaths();
175
+
176
+ if ($installPathCleaned === true || $installPathUpdated === true) {
177
+ $this->saveInstalledPaths();
178
+ } elseif ($isVerbose) {
179
+ $io->write(sprintf('<info>%s</info>', self::MESSAGE_NOTHING_TO_INSTALL));
180
+ }
181
+ } elseif ($isVerbose) {
182
+ $io->write(sprintf('<info>%s</info>', self::MESSAGE_NOT_INSTALLED));
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Load all paths from PHP_CodeSniffer into an array.
188
+ *
189
+ * @throws LogicException
190
+ * @throws ProcessFailedException
191
+ * @throws RuntimeException
192
+ */
193
+ private function loadInstalledPaths()
194
+ {
195
+ if ($this->isPHPCodeSnifferInstalled() === true) {
196
+ $this->processExecutor->execute(
197
+ sprintf(
198
+ 'phpcs --config-show %s',
199
+ self::PHPCS_CONFIG_KEY
200
+ ),
201
+ $output,
202
+ $this->composer->getConfig()->get('bin-dir')
203
+ );
204
+
205
+ $phpcsInstalledPaths = str_replace(self::PHPCS_CONFIG_KEY . ': ', '', $output);
206
+ $phpcsInstalledPaths = trim($phpcsInstalledPaths);
207
+
208
+ if ($phpcsInstalledPaths !== '') {
209
+ $this->installedPaths = explode(',', $phpcsInstalledPaths);
210
+ }
211
+ }
212
+ }
213
+
214
+ /**
215
+ * Save all coding standard paths back into PHP_CodeSniffer
216
+ *
217
+ * @throws LogicException
218
+ * @throws ProcessFailedException
219
+ * @throws RuntimeException
220
+ */
221
+ private function saveInstalledPaths()
222
+ {
223
+ // Check if we found installed paths to set.
224
+ if (count($this->installedPaths) !== 0) {
225
+ $paths = implode(',', $this->installedPaths);
226
+ $arguments = array('--config-set', self::PHPCS_CONFIG_KEY, $paths);
227
+ $configMessage = sprintf(
228
+ 'PHP CodeSniffer Config <info>%s</info> <comment>set to</comment> <info>%s</info>',
229
+ self::PHPCS_CONFIG_KEY,
230
+ $paths
231
+ );
232
+ } else {
233
+ // Delete the installed paths if none were found.
234
+ $arguments = array('--config-delete', self::PHPCS_CONFIG_KEY);
235
+ $configMessage = sprintf(
236
+ 'PHP CodeSniffer Config <info>%s</info> <comment>delete</comment>',
237
+ self::PHPCS_CONFIG_KEY
238
+ );
239
+ }
240
+
241
+ $this->io->write($configMessage);
242
+
243
+ $this->processExecutor->execute(
244
+ sprintf(
245
+ 'phpcs %s',
246
+ implode(' ', $arguments)
247
+ ),
248
+ $configResult,
249
+ $this->composer->getConfig()->get('bin-dir')
250
+ );
251
+
252
+ if ($this->io->isVerbose() && !empty($configResult)) {
253
+ $this->io->write(sprintf('<info>%s</info>', $configResult));
254
+ }
255
+ }
256
+
257
+ /**
258
+ * Iterate trough all known paths and check if they are still valid.
259
+ *
260
+ * If path does not exists, is not an directory or isn't readable, the path
261
+ * is removed from the list.
262
+ *
263
+ * @return bool True if changes where made, false otherwise
264
+ */
265
+ private function cleanInstalledPaths()
266
+ {
267
+ $changes = false;
268
+ foreach ($this->installedPaths as $key => $path) {
269
+ // This might be a relative path as well
270
+ $alternativePath = realpath($this->getPHPCodeSnifferInstallPath() . DIRECTORY_SEPARATOR . $path);
271
+
272
+ if ((is_dir($path) === false || is_readable($path) === false) &&
273
+ (is_dir($alternativePath) === false || is_readable($alternativePath) === false)
274
+ ) {
275
+ unset($this->installedPaths[$key]);
276
+ $changes = true;
277
+ }
278
+ }
279
+ return $changes;
280
+ }
281
+
282
+ /**
283
+ * Check all installed packages (including the root package) against
284
+ * the installed paths from PHP_CodeSniffer and add the missing ones.
285
+ *
286
+ * @return bool True if changes where made, false otherwise
287
+ *
288
+ * @throws \InvalidArgumentException
289
+ * @throws \RuntimeException
290
+ */
291
+ private function updateInstalledPaths()
292
+ {
293
+ $changes = false;
294
+
295
+ $searchPaths = array($this->cwd);
296
+ $codingStandardPackages = $this->getPHPCodingStandardPackages();
297
+ foreach ($codingStandardPackages as $package) {
298
+ $installPath = $this->composer->getInstallationManager()->getInstallPath($package);
299
+ if ($this->filesystem->isAbsolutePath($installPath) === false) {
300
+ $installPath = $this->filesystem->normalizePath(
301
+ $this->cwd . DIRECTORY_SEPARATOR . $installPath
302
+ );
303
+ }
304
+ $searchPaths[] = $installPath;
305
+ }
306
+
307
+ $finder = new Finder();
308
+ $finder->files()
309
+ ->depth('<= ' . $this->getMaxDepth())
310
+ ->depth('>= ' . $this->getMinDepth())
311
+ ->ignoreUnreadableDirs()
312
+ ->ignoreVCS(true)
313
+ ->in($searchPaths)
314
+ ->name('ruleset.xml');
315
+
316
+ // Process each found possible ruleset.
317
+ foreach ($finder as $ruleset) {
318
+ $standardsPath = $ruleset->getPath();
319
+
320
+ // Pick the directory above the directory containing the standard, unless this is the project root.
321
+ if ($standardsPath !== $this->cwd) {
322
+ $standardsPath = dirname($standardsPath);
323
+ }
324
+
325
+ // Use relative paths for local project repositories.
326
+ if ($this->isRunningGlobally() === false) {
327
+ $standardsPath = $this->filesystem->findShortestPath(
328
+ $this->getPHPCodeSnifferInstallPath(),
329
+ $standardsPath,
330
+ true
331
+ );
332
+ }
333
+
334
+ // De-duplicate and add when directory is not configured.
335
+ if (in_array($standardsPath, $this->installedPaths, true) === false) {
336
+ $this->installedPaths[] = $standardsPath;
337
+ $changes = true;
338
+ }
339
+ }
340
+
341
+ return $changes;
342
+ }
343
+
344
+ /**
345
+ * Iterates through Composers' local repository looking for valid Coding
346
+ * Standard packages.
347
+ *
348
+ * If the package is the RootPackage (the one the plugin is installed into),
349
+ * the package is ignored for now since it needs a different install path logic.
350
+ *
351
+ * @return array Composer packages containing coding standard(s)
352
+ */
353
+ private function getPHPCodingStandardPackages()
354
+ {
355
+ $codingStandardPackages = array_filter(
356
+ $this->composer->getRepositoryManager()->getLocalRepository()->getPackages(),
357
+ function (PackageInterface $package) {
358
+ if ($package instanceof AliasPackage) {
359
+ return false;
360
+ }
361
+ return $package->getType() === Plugin::PACKAGE_TYPE;
362
+ }
363
+ );
364
+
365
+ if (! $this->composer->getPackage() instanceof RootpackageInterface
366
+ && $this->composer->getPackage()->getType() === self::PACKAGE_TYPE
367
+ ) {
368
+ $codingStandardPackages[] = $this->composer->getPackage();
369
+ }
370
+
371
+ return $codingStandardPackages;
372
+ }
373
+
374
+ /**
375
+ * Searches for the installed PHP_CodeSniffer Composer package
376
+ *
377
+ * @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against
378
+ *
379
+ * @return PackageInterface|null
380
+ */
381
+ private function getPHPCodeSnifferPackage($versionConstraint = null)
382
+ {
383
+ $packages = $this
384
+ ->composer
385
+ ->getRepositoryManager()
386
+ ->getLocalRepository()
387
+ ->findPackages(self::PACKAGE_NAME, $versionConstraint);
388
+
389
+ return array_shift($packages);
390
+ }
391
+
392
+ /**
393
+ * Returns the path to the PHP_CodeSniffer package installation location
394
+ *
395
+ * @return string
396
+ */
397
+ private function getPHPCodeSnifferInstallPath()
398
+ {
399
+ return $this->composer->getInstallationManager()->getInstallPath($this->getPHPCodeSnifferPackage());
400
+ }
401
+
402
+ /**
403
+ * Simple check if PHP_CodeSniffer is installed.
404
+ *
405
+ * @param null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against
406
+ *
407
+ * @return bool Whether PHP_CodeSniffer is installed
408
+ */
409
+ private function isPHPCodeSnifferInstalled($versionConstraint = null)
410
+ {
411
+ return ($this->getPHPCodeSnifferPackage($versionConstraint) !== null);
412
+ }
413
+
414
+ /**
415
+ * Test if composer is running "global"
416
+ * This check kinda dirty, but it is the "Composer Way"
417
+ *
418
+ * @return bool Whether Composer is running "globally"
419
+ *
420
+ * @throws \RuntimeException
421
+ */
422
+ private function isRunningGlobally()
423
+ {
424
+ return ($this->composer->getConfig()->get('home') === $this->cwd);
425
+ }
426
+
427
+ /**
428
+ * Determines the maximum search depth when searching for Coding Standards.
429
+ *
430
+ * @return int
431
+ *
432
+ * @throws \InvalidArgumentException
433
+ */
434
+ private function getMaxDepth()
435
+ {
436
+ $maxDepth = 3;
437
+
438
+ $extra = $this->composer->getPackage()->getExtra();
439
+
440
+ if (array_key_exists(self::KEY_MAX_DEPTH, $extra)) {
441
+ $maxDepth = $extra[self::KEY_MAX_DEPTH];
442
+ $minDepth = $this->getMinDepth();
443
+
444
+ if (is_int($maxDepth) === false /* Must be an integer */
445
+ || $maxDepth <= $minDepth /* Larger than the minimum */
446
+ || is_float($maxDepth) === true /* Within the boundaries of integer */
447
+ ) {
448
+ $message = vsprintf(
449
+ self::MESSAGE_ERROR_WRONG_MAX_DEPTH,
450
+ array(
451
+ 'key' => self::KEY_MAX_DEPTH,
452
+ 'min' => $minDepth,
453
+ 'given' => var_export($maxDepth, true),
454
+ )
455
+ );
456
+
457
+ throw new \InvalidArgumentException($message);
458
+ }
459
+ }
460
+
461
+ return $maxDepth;
462
+ }
463
+
464
+ /**
465
+ * Returns the minimal search depth for Coding Standard packages.
466
+ *
467
+ * Usually this is 0, unless PHP_CodeSniffer >= 3 is used.
468
+ *
469
+ * @return int
470
+ */
471
+ private function getMinDepth()
472
+ {
473
+ if ($this->isPHPCodeSnifferInstalled('>= 3.0.0') !== true) {
474
+ return 1;
475
+ }
476
+ return 0;
477
+ }
478
+ }
vendor/doctrine/instantiator/CONTRIBUTING.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing
2
+
3
+ * Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
4
+ * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php)
5
+ * Any contribution must provide tests for additional introduced conditions
6
+ * Any un-confirmed issue needs a failing test case before being accepted
7
+ * Pull requests must be sent from a new hotfix/feature branch, not from `master`.
8
+
9
+ ## Installation
10
+
11
+ To install the project and run the tests, you need to clone it first:
12
+
13
+ ```sh
14
+ $ git clone git://github.com/doctrine/instantiator.git
15
+ ```
16
+
17
+ You will then need to run a composer installation:
18
+
19
+ ```sh
20
+ $ cd Instantiator
21
+ $ curl -s https://getcomposer.org/installer | php
22
+ $ php composer.phar update
23
+ ```
24
+
25
+ ## Testing
26
+
27
+ The PHPUnit version to be used is the one installed as a dev- dependency via composer:
28
+
29
+ ```sh
30
+ $ ./vendor/bin/phpunit
31
+ ```
32
+
33
+ Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement
34
+ won't be merged.
35
+
vendor/doctrine/instantiator/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2014 Doctrine Project
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
vendor/doctrine/instantiator/README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Instantiator
2
+
3
+ This library provides a way of avoiding usage of constructors when instantiating PHP classes.
4
+
5
+ [![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator)
6
+ [![Code Coverage](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master)
7
+ [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master)
8
+ [![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator)
9
+ [![HHVM Status](http://hhvm.h4cc.de/badge/doctrine/instantiator.png)](http://hhvm.h4cc.de/package/doctrine/instantiator)
10
+
11
+ [![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator)
12
+ [![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator)
13
+
14
+ ## Installation
15
+
16
+ The suggested installation method is via [composer](https://getcomposer.org/):
17
+
18
+ ```sh
19
+ php composer.phar require "doctrine/instantiator:~1.0.3"
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ The instantiator is able to create new instances of any class without using the constructor or any API of the class
25
+ itself:
26
+
27
+ ```php
28
+ $instantiator = new \Doctrine\Instantiator\Instantiator();
29
+
30
+ $instance = $instantiator->instantiate(\My\ClassName\Here::class);
31
+ ```
32
+
33
+ ## Contributing
34
+
35
+ Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out!
36
+
37
+ ## Credits
38
+
39
+ This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which
40
+ has been donated to the doctrine organization, and which is now deprecated in favour of this package.
vendor/doctrine/instantiator/composer.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "doctrine/instantiator",
3
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
4
+ "type": "library",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/doctrine/instantiator",
7
+ "keywords": [
8
+ "instantiate",
9
+ "constructor"
10
+ ],
11
+ "authors": [
12
+ {
13
+ "name": "Marco Pivetta",
14
+ "email": "ocramius@gmail.com",
15
+ "homepage": "http://ocramius.github.com/"
16
+ }
17
+ ],
18
+ "require": {
19
+ "php": "^7.1"
20
+ },
21
+ "require-dev": {
22
+ "ext-phar": "*",
23
+ "ext-pdo": "*",
24
+ "phpunit/phpunit": "^6.2.3",
25
+ "squizlabs/php_codesniffer": "^3.0.2",
26
+ "athletic/athletic": "~0.1.8"
27
+ },
28
+ "autoload": {
29
+ "psr-4": {
30
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
31
+ }
32
+ },
33
+ "autoload-dev": {
34
+ "psr-0": {
35
+ "DoctrineTest\\InstantiatorPerformance\\": "tests",
36
+ "DoctrineTest\\InstantiatorTest\\": "tests",
37
+ "DoctrineTest\\InstantiatorTestAsset\\": "tests"
38
+ }
39
+ },
40
+ "extra": {
41
+ "branch-alias": {
42
+ "dev-master": "1.2.x-dev"
43
+ }
44
+ }
45
+ }
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ *
15
+ * This software consists of voluntary contributions made by many individuals
16
+ * and is licensed under the MIT license. For more information, see
17
+ * <http://www.doctrine-project.org>.
18
+ */
19
+
20
+ namespace Doctrine\Instantiator\Exception;
21
+
22
+ /**
23
+ * Base exception marker interface for the instantiator component
24
+ *
25
+ * @author Marco Pivetta <ocramius@gmail.com>
26
+ */
27
+ interface ExceptionInterface
28
+ {
29
+ }
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ *
15
+ * This software consists of voluntary contributions made by many individuals
16
+ * and is licensed under the MIT license. For more information, see
17
+ * <http://www.doctrine-project.org>.
18
+ */
19
+
20
+ namespace Doctrine\Instantiator\Exception;
21
+
22
+ use InvalidArgumentException as BaseInvalidArgumentException;
23
+ use ReflectionClass;
24
+
25
+ /**
26
+ * Exception for invalid arguments provided to the instantiator
27
+ *
28
+ * @author Marco Pivetta <ocramius@gmail.com>
29
+ */
30
+ class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface
31
+ {
32
+ public static function fromNonExistingClass(string $className) : self
33
+ {
34
+ if (interface_exists($className)) {
35
+ return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className));
36
+ }
37
+
38
+ if (PHP_VERSION_ID >= 50400 && trait_exists($className)) {
39
+ return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className));
40
+ }
41
+
42
+ return new self(sprintf('The provided class "%s" does not exist', $className));
43
+ }
44
+
45
+ public static function fromAbstractClass(ReflectionClass $reflectionClass) : self
46
+ {
47
+ return new self(sprintf(
48
+ 'The provided class "%s" is abstract, and can not be instantiated',
49
+ $reflectionClass->getName()
50
+ ));
51
+ }
52
+ }
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ *
15
+ * This software consists of voluntary contributions made by many individuals
16
+ * and is licensed under the MIT license. For more information, see
17
+ * <http://www.doctrine-project.org>.
18
+ */
19
+
20
+ namespace Doctrine\Instantiator\Exception;
21
+
22
+ use Exception;
23
+ use ReflectionClass;
24
+ use UnexpectedValueException as BaseUnexpectedValueException;
25
+
26
+ /**
27
+ * Exception for given parameters causing invalid/unexpected state on instantiation
28
+ *
29
+ * @author Marco Pivetta <ocramius@gmail.com>
30
+ */
31
+ class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface
32
+ {
33
+ public static function fromSerializationTriggeredException(
34
+ ReflectionClass $reflectionClass,
35
+ Exception $exception
36
+ ) : self {
37
+ return new self(
38
+ sprintf(
39
+ 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization',
40
+ $reflectionClass->getName()
41
+ ),
42
+ 0,
43
+ $exception
44
+ );
45
+ }
46
+
47
+ public static function fromUncleanUnSerialization(
48
+ ReflectionClass $reflectionClass,
49
+ string $errorString,
50
+ int $errorCode,
51
+ string $errorFile,
52
+ int $errorLine
53
+ ) : self {
54
+ return new self(
55
+ sprintf(
56
+ 'Could not produce an instance of "%s" via un-serialization, since an error was triggered '
57
+ . 'in file "%s" at line "%d"',
58
+ $reflectionClass->getName(),
59
+ $errorFile,
60
+ $errorLine
61
+ ),
62
+ 0,
63
+ new Exception($errorString, $errorCode)
64
+ );
65
+ }
66
+ }
vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ *
15
+ * This software consists of voluntary contributions made by many individuals
16
+ * and is licensed under the MIT license. For more information, see
17
+ * <http://www.doctrine-project.org>.
18
+ */
19
+
20
+ namespace Doctrine\Instantiator;
21
+
22
+ use Doctrine\Instantiator\Exception\InvalidArgumentException;
23
+ use Doctrine\Instantiator\Exception\UnexpectedValueException;
24
+ use Exception;
25
+ use ReflectionClass;
26
+
27
+ /**
28
+ * {@inheritDoc}
29
+ *
30
+ * @author Marco Pivetta <ocramius@gmail.com>
31
+ */
32
+ final class Instantiator implements InstantiatorInterface
33
+ {
34
+ /**
35
+ * Markers used internally by PHP to define whether {@see \unserialize} should invoke
36
+ * the method {@see \Serializable::unserialize()} when dealing with classes implementing
37
+ * the {@see \Serializable} interface.
38
+ */
39
+ const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C';
40
+ const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O';
41
+
42
+ /**
43
+ * @var \callable[] used to instantiate specific classes, indexed by class name
44
+ */
45
+ private static $cachedInstantiators = [];
46
+
47
+ /**
48
+ * @var object[] of objects that can directly be cloned, indexed by class name
49
+ */
50
+ private static $cachedCloneables = [];
51
+
52
+ /**
53
+ * {@inheritDoc}
54
+ */
55
+ public function instantiate($className)
56
+ {
57
+ if (isset(self::$cachedCloneables[$className])) {
58
+ return clone self::$cachedCloneables[$className];
59
+ }
60
+
61
+ if (isset(self::$cachedInstantiators[$className])) {
62
+ $factory = self::$cachedInstantiators[$className];
63
+
64
+ return $factory();
65
+ }
66
+
67
+ return $this->buildAndCacheFromFactory($className);
68
+ }
69
+
70
+ /**
71
+ * Builds the requested object and caches it in static properties for performance
72
+ *
73
+ * @return object
74
+ */
75
+ private function buildAndCacheFromFactory(string $className)
76
+ {
77
+ $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className);
78
+ $instance = $factory();
79
+
80
+ if ($this->isSafeToClone(new ReflectionClass($instance))) {
81
+ self::$cachedCloneables[$className] = clone $instance;
82
+ }
83
+
84
+ return $instance;
85
+ }
86
+
87
+ /**
88
+ * Builds a callable capable of instantiating the given $className without
89
+ * invoking its constructor.
90
+ *
91
+ * @throws InvalidArgumentException
92
+ * @throws UnexpectedValueException
93
+ * @throws \ReflectionException
94
+ */
95
+ private function buildFactory(string $className) : callable
96
+ {
97
+ $reflectionClass = $this->getReflectionClass($className);
98
+
99
+ if ($this->isInstantiableViaReflection($reflectionClass)) {
100
+ return [$reflectionClass, 'newInstanceWithoutConstructor'];
101
+ }
102
+
103
+ $serializedString = sprintf(
104
+ '%s:%d:"%s":0:{}',
105
+ self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER,
106
+ strlen($className),
107
+ $className
108
+ );
109
+
110
+ $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString);
111
+
112
+ return function () use ($serializedString) {
113
+ return unserialize($serializedString);
114
+ };
115
+ }
116
+
117
+ /**
118
+ * @param string $className
119
+ *
120
+ * @return ReflectionClass
121
+ *
122
+ * @throws InvalidArgumentException
123
+ * @throws \ReflectionException
124
+ */
125
+ private function getReflectionClass($className) : ReflectionClass
126
+ {
127
+ if (! class_exists($className)) {
128
+ throw InvalidArgumentException::fromNonExistingClass($className);
129
+ }
130
+
131
+ $reflection = new ReflectionClass($className);
132
+
133
+ if ($reflection->isAbstract()) {
134
+ throw InvalidArgumentException::fromAbstractClass($reflection);
135
+ }
136
+
137
+ return $reflection;
138
+ }
139
+
140
+ /**
141
+ * @param ReflectionClass $reflectionClass
142
+ * @param string $serializedString
143
+ *
144
+ * @throws UnexpectedValueException
145
+ *
146
+ * @return void
147
+ */
148
+ private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, $serializedString) : void
149
+ {
150
+ set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) : void {
151
+ $error = UnexpectedValueException::fromUncleanUnSerialization(
152
+ $reflectionClass,
153
+ $message,
154
+ $code,
155
+ $file,
156
+ $line
157
+ );
158
+ });
159
+
160
+ $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);
161
+
162
+ restore_error_handler();
163
+
164
+ if ($error) {
165
+ throw $error;
166
+ }
167
+ }
168
+
169
+ /**
170
+ * @param ReflectionClass $reflectionClass
171
+ * @param string $serializedString
172
+ *
173
+ * @throws UnexpectedValueException
174
+ *
175
+ * @return void
176
+ */
177
+ private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) : void
178
+ {
179
+ try {
180
+ unserialize($serializedString);
181
+ } catch (Exception $exception) {
182
+ restore_error_handler();
183
+
184
+ throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception);
185
+ }
186
+ }
187
+
188
+ private function isInstantiableViaReflection(ReflectionClass $reflectionClass) : bool
189
+ {
190
+ return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal());
191
+ }
192
+
193
+ /**
194
+ * Verifies whether the given class is to be considered internal
195
+ */
196
+ private function hasInternalAncestors(ReflectionClass $reflectionClass) : bool
197
+ {
198
+ do {
199
+ if ($reflectionClass->isInternal()) {
200
+ return true;
201
+ }
202
+ } while ($reflectionClass = $reflectionClass->getParentClass());
203
+
204
+ return false;
205
+ }
206
+
207
+ /**
208
+ * Checks if a class is cloneable
209
+ *
210
+ * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects.
211
+ */
212
+ private function isSafeToClone(ReflectionClass $reflection) : bool
213
+ {
214
+ return $reflection->isCloneable() && ! $reflection->hasMethod('__clone');
215
+ }
216
+ }
vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ *
15
+ * This software consists of voluntary contributions made by many individuals
16
+ * and is licensed under the MIT license. For more information, see
17
+ * <http://www.doctrine-project.org>.
18
+ */
19
+
20
+ namespace Doctrine\Instantiator;
21
+
22
+ /**
23
+ * Instantiator provides utility methods to build objects without invoking their constructors
24
+ *
25
+ * @author Marco Pivetta <ocramius@gmail.com>
26
+ */
27
+ interface InstantiatorInterface
28
+ {
29
+ /**
30
+ * @param string $className
31
+ *
32
+ * @return object
33
+ *
34
+ * @throws \Doctrine\Instantiator\Exception\ExceptionInterface
35
+ */
36
+ public function instantiate($className);
37
+ }
vendor/myclabs/deep-copy/.gitattributes ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+
4
+ *.png binary
5
+
6
+ tests/ export-ignore
7
+ phpunit.xml.dist export-ignore
vendor/myclabs/deep-copy/.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /composer.phar
2
+ /composer.lock
3
+ /vendor/*
vendor/myclabs/deep-copy/.scrutinizer.yml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ build:
2
+ environment:
3
+ variables:
4
+ COMPOSER_ROOT_VERSION: '1.8.0'
vendor/myclabs/deep-copy/.travis.yml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ language: php
2
+
3
+ sudo: false
4
+
5
+ env:
6
+ global:
7
+ - COMPOSER_ROOT_VERSION=1.8.0
8
+
9
+ php:
10
+ - '7.1'
11
+ - '7.2'
12
+ - nightly
13
+
14
+ matrix:
15
+ fast_finish: true
16
+ include:
17
+ - php: '7.1'
18
+ env: COMPOSER_FLAGS="--prefer-lowest"
19
+ allow_failures:
20
+ - php: nightly
21
+
22
+ cache:
23
+ directories:
24
+ - $HOME/.composer/cache/files
25
+
26
+ install:
27
+ - composer update --no-interaction --no-progress --no-suggest --prefer-dist $COMPOSER_FLAGS
28
+ - wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.0/coveralls.phar
29
+
30
+ before_script:
31
+ - mkdir -p build/logs
32
+
33
+ script:
34
+ - vendor/bin/phpunit --coverage-clover build/logs/clover.xml
35
+
36
+ after_script:
37
+ - php coveralls.phar -v
38
+
39
+ notifications:
40
+ email: false
vendor/myclabs/deep-copy/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 My C-Sense
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
vendor/myclabs/deep-copy/README.md ADDED
@@ -0,0 +1,376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DeepCopy
2
+
3
+ DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph.
4
+
5
+ [![Build Status](https://travis-ci.org/myclabs/DeepCopy.png?branch=1.x)](https://travis-ci.org/myclabs/DeepCopy)
6
+ [![Coverage Status](https://coveralls.io/repos/myclabs/DeepCopy/badge.png?branch=1.x)](https://coveralls.io/r/myclabs/DeepCopy?branch=1.x)
7
+ [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/myclabs/DeepCopy/badges/quality-score.png?s=2747100c19b275f93a777e3297c6c12d1b68b934)](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
8
+ [![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy)
9
+
10
+
11
+ **You are browsing the 1.x version, this version is in maintenance mode only. Please check the new
12
+ [2.x](https://github.com/myclabs/DeepCopy/tree/2.x) version.**
13
+
14
+
15
+ ## Table of Contents
16
+
17
+ 1. [How](#how)
18
+ 1. [Why](#why)
19
+ 1. [Using simply `clone`](#using-simply-clone)
20
+ 1. [Overridding `__clone()`](#overridding-__clone)
21
+ 1. [With `DeepCopy`](#with-deepcopy)
22
+ 1. [How it works](#how-it-works)
23
+ 1. [Going further](#going-further)
24
+ 1. [Matchers](#matchers)
25
+ 1. [Property name](#property-name)
26
+ 1. [Specific property](#specific-property)
27
+ 1. [Type](#type)
28
+ 1. [Filters](#filters)
29
+ 1. [`SetNullFilter`](#setnullfilter-filter)
30
+ 1. [`KeepFilter`](#keepfilter-filter)
31
+ 1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter-filter)
32
+ 1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter-filter)
33
+ 1. [`DoctrineProxyFilter`](#doctrineproxyfilter-filter)
34
+ 1. [`ReplaceFilter`](#replacefilter-type-filter)
35
+ 1. [`ShallowCopyFilter`](#shallowcopyfilter-type-filter)
36
+ 1. [Edge cases](#edge-cases)
37
+ 1. [Contributing](#contributing)
38
+ 1. [Tests](#tests)
39
+
40
+
41
+ ## How?
42
+
43
+ Install with Composer:
44
+
45
+ ```json
46
+ composer require myclabs/deep-copy
47
+ ```
48
+
49
+ Use simply:
50
+
51
+ ```php
52
+ use DeepCopy\DeepCopy;
53
+
54
+ $copier = new DeepCopy();
55
+ $myCopy = $copier->copy($myObject);
56
+ ```
57
+
58
+
59
+ ## Why?
60
+
61
+ - How do you create copies of your objects?
62
+
63
+ ```php
64
+ $myCopy = clone $myObject;
65
+ ```
66
+
67
+ - How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)?
68
+
69
+ You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior
70
+ yourself.
71
+
72
+ - But how do you handle **cycles** in the association graph?
73
+
74
+ Now you're in for a big mess :(
75
+
76
+ ![association graph](doc/graph.png)
77
+
78
+
79
+ ### Using simply `clone`
80
+
81
+ ![Using clone](doc/clone.png)
82
+
83
+
84
+ ### Overridding `__clone()`
85
+
86
+ ![Overridding __clone](doc/deep-clone.png)
87
+
88
+
89
+ ### With `DeepCopy`
90
+
91
+ ![With DeepCopy](doc/deep-copy.png)
92
+
93
+
94
+ ## How it works
95
+
96
+ DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it
97
+ keeps a hash map of all instances and thus preserves the object graph.
98
+
99
+ To use it:
100
+
101
+ ```php
102
+ use function DeepCopy\deep_copy;
103
+
104
+ $copy = deep_copy($var);
105
+ ```
106
+
107
+ Alternatively, you can create your own `DeepCopy` instance to configure it differently for example:
108
+
109
+ ```php
110
+ use DeepCopy\DeepCopy;
111
+
112
+ $copier = new DeepCopy(true);
113
+
114
+ $copy = $copier->copy($var);
115
+ ```
116
+
117
+ You may want to roll your own deep copy function:
118
+
119
+ ```php
120
+ namespace Acme;
121
+
122
+ use DeepCopy\DeepCopy;
123
+
124
+ function deep_copy($var)
125
+ {
126
+ static $copier = null;
127
+
128
+ if (null === $copier) {
129
+ $copier = new DeepCopy(true);
130
+ }
131
+
132
+ return $copier->copy($var);
133
+ }
134
+ ```
135
+
136
+
137
+ ## Going further
138
+
139
+ You can add filters to customize the copy process.
140
+
141
+ The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`,
142
+ with `$filter` implementing `DeepCopy\Filter\Filter`
143
+ and `$matcher` implementing `DeepCopy\Matcher\Matcher`.
144
+
145
+ We provide some generic filters and matchers.
146
+
147
+
148
+ ### Matchers
149
+
150
+ - `DeepCopy\Matcher` applies on a object attribute.
151
+ - `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements.
152
+
153
+
154
+ #### Property name
155
+
156
+ The `PropertyNameMatcher` will match a property by its name:
157
+
158
+ ```php
159
+ use DeepCopy\Matcher\PropertyNameMatcher;
160
+
161
+ // Will apply a filter to any property of any objects named "id"
162
+ $matcher = new PropertyNameMatcher('id');
163
+ ```
164
+
165
+
166
+ #### Specific property
167
+
168
+ The `PropertyMatcher` will match a specific property of a specific class:
169
+
170
+ ```php
171
+ use DeepCopy\Matcher\PropertyMatcher;
172
+
173
+ // Will apply a filter to the property "id" of any objects of the class "MyClass"
174
+ $matcher = new PropertyMatcher('MyClass', 'id');
175
+ ```
176
+
177
+
178
+ #### Type
179
+
180
+ The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of
181
+ [gettype()](http://php.net/manual/en/function.gettype.php) function):
182
+
183
+ ```php
184
+ use DeepCopy\TypeMatcher\TypeMatcher;
185
+
186
+ // Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection
187
+ $matcher = new TypeMatcher('Doctrine\Common\Collections\Collection');
188
+ ```
189
+
190
+
191
+ ### Filters
192
+
193
+ - `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher`
194
+ - `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher`
195
+
196
+
197
+ #### `SetNullFilter` (filter)
198
+
199
+ Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have
200
+ any ID:
201
+
202
+ ```php
203
+ use DeepCopy\DeepCopy;
204
+ use DeepCopy\Filter\SetNullFilter;
205
+ use DeepCopy\Matcher\PropertyNameMatcher;
206
+
207
+ $object = MyClass::load(123);
208
+ echo $object->id; // 123
209
+
210
+ $copier = new DeepCopy();
211
+ $copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id'));
212
+
213
+ $copy = $copier->copy($object);
214
+
215
+ echo $copy->id; // null
216
+ ```
217
+
218
+
219
+ #### `KeepFilter` (filter)
220
+
221
+ If you want a property to remain untouched (for example, an association to an object):
222
+
223
+ ```php
224
+ use DeepCopy\DeepCopy;
225
+ use DeepCopy\Filter\KeepFilter;
226
+ use DeepCopy\Matcher\PropertyMatcher;
227
+
228
+ $copier = new DeepCopy();
229
+ $copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category'));
230
+
231
+ $copy = $copier->copy($object);
232
+ // $copy->category has not been touched
233
+ ```
234
+
235
+
236
+ #### `DoctrineCollectionFilter` (filter)
237
+
238
+ If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
239
+
240
+ ```php
241
+ use DeepCopy\DeepCopy;
242
+ use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter;
243
+ use DeepCopy\Matcher\PropertyTypeMatcher;
244
+
245
+ $copier = new DeepCopy();
246
+ $copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
247
+
248
+ $copy = $copier->copy($object);
249
+ ```
250
+
251
+
252
+ #### `DoctrineEmptyCollectionFilter` (filter)
253
+
254
+ If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the
255
+ `DoctrineEmptyCollectionFilter`
256
+
257
+ ```php
258
+ use DeepCopy\DeepCopy;
259
+ use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter;
260
+ use DeepCopy\Matcher\PropertyMatcher;
261
+
262
+ $copier = new DeepCopy();
263
+ $copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty'));
264
+
265
+ $copy = $copier->copy($object);
266
+
267
+ // $copy->myProperty will return an empty collection
268
+ ```
269
+
270
+
271
+ #### `DoctrineProxyFilter` (filter)
272
+
273
+ If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a
274
+ Doctrine proxy class (...\\\_\_CG\_\_\Proxy).
275
+ You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class.
276
+ **Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded
277
+ before other filters are applied!**
278
+
279
+ ```php
280
+ use DeepCopy\DeepCopy;
281
+ use DeepCopy\Filter\Doctrine\DoctrineProxyFilter;
282
+ use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher;
283
+
284
+ $copier = new DeepCopy();
285
+ $copier->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher());
286
+
287
+ $copy = $copier->copy($object);
288
+
289
+ // $copy should now contain a clone of all entities, including those that were not yet fully loaded.
290
+ ```
291
+
292
+
293
+ #### `ReplaceFilter` (type filter)
294
+
295
+ 1. If you want to replace the value of a property:
296
+
297
+ ```php
298
+ use DeepCopy\DeepCopy;
299
+ use DeepCopy\Filter\ReplaceFilter;
300
+ use DeepCopy\Matcher\PropertyMatcher;
301
+
302
+ $copier = new DeepCopy();
303
+ $callback = function ($currentValue) {
304
+ return $currentValue . ' (copy)'
305
+ };
306
+ $copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title'));
307
+
308
+ $copy = $copier->copy($object);
309
+
310
+ // $copy->title will contain the data returned by the callback, e.g. 'The title (copy)'
311
+ ```
312
+
313
+ 2. If you want to replace whole element:
314
+
315
+ ```php
316
+ use DeepCopy\DeepCopy;
317
+ use DeepCopy\TypeFilter\ReplaceFilter;
318
+ use DeepCopy\TypeMatcher\TypeMatcher;
319
+
320
+ $copier = new DeepCopy();
321
+ $callback = function (MyClass $myClass) {
322
+ return get_class($myClass);
323
+ };
324
+ $copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass'));
325
+
326
+ $copy = $copier->copy([new MyClass, 'some string', new MyClass]);
327
+
328
+ // $copy will contain ['MyClass', 'some string', 'MyClass']
329
+ ```
330
+
331
+
332
+ The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable.
333
+
334
+
335
+ #### `ShallowCopyFilter` (type filter)
336
+
337
+ Stop *DeepCopy* from recursively copying element, using standard `clone` instead:
338
+
339
+ ```php
340
+ use DeepCopy\DeepCopy;
341
+ use DeepCopy\TypeFilter\ShallowCopyFilter;
342
+ use DeepCopy\TypeMatcher\TypeMatcher;
343
+ use Mockery as m;
344
+
345
+ $this->deepCopy = new DeepCopy();
346
+ $this->deepCopy->addTypeFilter(
347
+ new ShallowCopyFilter,
348
+ new TypeMatcher(m\MockInterface::class)
349
+ );
350
+
351
+ $myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class));
352
+ // All mocks will be just cloned, not deep copied
353
+ ```
354
+
355
+
356
+ ## Edge cases
357
+
358
+ The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are
359
+ not applied. There is two ways for you to handle them:
360
+
361
+ - Implement your own `__clone()` method
362
+ - Use a filter with a type matcher
363
+
364
+
365
+ ## Contributing
366
+
367
+ DeepCopy is distributed under the MIT license.
368
+
369
+
370
+ ### Tests
371
+
372
+ Running the tests is simple:
373
+
374
+ ```php
375
+ vendor/bin/phpunit
376
+ ```
vendor/myclabs/deep-copy/composer.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "myclabs/deep-copy",
3
+ "type": "library",
4
+ "description": "Create deep copies (clones) of your objects",
5
+ "keywords": ["clone", "copy", "duplicate", "object", "object graph"],
6
+ "license": "MIT",
7
+
8
+ "autoload": {
9
+ "psr-4": {
10
+ "DeepCopy\\": "src/DeepCopy/"
11
+ },
12
+ "files": [
13
+ "src/DeepCopy/deep_copy.php"
14
+ ]
15
+ },
16
+ "autoload-dev": {
17
+ "psr-4": {
18
+ "DeepCopy\\": "fixtures/",
19
+ "DeepCopyTest\\": "tests/DeepCopyTest/"
20
+ }
21
+ },
22
+
23
+ "require": {
24
+ "php": "^7.1"
25
+ },
26
+ "require-dev": {
27
+ "doctrine/collections": "^1.0",
28
+ "doctrine/common": "^2.6",
29
+ "phpunit/phpunit": "^7.1"
30
+ },
31
+ "replace": {
32
+ "myclabs/deep-copy": "self.version"
33
+ },
34
+
35
+ "config": {
36
+ "sort-packages": true
37
+ }
38
+ }
vendor/myclabs/deep-copy/doc/clone.png ADDED
Binary file
vendor/myclabs/deep-copy/doc/deep-clone.png ADDED
Binary file
vendor/myclabs/deep-copy/doc/deep-copy.png ADDED
Binary file
vendor/myclabs/deep-copy/doc/graph.png ADDED
Binary file
vendor/myclabs/deep-copy/fixtures/f001/A.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f001;
4
+
5
+ class A
6
+ {
7
+ private $aProp;
8
+
9
+ public function getAProp()
10
+ {
11
+ return $this->aProp;
12
+ }
13
+
14
+ public function setAProp($prop)
15
+ {
16
+ $this->aProp = $prop;
17
+
18
+ return $this;
19
+ }
20
+ }
vendor/myclabs/deep-copy/fixtures/f001/B.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f001;
4
+
5
+ class B extends A
6
+ {
7
+ private $bProp;
8
+
9
+ public function getBProp()
10
+ {
11
+ return $this->bProp;
12
+ }
13
+
14
+ public function setBProp($prop)
15
+ {
16
+ $this->bProp = $prop;
17
+
18
+ return $this;
19
+ }
20
+ }
vendor/myclabs/deep-copy/fixtures/f002/A.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f002;
4
+
5
+ class A
6
+ {
7
+ private $prop1;
8
+ private $prop2;
9
+
10
+ public function getProp1()
11
+ {
12
+ return $this->prop1;
13
+ }
14
+
15
+ public function setProp1($prop)
16
+ {
17
+ $this->prop1 = $prop;
18
+
19
+ return $this;
20
+ }
21
+
22
+ public function getProp2()
23
+ {
24
+ return $this->prop2;
25
+ }
26
+
27
+ public function setProp2($prop)
28
+ {
29
+ $this->prop2 = $prop;
30
+
31
+ return $this;
32
+ }
33
+ }
vendor/myclabs/deep-copy/fixtures/f003/Foo.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f003;
4
+
5
+ class Foo
6
+ {
7
+ private $name;
8
+ private $prop;
9
+
10
+ public function __construct($name)
11
+ {
12
+ $this->name = $name;
13
+ }
14
+
15
+ public function getProp()
16
+ {
17
+ return $this->prop;
18
+ }
19
+
20
+ public function setProp($prop)
21
+ {
22
+ $this->prop = $prop;
23
+
24
+ return $this;
25
+ }
26
+ }
vendor/myclabs/deep-copy/fixtures/f004/UnclonableItem.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f004;
4
+
5
+ use BadMethodCallException;
6
+
7
+ class UnclonableItem
8
+ {
9
+ private function __clone()
10
+ {
11
+ throw new BadMethodCallException('Unsupported call.');
12
+ }
13
+ }
vendor/myclabs/deep-copy/fixtures/f005/Foo.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f005;
4
+
5
+ class Foo
6
+ {
7
+ public $cloned = false;
8
+
9
+ public function __clone()
10
+ {
11
+ $this->cloned = true;
12
+ }
13
+ }
vendor/myclabs/deep-copy/fixtures/f006/A.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f006;
4
+
5
+ class A
6
+ {
7
+ public $cloned = false;
8
+ private $aProp;
9
+
10
+ public function getAProp()
11
+ {
12
+ return $this->aProp;
13
+ }
14
+
15
+ public function setAProp($prop)
16
+ {
17
+ $this->aProp = $prop;
18
+
19
+ return $this;
20
+ }
21
+
22
+ public function __clone()
23
+ {
24
+ $this->cloned = true;
25
+ }
26
+ }
vendor/myclabs/deep-copy/fixtures/f006/B.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f006;
4
+
5
+ class B
6
+ {
7
+ public $cloned = false;
8
+ private $bProp;
9
+
10
+ public function getBProp()
11
+ {
12
+ return $this->bProp;
13
+ }
14
+
15
+ public function setBProp($prop)
16
+ {
17
+ $this->bProp = $prop;
18
+
19
+ return $this;
20
+ }
21
+
22
+ public function __clone()
23
+ {
24
+ $this->cloned = true;
25
+ }
26
+ }
vendor/myclabs/deep-copy/fixtures/f007/FooDateInterval.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f007;
4
+
5
+ use DateInterval;
6
+
7
+ class FooDateInterval extends DateInterval
8
+ {
9
+ public $cloned = false;
10
+
11
+ public function __clone()
12
+ {
13
+ $this->cloned = true;
14
+ }
15
+ }
vendor/myclabs/deep-copy/fixtures/f007/FooDateTimeZone.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f007;
4
+
5
+ use DateTimeZone;
6
+
7
+ class FooDateTimeZone extends DateTimeZone
8
+ {
9
+ public $cloned = false;
10
+
11
+ public function __clone()
12
+ {
13
+ $this->cloned = true;
14
+ }
15
+ }
vendor/myclabs/deep-copy/fixtures/f008/A.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f008;
4
+
5
+ class A
6
+ {
7
+ private $foo;
8
+
9
+ public function __construct($foo)
10
+ {
11
+ $this->foo = $foo;
12
+ }
13
+
14
+ public function getFoo()
15
+ {
16
+ return $this->foo;
17
+ }
18
+ }
vendor/myclabs/deep-copy/fixtures/f008/B.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\f008;
4
+
5
+ class B extends A
6
+ {
7
+ }
vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy;
4
+
5
+ use DateInterval;
6
+ use DateTimeInterface;
7
+ use DateTimeZone;
8
+ use DeepCopy\Exception\CloneException;
9
+ use DeepCopy\Filter\Filter;
10
+ use DeepCopy\Matcher\Matcher;
11
+ use DeepCopy\TypeFilter\Date\DateIntervalFilter;
12
+ use DeepCopy\TypeFilter\Spl\SplDoublyLinkedListFilter;
13
+ use DeepCopy\TypeFilter\TypeFilter;
14
+ use DeepCopy\TypeMatcher\TypeMatcher;
15
+ use ReflectionObject;
16
+ use ReflectionProperty;
17
+ use DeepCopy\Reflection\ReflectionHelper;
18
+ use SplDoublyLinkedList;
19
+
20
+ /**
21
+ * @final
22
+ */
23
+ class DeepCopy
24
+ {
25
+ /**
26
+ * @var object[] List of objects copied.
27
+ */
28
+ private $hashMap = [];
29
+
30
+ /**
31
+ * Filters to apply.
32
+ *
33
+ * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
34
+ */
35
+ private $filters = [];
36
+
37
+ /**
38
+ * Type Filters to apply.
39
+ *
40
+ * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
41
+ */
42
+ private $typeFilters = [];
43
+
44
+ /**
45
+ * @var bool
46
+ */
47
+ private $skipUncloneable = false;
48
+
49
+ /**
50
+ * @var bool
51
+ */
52
+ private $useCloneMethod;
53
+
54
+ /**
55
+ * @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used
56
+ * instead of the regular deep cloning.
57
+ */
58
+ public function __construct($useCloneMethod = false)
59
+ {
60
+ $this->useCloneMethod = $useCloneMethod;
61
+
62
+ $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
63
+ $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
64
+ }
65
+
66
+ /**
67
+ * If enabled, will not throw an exception when coming across an uncloneable property.
68
+ *
69
+ * @param $skipUncloneable
70
+ *
71
+ * @return $this
72
+ */
73
+ public function skipUncloneable($skipUncloneable = true)
74
+ {
75
+ $this->skipUncloneable = $skipUncloneable;
76
+
77
+ return $this;
78
+ }
79
+
80
+ /**
81
+ * Deep copies the given object.
82
+ *
83
+ * @param mixed $object
84
+ *
85
+ * @return mixed
86
+ */
87
+ public function copy($object)
88
+ {
89
+ $this->hashMap = [];
90
+
91
+ return $this->recursiveCopy($object);
92
+ }
93
+
94
+ public function addFilter(Filter $filter, Matcher $matcher)
95
+ {
96
+ $this->filters[] = [
97
+ 'matcher' => $matcher,
98
+ 'filter' => $filter,
99
+ ];
100
+ }
101
+
102
+ public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher)
103
+ {
104
+ $this->typeFilters[] = [
105
+ 'matcher' => $matcher,
106
+ 'filter' => $filter,
107
+ ];
108
+ }
109
+
110
+ private function recursiveCopy($var)
111
+ {
112
+ // Matches Type Filter
113
+ if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) {
114
+ return $filter->apply($var);
115
+ }
116
+
117
+ // Resource
118
+ if (is_resource($var)) {
119
+ return $var;
120
+ }
121
+
122
+ // Array
123
+ if (is_array($var)) {
124
+ return $this->copyArray($var);
125
+ }
126
+
127
+ // Scalar
128
+ if (! is_object($var)) {
129
+ return $var;
130
+ }
131
+
132
+ // Object
133
+ return $this->copyObject($var);
134
+ }
135
+
136
+ /**
137
+ * Copy an array
138
+ * @param array $array
139
+ * @return array
140
+ */
141
+ private function copyArray(array $array)
142
+ {
143
+ foreach ($array as $key => $value) {
144
+ $array[$key] = $this->recursiveCopy($value);
145
+ }
146
+
147
+ return $array;
148
+ }
149
+
150
+ /**
151
+ * Copies an object.
152
+ *
153
+ * @param object $object
154
+ *
155
+ * @throws CloneException
156
+ *
157
+ * @return object
158
+ */
159
+ private function copyObject($object)
160
+ {
161
+ $objectHash = spl_object_hash($object);
162
+
163
+ if (isset($this->hashMap[$objectHash])) {
164
+ return $this->hashMap[$objectHash];
165
+ }
166
+
167
+ $reflectedObject = new ReflectionObject($object);
168
+ $isCloneable = $reflectedObject->isCloneable();
169
+
170
+ if (false === $isCloneable) {
171
+ if ($this->skipUncloneable) {
172
+ $this->hashMap[$objectHash] = $object;
173
+
174
+ return $object;
175
+ }
176
+
177
+ throw new CloneException(
178
+ sprintf(
179
+ 'The class "%s" is not cloneable.',
180
+ $reflectedObject->getName()
181
+ )
182
+ );
183
+ }
184
+
185
+ $newObject = clone $object;
186
+ $this->hashMap[$objectHash] = $newObject;
187
+
188
+ if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) {
189
+ return $newObject;
190
+ }
191
+
192
+ if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) {
193
+ return $newObject;
194
+ }
195
+
196
+ foreach (ReflectionHelper::getProperties($reflectedObject) as $property) {
197
+ $this->copyObjectProperty($newObject, $property);
198
+ }
199
+
200
+ return $newObject;
201
+ }
202
+
203
+ private function copyObjectProperty($object, ReflectionProperty $property)
204
+ {
205
+ // Ignore static properties
206
+ if ($property->isStatic()) {
207
+ return;
208
+ }
209
+
210
+ // Apply the filters
211
+ foreach ($this->filters as $item) {
212
+ /** @var Matcher $matcher */
213
+ $matcher = $item['matcher'];
214
+ /** @var Filter $filter */
215
+ $filter = $item['filter'];
216
+
217
+ if ($matcher->matches($object, $property->getName())) {
218
+ $filter->apply(
219
+ $object,
220
+ $property->getName(),
221
+ function ($object) {
222
+ return $this->recursiveCopy($object);
223
+ }
224
+ );
225
+
226
+ // If a filter matches, we stop processing this property
227
+ return;
228
+ }
229
+ }
230
+
231
+ $property->setAccessible(true);
232
+ $propertyValue = $property->getValue($object);
233
+
234
+ // Copy the property
235
+ $property->setValue($object, $this->recursiveCopy($propertyValue));
236
+ }
237
+
238
+ /**
239
+ * Returns first filter that matches variable, `null` if no such filter found.
240
+ *
241
+ * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and
242
+ * 'matcher' with value of type {@see TypeMatcher}
243
+ * @param mixed $var
244
+ *
245
+ * @return TypeFilter|null
246
+ */
247
+ private function getFirstMatchedTypeFilter(array $filterRecords, $var)
248
+ {
249
+ $matched = $this->first(
250
+ $filterRecords,
251
+ function (array $record) use ($var) {
252
+ /* @var TypeMatcher $matcher */
253
+ $matcher = $record['matcher'];
254
+
255
+ return $matcher->matches($var);
256
+ }
257
+ );
258
+
259
+ return isset($matched) ? $matched['filter'] : null;
260
+ }
261
+
262
+ /**
263
+ * Returns first element that matches predicate, `null` if no such element found.
264
+ *
265
+ * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
266
+ * @param callable $predicate Predicate arguments are: element.
267
+ *
268
+ * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher'
269
+ * with value of type {@see TypeMatcher} or `null`.
270
+ */
271
+ private function first(array $elements, callable $predicate)
272
+ {
273
+ foreach ($elements as $element) {
274
+ if (call_user_func($predicate, $element)) {
275
+ return $element;
276
+ }
277
+ }
278
+
279
+ return null;
280
+ }
281
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Exception;
4
+
5
+ use UnexpectedValueException;
6
+
7
+ class CloneException extends UnexpectedValueException
8
+ {
9
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Exception;
4
+
5
+ use ReflectionException;
6
+
7
+ class PropertyException extends ReflectionException
8
+ {
9
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter\Doctrine;
4
+
5
+ use DeepCopy\Filter\Filter;
6
+ use DeepCopy\Reflection\ReflectionHelper;
7
+
8
+ /**
9
+ * @final
10
+ */
11
+ class DoctrineCollectionFilter implements Filter
12
+ {
13
+ /**
14
+ * Copies the object property doctrine collection.
15
+ *
16
+ * {@inheritdoc}
17
+ */
18
+ public function apply($object, $property, $objectCopier)
19
+ {
20
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
21
+
22
+ $reflectionProperty->setAccessible(true);
23
+ $oldCollection = $reflectionProperty->getValue($object);
24
+
25
+ $newCollection = $oldCollection->map(
26
+ function ($item) use ($objectCopier) {
27
+ return $objectCopier($item);
28
+ }
29
+ );
30
+
31
+ $reflectionProperty->setValue($object, $newCollection);
32
+ }
33
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter\Doctrine;
4
+
5
+ use DeepCopy\Filter\Filter;
6
+ use DeepCopy\Reflection\ReflectionHelper;
7
+ use Doctrine\Common\Collections\ArrayCollection;
8
+
9
+ /**
10
+ * @final
11
+ */
12
+ class DoctrineEmptyCollectionFilter implements Filter
13
+ {
14
+ /**
15
+ * Sets the object property to an empty doctrine collection.
16
+ *
17
+ * @param object $object
18
+ * @param string $property
19
+ * @param callable $objectCopier
20
+ */
21
+ public function apply($object, $property, $objectCopier)
22
+ {
23
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
24
+ $reflectionProperty->setAccessible(true);
25
+
26
+ $reflectionProperty->setValue($object, new ArrayCollection());
27
+ }
28
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter\Doctrine;
4
+
5
+ use DeepCopy\Filter\Filter;
6
+
7
+ /**
8
+ * @final
9
+ */
10
+ class DoctrineProxyFilter implements Filter
11
+ {
12
+ /**
13
+ * Triggers the magic method __load() on a Doctrine Proxy class to load the
14
+ * actual entity from the database.
15
+ *
16
+ * {@inheritdoc}
17
+ */
18
+ public function apply($object, $property, $objectCopier)
19
+ {
20
+ $object->__load();
21
+ }
22
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter;
4
+
5
+ /**
6
+ * Filter to apply to a property while copying an object
7
+ */
8
+ interface Filter
9
+ {
10
+ /**
11
+ * Applies the filter to the object.
12
+ *
13
+ * @param object $object
14
+ * @param string $property
15
+ * @param callable $objectCopier
16
+ */
17
+ public function apply($object, $property, $objectCopier);
18
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter;
4
+
5
+ class KeepFilter implements Filter
6
+ {
7
+ /**
8
+ * Keeps the value of the object property.
9
+ *
10
+ * {@inheritdoc}
11
+ */
12
+ public function apply($object, $property, $objectCopier)
13
+ {
14
+ // Nothing to do
15
+ }
16
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter;
4
+
5
+ use DeepCopy\Reflection\ReflectionHelper;
6
+
7
+ /**
8
+ * @final
9
+ */
10
+ class ReplaceFilter implements Filter
11
+ {
12
+ /**
13
+ * @var callable
14
+ */
15
+ protected $callback;
16
+
17
+ /**
18
+ * @param callable $callable Will be called to get the new value for each property to replace
19
+ */
20
+ public function __construct(callable $callable)
21
+ {
22
+ $this->callback = $callable;
23
+ }
24
+
25
+ /**
26
+ * Replaces the object property by the result of the callback called with the object property.
27
+ *
28
+ * {@inheritdoc}
29
+ */
30
+ public function apply($object, $property, $objectCopier)
31
+ {
32
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
33
+ $reflectionProperty->setAccessible(true);
34
+
35
+ $value = call_user_func($this->callback, $reflectionProperty->getValue($object));
36
+
37
+ $reflectionProperty->setValue($object, $value);
38
+ }
39
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Filter;
4
+
5
+ use DeepCopy\Reflection\ReflectionHelper;
6
+
7
+ /**
8
+ * @final
9
+ */
10
+ class SetNullFilter implements Filter
11
+ {
12
+ /**
13
+ * Sets the object property to null.
14
+ *
15
+ * {@inheritdoc}
16
+ */
17
+ public function apply($object, $property, $objectCopier)
18
+ {
19
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
20
+
21
+ $reflectionProperty->setAccessible(true);
22
+ $reflectionProperty->setValue($object, null);
23
+ }
24
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Matcher\Doctrine;
4
+
5
+ use DeepCopy\Matcher\Matcher;
6
+ use Doctrine\Common\Persistence\Proxy;
7
+
8
+ /**
9
+ * @final
10
+ */
11
+ class DoctrineProxyMatcher implements Matcher
12
+ {
13
+ /**
14
+ * Matches a Doctrine Proxy class.
15
+ *
16
+ * {@inheritdoc}
17
+ */
18
+ public function matches($object, $property)
19
+ {
20
+ return $object instanceof Proxy;
21
+ }
22
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Matcher;
4
+
5
+ interface Matcher
6
+ {
7
+ /**
8
+ * @param object $object
9
+ * @param string $property
10
+ *
11
+ * @return boolean
12
+ */
13
+ public function matches($object, $property);
14
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Matcher;
4
+
5
+ /**
6
+ * @final
7
+ */
8
+ class PropertyMatcher implements Matcher
9
+ {
10
+ /**
11
+ * @var string
12
+ */
13
+ private $class;
14
+
15
+ /**
16
+ * @var string
17
+ */
18
+ private $property;
19
+
20
+ /**
21
+ * @param string $class Class name
22
+ * @param string $property Property name
23
+ */
24
+ public function __construct($class, $property)
25
+ {
26
+ $this->class = $class;
27
+ $this->property = $property;
28
+ }
29
+
30
+ /**
31
+ * Matches a specific property of a specific class.
32
+ *
33
+ * {@inheritdoc}
34
+ */
35
+ public function matches($object, $property)
36
+ {
37
+ return ($object instanceof $this->class) && $property == $this->property;
38
+ }
39
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Matcher;
4
+
5
+ /**
6
+ * @final
7
+ */
8
+ class PropertyNameMatcher implements Matcher
9
+ {
10
+ /**
11
+ * @var string
12
+ */
13
+ private $property;
14
+
15
+ /**
16
+ * @param string $property Property name
17
+ */
18
+ public function __construct($property)
19
+ {
20
+ $this->property = $property;
21
+ }
22
+
23
+ /**
24
+ * Matches a property by its name.
25
+ *
26
+ * {@inheritdoc}
27
+ */
28
+ public function matches($object, $property)
29
+ {
30
+ return $property == $this->property;
31
+ }
32
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Matcher;
4
+
5
+ use DeepCopy\Reflection\ReflectionHelper;
6
+ use ReflectionException;
7
+
8
+ /**
9
+ * Matches a property by its type.
10
+ *
11
+ * It is recommended to use {@see DeepCopy\TypeFilter\TypeFilter} instead, as it applies on all occurrences
12
+ * of given type in copied context (eg. array elements), not just on object properties.
13
+ *
14
+ * @final
15
+ */
16
+ class PropertyTypeMatcher implements Matcher
17
+ {
18
+ /**
19
+ * @var string
20
+ */
21
+ private $propertyType;
22
+
23
+ /**
24
+ * @param string $propertyType Property type
25
+ */
26
+ public function __construct($propertyType)
27
+ {
28
+ $this->propertyType = $propertyType;
29
+ }
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public function matches($object, $property)
35
+ {
36
+ try {
37
+ $reflectionProperty = ReflectionHelper::getProperty($object, $property);
38
+ } catch (ReflectionException $exception) {
39
+ return false;
40
+ }
41
+
42
+ $reflectionProperty->setAccessible(true);
43
+
44
+ return $reflectionProperty->getValue($object) instanceof $this->propertyType;
45
+ }
46
+ }
vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\Reflection;
4
+
5
+ use DeepCopy\Exception\PropertyException;
6
+ use ReflectionClass;
7
+ use ReflectionException;
8
+ use ReflectionObject;
9
+ use ReflectionProperty;
10
+
11
+ class ReflectionHelper
12
+ {
13
+ /**
14
+ * Retrieves all properties (including private ones), from object and all its ancestors.
15
+ *
16
+ * Standard \ReflectionClass->getProperties() does not return private properties from ancestor classes.
17
+ *
18
+ * @author muratyaman@gmail.com
19
+ * @see http://php.net/manual/en/reflectionclass.getproperties.php
20
+ *
21
+ * @param ReflectionClass $ref
22
+ *
23
+ * @return ReflectionProperty[]
24
+ */
25
+ public static function getProperties(ReflectionClass $ref)
26
+ {
27
+ $props = $ref->getProperties();
28
+ $propsArr = array();
29
+
30
+ foreach ($props as $prop) {
31
+ $propertyName = $prop->getName();
32
+ $propsArr[$propertyName] = $prop;
33
+ }
34
+
35
+ if ($parentClass = $ref->getParentClass()) {
36
+ $parentPropsArr = self::getProperties($parentClass);
37
+ foreach ($propsArr as $key => $property) {
38
+ $parentPropsArr[$key] = $property;
39
+ }
40
+
41
+ return $parentPropsArr;
42
+ }
43
+
44
+ return $propsArr;
45
+ }
46
+
47
+ /**
48
+ * Retrieves property by name from object and all its ancestors.
49
+ *
50
+ * @param object|string $object
51
+ * @param string $name
52
+ *
53
+ * @throws PropertyException
54
+ * @throws ReflectionException
55
+ *
56
+ * @return ReflectionProperty
57
+ */
58
+ public static function getProperty($object, $name)
59
+ {
60
+ $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object);
61
+
62
+ if ($reflection->hasProperty($name)) {
63
+ return $reflection->getProperty($name);
64
+ }
65
+
66
+ if ($parentClass = $reflection->getParentClass()) {
67
+ return self::getProperty($parentClass->getName(), $name);
68
+ }
69
+
70
+ throw new PropertyException(
71
+ sprintf(
72
+ 'The class "%s" doesn\'t have a property with the given name: "%s".',
73
+ is_object($object) ? get_class($object) : $object,
74
+ $name
75
+ )
76
+ );
77
+ }
78
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeFilter\Date;
4
+
5
+ use DateInterval;
6
+ use DeepCopy\TypeFilter\TypeFilter;
7
+
8
+ /**
9
+ * @final
10
+ *
11
+ * @deprecated Will be removed in 2.0. This filter will no longer be necessary in PHP 7.1+.
12
+ */
13
+ class DateIntervalFilter implements TypeFilter
14
+ {
15
+
16
+ /**
17
+ * {@inheritdoc}
18
+ *
19
+ * @param DateInterval $element
20
+ *
21
+ * @see http://news.php.net/php.bugs/205076
22
+ */
23
+ public function apply($element)
24
+ {
25
+ $copy = new DateInterval('P0D');
26
+
27
+ foreach ($element as $propertyName => $propertyValue) {
28
+ $copy->{$propertyName} = $propertyValue;
29
+ }
30
+
31
+ return $copy;
32
+ }
33
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeFilter;
4
+
5
+ /**
6
+ * @final
7
+ */
8
+ class ReplaceFilter implements TypeFilter
9
+ {
10
+ /**
11
+ * @var callable
12
+ */
13
+ protected $callback;
14
+
15
+ /**
16
+ * @param callable $callable Will be called to get the new value for each element to replace
17
+ */
18
+ public function __construct(callable $callable)
19
+ {
20
+ $this->callback = $callable;
21
+ }
22
+
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function apply($element)
27
+ {
28
+ return call_user_func($this->callback, $element);
29
+ }
30
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeFilter;
4
+
5
+ /**
6
+ * @final
7
+ */
8
+ class ShallowCopyFilter implements TypeFilter
9
+ {
10
+ /**
11
+ * {@inheritdoc}
12
+ */
13
+ public function apply($element)
14
+ {
15
+ return clone $element;
16
+ }
17
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeFilter\Spl;
4
+
5
+ /**
6
+ * @deprecated Use {@see SplDoublyLinkedListFilter} instead.
7
+ */
8
+ class SplDoublyLinkedList extends SplDoublyLinkedListFilter
9
+ {
10
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeFilter\Spl;
4
+
5
+ use Closure;
6
+ use DeepCopy\DeepCopy;
7
+ use DeepCopy\TypeFilter\TypeFilter;
8
+ use SplDoublyLinkedList;
9
+
10
+ /**
11
+ * @final
12
+ */
13
+ class SplDoublyLinkedListFilter implements TypeFilter
14
+ {
15
+ private $copier;
16
+
17
+ public function __construct(DeepCopy $copier)
18
+ {
19
+ $this->copier = $copier;
20
+ }
21
+
22
+ /**
23
+ * {@inheritdoc}
24
+ */
25
+ public function apply($element)
26
+ {
27
+ $newElement = clone $element;
28
+
29
+ $copy = $this->createCopyClosure();
30
+
31
+ return $copy($newElement);
32
+ }
33
+
34
+ private function createCopyClosure()
35
+ {
36
+ $copier = $this->copier;
37
+
38
+ $copy = function (SplDoublyLinkedList $list) use ($copier) {
39
+ // Replace each element in the list with a deep copy of itself
40
+ for ($i = 1; $i <= $list->count(); $i++) {
41
+ $copy = $copier->recursiveCopy($list->shift());
42
+
43
+ $list->push($copy);
44
+ }
45
+
46
+ return $list;
47
+ };
48
+
49
+ return Closure::bind($copy, null, DeepCopy::class);
50
+ }
51
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeFilter;
4
+
5
+ interface TypeFilter
6
+ {
7
+ /**
8
+ * Applies the filter to the object.
9
+ *
10
+ * @param mixed $element
11
+ */
12
+ public function apply($element);
13
+ }
vendor/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy\TypeMatcher;
4
+
5
+ class TypeMatcher
6
+ {
7
+ /**
8
+ * @var string
9
+ */
10
+ private $type;
11
+
12
+ /**
13
+ * @param string $type
14
+ */
15
+ public function __construct($type)
16
+ {
17
+ $this->type = $type;
18
+ }
19
+
20
+ /**
21
+ * @param mixed $element
22
+ *
23
+ * @return boolean
24
+ */
25
+ public function matches($element)
26
+ {
27
+ return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type;
28
+ }
29
+ }
vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DeepCopy;
4
+
5
+ use function function_exists;
6
+
7
+ if (false === function_exists('DeepCopy\deep_copy')) {
8
+ /**
9
+ * Deep copies the given value.
10
+ *
11
+ * @param mixed $value
12
+ * @param bool $useCloneMethod
13
+ *
14
+ * @return mixed
15
+ */
16
+ function deep_copy($value, $useCloneMethod = false)
17
+ {
18
+ return (new DeepCopy($useCloneMethod))->copy($value);
19
+ }
20
+ }
vendor/phar-io/manifest/.gitignore ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /.idea
2
+ /.php_cs.cache
3
+ /composer.lock
4
+ /src/autoload.php
5
+ /tools
6
+ /vendor
7
+
8
+ /build
vendor/phar-io/manifest/.php_cs ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $finder = Symfony\CS\Finder\DefaultFinder::create()
3
+ ->files()
4
+ ->in('src')
5
+ ->in('tests')
6
+ ->name('*.php');
7
+
8
+ return Symfony\CS\Config\Config::create()
9
+ ->setUsingCache(true)
10
+ ->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
11
+ ->fixers(
12
+ array(
13
+ 'align_double_arrow',
14
+ 'align_equals',
15
+ 'concat_with_spaces',
16
+ 'duplicate_semicolon',
17
+ 'elseif',
18
+ 'empty_return',
19
+ 'encoding',
20
+ 'eof_ending',
21
+ 'extra_empty_lines',
22
+ 'function_call_space',
23
+ 'function_declaration',
24
+ 'indentation',
25
+ 'join_function',
26
+ 'line_after_namespace',
27
+ 'linefeed',
28
+ 'list_commas',
29
+ 'lowercase_constants',
30
+ 'lowercase_keywords',
31
+ 'method_argument_space',
32
+ 'multiple_use',
33
+ 'namespace_no_leading_whitespace',
34
+ 'no_blank_lines_after_class_opening',
35
+ 'no_empty_lines_after_phpdocs',
36
+ 'parenthesis',
37
+ 'php_closing_tag',
38
+ 'phpdoc_indent',
39
+ 'phpdoc_no_access',
40
+ 'phpdoc_no_empty_return',
41
+ 'phpdoc_no_package',
42
+ 'phpdoc_params',
43
+ 'phpdoc_scalar',
44
+ 'phpdoc_separation',
45
+ 'phpdoc_to_comment',
46
+ 'phpdoc_trim',
47
+ 'phpdoc_types',
48
+ 'phpdoc_var_without_name',
49
+ 'remove_lines_between_uses',
50
+ 'return',
51
+ 'self_accessor',
52
+ 'short_array_syntax',
53
+ 'short_tag',
54
+ 'single_line_after_imports',
55
+ 'single_quote',
56
+ 'spaces_before_semicolon',
57
+ 'spaces_cast',
58
+ 'ternary_spaces',
59
+ 'trailing_spaces',
60
+ 'trim_array_spaces',
61
+ 'unused_use',
62
+ 'visibility',
63
+ 'whitespacy_lines'
64
+ )
65
+ )
66
+ ->finder($finder);
67
+
vendor/phar-io/manifest/.travis.yml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ os:
2
+ - linux
3
+
4
+ language: php
5
+
6
+ before_install:
7
+ - wget https://phar.io/releases/phive.phar
8
+ - wget https://phar.io/releases/phive.phar.asc
9
+ - gpg --keyserver hkps.pool.sks-keyservers.net --recv-keys 0x9B2D5D79
10
+ - gpg --verify phive.phar.asc phive.phar
11
+ - chmod +x phive.phar
12
+ - sudo mv phive.phar /usr/bin/phive
13
+
14
+ install:
15
+ - ant setup
16
+
17
+ script: ./tools/phpunit
18
+
19
+ php:
20
+ - 5.6
21
+ - 7.0
22
+ - 7.1
23
+ - 7.0snapshot
24
+ - 7.1snapshot
25
+ - master
26
+
27
+ matrix:
28
+ allow_failures:
29
+ - php: master
30
+ fast_finish: true
31
+
32
+ notifications:
33
+ email: false
vendor/phar-io/manifest/LICENSE ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ manifest
2
+
3
+ Copyright (c) 2016 Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>, and contributors
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice,
10
+ this list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of Arne Blankerts nor the names of contributors
17
+ may be used to endorse or promote products derived from this software
18
+ without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO,
22
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
24
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
25
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ POSSIBILITY OF SUCH DAMAGE.
31
+
vendor/phar-io/manifest/README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Manifest
2
+
3
+ Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar).
4
+
5
+ [![Build Status](https://travis-ci.org/phar-io/manifest.svg?branch=master)](https://travis-ci.org/phar-io/manifest)
6
+ [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phar-io/manifest/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phar-io/manifest/?branch=master)
7
+ [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7/mini.png)](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7)
8
+
9
+ ## Installation
10
+
11
+ You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
12
+
13
+ composer require phar-io/manifest
14
+
15
+ If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
16
+
17
+ composer require --dev phar-io/manifest
18
+
19
+ ## Usage
20
+
21
+ ```php
22
+ use PharIo\Manifest\ManifestLoader;
23
+ use PharIo\Manifest\ManifestSerializer;
24
+
25
+ $manifest = ManifestLoader::fromFile('manifest.xml');
26
+
27
+ var_dump($manifest);
28
+
29
+ echo (new ManifestSerializer)->serializeToString($manifest);
30
+ ```
vendor/phar-io/manifest/build.xml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project name="manifest" default="setup">
3
+ <target name="setup" depends="clean,install-tools,install-dependencies"/>
4
+
5
+ <target name="clean" unless="clean.done" description="Cleanup build artifacts">
6
+ <delete dir="${basedir}/tools"/>
7
+ <delete dir="${basedir}/vendor"/>
8
+ <delete file="${basedir}/src/autoload.php"/>
9
+
10
+ <property name="clean.done" value="true"/>
11
+ </target>
12
+
13
+ <target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
14
+ <property name="prepare.done" value="true"/>
15
+ </target>
16
+
17
+ <target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed" description="Install dependencies with Composer">
18
+ <exec executable="composer" taskname="composer">
19
+ <env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
20
+ <arg value="update"/>
21
+ <arg value="--no-interaction"/>
22
+ <arg value="--no-progress"/>
23
+ <arg value="--no-ansi"/>
24
+ <arg value="--no-suggest"/>
25
+ <arg value="--optimize-autoloader"/>
26
+ <arg value="--prefer-stable"/>
27
+ </exec>
28
+ </target>
29
+
30
+ <target name="install-tools" unless="tools-installed" depends="-tools-installed" description="Install tools with Phive">
31
+ <exec executable="phive" taskname="phive">
32
+ <arg value="install"/>
33
+ <arg value="--trust-gpg-keys" />
34
+ <arg value="4AA394086372C20A,2A8299CE842DD38C" />
35
+ </exec>
36
+ </target>
37
+
38
+ <target name="test" depends="install-tools,install-dependencies" description="Run tests">
39
+ <exec executable="${basedir}/tools/phpunit" taskname="phpunit"/>
40
+ </target>
41
+
42
+ <target name="-dependencies-installed">
43
+ <available file="${basedir}/composer.lock" property="dependencies-installed"/>
44
+ </target>
45
+
46
+ <target name="-tools-installed">
47
+ <available file="${basedir}/tools" property="tools-installed" type="dir"/>
48
+ </target>
49
+ </project>
50
+
vendor/phar-io/manifest/composer.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "phar-io/manifest",
3
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
4
+ "license": "BSD-3-Clause",
5
+ "authors": [
6
+ {
7
+ "name": "Arne Blankerts",
8
+ "email": "arne@blankerts.de",
9
+ "role": "Developer"
10
+ },
11
+ {
12
+ "name": "Sebastian Heuer",
13
+ "email": "sebastian@phpeople.de",
14
+ "role": "Developer"
15
+ },
16
+ {
17
+ "name": "Sebastian Bergmann",
18
+ "email": "sebastian@phpunit.de",
19
+ "role": "Developer"
20
+ }
21
+ ],
22
+ "support": {
23
+ "issues": "https://github.com/phar-io/manifest/issues"
24
+ },
25
+ "require": {
26
+ "php": "^5.6 || ^7.0",
27
+ "ext-dom": "*",
28
+ "ext-phar": "*",
29
+ "phar-io/version": "^1.0.1"
30
+ },
31
+ "autoload": {
32
+ "classmap": [
33
+ "src/"
34
+ ]
35
+ },
36
+ "extra": {
37
+ "branch-alias": {
38
+ "dev-master": "1.0.x-dev"
39
+ }
40
+ }
41
+ }
42
+
vendor/phar-io/manifest/examples/example-01.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ use PharIo\Manifest\ManifestLoader;
12
+ use PharIo\Manifest\ManifestSerializer;
13
+
14
+ require __DIR__ . '/../vendor/autoload.php';
15
+
16
+ $manifest = ManifestLoader::fromFile(__DIR__ . '/../tests/_fixture/phpunit-5.6.5.xml');
17
+
18
+ echo sprintf(
19
+ "Manifest for %s (%s):\n\n",
20
+ $manifest->getName(),
21
+ $manifest->getVersion()->getVersionString()
22
+ );
23
+ echo (new ManifestSerializer)->serializeToString($manifest);
vendor/phar-io/manifest/phive.xml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phive xmlns="https://phar.io/phive">
3
+ <phar name="phpunit" version="^5.7" installed="5.7.15" location="./tools/phpunit"/>
4
+ </phive>
vendor/phar-io/manifest/phpunit.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.6/phpunit.xsd"
4
+ bootstrap="vendor/autoload.php"
5
+ backupGlobals="false"
6
+ beStrictAboutCoversAnnotation="true"
7
+ beStrictAboutOutputDuringTests="true"
8
+ beStrictAboutTestsThatDoNotTestAnything="true"
9
+ beStrictAboutTodoAnnotatedTests="true"
10
+ verbose="true">
11
+ <testsuite>
12
+ <directory suffix="Test.php">tests</directory>
13
+ </testsuite>
14
+
15
+ <filter>
16
+ <whitelist processUncoveredFilesFromWhitelist="true">
17
+ <directory suffix=".php">src</directory>
18
+ </whitelist>
19
+ </filter>
20
+ </phpunit>
vendor/phar-io/manifest/src/ManifestDocumentMapper.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+ use PharIo\Version\Exception as VersionException;
15
+ use PharIo\Version\VersionConstraintParser;
16
+
17
+ class ManifestDocumentMapper {
18
+ /**
19
+ * @param ManifestDocument $document
20
+ *
21
+ * @returns Manifest
22
+ *
23
+ * @throws ManifestDocumentMapperException
24
+ */
25
+ public function map(ManifestDocument $document) {
26
+ try {
27
+ $contains = $document->getContainsElement();
28
+ $type = $this->mapType($contains);
29
+ $copyright = $this->mapCopyright($document->getCopyrightElement());
30
+ $requirements = $this->mapRequirements($document->getRequiresElement());
31
+ $bundledComponents = $this->mapBundledComponents($document);
32
+
33
+ return new Manifest(
34
+ new ApplicationName($contains->getName()),
35
+ new Version($contains->getVersion()),
36
+ $type,
37
+ $copyright,
38
+ $requirements,
39
+ $bundledComponents
40
+ );
41
+ } catch (VersionException $e) {
42
+ throw new ManifestDocumentMapperException($e->getMessage(), $e->getCode(), $e);
43
+ } catch (Exception $e) {
44
+ throw new ManifestDocumentMapperException($e->getMessage(), $e->getCode(), $e);
45
+ }
46
+ }
47
+
48
+ /**
49
+ * @param ContainsElement $contains
50
+ *
51
+ * @return Type
52
+ *
53
+ * @throws ManifestDocumentMapperException
54
+ */
55
+ private function mapType(ContainsElement $contains) {
56
+ switch ($contains->getType()) {
57
+ case 'application':
58
+ return Type::application();
59
+ case 'library':
60
+ return Type::library();
61
+ case 'extension':
62
+ return $this->mapExtension($contains->getExtensionElement());
63
+ }
64
+
65
+ throw new ManifestDocumentMapperException(
66
+ sprintf('Unsupported type %s', $contains->getType())
67
+ );
68
+ }
69
+
70
+ /**
71
+ * @param CopyrightElement $copyright
72
+ *
73
+ * @return CopyrightInformation
74
+ *
75
+ * @throws InvalidUrlException
76
+ * @throws InvalidEmailException
77
+ */
78
+ private function mapCopyright(CopyrightElement $copyright) {
79
+ $authors = new AuthorCollection();
80
+
81
+ foreach($copyright->getAuthorElements() as $authorElement) {
82
+ $authors->add(
83
+ new Author(
84
+ $authorElement->getName(),
85
+ new Email($authorElement->getEmail())
86
+ )
87
+ );
88
+ }
89
+
90
+ $licenseElement = $copyright->getLicenseElement();
91
+ $license = new License(
92
+ $licenseElement->getType(),
93
+ new Url($licenseElement->getUrl())
94
+ );
95
+
96
+ return new CopyrightInformation(
97
+ $authors,
98
+ $license
99
+ );
100
+ }
101
+
102
+ /**
103
+ * @param RequiresElement $requires
104
+ *
105
+ * @return RequirementCollection
106
+ *
107
+ * @throws ManifestDocumentMapperException
108
+ */
109
+ private function mapRequirements(RequiresElement $requires) {
110
+ $collection = new RequirementCollection();
111
+ $phpElement = $requires->getPHPElement();
112
+ $parser = new VersionConstraintParser;
113
+
114
+ try {
115
+ $versionConstraint = $parser->parse($phpElement->getVersion());
116
+ } catch (VersionException $e) {
117
+ throw new ManifestDocumentMapperException(
118
+ sprintf('Unsupported version constraint - %s', $e->getMessage()),
119
+ $e->getCode(),
120
+ $e
121
+ );
122
+ }
123
+
124
+ $collection->add(
125
+ new PhpVersionRequirement(
126
+ $versionConstraint
127
+ )
128
+ );
129
+
130
+ if (!$phpElement->hasExtElements()) {
131
+ return $collection;
132
+ }
133
+
134
+ foreach($phpElement->getExtElements() as $extElement) {
135
+ $collection->add(
136
+ new PhpExtensionRequirement($extElement->getName())
137
+ );
138
+ }
139
+
140
+ return $collection;
141
+ }
142
+
143
+ /**
144
+ * @param ManifestDocument $document
145
+ *
146
+ * @return BundledComponentCollection
147
+ */
148
+ private function mapBundledComponents(ManifestDocument $document) {
149
+ $collection = new BundledComponentCollection();
150
+
151
+ if (!$document->hasBundlesElement()) {
152
+ return $collection;
153
+ }
154
+
155
+ foreach($document->getBundlesElement()->getComponentElements() as $componentElement) {
156
+ $collection->add(
157
+ new BundledComponent(
158
+ $componentElement->getName(),
159
+ new Version(
160
+ $componentElement->getVersion()
161
+ )
162
+ )
163
+ );
164
+ }
165
+
166
+ return $collection;
167
+ }
168
+
169
+ /**
170
+ * @param ExtensionElement $extension
171
+ *
172
+ * @return Extension
173
+ *
174
+ * @throws ManifestDocumentMapperException
175
+ */
176
+ private function mapExtension(ExtensionElement $extension) {
177
+ try {
178
+ $parser = new VersionConstraintParser;
179
+ $versionConstraint = $parser->parse($extension->getCompatible());
180
+
181
+ return Type::extension(
182
+ new ApplicationName($extension->getFor()),
183
+ $versionConstraint
184
+ );
185
+ } catch (VersionException $e) {
186
+ throw new ManifestDocumentMapperException(
187
+ sprintf('Unsupported version constraint - %s', $e->getMessage()),
188
+ $e->getCode(),
189
+ $e
190
+ );
191
+ }
192
+ }
193
+ }
vendor/phar-io/manifest/src/ManifestLoader.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ManifestLoader {
14
+ /**
15
+ * @param string $filename
16
+ *
17
+ * @return Manifest
18
+ *
19
+ * @throws ManifestLoaderException
20
+ */
21
+ public static function fromFile($filename) {
22
+ try {
23
+ return (new ManifestDocumentMapper())->map(
24
+ ManifestDocument::fromFile($filename)
25
+ );
26
+ } catch (Exception $e) {
27
+ throw new ManifestLoaderException(
28
+ sprintf('Loading %s failed.', $filename),
29
+ $e->getCode(),
30
+ $e
31
+ );
32
+ }
33
+ }
34
+
35
+ /**
36
+ * @param string $filename
37
+ *
38
+ * @return Manifest
39
+ *
40
+ * @throws ManifestLoaderException
41
+ */
42
+ public static function fromPhar($filename) {
43
+ return self::fromFile('phar://' . $filename . '/manifest.xml');
44
+ }
45
+
46
+ /**
47
+ * @param string $manifest
48
+ *
49
+ * @return Manifest
50
+ *
51
+ * @throws ManifestLoaderException
52
+ */
53
+ public static function fromString($manifest) {
54
+ try {
55
+ return (new ManifestDocumentMapper())->map(
56
+ ManifestDocument::fromString($manifest)
57
+ );
58
+ } catch (Exception $e) {
59
+ throw new ManifestLoaderException(
60
+ 'Processing string failed',
61
+ $e->getCode(),
62
+ $e
63
+ );
64
+ }
65
+ }
66
+ }
vendor/phar-io/manifest/src/ManifestSerializer.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\AnyVersionConstraint;
14
+ use PharIo\Version\Version;
15
+ use PharIo\Version\VersionConstraint;
16
+ use XMLWriter;
17
+
18
+ class ManifestSerializer {
19
+ /**
20
+ * @var XMLWriter
21
+ */
22
+ private $xmlWriter;
23
+
24
+ public function serializeToFile(Manifest $manifest, $filename) {
25
+ file_put_contents(
26
+ $filename,
27
+ $this->serializeToString($manifest)
28
+ );
29
+ }
30
+
31
+ public function serializeToString(Manifest $manifest) {
32
+ $this->startDocument();
33
+
34
+ $this->addContains($manifest->getName(), $manifest->getVersion(), $manifest->getType());
35
+ $this->addCopyright($manifest->getCopyrightInformation());
36
+ $this->addRequirements($manifest->getRequirements());
37
+ $this->addBundles($manifest->getBundledComponents());
38
+
39
+ return $this->finishDocument();
40
+ }
41
+
42
+ private function startDocument() {
43
+ $xmlWriter = new XMLWriter();
44
+ $xmlWriter->openMemory();
45
+ $xmlWriter->setIndent(true);
46
+ $xmlWriter->setIndentString(str_repeat(' ', 4));
47
+ $xmlWriter->startDocument('1.0', 'UTF-8');
48
+ $xmlWriter->startElement('phar');
49
+ $xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0');
50
+
51
+ $this->xmlWriter = $xmlWriter;
52
+ }
53
+
54
+ private function finishDocument() {
55
+ $this->xmlWriter->endElement();
56
+ $this->xmlWriter->endDocument();
57
+
58
+ return $this->xmlWriter->outputMemory();
59
+ }
60
+
61
+ private function addContains($name, Version $version, Type $type) {
62
+ $this->xmlWriter->startElement('contains');
63
+ $this->xmlWriter->writeAttribute('name', $name);
64
+ $this->xmlWriter->writeAttribute('version', $version->getVersionString());
65
+
66
+ switch (true) {
67
+ case $type->isApplication(): {
68
+ $this->xmlWriter->writeAttribute('type', 'application');
69
+ break;
70
+ }
71
+
72
+ case $type->isLibrary(): {
73
+ $this->xmlWriter->writeAttribute('type', 'library');
74
+ break;
75
+ }
76
+
77
+ case $type->isExtension(): {
78
+ /* @var $type Extension */
79
+ $this->xmlWriter->writeAttribute('type', 'extension');
80
+ $this->addExtension($type->getApplicationName(), $type->getVersionConstraint());
81
+ break;
82
+ }
83
+
84
+ default: {
85
+ $this->xmlWriter->writeAttribute('type', 'custom');
86
+ }
87
+ }
88
+
89
+ $this->xmlWriter->endElement();
90
+ }
91
+
92
+ private function addCopyright(CopyrightInformation $copyrightInformation) {
93
+ $this->xmlWriter->startElement('copyright');
94
+
95
+ foreach($copyrightInformation->getAuthors() as $author) {
96
+ $this->xmlWriter->startElement('author');
97
+ $this->xmlWriter->writeAttribute('name', $author->getName());
98
+ $this->xmlWriter->writeAttribute('email', (string) $author->getEmail());
99
+ $this->xmlWriter->endElement();
100
+ }
101
+
102
+ $license = $copyrightInformation->getLicense();
103
+
104
+ $this->xmlWriter->startElement('license');
105
+ $this->xmlWriter->writeAttribute('type', $license->getName());
106
+ $this->xmlWriter->writeAttribute('url', $license->getUrl());
107
+ $this->xmlWriter->endElement();
108
+
109
+ $this->xmlWriter->endElement();
110
+ }
111
+
112
+ private function addRequirements(RequirementCollection $requirementCollection) {
113
+ $phpRequirement = new AnyVersionConstraint();
114
+ $extensions = [];
115
+
116
+ foreach($requirementCollection as $requirement) {
117
+ if ($requirement instanceof PhpVersionRequirement) {
118
+ $phpRequirement = $requirement->getVersionConstraint();
119
+ continue;
120
+ }
121
+
122
+ if ($requirement instanceof PhpExtensionRequirement) {
123
+ $extensions[] = (string) $requirement;
124
+ }
125
+ }
126
+
127
+ $this->xmlWriter->startElement('requires');
128
+ $this->xmlWriter->startElement('php');
129
+ $this->xmlWriter->writeAttribute('version', $phpRequirement->asString());
130
+
131
+ foreach($extensions as $extension) {
132
+ $this->xmlWriter->startElement('ext');
133
+ $this->xmlWriter->writeAttribute('name', $extension);
134
+ $this->xmlWriter->endElement();
135
+ }
136
+
137
+ $this->xmlWriter->endElement();
138
+ $this->xmlWriter->endElement();
139
+ }
140
+
141
+ private function addBundles(BundledComponentCollection $bundledComponentCollection) {
142
+ if (count($bundledComponentCollection) === 0) {
143
+ return;
144
+ }
145
+ $this->xmlWriter->startElement('bundles');
146
+
147
+ foreach($bundledComponentCollection as $bundledComponent) {
148
+ $this->xmlWriter->startElement('component');
149
+ $this->xmlWriter->writeAttribute('name', $bundledComponent->getName());
150
+ $this->xmlWriter->writeAttribute('version', $bundledComponent->getVersion()->getVersionString());
151
+ $this->xmlWriter->endElement();
152
+ }
153
+
154
+ $this->xmlWriter->endElement();
155
+ }
156
+
157
+ private function addExtension($application, VersionConstraint $versionConstraint) {
158
+ $this->xmlWriter->startElement('extension');
159
+ $this->xmlWriter->writeAttribute('for', $application);
160
+ $this->xmlWriter->writeAttribute('compatible', $versionConstraint->asString());
161
+ $this->xmlWriter->endElement();
162
+ }
163
+ }
vendor/phar-io/manifest/src/exceptions/Exception.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ interface Exception {
14
+ }
vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class InvalidApplicationNameException extends \InvalidArgumentException implements Exception {
14
+ const NotAString = 1;
15
+ const InvalidFormat = 2;
16
+ }
vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class InvalidEmailException extends \InvalidArgumentException implements Exception {
14
+ }
vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class InvalidUrlException extends \InvalidArgumentException implements Exception {
14
+ }
vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ManifestDocumentException extends \RuntimeException implements Exception {
6
+ }
vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ManifestDocumentMapperException extends \RuntimeException implements Exception {
6
+ }
vendor/phar-io/manifest/src/exceptions/ManifestElementException.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ManifestElementException extends \RuntimeException implements Exception {
6
+ }
vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ManifestLoaderException extends \Exception implements Exception {
6
+ }
vendor/phar-io/manifest/src/values/Application.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class Application extends Type {
14
+ /**
15
+ * @return bool
16
+ */
17
+ public function isApplication() {
18
+ return true;
19
+ }
20
+ }
vendor/phar-io/manifest/src/values/ApplicationName.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ApplicationName {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $name;
18
+
19
+ /**
20
+ * ApplicationName constructor.
21
+ *
22
+ * @param string $name
23
+ *
24
+ * @throws InvalidApplicationNameException
25
+ */
26
+ public function __construct($name) {
27
+ $this->ensureIsString($name);
28
+ $this->ensureValidFormat($name);
29
+ $this->name = $name;
30
+ }
31
+
32
+ /**
33
+ * @return string
34
+ */
35
+ public function __toString() {
36
+ return $this->name;
37
+ }
38
+
39
+ public function isEqual(ApplicationName $name) {
40
+ return $this->name === $name->name;
41
+ }
42
+
43
+ /**
44
+ * @param string $name
45
+ *
46
+ * @throws InvalidApplicationNameException
47
+ */
48
+ private function ensureValidFormat($name) {
49
+ if (!preg_match('#\w/\w#', $name)) {
50
+ throw new InvalidApplicationNameException(
51
+ sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name),
52
+ InvalidApplicationNameException::InvalidFormat
53
+ );
54
+ }
55
+ }
56
+
57
+ private function ensureIsString($name) {
58
+ if (!is_string($name)) {
59
+ throw new InvalidApplicationNameException(
60
+ 'Name must be a string',
61
+ InvalidApplicationNameException::NotAString
62
+ );
63
+ }
64
+ }
65
+ }
vendor/phar-io/manifest/src/values/Author.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class Author {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $name;
18
+
19
+ /**
20
+ * @var Email
21
+ */
22
+ private $email;
23
+
24
+ /**
25
+ * @param string $name
26
+ * @param Email $email
27
+ */
28
+ public function __construct($name, Email $email) {
29
+ $this->name = $name;
30
+ $this->email = $email;
31
+ }
32
+
33
+ /**
34
+ * @return string
35
+ */
36
+ public function getName() {
37
+ return $this->name;
38
+ }
39
+
40
+ /**
41
+ * @return Email
42
+ */
43
+ public function getEmail() {
44
+ return $this->email;
45
+ }
46
+
47
+ /**
48
+ * @return string
49
+ */
50
+ public function __toString() {
51
+ return sprintf(
52
+ '%s <%s>',
53
+ $this->name,
54
+ $this->email
55
+ );
56
+ }
57
+ }
vendor/phar-io/manifest/src/values/AuthorCollection.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class AuthorCollection implements \Countable, \IteratorAggregate {
14
+ /**
15
+ * @var Author[]
16
+ */
17
+ private $authors = [];
18
+
19
+ public function add(Author $author) {
20
+ $this->authors[] = $author;
21
+ }
22
+
23
+ /**
24
+ * @return Author[]
25
+ */
26
+ public function getAuthors() {
27
+ return $this->authors;
28
+ }
29
+
30
+ /**
31
+ * @return int
32
+ */
33
+ public function count() {
34
+ return count($this->authors);
35
+ }
36
+
37
+ /**
38
+ * @return AuthorCollectionIterator
39
+ */
40
+ public function getIterator() {
41
+ return new AuthorCollectionIterator($this);
42
+ }
43
+ }
vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class AuthorCollectionIterator implements \Iterator {
14
+ /**
15
+ * @var Author[]
16
+ */
17
+ private $authors = [];
18
+
19
+ /**
20
+ * @var int
21
+ */
22
+ private $position;
23
+
24
+ public function __construct(AuthorCollection $authors) {
25
+ $this->authors = $authors->getAuthors();
26
+ }
27
+
28
+ public function rewind() {
29
+ $this->position = 0;
30
+ }
31
+
32
+ /**
33
+ * @return bool
34
+ */
35
+ public function valid() {
36
+ return $this->position < count($this->authors);
37
+ }
38
+
39
+ /**
40
+ * @return int
41
+ */
42
+ public function key() {
43
+ return $this->position;
44
+ }
45
+
46
+ /**
47
+ * @return Author
48
+ */
49
+ public function current() {
50
+ return $this->authors[$this->position];
51
+ }
52
+
53
+ public function next() {
54
+ $this->position++;
55
+ }
56
+ }
vendor/phar-io/manifest/src/values/BundledComponent.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+
15
+ class BundledComponent {
16
+ /**
17
+ * @var string
18
+ */
19
+ private $name;
20
+
21
+ /**
22
+ * @var Version
23
+ */
24
+ private $version;
25
+
26
+ /**
27
+ * @param string $name
28
+ * @param Version $version
29
+ */
30
+ public function __construct($name, Version $version) {
31
+ $this->name = $name;
32
+ $this->version = $version;
33
+ }
34
+
35
+ /**
36
+ * @return string
37
+ */
38
+ public function getName() {
39
+ return $this->name;
40
+ }
41
+
42
+ /**
43
+ * @return Version
44
+ */
45
+ public function getVersion() {
46
+ return $this->version;
47
+ }
48
+ }
vendor/phar-io/manifest/src/values/BundledComponentCollection.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class BundledComponentCollection implements \Countable, \IteratorAggregate {
14
+ /**
15
+ * @var BundledComponent[]
16
+ */
17
+ private $bundledComponents = [];
18
+
19
+ public function add(BundledComponent $bundledComponent) {
20
+ $this->bundledComponents[] = $bundledComponent;
21
+ }
22
+
23
+ /**
24
+ * @return BundledComponent[]
25
+ */
26
+ public function getBundledComponents() {
27
+ return $this->bundledComponents;
28
+ }
29
+
30
+ /**
31
+ * @return int
32
+ */
33
+ public function count() {
34
+ return count($this->bundledComponents);
35
+ }
36
+
37
+ /**
38
+ * @return BundledComponentCollectionIterator
39
+ */
40
+ public function getIterator() {
41
+ return new BundledComponentCollectionIterator($this);
42
+ }
43
+ }
vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class BundledComponentCollectionIterator implements \Iterator {
14
+ /**
15
+ * @var BundledComponent[]
16
+ */
17
+ private $bundledComponents = [];
18
+
19
+ /**
20
+ * @var int
21
+ */
22
+ private $position;
23
+
24
+ public function __construct(BundledComponentCollection $bundledComponents) {
25
+ $this->bundledComponents = $bundledComponents->getBundledComponents();
26
+ }
27
+
28
+ public function rewind() {
29
+ $this->position = 0;
30
+ }
31
+
32
+ /**
33
+ * @return bool
34
+ */
35
+ public function valid() {
36
+ return $this->position < count($this->bundledComponents);
37
+ }
38
+
39
+ /**
40
+ * @return int
41
+ */
42
+ public function key() {
43
+ return $this->position;
44
+ }
45
+
46
+ /**
47
+ * @return BundledComponent
48
+ */
49
+ public function current() {
50
+ return $this->bundledComponents[$this->position];
51
+ }
52
+
53
+ public function next() {
54
+ $this->position++;
55
+ }
56
+ }
vendor/phar-io/manifest/src/values/CopyrightInformation.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class CopyrightInformation {
14
+ /**
15
+ * @var AuthorCollection
16
+ */
17
+ private $authors;
18
+
19
+ /**
20
+ * @var License
21
+ */
22
+ private $license;
23
+
24
+ public function __construct(AuthorCollection $authors, License $license) {
25
+ $this->authors = $authors;
26
+ $this->license = $license;
27
+ }
28
+
29
+ /**
30
+ * @return AuthorCollection
31
+ */
32
+ public function getAuthors() {
33
+ return $this->authors;
34
+ }
35
+
36
+ /**
37
+ * @return License
38
+ */
39
+ public function getLicense() {
40
+ return $this->license;
41
+ }
42
+ }
vendor/phar-io/manifest/src/values/Email.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class Email {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $email;
18
+
19
+ /**
20
+ * @param string $email
21
+ *
22
+ * @throws InvalidEmailException
23
+ */
24
+ public function __construct($email) {
25
+ $this->ensureEmailIsValid($email);
26
+
27
+ $this->email = $email;
28
+ }
29
+
30
+ /**
31
+ * @return string
32
+ */
33
+ public function __toString() {
34
+ return $this->email;
35
+ }
36
+
37
+ /**
38
+ * @param string $url
39
+ *
40
+ * @throws InvalidEmailException
41
+ */
42
+ private function ensureEmailIsValid($url) {
43
+ if (filter_var($url, \FILTER_VALIDATE_EMAIL) === false) {
44
+ throw new InvalidEmailException;
45
+ }
46
+ }
47
+ }
vendor/phar-io/manifest/src/values/Extension.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+ use PharIo\Version\VersionConstraint;
15
+
16
+ class Extension extends Type {
17
+ /**
18
+ * @var ApplicationName
19
+ */
20
+ private $application;
21
+
22
+ /**
23
+ * @var VersionConstraint
24
+ */
25
+ private $versionConstraint;
26
+
27
+ /**
28
+ * @param ApplicationName $application
29
+ * @param VersionConstraint $versionConstraint
30
+ */
31
+ public function __construct(ApplicationName $application, VersionConstraint $versionConstraint) {
32
+ $this->application = $application;
33
+ $this->versionConstraint = $versionConstraint;
34
+ }
35
+
36
+ /**
37
+ * @return ApplicationName
38
+ */
39
+ public function getApplicationName() {
40
+ return $this->application;
41
+ }
42
+
43
+ /**
44
+ * @return VersionConstraint
45
+ */
46
+ public function getVersionConstraint() {
47
+ return $this->versionConstraint;
48
+ }
49
+
50
+ /**
51
+ * @return bool
52
+ */
53
+ public function isExtension() {
54
+ return true;
55
+ }
56
+
57
+ /**
58
+ * @param ApplicationName $name
59
+ *
60
+ * @return bool
61
+ */
62
+ public function isExtensionFor(ApplicationName $name) {
63
+ return $this->application->isEqual($name);
64
+ }
65
+
66
+ /**
67
+ * @param ApplicationName $name
68
+ * @param Version $version
69
+ *
70
+ * @return bool
71
+ */
72
+ public function isCompatibleWith(ApplicationName $name, Version $version) {
73
+ return $this->isExtensionFor($name) && $this->versionConstraint->complies($version);
74
+ }
75
+ }
vendor/phar-io/manifest/src/values/Library.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class Library extends Type {
14
+ /**
15
+ * @return bool
16
+ */
17
+ public function isLibrary() {
18
+ return true;
19
+ }
20
+ }
vendor/phar-io/manifest/src/values/License.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class License {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $name;
18
+
19
+ /**
20
+ * @var Url
21
+ */
22
+ private $url;
23
+
24
+ public function __construct($name, Url $url) {
25
+ $this->name = $name;
26
+ $this->url = $url;
27
+ }
28
+
29
+ /**
30
+ * @return string
31
+ */
32
+ public function getName() {
33
+ return $this->name;
34
+ }
35
+
36
+ /**
37
+ * @return Url
38
+ */
39
+ public function getUrl() {
40
+ return $this->url;
41
+ }
42
+ }
vendor/phar-io/manifest/src/values/Manifest.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+
15
+ class Manifest {
16
+ /**
17
+ * @var ApplicationName
18
+ */
19
+ private $name;
20
+
21
+ /**
22
+ * @var Version
23
+ */
24
+ private $version;
25
+
26
+ /**
27
+ * @var Type
28
+ */
29
+ private $type;
30
+
31
+ /**
32
+ * @var CopyrightInformation
33
+ */
34
+ private $copyrightInformation;
35
+
36
+ /**
37
+ * @var RequirementCollection
38
+ */
39
+ private $requirements;
40
+
41
+ /**
42
+ * @var BundledComponentCollection
43
+ */
44
+ private $bundledComponents;
45
+
46
+ public function __construct(ApplicationName $name, Version $version, Type $type, CopyrightInformation $copyrightInformation, RequirementCollection $requirements, BundledComponentCollection $bundledComponents) {
47
+ $this->name = $name;
48
+ $this->version = $version;
49
+ $this->type = $type;
50
+ $this->copyrightInformation = $copyrightInformation;
51
+ $this->requirements = $requirements;
52
+ $this->bundledComponents = $bundledComponents;
53
+ }
54
+
55
+ /**
56
+ * @return ApplicationName
57
+ */
58
+ public function getName() {
59
+ return $this->name;
60
+ }
61
+
62
+ /**
63
+ * @return Version
64
+ */
65
+ public function getVersion() {
66
+ return $this->version;
67
+ }
68
+
69
+ /**
70
+ * @return Type
71
+ */
72
+ public function getType() {
73
+ return $this->type;
74
+ }
75
+
76
+ /**
77
+ * @return CopyrightInformation
78
+ */
79
+ public function getCopyrightInformation() {
80
+ return $this->copyrightInformation;
81
+ }
82
+
83
+ /**
84
+ * @return RequirementCollection
85
+ */
86
+ public function getRequirements() {
87
+ return $this->requirements;
88
+ }
89
+
90
+ /**
91
+ * @return BundledComponentCollection
92
+ */
93
+ public function getBundledComponents() {
94
+ return $this->bundledComponents;
95
+ }
96
+
97
+ /**
98
+ * @return bool
99
+ */
100
+ public function isApplication() {
101
+ return $this->type->isApplication();
102
+ }
103
+
104
+ /**
105
+ * @return bool
106
+ */
107
+ public function isLibrary() {
108
+ return $this->type->isLibrary();
109
+ }
110
+
111
+ /**
112
+ * @return bool
113
+ */
114
+ public function isExtension() {
115
+ return $this->type->isExtension();
116
+ }
117
+
118
+ /**
119
+ * @param ApplicationName $application
120
+ * @param Version|null $version
121
+ *
122
+ * @return bool
123
+ */
124
+ public function isExtensionFor(ApplicationName $application, Version $version = null) {
125
+ if (!$this->isExtension()) {
126
+ return false;
127
+ }
128
+
129
+ /** @var Extension $type */
130
+ $type = $this->type;
131
+
132
+ if ($version !== null) {
133
+ return $type->isCompatibleWith($application, $version);
134
+ }
135
+
136
+ return $type->isExtensionFor($application);
137
+ }
138
+ }
vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class PhpExtensionRequirement implements Requirement {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $extension;
18
+
19
+ /**
20
+ * @param string $extension
21
+ */
22
+ public function __construct($extension) {
23
+ $this->extension = $extension;
24
+ }
25
+
26
+ /**
27
+ * @return string
28
+ */
29
+ public function __toString() {
30
+ return $this->extension;
31
+ }
32
+ }
vendor/phar-io/manifest/src/values/PhpVersionRequirement.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\VersionConstraint;
14
+
15
+ class PhpVersionRequirement implements Requirement {
16
+ /**
17
+ * @var VersionConstraint
18
+ */
19
+ private $versionConstraint;
20
+
21
+ public function __construct(VersionConstraint $versionConstraint) {
22
+ $this->versionConstraint = $versionConstraint;
23
+ }
24
+
25
+ /**
26
+ * @return VersionConstraint
27
+ */
28
+ public function getVersionConstraint() {
29
+ return $this->versionConstraint;
30
+ }
31
+ }
vendor/phar-io/manifest/src/values/Requirement.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ interface Requirement {
14
+ }
vendor/phar-io/manifest/src/values/RequirementCollection.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class RequirementCollection implements \Countable, \IteratorAggregate {
14
+ /**
15
+ * @var Requirement[]
16
+ */
17
+ private $requirements = [];
18
+
19
+ public function add(Requirement $requirement) {
20
+ $this->requirements[] = $requirement;
21
+ }
22
+
23
+ /**
24
+ * @return Requirement[]
25
+ */
26
+ public function getRequirements() {
27
+ return $this->requirements;
28
+ }
29
+
30
+ /**
31
+ * @return int
32
+ */
33
+ public function count() {
34
+ return count($this->requirements);
35
+ }
36
+
37
+ /**
38
+ * @return RequirementCollectionIterator
39
+ */
40
+ public function getIterator() {
41
+ return new RequirementCollectionIterator($this);
42
+ }
43
+ }
vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class RequirementCollectionIterator implements \Iterator {
14
+ /**
15
+ * @var Requirement[]
16
+ */
17
+ private $requirements = [];
18
+
19
+ /**
20
+ * @var int
21
+ */
22
+ private $position;
23
+
24
+ public function __construct(RequirementCollection $requirements) {
25
+ $this->requirements = $requirements->getRequirements();
26
+ }
27
+
28
+ public function rewind() {
29
+ $this->position = 0;
30
+ }
31
+
32
+ /**
33
+ * @return bool
34
+ */
35
+ public function valid() {
36
+ return $this->position < count($this->requirements);
37
+ }
38
+
39
+ /**
40
+ * @return int
41
+ */
42
+ public function key() {
43
+ return $this->position;
44
+ }
45
+
46
+ /**
47
+ * @return Requirement
48
+ */
49
+ public function current() {
50
+ return $this->requirements[$this->position];
51
+ }
52
+
53
+ public function next() {
54
+ $this->position++;
55
+ }
56
+ }
vendor/phar-io/manifest/src/values/Type.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\VersionConstraint;
14
+
15
+ abstract class Type {
16
+ /**
17
+ * @return Application
18
+ */
19
+ public static function application() {
20
+ return new Application;
21
+ }
22
+
23
+ /**
24
+ * @return Library
25
+ */
26
+ public static function library() {
27
+ return new Library;
28
+ }
29
+
30
+ /**
31
+ * @param ApplicationName $application
32
+ * @param VersionConstraint $versionConstraint
33
+ *
34
+ * @return Extension
35
+ */
36
+ public static function extension(ApplicationName $application, VersionConstraint $versionConstraint) {
37
+ return new Extension($application, $versionConstraint);
38
+ }
39
+
40
+ /**
41
+ * @return bool
42
+ */
43
+ public function isApplication() {
44
+ return false;
45
+ }
46
+
47
+ /**
48
+ * @return bool
49
+ */
50
+ public function isLibrary() {
51
+ return false;
52
+ }
53
+
54
+ /**
55
+ * @return bool
56
+ */
57
+ public function isExtension() {
58
+ return false;
59
+ }
60
+ }
vendor/phar-io/manifest/src/values/Url.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class Url {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $url;
18
+
19
+ /**
20
+ * @param string $url
21
+ *
22
+ * @throws InvalidUrlException
23
+ */
24
+ public function __construct($url) {
25
+ $this->ensureUrlIsValid($url);
26
+
27
+ $this->url = $url;
28
+ }
29
+
30
+ /**
31
+ * @return string
32
+ */
33
+ public function __toString() {
34
+ return $this->url;
35
+ }
36
+
37
+ /**
38
+ * @param string $url
39
+ *
40
+ * @throws InvalidUrlException
41
+ */
42
+ private function ensureUrlIsValid($url) {
43
+ if (filter_var($url, \FILTER_VALIDATE_URL) === false) {
44
+ throw new InvalidUrlException;
45
+ }
46
+ }
47
+ }
vendor/phar-io/manifest/src/xml/AuthorElement.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class AuthorElement extends ManifestElement {
14
+ public function getName() {
15
+ return $this->getAttributeValue('name');
16
+ }
17
+
18
+ public function getEmail() {
19
+ return $this->getAttributeValue('email');
20
+ }
21
+ }
vendor/phar-io/manifest/src/xml/AuthorElementCollection.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class AuthorElementCollection extends ElementCollection {
14
+ public function current() {
15
+ return new AuthorElement(
16
+ $this->getCurrentElement()
17
+ );
18
+ }
19
+ }
vendor/phar-io/manifest/src/xml/BundlesElement.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class BundlesElement extends ManifestElement {
14
+ public function getComponentElements() {
15
+ return new ComponentElementCollection(
16
+ $this->getChildrenByName('component')
17
+ );
18
+ }
19
+ }
vendor/phar-io/manifest/src/xml/ComponentElement.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ComponentElement extends ManifestElement {
14
+ public function getName() {
15
+ return $this->getAttributeValue('name');
16
+ }
17
+
18
+ public function getVersion() {
19
+ return $this->getAttributeValue('version');
20
+ }
21
+ }
vendor/phar-io/manifest/src/xml/ComponentElementCollection.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ComponentElementCollection extends ElementCollection {
14
+ public function current() {
15
+ return new ComponentElement(
16
+ $this->getCurrentElement()
17
+ );
18
+ }
19
+ }
vendor/phar-io/manifest/src/xml/ContainsElement.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ContainsElement extends ManifestElement {
14
+ public function getName() {
15
+ return $this->getAttributeValue('name');
16
+ }
17
+
18
+ public function getVersion() {
19
+ return $this->getAttributeValue('version');
20
+ }
21
+
22
+ public function getType() {
23
+ return $this->getAttributeValue('type');
24
+ }
25
+
26
+ public function getExtensionElement() {
27
+ return new ExtensionElement(
28
+ $this->getChildByName('extension')
29
+ );
30
+ }
31
+ }
vendor/phar-io/manifest/src/xml/CopyrightElement.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class CopyrightElement extends ManifestElement {
14
+ public function getAuthorElements() {
15
+ return new AuthorElementCollection(
16
+ $this->getChildrenByName('author')
17
+ );
18
+ }
19
+
20
+ public function getLicenseElement() {
21
+ return new LicenseElement(
22
+ $this->getChildByName('license')
23
+ );
24
+ }
25
+ }
vendor/phar-io/manifest/src/xml/ElementCollection.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use DOMElement;
14
+ use DOMNodeList;
15
+
16
+ abstract class ElementCollection implements \Iterator {
17
+ /**
18
+ * @var DOMNodeList
19
+ */
20
+ private $nodeList;
21
+
22
+ private $position;
23
+
24
+ /**
25
+ * ElementCollection constructor.
26
+ *
27
+ * @param DOMNodeList $nodeList
28
+ */
29
+ public function __construct(DOMNodeList $nodeList) {
30
+ $this->nodeList = $nodeList;
31
+ $this->position = 0;
32
+ }
33
+
34
+ abstract public function current();
35
+
36
+ /**
37
+ * @return DOMElement
38
+ */
39
+ protected function getCurrentElement() {
40
+ return $this->nodeList->item($this->position);
41
+ }
42
+
43
+ public function next() {
44
+ $this->position++;
45
+ }
46
+
47
+ public function key() {
48
+ return $this->position;
49
+ }
50
+
51
+ public function valid() {
52
+ return $this->position < $this->nodeList->length;
53
+ }
54
+
55
+ public function rewind() {
56
+ $this->position = 0;
57
+ }
58
+ }
vendor/phar-io/manifest/src/xml/ExtElement.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ExtElement extends ManifestElement {
14
+ public function getName() {
15
+ return $this->getAttributeValue('name');
16
+ }
17
+ }
vendor/phar-io/manifest/src/xml/ExtElementCollection.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ExtElementCollection extends ElementCollection {
14
+ public function current() {
15
+ return new ExtElement(
16
+ $this->getCurrentElement()
17
+ );
18
+ }
19
+
20
+ }
vendor/phar-io/manifest/src/xml/ExtensionElement.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class ExtensionElement extends ManifestElement {
14
+ public function getFor() {
15
+ return $this->getAttributeValue('for');
16
+ }
17
+
18
+ public function getCompatible() {
19
+ return $this->getAttributeValue('compatible');
20
+ }
21
+ }
vendor/phar-io/manifest/src/xml/LicenseElement.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class LicenseElement extends ManifestElement {
14
+ public function getType() {
15
+ return $this->getAttributeValue('type');
16
+ }
17
+
18
+ public function getUrl() {
19
+ return $this->getAttributeValue('url');
20
+ }
21
+ }
vendor/phar-io/manifest/src/xml/ManifestDocument.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use DOMDocument;
14
+ use DOMElement;
15
+
16
+ class ManifestDocument {
17
+ const XMLNS = 'https://phar.io/xml/manifest/1.0';
18
+
19
+ /**
20
+ * @var DOMDocument
21
+ */
22
+ private $dom;
23
+
24
+ /**
25
+ * ManifestDocument constructor.
26
+ *
27
+ * @param DOMDocument $dom
28
+ */
29
+ private function __construct(DOMDocument $dom) {
30
+ $this->ensureCorrectDocumentType($dom);
31
+
32
+ $this->dom = $dom;
33
+ }
34
+
35
+ public static function fromFile($filename) {
36
+ if (!file_exists($filename)) {
37
+ throw new ManifestDocumentException(
38
+ sprintf('File "%s" not found', $filename)
39
+ );
40
+ }
41
+
42
+ return self::fromString(
43
+ file_get_contents($filename)
44
+ );
45
+ }
46
+
47
+ public static function fromString($xmlString) {
48
+ $prev = libxml_use_internal_errors(true);
49
+ libxml_clear_errors();
50
+
51
+ $dom = new DOMDocument();
52
+ $dom->loadXML($xmlString);
53
+
54
+ $errors = libxml_get_errors();
55
+ libxml_use_internal_errors($prev);
56
+
57
+ if (count($errors) !== 0) {
58
+ throw new ManifestDocumentLoadingException($errors);
59
+ }
60
+
61
+ return new self($dom);
62
+ }
63
+
64
+ public function getContainsElement() {
65
+ return new ContainsElement(
66
+ $this->fetchElementByName('contains')
67
+ );
68
+ }
69
+
70
+ public function getCopyrightElement() {
71
+ return new CopyrightElement(
72
+ $this->fetchElementByName('copyright')
73
+ );
74
+ }
75
+
76
+ public function getRequiresElement() {
77
+ return new RequiresElement(
78
+ $this->fetchElementByName('requires')
79
+ );
80
+ }
81
+
82
+ public function hasBundlesElement() {
83
+ return $this->dom->getElementsByTagNameNS(self::XMLNS, 'bundles')->length === 1;
84
+ }
85
+
86
+ public function getBundlesElement() {
87
+ return new BundlesElement(
88
+ $this->fetchElementByName('bundles')
89
+ );
90
+ }
91
+
92
+ private function ensureCorrectDocumentType(DOMDocument $dom) {
93
+ $root = $dom->documentElement;
94
+
95
+ if ($root->localName !== 'phar' || $root->namespaceURI !== self::XMLNS) {
96
+ throw new ManifestDocumentException('Not a phar.io manifest document');
97
+ }
98
+ }
99
+
100
+ /**
101
+ * @param $elementName
102
+ *
103
+ * @return DOMElement
104
+ *
105
+ * @throws ManifestDocumentException
106
+ */
107
+ private function fetchElementByName($elementName) {
108
+ $element = $this->dom->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0);
109
+
110
+ if (!$element instanceof DOMElement) {
111
+ throw new ManifestDocumentException(
112
+ sprintf('Element %s missing', $elementName)
113
+ );
114
+ }
115
+
116
+ return $element;
117
+ }
118
+ }
vendor/phar-io/manifest/src/xml/ManifestDocumentLoadingException.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use LibXMLError;
14
+
15
+ class ManifestDocumentLoadingException extends \Exception implements Exception {
16
+ /**
17
+ * @var LibXMLError[]
18
+ */
19
+ private $libxmlErrors;
20
+
21
+ /**
22
+ * ManifestDocumentLoadingException constructor.
23
+ *
24
+ * @param LibXMLError[] $libxmlErrors
25
+ */
26
+ public function __construct(array $libxmlErrors) {
27
+ $this->libxmlErrors = $libxmlErrors;
28
+ $first = $this->libxmlErrors[0];
29
+
30
+ parent::__construct(
31
+ sprintf(
32
+ '%s (Line: %d / Column: %d / File: %s)',
33
+ $first->message,
34
+ $first->line,
35
+ $first->column,
36
+ $first->file
37
+ ),
38
+ $first->code
39
+ );
40
+ }
41
+
42
+ /**
43
+ * @return LibXMLError[]
44
+ */
45
+ public function getLibxmlErrors() {
46
+ return $this->libxmlErrors;
47
+ }
48
+ }
vendor/phar-io/manifest/src/xml/ManifestElement.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use DOMElement;
14
+ use DOMNodeList;
15
+
16
+ class ManifestElement {
17
+ const XMLNS = 'https://phar.io/xml/manifest/1.0';
18
+
19
+ /**
20
+ * @var DOMElement
21
+ */
22
+ private $element;
23
+
24
+ /**
25
+ * ContainsElement constructor.
26
+ *
27
+ * @param DOMElement $element
28
+ */
29
+ public function __construct(DOMElement $element) {
30
+ $this->element = $element;
31
+ }
32
+
33
+ /**
34
+ * @param string $name
35
+ *
36
+ * @return string
37
+ *
38
+ * @throws ManifestElementException
39
+ */
40
+ protected function getAttributeValue($name) {
41
+ if (!$this->element->hasAttribute($name)) {
42
+ throw new ManifestElementException(
43
+ sprintf(
44
+ 'Attribute %s not set on element %s',
45
+ $name,
46
+ $this->element->localName
47
+ )
48
+ );
49
+ }
50
+
51
+ return $this->element->getAttribute($name);
52
+ }
53
+
54
+ /**
55
+ * @param $elementName
56
+ *
57
+ * @return DOMElement
58
+ *
59
+ * @throws ManifestElementException
60
+ */
61
+ protected function getChildByName($elementName) {
62
+ $element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0);
63
+
64
+ if (!$element instanceof DOMElement) {
65
+ throw new ManifestElementException(
66
+ sprintf('Element %s missing', $elementName)
67
+ );
68
+ }
69
+
70
+ return $element;
71
+ }
72
+
73
+ /**
74
+ * @param $elementName
75
+ *
76
+ * @return DOMNodeList
77
+ *
78
+ * @throws ManifestElementException
79
+ */
80
+ protected function getChildrenByName($elementName) {
81
+ $elementList = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName);
82
+
83
+ if ($elementList->length === 0) {
84
+ throw new ManifestElementException(
85
+ sprintf('Element(s) %s missing', $elementName)
86
+ );
87
+ }
88
+
89
+ return $elementList;
90
+ }
91
+
92
+ /**
93
+ * @param string $elementName
94
+ *
95
+ * @return bool
96
+ */
97
+ protected function hasChild($elementName) {
98
+ return $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->length !== 0;
99
+ }
100
+ }
vendor/phar-io/manifest/src/xml/PhpElement.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class PhpElement extends ManifestElement {
14
+ public function getVersion() {
15
+ return $this->getAttributeValue('version');
16
+ }
17
+
18
+ public function hasExtElements() {
19
+ return $this->hasChild('ext');
20
+ }
21
+
22
+ public function getExtElements() {
23
+ return new ExtElementCollection(
24
+ $this->getChildrenByName('ext')
25
+ );
26
+ }
27
+ }
vendor/phar-io/manifest/src/xml/RequiresElement.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ class RequiresElement extends ManifestElement {
14
+ public function getPHPElement() {
15
+ return new PhpElement(
16
+ $this->getChildByName('php')
17
+ );
18
+ }
19
+ }
vendor/phar-io/manifest/tests/ManifestDocumentMapperTest.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ /**
6
+ * @covers \PharIo\Manifest\ManifestDocumentMapper
7
+ *
8
+ * @uses \PharIo\Manifest\ApplicationName
9
+ * @uses \PharIo\Manifest\Author
10
+ * @uses \PharIo\Manifest\AuthorCollection
11
+ * @uses \PharIo\Manifest\AuthorCollectionIterator
12
+ * @uses \PharIo\Manifest\AuthorElement
13
+ * @uses \PharIo\Manifest\AuthorElementCollection
14
+ * @uses \PharIo\Manifest\BundledComponent
15
+ * @uses \PharIo\Manifest\BundledComponentCollection
16
+ * @uses \PharIo\Manifest\BundledComponentCollectionIterator
17
+ * @uses \PharIo\Manifest\BundlesElement
18
+ * @uses \PharIo\Manifest\ComponentElement
19
+ * @uses \PharIo\Manifest\ComponentElementCollection
20
+ * @uses \PharIo\Manifest\ContainsElement
21
+ * @uses \PharIo\Manifest\CopyrightElement
22
+ * @uses \PharIo\Manifest\CopyrightInformation
23
+ * @uses \PharIo\Manifest\ElementCollection
24
+ * @uses \PharIo\Manifest\Email
25
+ * @uses \PharIo\Manifest\ExtElement
26
+ * @uses \PharIo\Manifest\ExtElementCollection
27
+ * @uses \PharIo\Manifest\License
28
+ * @uses \PharIo\Manifest\LicenseElement
29
+ * @uses \PharIo\Manifest\Manifest
30
+ * @uses \PharIo\Manifest\ManifestDocument
31
+ * @uses \PharIo\Manifest\ManifestDocumentMapper
32
+ * @uses \PharIo\Manifest\ManifestElement
33
+ * @uses \PharIo\Manifest\ManifestLoader
34
+ * @uses \PharIo\Manifest\PhpElement
35
+ * @uses \PharIo\Manifest\PhpExtensionRequirement
36
+ * @uses \PharIo\Manifest\PhpVersionRequirement
37
+ * @uses \PharIo\Manifest\RequirementCollection
38
+ * @uses \PharIo\Manifest\RequirementCollectionIterator
39
+ * @uses \PharIo\Manifest\RequiresElement
40
+ * @uses \PharIo\Manifest\Type
41
+ * @uses \PharIo\Manifest\Url
42
+ * @uses \PharIo\Version\Version
43
+ * @uses \PharIo\Version\VersionConstraint
44
+ */
45
+ class ManifestDocumentMapperTest extends \PHPUnit_Framework_TestCase {
46
+ /**
47
+ * @dataProvider dataProvider
48
+ *
49
+ * @param $expected
50
+ *
51
+ * @uses \PharIo\Manifest\Application
52
+ * @uses \PharIo\Manifest\ApplicationName
53
+ * @uses \PharIo\Manifest\Library
54
+ * @uses \PharIo\Manifest\Extension
55
+ * @uses \PharIo\Manifest\ExtensionElement
56
+ */
57
+ public function testCanSerializeToString($expected) {
58
+ $manifestDocument = ManifestDocument::fromFile($expected);
59
+ $mapper = new ManifestDocumentMapper();
60
+
61
+ $this->assertInstanceOf(
62
+ Manifest::class,
63
+ $mapper->map($manifestDocument)
64
+ );
65
+ }
66
+
67
+ public function dataProvider() {
68
+ return [
69
+ 'application' => [__DIR__ . '/_fixture/phpunit-5.6.5.xml'],
70
+ 'library' => [__DIR__ . '/_fixture/library.xml'],
71
+ 'extension' => [__DIR__ . '/_fixture/extension.xml']
72
+ ];
73
+ }
74
+
75
+ public function testThrowsExceptionOnUnsupportedType() {
76
+ $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/custom.xml');
77
+ $mapper = new ManifestDocumentMapper();
78
+
79
+ $this->expectException(ManifestDocumentMapperException::class);
80
+ $mapper->map($manifestDocument);
81
+ }
82
+
83
+ public function testInvalidVersionInformationThrowsException() {
84
+ $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/invalidversion.xml');
85
+ $mapper = new ManifestDocumentMapper();
86
+
87
+ $this->expectException(ManifestDocumentMapperException::class);
88
+ $mapper->map($manifestDocument);
89
+ }
90
+
91
+ public function testInvalidVersionConstraintThrowsException() {
92
+ $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/invalidversionconstraint.xml');
93
+ $mapper = new ManifestDocumentMapper();
94
+
95
+ $this->expectException(ManifestDocumentMapperException::class);
96
+ $mapper->map($manifestDocument);
97
+ }
98
+
99
+ /**
100
+ * @uses \PharIo\Manifest\ExtensionElement
101
+ */
102
+ public function testInvalidCompatibleConstraintThrowsException() {
103
+ $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/extension-invalidcompatible.xml');
104
+ $mapper = new ManifestDocumentMapper();
105
+
106
+ $this->expectException(ManifestDocumentMapperException::class);
107
+ $mapper->map($manifestDocument);
108
+ }
109
+
110
+ }
vendor/phar-io/manifest/tests/ManifestLoaderTest.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ /**
6
+ * @covers \PharIo\Manifest\ManifestLoader
7
+ *
8
+ * @uses \PharIo\Manifest\Author
9
+ * @uses \PharIo\Manifest\AuthorCollection
10
+ * @uses \PharIo\Manifest\AuthorCollectionIterator
11
+ * @uses \PharIo\Manifest\AuthorElement
12
+ * @uses \PharIo\Manifest\AuthorElementCollection
13
+ * @uses \PharIo\Manifest\ApplicationName
14
+ * @uses \PharIo\Manifest\BundledComponent
15
+ * @uses \PharIo\Manifest\BundledComponentCollection
16
+ * @uses \PharIo\Manifest\BundledComponentCollectionIterator
17
+ * @uses \PharIo\Manifest\BundlesElement
18
+ * @uses \PharIo\Manifest\ComponentElement
19
+ * @uses \PharIo\Manifest\ComponentElementCollection
20
+ * @uses \PharIo\Manifest\ContainsElement
21
+ * @uses \PharIo\Manifest\CopyrightElement
22
+ * @uses \PharIo\Manifest\CopyrightInformation
23
+ * @uses \PharIo\Manifest\ElementCollection
24
+ * @uses \PharIo\Manifest\Email
25
+ * @uses \PharIo\Manifest\ExtElement
26
+ * @uses \PharIo\Manifest\ExtElementCollection
27
+ * @uses \PharIo\Manifest\License
28
+ * @uses \PharIo\Manifest\LicenseElement
29
+ * @uses \PharIo\Manifest\Manifest
30
+ * @uses \PharIo\Manifest\ManifestDocument
31
+ * @uses \PharIo\Manifest\ManifestDocumentMapper
32
+ * @uses \PharIo\Manifest\ManifestElement
33
+ * @uses \PharIo\Manifest\ManifestLoader
34
+ * @uses \PharIo\Manifest\PhpElement
35
+ * @uses \PharIo\Manifest\PhpExtensionRequirement
36
+ * @uses \PharIo\Manifest\PhpVersionRequirement
37
+ * @uses \PharIo\Manifest\RequirementCollection
38
+ * @uses \PharIo\Manifest\RequirementCollectionIterator
39
+ * @uses \PharIo\Manifest\RequiresElement
40
+ * @uses \PharIo\Manifest\Type
41
+ * @uses \PharIo\Manifest\Url
42
+ * @uses \PharIo\Version\Version
43
+ * @uses \PharIo\Version\VersionConstraint
44
+ */
45
+ class ManifestLoaderTest extends \PHPUnit_Framework_TestCase {
46
+ public function testCanBeLoadedFromFile() {
47
+ $this->assertInstanceOf(
48
+ Manifest::class,
49
+ ManifestLoader::fromFile(__DIR__ . '/_fixture/library.xml')
50
+ );
51
+ }
52
+
53
+ public function testCanBeLoadedFromString() {
54
+ $this->assertInstanceOf(
55
+ Manifest::class,
56
+ ManifestLoader::fromString(
57
+ file_get_contents(__DIR__ . '/_fixture/library.xml')
58
+ )
59
+ );
60
+ }
61
+
62
+ public function testCanBeLoadedFromPhar() {
63
+ $this->assertInstanceOf(
64
+ Manifest::class,
65
+ ManifestLoader::fromPhar(__DIR__ . '/_fixture/test.phar')
66
+ );
67
+
68
+ }
69
+
70
+ public function testLoadingNonExistingFileThrowsException() {
71
+ $this->expectException(ManifestLoaderException::class);
72
+ ManifestLoader::fromFile('/not/existing');
73
+ }
74
+
75
+ /**
76
+ * @uses \PharIo\Manifest\ManifestDocumentLoadingException
77
+ */
78
+ public function testLoadingInvalidXmlThrowsException() {
79
+ $this->expectException(ManifestLoaderException::class);
80
+ ManifestLoader::fromString('<?xml version="1.0" ?><broken>');
81
+ }
82
+
83
+ }
vendor/phar-io/manifest/tests/ManifestSerializerTest.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use PharIo\Version\Version;
6
+
7
+ /**
8
+ * @covers \PharIo\Manifest\ManifestSerializer
9
+ *
10
+ * @uses \PharIo\Manifest\ApplicationName
11
+ * @uses \PharIo\Manifest\Author
12
+ * @uses \PharIo\Manifest\AuthorCollection
13
+ * @uses \PharIo\Manifest\AuthorCollectionIterator
14
+ * @uses \PharIo\Manifest\AuthorElement
15
+ * @uses \PharIo\Manifest\AuthorElementCollection
16
+ * @uses \PharIo\Manifest\BundledComponent
17
+ * @uses \PharIo\Manifest\BundledComponentCollection
18
+ * @uses \PharIo\Manifest\BundledComponentCollectionIterator
19
+ * @uses \PharIo\Manifest\BundlesElement
20
+ * @uses \PharIo\Manifest\ComponentElement
21
+ * @uses \PharIo\Manifest\ComponentElementCollection
22
+ * @uses \PharIo\Manifest\ContainsElement
23
+ * @uses \PharIo\Manifest\CopyrightElement
24
+ * @uses \PharIo\Manifest\CopyrightInformation
25
+ * @uses \PharIo\Manifest\ElementCollection
26
+ * @uses \PharIo\Manifest\Email
27
+ * @uses \PharIo\Manifest\ExtElement
28
+ * @uses \PharIo\Manifest\ExtElementCollection
29
+ * @uses \PharIo\Manifest\License
30
+ * @uses \PharIo\Manifest\LicenseElement
31
+ * @uses \PharIo\Manifest\Manifest
32
+ * @uses \PharIo\Manifest\ManifestDocument
33
+ * @uses \PharIo\Manifest\ManifestDocumentMapper
34
+ * @uses \PharIo\Manifest\ManifestElement
35
+ * @uses \PharIo\Manifest\ManifestLoader
36
+ * @uses \PharIo\Manifest\PhpElement
37
+ * @uses \PharIo\Manifest\PhpExtensionRequirement
38
+ * @uses \PharIo\Manifest\PhpVersionRequirement
39
+ * @uses \PharIo\Manifest\RequirementCollection
40
+ * @uses \PharIo\Manifest\RequirementCollectionIterator
41
+ * @uses \PharIo\Manifest\RequiresElement
42
+ * @uses \PharIo\Manifest\Type
43
+ * @uses \PharIo\Manifest\Url
44
+ * @uses \PharIo\Version\Version
45
+ * @uses \PharIo\Version\VersionConstraint
46
+ */
47
+ class ManifestSerializerTest extends \PHPUnit_Framework_TestCase {
48
+ /**
49
+ * @dataProvider dataProvider
50
+ *
51
+ * @param $expected
52
+ *
53
+ * @uses \PharIo\Manifest\Application
54
+ * @uses \PharIo\Manifest\Library
55
+ * @uses \PharIo\Manifest\Extension
56
+ * @uses \PharIo\Manifest\ExtensionElement
57
+ */
58
+ public function testCanSerializeToString($expected) {
59
+ $manifest = ManifestLoader::fromString($expected);
60
+
61
+ $serializer = new ManifestSerializer();
62
+
63
+ $this->assertXmlStringEqualsXmlString(
64
+ $expected,
65
+ $serializer->serializeToString($manifest)
66
+ );
67
+ }
68
+
69
+ public function dataProvider() {
70
+ return [
71
+ 'application' => [file_get_contents(__DIR__ . '/_fixture/phpunit-5.6.5.xml')],
72
+ 'library' => [file_get_contents(__DIR__ . '/_fixture/library.xml')],
73
+ 'extension' => [file_get_contents(__DIR__ . '/_fixture/extension.xml')]
74
+ ];
75
+ }
76
+
77
+ /**
78
+ * @uses \PharIo\Manifest\Library
79
+ * @uses \PharIo\Manifest\ApplicationName
80
+ */
81
+ public function testCanSerializeToFile() {
82
+ $src = __DIR__ . '/_fixture/library.xml';
83
+ $dest = '/tmp/' . uniqid('serializer', true);
84
+ $manifest = ManifestLoader::fromFile($src);
85
+ $serializer = new ManifestSerializer();
86
+ $serializer->serializeToFile($manifest, $dest);
87
+ $this->assertXmlFileEqualsXmlFile($src, $dest);
88
+ unlink($dest);
89
+ }
90
+
91
+ /**
92
+ * @uses \PharIo\Manifest\ApplicationName
93
+ */
94
+ public function testCanHandleUnknownType() {
95
+ $type = $this->getMockForAbstractClass(Type::class);
96
+ $manifest = new Manifest(
97
+ new ApplicationName('testvendor/testname'),
98
+ new Version('1.0.0'),
99
+ $type,
100
+ new CopyrightInformation(
101
+ new AuthorCollection(),
102
+ new License('bsd-3', new Url('https://some/uri'))
103
+ ),
104
+ new RequirementCollection(),
105
+ new BundledComponentCollection()
106
+ );
107
+
108
+ $serializer = new ManifestSerializer();
109
+ $this->assertXmlStringEqualsXmlFile(
110
+ __DIR__ . '/_fixture/custom.xml',
111
+ $serializer->serializeToString($manifest)
112
+ );
113
+ }
114
+ }
vendor/phar-io/manifest/tests/_fixture/custom.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="testvendor/testname" version="1.0.0" type="custom"/>
4
+ <copyright>
5
+ <license type="bsd-3" url="https://some/uri"/>
6
+ </copyright>
7
+ <requires>
8
+ <php version="*"/>
9
+ </requires>
10
+ </phar>
vendor/phar-io/manifest/tests/_fixture/extension-invalidcompatible.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="phpunit/phpunit-example-extension" version="1.0.0" type="extension">
4
+ <extension for="phpunit/phpunit" compatible="invalid"/>
5
+ </contains>
6
+ <copyright>
7
+ <author name="Sebastian Bergmann" email="sebastian@phpunit.de"/>
8
+ <license type="BSD-3-Clause" url="https://github.com/sebastianbergmann/phpunit-example-extension/blob/master/LICENSE"/>
9
+ </copyright>
10
+ <requires>
11
+ <php version="^7.0"/>
12
+ </requires>
13
+ </phar>
vendor/phar-io/manifest/tests/_fixture/extension.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="phpunit/phpunit-example-extension" version="1.0.0" type="extension">
4
+ <extension for="phpunit/phpunit" compatible="^5.7"/>
5
+ </contains>
6
+ <copyright>
7
+ <author name="Sebastian Bergmann" email="sebastian@phpunit.de"/>
8
+ <license type="BSD-3-Clause" url="https://github.com/sebastianbergmann/phpunit-example-extension/blob/master/LICENSE"/>
9
+ </copyright>
10
+ <requires>
11
+ <php version="^7.0"/>
12
+ </requires>
13
+ </phar>
vendor/phar-io/manifest/tests/_fixture/invalidversion.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="some/library" version="abc" type="library" />
4
+ <copyright>
5
+ <author name="Reiner Zufall" email="reiner@zufall.de"/>
6
+ <license type="BSD-3-Clause" url="https://domain.tld/LICENSE"/>
7
+ </copyright>
8
+ <requires>
9
+ <php version="7.0"/>
10
+ </requires>
11
+ </phar>
vendor/phar-io/manifest/tests/_fixture/invalidversionconstraint.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="some/library" version="1.0.0" type="library" />
4
+ <copyright>
5
+ <author name="Reiner Zufall" email="reiner@zufall.de"/>
6
+ <license type="BSD-3-Clause" url="https://domain.tld/LICENSE"/>
7
+ </copyright>
8
+ <requires>
9
+ <php version="invalid"/>
10
+ </requires>
11
+ </phar>
vendor/phar-io/manifest/tests/_fixture/library.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="some/library" version="1.0.0" type="library" />
4
+ <copyright>
5
+ <author name="Reiner Zufall" email="reiner@zufall.de"/>
6
+ <license type="BSD-3-Clause" url="https://domain.tld/LICENSE"/>
7
+ </copyright>
8
+ <requires>
9
+ <php version="7.0"/>
10
+ </requires>
11
+ </phar>
vendor/phar-io/manifest/tests/_fixture/manifest.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="some/library" version="1.0.0" type="library" />
4
+ <copyright>
5
+ <author name="Reiner Zufall" email="reiner@zufall.de"/>
6
+ <license type="BSD-3-Clause" url="https://domain.tld/LICENSE"/>
7
+ </copyright>
8
+ <requires>
9
+ <php version="7.0"/>
10
+ </requires>
11
+ </phar>
vendor/phar-io/manifest/tests/_fixture/phpunit-5.6.5.xml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phar xmlns="https://phar.io/xml/manifest/1.0">
3
+ <contains name="phpunit/phpunit" version="5.6.5" type="application"/>
4
+ <copyright>
5
+ <author name="Sebastian Bergmann" email="sebastian@phpunit.de"/>
6
+ <license type="BSD-3-Clause" url="https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE"/>
7
+ </copyright>
8
+ <requires>
9
+ <!-- constraint on next line should be ^5.6 || ^7.0 -->
10
+ <php version="^7.0">
11
+ <ext name="dom"/>
12
+ <ext name="json"/>
13
+ <ext name="mbstring"/>
14
+ <ext name="xml"/>
15
+ <ext name="libxml"/>
16
+ </php>
17
+ </requires>
18
+ <bundles>
19
+ <component name="doctrine/instantiator" version="1.0.5"/>
20
+ <component name="myclabs/deep-copy" version="1.5.5"/>
21
+ <component name="phpdocumentor/reflection-common" version="1.0"/>
22
+ <component name="phpdocumentor/reflection-docblock" version="3.1.1"/>
23
+ <component name="phpdocumentor/type-resolver" version="0.2"/>
24
+ <component name="phpspec/prophecy" version="v1.6.2"/>
25
+ <component name="phpunit/dbunit" version="2.0.2"/>
26
+ <component name="phpunit/php-code-coverage" version="4.0.2"/>
27
+ <component name="phpunit/php-file-iterator" version="1.4.1"/>
28
+ <component name="phpunit/php-invoker" version="1.1.4"/>
29
+ <component name="phpunit/php-text-template" version="1.2.1"/>
30
+ <component name="phpunit/php-timer" version="1.0.8"/>
31
+ <component name="phpunit/php-token-stream" version="1.4.9"/>
32
+ <component name="phpunit/phpunit-mock-objects" version="3.4.1"/>
33
+ <component name="sebastian/code-unit-reverse-lookup" version="1.0.0"/>
34
+ <component name="sebastian/comparator" version="1.2.2"/>
35
+ <component name="sebastian/diff" version="1.4.1"/>
36
+ <component name="sebastian/environment" version="1.3.8"/>
37
+ <component name="sebastian/exporter" version="2.0.0"/>
38
+ <component name="sebastian/global-state" version="1.1.1"/>
39
+ <component name="sebastian/object-enumerator" version="2.0.0"/>
40
+ <component name="sebastian/recursion-context" version="2.0.0"/>
41
+ <component name="sebastian/resource-operations" version="1.0.0"/>
42
+ <component name="sebastian/version" version="2.0.0"/>
43
+ <component name="symfony/yaml" version="v3.1.7"/>
44
+ <component name="webmozart/assert" version="1.1.0"/>
45
+ </bundles>
46
+ </phar>
vendor/phar-io/manifest/tests/_fixture/test.phar ADDED
Binary file
vendor/phar-io/manifest/tests/exceptions/ManifestDocumentLoadingExceptionTest.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+ use LibXMLError;
7
+
8
+ class ManifestDocumentLoadingExceptionTest extends \PHPUnit_Framework_TestCase {
9
+ public function testXMLErrorsCanBeRetrieved() {
10
+ $dom = new DOMDocument();
11
+ $prev = libxml_use_internal_errors(true);
12
+ $dom->loadXML('<?xml version="1.0" ?><broken>');
13
+ $exception = new ManifestDocumentLoadingException(libxml_get_errors());
14
+ libxml_use_internal_errors($prev);
15
+
16
+ $this->assertContainsOnlyInstancesOf(LibXMLError::class, $exception->getLibxmlErrors());
17
+ }
18
+
19
+ }
vendor/phar-io/manifest/tests/values/ApplicationNameTest.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php declare(strict_types = 1);
2
+ namespace PharIo\Manifest;
3
+
4
+ use PHPUnit\Framework\TestCase;
5
+
6
+ class ApplicationNameTest extends TestCase {
7
+
8
+ public function testCanBeCreatedWithValidName() {
9
+ $this->assertInstanceOf(
10
+ ApplicationName::class,
11
+ new ApplicationName('foo/bar')
12
+ );
13
+ }
14
+
15
+ public function testUsingInvalidFormatForNameThrowsException() {
16
+ $this->expectException(InvalidApplicationNameException::class);
17
+ $this->expectExceptionCode(InvalidApplicationNameException::InvalidFormat);
18
+ new ApplicationName('foo');
19
+ }
20
+
21
+ public function testUsingWrongTypeForNameThrowsException() {
22
+ $this->expectException(InvalidApplicationNameException::class);
23
+ $this->expectExceptionCode(InvalidApplicationNameException::NotAString);
24
+ new ApplicationName(123);
25
+ }
26
+
27
+ public function testReturnsTrueForEqualNamesWhenCompared() {
28
+ $app = new ApplicationName('foo/bar');
29
+ $this->assertTrue(
30
+ $app->isEqual($app)
31
+ );
32
+ }
33
+
34
+ public function testReturnsFalseForNonEqualNamesWhenCompared() {
35
+ $app1 = new ApplicationName('foo/bar');
36
+ $app2 = new ApplicationName('foo/foo');
37
+ $this->assertFalse(
38
+ $app1->isEqual($app2)
39
+ );
40
+ }
41
+
42
+ public function testCanBeConvertedToString() {
43
+ $this->assertEquals(
44
+ 'foo/bar',
45
+ new ApplicationName('foo/bar')
46
+ );
47
+ }
48
+ }
vendor/phar-io/manifest/tests/values/ApplicationTest.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\Application
17
+ * @covers PharIo\Manifest\Type
18
+ */
19
+ class ApplicationTest extends TestCase {
20
+ /**
21
+ * @var Application
22
+ */
23
+ private $type;
24
+
25
+ protected function setUp() {
26
+ $this->type = Type::application();
27
+ }
28
+
29
+ public function testCanBeCreated() {
30
+ $this->assertInstanceOf(Application::class, $this->type);
31
+ }
32
+
33
+ public function testIsApplication() {
34
+ $this->assertTrue($this->type->isApplication());
35
+ }
36
+
37
+ public function testIsNotLibrary() {
38
+ $this->assertFalse($this->type->isLibrary());
39
+ }
40
+
41
+ public function testIsNotExtension() {
42
+ $this->assertFalse($this->type->isExtension());
43
+ }
44
+ }
vendor/phar-io/manifest/tests/values/AuthorCollectionTest.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers \PharIo\Manifest\AuthorCollection
17
+ * @covers \PharIo\Manifest\AuthorCollectionIterator
18
+ *
19
+ * @uses \PharIo\Manifest\Author
20
+ * @uses \PharIo\Manifest\Email
21
+ */
22
+ class AuthorCollectionTest extends TestCase {
23
+ /**
24
+ * @var AuthorCollection
25
+ */
26
+ private $collection;
27
+
28
+ /**
29
+ * @var Author
30
+ */
31
+ private $item;
32
+
33
+ protected function setUp() {
34
+ $this->collection = new AuthorCollection;
35
+ $this->item = new Author('Joe Developer', new Email('user@example.com'));
36
+ }
37
+
38
+ public function testCanBeCreated() {
39
+ $this->assertInstanceOf(AuthorCollection::class, $this->collection);
40
+ }
41
+
42
+ public function testCanBeCounted() {
43
+ $this->collection->add($this->item);
44
+
45
+ $this->assertCount(1, $this->collection);
46
+ }
47
+
48
+ public function testCanBeIterated() {
49
+ $this->collection->add(
50
+ new Author('Dummy First', new Email('dummy@example.com'))
51
+ );
52
+ $this->collection->add($this->item);
53
+ $this->assertContains($this->item, $this->collection);
54
+ }
55
+
56
+ public function testKeyPositionCanBeRetreived() {
57
+ $this->collection->add($this->item);
58
+ foreach($this->collection as $key => $item) {
59
+ $this->assertEquals(0, $key);
60
+ }
61
+ }
62
+ }
vendor/phar-io/manifest/tests/values/AuthorTest.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\Author
17
+ *
18
+ * @uses PharIo\Manifest\Email
19
+ */
20
+ class AuthorTest extends TestCase {
21
+ /**
22
+ * @var Author
23
+ */
24
+ private $author;
25
+
26
+ protected function setUp() {
27
+ $this->author = new Author('Joe Developer', new Email('user@example.com'));
28
+ }
29
+
30
+ public function testCanBeCreated() {
31
+ $this->assertInstanceOf(Author::class, $this->author);
32
+ }
33
+
34
+ public function testNameCanBeRetrieved() {
35
+ $this->assertEquals('Joe Developer', $this->author->getName());
36
+ }
37
+
38
+ public function testEmailCanBeRetrieved() {
39
+ $this->assertEquals('user@example.com', $this->author->getEmail());
40
+ }
41
+
42
+ public function testCanBeUsedAsString() {
43
+ $this->assertEquals('Joe Developer <user@example.com>', $this->author);
44
+ }
45
+ }
vendor/phar-io/manifest/tests/values/BundledComponentCollectionTest.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+ use PHPUnit\Framework\TestCase;
15
+
16
+ /**
17
+ * @covers \PharIo\Manifest\BundledComponentCollection
18
+ * @covers \PharIo\Manifest\BundledComponentCollectionIterator
19
+ *
20
+ * @uses \PharIo\Manifest\BundledComponent
21
+ * @uses \PharIo\Version\Version
22
+ */
23
+ class BundledComponentCollectionTest extends TestCase {
24
+ /**
25
+ * @var BundledComponentCollection
26
+ */
27
+ private $collection;
28
+
29
+ /**
30
+ * @var BundledComponent
31
+ */
32
+ private $item;
33
+
34
+ protected function setUp() {
35
+ $this->collection = new BundledComponentCollection;
36
+ $this->item = new BundledComponent('phpunit/php-code-coverage', new Version('4.0.2'));
37
+ }
38
+
39
+ public function testCanBeCreated() {
40
+ $this->assertInstanceOf(BundledComponentCollection::class, $this->collection);
41
+ }
42
+
43
+ public function testCanBeCounted() {
44
+ $this->collection->add($this->item);
45
+
46
+ $this->assertCount(1, $this->collection);
47
+ }
48
+
49
+ public function testCanBeIterated() {
50
+ $this->collection->add($this->createMock(BundledComponent::class));
51
+ $this->collection->add($this->item);
52
+
53
+ $this->assertContains($this->item, $this->collection);
54
+ }
55
+
56
+ public function testKeyPositionCanBeRetreived() {
57
+ $this->collection->add($this->item);
58
+ foreach($this->collection as $key => $item) {
59
+ $this->assertEquals(0, $key);
60
+ }
61
+ }
62
+
63
+ }
vendor/phar-io/manifest/tests/values/BundledComponentTest.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+ use PHPUnit\Framework\TestCase;
15
+
16
+ /**
17
+ * @covers PharIo\Manifest\BundledComponent
18
+ *
19
+ * @uses \PharIo\Version\Version
20
+ */
21
+ class BundledComponentTest extends TestCase {
22
+ /**
23
+ * @var BundledComponent
24
+ */
25
+ private $bundledComponent;
26
+
27
+ protected function setUp() {
28
+ $this->bundledComponent = new BundledComponent('phpunit/php-code-coverage', new Version('4.0.2'));
29
+ }
30
+
31
+ public function testCanBeCreated() {
32
+ $this->assertInstanceOf(BundledComponent::class, $this->bundledComponent);
33
+ }
34
+
35
+ public function testNameCanBeRetrieved() {
36
+ $this->assertEquals('phpunit/php-code-coverage', $this->bundledComponent->getName());
37
+ }
38
+
39
+ public function testVersionCanBeRetrieved() {
40
+ $this->assertEquals('4.0.2', $this->bundledComponent->getVersion()->getVersionString());
41
+ }
42
+ }
vendor/phar-io/manifest/tests/values/CopyrightInformationTest.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\CopyrightInformation
17
+ *
18
+ * @uses PharIo\Manifest\AuthorCollection
19
+ * @uses PharIo\Manifest\AuthorCollectionIterator
20
+ * @uses PharIo\Manifest\Author
21
+ * @uses PharIo\Manifest\Email
22
+ * @uses PharIo\Manifest\License
23
+ * @uses PharIo\Manifest\Url
24
+ */
25
+ class CopyrightInformationTest extends TestCase {
26
+ /**
27
+ * @var CopyrightInformation
28
+ */
29
+ private $copyrightInformation;
30
+
31
+ /**
32
+ * @var Author
33
+ */
34
+ private $author;
35
+
36
+ /**
37
+ * @var License
38
+ */
39
+ private $license;
40
+
41
+ protected function setUp() {
42
+ $this->author = new Author('Joe Developer', new Email('user@example.com'));
43
+ $this->license = new License('BSD-3-Clause', new Url('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE'));
44
+
45
+ $authors = new AuthorCollection;
46
+ $authors->add($this->author);
47
+
48
+ $this->copyrightInformation = new CopyrightInformation($authors, $this->license);
49
+ }
50
+
51
+ public function testCanBeCreated() {
52
+ $this->assertInstanceOf(CopyrightInformation::class, $this->copyrightInformation);
53
+ }
54
+
55
+ public function testAuthorsCanBeRetrieved() {
56
+ $this->assertContains($this->author, $this->copyrightInformation->getAuthors());
57
+ }
58
+
59
+ public function testLicenseCanBeRetrieved() {
60
+ $this->assertEquals($this->license, $this->copyrightInformation->getLicense());
61
+ }
62
+ }
vendor/phar-io/manifest/tests/values/EmailTest.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\Email
17
+ */
18
+ class EmailTest extends TestCase {
19
+ public function testCanBeCreatedForValidEmail() {
20
+ $this->assertInstanceOf(Email::class, new Email('user@example.com'));
21
+ }
22
+
23
+ public function testCanBeUsedAsString() {
24
+ $this->assertEquals('user@example.com', new Email('user@example.com'));
25
+ }
26
+
27
+ /**
28
+ * @covers PharIo\Manifest\InvalidEmailException
29
+ */
30
+ public function testCannotBeCreatedForInvalidEmail() {
31
+ $this->expectException(InvalidEmailException::class);
32
+
33
+ new Email('invalid');
34
+ }
35
+ }
vendor/phar-io/manifest/tests/values/ExtensionTest.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\AnyVersionConstraint;
14
+ use PharIo\Version\Version;
15
+ use PharIo\Version\VersionConstraint;
16
+ use PharIo\Version\VersionConstraintParser;
17
+ use PHPUnit\Framework\TestCase;
18
+
19
+ /**
20
+ * @covers \PharIo\Manifest\Extension
21
+ * @covers \PharIo\Manifest\Type
22
+ *
23
+ * @uses \PharIo\Version\VersionConstraint
24
+ * @uses \PharIo\Manifest\ApplicationName
25
+ */
26
+ class ExtensionTest extends TestCase {
27
+ /**
28
+ * @var Extension
29
+ */
30
+ private $type;
31
+
32
+ /**
33
+ * @var ApplicationName|\PHPUnit_Framework_MockObject_MockObject
34
+ */
35
+ private $name;
36
+
37
+ protected function setUp() {
38
+ $this->name = $this->createMock(ApplicationName::class);
39
+ $this->type = Type::extension($this->name, new AnyVersionConstraint);
40
+ }
41
+
42
+ public function testCanBeCreated() {
43
+ $this->assertInstanceOf(Extension::class, $this->type);
44
+ }
45
+
46
+ public function testIsNotApplication() {
47
+ $this->assertFalse($this->type->isApplication());
48
+ }
49
+
50
+ public function testIsNotLibrary() {
51
+ $this->assertFalse($this->type->isLibrary());
52
+ }
53
+
54
+ public function testIsExtension() {
55
+ $this->assertTrue($this->type->isExtension());
56
+ }
57
+
58
+ public function testApplicationCanBeRetrieved()
59
+ {
60
+ $this->assertInstanceOf(ApplicationName::class, $this->type->getApplicationName());
61
+ }
62
+
63
+ public function testVersionConstraintCanBeRetrieved() {
64
+ $this->assertInstanceOf(
65
+ VersionConstraint::class,
66
+ $this->type->getVersionConstraint()
67
+ );
68
+ }
69
+
70
+ public function testApplicationCanBeQueried()
71
+ {
72
+ $this->name->method('isEqual')->willReturn(true);
73
+ $this->assertTrue(
74
+ $this->type->isExtensionFor($this->createMock(ApplicationName::class))
75
+ );
76
+ }
77
+
78
+ public function testCompatibleWithReturnsTrueForMatchingVersionConstraintAndApplicaiton() {
79
+ $app = new ApplicationName('foo/bar');
80
+ $extension = Type::extension($app, (new VersionConstraintParser)->parse('^1.0'));
81
+ $version = new Version('1.0.0');
82
+
83
+ $this->assertTrue(
84
+ $extension->isCompatibleWith($app, $version)
85
+ );
86
+ }
87
+
88
+ public function testCompatibleWithReturnsFalseForNotMatchingVersionConstraint() {
89
+ $app = new ApplicationName('foo/bar');
90
+ $extension = Type::extension($app, (new VersionConstraintParser)->parse('^1.0'));
91
+ $version = new Version('2.0.0');
92
+
93
+ $this->assertFalse(
94
+ $extension->isCompatibleWith($app, $version)
95
+ );
96
+ }
97
+
98
+ public function testCompatibleWithReturnsFalseForNotMatchingApplication() {
99
+ $app1 = new ApplicationName('foo/bar');
100
+ $app2 = new ApplicationName('foo/foo');
101
+ $extension = Type::extension($app1, (new VersionConstraintParser)->parse('^1.0'));
102
+ $version = new Version('1.0.0');
103
+
104
+ $this->assertFalse(
105
+ $extension->isCompatibleWith($app2, $version)
106
+ );
107
+ }
108
+
109
+ }
vendor/phar-io/manifest/tests/values/LibraryTest.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\Library
17
+ * @covers PharIo\Manifest\Type
18
+ */
19
+ class LibraryTest extends TestCase {
20
+ /**
21
+ * @var Library
22
+ */
23
+ private $type;
24
+
25
+ protected function setUp() {
26
+ $this->type = Type::library();
27
+ }
28
+
29
+ public function testCanBeCreated() {
30
+ $this->assertInstanceOf(Library::class, $this->type);
31
+ }
32
+
33
+ public function testIsNotApplication() {
34
+ $this->assertFalse($this->type->isApplication());
35
+ }
36
+
37
+ public function testIsLibrary() {
38
+ $this->assertTrue($this->type->isLibrary());
39
+ }
40
+
41
+ public function testIsNotExtension() {
42
+ $this->assertFalse($this->type->isExtension());
43
+ }
44
+ }
vendor/phar-io/manifest/tests/values/LicenseTest.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\License
17
+ *
18
+ * @uses PharIo\Manifest\Url
19
+ */
20
+ class LicenseTest extends TestCase {
21
+ /**
22
+ * @var License
23
+ */
24
+ private $license;
25
+
26
+ protected function setUp() {
27
+ $this->license = new License('BSD-3-Clause', new Url('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE'));
28
+ }
29
+
30
+ public function testCanBeCreated() {
31
+ $this->assertInstanceOf(License::class, $this->license);
32
+ }
33
+
34
+ public function testNameCanBeRetrieved() {
35
+ $this->assertEquals('BSD-3-Clause', $this->license->getName());
36
+ }
37
+
38
+ public function testUrlCanBeRetrieved() {
39
+ $this->assertEquals('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE', $this->license->getUrl());
40
+ }
41
+ }
vendor/phar-io/manifest/tests/values/ManifestTest.php ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\Version;
14
+ use PharIo\Version\AnyVersionConstraint;
15
+ use PHPUnit\Framework\TestCase;
16
+
17
+ /**
18
+ * @covers \PharIo\Manifest\Manifest
19
+ *
20
+ * @uses \PharIo\Manifest\ApplicationName
21
+ * @uses \PharIo\Manifest\Author
22
+ * @uses \PharIo\Manifest\AuthorCollection
23
+ * @uses \PharIo\Manifest\BundledComponent
24
+ * @uses \PharIo\Manifest\BundledComponentCollection
25
+ * @uses \PharIo\Manifest\CopyrightInformation
26
+ * @uses \PharIo\Manifest\Email
27
+ * @uses \PharIo\Manifest\License
28
+ * @uses \PharIo\Manifest\RequirementCollection
29
+ * @uses \PharIo\Manifest\PhpVersionRequirement
30
+ * @uses \PharIo\Manifest\Type
31
+ * @uses \PharIo\Manifest\Application
32
+ * @uses \PharIo\Manifest\Url
33
+ * @uses \PharIo\Version\Version
34
+ * @uses \PharIo\Version\VersionConstraint
35
+ */
36
+ class ManifestTest extends TestCase {
37
+ /**
38
+ * @var ApplicationName
39
+ */
40
+ private $name;
41
+
42
+ /**
43
+ * @var Version
44
+ */
45
+ private $version;
46
+
47
+ /**
48
+ * @var Type
49
+ */
50
+ private $type;
51
+
52
+ /**
53
+ * @var CopyrightInformation
54
+ */
55
+ private $copyrightInformation;
56
+
57
+ /**
58
+ * @var RequirementCollection
59
+ */
60
+ private $requirements;
61
+
62
+ /**
63
+ * @var BundledComponentCollection
64
+ */
65
+ private $bundledComponents;
66
+
67
+ /**
68
+ * @var Manifest
69
+ */
70
+ private $manifest;
71
+
72
+ protected function setUp() {
73
+ $this->version = new Version('5.6.5');
74
+
75
+ $this->type = Type::application();
76
+
77
+ $author = new Author('Joe Developer', new Email('user@example.com'));
78
+ $license = new License('BSD-3-Clause', new Url('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE'));
79
+
80
+ $authors = new AuthorCollection;
81
+ $authors->add($author);
82
+
83
+ $this->copyrightInformation = new CopyrightInformation($authors, $license);
84
+
85
+ $this->requirements = new RequirementCollection;
86
+ $this->requirements->add(new PhpVersionRequirement(new AnyVersionConstraint));
87
+
88
+ $this->bundledComponents = new BundledComponentCollection;
89
+ $this->bundledComponents->add(new BundledComponent('phpunit/php-code-coverage', new Version('4.0.2')));
90
+
91
+ $this->name = new ApplicationName('phpunit/phpunit');
92
+
93
+ $this->manifest = new Manifest(
94
+ $this->name,
95
+ $this->version,
96
+ $this->type,
97
+ $this->copyrightInformation,
98
+ $this->requirements,
99
+ $this->bundledComponents
100
+ );
101
+ }
102
+
103
+ public function testCanBeCreated() {
104
+ $this->assertInstanceOf(Manifest::class, $this->manifest);
105
+ }
106
+
107
+ public function testNameCanBeRetrieved() {
108
+ $this->assertEquals($this->name, $this->manifest->getName());
109
+ }
110
+
111
+ public function testVersionCanBeRetrieved() {
112
+ $this->assertEquals($this->version, $this->manifest->getVersion());
113
+ }
114
+
115
+ public function testTypeCanBeRetrieved() {
116
+ $this->assertEquals($this->type, $this->manifest->getType());
117
+ }
118
+
119
+ public function testTypeCanBeQueried() {
120
+ $this->assertTrue($this->manifest->isApplication());
121
+ $this->assertFalse($this->manifest->isLibrary());
122
+ $this->assertFalse($this->manifest->isExtension());
123
+ }
124
+
125
+ public function testCopyrightInformationCanBeRetrieved() {
126
+ $this->assertEquals($this->copyrightInformation, $this->manifest->getCopyrightInformation());
127
+ }
128
+
129
+ public function testRequirementsCanBeRetrieved() {
130
+ $this->assertEquals($this->requirements, $this->manifest->getRequirements());
131
+ }
132
+
133
+ public function testBundledComponentsCanBeRetrieved() {
134
+ $this->assertEquals($this->bundledComponents, $this->manifest->getBundledComponents());
135
+ }
136
+
137
+ /**
138
+ * @uses \PharIo\Manifest\Extension
139
+ */
140
+ public function testExtendedApplicationCanBeQueriedForExtension()
141
+ {
142
+ $appName = new ApplicationName('foo/bar');
143
+ $manifest = new Manifest(
144
+ new ApplicationName('foo/foo'),
145
+ new Version('1.0.0'),
146
+ Type::extension($appName, new AnyVersionConstraint),
147
+ $this->copyrightInformation,
148
+ new RequirementCollection,
149
+ new BundledComponentCollection
150
+ );
151
+
152
+ $this->assertTrue($manifest->isExtensionFor($appName));
153
+ }
154
+
155
+ public function testNonExtensionReturnsFalseWhenQueriesForExtension() {
156
+ $appName = new ApplicationName('foo/bar');
157
+ $manifest = new Manifest(
158
+ new ApplicationName('foo/foo'),
159
+ new Version('1.0.0'),
160
+ Type::library(),
161
+ $this->copyrightInformation,
162
+ new RequirementCollection,
163
+ new BundledComponentCollection
164
+ );
165
+
166
+ $this->assertFalse($manifest->isExtensionFor($appName));
167
+ }
168
+
169
+ /**
170
+ * @uses \PharIo\Manifest\Extension
171
+ */
172
+ public function testExtendedApplicationCanBeQueriedForExtensionWithVersion()
173
+ {
174
+ $appName = new ApplicationName('foo/bar');
175
+ $manifest = new Manifest(
176
+ new ApplicationName('foo/foo'),
177
+ new Version('1.0.0'),
178
+ Type::extension($appName, new AnyVersionConstraint),
179
+ $this->copyrightInformation,
180
+ new RequirementCollection,
181
+ new BundledComponentCollection
182
+ );
183
+
184
+ $this->assertTrue($manifest->isExtensionFor($appName, new Version('1.2.3')));
185
+ }
186
+
187
+ }
vendor/phar-io/manifest/tests/values/PhpExtensionRequirementTest.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\PhpExtensionRequirement
17
+ */
18
+ class PhpExtensionRequirementTest extends TestCase {
19
+ public function testCanBeCreated() {
20
+ $this->assertInstanceOf(PhpExtensionRequirement::class, new PhpExtensionRequirement('dom'));
21
+ }
22
+
23
+ public function testCanBeUsedAsString() {
24
+ $this->assertEquals('dom', new PhpExtensionRequirement('dom'));
25
+ }
26
+ }
vendor/phar-io/manifest/tests/values/PhpVersionRequirementTest.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\ExactVersionConstraint;
14
+ use PHPUnit\Framework\TestCase;
15
+
16
+ /**
17
+ * @covers PharIo\Manifest\PhpVersionRequirement
18
+ *
19
+ * @uses \PharIo\Version\VersionConstraint
20
+ */
21
+ class PhpVersionRequirementTest extends TestCase {
22
+ /**
23
+ * @var PhpVersionRequirement
24
+ */
25
+ private $requirement;
26
+
27
+ protected function setUp() {
28
+ $this->requirement = new PhpVersionRequirement(new ExactVersionConstraint('7.1.0'));
29
+ }
30
+
31
+ public function testCanBeCreated() {
32
+ $this->assertInstanceOf(PhpVersionRequirement::class, $this->requirement);
33
+ }
34
+
35
+ public function testVersionConstraintCanBeRetrieved() {
36
+ $this->assertEquals('7.1.0', $this->requirement->getVersionConstraint()->asString());
37
+ }
38
+ }
vendor/phar-io/manifest/tests/values/RequirementCollectionTest.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PharIo\Version\ExactVersionConstraint;
14
+ use PHPUnit\Framework\TestCase;
15
+
16
+ /**
17
+ * @covers \PharIo\Manifest\RequirementCollection
18
+ * @covers \PharIo\Manifest\RequirementCollectionIterator
19
+ *
20
+ * @uses \PharIo\Manifest\PhpVersionRequirement
21
+ * @uses \PharIo\Version\VersionConstraint
22
+ */
23
+ class RequirementCollectionTest extends TestCase {
24
+ /**
25
+ * @var RequirementCollection
26
+ */
27
+ private $collection;
28
+
29
+ /**
30
+ * @var Requirement
31
+ */
32
+ private $item;
33
+
34
+ protected function setUp() {
35
+ $this->collection = new RequirementCollection;
36
+ $this->item = new PhpVersionRequirement(new ExactVersionConstraint('7.1.0'));
37
+ }
38
+
39
+ public function testCanBeCreated() {
40
+ $this->assertInstanceOf(RequirementCollection::class, $this->collection);
41
+ }
42
+
43
+ public function testCanBeCounted() {
44
+ $this->collection->add($this->item);
45
+
46
+ $this->assertCount(1, $this->collection);
47
+ }
48
+
49
+ public function testCanBeIterated() {
50
+ $this->collection->add(new PhpVersionRequirement(new ExactVersionConstraint('5.6.0')));
51
+ $this->collection->add($this->item);
52
+
53
+ $this->assertContains($this->item, $this->collection);
54
+ }
55
+
56
+ public function testKeyPositionCanBeRetreived() {
57
+ $this->collection->add($this->item);
58
+ foreach($this->collection as $key => $item) {
59
+ $this->assertEquals(0, $key);
60
+ }
61
+ }
62
+
63
+ }
vendor/phar-io/manifest/tests/values/UrlTest.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Manifest.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Manifest;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Manifest\Url
17
+ */
18
+ class UrlTest extends TestCase {
19
+ public function testCanBeCreatedForValidUrl() {
20
+ $this->assertInstanceOf(Url::class, new Url('https://phar.io/'));
21
+ }
22
+
23
+ public function testCanBeUsedAsString() {
24
+ $this->assertEquals('https://phar.io/', new Url('https://phar.io/'));
25
+ }
26
+
27
+ /**
28
+ * @covers PharIo\Manifest\InvalidUrlException
29
+ */
30
+ public function testCannotBeCreatedForInvalidUrl() {
31
+ $this->expectException(InvalidUrlException::class);
32
+
33
+ new Url('invalid');
34
+ }
35
+ }
vendor/phar-io/manifest/tests/xml/AuthorElementCollectionTest.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class AuthorElementCollectionTest extends \PHPUnit_Framework_TestCase {
8
+ public function testAuthorElementCanBeRetrievedFromCollection() {
9
+ $dom = new DOMDocument();
10
+ $dom->loadXML('<?xml version="1.0" ?><author xmlns="https://phar.io/xml/manifest/1.0" name="Reiner Zufall" email="reiner@zufall.de" />');
11
+ $collection = new AuthorElementCollection($dom->childNodes);
12
+
13
+ foreach($collection as $authorElement) {
14
+ $this->assertInstanceOf(AuthorElement::class, $authorElement);
15
+ }
16
+ }
17
+
18
+ }
vendor/phar-io/manifest/tests/xml/AuthorElementTest.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class AuthorElementTest extends \PHPUnit_Framework_TestCase {
6
+ /**
7
+ * @var AuthorElement
8
+ */
9
+ private $author;
10
+
11
+ protected function setUp() {
12
+ $dom = new \DOMDocument();
13
+ $dom->loadXML('<?xml version="1.0" ?><author xmlns="https://phar.io/xml/manifest/1.0" name="Reiner Zufall" email="reiner@zufall.de" />');
14
+ $this->author = new AuthorElement($dom->documentElement);
15
+ }
16
+
17
+ public function testNameCanBeRetrieved() {
18
+ $this->assertEquals('Reiner Zufall', $this->author->getName());
19
+ }
20
+
21
+ public function testEmailCanBeRetrieved() {
22
+ $this->assertEquals('reiner@zufall.de', $this->author->getEmail());
23
+ }
24
+
25
+ }
vendor/phar-io/manifest/tests/xml/BundlesElementTest.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class BundlesElementTest extends \PHPUnit_Framework_TestCase {
8
+ /**
9
+ * @var DOMDocument
10
+ */
11
+ private $dom;
12
+
13
+ /**
14
+ * @var BundlesElement
15
+ */
16
+ private $bundles;
17
+
18
+ protected function setUp() {
19
+ $this->dom = new DOMDocument();
20
+ $this->dom->loadXML('<?xml version="1.0" ?><bundles xmlns="https://phar.io/xml/manifest/1.0" />');
21
+ $this->bundles = new BundlesElement($this->dom->documentElement);
22
+ }
23
+
24
+ public function testThrowsExceptionWhenGetComponentElementsIsCalledButNodesAreMissing() {
25
+ $this->expectException(ManifestElementException::class);
26
+ $this->bundles->getComponentElements();
27
+ }
28
+
29
+ public function testGetComponentElementsReturnsComponentElementCollection() {
30
+ $this->addComponent();
31
+ $this->assertInstanceOf(
32
+ ComponentElementCollection::class, $this->bundles->getComponentElements()
33
+ );
34
+ }
35
+
36
+ private function addComponent() {
37
+ $this->dom->documentElement->appendChild(
38
+ $this->dom->createElementNS('https://phar.io/xml/manifest/1.0', 'component')
39
+ );
40
+ }
41
+ }
vendor/phar-io/manifest/tests/xml/ComponentElementCollectionTest.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class ComponentElementCollectionTest extends \PHPUnit_Framework_TestCase {
8
+ public function testComponentElementCanBeRetrievedFromCollection() {
9
+ $dom = new DOMDocument();
10
+ $dom->loadXML('<?xml version="1.0" ?><component xmlns="https://phar.io/xml/manifest/1.0" />');
11
+ $collection = new ComponentElementCollection($dom->childNodes);
12
+
13
+ foreach($collection as $componentElement) {
14
+ $this->assertInstanceOf(ComponentElement::class, $componentElement);
15
+ }
16
+ }
17
+
18
+ }
vendor/phar-io/manifest/tests/xml/ComponentElementTest.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ComponentElementTest extends \PHPUnit_Framework_TestCase {
6
+ /**
7
+ * @var ComponentElement
8
+ */
9
+ private $component;
10
+
11
+ protected function setUp() {
12
+ $dom = new \DOMDocument();
13
+ $dom->loadXML('<?xml version="1.0" ?><component xmlns="https://phar.io/xml/manifest/1.0" name="phar-io/phive" version="0.6.0" />');
14
+ $this->component = new ComponentElement($dom->documentElement);
15
+ }
16
+
17
+ public function testNameCanBeRetrieved() {
18
+ $this->assertEquals('phar-io/phive', $this->component->getName());
19
+ }
20
+
21
+ public function testEmailCanBeRetrieved() {
22
+ $this->assertEquals('0.6.0', $this->component->getVersion());
23
+ }
24
+
25
+ }
vendor/phar-io/manifest/tests/xml/ContainsElementTest.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+ use DOMElement;
7
+
8
+ class ContainsElementTest extends \PHPUnit_Framework_TestCase {
9
+ /**
10
+ * @var DOMElement
11
+ */
12
+ private $domElement;
13
+
14
+ /**
15
+ * @var ContainsElement
16
+ */
17
+ private $contains;
18
+
19
+ protected function setUp() {
20
+ $dom = new DOMDocument();
21
+ $dom->loadXML('<?xml version="1.0" ?><php xmlns="https://phar.io/xml/manifest/1.0" name="phpunit/phpunit" version="5.6.5" type="application" />');
22
+ $this->domElement = $dom->documentElement;
23
+ $this->contains = new ContainsElement($this->domElement);
24
+ }
25
+
26
+ public function testVersionCanBeRetrieved() {
27
+ $this->assertEquals('5.6.5', $this->contains->getVersion());
28
+ }
29
+
30
+ public function testThrowsExceptionWhenVersionAttributeIsMissing() {
31
+ $this->domElement->removeAttribute('version');
32
+ $this->expectException(ManifestElementException::class);
33
+ $this->contains->getVersion();
34
+ }
35
+
36
+ public function testNameCanBeRetrieved() {
37
+ $this->assertEquals('phpunit/phpunit', $this->contains->getName());
38
+ }
39
+
40
+ public function testThrowsExceptionWhenNameAttributeIsMissing() {
41
+ $this->domElement->removeAttribute('name');
42
+ $this->expectException(ManifestElementException::class);
43
+ $this->contains->getName();
44
+ }
45
+
46
+ public function testTypeCanBeRetrieved() {
47
+ $this->assertEquals('application', $this->contains->getType());
48
+ }
49
+
50
+ public function testThrowsExceptionWhenTypeAttributeIsMissing() {
51
+ $this->domElement->removeAttribute('type');
52
+ $this->expectException(ManifestElementException::class);
53
+ $this->contains->getType();
54
+ }
55
+
56
+ public function testGetExtensionElementReturnsExtensionElement() {
57
+ $this->domElement->appendChild(
58
+ $this->domElement->ownerDocument->createElementNS('https://phar.io/xml/manifest/1.0', 'extension')
59
+ );
60
+ $this->assertInstanceOf(ExtensionElement::class, $this->contains->getExtensionElement());
61
+ }
62
+
63
+ }
vendor/phar-io/manifest/tests/xml/CopyrightElementTest.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class CopyrightElementTest extends \PHPUnit_Framework_TestCase {
8
+ /**
9
+ * @var DOMDocument
10
+ */
11
+ private $dom;
12
+
13
+ /**
14
+ * @var CopyrightElement
15
+ */
16
+ private $copyright;
17
+
18
+ protected function setUp() {
19
+ $this->dom = new DOMDocument();
20
+ $this->dom->loadXML('<?xml version="1.0" ?><copyright xmlns="https://phar.io/xml/manifest/1.0" />');
21
+ $this->copyright = new CopyrightElement($this->dom->documentElement);
22
+ }
23
+
24
+ public function testThrowsExceptionWhenGetAuthroElementsIsCalledButNodesAreMissing() {
25
+ $this->expectException(ManifestElementException::class);
26
+ $this->copyright->getAuthorElements();
27
+ }
28
+
29
+ public function testThrowsExceptionWhenGetLicenseElementIsCalledButNodeIsMissing() {
30
+ $this->expectException(ManifestElementException::class);
31
+ $this->copyright->getLicenseElement();
32
+ }
33
+
34
+ public function testGetAuthorElementsReturnsAuthorElementCollection() {
35
+ $this->dom->documentElement->appendChild(
36
+ $this->dom->createElementNS('https://phar.io/xml/manifest/1.0', 'author')
37
+ );
38
+ $this->assertInstanceOf(
39
+ AuthorElementCollection::class, $this->copyright->getAuthorElements()
40
+ );
41
+ }
42
+
43
+ public function testGetLicenseElementReturnsLicenseElement() {
44
+ $this->dom->documentElement->appendChild(
45
+ $this->dom->createElementNS('https://phar.io/xml/manifest/1.0', 'license')
46
+ );
47
+ $this->assertInstanceOf(
48
+ LicenseElement::class, $this->copyright->getLicenseElement()
49
+ );
50
+ }
51
+
52
+ }
vendor/phar-io/manifest/tests/xml/ExtElementCollectionTest.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class ExtElementCollectionTest extends \PHPUnit_Framework_TestCase {
8
+ public function testComponentElementCanBeRetrievedFromCollection() {
9
+ $dom = new DOMDocument();
10
+ $dom->loadXML('<?xml version="1.0" ?><ext xmlns="https://phar.io/xml/manifest/1.0" />');
11
+ $collection = new ExtElementCollection($dom->childNodes);
12
+
13
+ foreach($collection as $position => $extElement) {
14
+ $this->assertInstanceOf(ExtElement::class, $extElement);
15
+ $this->assertEquals(0, $position);
16
+ }
17
+ }
18
+
19
+ }
vendor/phar-io/manifest/tests/xml/ExtElementTest.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ExtElementTest extends \PHPUnit_Framework_TestCase {
6
+ /**
7
+ * @var ExtElement
8
+ */
9
+ private $ext;
10
+
11
+ protected function setUp() {
12
+ $dom = new \DOMDocument();
13
+ $dom->loadXML('<?xml version="1.0" ?><ext xmlns="https://phar.io/xml/manifest/1.0" name="dom" />');
14
+ $this->ext = new ExtElement($dom->documentElement);
15
+ }
16
+
17
+ public function testNameCanBeRetrieved() {
18
+ $this->assertEquals('dom', $this->ext->getName());
19
+ }
20
+
21
+ }
vendor/phar-io/manifest/tests/xml/ExtensionElementTest.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ExtensionElementTest extends \PHPUnit_Framework_TestCase {
6
+ /**
7
+ * @var ExtensionElement
8
+ */
9
+ private $extension;
10
+
11
+ protected function setUp() {
12
+ $dom = new \DOMDocument();
13
+ $dom->loadXML('<?xml version="1.0" ?><extension xmlns="https://phar.io/xml/manifest/1.0" for="phar-io/phive" compatible="~0.6" />');
14
+ $this->extension = new ExtensionElement($dom->documentElement);
15
+ }
16
+
17
+ public function testNForCanBeRetrieved() {
18
+ $this->assertEquals('phar-io/phive', $this->extension->getFor());
19
+ }
20
+
21
+ public function testCompatibleVersionConstraintCanBeRetrieved() {
22
+ $this->assertEquals('~0.6', $this->extension->getCompatible());
23
+ }
24
+
25
+ }
vendor/phar-io/manifest/tests/xml/LicenseElementTest.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class LicenseElementTest extends \PHPUnit_Framework_TestCase {
6
+ /**
7
+ * @var LicenseElement
8
+ */
9
+ private $license;
10
+
11
+ protected function setUp() {
12
+ $dom = new \DOMDocument();
13
+ $dom->loadXML('<?xml version="1.0" ?><license xmlns="https://phar.io/xml/manifest/1.0" type="BSD-3" url="https://some.tld/LICENSE" />');
14
+ $this->license = new LicenseElement($dom->documentElement);
15
+ }
16
+
17
+ public function testTypeCanBeRetrieved() {
18
+ $this->assertEquals('BSD-3', $this->license->getType());
19
+ }
20
+
21
+ public function testUrlCanBeRetrieved() {
22
+ $this->assertEquals('https://some.tld/LICENSE', $this->license->getUrl());
23
+ }
24
+
25
+ }
vendor/phar-io/manifest/tests/xml/ManifestDocumentTest.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ class ManifestDocumentTest extends \PHPUnit_Framework_TestCase {
6
+ public function testThrowsExceptionWhenFileDoesNotExist() {
7
+ $this->expectException(ManifestDocumentException::class);
8
+ ManifestDocument::fromFile('/does/not/exist');
9
+ }
10
+
11
+ public function testCanBeCreatedFromFile() {
12
+ $this->assertInstanceOf(
13
+ ManifestDocument::class,
14
+ ManifestDocument::fromFile(__DIR__ . '/../_fixture/phpunit-5.6.5.xml')
15
+ );
16
+ }
17
+
18
+ public function testCaneBeConstructedFromString() {
19
+ $content = file_get_contents(__DIR__ . '/../_fixture/phpunit-5.6.5.xml');
20
+ $this->assertInstanceOf(
21
+ ManifestDocument::class,
22
+ ManifestDocument::fromString($content)
23
+ );
24
+ }
25
+
26
+ public function testThrowsExceptionOnInvalidXML() {
27
+ $this->expectException(ManifestDocumentLoadingException::class);
28
+ ManifestDocument::fromString('<?xml version="1.0" ?><root>');
29
+ }
30
+
31
+ public function testLoadingDocumentWithWrongRootNameThrowsException() {
32
+ $this->expectException(ManifestDocumentException::class);
33
+ ManifestDocument::fromString('<?xml version="1.0" ?><root />');
34
+ }
35
+
36
+ public function testLoadingDocumentWithWrongNamespaceThrowsException() {
37
+ $this->expectException(ManifestDocumentException::class);
38
+ ManifestDocument::fromString('<?xml version="1.0" ?><phar xmlns="foo:bar" />');
39
+ }
40
+
41
+ public function testContainsElementCanBeRetrieved() {
42
+ $this->assertInstanceOf(
43
+ ContainsElement::class,
44
+ $this->loadFixture()->getContainsElement()
45
+ );
46
+ }
47
+
48
+ public function testRequiresElementCanBeRetrieved() {
49
+ $this->assertInstanceOf(
50
+ RequiresElement::class,
51
+ $this->loadFixture()->getRequiresElement()
52
+ );
53
+ }
54
+
55
+ public function testCopyrightElementCanBeRetrieved() {
56
+ $this->assertInstanceOf(
57
+ CopyrightElement::class,
58
+ $this->loadFixture()->getCopyrightElement()
59
+ );
60
+ }
61
+
62
+ public function testBundlesElementCanBeRetrieved() {
63
+ $this->assertInstanceOf(
64
+ BundlesElement::class,
65
+ $this->loadFixture()->getBundlesElement()
66
+ );
67
+ }
68
+
69
+ public function testThrowsExceptionWhenContainsIsMissing() {
70
+ $this->expectException(ManifestDocumentException::class);
71
+ $this->loadEmptyFixture()->getContainsElement();
72
+ }
73
+
74
+ public function testThrowsExceptionWhenCopyirhgtIsMissing() {
75
+ $this->expectException(ManifestDocumentException::class);
76
+ $this->loadEmptyFixture()->getCopyrightElement();
77
+ }
78
+
79
+ public function testThrowsExceptionWhenRequiresIsMissing() {
80
+ $this->expectException(ManifestDocumentException::class);
81
+ $this->loadEmptyFixture()->getRequiresElement();
82
+ }
83
+
84
+ public function testThrowsExceptionWhenBundlesIsMissing() {
85
+ $this->expectException(ManifestDocumentException::class);
86
+ $this->loadEmptyFixture()->getBundlesElement();
87
+ }
88
+
89
+ public function testHasBundlesReturnsTrueWhenBundlesNodeIsPresent() {
90
+ $this->assertTrue(
91
+ $this->loadFixture()->hasBundlesElement()
92
+ );
93
+ }
94
+
95
+ public function testHasBundlesReturnsFalseWhenBundlesNoNodeIsPresent() {
96
+ $this->assertFalse(
97
+ $this->loadEmptyFixture()->hasBundlesElement()
98
+ );
99
+ }
100
+
101
+ private function loadFixture() {
102
+ return ManifestDocument::fromFile(__DIR__ . '/../_fixture/phpunit-5.6.5.xml');
103
+ }
104
+
105
+ private function loadEmptyFixture() {
106
+ return ManifestDocument::fromString(
107
+ '<?xml version="1.0" ?><phar xmlns="https://phar.io/xml/manifest/1.0" />'
108
+ );
109
+ }
110
+ }
vendor/phar-io/manifest/tests/xml/PhpElementTest.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class PhpElementTest extends \PHPUnit_Framework_TestCase {
8
+ /**
9
+ * @var DOMDocument
10
+ */
11
+ private $dom;
12
+
13
+ /**
14
+ * @var PhpElement
15
+ */
16
+ private $php;
17
+
18
+ protected function setUp() {
19
+ $this->dom = new DOMDocument();
20
+ $this->dom->loadXML('<?xml version="1.0" ?><php xmlns="https://phar.io/xml/manifest/1.0" version="^5.6 || ^7.0" />');
21
+ $this->php = new PhpElement($this->dom->documentElement);
22
+ }
23
+
24
+ public function testVersionConstraintCanBeRetrieved() {
25
+ $this->assertEquals('^5.6 || ^7.0', $this->php->getVersion());
26
+ }
27
+
28
+ public function testHasExtElementsReturnsFalseWhenNoExtensionsAreRequired() {
29
+ $this->assertFalse($this->php->hasExtElements());
30
+ }
31
+
32
+ public function testHasExtElementsReturnsTrueWhenExtensionsAreRequired() {
33
+ $this->addExtElement();
34
+ $this->assertTrue($this->php->hasExtElements());
35
+ }
36
+
37
+ public function testGetExtElementsReturnsExtElementCollection() {
38
+ $this->addExtElement();
39
+ $this->assertInstanceOf(ExtElementCollection::class, $this->php->getExtElements());
40
+ }
41
+
42
+ private function addExtElement() {
43
+ $this->dom->documentElement->appendChild(
44
+ $this->dom->createElementNS('https://phar.io/xml/manifest/1.0', 'ext')
45
+ );
46
+ }
47
+
48
+ }
vendor/phar-io/manifest/tests/xml/RequiresElementTest.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PharIo\Manifest;
4
+
5
+ use DOMDocument;
6
+
7
+ class RequiresElementTest extends \PHPUnit_Framework_TestCase {
8
+ /**
9
+ * @var DOMDocument
10
+ */
11
+ private $dom;
12
+
13
+ /**
14
+ * @var RequiresElement
15
+ */
16
+ private $requires;
17
+
18
+ protected function setUp() {
19
+ $this->dom = new DOMDocument();
20
+ $this->dom->loadXML('<?xml version="1.0" ?><requires xmlns="https://phar.io/xml/manifest/1.0" />');
21
+ $this->requires = new RequiresElement($this->dom->documentElement);
22
+ }
23
+
24
+ public function testThrowsExceptionWhenGetPhpElementIsCalledButElementIsMissing() {
25
+ $this->expectException(ManifestElementException::class);
26
+ $this->requires->getPHPElement();
27
+ }
28
+
29
+ public function testHasExtElementsReturnsTrueWhenExtensionsAreRequired() {
30
+ $this->dom->documentElement->appendChild(
31
+ $this->dom->createElementNS('https://phar.io/xml/manifest/1.0', 'php')
32
+ );
33
+
34
+ $this->assertInstanceOf(PhpElement::class, $this->requires->getPHPElement());
35
+ }
36
+
37
+ }
vendor/phar-io/version/.gitignore ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /.idea
2
+ /.php_cs.cache
3
+ /composer.lock
4
+ /src/autoload.php
5
+ /tools
6
+ /vendor
7
+
vendor/phar-io/version/.php_cs ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $finder = Symfony\CS\Finder\DefaultFinder::create()
3
+ ->files()
4
+ ->in('src')
5
+ ->in('tests')
6
+ ->name('*.php');
7
+
8
+ return Symfony\CS\Config\Config::create()
9
+ ->setUsingCache(true)
10
+ ->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
11
+ ->fixers(
12
+ array(
13
+ 'align_double_arrow',
14
+ 'align_equals',
15
+ 'concat_with_spaces',
16
+ 'duplicate_semicolon',
17
+ 'elseif',
18
+ 'empty_return',
19
+ 'encoding',
20
+ 'eof_ending',
21
+ 'extra_empty_lines',
22
+ 'function_call_space',
23
+ 'function_declaration',
24
+ 'indentation',
25
+ 'join_function',
26
+ 'line_after_namespace',
27
+ 'linefeed',
28
+ 'list_commas',
29
+ 'lowercase_constants',
30
+ 'lowercase_keywords',
31
+ 'method_argument_space',
32
+ 'multiple_use',
33
+ 'namespace_no_leading_whitespace',
34
+ 'no_blank_lines_after_class_opening',
35
+ 'no_empty_lines_after_phpdocs',
36
+ 'parenthesis',
37
+ 'php_closing_tag',
38
+ 'phpdoc_indent',
39
+ 'phpdoc_no_access',
40
+ 'phpdoc_no_empty_return',
41
+ 'phpdoc_no_package',
42
+ 'phpdoc_params',
43
+ 'phpdoc_scalar',
44
+ 'phpdoc_separation',
45
+ 'phpdoc_to_comment',
46
+ 'phpdoc_trim',
47
+ 'phpdoc_types',
48
+ 'phpdoc_var_without_name',
49
+ 'remove_lines_between_uses',
50
+ 'return',
51
+ 'self_accessor',
52
+ 'short_array_syntax',
53
+ 'short_tag',
54
+ 'single_line_after_imports',
55
+ 'single_quote',
56
+ 'spaces_before_semicolon',
57
+ 'spaces_cast',
58
+ 'ternary_spaces',
59
+ 'trailing_spaces',
60
+ 'trim_array_spaces',
61
+ 'unused_use',
62
+ 'visibility',
63
+ 'whitespacy_lines'
64
+ )
65
+ )
66
+ ->finder($finder);
67
+
vendor/phar-io/version/.travis.yml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ os:
2
+ - linux
3
+
4
+ language: php
5
+
6
+ before_install:
7
+ - wget https://phar.io/releases/phive.phar
8
+ - wget https://phar.io/releases/phive.phar.asc
9
+ - gpg --keyserver hkps.pool.sks-keyservers.net --recv-keys 0x9B2D5D79
10
+ - gpg --verify phive.phar.asc phive.phar
11
+ - chmod +x phive.phar
12
+ - sudo mv phive.phar /usr/bin/phive
13
+
14
+ install:
15
+ - ant setup
16
+
17
+ script: ./tools/phpunit
18
+
19
+ php:
20
+ - 5.6
21
+ - 7.0
22
+ - 7.1
23
+ - 7.0snapshot
24
+ - 7.1snapshot
25
+ - master
26
+
27
+ matrix:
28
+ allow_failures:
29
+ - php: master
30
+ fast_finish: true
31
+
32
+ notifications:
33
+ email: false
vendor/phar-io/version/LICENSE ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ phar-io/version
2
+
3
+ Copyright (c) 2016-2017 Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de> and contributors
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice,
10
+ this list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of Arne Blankerts nor the names of contributors
17
+ may be used to endorse or promote products derived from this software
18
+ without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO,
22
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
24
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
25
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ POSSIBILITY OF SUCH DAMAGE.
31
+
vendor/phar-io/version/README.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Version
2
+
3
+ Library for handling version information and constraints
4
+
5
+ [![Build Status](https://travis-ci.org/phar-io/version.svg?branch=master)](https://travis-ci.org/phar-io/version)
6
+
7
+ ## Installation
8
+
9
+ You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
10
+
11
+ composer require phar-io/version
12
+
13
+ If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
14
+
15
+ composer require --dev phar-io/version
16
+
vendor/phar-io/version/build.xml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project name="version" default="setup">
3
+ <target name="setup" depends="clean,install-tools,generate-autoloader"/>
4
+
5
+ <target name="clean" unless="clean.done" description="Cleanup build artifacts">
6
+ <delete dir="${basedir}/tools"/>
7
+ <delete dir="${basedir}/vendor"/>
8
+ <delete file="${basedir}/src/autoload.php"/>
9
+
10
+ <property name="clean.done" value="true"/>
11
+ </target>
12
+
13
+ <target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
14
+ <property name="prepare.done" value="true"/>
15
+ </target>
16
+
17
+ <target name="-tools-installed">
18
+ <available file="${basedir}/tools" property="tools-installed" type="dir"/>
19
+ </target>
20
+
21
+ <target name="install-tools" unless="tools-installed" depends="-tools-installed" description="Install tools with Phive">
22
+ <exec executable="phive" taskname="phive">
23
+ <arg value="install"/>
24
+ <arg value="--trust-gpg-keys" />
25
+ <arg value="4AA394086372C20A,2A8299CE842DD38C" />
26
+ </exec>
27
+ </target>
28
+
29
+ <target name="generate-autoloader" depends="install-tools" description="Generate autoloader using PHPAB">
30
+ <exec executable="${basedir}/tools/phpab" taskname="phpab">
31
+ <arg value="--output"/>
32
+ <arg path="${basedir}/src/autoload.php"/>
33
+ <arg path="${basedir}/src"/>
34
+ </exec>
35
+ </target>
36
+
37
+ <target name="test" depends="generate-autoloader" description="Run tests">
38
+ <exec executable="${basedir}/tools/phpunit" taskname="phpunit"/>
39
+ </target>
40
+ </project>
41
+
vendor/phar-io/version/composer.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "phar-io/version",
3
+ "description": "Library for handling version information and constraints",
4
+ "license": "BSD-3-Clause",
5
+ "authors": [
6
+ {
7
+ "name": "Arne Blankerts",
8
+ "email": "arne@blankerts.de",
9
+ "role": "Developer"
10
+ },
11
+ {
12
+ "name": "Sebastian Heuer",
13
+ "email": "sebastian@phpeople.de",
14
+ "role": "Developer"
15
+ },
16
+ {
17
+ "name": "Sebastian Bergmann",
18
+ "email": "sebastian@phpunit.de",
19
+ "role": "Developer"
20
+ }
21
+ ],
22
+ "support": {
23
+ "issues": "https://github.com/phar-io/version/issues"
24
+ },
25
+ "require": {
26
+ "php": "^5.6 || ^7.0"
27
+ },
28
+ "autoload": {
29
+ "classmap": [
30
+ "src/"
31
+ ]
32
+ }
33
+ }
34
+
vendor/phar-io/version/phive.xml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phive xmlns="https://phar.io/phive">
3
+ <phar name="phpunit" version="^5.7.5" installed="5.7.5" location="./tools/phpunit"/>
4
+ <phar name="phpab" version="^1.23.0" installed="1.23.0" location="./tools/phpab"/>
5
+ </phive>
vendor/phar-io/version/phpunit.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
4
+ bootstrap="src/autoload.php"
5
+ backupGlobals="false"
6
+ beStrictAboutOutputDuringTests="true"
7
+ beStrictAboutTestsThatDoNotTestAnything="true"
8
+ beStrictAboutTodoAnnotatedTests="true"
9
+ verbose="true">
10
+ <testsuite>
11
+ <directory suffix="Test.php">tests</directory>
12
+ </testsuite>
13
+
14
+ <filter>
15
+ <whitelist processUncoveredFilesFromWhitelist="true">
16
+ <directory suffix=".php">src</directory>
17
+ </whitelist>
18
+ </filter>
19
+ </phpunit>
vendor/phar-io/version/src/AbstractVersionConstraint.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ abstract class AbstractVersionConstraint implements VersionConstraint {
14
+ /**
15
+ * @var string
16
+ */
17
+ private $originalValue = '';
18
+
19
+ /**
20
+ * @param string $originalValue
21
+ */
22
+ public function __construct($originalValue) {
23
+ $this->originalValue = $originalValue;
24
+ }
25
+
26
+ /**
27
+ * @return string
28
+ */
29
+ public function asString() {
30
+ return $this->originalValue;
31
+ }
32
+ }
vendor/phar-io/version/src/AndVersionConstraintGroup.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class AndVersionConstraintGroup extends AbstractVersionConstraint {
14
+ /**
15
+ * @var VersionConstraint[]
16
+ */
17
+ private $constraints = [];
18
+
19
+ /**
20
+ * @param string $originalValue
21
+ * @param VersionConstraint[] $constraints
22
+ */
23
+ public function __construct($originalValue, array $constraints) {
24
+ parent::__construct($originalValue);
25
+
26
+ $this->constraints = $constraints;
27
+ }
28
+
29
+ /**
30
+ * @param Version $version
31
+ *
32
+ * @return bool
33
+ */
34
+ public function complies(Version $version) {
35
+ foreach ($this->constraints as $constraint) {
36
+ if (!$constraint->complies($version)) {
37
+ return false;
38
+ }
39
+ }
40
+
41
+ return true;
42
+ }
43
+ }
vendor/phar-io/version/src/AnyVersionConstraint.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class AnyVersionConstraint implements VersionConstraint {
14
+ /**
15
+ * @param Version $version
16
+ *
17
+ * @return bool
18
+ */
19
+ public function complies(Version $version) {
20
+ return true;
21
+ }
22
+
23
+ /**
24
+ * @return string
25
+ */
26
+ public function asString() {
27
+ return '*';
28
+ }
29
+ }
vendor/phar-io/version/src/ExactVersionConstraint.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class ExactVersionConstraint extends AbstractVersionConstraint {
14
+ /**
15
+ * @param Version $version
16
+ *
17
+ * @return bool
18
+ */
19
+ public function complies(Version $version) {
20
+ return $this->asString() == $version->getVersionString();
21
+ }
22
+ }
vendor/phar-io/version/src/Exception.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ interface Exception {
14
+ }
vendor/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class GreaterThanOrEqualToVersionConstraint extends AbstractVersionConstraint {
14
+ /**
15
+ * @var Version
16
+ */
17
+ private $minimalVersion;
18
+
19
+ /**
20
+ * @param string $originalValue
21
+ * @param Version $minimalVersion
22
+ */
23
+ public function __construct($originalValue, Version $minimalVersion) {
24
+ parent::__construct($originalValue);
25
+
26
+ $this->minimalVersion = $minimalVersion;
27
+ }
28
+
29
+ /**
30
+ * @param Version $version
31
+ *
32
+ * @return bool
33
+ */
34
+ public function complies(Version $version) {
35
+ return $version->getVersionString() == $this->minimalVersion->getVersionString() ||
36
+ $version->isGreaterThan($this->minimalVersion);
37
+ }
38
+ }
vendor/phar-io/version/src/InvalidVersionException.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ namespace PharIo\Version;
3
+
4
+ class InvalidVersionException extends \InvalidArgumentException implements Exception {
5
+ }
vendor/phar-io/version/src/OrVersionConstraintGroup.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class OrVersionConstraintGroup extends AbstractVersionConstraint {
14
+ /**
15
+ * @var VersionConstraint[]
16
+ */
17
+ private $constraints = [];
18
+
19
+ /**
20
+ * @param string $originalValue
21
+ * @param VersionConstraint[] $constraints
22
+ */
23
+ public function __construct($originalValue, array $constraints) {
24
+ parent::__construct($originalValue);
25
+
26
+ $this->constraints = $constraints;
27
+ }
28
+
29
+ /**
30
+ * @param Version $version
31
+ *
32
+ * @return bool
33
+ */
34
+ public function complies(Version $version) {
35
+ foreach ($this->constraints as $constraint) {
36
+ if ($constraint->complies($version)) {
37
+ return true;
38
+ }
39
+ }
40
+
41
+ return false;
42
+ }
43
+ }
vendor/phar-io/version/src/PreReleaseSuffix.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace PharIo\Version;
3
+
4
+ class PreReleaseSuffix
5
+ {
6
+ /**
7
+ * @var string
8
+ */
9
+ private $value;
10
+
11
+ /**
12
+ * @var int
13
+ */
14
+ private $number;
15
+
16
+ /**
17
+ * @param string $value
18
+ * @param int|null $number
19
+ */
20
+ public function __construct($value, $number = null)
21
+ {
22
+ $this->value = $value;
23
+ $this->number = $number;
24
+ }
25
+
26
+ /**
27
+ * @return string
28
+ */
29
+ public function getValue()
30
+ {
31
+ return $this->value;
32
+ }
33
+
34
+ /**
35
+ * @return int|null
36
+ */
37
+ public function getNumber()
38
+ {
39
+ return $this->number;
40
+ }
41
+ }
vendor/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class SpecificMajorAndMinorVersionConstraint extends AbstractVersionConstraint {
14
+ /**
15
+ * @var int
16
+ */
17
+ private $major = 0;
18
+
19
+ /**
20
+ * @var int
21
+ */
22
+ private $minor = 0;
23
+
24
+ /**
25
+ * @param string $originalValue
26
+ * @param int $major
27
+ * @param int $minor
28
+ */
29
+ public function __construct($originalValue, $major, $minor) {
30
+ parent::__construct($originalValue);
31
+
32
+ $this->major = $major;
33
+ $this->minor = $minor;
34
+ }
35
+
36
+ /**
37
+ * @param Version $version
38
+ *
39
+ * @return bool
40
+ */
41
+ public function complies(Version $version) {
42
+ if ($version->getMajor()->getValue() != $this->major) {
43
+ return false;
44
+ }
45
+
46
+ return $version->getMinor()->getValue() == $this->minor;
47
+ }
48
+ }
vendor/phar-io/version/src/SpecificMajorVersionConstraint.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class SpecificMajorVersionConstraint extends AbstractVersionConstraint {
14
+ /**
15
+ * @var int
16
+ */
17
+ private $major = 0;
18
+
19
+ /**
20
+ * @param string $originalValue
21
+ * @param int $major
22
+ */
23
+ public function __construct($originalValue, $major) {
24
+ parent::__construct($originalValue);
25
+
26
+ $this->major = $major;
27
+ }
28
+
29
+ /**
30
+ * @param Version $version
31
+ *
32
+ * @return bool
33
+ */
34
+ public function complies(Version $version) {
35
+ return $version->getMajor()->getValue() == $this->major;
36
+ }
37
+ }
vendor/phar-io/version/src/UnsupportedVersionConstraintException.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ final class UnsupportedVersionConstraintException extends \RuntimeException implements Exception {
14
+ }
vendor/phar-io/version/src/Version.php ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class Version {
14
+ /**
15
+ * @var VersionNumber
16
+ */
17
+ private $major;
18
+
19
+ /**
20
+ * @var VersionNumber
21
+ */
22
+ private $minor;
23
+
24
+ /**
25
+ * @var VersionNumber
26
+ */
27
+ private $patch;
28
+
29
+ /**
30
+ * @var PreReleaseSuffix
31
+ */
32
+ private $preReleaseSuffix;
33
+
34
+ /**
35
+ * @var string
36
+ */
37
+ private $versionString = '';
38
+
39
+ /**
40
+ * @param string $versionString
41
+ */
42
+ public function __construct($versionString) {
43
+ $this->ensureVersionStringIsValid($versionString);
44
+
45
+ $this->versionString = $versionString;
46
+ }
47
+
48
+ /**
49
+ * @param array $matches
50
+ */
51
+ private function parseVersion(array $matches) {
52
+ $this->major = new VersionNumber($matches['Major']);
53
+ $this->minor = new VersionNumber($matches['Minor']);
54
+ $this->patch = isset($matches['Patch']) ? new VersionNumber($matches['Patch']) : new VersionNumber(null);
55
+
56
+ if (isset($matches['ReleaseType'])) {
57
+ $preReleaseNumber = isset($matches['ReleaseTypeCount']) ? (int) $matches['ReleaseTypeCount'] : null;
58
+
59
+ $this->preReleaseSuffix = new PreReleaseSuffix($matches['ReleaseType'], $preReleaseNumber);
60
+ }
61
+ }
62
+
63
+ /**
64
+ * @return PreReleaseSuffix
65
+ */
66
+ public function getPreReleaseSuffix()
67
+ {
68
+ return $this->preReleaseSuffix;
69
+ }
70
+
71
+ /**
72
+ * @return string
73
+ */
74
+ public function getVersionString() {
75
+ return $this->versionString;
76
+ }
77
+
78
+ /**
79
+ * @param Version $version
80
+ *
81
+ * @return bool
82
+ */
83
+ public function isGreaterThan(Version $version) {
84
+ if ($version->getMajor()->getValue() > $this->getMajor()->getValue()) {
85
+ return false;
86
+ }
87
+
88
+ if ($version->getMajor()->getValue() < $this->getMajor()->getValue()) {
89
+ return true;
90
+ }
91
+
92
+ if ($version->getMinor()->getValue() > $this->getMinor()->getValue()) {
93
+ return false;
94
+ }
95
+
96
+ if ($version->getMinor()->getValue() < $this->getMinor()->getValue()) {
97
+ return true;
98
+ }
99
+
100
+ if ($version->getPatch()->getValue() >= $this->getPatch()->getValue()) {
101
+ return false;
102
+ }
103
+
104
+ if ($version->getPatch()->getValue() < $this->getPatch()->getValue()) {
105
+ return true;
106
+ }
107
+
108
+ return false;
109
+ }
110
+
111
+ /**
112
+ * @return VersionNumber
113
+ */
114
+ public function getMajor() {
115
+ return $this->major;
116
+ }
117
+
118
+ /**
119
+ * @return VersionNumber
120
+ */
121
+ public function getMinor() {
122
+ return $this->minor;
123
+ }
124
+
125
+ /**
126
+ * @return VersionNumber
127
+ */
128
+ public function getPatch() {
129
+ return $this->patch;
130
+ }
131
+
132
+ /**
133
+ * @param string $version
134
+ *
135
+ * @throws InvalidVersionException
136
+ */
137
+ private function ensureVersionStringIsValid($version) {
138
+ $regex = '/^v?
139
+ (?<Major>(0|(?:[1-9][0-9]*)))
140
+ \\.
141
+ (?<Minor>(0|(?:[1-9][0-9]*)))
142
+ (\\.
143
+ (?<Patch>(0|(?:[1-9][0-9]*)))
144
+ )?
145
+ (?:
146
+ -
147
+ (?<ReleaseType>(?:(dev|beta|b|RC|alpha|a|patch|p)))
148
+ (?:
149
+ (?<ReleaseTypeCount>[0-9])
150
+ )?
151
+ )?
152
+ $/x';
153
+
154
+ if (preg_match($regex, $version, $matches) !== 1) {
155
+ throw new InvalidVersionException(
156
+ sprintf("Version string '%s' does not follow SemVer semantics", $version)
157
+ );
158
+ }
159
+
160
+ $this->parseVersion($matches);
161
+ }
162
+ }
vendor/phar-io/version/src/VersionConstraint.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ interface VersionConstraint {
14
+ /**
15
+ * @param Version $version
16
+ *
17
+ * @return bool
18
+ */
19
+ public function complies(Version $version);
20
+
21
+ /**
22
+ * @return string
23
+ */
24
+ public function asString();
25
+
26
+ }
vendor/phar-io/version/src/VersionConstraintParser.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class VersionConstraintParser {
14
+ /**
15
+ * @param string $value
16
+ *
17
+ * @return VersionConstraint
18
+ *
19
+ * @throws UnsupportedVersionConstraintException
20
+ */
21
+ public function parse($value) {
22
+
23
+ if (strpos($value, '||') !== false) {
24
+ return $this->handleOrGroup($value);
25
+ }
26
+
27
+ if (!preg_match('/^[\^~\*]?[\d.\*]+$/', $value)) {
28
+ throw new UnsupportedVersionConstraintException(
29
+ sprintf('Version constraint %s is not supported.', $value)
30
+ );
31
+ }
32
+
33
+ switch ($value[0]) {
34
+ case '~':
35
+ return $this->handleTildeOperator($value);
36
+ case '^':
37
+ return $this->handleCaretOperator($value);
38
+ }
39
+
40
+ $version = new VersionConstraintValue($value);
41
+
42
+ if ($version->getMajor()->isAny()) {
43
+ return new AnyVersionConstraint();
44
+ }
45
+
46
+ if ($version->getMinor()->isAny()) {
47
+ return new SpecificMajorVersionConstraint(
48
+ $value,
49
+ $version->getMajor()->getValue()
50
+ );
51
+ }
52
+
53
+ if ($version->getPatch()->isAny()) {
54
+ return new SpecificMajorAndMinorVersionConstraint(
55
+ $value,
56
+ $version->getMajor()->getValue(),
57
+ $version->getMinor()->getValue()
58
+ );
59
+ }
60
+
61
+ return new ExactVersionConstraint($value);
62
+ }
63
+
64
+ /**
65
+ * @param $value
66
+ *
67
+ * @return OrVersionConstraintGroup
68
+ */
69
+ private function handleOrGroup($value) {
70
+ $constraints = [];
71
+
72
+ foreach (explode('||', $value) as $groupSegment) {
73
+ $constraints[] = $this->parse(trim($groupSegment));
74
+ }
75
+
76
+ return new OrVersionConstraintGroup($value, $constraints);
77
+ }
78
+
79
+ /**
80
+ * @param string $value
81
+ *
82
+ * @return AndVersionConstraintGroup
83
+ */
84
+ private function handleTildeOperator($value) {
85
+ $version = new Version(substr($value, 1));
86
+ $constraints = [
87
+ new GreaterThanOrEqualToVersionConstraint($value, $version)
88
+ ];
89
+
90
+ if ($version->getPatch()->isAny()) {
91
+ $constraints[] = new SpecificMajorVersionConstraint(
92
+ $value,
93
+ $version->getMajor()->getValue()
94
+ );
95
+ } else {
96
+ $constraints[] = new SpecificMajorAndMinorVersionConstraint(
97
+ $value,
98
+ $version->getMajor()->getValue(),
99
+ $version->getMinor()->getValue()
100
+ );
101
+ }
102
+
103
+ return new AndVersionConstraintGroup($value, $constraints);
104
+ }
105
+
106
+ /**
107
+ * @param string $value
108
+ *
109
+ * @return AndVersionConstraintGroup
110
+ */
111
+ private function handleCaretOperator($value) {
112
+ $version = new Version(substr($value, 1));
113
+
114
+ return new AndVersionConstraintGroup(
115
+ $value,
116
+ [
117
+ new GreaterThanOrEqualToVersionConstraint($value, $version),
118
+ new SpecificMajorVersionConstraint($value, $version->getMajor()->getValue())
119
+ ]
120
+ );
121
+ }
122
+ }
vendor/phar-io/version/src/VersionConstraintValue.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace PharIo\Version;
3
+
4
+ class VersionConstraintValue
5
+ {
6
+ /**
7
+ * @var VersionNumber
8
+ */
9
+ private $major;
10
+
11
+ /**
12
+ * @var VersionNumber
13
+ */
14
+ private $minor;
15
+
16
+ /**
17
+ * @var VersionNumber
18
+ */
19
+ private $patch;
20
+
21
+ /**
22
+ * @var string
23
+ */
24
+ private $label = '';
25
+
26
+ /**
27
+ * @var string
28
+ */
29
+ private $buildMetaData = '';
30
+
31
+ /**
32
+ * @var string
33
+ */
34
+ private $versionString = '';
35
+
36
+ /**
37
+ * @param string $versionString
38
+ */
39
+ public function __construct($versionString) {
40
+ $this->versionString = $versionString;
41
+
42
+ $this->parseVersion($versionString);
43
+ }
44
+
45
+ /**
46
+ * @param $versionString
47
+ */
48
+ private function parseVersion($versionString) {
49
+ $this->extractBuildMetaData($versionString);
50
+ $this->extractLabel($versionString);
51
+
52
+ $versionSegments = explode('.', $versionString);
53
+ $this->major = new VersionNumber($versionSegments[0]);
54
+
55
+ $minorValue = isset($versionSegments[1]) ? $versionSegments[1] : null;
56
+ $patchValue = isset($versionSegments[2]) ? $versionSegments[2] : null;
57
+
58
+ $this->minor = new VersionNumber($minorValue);
59
+ $this->patch = new VersionNumber($patchValue);
60
+ }
61
+
62
+ /**
63
+ * @param string $versionString
64
+ */
65
+ private function extractBuildMetaData(&$versionString) {
66
+ if (preg_match('/\+(.*)/', $versionString, $matches) == 1) {
67
+ $this->buildMetaData = $matches[1];
68
+ $versionString = str_replace($matches[0], '', $versionString);
69
+ }
70
+ }
71
+
72
+ /**
73
+ * @param string $versionString
74
+ */
75
+ private function extractLabel(&$versionString) {
76
+ if (preg_match('/\-(.*)/', $versionString, $matches) == 1) {
77
+ $this->label = $matches[1];
78
+ $versionString = str_replace($matches[0], '', $versionString);
79
+ }
80
+ }
81
+
82
+ /**
83
+ * @return string
84
+ */
85
+ public function getLabel() {
86
+ return $this->label;
87
+ }
88
+
89
+ /**
90
+ * @return string
91
+ */
92
+ public function getBuildMetaData() {
93
+ return $this->buildMetaData;
94
+ }
95
+
96
+ /**
97
+ * @return string
98
+ */
99
+ public function getVersionString() {
100
+ return $this->versionString;
101
+ }
102
+
103
+ /**
104
+ * @return VersionNumber
105
+ */
106
+ public function getMajor() {
107
+ return $this->major;
108
+ }
109
+
110
+ /**
111
+ * @return VersionNumber
112
+ */
113
+ public function getMinor() {
114
+ return $this->minor;
115
+ }
116
+
117
+ /**
118
+ * @return VersionNumber
119
+ */
120
+ public function getPatch() {
121
+ return $this->patch;
122
+ }
123
+ }
vendor/phar-io/version/src/VersionNumber.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ class VersionNumber {
14
+ /**
15
+ * @var int
16
+ */
17
+ private $value;
18
+
19
+ /**
20
+ * @param mixed $value
21
+ */
22
+ public function __construct($value) {
23
+ if (is_numeric($value)) {
24
+ $this->value = $value;
25
+ }
26
+ }
27
+
28
+ /**
29
+ * @return bool
30
+ */
31
+ public function isAny() {
32
+ return $this->value === null;
33
+ }
34
+
35
+ /**
36
+ * @return int
37
+ */
38
+ public function getValue() {
39
+ return $this->value;
40
+ }
41
+ }
vendor/phar-io/version/tests/Integration/VersionConstraintParserTest.php ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers \PharIo\Version\VersionConstraintParser
17
+ */
18
+ class VersionConstraintParserTest extends TestCase {
19
+ /**
20
+ * @dataProvider versionStringProvider
21
+ *
22
+ * @param string $versionString
23
+ * @param VersionConstraint $expectedConstraint
24
+ */
25
+ public function testReturnsExpectedConstraint($versionString, VersionConstraint $expectedConstraint) {
26
+ $parser = new VersionConstraintParser;
27
+
28
+ $this->assertEquals($expectedConstraint, $parser->parse($versionString));
29
+ }
30
+
31
+ /**
32
+ * @dataProvider unsupportedVersionStringProvider
33
+ *
34
+ * @param string $versionString
35
+ */
36
+ public function testThrowsExceptionIfVersionStringIsNotSupported($versionString) {
37
+ $parser = new VersionConstraintParser;
38
+
39
+ $this->expectException(UnsupportedVersionConstraintException::class);
40
+
41
+ $parser->parse($versionString);
42
+ }
43
+
44
+ /**
45
+ * @return array
46
+ */
47
+ public function versionStringProvider() {
48
+ return [
49
+ ['1.0.2', new ExactVersionConstraint('1.0.2')],
50
+ [
51
+ '~4.6',
52
+ new AndVersionConstraintGroup(
53
+ '~4.6',
54
+ [
55
+ new GreaterThanOrEqualToVersionConstraint('~4.6', new Version('4.6')),
56
+ new SpecificMajorVersionConstraint('~4.6', 4)
57
+ ]
58
+ )
59
+ ],
60
+ [
61
+ '~4.6.2',
62
+ new AndVersionConstraintGroup(
63
+ '~4.6.2',
64
+ [
65
+ new GreaterThanOrEqualToVersionConstraint('~4.6.2', new Version('4.6.2')),
66
+ new SpecificMajorAndMinorVersionConstraint('~4.6.2', 4, 6)
67
+ ]
68
+ )
69
+ ],
70
+ [
71
+ '^2.6.1',
72
+ new AndVersionConstraintGroup(
73
+ '^2.6.1',
74
+ [
75
+ new GreaterThanOrEqualToVersionConstraint('^2.6.1', new Version('2.6.1')),
76
+ new SpecificMajorVersionConstraint('^2.6.1', 2)
77
+ ]
78
+ )
79
+ ],
80
+ ['5.1.*', new SpecificMajorAndMinorVersionConstraint('5.1.*', 5, 1)],
81
+ ['5.*', new SpecificMajorVersionConstraint('5.*', 5)],
82
+ ['*', new AnyVersionConstraint()],
83
+ [
84
+ '1.0.2 || 1.0.5',
85
+ new OrVersionConstraintGroup(
86
+ '1.0.2 || 1.0.5',
87
+ [
88
+ new ExactVersionConstraint('1.0.2'),
89
+ new ExactVersionConstraint('1.0.5')
90
+ ]
91
+ )
92
+ ],
93
+ [
94
+ '^5.6 || ^7.0',
95
+ new OrVersionConstraintGroup(
96
+ '^5.6 || ^7.0',
97
+ [
98
+ new AndVersionConstraintGroup(
99
+ '^5.6', [
100
+ new GreaterThanOrEqualToVersionConstraint('^5.6', new Version('5.6')),
101
+ new SpecificMajorVersionConstraint('^5.6', 5)
102
+ ]
103
+ ),
104
+ new AndVersionConstraintGroup(
105
+ '^7.0', [
106
+ new GreaterThanOrEqualToVersionConstraint('^7.0', new Version('7.0')),
107
+ new SpecificMajorVersionConstraint('^7.0', 7)
108
+ ]
109
+ )
110
+ ]
111
+ )
112
+ ]
113
+ ];
114
+ }
115
+
116
+ public function unsupportedVersionStringProvider() {
117
+ return [
118
+ ['foo'],
119
+ ['+1.0.2'],
120
+ ['>=2.0'],
121
+ ['^5.6 || >= 7.0'],
122
+ ['2.0 || foo']
123
+ ];
124
+ }
125
+ }
vendor/phar-io/version/tests/Unit/AbstractVersionConstraintTest.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers \PharIo\Version\AbstractVersionConstraint
17
+ */
18
+ class AbstractVersionConstraintTest extends TestCase {
19
+ public function testAsString() {
20
+ /** @var AbstractVersionConstraint|\PHPUnit_Framework_MockObject_MockObject $constraint */
21
+ $constraint = $this->getMockForAbstractClass(AbstractVersionConstraint::class, ['foo']);
22
+
23
+ $this->assertSame('foo', $constraint->asString());
24
+ }
25
+ }
vendor/phar-io/version/tests/Unit/AndVersionConstraintGroupTest.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /**
16
+ * @covers PharIo\Version\AndVersionConstraintGroup
17
+ */
18
+ class AndVersionConstraintGroupTest extends TestCase {
19
+ public function testReturnsFalseIfOneConstraintReturnsFalse() {
20
+ $firstConstraint = $this->createMock(VersionConstraint::class);
21
+ $secondConstraint = $this->createMock(VersionConstraint::class);
22
+
23
+ $firstConstraint->expects($this->once())
24
+ ->method('complies')
25
+ ->will($this->returnValue(true));
26
+
27
+ $secondConstraint->expects($this->once())
28
+ ->method('complies')
29
+ ->will($this->returnValue(false));
30
+
31
+ $group = new AndVersionConstraintGroup('foo', [$firstConstraint, $secondConstraint]);
32
+
33
+ $this->assertFalse($group->complies(new Version('1.0.0')));
34
+ }
35
+
36
+ public function testReturnsTrueIfAllConstraintsReturnsTrue() {
37
+ $firstConstraint = $this->createMock(VersionConstraint::class);
38
+ $secondConstraint = $this->createMock(VersionConstraint::class);
39
+
40
+ $firstConstraint->expects($this->once())
41
+ ->method('complies')
42
+ ->will($this->returnValue(true));
43
+
44
+ $secondConstraint->expects($this->once())
45
+ ->method('complies')
46
+ ->will($this->returnValue(true));
47
+
48
+ $group = new AndVersionConstraintGroup('foo', [$firstConstraint, $secondConstraint]);
49
+
50
+ $this->assertTrue($group->complies(new Version('1.0.0')));
51
+ }
52
+ }
vendor/phar-io/version/tests/Unit/AnyVersionConstraintTest.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This file is part of PharIo\Version.
4
+ *
5
+ * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace PharIo\Version;
12
+
13
+ use PHPUnit\Framework\TestCase;
14
+
15
+ /