sdc-build-wp 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/composer.json +2 -3
  2. package/composer.lock +3 -313
  3. package/index.js +38 -21
  4. package/lib/blocks.js +8 -6
  5. package/lib/style.js +17 -0
  6. package/package.json +1 -1
  7. package/vendor/composer/autoload_classmap.php +0 -37
  8. package/vendor/composer/autoload_psr4.php +0 -1
  9. package/vendor/composer/autoload_real.php +2 -0
  10. package/vendor/composer/autoload_static.php +0 -53
  11. package/vendor/composer/installed.json +1 -329
  12. package/vendor/composer/installed.php +3 -39
  13. package/vendor/composer/platform_check.php +26 -0
  14. package/lib/bustCache.js +0 -14
  15. package/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md +0 -22
  16. package/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md +0 -285
  17. package/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json +0 -71
  18. package/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php +0 -637
  19. package/vendor/phpcsstandards/phpcsextra/CHANGELOG.md +0 -590
  20. package/vendor/phpcsstandards/phpcsextra/LICENSE +0 -165
  21. package/vendor/phpcsstandards/phpcsextra/Modernize/Docs/FunctionCalls/DirnameStandard.xml +0 -40
  22. package/vendor/phpcsstandards/phpcsextra/Modernize/Sniffs/FunctionCalls/DirnameSniff.php +0 -382
  23. package/vendor/phpcsstandards/phpcsextra/Modernize/ruleset.xml +0 -5
  24. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/ArrayBraceSpacingStandard.xml +0 -94
  25. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/CommaAfterLastStandard.xml +0 -43
  26. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/ArrayBraceSpacingSniff.php +0 -305
  27. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/CommaAfterLastSniff.php +0 -226
  28. package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/ruleset.xml +0 -5
  29. package/vendor/phpcsstandards/phpcsextra/README.md +0 -573
  30. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DisallowShortArraySyntaxStandard.xml +0 -27
  31. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DuplicateArrayKeyStandard.xml +0 -44
  32. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedArrayKeyTypesStandard.xml +0 -40
  33. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedKeyedUnkeyedArrayStandard.xml +0 -31
  34. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowAnonClassParenthesesStandard.xml +0 -24
  35. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowFinalClassStandard.xml +0 -25
  36. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/ModifierKeywordOrderStandard.xml +0 -27
  37. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireAnonClassParenthesesStandard.xml +0 -23
  38. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireFinalClassStandard.xml +0 -25
  39. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ConstructorDestructorReturnStandard.xml +0 -64
  40. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ForeachUniqueAssignmentStandard.xml +0 -26
  41. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml +0 -27
  42. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoEchoSprintfStandard.xml +0 -25
  43. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/StaticInFinalClassStandard.xml +0 -43
  44. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/LowercaseClassResolutionKeywordStandard.xml +0 -23
  45. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/ModifierKeywordOrderStandard.xml +0 -30
  46. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/UppercaseMagicConstantsStandard.xml +0 -25
  47. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowAlternativeSyntaxStandard.xml +0 -35
  48. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowLonelyIfStandard.xml +0 -49
  49. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/IfElseDeclarationStandard.xml +0 -37
  50. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Files/SeparateFunctionsFromOOStandard.xml +0 -45
  51. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/NoLongClosuresStandard.xml +0 -42
  52. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/RequireFinalMethodsInTraitsStandard.xml +0 -33
  53. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowLongListSyntaxStandard.xml +0 -23
  54. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowShortListSyntaxStandard.xml +0 -23
  55. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowCurlyBraceSyntaxStandard.xml +0 -27
  56. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowDeclarationWithoutNameStandard.xml +0 -25
  57. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/EnforceCurlyBraceSyntaxStandard.xml +0 -27
  58. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/OneDeclarationPerFileStandard.xml +0 -27
  59. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/NamingConventions/NoReservedKeywordParameterNamesStandard.xml +0 -23
  60. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/OOStructures/AlphabeticExtendsImplementsStandard.xml +0 -27
  61. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/ConcatPositionStandard.xml +0 -31
  62. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowLogicalAndOrStandard.xml +0 -30
  63. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowShortTernaryStandard.xml +0 -26
  64. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowStandalonePostIncrementDecrementStandard.xml +0 -44
  65. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/StrictComparisonsStandard.xml +0 -29
  66. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/TypeSeparatorSpacingStandard.xml +0 -33
  67. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/LowercasePHPTagStandard.xml +0 -25
  68. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/OneStatementInShortEchoTagStandard.xml +0 -41
  69. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowMixedGroupUseStandard.xml +0 -39
  70. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseClassStandard.xml +0 -25
  71. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseConstStandard.xml +0 -25
  72. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseFunctionStandard.xml +0 -25
  73. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/KeywordSpacingStandard.xml +0 -29
  74. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/LowercaseFunctionConstStandard.xml +0 -25
  75. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoLeadingBackslashStandard.xml +0 -23
  76. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoUselessAliasesStandard.xml +0 -30
  77. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/AnonClassKeywordSpacingStandard.xml +0 -31
  78. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/CommaSpacingStandard.xml +0 -94
  79. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/DisallowInlineTabsStandard.xml +0 -25
  80. package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/PrecisionAlignmentStandard.xml +0 -29
  81. package/vendor/phpcsstandards/phpcsextra/Universal/Helpers/DummyTokenizer.php +0 -60
  82. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php +0 -89
  83. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php +0 -297
  84. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedArrayKeyTypesSniff.php +0 -174
  85. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedKeyedUnkeyedArraySniff.php +0 -134
  86. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowAnonClassParenthesesSniff.php +0 -112
  87. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowFinalClassSniff.php +0 -116
  88. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/ModifierKeywordOrderSniff.php +0 -188
  89. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireAnonClassParenthesesSniff.php +0 -81
  90. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireFinalClassSniff.php +0 -102
  91. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php +0 -211
  92. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ForeachUniqueAssignmentSniff.php +0 -153
  93. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoDoubleNegativeSniff.php +0 -269
  94. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoEchoSprintfSniff.php +0 -131
  95. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/StaticInFinalClassSniff.php +0 -216
  96. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/LowercaseClassResolutionKeywordSniff.php +0 -106
  97. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/ModifierKeywordOrderSniff.php +0 -199
  98. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/UppercaseMagicConstantsSniff.php +0 -89
  99. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowAlternativeSyntaxSniff.php +0 -216
  100. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php +0 -348
  101. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/IfElseDeclarationSniff.php +0 -164
  102. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Files/SeparateFunctionsFromOOSniff.php +0 -190
  103. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/NoLongClosuresSniff.php +0 -233
  104. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/RequireFinalMethodsInTraitsSniff.php +0 -120
  105. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowLongListSyntaxSniff.php +0 -71
  106. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowShortListSyntaxSniff.php +0 -86
  107. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowCurlyBraceSyntaxSniff.php +0 -81
  108. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowDeclarationWithoutNameSniff.php +0 -80
  109. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/EnforceCurlyBraceSyntaxSniff.php +0 -81
  110. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/OneDeclarationPerFileSniff.php +0 -96
  111. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/NamingConventions/NoReservedKeywordParameterNamesSniff.php +0 -190
  112. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/OOStructures/AlphabeticExtendsImplementsSniff.php +0 -275
  113. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/ConcatPositionSniff.php +0 -204
  114. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowLogicalAndOrSniff.php +0 -112
  115. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowShortTernarySniff.php +0 -76
  116. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowStandalonePostIncrementDecrementSniff.php +0 -197
  117. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/StrictComparisonsSniff.php +0 -116
  118. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/TypeSeparatorSpacingSniff.php +0 -85
  119. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/LowercasePHPTagSniff.php +0 -87
  120. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php +0 -101
  121. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowMixedGroupUseSniff.php +0 -248
  122. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseClassSniff.php +0 -211
  123. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseConstSniff.php +0 -211
  124. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseFunctionSniff.php +0 -211
  125. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/KeywordSpacingSniff.php +0 -207
  126. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/LowercaseFunctionConstSniff.php +0 -156
  127. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoLeadingBackslashSniff.php +0 -170
  128. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoUselessAliasesSniff.php +0 -155
  129. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/AnonClassKeywordSpacingSniff.php +0 -79
  130. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php +0 -408
  131. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php +0 -173
  132. package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php +0 -445
  133. package/vendor/phpcsstandards/phpcsextra/Universal/ruleset.xml +0 -5
  134. package/vendor/phpcsstandards/phpcsextra/composer.json +0 -69
  135. package/vendor/phpcsstandards/phpcsutils/.phpdoc.xml.dist +0 -36
  136. package/vendor/phpcsstandards/phpcsutils/CHANGELOG.md +0 -1106
  137. package/vendor/phpcsstandards/phpcsutils/LICENSE +0 -165
  138. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php +0 -551
  139. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php +0 -781
  140. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php +0 -123
  141. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php +0 -202
  142. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php +0 -44
  143. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php +0 -47
  144. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php +0 -43
  145. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php +0 -50
  146. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php +0 -246
  147. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php +0 -218
  148. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php +0 -687
  149. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php +0 -269
  150. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php +0 -164
  151. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php +0 -75
  152. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php +0 -459
  153. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php +0 -837
  154. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php +0 -55
  155. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php +0 -227
  156. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php +0 -156
  157. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php +0 -232
  158. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php +0 -276
  159. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php +0 -828
  160. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php +0 -262
  161. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php +0 -359
  162. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php +0 -145
  163. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php +0 -389
  164. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php +0 -116
  165. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php +0 -322
  166. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php +0 -359
  167. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php +0 -252
  168. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php +0 -120
  169. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php +0 -419
  170. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php +0 -510
  171. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php +0 -143
  172. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php +0 -331
  173. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php +0 -432
  174. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php +0 -333
  175. package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/ruleset.xml +0 -4
  176. package/vendor/phpcsstandards/phpcsutils/README.md +0 -297
  177. package/vendor/phpcsstandards/phpcsutils/composer.json +0 -92
  178. package/vendor/phpcsstandards/phpcsutils/phpcsutils-autoload.php +0 -68
  179. package/vendor/wp-coding-standards/wpcs/CHANGELOG.md +0 -1654
  180. package/vendor/wp-coding-standards/wpcs/LICENSE +0 -21
  181. package/vendor/wp-coding-standards/wpcs/README.md +0 -261
  182. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractArrayAssignmentRestrictionsSniff.php +0 -261
  183. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractClassRestrictionsSniff.php +0 -257
  184. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionParameterSniff.php +0 -111
  185. package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php +0 -358
  186. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayIndentationStandard.xml +0 -116
  187. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayKeySpacingRestrictionsStandard.xml +0 -31
  188. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml +0 -50
  189. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/CodeAnalysis/EscapedNotTranslatedStandard.xml +0 -24
  190. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml +0 -35
  191. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml +0 -54
  192. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml +0 -119
  193. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidHookNameStandard.xml +0 -35
  194. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml +0 -121
  195. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/IniSetStandard.xml +0 -40
  196. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/StrictInArrayStandard.xml +0 -53
  197. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/YodaConditionsStandard.xml +0 -27
  198. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Security/SafeRedirectStandard.xml +0 -23
  199. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapabilitiesStandard.xml +0 -69
  200. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapitalPDangitStandard.xml +0 -43
  201. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/ClassNameCaseStandard.xml +0 -23
  202. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml +0 -45
  203. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedClassesStandard.xml +0 -23
  204. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedFunctionsStandard.xml +0 -23
  205. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml +0 -23
  206. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParametersStandard.xml +0 -40
  207. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourceParametersStandard.xml +0 -92
  208. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml +0 -57
  209. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/PostsPerPageStandard.xml +0 -73
  210. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml +0 -27
  211. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ControlStructureSpacingStandard.xml +0 -150
  212. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml +0 -19
  213. package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/OperatorSpacingStandard.xml +0 -61
  214. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ArrayWalkingFunctionsHelper.php +0 -108
  215. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ConstantsHelper.php +0 -135
  216. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ContextHelper.php +0 -394
  217. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/DeprecationHelper.php +0 -84
  218. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/EscapingFunctionsTrait.php +0 -256
  219. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/FormattingFunctionsHelper.php +0 -60
  220. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/IsUnitTestTrait.php +0 -238
  221. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ListHelper.php +0 -101
  222. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/MinimumWPVersionTrait.php +0 -159
  223. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/PrintingFunctionsTrait.php +0 -122
  224. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/RulesetPropertyHelper.php +0 -73
  225. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SanitizationHelperTrait.php +0 -418
  226. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SnakeCaseHelper.php +0 -60
  227. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/UnslashingFunctionsHelper.php +0 -59
  228. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ValidationHelper.php +0 -349
  229. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/VariableHelper.php +0 -262
  230. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPDBTrait.php +0 -115
  231. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPGlobalVariablesHelper.php +0 -312
  232. package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPHookHelper.php +0 -113
  233. package/vendor/wp-coding-standards/wpcs/WordPress/Sniff.php +0 -72
  234. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php +0 -252
  235. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php +0 -550
  236. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php +0 -174
  237. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php +0 -583
  238. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/AssignmentInTernaryConditionSniff.php +0 -173
  239. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php +0 -89
  240. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php +0 -301
  241. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php +0 -761
  242. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLSniff.php +0 -242
  243. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedClassesSniff.php +0 -57
  244. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php +0 -63
  245. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/SlowDBQuerySniff.php +0 -58
  246. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php +0 -168
  247. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php +0 -59
  248. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Files/FileNameSniff.php +0 -313
  249. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php +0 -1297
  250. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidFunctionNameSniff.php +0 -188
  251. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php +0 -277
  252. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php +0 -230
  253. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php +0 -289
  254. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php +0 -63
  255. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php +0 -100
  256. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DontExtractSniff.php +0 -52
  257. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/IniSetSniff.php +0 -193
  258. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php +0 -245
  259. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php +0 -73
  260. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php +0 -70
  261. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php +0 -45
  262. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/StrictInArraySniff.php +0 -122
  263. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/TypeCastsSniff.php +0 -90
  264. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/YodaConditionsSniff.php +0 -124
  265. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/EscapeOutputSniff.php +0 -903
  266. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/NonceVerificationSniff.php +0 -422
  267. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/PluginMenuSlugSniff.php +0 -126
  268. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/SafeRedirectSniff.php +0 -45
  269. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php +0 -244
  270. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php +0 -862
  271. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php +0 -371
  272. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapabilitiesSniff.php +0 -478
  273. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapitalPDangitSniff.php +0 -315
  274. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/ClassNameCaseSniff.php +0 -897
  275. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CronIntervalSniff.php +0 -321
  276. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedClassesSniff.php +0 -152
  277. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php +0 -1708
  278. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php +0 -291
  279. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParametersSniff.php +0 -509
  280. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php +0 -160
  281. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php +0 -54
  282. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php +0 -241
  283. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourcesSniff.php +0 -108
  284. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php +0 -436
  285. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php +0 -977
  286. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/PostsPerPageSniff.php +0 -102
  287. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php +0 -59
  288. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php +0 -486
  289. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php +0 -63
  290. package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php +0 -60
  291. package/vendor/wp-coding-standards/wpcs/WordPress/ruleset.xml +0 -13
  292. package/vendor/wp-coding-standards/wpcs/WordPress-Core/ruleset.xml +0 -948
  293. package/vendor/wp-coding-standards/wpcs/WordPress-Docs/ruleset.xml +0 -109
  294. package/vendor/wp-coding-standards/wpcs/WordPress-Extra/ruleset.xml +0 -199
  295. package/vendor/wp-coding-standards/wpcs/composer.json +0 -88
  296. package/vendor/wp-coding-standards/wpcs/phpcs.xml.dist.sample +0 -153
