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.
- package/composer.json +2 -3
- package/composer.lock +3 -313
- package/index.js +38 -21
- package/lib/blocks.js +8 -6
- package/lib/style.js +17 -0
- package/package.json +1 -1
- package/vendor/composer/autoload_classmap.php +0 -37
- package/vendor/composer/autoload_psr4.php +0 -1
- package/vendor/composer/autoload_real.php +2 -0
- package/vendor/composer/autoload_static.php +0 -53
- package/vendor/composer/installed.json +1 -329
- package/vendor/composer/installed.php +3 -39
- package/vendor/composer/platform_check.php +26 -0
- package/lib/bustCache.js +0 -14
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/LICENSE.md +0 -22
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/README.md +0 -285
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/composer.json +0 -71
- package/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php +0 -637
- package/vendor/phpcsstandards/phpcsextra/CHANGELOG.md +0 -590
- package/vendor/phpcsstandards/phpcsextra/LICENSE +0 -165
- package/vendor/phpcsstandards/phpcsextra/Modernize/Docs/FunctionCalls/DirnameStandard.xml +0 -40
- package/vendor/phpcsstandards/phpcsextra/Modernize/Sniffs/FunctionCalls/DirnameSniff.php +0 -382
- package/vendor/phpcsstandards/phpcsextra/Modernize/ruleset.xml +0 -5
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/ArrayBraceSpacingStandard.xml +0 -94
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/CommaAfterLastStandard.xml +0 -43
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/ArrayBraceSpacingSniff.php +0 -305
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/CommaAfterLastSniff.php +0 -226
- package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/ruleset.xml +0 -5
- package/vendor/phpcsstandards/phpcsextra/README.md +0 -573
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DisallowShortArraySyntaxStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/DuplicateArrayKeyStandard.xml +0 -44
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedArrayKeyTypesStandard.xml +0 -40
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Arrays/MixedKeyedUnkeyedArrayStandard.xml +0 -31
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowAnonClassParenthesesStandard.xml +0 -24
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/DisallowFinalClassStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/ModifierKeywordOrderStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireAnonClassParenthesesStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Classes/RequireFinalClassStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ConstructorDestructorReturnStandard.xml +0 -64
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/ForeachUniqueAssignmentStandard.xml +0 -26
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoDoubleNegativeStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/NoEchoSprintfStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/CodeAnalysis/StaticInFinalClassStandard.xml +0 -43
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/LowercaseClassResolutionKeywordStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/ModifierKeywordOrderStandard.xml +0 -30
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Constants/UppercaseMagicConstantsStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowAlternativeSyntaxStandard.xml +0 -35
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/DisallowLonelyIfStandard.xml +0 -49
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/ControlStructures/IfElseDeclarationStandard.xml +0 -37
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Files/SeparateFunctionsFromOOStandard.xml +0 -45
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/NoLongClosuresStandard.xml +0 -42
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/FunctionDeclarations/RequireFinalMethodsInTraitsStandard.xml +0 -33
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowLongListSyntaxStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Lists/DisallowShortListSyntaxStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowCurlyBraceSyntaxStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/DisallowDeclarationWithoutNameStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/EnforceCurlyBraceSyntaxStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Namespaces/OneDeclarationPerFileStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/NamingConventions/NoReservedKeywordParameterNamesStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/OOStructures/AlphabeticExtendsImplementsStandard.xml +0 -27
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/ConcatPositionStandard.xml +0 -31
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowLogicalAndOrStandard.xml +0 -30
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowShortTernaryStandard.xml +0 -26
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/DisallowStandalonePostIncrementDecrementStandard.xml +0 -44
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/StrictComparisonsStandard.xml +0 -29
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/Operators/TypeSeparatorSpacingStandard.xml +0 -33
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/LowercasePHPTagStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/PHP/OneStatementInShortEchoTagStandard.xml +0 -41
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowMixedGroupUseStandard.xml +0 -39
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseClassStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseConstStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/DisallowUseFunctionStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/KeywordSpacingStandard.xml +0 -29
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/LowercaseFunctionConstStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoLeadingBackslashStandard.xml +0 -23
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/UseStatements/NoUselessAliasesStandard.xml +0 -30
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/AnonClassKeywordSpacingStandard.xml +0 -31
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/CommaSpacingStandard.xml +0 -94
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/DisallowInlineTabsStandard.xml +0 -25
- package/vendor/phpcsstandards/phpcsextra/Universal/Docs/WhiteSpace/PrecisionAlignmentStandard.xml +0 -29
- package/vendor/phpcsstandards/phpcsextra/Universal/Helpers/DummyTokenizer.php +0 -60
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php +0 -89
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/DuplicateArrayKeySniff.php +0 -297
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedArrayKeyTypesSniff.php +0 -174
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Arrays/MixedKeyedUnkeyedArraySniff.php +0 -134
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowAnonClassParenthesesSniff.php +0 -112
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/DisallowFinalClassSniff.php +0 -116
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/ModifierKeywordOrderSniff.php +0 -188
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireAnonClassParenthesesSniff.php +0 -81
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Classes/RequireFinalClassSniff.php +0 -102
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ConstructorDestructorReturnSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/ForeachUniqueAssignmentSniff.php +0 -153
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoDoubleNegativeSniff.php +0 -269
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/NoEchoSprintfSniff.php +0 -131
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/CodeAnalysis/StaticInFinalClassSniff.php +0 -216
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/LowercaseClassResolutionKeywordSniff.php +0 -106
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/ModifierKeywordOrderSniff.php +0 -199
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Constants/UppercaseMagicConstantsSniff.php +0 -89
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowAlternativeSyntaxSniff.php +0 -216
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/DisallowLonelyIfSniff.php +0 -348
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/ControlStructures/IfElseDeclarationSniff.php +0 -164
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Files/SeparateFunctionsFromOOSniff.php +0 -190
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/NoLongClosuresSniff.php +0 -233
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/FunctionDeclarations/RequireFinalMethodsInTraitsSniff.php +0 -120
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowLongListSyntaxSniff.php +0 -71
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Lists/DisallowShortListSyntaxSniff.php +0 -86
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowCurlyBraceSyntaxSniff.php +0 -81
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/DisallowDeclarationWithoutNameSniff.php +0 -80
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/EnforceCurlyBraceSyntaxSniff.php +0 -81
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Namespaces/OneDeclarationPerFileSniff.php +0 -96
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/NamingConventions/NoReservedKeywordParameterNamesSniff.php +0 -190
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/OOStructures/AlphabeticExtendsImplementsSniff.php +0 -275
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/ConcatPositionSniff.php +0 -204
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowLogicalAndOrSniff.php +0 -112
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowShortTernarySniff.php +0 -76
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/DisallowStandalonePostIncrementDecrementSniff.php +0 -197
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/StrictComparisonsSniff.php +0 -116
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/Operators/TypeSeparatorSpacingSniff.php +0 -85
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/LowercasePHPTagSniff.php +0 -87
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/PHP/OneStatementInShortEchoTagSniff.php +0 -101
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowMixedGroupUseSniff.php +0 -248
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseClassSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseConstSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/DisallowUseFunctionSniff.php +0 -211
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/KeywordSpacingSniff.php +0 -207
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/LowercaseFunctionConstSniff.php +0 -156
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoLeadingBackslashSniff.php +0 -170
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/UseStatements/NoUselessAliasesSniff.php +0 -155
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/AnonClassKeywordSpacingSniff.php +0 -79
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/CommaSpacingSniff.php +0 -408
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/DisallowInlineTabsSniff.php +0 -173
- package/vendor/phpcsstandards/phpcsextra/Universal/Sniffs/WhiteSpace/PrecisionAlignmentSniff.php +0 -445
- package/vendor/phpcsstandards/phpcsextra/Universal/ruleset.xml +0 -5
- package/vendor/phpcsstandards/phpcsextra/composer.json +0 -69
- package/vendor/phpcsstandards/phpcsutils/.phpdoc.xml.dist +0 -36
- package/vendor/phpcsstandards/phpcsutils/CHANGELOG.md +0 -1106
- package/vendor/phpcsstandards/phpcsutils/LICENSE +0 -165
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php +0 -551
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php +0 -781
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php +0 -123
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php +0 -202
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php +0 -44
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php +0 -47
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php +0 -43
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php +0 -50
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php +0 -246
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php +0 -218
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php +0 -687
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php +0 -269
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php +0 -164
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php +0 -75
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php +0 -459
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php +0 -837
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php +0 -55
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php +0 -227
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php +0 -156
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php +0 -232
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php +0 -276
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php +0 -828
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php +0 -262
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php +0 -359
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php +0 -145
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php +0 -389
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php +0 -116
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php +0 -322
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php +0 -359
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php +0 -252
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php +0 -120
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php +0 -419
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php +0 -510
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php +0 -143
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php +0 -331
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php +0 -432
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php +0 -333
- package/vendor/phpcsstandards/phpcsutils/PHPCSUtils/ruleset.xml +0 -4
- package/vendor/phpcsstandards/phpcsutils/README.md +0 -297
- package/vendor/phpcsstandards/phpcsutils/composer.json +0 -92
- package/vendor/phpcsstandards/phpcsutils/phpcsutils-autoload.php +0 -68
- package/vendor/wp-coding-standards/wpcs/CHANGELOG.md +0 -1654
- package/vendor/wp-coding-standards/wpcs/LICENSE +0 -21
- package/vendor/wp-coding-standards/wpcs/README.md +0 -261
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractArrayAssignmentRestrictionsSniff.php +0 -261
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractClassRestrictionsSniff.php +0 -257
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionParameterSniff.php +0 -111
- package/vendor/wp-coding-standards/wpcs/WordPress/AbstractFunctionRestrictionsSniff.php +0 -358
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayIndentationStandard.xml +0 -116
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/ArrayKeySpacingRestrictionsStandard.xml +0 -31
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml +0 -50
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/CodeAnalysis/EscapedNotTranslatedStandard.xml +0 -24
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml +0 -35
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/DateTime/RestrictedFunctionsStandard.xml +0 -54
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml +0 -119
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidHookNameStandard.xml +0 -35
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml +0 -121
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/IniSetStandard.xml +0 -40
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/StrictInArrayStandard.xml +0 -53
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/PHP/YodaConditionsStandard.xml +0 -27
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/Security/SafeRedirectStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapabilitiesStandard.xml +0 -69
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CapitalPDangitStandard.xml +0 -43
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/ClassNameCaseStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml +0 -45
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedClassesStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedFunctionsStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml +0 -23
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/DeprecatedParametersStandard.xml +0 -40
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourceParametersStandard.xml +0 -92
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml +0 -57
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/PostsPerPageStandard.xml +0 -73
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/CastStructureSpacingStandard.xml +0 -27
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ControlStructureSpacingStandard.xml +0 -150
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/ObjectOperatorSpacingStandard.xml +0 -19
- package/vendor/wp-coding-standards/wpcs/WordPress/Docs/WhiteSpace/OperatorSpacingStandard.xml +0 -61
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ArrayWalkingFunctionsHelper.php +0 -108
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ConstantsHelper.php +0 -135
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ContextHelper.php +0 -394
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/DeprecationHelper.php +0 -84
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/EscapingFunctionsTrait.php +0 -256
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/FormattingFunctionsHelper.php +0 -60
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/IsUnitTestTrait.php +0 -238
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ListHelper.php +0 -101
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/MinimumWPVersionTrait.php +0 -159
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/PrintingFunctionsTrait.php +0 -122
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/RulesetPropertyHelper.php +0 -73
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SanitizationHelperTrait.php +0 -418
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/SnakeCaseHelper.php +0 -60
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/UnslashingFunctionsHelper.php +0 -59
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/ValidationHelper.php +0 -349
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/VariableHelper.php +0 -262
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPDBTrait.php +0 -115
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPGlobalVariablesHelper.php +0 -312
- package/vendor/wp-coding-standards/wpcs/WordPress/Helpers/WPHookHelper.php +0 -113
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniff.php +0 -72
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayDeclarationSpacingSniff.php +0 -252
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayIndentationSniff.php +0 -550
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/ArrayKeySpacingRestrictionsSniff.php +0 -174
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Arrays/MultipleStatementAlignmentSniff.php +0 -583
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/AssignmentInTernaryConditionSniff.php +0 -173
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/CodeAnalysis/EscapedNotTranslatedSniff.php +0 -89
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/DirectDatabaseQuerySniff.php +0 -301
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php +0 -761
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/PreparedSQLSniff.php +0 -242
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedClassesSniff.php +0 -57
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/RestrictedFunctionsSniff.php +0 -63
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DB/SlowDBQuerySniff.php +0 -58
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/CurrentTimeTimestampSniff.php +0 -168
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/DateTime/RestrictedFunctionsSniff.php +0 -59
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Files/FileNameSniff.php +0 -313
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php +0 -1297
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidFunctionNameSniff.php +0 -188
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidHookNameSniff.php +0 -277
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidPostTypeSlugSniff.php +0 -230
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php +0 -289
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DevelopmentFunctionsSniff.php +0 -63
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DiscouragedPHPFunctionsSniff.php +0 -100
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/DontExtractSniff.php +0 -52
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/IniSetSniff.php +0 -193
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/NoSilencedErrorsSniff.php +0 -245
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/POSIXFunctionsSniff.php +0 -73
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/PregQuoteDelimiterSniff.php +0 -70
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/RestrictedPHPFunctionsSniff.php +0 -45
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/StrictInArraySniff.php +0 -122
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/TypeCastsSniff.php +0 -90
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/PHP/YodaConditionsSniff.php +0 -124
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/EscapeOutputSniff.php +0 -903
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/NonceVerificationSniff.php +0 -422
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/PluginMenuSlugSniff.php +0 -126
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/SafeRedirectSniff.php +0 -45
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Security/ValidatedSanitizedInputSniff.php +0 -244
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/Utils/I18nTextDomainFixerSniff.php +0 -862
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/AlternativeFunctionsSniff.php +0 -371
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapabilitiesSniff.php +0 -478
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CapitalPDangitSniff.php +0 -315
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/ClassNameCaseSniff.php +0 -897
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/CronIntervalSniff.php +0 -321
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedClassesSniff.php +0 -152
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedFunctionsSniff.php +0 -1708
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParameterValuesSniff.php +0 -291
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DeprecatedParametersSniff.php +0 -509
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedConstantsSniff.php +0 -160
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/DiscouragedFunctionsSniff.php +0 -54
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourceParametersSniff.php +0 -241
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/EnqueuedResourcesSniff.php +0 -108
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/GlobalVariablesOverrideSniff.php +0 -436
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php +0 -977
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/PostsPerPageSniff.php +0 -102
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/CastStructureSpacingSniff.php +0 -59
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php +0 -486
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php +0 -63
- package/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WhiteSpace/OperatorSpacingSniff.php +0 -60
- package/vendor/wp-coding-standards/wpcs/WordPress/ruleset.xml +0 -13
- package/vendor/wp-coding-standards/wpcs/WordPress-Core/ruleset.xml +0 -948
- package/vendor/wp-coding-standards/wpcs/WordPress-Docs/ruleset.xml +0 -109
- package/vendor/wp-coding-standards/wpcs/WordPress-Extra/ruleset.xml +0 -199
- package/vendor/wp-coding-standards/wpcs/composer.json +0 -88
- package/vendor/wp-coding-standards/wpcs/phpcs.xml.dist.sample +0 -153
package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Docs/Arrays/CommaAfterLastStandard.xml
DELETED
|
@@ -1,43 +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="Comma After Last Array Item"
|
|
5
|
-
>
|
|
6
|
-
<standard>
|
|
7
|
-
<![CDATA[
|
|
8
|
-
For single-line arrays, there should be <em>no</em> comma after the last array item.
|
|
9
|
-
|
|
10
|
-
However, for multi-line arrays, there <em>should</em> be a comma after the last array item.
|
|
11
|
-
]]>
|
|
12
|
-
</standard>
|
|
13
|
-
<code_comparison>
|
|
14
|
-
<code title="Valid: Single-line array without a comma after the last item">
|
|
15
|
-
<![CDATA[
|
|
16
|
-
$args = array(1, 2, 3);
|
|
17
|
-
]]>
|
|
18
|
-
</code>
|
|
19
|
-
<code title="Invalid: Single-line array with a comma after the last item">
|
|
20
|
-
<![CDATA[
|
|
21
|
-
$args = array(1, 2, 3<em>,</em> );
|
|
22
|
-
]]>
|
|
23
|
-
</code>
|
|
24
|
-
</code_comparison>
|
|
25
|
-
<code_comparison>
|
|
26
|
-
<code title="Valid: Multi-line array with a comma after the last item">
|
|
27
|
-
<![CDATA[
|
|
28
|
-
$args = [
|
|
29
|
-
1 => 'foo',
|
|
30
|
-
2 => 'bar'<em>,</em>
|
|
31
|
-
];
|
|
32
|
-
]]>
|
|
33
|
-
</code>
|
|
34
|
-
<code title="Invalid: Multi-line array without a comma after the last item">
|
|
35
|
-
<![CDATA[
|
|
36
|
-
$args = [
|
|
37
|
-
1 => 'foo',
|
|
38
|
-
2 => 'bar'
|
|
39
|
-
];
|
|
40
|
-
]]>
|
|
41
|
-
</code>
|
|
42
|
-
</code_comparison>
|
|
43
|
-
</documentation>
|
package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/ArrayBraceSpacingSniff.php
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/**
|
|
3
|
-
* PHPCSExtra, a collection of sniffs and standards for use with PHP_CodeSniffer.
|
|
4
|
-
*
|
|
5
|
-
* @package PHPCSExtra
|
|
6
|
-
* @copyright 2020 PHPCSExtra Contributors
|
|
7
|
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
|
8
|
-
* @link https://github.com/PHPCSStandards/PHPCSExtra
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
namespace PHPCSExtra\NormalizedArrays\Sniffs\Arrays;
|
|
12
|
-
|
|
13
|
-
use PHP_CodeSniffer\Files\File;
|
|
14
|
-
use PHP_CodeSniffer\Sniffs\Sniff;
|
|
15
|
-
use PHP_CodeSniffer\Util\Tokens;
|
|
16
|
-
use PHPCSUtils\Fixers\SpacesFixer;
|
|
17
|
-
use PHPCSUtils\Tokens\Collections;
|
|
18
|
-
use PHPCSUtils\Utils\Arrays;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Enforce consistent spacing for the open/close braces of arrays.
|
|
22
|
-
*
|
|
23
|
-
* The sniff allows for having different settings for:
|
|
24
|
-
* - space between the `array` keyword and the open parenthesis for long arrays;
|
|
25
|
-
* - spaces on the inside of the braces for single-line arrays;
|
|
26
|
-
* - spaces on the inside of the braces for multi-line arrays;
|
|
27
|
-
* - spaces on the inside of the braces for empty arrays.
|
|
28
|
-
*
|
|
29
|
-
* Note: If 'newline' is expected and _no_ new line is encountered, a new line will be
|
|
30
|
-
* added, but no assumptions will be made about the intended indentation of the code.
|
|
31
|
-
* This should be handled by a (separate) indentation sniff.
|
|
32
|
-
*
|
|
33
|
-
* @since 1.0.0
|
|
34
|
-
*/
|
|
35
|
-
final class ArrayBraceSpacingSniff implements Sniff
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Number of spaces which should be between the `array` keyword and the open parenthesis for long arrays.
|
|
40
|
-
*
|
|
41
|
-
* Accepted values:
|
|
42
|
-
* - (int) number of spaces.
|
|
43
|
-
* - or `false` to turn this check off.
|
|
44
|
-
*
|
|
45
|
-
* Defaults to 0 spaces.
|
|
46
|
-
*
|
|
47
|
-
* @since 1.0.0
|
|
48
|
-
*
|
|
49
|
-
* @var int|false
|
|
50
|
-
*/
|
|
51
|
-
public $keywordSpacing = 0;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Number of spaces to enforce between the braces for an empty array.
|
|
55
|
-
*
|
|
56
|
-
* Accepted values:
|
|
57
|
-
* - (string) 'newline'
|
|
58
|
-
* - (int) number of spaces.
|
|
59
|
-
* - or `false` to turn this check off.
|
|
60
|
-
*
|
|
61
|
-
* Defaults to 0 spaces.
|
|
62
|
-
*
|
|
63
|
-
* @since 1.0.0
|
|
64
|
-
*
|
|
65
|
-
* @var string|int|false
|
|
66
|
-
*/
|
|
67
|
-
public $spacesWhenEmpty = 0;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Number of spaces which should be on the inside of array braces for a single-line array.
|
|
71
|
-
*
|
|
72
|
-
* Accepted values:
|
|
73
|
-
* - (int) number of spaces.
|
|
74
|
-
* - or `false` to turn this check off.
|
|
75
|
-
*
|
|
76
|
-
* Defaults to 0 spaces.
|
|
77
|
-
*
|
|
78
|
-
* @since 1.0.0
|
|
79
|
-
*
|
|
80
|
-
* @var int|false
|
|
81
|
-
*/
|
|
82
|
-
public $spacesSingleLine = 0;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Number of spaces which should be on the inside of array braces for a multi-line array.
|
|
86
|
-
*
|
|
87
|
-
* Accepted values:
|
|
88
|
-
* - (string) 'newline'
|
|
89
|
-
* - (int) number of spaces.
|
|
90
|
-
* - or `false` to turn this check off.
|
|
91
|
-
*
|
|
92
|
-
* Defaults to 'newline'.
|
|
93
|
-
*
|
|
94
|
-
* @since 1.0.0
|
|
95
|
-
*
|
|
96
|
-
* @var string|int|false
|
|
97
|
-
*/
|
|
98
|
-
public $spacesMultiLine = 'newline';
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Returns an array of tokens this test wants to listen for.
|
|
102
|
-
*
|
|
103
|
-
* @since 1.0.0
|
|
104
|
-
*
|
|
105
|
-
* @return array<int|string>
|
|
106
|
-
*/
|
|
107
|
-
public function register()
|
|
108
|
-
{
|
|
109
|
-
return Collections::arrayOpenTokensBC();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Processes this test when one of its tokens is encountered.
|
|
114
|
-
*
|
|
115
|
-
* @since 1.0.0
|
|
116
|
-
*
|
|
117
|
-
* @param \PHP_CodeSniffer\Files\File $phpcsFile The PHP_CodeSniffer file where the
|
|
118
|
-
* token was found.
|
|
119
|
-
* @param int $stackPtr The position in the PHP_CodeSniffer
|
|
120
|
-
* file's token stack where the token
|
|
121
|
-
* was found.
|
|
122
|
-
*
|
|
123
|
-
* @return void
|
|
124
|
-
*/
|
|
125
|
-
public function process(File $phpcsFile, $stackPtr)
|
|
126
|
-
{
|
|
127
|
-
/*
|
|
128
|
-
* Normalize the public settings.
|
|
129
|
-
*/
|
|
130
|
-
if ($this->keywordSpacing !== false) {
|
|
131
|
-
$this->keywordSpacing = \max((int) $this->keywordSpacing, 0);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if ($this->spacesSingleLine !== false) {
|
|
135
|
-
$this->spacesSingleLine = \max((int) $this->spacesSingleLine, 0);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if ($this->spacesMultiLine !== false && $this->spacesMultiLine !== 'newline') {
|
|
139
|
-
$this->spacesMultiLine = \max((int) $this->spacesMultiLine, 0);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if ($this->spacesWhenEmpty !== false && $this->spacesWhenEmpty !== 'newline') {
|
|
143
|
-
$this->spacesWhenEmpty = \max((int) $this->spacesWhenEmpty, 0);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if ($this->keywordSpacing === false
|
|
147
|
-
&& $this->spacesSingleLine === false
|
|
148
|
-
&& $this->spacesMultiLine === false
|
|
149
|
-
&& $this->spacesWhenEmpty === false
|
|
150
|
-
) {
|
|
151
|
-
// Nothing to do. Why was the sniff turned on at all ?
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
$openClose = Arrays::getOpenClose($phpcsFile, $stackPtr);
|
|
156
|
-
if ($openClose === false) {
|
|
157
|
-
// Live coding, short list or real square brackets.
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
$tokens = $phpcsFile->getTokens();
|
|
162
|
-
$opener = $openClose['opener'];
|
|
163
|
-
$closer = $openClose['closer'];
|
|
164
|
-
|
|
165
|
-
/*
|
|
166
|
-
* Check the spacing between the array keyword and the open parenthesis for long arrays.
|
|
167
|
-
*/
|
|
168
|
-
if ($tokens[$stackPtr]['code'] === \T_ARRAY && $this->keywordSpacing !== false) {
|
|
169
|
-
$error = 'There should be %s between the "array" keyword and the open parenthesis. Found: %s';
|
|
170
|
-
$code = 'SpaceAfterKeyword';
|
|
171
|
-
|
|
172
|
-
SpacesFixer::checkAndFix(
|
|
173
|
-
$phpcsFile,
|
|
174
|
-
$stackPtr,
|
|
175
|
-
$opener,
|
|
176
|
-
$this->keywordSpacing,
|
|
177
|
-
$error,
|
|
178
|
-
$code,
|
|
179
|
-
'error',
|
|
180
|
-
0,
|
|
181
|
-
'Space between array keyword and open brace'
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/*
|
|
186
|
-
* Check for empty arrays.
|
|
187
|
-
*/
|
|
188
|
-
$nextNonWhiteSpace = $phpcsFile->findNext(\T_WHITESPACE, ($opener + 1), null, true);
|
|
189
|
-
if ($nextNonWhiteSpace === $closer) {
|
|
190
|
-
if ($this->spacesWhenEmpty === false) {
|
|
191
|
-
// Check was turned off.
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
$error = 'There should be %s between the array opener and closer for an empty array. Found: %s';
|
|
196
|
-
$code = 'EmptyArraySpacing';
|
|
197
|
-
|
|
198
|
-
SpacesFixer::checkAndFix(
|
|
199
|
-
$phpcsFile,
|
|
200
|
-
$opener,
|
|
201
|
-
$closer,
|
|
202
|
-
$this->spacesWhenEmpty,
|
|
203
|
-
$error,
|
|
204
|
-
$code,
|
|
205
|
-
'error',
|
|
206
|
-
0,
|
|
207
|
-
'Space between open and close brace for an empty array'
|
|
208
|
-
);
|
|
209
|
-
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/*
|
|
214
|
-
* Check non-empty arrays.
|
|
215
|
-
*/
|
|
216
|
-
if ($tokens[$opener]['line'] === $tokens[$closer]['line']) {
|
|
217
|
-
// Single line array.
|
|
218
|
-
if ($this->spacesSingleLine === false) {
|
|
219
|
-
// Check was turned off.
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
$error = 'Expected %s after the array opener in a single line array. Found: %s';
|
|
224
|
-
$code = 'SpaceAfterArrayOpenerSingleLine';
|
|
225
|
-
|
|
226
|
-
SpacesFixer::checkAndFix(
|
|
227
|
-
$phpcsFile,
|
|
228
|
-
$opener,
|
|
229
|
-
$phpcsFile->findNext(\T_WHITESPACE, ($opener + 1), null, true),
|
|
230
|
-
$this->spacesSingleLine,
|
|
231
|
-
$error,
|
|
232
|
-
$code,
|
|
233
|
-
'error',
|
|
234
|
-
0,
|
|
235
|
-
'Space after array opener, single line array'
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
$error = 'Expected %s before the array closer in a single line array. Found: %s';
|
|
239
|
-
$code = 'SpaceBeforeArrayCloserSingleLine';
|
|
240
|
-
|
|
241
|
-
SpacesFixer::checkAndFix(
|
|
242
|
-
$phpcsFile,
|
|
243
|
-
$closer,
|
|
244
|
-
$phpcsFile->findPrevious(\T_WHITESPACE, ($closer - 1), null, true),
|
|
245
|
-
$this->spacesSingleLine,
|
|
246
|
-
$error,
|
|
247
|
-
$code,
|
|
248
|
-
'error',
|
|
249
|
-
0,
|
|
250
|
-
'Space before array closer, single line array'
|
|
251
|
-
);
|
|
252
|
-
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Multi-line array.
|
|
257
|
-
if ($this->spacesMultiLine === false) {
|
|
258
|
-
// Check was turned off.
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
$error = 'Expected %s after the array opener in a multi line array. Found: %s';
|
|
263
|
-
$code = 'SpaceAfterArrayOpenerMultiLine';
|
|
264
|
-
|
|
265
|
-
$nextNonWhitespace = $phpcsFile->findNext(\T_WHITESPACE, ($opener + 1), null, true);
|
|
266
|
-
if ($this->spacesMultiLine === 'newline') {
|
|
267
|
-
// Check for a trailing comment after the array opener and allow for it.
|
|
268
|
-
if (($tokens[$nextNonWhitespace]['code'] === \T_COMMENT
|
|
269
|
-
|| isset(Tokens::$phpcsCommentTokens[$tokens[$nextNonWhitespace]['code']]) === true)
|
|
270
|
-
&& $tokens[$nextNonWhitespace]['line'] === $tokens[$opener]['line']
|
|
271
|
-
) {
|
|
272
|
-
// We found a trailing comment after array opener. Treat that as the opener instead.
|
|
273
|
-
$opener = $nextNonWhitespace;
|
|
274
|
-
$nextNonWhitespace = $phpcsFile->findNext(\T_WHITESPACE, ($opener + 1), null, true);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
SpacesFixer::checkAndFix(
|
|
279
|
-
$phpcsFile,
|
|
280
|
-
$opener,
|
|
281
|
-
$nextNonWhitespace,
|
|
282
|
-
$this->spacesMultiLine,
|
|
283
|
-
$error,
|
|
284
|
-
$code,
|
|
285
|
-
'error',
|
|
286
|
-
0,
|
|
287
|
-
'Space after array opener, multi-line array'
|
|
288
|
-
);
|
|
289
|
-
|
|
290
|
-
$error = 'Expected %s before the array closer in a multi line array. Found: %s';
|
|
291
|
-
$code = 'SpaceBeforeArrayCloserMultiLine';
|
|
292
|
-
|
|
293
|
-
SpacesFixer::checkAndFix(
|
|
294
|
-
$phpcsFile,
|
|
295
|
-
$closer,
|
|
296
|
-
$phpcsFile->findPrevious(\T_WHITESPACE, ($closer - 1), null, true),
|
|
297
|
-
$this->spacesMultiLine,
|
|
298
|
-
$error,
|
|
299
|
-
$code,
|
|
300
|
-
'error',
|
|
301
|
-
0,
|
|
302
|
-
'Space before array closer, multi-line array'
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
}
|
package/vendor/phpcsstandards/phpcsextra/NormalizedArrays/Sniffs/Arrays/CommaAfterLastSniff.php
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/**
|
|
3
|
-
* PHPCSExtra, a collection of sniffs and standards for use with PHP_CodeSniffer.
|
|
4
|
-
*
|
|
5
|
-
* @package PHPCSExtra
|
|
6
|
-
* @copyright 2020 PHPCSExtra Contributors
|
|
7
|
-
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
|
|
8
|
-
* @link https://github.com/PHPCSStandards/PHPCSExtra
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
namespace PHPCSExtra\NormalizedArrays\Sniffs\Arrays;
|
|
12
|
-
|
|
13
|
-
use PHP_CodeSniffer\Files\File;
|
|
14
|
-
use PHP_CodeSniffer\Sniffs\Sniff;
|
|
15
|
-
use PHP_CodeSniffer\Util\Tokens;
|
|
16
|
-
use PHPCSUtils\Tokens\Collections;
|
|
17
|
-
use PHPCSUtils\Utils\Arrays;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Enforce/forbid a comma after the last item in an array declaration.
|
|
21
|
-
*
|
|
22
|
-
* Allows for different settings for single-line and multi-line arrays.
|
|
23
|
-
*
|
|
24
|
-
* @since 1.0.0
|
|
25
|
-
*/
|
|
26
|
-
final class CommaAfterLastSniff implements Sniff
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Name of the metric.
|
|
31
|
-
*
|
|
32
|
-
* @since 1.0.0
|
|
33
|
-
*
|
|
34
|
-
* @var string
|
|
35
|
-
*/
|
|
36
|
-
const METRIC_NAME = '%s array - comma after last item';
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Whether or not to enforce a comma after the last array item in a single-line array.
|
|
40
|
-
*
|
|
41
|
-
* Valid values:
|
|
42
|
-
* - 'enforce' to always demand a comma after the last item in single-line arrays;
|
|
43
|
-
* - 'forbid' to disallow a comma after the last item in single-line arrays;
|
|
44
|
-
* - 'skip' to ignore single-line arrays.
|
|
45
|
-
*
|
|
46
|
-
* Defaults to: 'forbid'.
|
|
47
|
-
*
|
|
48
|
-
* @since 1.0.0
|
|
49
|
-
*
|
|
50
|
-
* @var string
|
|
51
|
-
*/
|
|
52
|
-
public $singleLine = 'forbid';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Whether or not to enforce a comma after the last array item in a multi-line array.
|
|
56
|
-
*
|
|
57
|
-
* Valid values:
|
|
58
|
-
* - 'enforce' to always demand a comma after the last item in single-line arrays;
|
|
59
|
-
* - 'forbid' to disallow a comma after the last item in single-line arrays;
|
|
60
|
-
* - 'skip' to ignore multi-line arrays.
|
|
61
|
-
*
|
|
62
|
-
* Defaults to: 'enforce'.
|
|
63
|
-
*
|
|
64
|
-
* @since 1.0.0
|
|
65
|
-
*
|
|
66
|
-
* @var string
|
|
67
|
-
*/
|
|
68
|
-
public $multiLine = 'enforce';
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The input values to consider as valid for the public properties.
|
|
72
|
-
*
|
|
73
|
-
* Used for input validation.
|
|
74
|
-
*
|
|
75
|
-
* @since 1.0.0
|
|
76
|
-
*
|
|
77
|
-
* @var array<string, true>
|
|
78
|
-
*/
|
|
79
|
-
private $validValues = [
|
|
80
|
-
'enforce' => true,
|
|
81
|
-
'forbid' => true,
|
|
82
|
-
'skip' => true,
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Returns an array of tokens this test wants to listen for.
|
|
87
|
-
*
|
|
88
|
-
* @since 1.0.0
|
|
89
|
-
*
|
|
90
|
-
* @return array<int|string>
|
|
91
|
-
*/
|
|
92
|
-
public function register()
|
|
93
|
-
{
|
|
94
|
-
return Collections::arrayOpenTokensBC();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Processes this test, when one of its tokens is encountered.
|
|
99
|
-
*
|
|
100
|
-
* @since 1.0.0
|
|
101
|
-
*
|
|
102
|
-
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
|
|
103
|
-
* @param int $stackPtr The position of the current token
|
|
104
|
-
* in the stack passed in $tokens.
|
|
105
|
-
*
|
|
106
|
-
* @return void
|
|
107
|
-
*/
|
|
108
|
-
public function process(File $phpcsFile, $stackPtr)
|
|
109
|
-
{
|
|
110
|
-
// Validate the property input. Invalid values will result in the check being skipped.
|
|
111
|
-
if (isset($this->validValues[$this->singleLine]) === false) {
|
|
112
|
-
$this->singleLine = 'skip';
|
|
113
|
-
}
|
|
114
|
-
if (isset($this->validValues[$this->multiLine]) === false) {
|
|
115
|
-
$this->multiLine = 'skip';
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
$openClose = Arrays::getOpenClose($phpcsFile, $stackPtr);
|
|
119
|
-
if ($openClose === false) {
|
|
120
|
-
// Short list, real square bracket, live coding or parse error.
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
$tokens = $phpcsFile->getTokens();
|
|
125
|
-
$opener = $openClose['opener'];
|
|
126
|
-
$closer = $openClose['closer'];
|
|
127
|
-
|
|
128
|
-
$action = $this->singleLine;
|
|
129
|
-
$phrase = 'single-line';
|
|
130
|
-
$errorCode = 'SingleLine';
|
|
131
|
-
if ($tokens[$opener]['line'] !== $tokens[$closer]['line']) {
|
|
132
|
-
$action = $this->multiLine;
|
|
133
|
-
$phrase = 'multi-line';
|
|
134
|
-
$errorCode = 'MultiLine';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if ($action === 'skip') {
|
|
138
|
-
// Nothing to do.
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
$lastNonEmpty = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($closer - 1), $opener, true);
|
|
143
|
-
if ($lastNonEmpty === false || $lastNonEmpty === $opener) {
|
|
144
|
-
// Bow out: empty array.
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// If the closer is on the same line as the last element, change the error code for multi-line arrays.
|
|
149
|
-
if ($errorCode === 'MultiLine'
|
|
150
|
-
&& $tokens[$lastNonEmpty]['line'] === $tokens[$closer]['line']
|
|
151
|
-
) {
|
|
152
|
-
$errorCode .= 'CloserSameLine';
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
$isComma = ($tokens[$lastNonEmpty]['code'] === \T_COMMA);
|
|
156
|
-
|
|
157
|
-
$phpcsFile->recordMetric(
|
|
158
|
-
$stackPtr,
|
|
159
|
-
\sprintf(self::METRIC_NAME, \ucfirst($phrase)),
|
|
160
|
-
($isComma === true ? 'yes' : 'no')
|
|
161
|
-
);
|
|
162
|
-
|
|
163
|
-
switch ($action) {
|
|
164
|
-
case 'enforce':
|
|
165
|
-
if ($isComma === true) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
$error = 'There should be a comma after the last array item in a %s array.';
|
|
170
|
-
$errorCode = 'Missing' . $errorCode;
|
|
171
|
-
$data = [$phrase];
|
|
172
|
-
$fix = $phpcsFile->addFixableError($error, $lastNonEmpty, $errorCode, $data);
|
|
173
|
-
if ($fix === true) {
|
|
174
|
-
$extraContent = ',';
|
|
175
|
-
|
|
176
|
-
if (($tokens[$lastNonEmpty]['code'] === \T_END_HEREDOC
|
|
177
|
-
|| $tokens[$lastNonEmpty]['code'] === \T_END_NOWDOC)
|
|
178
|
-
// Check for indentation, if indented, it's a PHP 7.3+ heredoc/nowdoc.
|
|
179
|
-
&& $tokens[$lastNonEmpty]['content'] === \ltrim($tokens[$lastNonEmpty]['content'])
|
|
180
|
-
) {
|
|
181
|
-
// Prevent parse errors in PHP < 7.3 which doesn't support flexible heredoc/nowdoc.
|
|
182
|
-
$extraContent = $phpcsFile->eolChar . $extraContent;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
$phpcsFile->fixer->addContent($lastNonEmpty, $extraContent);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return;
|
|
189
|
-
|
|
190
|
-
case 'forbid':
|
|
191
|
-
if ($isComma === false) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
$error = 'A comma after the last array item in a %s array is not allowed.';
|
|
196
|
-
$errorCode = 'Found' . $errorCode;
|
|
197
|
-
$data = [$phrase];
|
|
198
|
-
$fix = $phpcsFile->addFixableError($error, $lastNonEmpty, $errorCode, $data);
|
|
199
|
-
if ($fix === true) {
|
|
200
|
-
$start = $lastNonEmpty;
|
|
201
|
-
$end = $lastNonEmpty;
|
|
202
|
-
|
|
203
|
-
// Make sure we're not leaving a superfluous blank line behind.
|
|
204
|
-
$prevNonWhitespace = $phpcsFile->findPrevious(\T_WHITESPACE, ($lastNonEmpty - 1), $opener, true);
|
|
205
|
-
$nextNonWhitespace = $phpcsFile->findNext(\T_WHITESPACE, ($lastNonEmpty + 1), ($closer + 1), true);
|
|
206
|
-
if ($prevNonWhitespace !== false
|
|
207
|
-
&& $tokens[$prevNonWhitespace]['line'] < $tokens[$lastNonEmpty]['line']
|
|
208
|
-
&& $nextNonWhitespace !== false
|
|
209
|
-
&& $tokens[$nextNonWhitespace]['line'] > $tokens[$lastNonEmpty]['line']
|
|
210
|
-
) {
|
|
211
|
-
$start = ($prevNonWhitespace + 1);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
$phpcsFile->fixer->beginChangeset();
|
|
215
|
-
|
|
216
|
-
for ($i = $start; $i <= $end; $i++) {
|
|
217
|
-
$phpcsFile->fixer->replaceToken($i, '');
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
$phpcsFile->fixer->endChangeset();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0"?>
|
|
2
|
-
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="NormalizedArrays" namespace="PHPCSExtra\NormalizedArrays" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
|
|
3
|
-
|
|
4
|
-
<description>A ruleset for PHP_CodeSniffer to check arrays for normalized format.</description>
|
|
5
|
-
</ruleset>
|