@@ -1,40 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="Deprecated Function Parameters"
5
- >
6
- <standard>
7
- <![CDATA[
8
- Please refrain from passing deprecated WordPress function parameters.
9
- In case, you need to pass an optional parameter positioned <em>after</em> the deprecated parameter, only ever pass the default value.
10
- ]]>
11
- </standard>
12
- <code_comparison>
13
- <code title="Valid: not passing a deprecated parameter.">
14
- <![CDATA[
15
- // First - and only - parameter deprecated.
16
- get_the_author();
17
- ]]>
18
- </code>
19
- <code title="Invalid: passing a deprecated parameter.">
20
- <![CDATA[
21
- // First - and only - parameter deprecated.
22
- get_the_author( <em>$string</em> );
23
- ]]>
24
- </code>
25
- </code_comparison>
26
- <code_comparison>
27
- <code title="Valid: passing default value for a deprecated parameter.">
28
- <![CDATA[
29
- // Third parameter deprecated in WP 2.3.0.
30
- add_option( 'option_name', 123, <em>''</em>, 'yes' );
31
- ]]>
32
- </code>
33
- <code title="Invalid: not passing the default value for a deprecated parameter.">
34
- <![CDATA[
35
- // Third parameter deprecated in WP 2.3.0.
36
- add_option( 'my_name', 123, <em>'oops'</em>, 'yes' );
37
- ]]>
38
- </code>
39
- </code_comparison>
40
- </documentation>
@@ -1,92 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="Enqueued Resource Parameters"
5
- >
6
- <standard>
7
- <![CDATA[
8
- The resource version must be set, to prevent the browser from using an outdated, cached version after the resource has been updated.
9
- ]]>
10
- </standard>
11
- <code_comparison>
12
- <code title="Valid: Resource has a version number.">
13
- <![CDATA[
14
- wp_register_style(
15
- 'someStyle-css',
16
- $path_to_local_file,
17
- array(),
18
- <em>'1.0.0'</em>
19
- );
20
- ]]>
21
- </code>
22
- <code title="Invalid: Resource has no version number set.">
23
- <![CDATA[
24
- wp_register_style(
25
- 'someStyle-css',
26
- $path_to_local_file,
27
- array()
28
- );
29
- ]]>
30
- </code>
31
- </code_comparison>
32
- <standard>
33
- <![CDATA[
34
- The resource version must not be `false`. When this value is set to `false`, the WordPress Core version number will be used, which is incorrect for themes and plugins.
35
- ]]>
36
- </standard>
37
- <code_comparison>
38
- <code title="Valid: Resource has a version number.">
39
- <![CDATA[
40
- wp_enqueue_script(
41
- 'someScript-js',
42
- $path_to_local_file,
43
- array( 'jquery' ),
44
- <em>'1.0.0'</em>,
45
- true
46
- );
47
- ]]>
48
- </code>
49
- <code title="Invalid: Resource has version set to false.">
50
- <![CDATA[
51
- wp_enqueue_script(
52
- 'someScript-js',
53
- $path_to_local_file,
54
- array( 'jquery' ),
55
- <em>false</em>,
56
- true
57
- );
58
- ]]>
59
- </code>
60
- </code_comparison>
61
- <standard>
62
- <![CDATA[
63
- You must explicitly set a JavaScript resource to load in either the header or the footer of your page. It is recommended to load these resources in the footer by setting the `$in_footer` parameter to `true`.
64
-
65
- Loading scripts in the header blocks parsing of the page and has a negative impact on load times. However, loading in the footer may break compatibility when other scripts rely on the resource to be available at any time.
66
- In that case, you can pass `false` to make it explicit that the script should be loaded in the header of the page.
67
- ]]>
68
- </standard>
69
- <code_comparison>
70
- <code title="Valid: The resource is specified to load in the footer.">
71
- <![CDATA[
72
- wp_register_script(
73
- 'someScript-js',
74
- $path_to_local_file,
75
- array( 'jquery' ),
76
- '1.0.0',
77
- <em>true</em>
78
- );
79
- ]]>
80
- </code>
81
- <code title="Invalid: The location to load this resource is not explicitly set.">
82
- <![CDATA[
83
- wp_register_script(
84
- 'someScript-js',
85
- $path_to_local_file,
86
- array( 'jquery' ),
87
- '1.0.0'
88
- );
89
- ]]>
90
- </code>
91
- </code_comparison>
92
- </documentation>
@@ -1,57 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="Enqueued Resources"
5
- >
6
- <standard>
7
- <![CDATA[
8
- Scripts must be registered/enqueued via wp_enqueue_script().
9
- ]]>
10
- </standard>
11
- <code_comparison>
12
- <code title="Valid: Script registered and enqueued correctly.">
13
- <![CDATA[
14
- <em>wp_enqueue_script</em>(
15
- 'someScript-js',
16
- $path_to_file,
17
- array( 'jquery' ),
18
- '1.0.0',
19
- true
20
- );
21
- ]]>
22
- </code>
23
- <code title="Invalid: Script is directly embedded in HTML.">
24
- <![CDATA[
25
- printf(
26
- '<em><script src="%s"></script></em>',
27
- esc_url( $path_to_file )
28
- );
29
- ]]>
30
- </code>
31
- </code_comparison>
32
- <standard>
33
- <![CDATA[
34
- Stylesheets must be registered/enqueued via wp_enqueue_style().
35
- ]]>
36
- </standard>
37
- <code_comparison>
38
- <code title="Valid: Stylesheet registered and enqueued correctly.">
39
- <![CDATA[
40
- <em>wp_enqueue_style</em>(
41
- 'style-name',
42
- $path_to_file,
43
- array(),
44
- '1.0.0'
45
- );
46
- ]]>
47
- </code>
48
- <code title="Invalid: Stylesheet is directly embedded in HTML.">
49
- <![CDATA[
50
- printf(
51
- '<em><link rel="stylesheet" href="%s" /></em>',
52
- esc_url( $path_to_file )
53
- );
54
- ]]>
55
- </code>
56
- </code_comparison>
57
- </documentation>
@@ -1,73 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="High Posts Per Page Limit"
5
- >
6
- <standard>
7
- <![CDATA[
8
- Using "posts_per_page" or "numberposts" with the value set to an high number opens up the potential for making requests slow if the query ends up querying thousands of posts.
9
-
10
- You should always fetch the lowest number possible that still gives you the number of results you find acceptable.
11
- ]]>
12
- </standard>
13
- <code_comparison>
14
- <code title="Valid: posts_per_page is not over limit (default 100).">
15
- <![CDATA[
16
- $args = array(
17
- 'posts_per_page' => <em>-1</em>,
18
- );
19
- $args = array(
20
- 'posts_per_page' => <em>100</em>,
21
- );
22
- $args = array(
23
- 'posts_per_page' => <em>'10'</em>,
24
- );
25
-
26
- $query_args['posts_per_page'] = <em>100</em>;
27
-
28
- _query_posts( 'nopaging=1&posts_per_page=<em>50</em>' );
29
- ]]>
30
- </code>
31
- <code title="Invalid: posts_per_page is over limit (default 100).">
32
- <![CDATA[
33
- $args = array(
34
- 'posts_per_page' => <em>101</em>,
35
- );
36
-
37
- $query_args['posts_per_page'] = <em>200</em>;
38
-
39
- _query_posts( 'nopaging=1&posts_per_page=<em>999</em>' );
40
- ]]>
41
- </code>
42
- </code_comparison>
43
- <code_comparison>
44
- <code title="Valid: numberposts is not over limit (default 100).">
45
- <![CDATA[
46
- $args = array(
47
- 'numberposts' => <em>-1</em>,
48
- );
49
- $args = array(
50
- 'numberposts' => <em>100</em>,
51
- );
52
- $args = array(
53
- 'numberposts' => <em>'10'</em>,
54
- );
55
-
56
- $query_args['numberposts'] = <em>'-1'<em>;
57
-
58
- _query_posts( 'numberposts=<em>50</em>' );
59
- ]]>
60
- </code>
61
- <code title="Invalid: numberposts is over limit (default 100).">
62
- <![CDATA[
63
- $args = array(
64
- 'numberposts' => <em>101</em>,
65
- );
66
-
67
- $query_args['numberposts'] = <em>'200'</em>;
68
-
69
- _query_posts( 'numberposts=<em>999</em>' );
70
- ]]>
71
- </code>
72
- </code_comparison>
73
- </documentation>
@@ -1,27 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="Cast Structure Spacing"
5
- >
6
- <standard>
7
- <![CDATA[
8
- A type cast should be preceded by whitespace.
9
- There is only one exception to this rule: when the cast is preceded by the spread operator there should be no space between the spread operator and the cast.
10
- ]]>
11
- </standard>
12
- <code_comparison>
13
- <code title="Valid: space before typecast.">
14
- <![CDATA[
15
- $a =<em> </em>(int) '420';
16
-
17
- // No space between spread operator and cast.
18
- $a = function_call( <em>...(array)</em> $mixed );
19
- ]]>
20
- </code>
21
- <code title="Invalid: no space before typecast.">
22
- <![CDATA[
23
- $a <em>=(</em>int) '420';
24
- ]]>
25
- </code>
26
- </code_comparison>
27
- </documentation>
@@ -1,150 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="Control Structure Spacing"
5
- >
6
- <standard>
7
- <![CDATA[
8
- Put one space on both sides of the opening and closing parentheses of control structures.
9
- ]]>
10
- </standard>
11
- <code_comparison>
12
- <code title="Valid: One space on each side of the open and close parentheses.">
13
- <![CDATA[
14
- while<em> ( </em>have_posts()<em> ) </em>{}
15
-
16
- // For multi-line conditions,
17
- // a new line is also accepted.
18
- if<em> ( </em>true === $condition
19
- && $count > 10
20
- <em>) </em>{}
21
- ]]>
22
- </code>
23
- <code title="Invalid: Incorrect spacing around the open and close parentheses.">
24
- <![CDATA[
25
- // No spaces.
26
- while<em>(</em>have_posts()<em>)</em>{}
27
-
28
- // Too much space.
29
- while<em> ( </em>have_posts()<em> ) </em>{}
30
- ]]>
31
- </code>
32
- </code_comparison>
33
- <standard>
34
- <![CDATA[
35
- The open brace for the control structure must be on the same line as the close parenthesis or the control structure keyword, with one space between them.
36
- ]]>
37
- </standard>
38
- <code_comparison>
39
- <code title="Valid: Open brace on the same line as the keyword/close parenthesis.">
40
- <![CDATA[
41
- try<em> {</em>
42
- // Do something.
43
- } catch (
44
- ExceptionA | ExceptionB $e
45
- <em>) {</em>
46
- }
47
- ]]>
48
- </code>
49
- <code title="Invalid: Open brace on a different line than the keyword/close parenthesis.">
50
- <![CDATA[
51
- try
52
- <em>{</em>
53
- // Do something.
54
- } catch ( Exception $e )
55
- <em>(</em>
56
- }
57
- ]]>
58
- </code>
59
- </code_comparison>
60
- <code_comparison>
61
- <code title="Valid: One space between the keyword/close parenthesis and the open brace.">
62
- <![CDATA[
63
- if ( $condition )<em> </em>{
64
- // Do something.
65
- }
66
- ]]>
67
- </code>
68
- <code title="Invalid: Too much space between the keyword/close parenthesis and the open brace.">
69
- <![CDATA[
70
- if ( $condition )<em> </em>{
71
- // Do something.
72
- }
73
- ]]>
74
- </code>
75
- </code_comparison>
76
- <standard>
77
- <![CDATA[
78
- When using alternative control structure syntaxes, there should be one space between the close parenthesis and the colon opening the control structure body.
79
- ]]>
80
- </standard>
81
- <code_comparison>
82
- <code title="Valid: One space before the colon.">
83
- <![CDATA[
84
- foreach ( $types as $type )<em> </em>:
85
- // Do something.
86
- endforeach;
87
- ]]>
88
- </code>
89
- <code title="Invalid: No space before the colon.">
90
- <![CDATA[
91
- foreach ( $types as $type )<em></em>:
92
- // Do something.
93
- endforeach;
94
- ]]>
95
- </code>
96
- </code_comparison>
97
- <standard>
98
- <![CDATA[
99
- When a control structure is nested in another control structure and the closing braces follow each other, there should be no blank line between the closing braces.
100
- ]]>
101
- </standard>
102
- <code_comparison>
103
- <code title="Valid: No blank line between the consecutive close braces.">
104
- <![CDATA[
105
- if ( $a === $b ) {
106
- if ( $something ) {
107
- // Do something.
108
- }
109
- }
110
- ]]>
111
- </code>
112
- <code title="Invalid: Blank line(s) between the consecutive close braces.">
113
- <![CDATA[
114
- if ( $a === $b ) {
115
- if ( $something ) {
116
- // Do something.
117
- }<em>
118
-
119
-
120
- </em>}
121
- ]]>
122
- </code>
123
- </code_comparison>
124
- <standard>
125
- <![CDATA[
126
- [Optional, turned off by default]
127
- There should be no blank line(s) at the start or end of the control structure body.
128
- ]]>
129
- </standard>
130
- <code_comparison>
131
- <code title="Valid: No blank lines at the start or end of the control structure body.">
132
- <![CDATA[
133
- if ( $a === $b ) {
134
- echo $a;
135
- }
136
- ]]>
137
- </code>
138
- <code title="Invalid: Blank line(s) at the start and end of the control structure body.">
139
- <![CDATA[
140
- if ( $a === $b ) {
141
- <em>
142
-
143
- </em> echo $a;
144
- <em>
145
-
146
- </em>}
147
- ]]>
148
- </code>
149
- </code_comparison>
150
- </documentation>
@@ -1,19 +0,0 @@
1
- <documentation title="Object Operator Spacing">
2
- <standard>
3
- <![CDATA[
4
- The object operators (->, ?->, ::) should not have any spaces around them, though new lines are allowed except for use with the `::class` constant.
5
- ]]>
6
- </standard>
7
- <code_comparison>
8
- <code title="Valid: No spaces around the object operator.">
9
- <![CDATA[
10
- $foo<em></em>-><em></em>bar();
11
- ]]>
12
- </code>
13
- <code title="Invalid: Whitespace surrounding the object operator.">
14
- <![CDATA[
15
- $foo<em> </em>?-><em> </em>bar();
16
- ]]>
17
- </code>
18
- </code_comparison>
19
- </documentation>
@@ -1,61 +0,0 @@
1
- <?xml version="1.0"?>
2
- <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
- xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4
- title="Operator Spacing"
5
- >
6
- <standard>
7
- <![CDATA[
8
- Always put one space on both sides of logical, comparison and concatenation operators.
9
- Always put one space after an assignment operator.
10
- ]]>
11
- </standard>
12
- <code_comparison>
13
- <code title="Valid: one space before and after an operator.">
14
- <![CDATA[
15
- if ( $a<em> === </em>$b<em> && </em>$b<em> === </em>$c ) {}
16
- if (<em> ! </em>$var ) {}
17
- ]]>
18
- </code>
19
- <code title="Invalid: too much/little space.">
20
- <![CDATA[
21
- // Too much space.
22
- if ( $a === $b<em> && </em>$b<em> === </em>$c ) {}
23
- if (<em> ! </em>$var ) {}
24
-
25
- // Too little space.
26
- if ( $a<em>===</em>$b<em> &&</em>$b<em> ===</em>$c ) {}
27
- if (<em> !</em>$var ) {}
28
- ]]>
29
- </code>
30
- </code_comparison>
31
- <code_comparison>
32
- <code title="Valid: a new line instead of a space is okay too.">
33
- <![CDATA[
34
- if ( $a === $b<em>
35
- && </em>$b === $c
36
- ) {}
37
- ]]>
38
- </code>
39
- <code title="Invalid: too much space after operator on new line.">
40
- <![CDATA[
41
- if ( $a === $b<em>
42
- && </em>$b === $c
43
- ) {}
44
- ]]>
45
- </code>
46
- </code_comparison>
47
- <code_comparison>
48
- <code title="Valid: one space after assignment operator.">
49
- <![CDATA[
50
- $a <em>= </em>'foo';
51
- $all <em>= </em>'foobar';
52
- ]]>
53
- </code>
54
- <code title="Invalid: too much/little space after assignment operator.">
55
- <![CDATA[
56
- $a <em>= </em>'foo';
57
- $all <em>=</em>'foobar';
58
- ]]>
59
- </code>
60
- </code_comparison>
61
- </documentation>
@@ -1,108 +0,0 @@
1
- <?php
2
- /**
3
- * WordPress Coding Standard.
4
- *
5
- * @package WPCS\WordPressCodingStandards
6
- * @link https://github.com/WordPress/WordPress-Coding-Standards
7
- * @license https://opensource.org/licenses/MIT MIT
8
- */
9
-
10
- namespace WordPressCS\WordPress\Helpers;
11
-
12
- use PHP_CodeSniffer\Files\File;
13
- use PHPCSUtils\Utils\PassedParameters;
14
-
15
- /**
16
- * Helper functions and function lists for checking whether a function applies a callback to an array.
17
- *
18
- * @since 3.0.0 The property in this class was previously contained in the
19
- * `WordPressCS\WordPress\Sniff` class and has been moved here.
20
- */
21
- final class ArrayWalkingFunctionsHelper {
22
-
23
- /**
24
- * List of array functions which apply a callback to the array.
25
- *
26
- * These are often used for sanitization/escaping an array variable.
27
- *
28
- * Note: functions which alter the array by reference are not listed here on purpose.
29
- * These cannot easily be used for sanitization as they can't be combined with unslashing.
30
- * Similarly, they cannot be used for late escaping as the return value is a boolean, not
31
- * the altered array.
32
- *
33
- * @since 2.1.0
34
- * @since 3.0.0 - Moved from the Sniff class to this class.
35
- * - Visibility changed from protected to private and property made static.
36
- * Use the `get_functions()` method for access.
37
- * - The value has changed from an integer to an array containing the integer
38
- * parameter position + its name.
39
- *
40
- * @var array<string, array>
41
- */
42
- private static $arrayWalkingFunctions = array(
43
- 'array_map' => array(
44
- 'position' => 1,
45
- 'name' => 'callback',
46
- ),
47
- 'map_deep' => array(
48
- 'position' => 2,
49
- 'name' => 'callback',
50
- ),
51
- );
52
-
53
- /**
54
- * Retrieve a list of the supported "array walking" functions.
55
- *
56
- * @since 3.0.0
57
- *
58
- * @return array<string, bool>
59
- */
60
- public static function get_functions() {
61
- return \array_fill_keys( \array_keys( self::$arrayWalkingFunctions ), true );
62
- }
63
-
64
- /**
65
- * Check if a particular function is an "array walking" function.
66
- *
67
- * @since 3.0.0
68
- *
69
- * @param string $functionName The name of the function to check.
70
- *
71
- * @return bool
72
- */
73
- public static function is_array_walking_function( $functionName ) {
74
- return isset( self::$arrayWalkingFunctions[ strtolower( $functionName ) ] );
75
- }
76
-
77
- /**
78
- * Retrieve the parameter information for the callback parameter for an array walking function.
79
- *
80
- * @since 3.0.0
81
- *
82
- * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where this token was found.
83
- * @param int $stackPtr The position of function call name token.
84
- *
85
- * @return array|false Array with information on the callback parameter.
86
- * Or `FALSE` if the parameter is not found.
87
- * See the PHPCSUtils PassedParameters::getParameters() documentation
88
- * for the format of the returned (single-dimensional) array.
89
- */
90
- public static function get_callback_parameter( File $phpcsFile, $stackPtr ) {
91
- $tokens = $phpcsFile->getTokens();
92
- if ( isset( $tokens[ $stackPtr ] ) === false ) {
93
- return false;
94
- }
95
-
96
- $functionName = strtolower( $tokens[ $stackPtr ]['content'] );
97
- if ( isset( self::$arrayWalkingFunctions[ $functionName ] ) === false ) {
98
- return false;
99
- }
100
-
101
- return PassedParameters::getParameter(
102
- $phpcsFile,
103
- $stackPtr,
104
- self::$arrayWalkingFunctions[ $functionName ]['position'],
105
- self::$arrayWalkingFunctions[ $functionName ]['name']
106
- );
107
- }
108
- }