Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/updater.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-07-25 13:07:14 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-07-25 13:07:14 +0300
commitdf280387ef3a1c4e91e2efebd70d2c555808edb9 (patch)
treeb307c1f5d8c8cbde19ee87c6a83e4b39a9bf23cb
parentbd6a4114864faec390044e8bb4f4505db73bfbce (diff)
Add workflows and scripts, bump symfony/console, require nextcloud/coding-standard
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--.github/workflows/command-rebase.yml51
-rw-r--r--.github/workflows/lint-php-cs.yml39
-rw-r--r--.github/workflows/lint-php.yml53
-rw-r--r--.php-cs-fixer.dist.php18
-rw-r--r--composer.json10
-rw-r--r--composer.lock1782
-rw-r--r--vendor/autoload.php5
-rwxr-xr-xvendor/bin/php-cs-fixer120
-rw-r--r--vendor/composer/InstalledVersions.php352
-rw-r--r--vendor/composer/autoload_classmap.php686
-rw-r--r--vendor/composer/autoload_files.php8
-rw-r--r--vendor/composer/autoload_namespaces.php2
-rw-r--r--vendor/composer/autoload_psr4.php25
-rw-r--r--vendor/composer/autoload_real.php21
-rw-r--r--vendor/composer/autoload_static.php807
-rw-r--r--vendor/composer/installed.json2219
-rw-r--r--vendor/composer/installed.php284
-rw-r--r--vendor/composer/pcre/LICENSE19
-rw-r--r--vendor/composer/pcre/README.md134
-rw-r--r--vendor/composer/pcre/composer.json46
-rw-r--r--vendor/composer/pcre/src/MatchAllResult.php46
-rw-r--r--vendor/composer/pcre/src/MatchAllWithOffsetsResult.php48
-rw-r--r--vendor/composer/pcre/src/MatchResult.php39
-rw-r--r--vendor/composer/pcre/src/MatchWithOffsetsResult.php41
-rw-r--r--vendor/composer/pcre/src/PcreException.php60
-rw-r--r--vendor/composer/pcre/src/Preg.php303
-rw-r--r--vendor/composer/pcre/src/Regex.php142
-rw-r--r--vendor/composer/pcre/src/ReplaceResult.php44
-rw-r--r--vendor/composer/platform_check.php26
-rw-r--r--vendor/composer/semver/CHANGELOG.md209
-rw-r--r--vendor/composer/semver/LICENSE19
-rw-r--r--vendor/composer/semver/README.md98
-rw-r--r--vendor/composer/semver/composer.json59
-rw-r--r--vendor/composer/semver/src/Comparator.php113
-rw-r--r--vendor/composer/semver/src/CompilingMatcher.php94
-rw-r--r--vendor/composer/semver/src/Constraint/Bound.php122
-rw-r--r--vendor/composer/semver/src/Constraint/Constraint.php435
-rw-r--r--vendor/composer/semver/src/Constraint/ConstraintInterface.php75
-rw-r--r--vendor/composer/semver/src/Constraint/MatchAllConstraint.php85
-rw-r--r--vendor/composer/semver/src/Constraint/MatchNoneConstraint.php83
-rw-r--r--vendor/composer/semver/src/Constraint/MultiConstraint.php325
-rw-r--r--vendor/composer/semver/src/Interval.php98
-rw-r--r--vendor/composer/semver/src/Intervals.php478
-rw-r--r--vendor/composer/semver/src/Semver.php129
-rw-r--r--vendor/composer/semver/src/VersionParser.php586
-rw-r--r--vendor/composer/xdebug-handler/CHANGELOG.md124
-rw-r--r--vendor/composer/xdebug-handler/LICENSE21
-rw-r--r--vendor/composer/xdebug-handler/README.md291
-rw-r--r--vendor/composer/xdebug-handler/UPGRADE.md30
-rw-r--r--vendor/composer/xdebug-handler/composer.json44
-rw-r--r--vendor/composer/xdebug-handler/src/PhpConfig.php92
-rw-r--r--vendor/composer/xdebug-handler/src/Process.php122
-rw-r--r--vendor/composer/xdebug-handler/src/Status.php224
-rw-r--r--vendor/composer/xdebug-handler/src/XdebugHandler.php745
-rw-r--r--vendor/doctrine/annotations/LICENSE19
-rw-r--r--vendor/doctrine/annotations/README.md18
-rw-r--r--vendor/doctrine/annotations/composer.json69
-rw-r--r--vendor/doctrine/annotations/docs/en/annotations.rst252
-rw-r--r--vendor/doctrine/annotations/docs/en/custom.rst443
-rw-r--r--vendor/doctrine/annotations/docs/en/index.rst101
-rw-r--r--vendor/doctrine/annotations/docs/en/sidebar.rst6
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php59
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php21
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php15
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php69
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php43
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php13
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php13
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php101
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php172
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php389
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php190
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php268
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php129
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php1487
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php315
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php178
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php100
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php14
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php92
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php232
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php80
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php114
-rw-r--r--vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php208
-rw-r--r--vendor/doctrine/annotations/psalm.xml15
-rw-r--r--vendor/doctrine/lexer/LICENSE19
-rw-r--r--vendor/doctrine/lexer/README.md9
-rw-r--r--vendor/doctrine/lexer/composer.json41
-rw-r--r--vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php337
-rw-r--r--vendor/doctrine/lexer/psalm.xml15
-rw-r--r--vendor/friendsofphp/php-cs-fixer/CHANGELOG.md4125
-rw-r--r--vendor/friendsofphp/php-cs-fixer/CONTRIBUTING.md104
-rw-r--r--vendor/friendsofphp/php-cs-fixer/LICENSE19
-rw-r--r--vendor/friendsofphp/php-cs-fixer/README.md75
-rw-r--r--vendor/friendsofphp/php-cs-fixer/UPGRADE-v3.md166
-rw-r--r--vendor/friendsofphp/php-cs-fixer/ci-integration.sh8
-rw-r--r--vendor/friendsofphp/php-cs-fixer/composer.json72
-rw-r--r--vendor/friendsofphp/php-cs-fixer/logo.md3
-rw-r--r--vendor/friendsofphp/php-cs-fixer/logo.pngbin0 -> 18627 bytes
-rwxr-xr-xvendor/friendsofphp/php-cs-fixer/php-cs-fixer115
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php233
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php203
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractFopenFlagFixer.php122
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractFunctionReferenceFixer.php80
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractLinesBeforeNamespaceFixer.php111
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractNoUselessElseFixer.php207
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php225
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocTypesFixer.php128
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/AbstractProxyFixer.php124
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php138
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/CacheInterface.php35
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/CacheManagerInterface.php27
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/Directory.php55
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/DirectoryInterface.php23
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/FileCacheManager.php141
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php109
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandlerInterface.php29
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/NullCacheManager.php32
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/Signature.php106
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Cache/SignatureInterface.php38
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Config.php307
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ConfigInterface.php133
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidConfigurationException.php35
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php46
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php24
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php24
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Application.php144
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php434
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php49
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php126
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php372
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php51
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php124
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php101
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php91
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php188
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php955
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php148
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php25
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutput.php146
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutputInterface.php23
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php71
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php60
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php67
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php137
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReportSummary.php103
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php92
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterInterface.php30
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php93
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/XmlReporter.php124
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/JsonReporter.php58
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReportSummary.php47
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php89
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterInterface.php30
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php57
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php54
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClientInterface.php23
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionChecker.php116
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionCheckerInterface.php37
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php78
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php94
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php26
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Differ/FullDiffer.php50
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php29
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php50
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php306
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/DocBlock.php262
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/Line.php130
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/ShortDescription.php65
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php107
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php57
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php281
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php87
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php342
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php85
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php354
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Documentation/ListDocumentGenerator.php179
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Documentation/RstUtils.php40
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php107
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Error/Error.php99
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Error/ErrorsManager.php79
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FileReader.php73
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FileRemoval.php98
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Finder.php35
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php58
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php58
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php218
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php150
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php185
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/MbStrFunctionsFixer.php125
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ModernizeStrposFixer.php217
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php333
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasLanguageConstructCallFixer.php68
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php154
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/PowToExponentiationFixer.php230
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php170
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php236
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php150
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php86
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php89
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php152
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php62
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php104
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php103
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php1006
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php95
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php181
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php74
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php292
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php154
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php69
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseKeywordsFixer.php81
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseStaticReferenceFixer.php106
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicConstantCasingFixer.php101
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php206
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php98
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php176
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php130
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php95
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php160
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoShortBoolCastFixer.php97
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoUnsetCastFixer.php97
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ShortScalarCastFixer.php86
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php577
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php429
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php63
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php223
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixer.php172
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php102
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php150
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php413
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php187
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php521
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php243
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php194
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php151
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php189
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php201
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php240
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleTraitInsertPerStatementFixer.php116
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php202
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassUsage/DateTimeImmutableFixer.php158
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php239
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php458
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php98
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoEmptyCommentFixer.php157
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoTrailingWhitespaceInCommentFixer.php88
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php186
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php47
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php302
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php144
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ElseifFixer.php105
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php137
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php200
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/IncludeFixer.php153
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php244
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php351
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php110
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php77
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php189
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php169
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php129
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SimplifiedIfReturnFixer.php145
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSemicolonToColonFixer.php96
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSpaceFixer.php94
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchContinueToBreakFixer.php249
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php221
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php746
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/DeprecatedFixerInterface.php28
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php108
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php127
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php193
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php301
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FixerInterface.php79
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php235
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagOrderFixer.php126
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php112
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php231
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionTypehintSpaceFixer.php86
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ImplodeCallFixer.php151
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/LambdaNotUsedImportFixer.php346
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php487
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php419
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php187
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php197
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUselessSprintfFixer.php121
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php167
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php194
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php244
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php214
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/RegularCallableCallFixer.php234
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ReturnTypeDeclarationFixer.php131
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/SingleLineThrowFixer.php165
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/StaticLambdaFixer.php176
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/UseArrowFunctionsFixer.php207
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/VoidReturnFixer.php257
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php200
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php745
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php280
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoLeadingImportSlashFixer.php99
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php309
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php528
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php239
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleLineAfterImportsFixer.php161
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ClassKeywordRemoveFixer.php253
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php172
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixer.php188
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php143
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareParenthesesFixer.php56
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DirConstantFixer.php138
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php186
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ExplicitIndirectVariableFixer.php91
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php300
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php181
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php229
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php346
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php144
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php136
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php107
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php76
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php104
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/SingleBlankLineBeforeNamespaceFixer.php71
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php244
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/AssignNullCoalescingToCoalesceEqualFixer.php221
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php758
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php168
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php173
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php79
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php145
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php69
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSpaceFixer.php84
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSuccessorSpaceFixer.php82
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ObjectOperatorWithoutWhitespaceFixer.php71
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php317
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeIncrementFixer.php130
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php69
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryOperatorSpacesFixer.php185
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToElvisOperatorFixer.php259
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToNullCoalescingFixer.php220
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php81
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php101
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php269
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php134
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php80
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php72
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php209
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php537
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php202
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php289
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitFqcnAnnotationFixer.php92
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php165
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php213
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php142
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockShortWillReturnFixer.php129
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php230
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php275
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSetUpTearDownVisibilityFixer.php117
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php197
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php153
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php58
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php413
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php485
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestClassRequiresCoversFixer.php135
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php182
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php134
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php213
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php115
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php71
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php549
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php276
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php422
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php138
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php142
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php121
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php157
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php73
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php135
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php126
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php73
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php162
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php222
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php166
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php231
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php131
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php171
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSingleLineVarSpacingFixer.php98
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSummaryFixer.php103
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php106
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php212
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php162
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php197
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimFixer.php124
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php163
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesOrderFixer.php222
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarAnnotationCorrectOrderFixer.php81
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php160
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/NoUselessReturnFixer.php112
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/ReturnAssignmentFixer.php352
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/SimplifiedNullReturnFixer.php157
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php295
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoEmptyStatementFixer.php195
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoSinglelineWhitespaceBeforeSemicolonsFixer.php78
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SemicolonAfterInstructionFixer.php73
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SpaceAfterSemicolonFixer.php146
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php152
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictComparisonFixer.php89
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictParamFixer.php177
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php171
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/ExplicitStringVariableFixer.php173
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/HeredocToNowdocFixer.php116
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoBinaryStringFixer.php68
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php112
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SimpleToComplexStringVariableFixer.php116
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php120
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLengthToEmptyFixer.php330
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLineEndingFixer.php88
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php272
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php349
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php80
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php195
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php153
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/LineEndingFixer.php104
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/MethodChainingIndentationFixer.php197
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoExtraBlankLinesFixer.php458
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesAroundOffsetFixer.php111
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesInsideParenthesisFixer.php111
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php117
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php103
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php76
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php126
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php25
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOption.php100
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOptionBuilder.php91
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AllowedValueSubset.php56
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOption.php95
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOptionInterface.php20
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php131
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolverInterface.php30
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php169
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php138
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php40
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php26
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php47
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php25
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSample.php66
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSampleInterface.php25
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinition.php77
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinitionInterface.php37
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSample.php64
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSampleInterface.php23
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecification.php74
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificationInterface.php23
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php238
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerFileProcessedEvent.php55
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/FixerNameValidator.php32
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php78
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/CachingLinter.php74
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/Linter.php66
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/LinterInterface.php35
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/LintingException.php25
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/LintingResultInterface.php26
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php167
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinterProcessBuilder.php47
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php97
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLinter.php77
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php52
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Linter/UnavailableLinterException.php27
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/PharChecker.php41
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/PharCheckerInterface.php26
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Preg.php209
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/PregException.php26
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php38
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractRuleSetDescription.php37
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php146
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetDescriptionInterface.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php46
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php70
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php42
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php30
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP56MigrationRiskySet.php30
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationRiskySet.php39
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationSet.php31
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationRiskySet.php31
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationSet.php32
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP73MigrationSet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationRiskySet.php33
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationSet.php33
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationRiskySet.php39
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php32
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php31
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php33
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit50MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php37
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php34
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php35
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php36
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php67
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php36
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR2Set.php65
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerRiskySet.php60
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerSet.php107
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonyRiskySet.php80
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonySet.php186
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Runner/FileCachingLintingIterator.php82
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php112
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Runner/FileLintingIterator.php67
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php315
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php174
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTransformer.php49
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTypeTransformer.php87
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php58
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php87
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php49
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php47
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php44
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php38
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceAnalysis.php103
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceUseAnalysis.php122
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/StartEndTokenAwareAnalysis.php28
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/SwitchAnalysis.php55
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php108
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ArgumentsAnalyzer.php147
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AttributeAnalyzer.php70
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php60
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php83
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php311
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php284
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php269
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php40
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php119
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php88
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ReferenceAnalyzer.php49
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/WhitespacesAnalyzer.php52
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php101
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CodeHasher.php36
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Generator/NamespacedStringTokenGenerator.php43
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Resolver/TypeShortNameResolver.php92
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php494
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php1395
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php762
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php63
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php79
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php90
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php66
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php80
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/CurlyBraceTransformer.php253
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php58
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php69
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php101
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamedArgumentTransformer.php85
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamespaceOperatorTransformer.php62
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NullableTypeTransformer.php94
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ReturnRefTransformer.php64
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/SquareBraceTransformer.php182
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeAlternationTransformer.php69
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeColonTransformer.php92
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeIntersectionTransformer.php67
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/UseTransformer.php108
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/WhitespacyCommentTransformer.php73
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TransformerInterface.php68
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformers.php111
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php113
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/ToolInfoInterface.php33
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/Utils.php173
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/WhitespacesFixerConfig.php55
-rw-r--r--vendor/friendsofphp/php-cs-fixer/src/WordMatcher.php53
-rw-r--r--vendor/nextcloud/coding-standard/.github/workflows/lint.yml22
-rw-r--r--vendor/nextcloud/coding-standard/.gitignore8
-rw-r--r--vendor/nextcloud/coding-standard/.php-cs-fixer.dist.php15
-rw-r--r--vendor/nextcloud/coding-standard/CHANGELOG.md14
-rw-r--r--vendor/nextcloud/coding-standard/LICENSE21
-rw-r--r--vendor/nextcloud/coding-standard/README.md56
-rw-r--r--vendor/nextcloud/coding-standard/composer.json21
-rw-r--r--vendor/nextcloud/coding-standard/src/Config.php59
-rw-r--r--vendor/php-cs-fixer/diff/LICENSE31
-rw-r--r--vendor/php-cs-fixer/diff/README.md10
-rw-r--r--vendor/php-cs-fixer/diff/composer.json38
-rw-r--r--vendor/php-cs-fixer/diff/src/Chunk.php90
-rw-r--r--vendor/php-cs-fixer/diff/src/Diff.php67
-rw-r--r--vendor/php-cs-fixer/diff/src/Differ.php329
-rw-r--r--vendor/php-cs-fixer/diff/src/Exception/ConfigurationException.php40
-rw-r--r--vendor/php-cs-fixer/diff/src/Exception/Exception.php15
-rw-r--r--vendor/php-cs-fixer/diff/src/Exception/InvalidArgumentException.php15
-rw-r--r--vendor/php-cs-fixer/diff/src/Line.php44
-rw-r--r--vendor/php-cs-fixer/diff/src/LongestCommonSubsequenceCalculator.php24
-rw-r--r--vendor/php-cs-fixer/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php81
-rw-r--r--vendor/php-cs-fixer/diff/src/Output/AbstractChunkOutputBuilder.php56
-rw-r--r--vendor/php-cs-fixer/diff/src/Output/DiffOnlyOutputBuilder.php66
-rw-r--r--vendor/php-cs-fixer/diff/src/Output/DiffOutputBuilderInterface.php20
-rw-r--r--vendor/php-cs-fixer/diff/src/Output/StrictUnifiedDiffOutputBuilder.php315
-rw-r--r--vendor/php-cs-fixer/diff/src/Output/UnifiedDiffOutputBuilder.php259
-rw-r--r--vendor/php-cs-fixer/diff/src/Parser.php106
-rw-r--r--vendor/php-cs-fixer/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php66
-rw-r--r--vendor/psr/cache/CHANGELOG.md16
-rw-r--r--vendor/psr/cache/LICENSE.txt19
-rw-r--r--vendor/psr/cache/README.md9
-rw-r--r--vendor/psr/cache/composer.json25
-rw-r--r--vendor/psr/cache/src/CacheException.php10
-rw-r--r--vendor/psr/cache/src/CacheItemInterface.php105
-rw-r--r--vendor/psr/cache/src/CacheItemPoolInterface.php138
-rw-r--r--vendor/psr/cache/src/InvalidArgumentException.php13
-rw-r--r--vendor/psr/container/.gitignore3
-rw-r--r--vendor/psr/container/LICENSE21
-rw-r--r--vendor/psr/container/README.md13
-rw-r--r--vendor/psr/container/composer.json22
-rw-r--r--vendor/psr/container/src/ContainerExceptionInterface.php12
-rw-r--r--vendor/psr/container/src/ContainerInterface.php36
-rw-r--r--vendor/psr/container/src/NotFoundExceptionInterface.php10
-rw-r--r--vendor/psr/log/.gitignore1
-rw-r--r--vendor/psr/log/Psr/Log/AbstractLogger.php32
-rw-r--r--vendor/psr/log/Psr/Log/LoggerAwareTrait.php2
-rw-r--r--vendor/psr/log/Psr/Log/LoggerInterface.php40
-rw-r--r--vendor/psr/log/Psr/Log/LoggerTrait.php2
-rw-r--r--vendor/psr/log/Psr/Log/NullLogger.php2
-rw-r--r--vendor/psr/log/Psr/Log/Test/DummyTest.php18
-rw-r--r--vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php14
-rw-r--r--vendor/psr/log/Psr/Log/Test/TestLogger.php147
-rw-r--r--vendor/psr/log/README.md13
-rw-r--r--vendor/psr/log/composer.json4
-rw-r--r--vendor/symfony/console/Application.php847
-rw-r--r--vendor/symfony/console/CHANGELOG.md85
-rw-r--r--vendor/symfony/console/Command/Command.php206
-rw-r--r--vendor/symfony/console/Command/HelpCommand.php19
-rw-r--r--vendor/symfony/console/Command/ListCommand.php21
-rw-r--r--vendor/symfony/console/Command/LockableTrait.php69
-rw-r--r--vendor/symfony/console/CommandLoader/CommandLoaderInterface.php46
-rw-r--r--vendor/symfony/console/CommandLoader/ContainerCommandLoader.php63
-rw-r--r--vendor/symfony/console/CommandLoader/FactoryCommandLoader.php62
-rw-r--r--vendor/symfony/console/ConsoleEvents.php20
-rw-r--r--vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php98
-rw-r--r--vendor/symfony/console/Descriptor/ApplicationDescription.php81
-rw-r--r--vendor/symfony/console/Descriptor/Descriptor.php41
-rw-r--r--vendor/symfony/console/Descriptor/DescriptorInterface.php8
-rw-r--r--vendor/symfony/console/Descriptor/JsonDescriptor.php98
-rw-r--r--vendor/symfony/console/Descriptor/MarkdownDescriptor.php91
-rw-r--r--vendor/symfony/console/Descriptor/TextDescriptor.php161
-rw-r--r--vendor/symfony/console/Descriptor/XmlDescriptor.php72
-rw-r--r--vendor/symfony/console/Event/ConsoleCommandEvent.php6
-rw-r--r--vendor/symfony/console/Event/ConsoleErrorEvent.php58
-rw-r--r--vendor/symfony/console/Event/ConsoleEvent.php4
-rw-r--r--vendor/symfony/console/Event/ConsoleExceptionEvent.php67
-rw-r--r--vendor/symfony/console/Event/ConsoleTerminateEvent.php9
-rw-r--r--vendor/symfony/console/EventListener/ErrorListener.php95
-rw-r--r--vendor/symfony/console/Exception/CommandNotFoundException.php12
-rw-r--r--vendor/symfony/console/Exception/ExceptionInterface.php2
-rw-r--r--vendor/symfony/console/Exception/MissingInputException.php21
-rw-r--r--vendor/symfony/console/Exception/NamespaceNotFoundException.php21
-rw-r--r--vendor/symfony/console/Formatter/OutputFormatter.php189
-rw-r--r--vendor/symfony/console/Formatter/OutputFormatterInterface.php5
-rw-r--r--vendor/symfony/console/Formatter/OutputFormatterStyle.php158
-rw-r--r--vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php4
-rw-r--r--vendor/symfony/console/Formatter/OutputFormatterStyleStack.php27
-rw-r--r--vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php25
-rw-r--r--vendor/symfony/console/Helper/DebugFormatterHelper.php13
-rw-r--r--vendor/symfony/console/Helper/DescriptorHelper.php22
-rw-r--r--vendor/symfony/console/Helper/Dumper.php64
-rw-r--r--vendor/symfony/console/Helper/FormatterHelper.php22
-rw-r--r--vendor/symfony/console/Helper/Helper.php65
-rw-r--r--vendor/symfony/console/Helper/HelperInterface.php2
-rw-r--r--vendor/symfony/console/Helper/HelperSet.php19
-rw-r--r--vendor/symfony/console/Helper/InputAwareHelper.php2
-rw-r--r--vendor/symfony/console/Helper/ProcessHelper.php58
-rw-r--r--vendor/symfony/console/Helper/ProgressBar.php401
-rw-r--r--vendor/symfony/console/Helper/ProgressIndicator.php74
-rw-r--r--vendor/symfony/console/Helper/QuestionHelper.php395
-rw-r--r--vendor/symfony/console/Helper/SymfonyQuestionHelper.php40
-rw-r--r--vendor/symfony/console/Helper/Table.php570
-rw-r--r--vendor/symfony/console/Helper/TableCell.php17
-rw-r--r--vendor/symfony/console/Helper/TableRows.php32
-rw-r--r--vendor/symfony/console/Helper/TableSeparator.php5
-rw-r--r--vendor/symfony/console/Helper/TableStyle.php246
-rw-r--r--vendor/symfony/console/Input/ArgvInput.php121
-rw-r--r--vendor/symfony/console/Input/ArrayInput.php69
-rw-r--r--vendor/symfony/console/Input/Input.php49
-rw-r--r--vendor/symfony/console/Input/InputArgument.php30
-rw-r--r--vendor/symfony/console/Input/InputAwareInterface.php2
-rw-r--r--vendor/symfony/console/Input/InputDefinition.php86
-rw-r--r--vendor/symfony/console/Input/InputInterface.php30
-rw-r--r--vendor/symfony/console/Input/InputOption.php61
-rw-r--r--vendor/symfony/console/Input/StreamableInputInterface.php37
-rw-r--r--vendor/symfony/console/Input/StringInput.php56
-rw-r--r--vendor/symfony/console/LICENSE2
-rw-r--r--vendor/symfony/console/Logger/ConsoleLogger.php89
-rw-r--r--vendor/symfony/console/Output/BufferedOutput.php5
-rw-r--r--vendor/symfony/console/Output/ConsoleOutput.php45
-rw-r--r--vendor/symfony/console/Output/ConsoleOutputInterface.php9
-rw-r--r--vendor/symfony/console/Output/ConsoleSectionOutput.php143
-rw-r--r--vendor/symfony/console/Output/Output.php14
-rw-r--r--vendor/symfony/console/Output/OutputInterface.php31
-rw-r--r--vendor/symfony/console/Output/StreamOutput.php52
-rw-r--r--vendor/symfony/console/Output/TrimmedBufferOutput.php63
-rw-r--r--vendor/symfony/console/Question/ChoiceQuestion.php45
-rw-r--r--vendor/symfony/console/Question/ConfirmationQuestion.php14
-rw-r--r--vendor/symfony/console/Question/Question.php116
-rw-r--r--vendor/symfony/console/README.md10
-rw-r--r--vendor/symfony/console/Style/OutputStyle.php15
-rw-r--r--vendor/symfony/console/Style/StyleInterface.php12
-rw-r--r--vendor/symfony/console/Style/SymfonyStyle.php195
-rw-r--r--vendor/symfony/console/Terminal.php174
-rw-r--r--vendor/symfony/console/Tester/ApplicationTester.php146
-rw-r--r--vendor/symfony/console/Tester/CommandTester.php86
-rw-r--r--vendor/symfony/console/Tester/TesterTrait.php180
-rw-r--r--vendor/symfony/console/composer.json36
-rw-r--r--vendor/symfony/console/phpunit.xml.dist39
-rw-r--r--vendor/symfony/debug/BufferingLogger.php37
-rw-r--r--vendor/symfony/debug/CHANGELOG.md47
-rw-r--r--vendor/symfony/debug/Debug.php63
-rw-r--r--vendor/symfony/debug/DebugClassLoader.php314
-rw-r--r--vendor/symfony/debug/ErrorHandler.php666
-rw-r--r--vendor/symfony/debug/Exception/ClassNotFoundException.php33
-rw-r--r--vendor/symfony/debug/Exception/ContextErrorException.php36
-rw-r--r--vendor/symfony/debug/Exception/FatalErrorException.php82
-rw-r--r--vendor/symfony/debug/Exception/FatalThrowableError.php44
-rw-r--r--vendor/symfony/debug/Exception/FlattenException.php256
-rw-r--r--vendor/symfony/debug/Exception/UndefinedFunctionException.php33
-rw-r--r--vendor/symfony/debug/Exception/UndefinedMethodException.php33
-rw-r--r--vendor/symfony/debug/ExceptionHandler.php415
-rw-r--r--vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php206
-rw-r--r--vendor/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php32
-rw-r--r--vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php84
-rw-r--r--vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php60
-rw-r--r--vendor/symfony/debug/README.md13
-rw-r--r--vendor/symfony/debug/Resources/ext/README.md134
-rw-r--r--vendor/symfony/debug/Resources/ext/config.m463
-rw-r--r--vendor/symfony/debug/Resources/ext/config.w3213
-rw-r--r--vendor/symfony/debug/Resources/ext/php_symfony_debug.h60
-rw-r--r--vendor/symfony/debug/Resources/ext/symfony_debug.c283
-rw-r--r--vendor/symfony/debug/Resources/ext/tests/001.phpt151
-rw-r--r--vendor/symfony/debug/Resources/ext/tests/002.phpt64
-rw-r--r--vendor/symfony/debug/Resources/ext/tests/002_1.phpt47
-rw-r--r--vendor/symfony/debug/Resources/ext/tests/003.phpt85
-rw-r--r--vendor/symfony/debug/composer.json41
-rw-r--r--vendor/symfony/debug/phpunit.xml.dist31
-rw-r--r--vendor/symfony/deprecation-contracts/.gitignore (renamed from vendor/symfony/console/.gitignore)0
-rw-r--r--vendor/symfony/deprecation-contracts/CHANGELOG.md5
-rw-r--r--vendor/symfony/deprecation-contracts/LICENSE (renamed from vendor/symfony/debug/LICENSE)2
-rw-r--r--vendor/symfony/deprecation-contracts/README.md26
-rw-r--r--vendor/symfony/deprecation-contracts/composer.json35
-rw-r--r--vendor/symfony/deprecation-contracts/function.php27
-rw-r--r--vendor/symfony/event-dispatcher-contracts/.gitignore (renamed from vendor/symfony/debug/.gitignore)0
-rw-r--r--vendor/symfony/event-dispatcher-contracts/Event.php96
-rw-r--r--vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php58
-rw-r--r--vendor/symfony/event-dispatcher-contracts/LICENSE19
-rw-r--r--vendor/symfony/event-dispatcher-contracts/README.md9
-rw-r--r--vendor/symfony/event-dispatcher-contracts/composer.json38
-rw-r--r--vendor/symfony/event-dispatcher/CHANGELOG.md67
-rw-r--r--vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php407
-rw-r--r--vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php42
-rw-r--r--vendor/symfony/event-dispatcher/Debug/WrappedListener.php136
-rw-r--r--vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php42
-rw-r--r--vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php178
-rw-r--r--vendor/symfony/event-dispatcher/Event.php38
-rw-r--r--vendor/symfony/event-dispatcher/EventDispatcher.php314
-rw-r--r--vendor/symfony/event-dispatcher/EventDispatcherInterface.php82
-rw-r--r--vendor/symfony/event-dispatcher/EventSubscriberInterface.php49
-rw-r--r--vendor/symfony/event-dispatcher/GenericEvent.php184
-rw-r--r--vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php102
-rw-r--r--vendor/symfony/event-dispatcher/LICENSE19
-rw-r--r--vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php147
-rw-r--r--vendor/symfony/event-dispatcher/LegacyEventProxy.php62
-rw-r--r--vendor/symfony/event-dispatcher/README.md15
-rw-r--r--vendor/symfony/event-dispatcher/composer.json51
-rw-r--r--vendor/symfony/filesystem/CHANGELOG.md76
-rw-r--r--vendor/symfony/filesystem/Exception/ExceptionInterface.php21
-rw-r--r--vendor/symfony/filesystem/Exception/FileNotFoundException.php34
-rw-r--r--vendor/symfony/filesystem/Exception/IOException.php39
-rw-r--r--vendor/symfony/filesystem/Exception/IOExceptionInterface.php27
-rw-r--r--vendor/symfony/filesystem/Exception/InvalidArgumentException.php19
-rw-r--r--vendor/symfony/filesystem/Filesystem.php758
-rw-r--r--vendor/symfony/filesystem/LICENSE19
-rw-r--r--vendor/symfony/filesystem/README.md13
-rw-r--r--vendor/symfony/filesystem/composer.json30
-rw-r--r--vendor/symfony/finder/CHANGELOG.md87
-rw-r--r--vendor/symfony/finder/Comparator/Comparator.php117
-rw-r--r--vendor/symfony/finder/Comparator/DateComparator.php50
-rw-r--r--vendor/symfony/finder/Comparator/NumberComparator.php78
-rw-r--r--vendor/symfony/finder/Exception/AccessDeniedException.php19
-rw-r--r--vendor/symfony/finder/Exception/DirectoryNotFoundException.php (renamed from vendor/symfony/debug/Exception/OutOfMemoryException.php)8
-rw-r--r--vendor/symfony/finder/Finder.php806
-rw-r--r--vendor/symfony/finder/Gitignore.php93
-rw-r--r--vendor/symfony/finder/Glob.php111
-rw-r--r--vendor/symfony/finder/Iterator/CustomFilterIterator.php64
-rw-r--r--vendor/symfony/finder/Iterator/DateRangeFilterIterator.php61
-rw-r--r--vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php51
-rw-r--r--vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php96
-rw-r--r--vendor/symfony/finder/Iterator/FileTypeFilterIterator.php56
-rw-r--r--vendor/symfony/finder/Iterator/FilecontentFilterIterator.php61
-rw-r--r--vendor/symfony/finder/Iterator/FilenameFilterIterator.php50
-rw-r--r--vendor/symfony/finder/Iterator/LazyIterator.php32
-rw-r--r--vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php117
-rw-r--r--vendor/symfony/finder/Iterator/PathFilterIterator.php59
-rw-r--r--vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php168
-rw-r--r--vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php60
-rw-r--r--vendor/symfony/finder/Iterator/SortableIterator.php104
-rw-r--r--vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php151
-rw-r--r--vendor/symfony/finder/LICENSE19
-rw-r--r--vendor/symfony/finder/README.md14
-rw-r--r--vendor/symfony/finder/SplFileInfo.php88
-rw-r--r--vendor/symfony/finder/composer.json30
-rw-r--r--vendor/symfony/options-resolver/CHANGELOG.md81
-rw-r--r--vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php120
-rw-r--r--vendor/symfony/options-resolver/Exception/AccessException.php22
-rw-r--r--vendor/symfony/options-resolver/Exception/ExceptionInterface.php21
-rw-r--r--vendor/symfony/options-resolver/Exception/InvalidArgumentException.php21
-rw-r--r--vendor/symfony/options-resolver/Exception/InvalidOptionsException.php23
-rw-r--r--vendor/symfony/options-resolver/Exception/MissingOptionsException.php23
-rw-r--r--vendor/symfony/options-resolver/Exception/NoConfigurationException.php26
-rw-r--r--vendor/symfony/options-resolver/Exception/NoSuchOptionException.php26
-rw-r--r--vendor/symfony/options-resolver/Exception/OptionDefinitionException.php21
-rw-r--r--vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php24
-rw-r--r--vendor/symfony/options-resolver/LICENSE19
-rw-r--r--vendor/symfony/options-resolver/OptionConfigurator.php139
-rw-r--r--vendor/symfony/options-resolver/Options.php22
-rw-r--r--vendor/symfony/options-resolver/OptionsResolver.php1347
-rw-r--r--vendor/symfony/options-resolver/README.md15
-rw-r--r--vendor/symfony/options-resolver/composer.json31
-rw-r--r--vendor/symfony/polyfill-ctype/Ctype.php232
-rw-r--r--vendor/symfony/polyfill-ctype/LICENSE19
-rw-r--r--vendor/symfony/polyfill-ctype/README.md12
-rw-r--r--vendor/symfony/polyfill-ctype/bootstrap.php50
-rw-r--r--vendor/symfony/polyfill-ctype/bootstrap80.php46
-rw-r--r--vendor/symfony/polyfill-ctype/composer.json41
-rw-r--r--vendor/symfony/polyfill-php72/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php72/Php72.php217
-rw-r--r--vendor/symfony/polyfill-php72/README.md35
-rw-r--r--vendor/symfony/polyfill-php72/bootstrap.php57
-rw-r--r--vendor/symfony/polyfill-php72/composer.json35
-rw-r--r--vendor/symfony/polyfill-php73/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php73/Php73.php43
-rw-r--r--vendor/symfony/polyfill-php73/README.md18
-rw-r--r--vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php16
-rw-r--r--vendor/symfony/polyfill-php73/bootstrap.php31
-rw-r--r--vendor/symfony/polyfill-php73/composer.json36
-rw-r--r--vendor/symfony/polyfill-php80/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php80/Php80.php115
-rw-r--r--vendor/symfony/polyfill-php80/PhpToken.php103
-rw-r--r--vendor/symfony/polyfill-php80/README.md25
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php22
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php7
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php11
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php7
-rw-r--r--vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php7
-rw-r--r--vendor/symfony/polyfill-php80/bootstrap.php42
-rw-r--r--vendor/symfony/polyfill-php80/composer.json40
-rw-r--r--vendor/symfony/polyfill-php81/LICENSE19
-rw-r--r--vendor/symfony/polyfill-php81/Php81.php37
-rw-r--r--vendor/symfony/polyfill-php81/README.md17
-rw-r--r--vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php11
-rw-r--r--vendor/symfony/polyfill-php81/bootstrap.php28
-rw-r--r--vendor/symfony/polyfill-php81/composer.json36
-rw-r--r--vendor/symfony/process/CHANGELOG.md116
-rw-r--r--vendor/symfony/process/Exception/ExceptionInterface.php21
-rw-r--r--vendor/symfony/process/Exception/InvalidArgumentException.php21
-rw-r--r--vendor/symfony/process/Exception/LogicException.php21
-rw-r--r--vendor/symfony/process/Exception/ProcessFailedException.php54
-rw-r--r--vendor/symfony/process/Exception/ProcessSignaledException.php41
-rw-r--r--vendor/symfony/process/Exception/ProcessTimedOutException.php69
-rw-r--r--vendor/symfony/process/Exception/RuntimeException.php21
-rw-r--r--vendor/symfony/process/ExecutableFinder.php86
-rw-r--r--vendor/symfony/process/InputStream.php96
-rw-r--r--vendor/symfony/process/LICENSE19
-rw-r--r--vendor/symfony/process/PhpExecutableFinder.php103
-rw-r--r--vendor/symfony/process/PhpProcess.php72
-rw-r--r--vendor/symfony/process/Pipes/AbstractPipes.php180
-rw-r--r--vendor/symfony/process/Pipes/PipesInterface.php61
-rw-r--r--vendor/symfony/process/Pipes/UnixPipes.php163
-rw-r--r--vendor/symfony/process/Pipes/WindowsPipes.php204
-rw-r--r--vendor/symfony/process/Process.php1652
-rw-r--r--vendor/symfony/process/ProcessUtils.php69
-rw-r--r--vendor/symfony/process/README.md28
-rw-r--r--vendor/symfony/process/composer.json29
-rw-r--r--vendor/symfony/service-contracts/.gitignore3
-rw-r--r--vendor/symfony/service-contracts/Attribute/Required.php25
-rw-r--r--vendor/symfony/service-contracts/Attribute/SubscribedService.php33
-rw-r--r--vendor/symfony/service-contracts/CHANGELOG.md5
-rw-r--r--vendor/symfony/service-contracts/LICENSE19
-rw-r--r--vendor/symfony/service-contracts/README.md9
-rw-r--r--vendor/symfony/service-contracts/ResetInterface.php30
-rw-r--r--vendor/symfony/service-contracts/ServiceLocatorTrait.php128
-rw-r--r--vendor/symfony/service-contracts/ServiceProviderInterface.php36
-rw-r--r--vendor/symfony/service-contracts/ServiceSubscriberInterface.php53
-rw-r--r--vendor/symfony/service-contracts/ServiceSubscriberTrait.php109
-rw-r--r--vendor/symfony/service-contracts/Test/ServiceLocatorTest.php95
-rw-r--r--vendor/symfony/service-contracts/composer.json42
-rw-r--r--vendor/symfony/stopwatch/CHANGELOG.md24
-rw-r--r--vendor/symfony/stopwatch/LICENSE19
-rw-r--r--vendor/symfony/stopwatch/README.md42
-rw-r--r--vendor/symfony/stopwatch/Section.php185
-rw-r--r--vendor/symfony/stopwatch/Stopwatch.php166
-rw-r--r--vendor/symfony/stopwatch/StopwatchEvent.php258
-rw-r--r--vendor/symfony/stopwatch/StopwatchPeriod.php81
-rw-r--r--vendor/symfony/stopwatch/composer.json29
901 files changed, 112430 insertions, 6363 deletions
diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml
new file mode 100644
index 0000000..78fcf5d
--- /dev/null
+++ b/.github/workflows/command-rebase.yml
@@ -0,0 +1,51 @@
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Rebase command
+
+on:
+ issue_comment:
+ types: created
+
+permissions:
+ contents: read
+
+jobs:
+ rebase:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: none
+
+ # On pull requests and if the comment starts with `/rebase`
+ if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
+
+ steps:
+ - name: Add reaction on start
+ uses: peter-evans/create-or-update-comment@v2
+ with:
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+ repository: ${{ github.event.repository.full_name }}
+ comment-id: ${{ github.event.comment.id }}
+ reaction-type: "+1"
+
+ - name: Checkout the latest code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+
+ - name: Automatic Rebase
+ uses: cirrus-actions/rebase@1.7
+ env:
+ GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
+
+ - name: Add reaction on failure
+ uses: peter-evans/create-or-update-comment@v2
+ if: failure()
+ with:
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+ repository: ${{ github.event.repository.full_name }}
+ comment-id: ${{ github.event.comment.id }}
+ reaction-type: "-1"
diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml
new file mode 100644
index 0000000..eb236b7
--- /dev/null
+++ b/.github/workflows/lint-php-cs.yml
@@ -0,0 +1,39 @@
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Lint
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+ - master
+ - stable*
+
+permissions:
+ contents: read
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+
+ name: php-cs
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "7.4"
+ coverage: none
+
+ - name: Install dependencies
+ run: composer i
+
+ - name: Lint
+ run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
new file mode 100644
index 0000000..d089d1b
--- /dev/null
+++ b/.github/workflows/lint-php.yml
@@ -0,0 +1,53 @@
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Lint
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+ - master
+ - stable*
+
+permissions:
+ contents: read
+
+jobs:
+ php-lint:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ["7.4", "8.0", "8.1"]
+
+ name: php-lint
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ coverage: none
+
+ - name: Lint
+ run: composer run lint
+
+ summary:
+ permissions:
+ contents: none
+ runs-on: ubuntu-latest
+ needs: php-lint
+
+ if: always()
+
+ name: php-lint-summary
+
+ steps:
+ - name: Summary status
+ run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php
new file mode 100644
index 0000000..a68d640
--- /dev/null
+++ b/.php-cs-fixer.dist.php
@@ -0,0 +1,18 @@
+<?php
+
+declare(strict_types=1);
+
+require_once './vendor/autoload.php';
+
+use Nextcloud\CodingStandard\Config;
+
+$config = new Config();
+$config
+ ->getFinder()
+ ->notPath('build')
+ ->notPath('l10n')
+ ->notPath('src')
+ ->notPath('vendor')
+ ->notPath('node_modules')
+ ->in(__DIR__);
+return $config;
diff --git a/composer.json b/composer.json
index 10b2f87..f4649e1 100644
--- a/composer.json
+++ b/composer.json
@@ -9,6 +9,14 @@
"classmap-authoritative": true
},
"require": {
- "symfony/console": "^3.1"
+ "symfony/console": "^4.4"
+ },
+ "scripts": {
+ "cs:fix": "php-cs-fixer fix",
+ "cs:check": "php-cs-fixer fix --dry-run --diff",
+ "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './node_modules/*' -print0 | xargs -0 -n1 php -l"
+ },
+ "require-dev": {
+ "nextcloud/coding-standard": "^1.0"
}
}
diff --git a/composer.lock b/composer.lock
index 6ec278b..80431b2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,24 +1,1133 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "hash": "489973e863a86950adf5f6f80f6e0bec",
- "content-hash": "aa14a3132a5656628d30fdd0b7292318",
+ "content-hash": "ec93d30f90453a71c1d9315f059d9325",
"packages": [
{
+ "name": "psr/container",
+ "version": "1.1.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
+ },
+ "time": "2021-11-05T16:50:12+00:00"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v4.4.43",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8a2628d2d5639f35113dc1b833ecd91e1ed1cf46",
+ "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.8",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2"
+ },
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<3.4",
+ "symfony/event-dispatcher": "<4.3|>=5",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<3.3"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/event-dispatcher": "^4.3",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^3.4|^4.0|^5.0",
+ "symfony/var-dumper": "^4.3|^5.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/console/tree/v4.4.43"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-06-23T12:22:25+00:00"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.5.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-01-02T09:53:40+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "dff51f72b0706335131b00a7f49606168c582594"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
+ "reference": "dff51f72b0706335131b00a7f49606168c582594",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2016-05-18T14:26:46+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.26.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-24T11:49:31+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.26.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-10T07:21:04+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v2.5.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
+ "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.1",
+ "symfony/deprecation-contracts": "^2.1|^3"
+ },
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/v2.5.2"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-30T19:17:29+00:00"
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "composer/pcre",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560",
+ "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/1.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-01-21T20:24:37+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.3.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.4",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/3.3.2"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-04-01T19:23:25+00:00"
+ },
+ {
+ "name": "composer/xdebug-handler",
+ "version": "2.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/xdebug-handler.git",
+ "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a",
+ "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a",
+ "shasum": ""
+ },
+ "require": {
+ "composer/pcre": "^1",
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1 || ^2 || ^3"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "John Stevenson",
+ "email": "john-stevenson@blueyonder.co.uk"
+ }
+ ],
+ "description": "Restarts a process without Xdebug.",
+ "keywords": [
+ "Xdebug",
+ "performance"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/xdebug-handler/issues",
+ "source": "https://github.com/composer/xdebug-handler/tree/2.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-02-24T20:20:32+00:00"
+ },
+ {
+ "name": "doctrine/annotations",
+ "version": "1.13.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/annotations.git",
+ "reference": "648b0343343565c4a056bfc8392201385e8d89f0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0",
+ "reference": "648b0343343565c4a056bfc8392201385e8d89f0",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/lexer": "1.*",
+ "ext-tokenizer": "*",
+ "php": "^7.1 || ^8.0",
+ "psr/cache": "^1 || ^2 || ^3"
+ },
+ "require-dev": {
+ "doctrine/cache": "^1.11 || ^2.0",
+ "doctrine/coding-standard": "^6.0 || ^8.1",
+ "phpstan/phpstan": "^1.4.10 || ^1.8.0",
+ "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
+ "symfony/cache": "^4.4 || ^5.2",
+ "vimeo/psalm": "^4.10"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Docblock Annotations Parser",
+ "homepage": "https://www.doctrine-project.org/projects/annotations.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "parser"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/annotations/issues",
+ "source": "https://github.com/doctrine/annotations/tree/1.13.3"
+ },
+ "time": "2022-07-02T10:48:51+00:00"
+ },
+ {
+ "name": "doctrine/lexer",
+ "version": "1.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229",
+ "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^9.0",
+ "phpstan/phpstan": "^1.3",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.11"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "https://www.doctrine-project.org/projects/lexer.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "lexer",
+ "parser",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/lexer/issues",
+ "source": "https://github.com/doctrine/lexer/tree/1.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-02-28T11:07:21+00:00"
+ },
+ {
+ "name": "friendsofphp/php-cs-fixer",
+ "version": "v3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
+ "reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/13ae36a76b6e329e44ca3cafaa784ea02db9ff14",
+ "reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14",
+ "shasum": ""
+ },
+ "require": {
+ "composer/semver": "^3.2",
+ "composer/xdebug-handler": "^2.0",
+ "doctrine/annotations": "^1.12",
+ "ext-json": "*",
+ "ext-tokenizer": "*",
+ "php": "^7.2 || ^8.0",
+ "php-cs-fixer/diff": "^2.0",
+ "symfony/console": "^4.4.20 || ^5.1.3",
+ "symfony/event-dispatcher": "^4.4.20 || ^5.0",
+ "symfony/filesystem": "^4.4.20 || ^5.0",
+ "symfony/finder": "^4.4.20 || ^5.0",
+ "symfony/options-resolver": "^4.4.20 || ^5.0",
+ "symfony/polyfill-php72": "^1.23",
+ "symfony/polyfill-php80": "^1.23",
+ "symfony/polyfill-php81": "^1.23",
+ "symfony/process": "^4.4.20 || ^5.0",
+ "symfony/stopwatch": "^4.4.20 || ^5.0"
+ },
+ "require-dev": {
+ "justinrainbow/json-schema": "^5.2",
+ "keradus/cli-executor": "^1.5",
+ "mikey179/vfsstream": "^1.6.8",
+ "php-coveralls/php-coveralls": "^2.4.3",
+ "php-cs-fixer/accessible-object": "^1.1",
+ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
+ "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
+ "phpspec/prophecy": "^1.10.3",
+ "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5",
+ "phpunitgoodpractices/polyfill": "^1.5",
+ "phpunitgoodpractices/traits": "^1.9.1",
+ "symfony/phpunit-bridge": "^5.2.4",
+ "symfony/yaml": "^4.4.20 || ^5.0"
+ },
+ "suggest": {
+ "ext-dom": "For handling output formats in XML",
+ "ext-mbstring": "For handling non-UTF8 characters.",
+ "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
+ },
+ "bin": [
+ "php-cs-fixer"
+ ],
+ "type": "application",
+ "autoload": {
+ "psr-4": {
+ "PhpCsFixer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Dariusz Rumiński",
+ "email": "dariusz.ruminski@gmail.com"
+ }
+ ],
+ "description": "A tool to automatically fix PHP code style",
+ "support": {
+ "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
+ "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/keradus",
+ "type": "github"
+ }
+ ],
+ "time": "2021-10-05T08:12:17+00:00"
+ },
+ {
+ "name": "nextcloud/coding-standard",
+ "version": "v1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nextcloud/coding-standard.git",
+ "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/f3d1f9375e89c605deb1734f59a9f51ecbe80578",
+ "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578",
+ "shasum": ""
+ },
+ "require": {
+ "friendsofphp/php-cs-fixer": "^3.2",
+ "php": "^7.3|^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Nextcloud\\CodingStandard\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christoph Wurst",
+ "email": "christoph@winzerhof-wurst.at"
+ }
+ ],
+ "description": "Nextcloud coding standards for the php cs fixer",
+ "support": {
+ "issues": "https://github.com/nextcloud/coding-standard/issues",
+ "source": "https://github.com/nextcloud/coding-standard/tree/v1.0.0"
+ },
+ "time": "2021-11-10T08:44:10+00:00"
+ },
+ {
+ "name": "php-cs-fixer/diff",
+ "version": "v2.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHP-CS-Fixer/diff.git",
+ "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3",
+ "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
+ "symfony/process": "^3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ }
+ ],
+ "description": "sebastian/diff v3 backport support for PHP 5.6+",
+ "homepage": "https://github.com/PHP-CS-Fixer",
+ "keywords": [
+ "diff"
+ ],
+ "support": {
+ "issues": "https://github.com/PHP-CS-Fixer/diff/issues",
+ "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2"
+ },
+ "time": "2020-10-14T08:32:19+00:00"
+ },
+ {
+ "name": "psr/cache",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for caching libraries",
+ "keywords": [
+ "cache",
+ "psr",
+ "psr-6"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/cache/tree/master"
+ },
+ "time": "2016-08-06T20:24:11+00:00"
+ },
+ {
"name": "psr/log",
- "version": "1.0.2",
+ "version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
@@ -27,7 +1136,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
},
"autoload": {
@@ -42,7 +1151,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
@@ -52,46 +1161,197 @@
"psr",
"psr-3"
],
- "time": "2016-10-10 12:19:37"
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
+ "time": "2021-05-03T11:20:27+00:00"
},
{
- "name": "symfony/console",
- "version": "v3.1.6",
+ "name": "symfony/event-dispatcher",
+ "version": "v4.4.42",
"source": {
"type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "c99da1119ae61e15de0e4829196b9fba6f73d065"
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "708e761740c16b02c86e3f0c932018a06b895d40"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/c99da1119ae61e15de0e4829196b9fba6f73d065",
- "reference": "c99da1119ae61e15de0e4829196b9fba6f73d065",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40",
+ "reference": "708e761740c16b02c86e3f0c932018a06b895d40",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/debug": "~2.8|~3.0",
- "symfony/polyfill-mbstring": "~1.0"
+ "php": ">=7.1.3",
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<3.4"
+ },
+ "provide": {
+ "psr/event-dispatcher-implementation": "1.0",
+ "symfony/event-dispatcher-implementation": "1.1"
},
"require-dev": {
- "psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
+ "psr/log": "^1|^2|^3",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/error-handler": "~3.4|~4.4",
+ "symfony/expression-language": "^3.4|^4.0|^5.0",
+ "symfony/http-foundation": "^3.4|^4.0|^5.0",
+ "symfony/service-contracts": "^1.1|^2",
+ "symfony/stopwatch": "^3.4|^4.0|^5.0"
},
"suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/process": ""
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\EventDispatcher\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-05T15:33:49+00:00"
+ },
+ {
+ "name": "symfony/event-dispatcher-contracts",
+ "version": "v1.1.13",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher-contracts.git",
+ "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/1d5cd762abaa6b2a4169d3e77610193a7157129e",
+ "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3"
+ },
+ "suggest": {
+ "psr/event-dispatcher": "",
+ "symfony/event-dispatcher-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "1.1-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Console\\": ""
+ "Symfony\\Contracts\\EventDispatcher\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to dispatching event",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-01-02T09:41:36+00:00"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v5.3.14",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "1c11c4846dff1b62c869a47d45fa5ed5e93faea2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/1c11c4846dff1b62c869a47d45fa5ed5e93faea2",
+ "reference": "1c11c4846dff1b62c869a47d45fa5ed5e93faea2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
@@ -111,44 +1371,114 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Console Component",
+ "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
- "time": "2016-10-06 01:44:51"
+ "support": {
+ "source": "https://github.com/symfony/filesystem/tree/v5.3.14"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-01-02T09:51:59+00:00"
},
{
- "name": "symfony/debug",
- "version": "v3.1.6",
+ "name": "symfony/finder",
+ "version": "v5.4.8",
"source": {
"type": "git",
- "url": "https://github.com/symfony/debug.git",
- "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8"
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/e2b3f74a67fc928adc3c1b9027f73e1bc01190a8",
- "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9",
+ "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "psr/log": "~1.0"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php80": "^1.16"
},
- "conflict": {
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Finder\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
- "require-dev": {
- "symfony/class-loader": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0"
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Finds files and directories via an intuitive fluent interface",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/v5.4.8"
},
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
}
+ ],
+ "time": "2022-04-15T08:07:45+00:00"
+ },
+ {
+ "name": "symfony/options-resolver",
+ "version": "v5.4.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/options-resolver.git",
+ "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8",
+ "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php73": "~1.0",
+ "symfony/polyfill-php80": "^1.16"
},
+ "type": "library",
"autoload": {
"psr-4": {
- "Symfony\\Component\\Debug\\": ""
+ "Symfony\\Component\\OptionsResolver\\": ""
},
"exclude-from-classmap": [
"/Tests/"
@@ -168,42 +1498,226 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Debug Component",
+ "description": "Provides an improved replacement for the array_replace PHP function",
"homepage": "https://symfony.com",
- "time": "2016-09-06 11:02:40"
+ "keywords": [
+ "config",
+ "configuration",
+ "options"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/options-resolver/tree/v5.4.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-01-02T09:53:40+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.2.0",
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.26.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "dff51f72b0706335131b00a7f49606168c582594"
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
- "reference": "dff51f72b0706335131b00a7f49606168c582594",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
+ "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-ctype": "*"
},
"suggest": {
- "ext-mbstring": "For best performance"
+ "ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
"psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-24T11:49:31+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.26.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
+ "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php72\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
},
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-24T11:49:31+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.26.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1",
+ "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
"files": [
"bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -220,24 +1734,164 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
"polyfill",
"portable",
"shim"
],
- "time": "2016-05-18 14:26:46"
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-05-24T11:49:31+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v5.4.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/597f3fff8e3e91836bb0bd38f5718b56ddbde2f3",
+ "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Executes commands in sub-processes",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/process/tree/v5.4.8"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-04-08T05:07:18+00:00"
+ },
+ {
+ "name": "symfony/stopwatch",
+ "version": "v5.4.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/stopwatch.git",
+ "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/4d04b5c24f3c9a1a168a131f6cbe297155bc0d30",
+ "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/service-contracts": "^1|^2|^3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Stopwatch\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides a way to profile code",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/stopwatch/tree/v5.4.5"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-02-18T16:06:09+00:00"
}
],
- "packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "2.3.0"
}
diff --git a/vendor/autoload.php b/vendor/autoload.php
index c749f66..d4fc615 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -2,6 +2,11 @@
// autoload.php @generated by Composer
+if (PHP_VERSION_ID < 50600) {
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ exit(1);
+}
+
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6::getLoader();
diff --git a/vendor/bin/php-cs-fixer b/vendor/bin/php-cs-fixer
new file mode 100755
index 0000000..ffb1143
--- /dev/null
+++ b/vendor/bin/php-cs-fixer
@@ -0,0 +1,120 @@
+#!/usr/bin/env php
+<?php
+
+/**
+ * Proxy PHP file generated by Composer
+ *
+ * This file includes the referenced bin path (../friendsofphp/php-cs-fixer/php-cs-fixer)
+ * using a stream wrapper to prevent the shebang from being output on PHP<8
+ *
+ * @generated
+ */
+
+namespace Composer;
+
+$GLOBALS['_composer_bin_dir'] = __DIR__;
+$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
+
+if (PHP_VERSION_ID < 80000) {
+ if (!class_exists('Composer\BinProxyWrapper')) {
+ /**
+ * @internal
+ */
+ final class BinProxyWrapper
+ {
+ private $handle;
+ private $position;
+ private $realpath;
+
+ public function stream_open($path, $mode, $options, &$opened_path)
+ {
+ // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
+ $opened_path = substr($path, 17);
+ $this->realpath = realpath($opened_path) ?: $opened_path;
+ $opened_path = $this->realpath;
+ $this->handle = fopen($this->realpath, $mode);
+ $this->position = 0;
+
+ return (bool) $this->handle;
+ }
+
+ public function stream_read($count)
+ {
+ $data = fread($this->handle, $count);
+
+ if ($this->position === 0) {
+ $data = preg_replace('{^#!.*\r?\n}', '', $data);
+ }
+
+ $this->position += strlen($data);
+
+ return $data;
+ }
+
+ public function stream_cast($castAs)
+ {
+ return $this->handle;
+ }
+
+ public function stream_close()
+ {
+ fclose($this->handle);
+ }
+
+ public function stream_lock($operation)
+ {
+ return $operation ? flock($this->handle, $operation) : true;
+ }
+
+ public function stream_seek($offset, $whence)
+ {
+ if (0 === fseek($this->handle, $offset, $whence)) {
+ $this->position = ftell($this->handle);
+ return true;
+ }
+
+ return false;
+ }
+
+ public function stream_tell()
+ {
+ return $this->position;
+ }
+
+ public function stream_eof()
+ {
+ return feof($this->handle);
+ }
+
+ public function stream_stat()
+ {
+ return array();
+ }
+
+ public function stream_set_option($option, $arg1, $arg2)
+ {
+ return true;
+ }
+
+ public function url_stat($path, $flags)
+ {
+ $path = substr($path, 17);
+ if (file_exists($path)) {
+ return stat($path);
+ }
+
+ return false;
+ }
+ }
+ }
+
+ if (
+ (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
+ || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
+ ) {
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer');
+ exit(0);
+ }
+}
+
+include __DIR__ . '/..'.'/friendsofphp/php-cs-fixer/php-cs-fixer';
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
new file mode 100644
index 0000000..c6b54af
--- /dev/null
+++ b/vendor/composer/InstalledVersions.php
@@ -0,0 +1,352 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints($constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = require __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+ $installed[] = self::$installed;
+
+ return $installed;
+ }
+}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 570762b..af7b8c7 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -2,18 +2,567 @@
// autoload_classmap.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
+ 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+ 'Composer\\Pcre\\MatchAllResult' => $vendorDir . '/composer/pcre/src/MatchAllResult.php',
+ 'Composer\\Pcre\\MatchAllWithOffsetsResult' => $vendorDir . '/composer/pcre/src/MatchAllWithOffsetsResult.php',
+ 'Composer\\Pcre\\MatchResult' => $vendorDir . '/composer/pcre/src/MatchResult.php',
+ 'Composer\\Pcre\\MatchWithOffsetsResult' => $vendorDir . '/composer/pcre/src/MatchWithOffsetsResult.php',
+ 'Composer\\Pcre\\PcreException' => $vendorDir . '/composer/pcre/src/PcreException.php',
+ 'Composer\\Pcre\\Preg' => $vendorDir . '/composer/pcre/src/Preg.php',
+ 'Composer\\Pcre\\Regex' => $vendorDir . '/composer/pcre/src/Regex.php',
+ 'Composer\\Pcre\\ReplaceResult' => $vendorDir . '/composer/pcre/src/ReplaceResult.php',
+ 'Composer\\Semver\\Comparator' => $vendorDir . '/composer/semver/src/Comparator.php',
+ 'Composer\\Semver\\CompilingMatcher' => $vendorDir . '/composer/semver/src/CompilingMatcher.php',
+ 'Composer\\Semver\\Constraint\\Bound' => $vendorDir . '/composer/semver/src/Constraint/Bound.php',
+ 'Composer\\Semver\\Constraint\\Constraint' => $vendorDir . '/composer/semver/src/Constraint/Constraint.php',
+ 'Composer\\Semver\\Constraint\\ConstraintInterface' => $vendorDir . '/composer/semver/src/Constraint/ConstraintInterface.php',
+ 'Composer\\Semver\\Constraint\\MatchAllConstraint' => $vendorDir . '/composer/semver/src/Constraint/MatchAllConstraint.php',
+ 'Composer\\Semver\\Constraint\\MatchNoneConstraint' => $vendorDir . '/composer/semver/src/Constraint/MatchNoneConstraint.php',
+ 'Composer\\Semver\\Constraint\\MultiConstraint' => $vendorDir . '/composer/semver/src/Constraint/MultiConstraint.php',
+ 'Composer\\Semver\\Interval' => $vendorDir . '/composer/semver/src/Interval.php',
+ 'Composer\\Semver\\Intervals' => $vendorDir . '/composer/semver/src/Intervals.php',
+ 'Composer\\Semver\\Semver' => $vendorDir . '/composer/semver/src/Semver.php',
+ 'Composer\\Semver\\VersionParser' => $vendorDir . '/composer/semver/src/VersionParser.php',
+ 'Composer\\XdebugHandler\\PhpConfig' => $vendorDir . '/composer/xdebug-handler/src/PhpConfig.php',
+ 'Composer\\XdebugHandler\\Process' => $vendorDir . '/composer/xdebug-handler/src/Process.php',
+ 'Composer\\XdebugHandler\\Status' => $vendorDir . '/composer/xdebug-handler/src/Status.php',
+ 'Composer\\XdebugHandler\\XdebugHandler' => $vendorDir . '/composer/xdebug-handler/src/XdebugHandler.php',
+ 'Doctrine\\Common\\Annotations\\Annotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php',
+ 'Doctrine\\Common\\Annotations\\AnnotationException' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php',
+ 'Doctrine\\Common\\Annotations\\AnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php',
+ 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Required' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Target' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php',
+ 'Doctrine\\Common\\Annotations\\CachedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php',
+ 'Doctrine\\Common\\Annotations\\DocLexer' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php',
+ 'Doctrine\\Common\\Annotations\\DocParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php',
+ 'Doctrine\\Common\\Annotations\\FileCacheReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php',
+ 'Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php',
+ 'Doctrine\\Common\\Annotations\\IndexedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php',
+ 'Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php',
+ 'Doctrine\\Common\\Annotations\\PhpParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php',
+ 'Doctrine\\Common\\Annotations\\PsrCachedReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php',
+ 'Doctrine\\Common\\Annotations\\Reader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php',
+ 'Doctrine\\Common\\Annotations\\SimpleAnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php',
+ 'Doctrine\\Common\\Annotations\\TokenParser' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php',
+ 'Doctrine\\Common\\Lexer\\AbstractLexer' => $vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php',
+ 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'NC\\Updater\\CommandApplication' => $baseDir . '/lib/CommandApplication.php',
'NC\\Updater\\LogException' => $baseDir . '/lib/LogException.php',
'NC\\Updater\\RecursiveDirectoryIteratorWithoutData' => $baseDir . '/lib/RecursiveDirectoryIteratorWithoutData.php',
'NC\\Updater\\UpdateCommand' => $baseDir . '/lib/UpdateCommand.php',
'NC\\Updater\\UpdateException' => $baseDir . '/lib/UpdateException.php',
'NC\\Updater\\Updater' => $baseDir . '/lib/Updater.php',
- 'NC\\Updater\\Version' => $baseDir . '/lib/Version.php',
+ 'Nextcloud\\CodingStandard\\Config' => $vendorDir . '/nextcloud/coding-standard/src/Config.php',
+ 'PhpCsFixer\\AbstractDoctrineAnnotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php',
+ 'PhpCsFixer\\AbstractFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractFixer.php',
+ 'PhpCsFixer\\AbstractFopenFlagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractFopenFlagFixer.php',
+ 'PhpCsFixer\\AbstractFunctionReferenceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractFunctionReferenceFixer.php',
+ 'PhpCsFixer\\AbstractLinesBeforeNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractLinesBeforeNamespaceFixer.php',
+ 'PhpCsFixer\\AbstractNoUselessElseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractNoUselessElseFixer.php',
+ 'PhpCsFixer\\AbstractPhpdocToTypeDeclarationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php',
+ 'PhpCsFixer\\AbstractPhpdocTypesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractPhpdocTypesFixer.php',
+ 'PhpCsFixer\\AbstractProxyFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/AbstractProxyFixer.php',
+ 'PhpCsFixer\\Cache\\Cache' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/Cache.php',
+ 'PhpCsFixer\\Cache\\CacheInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/CacheInterface.php',
+ 'PhpCsFixer\\Cache\\CacheManagerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/CacheManagerInterface.php',
+ 'PhpCsFixer\\Cache\\Directory' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/Directory.php',
+ 'PhpCsFixer\\Cache\\DirectoryInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/DirectoryInterface.php',
+ 'PhpCsFixer\\Cache\\FileCacheManager' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/FileCacheManager.php',
+ 'PhpCsFixer\\Cache\\FileHandler' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php',
+ 'PhpCsFixer\\Cache\\FileHandlerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/FileHandlerInterface.php',
+ 'PhpCsFixer\\Cache\\NullCacheManager' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/NullCacheManager.php',
+ 'PhpCsFixer\\Cache\\Signature' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/Signature.php',
+ 'PhpCsFixer\\Cache\\SignatureInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Cache/SignatureInterface.php',
+ 'PhpCsFixer\\Config' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Config.php',
+ 'PhpCsFixer\\ConfigInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigInterface.php',
+ 'PhpCsFixer\\ConfigurationException\\InvalidConfigurationException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidConfigurationException.php',
+ 'PhpCsFixer\\ConfigurationException\\InvalidFixerConfigurationException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php',
+ 'PhpCsFixer\\ConfigurationException\\InvalidForEnvFixerConfigurationException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php',
+ 'PhpCsFixer\\ConfigurationException\\RequiredFixerConfigurationException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php',
+ 'PhpCsFixer\\Console\\Application' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Application.php',
+ 'PhpCsFixer\\Console\\Command\\DescribeCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php',
+ 'PhpCsFixer\\Console\\Command\\DescribeNameNotFoundException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php',
+ 'PhpCsFixer\\Console\\Command\\DocumentationCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php',
+ 'PhpCsFixer\\Console\\Command\\FixCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php',
+ 'PhpCsFixer\\Console\\Command\\FixCommandExitStatusCalculator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php',
+ 'PhpCsFixer\\Console\\Command\\HelpCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php',
+ 'PhpCsFixer\\Console\\Command\\ListFilesCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php',
+ 'PhpCsFixer\\Console\\Command\\ListSetsCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php',
+ 'PhpCsFixer\\Console\\Command\\SelfUpdateCommand' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php',
+ 'PhpCsFixer\\Console\\ConfigurationResolver' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php',
+ 'PhpCsFixer\\Console\\Output\\ErrorOutput' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php',
+ 'PhpCsFixer\\Console\\Output\\NullOutput' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php',
+ 'PhpCsFixer\\Console\\Output\\ProcessOutput' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutput.php',
+ 'PhpCsFixer\\Console\\Output\\ProcessOutputInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutputInterface.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\CheckstyleReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\GitlabReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\JsonReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\JunitReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\ReportSummary' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReportSummary.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\ReporterFactory' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\ReporterInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterInterface.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\TextReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\XmlReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/XmlReporter.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\JsonReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/JsonReporter.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\ReportSummary' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReportSummary.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\ReporterFactory' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\ReporterInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterInterface.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\TextReporter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\GithubClient' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\GithubClientInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClientInterface.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\NewVersionChecker' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionChecker.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\NewVersionCheckerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionCheckerInterface.php',
+ 'PhpCsFixer\\Console\\WarningsDetector' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php',
+ 'PhpCsFixer\\Diff\\Chunk' => $vendorDir . '/php-cs-fixer/diff/src/Chunk.php',
+ 'PhpCsFixer\\Diff\\ConfigurationException' => $vendorDir . '/php-cs-fixer/diff/src/Exception/ConfigurationException.php',
+ 'PhpCsFixer\\Diff\\Diff' => $vendorDir . '/php-cs-fixer/diff/src/Diff.php',
+ 'PhpCsFixer\\Diff\\Differ' => $vendorDir . '/php-cs-fixer/diff/src/Differ.php',
+ 'PhpCsFixer\\Diff\\Exception' => $vendorDir . '/php-cs-fixer/diff/src/Exception/Exception.php',
+ 'PhpCsFixer\\Diff\\InvalidArgumentException' => $vendorDir . '/php-cs-fixer/diff/src/Exception/InvalidArgumentException.php',
+ 'PhpCsFixer\\Diff\\Line' => $vendorDir . '/php-cs-fixer/diff/src/Line.php',
+ 'PhpCsFixer\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/php-cs-fixer/diff/src/LongestCommonSubsequenceCalculator.php',
+ 'PhpCsFixer\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/php-cs-fixer/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
+ 'PhpCsFixer\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/php-cs-fixer/diff/src/Output/AbstractChunkOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/php-cs-fixer/diff/src/Output/DiffOnlyOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/php-cs-fixer/diff/src/Output/DiffOutputBuilderInterface.php',
+ 'PhpCsFixer\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/php-cs-fixer/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/php-cs-fixer/diff/src/Output/UnifiedDiffOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Parser' => $vendorDir . '/php-cs-fixer/diff/src/Parser.php',
+ 'PhpCsFixer\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/php-cs-fixer/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
+ 'PhpCsFixer\\Differ\\DiffConsoleFormatter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php',
+ 'PhpCsFixer\\Differ\\DifferInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php',
+ 'PhpCsFixer\\Differ\\FullDiffer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Differ/FullDiffer.php',
+ 'PhpCsFixer\\Differ\\NullDiffer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php',
+ 'PhpCsFixer\\Differ\\UnifiedDiffer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php',
+ 'PhpCsFixer\\DocBlock\\Annotation' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php',
+ 'PhpCsFixer\\DocBlock\\DocBlock' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/DocBlock.php',
+ 'PhpCsFixer\\DocBlock\\Line' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/Line.php',
+ 'PhpCsFixer\\DocBlock\\ShortDescription' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/ShortDescription.php',
+ 'PhpCsFixer\\DocBlock\\Tag' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php',
+ 'PhpCsFixer\\DocBlock\\TagComparator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php',
+ 'PhpCsFixer\\DocBlock\\TypeExpression' => $vendorDir . '/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php',
+ 'PhpCsFixer\\Doctrine\\Annotation\\Token' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php',
+ 'PhpCsFixer\\Doctrine\\Annotation\\Tokens' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php',
+ 'PhpCsFixer\\Documentation\\DocumentationLocator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php',
+ 'PhpCsFixer\\Documentation\\FixerDocumentGenerator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php',
+ 'PhpCsFixer\\Documentation\\ListDocumentGenerator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Documentation/ListDocumentGenerator.php',
+ 'PhpCsFixer\\Documentation\\RstUtils' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Documentation/RstUtils.php',
+ 'PhpCsFixer\\Documentation\\RuleSetDocumentationGenerator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php',
+ 'PhpCsFixer\\Error\\Error' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Error/Error.php',
+ 'PhpCsFixer\\Error\\ErrorsManager' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Error/ErrorsManager.php',
+ 'PhpCsFixer\\FileReader' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FileReader.php',
+ 'PhpCsFixer\\FileRemoval' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FileRemoval.php',
+ 'PhpCsFixer\\Finder' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Finder.php',
+ 'PhpCsFixer\\FixerConfiguration\\AliasedFixerOption' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOption.php',
+ 'PhpCsFixer\\FixerConfiguration\\AliasedFixerOptionBuilder' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOptionBuilder.php',
+ 'PhpCsFixer\\FixerConfiguration\\AllowedValueSubset' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/AllowedValueSubset.php',
+ 'PhpCsFixer\\FixerConfiguration\\DeprecatedFixerOption' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOption.php',
+ 'PhpCsFixer\\FixerConfiguration\\DeprecatedFixerOptionInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOptionInterface.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerConfigurationResolver' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerConfigurationResolverInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolverInterface.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerOption' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerOptionBuilder' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerOptionInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php',
+ 'PhpCsFixer\\FixerConfiguration\\InvalidOptionsForEnvException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php',
+ 'PhpCsFixer\\FixerDefinition\\CodeSample' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php',
+ 'PhpCsFixer\\FixerDefinition\\CodeSampleInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\FileSpecificCodeSample' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSample.php',
+ 'PhpCsFixer\\FixerDefinition\\FileSpecificCodeSampleInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSampleInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\FixerDefinition' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinition.php',
+ 'PhpCsFixer\\FixerDefinition\\FixerDefinitionInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinitionInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecificCodeSample' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSample.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecificCodeSampleInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSampleInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecification' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecification.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecificationInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificationInterface.php',
+ 'PhpCsFixer\\FixerFactory' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerFactory.php',
+ 'PhpCsFixer\\FixerFileProcessedEvent' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerFileProcessedEvent.php',
+ 'PhpCsFixer\\FixerNameValidator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/FixerNameValidator.php',
+ 'PhpCsFixer\\Fixer\\AbstractIncrementOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php',
+ 'PhpCsFixer\\Fixer\\AbstractPhpUnitFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\ArrayPushFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\BacktickToShellExecFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\EregToPregFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\MbStrFunctionsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/MbStrFunctionsFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\ModernizeStrposFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/ModernizeStrposFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\NoAliasFunctionsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\NoAliasLanguageConstructCallFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasLanguageConstructCallFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\NoMixedEchoPrintFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\PowToExponentiationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/PowToExponentiationFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\RandomApiMigrationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\SetTypeToCastFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\ArraySyntaxFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NoMultilineWhitespaceAroundDoubleArrowFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NoTrailingCommaInSinglelineArrayFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NoWhitespaceBeforeCommaInArrayFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NormalizeIndexBraceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\TrimArraySpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\WhitespaceAfterCommaInArrayFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\BracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\EncodingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\NonPrintableCharacterFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\OctalNotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\PsrAutoloadingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\ConstantCaseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\IntegerLiteralCaseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\LowercaseKeywordsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseKeywordsFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\LowercaseStaticReferenceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseStaticReferenceFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\MagicConstantCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicConstantCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\MagicMethodCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionTypeDeclarationCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\CastSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\LowercaseCastFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\ModernizeTypesCastingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\NoShortBoolCastFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoShortBoolCastFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\NoUnsetCastFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoUnsetCastFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\ShortScalarCastFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ShortScalarCastFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\ClassAttributesSeparationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\ClassDefinitionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\FinalClassFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\FinalInternalClassFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\FinalPublicMethodForAbstractClassFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoBlankLinesAfterClassOpeningFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoNullPropertyInitializationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoPhp4ConstructorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoUnneededFinalMethodFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedClassElementsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedInterfacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedTraitsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\ProtectedToPrivateFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SelfAccessorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SelfStaticAccessorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SingleClassElementPerStatementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SingleTraitInsertPerStatementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleTraitInsertPerStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\VisibilityRequiredFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassUsage\\DateTimeImmutableFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ClassUsage/DateTimeImmutableFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\CommentToPhpdocFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\HeaderCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\MultilineCommentOpeningClosingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\NoEmptyCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoEmptyCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\NoTrailingWhitespaceInCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoTrailingWhitespaceInCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\SingleLineCommentStyleFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php',
+ 'PhpCsFixer\\Fixer\\ConfigurableFixerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php',
+ 'PhpCsFixer\\Fixer\\ConstantNotation\\NativeConstantInvocationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\ControlStructureContinuationPositionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\ElseifFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ElseifFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\EmptyLoopBodyFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\EmptyLoopConditionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\IncludeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/IncludeFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoAlternativeSyntaxFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoBreakCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoSuperfluousElseifFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoTrailingCommaInListCallFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededControlParenthesesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededCurlyBracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoUselessElseFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SimplifiedIfReturnFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SimplifiedIfReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SwitchCaseSemicolonToColonFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSemicolonToColonFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SwitchCaseSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SwitchContinueToBreakFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchContinueToBreakFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\TrailingCommaInMultilineFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\YodaStyleFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php',
+ 'PhpCsFixer\\Fixer\\DeprecatedFixerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/DeprecatedFixerInterface.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationArrayAssignmentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationBracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\FixerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FixerInterface.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\CombineNestedDirnameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FopenFlagOrderFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FopenFlagsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FunctionDeclarationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FunctionTypehintSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionTypehintSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\ImplodeCallFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ImplodeCallFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\LambdaNotUsedImportFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/LambdaNotUsedImportFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\MethodArgumentSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NativeFunctionInvocationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NoSpacesAfterFunctionNameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NoUnreachableDefaultArgumentValueFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NoUselessSprintfFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUselessSprintfFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NullableTypeDeclarationForDefaultNullValueFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\PhpdocToParamTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\PhpdocToPropertyTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\PhpdocToReturnTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\RegularCallableCallFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/RegularCallableCallFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\ReturnTypeDeclarationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ReturnTypeDeclarationFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\SingleLineThrowFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/SingleLineThrowFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\StaticLambdaFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/StaticLambdaFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\UseArrowFunctionsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/UseArrowFunctionsFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\VoidReturnFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/VoidReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\FullyQualifiedStrictTypesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\GlobalNamespaceImportFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\GroupImportFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\NoLeadingImportSlashFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/NoLeadingImportSlashFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\NoUnusedImportsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\OrderedImportsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\SingleImportPerStatementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\SingleLineAfterImportsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleLineAfterImportsFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\ClassKeywordRemoveFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ClassKeywordRemoveFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\CombineConsecutiveIssetsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\CombineConsecutiveUnsetsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\DeclareEqualNormalizeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\DeclareParenthesesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareParenthesesFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\DirConstantFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DirConstantFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\ErrorSuppressionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\ExplicitIndirectVariableFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ExplicitIndirectVariableFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\FunctionToConstantFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\IsNullFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\NoUnsetOnPropertyFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\SingleSpaceAfterConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php',
+ 'PhpCsFixer\\Fixer\\ListNotation\\ListSyntaxFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\BlankLineAfterNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\CleanNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoBlankLinesBeforeNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoLeadingNamespaceWhitespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\SingleBlankLineBeforeNamespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/SingleBlankLineBeforeNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Naming\\NoHomoglyphNamesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\AssignNullCoalescingToCoalesceEqualFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/AssignNullCoalescingToCoalesceEqualFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\BinaryOperatorSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\ConcatSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\IncrementStyleFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\LogicalOperatorsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NewWithBracesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NoSpaceAroundDoubleColonFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NotOperatorWithSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NotOperatorWithSuccessorSpaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSuccessorSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\ObjectOperatorWithoutWhitespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/ObjectOperatorWithoutWhitespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\OperatorLinebreakFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\StandardizeIncrementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeIncrementFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\StandardizeNotEqualsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\TernaryOperatorSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryOperatorSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\TernaryToElvisOperatorFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToElvisOperatorFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\TernaryToNullCoalescingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToNullCoalescingFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\UnaryOperatorSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\BlankLineAfterOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\EchoTagSyntaxFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\FullOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertInternalTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitExpectationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitFqcnAnnotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitFqcnAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitInternalClassFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitMethodCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitMockFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitMockShortWillReturnFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockShortWillReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitNamespacedFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitNoExpectationAnnotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitSetUpTearDownVisibilityFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSetUpTearDownVisibilityFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitSizeClassFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitStrictFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTargetVersion' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTestAnnotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTestCaseStaticMethodCallsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTestClassRequiresCoversFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestClassRequiresCoversFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\AlignMultilineCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\GeneralPhpdocAnnotationRemoveFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\GeneralPhpdocTagRenameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\NoBlankLinesAfterPhpdocFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\NoEmptyPhpdocFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\NoSuperfluousPhpdocTagsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAddMissingParamAnnotationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAlignFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAnnotationWithoutDotFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocIndentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocInlineTagNormalizerFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocLineSpanFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoAccessFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoAliasTagFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoEmptyReturnFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoPackageFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoUselessInheritdocFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderByValueFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocReturnSelfReferenceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocScalarFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSeparationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSingleLineVarSpacingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSingleLineVarSpacingFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSummaryFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSummaryFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTagCasingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTagTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocToCommentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTrimConsecutiveBlankLineSeparationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTrimFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTypesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTypesOrderFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocVarAnnotationCorrectOrderFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarAnnotationCorrectOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocVarWithoutNameFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php',
+ 'PhpCsFixer\\Fixer\\ReturnNotation\\NoUselessReturnFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/NoUselessReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\ReturnNotation\\ReturnAssignmentFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/ReturnAssignmentFixer.php',
+ 'PhpCsFixer\\Fixer\\ReturnNotation\\SimplifiedNullReturnFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/SimplifiedNullReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\MultilineWhitespaceBeforeSemicolonsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\NoEmptyStatementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoEmptyStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\NoSinglelineWhitespaceBeforeSemicolonsFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoSinglelineWhitespaceBeforeSemicolonsFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\SemicolonAfterInstructionFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SemicolonAfterInstructionFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\SpaceAfterSemicolonFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SpaceAfterSemicolonFixer.php',
+ 'PhpCsFixer\\Fixer\\Strict\\DeclareStrictTypesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php',
+ 'PhpCsFixer\\Fixer\\Strict\\StrictComparisonFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictComparisonFixer.php',
+ 'PhpCsFixer\\Fixer\\Strict\\StrictParamFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictParamFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\EscapeImplicitBackslashesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\ExplicitStringVariableFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/ExplicitStringVariableFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\HeredocToNowdocFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/HeredocToNowdocFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\NoBinaryStringFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoBinaryStringFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\NoTrailingWhitespaceInStringFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\SimpleToComplexStringVariableFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SimpleToComplexStringVariableFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\SingleQuoteFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\StringLengthToEmptyFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLengthToEmptyFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\StringLineEndingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLineEndingFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\ArrayIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\BlankLineBeforeStatementFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\CompactNullableTypehintFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\HeredocIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\IndentationTypeFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\LineEndingFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/LineEndingFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\MethodChainingIndentationFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/MethodChainingIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoExtraBlankLinesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoExtraBlankLinesFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoSpacesAroundOffsetFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesAroundOffsetFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoSpacesInsideParenthesisFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesInsideParenthesisFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoTrailingWhitespaceFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoWhitespaceInBlankLineFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\SingleBlankLineAtEofFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\TypesSpacesFixer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\WhitespacesAwareFixerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php',
+ 'PhpCsFixer\\Indicator\\PhpUnitTestCaseIndicator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php',
+ 'PhpCsFixer\\Linter\\CachingLinter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/CachingLinter.php',
+ 'PhpCsFixer\\Linter\\Linter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/Linter.php',
+ 'PhpCsFixer\\Linter\\LinterInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/LinterInterface.php',
+ 'PhpCsFixer\\Linter\\LintingException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/LintingException.php',
+ 'PhpCsFixer\\Linter\\LintingResultInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/LintingResultInterface.php',
+ 'PhpCsFixer\\Linter\\ProcessLinter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php',
+ 'PhpCsFixer\\Linter\\ProcessLinterProcessBuilder' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/ProcessLinterProcessBuilder.php',
+ 'PhpCsFixer\\Linter\\ProcessLintingResult' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php',
+ 'PhpCsFixer\\Linter\\TokenizerLinter' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/TokenizerLinter.php',
+ 'PhpCsFixer\\Linter\\TokenizerLintingResult' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php',
+ 'PhpCsFixer\\Linter\\UnavailableLinterException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Linter/UnavailableLinterException.php',
+ 'PhpCsFixer\\PharChecker' => $vendorDir . '/friendsofphp/php-cs-fixer/src/PharChecker.php',
+ 'PhpCsFixer\\PharCheckerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/PharCheckerInterface.php',
+ 'PhpCsFixer\\Preg' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Preg.php',
+ 'PhpCsFixer\\PregException' => $vendorDir . '/friendsofphp/php-cs-fixer/src/PregException.php',
+ 'PhpCsFixer\\RuleSet\\AbstractMigrationSetDescription' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php',
+ 'PhpCsFixer\\RuleSet\\AbstractRuleSetDescription' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/AbstractRuleSetDescription.php',
+ 'PhpCsFixer\\RuleSet\\RuleSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php',
+ 'PhpCsFixer\\RuleSet\\RuleSetDescriptionInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetDescriptionInterface.php',
+ 'PhpCsFixer\\RuleSet\\RuleSetInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php',
+ 'PhpCsFixer\\RuleSet\\RuleSets' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\DoctrineAnnotationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP54MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP56MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP56MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP70MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP70MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP71MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP71MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP73MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP73MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP74MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP74MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP80MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP80MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP81MigrationSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit30MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit32MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit35MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit43MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit48MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit50MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit50MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit52MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit54MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit55MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit56MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit57MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit60MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit75MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit84MigrationRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR12RiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR12Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR1Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR2Set' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR2Set.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PhpCsFixerRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PhpCsFixerSet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\SymfonyRiskySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonyRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\SymfonySet' => $vendorDir . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonySet.php',
+ 'PhpCsFixer\\Runner\\FileCachingLintingIterator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Runner/FileCachingLintingIterator.php',
+ 'PhpCsFixer\\Runner\\FileFilterIterator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php',
+ 'PhpCsFixer\\Runner\\FileLintingIterator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Runner/FileLintingIterator.php',
+ 'PhpCsFixer\\Runner\\Runner' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Runner/Runner.php',
+ 'PhpCsFixer\\StdinFileInfo' => $vendorDir . '/friendsofphp/php-cs-fixer/src/StdinFileInfo.php',
+ 'PhpCsFixer\\Tokenizer\\AbstractTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\AbstractTypeTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTypeTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\AbstractControlCaseStructuresAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\ArgumentAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\CaseAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\DefaultAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\EnumAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\MatchAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\NamespaceAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\NamespaceUseAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceUseAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\StartEndTokenAwareAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/StartEndTokenAwareAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\SwitchAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/SwitchAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\TypeAnalysis' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ArgumentsAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ArgumentsAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\AttributeAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AttributeAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\BlocksAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ClassyAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\CommentsAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ControlCaseStructuresAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\FunctionsAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\GotoLabelAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\NamespaceUsesAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\NamespacesAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ReferenceAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ReferenceAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\WhitespacesAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/WhitespacesAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\CT' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php',
+ 'PhpCsFixer\\Tokenizer\\CodeHasher' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/CodeHasher.php',
+ 'PhpCsFixer\\Tokenizer\\Generator\\NamespacedStringTokenGenerator' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Generator/NamespacedStringTokenGenerator.php',
+ 'PhpCsFixer\\Tokenizer\\Resolver\\TypeShortNameResolver' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Resolver/TypeShortNameResolver.php',
+ 'PhpCsFixer\\Tokenizer\\Token' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php',
+ 'PhpCsFixer\\Tokenizer\\Tokens' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php',
+ 'PhpCsFixer\\Tokenizer\\TokensAnalyzer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\TransformerInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/TransformerInterface.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ArrayTypehintTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\AttributeTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\BraceClassInstantiationTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ClassConstantTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ConstructorPromotionTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\CurlyBraceTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/CurlyBraceTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\FirstClassCallableTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ImportTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NameQualifiedTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NamedArgumentTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamedArgumentTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NamespaceOperatorTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamespaceOperatorTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NullableTypeTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NullableTypeTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ReturnRefTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ReturnRefTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\SquareBraceTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/SquareBraceTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\TypeAlternationTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeAlternationTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\TypeColonTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeColonTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\TypeIntersectionTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeIntersectionTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\UseTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/UseTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\WhitespacyCommentTransformer' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/WhitespacyCommentTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformers' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformers.php',
+ 'PhpCsFixer\\ToolInfo' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ToolInfo.php',
+ 'PhpCsFixer\\ToolInfoInterface' => $vendorDir . '/friendsofphp/php-cs-fixer/src/ToolInfoInterface.php',
+ 'PhpCsFixer\\Utils' => $vendorDir . '/friendsofphp/php-cs-fixer/src/Utils.php',
+ 'PhpCsFixer\\WhitespacesFixerConfig' => $vendorDir . '/friendsofphp/php-cs-fixer/src/WhitespacesFixerConfig.php',
+ 'PhpCsFixer\\WordMatcher' => $vendorDir . '/friendsofphp/php-cs-fixer/src/WordMatcher.php',
+ 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
+ 'Psr\\Cache\\CacheException' => $vendorDir . '/psr/cache/src/CacheException.php',
+ 'Psr\\Cache\\CacheItemInterface' => $vendorDir . '/psr/cache/src/CacheItemInterface.php',
+ 'Psr\\Cache\\CacheItemPoolInterface' => $vendorDir . '/psr/cache/src/CacheItemPoolInterface.php',
+ 'Psr\\Cache\\InvalidArgumentException' => $vendorDir . '/psr/cache/src/InvalidArgumentException.php',
+ 'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php',
+ 'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php',
+ 'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php',
'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
@@ -22,12 +571,21 @@ return array(
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
+ 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
+ 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
+ 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
+ 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php',
+ 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
+ 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
+ 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/FactoryCommandLoader.php',
'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php',
'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php',
'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php',
+ 'Symfony\\Component\\Console\\Command\\LockableTrait' => $vendorDir . '/symfony/console/Command/LockableTrait.php',
'Symfony\\Component\\Console\\ConsoleEvents' => $vendorDir . '/symfony/console/ConsoleEvents.php',
+ 'Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => $vendorDir . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php',
'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => $vendorDir . '/symfony/console/Descriptor/ApplicationDescription.php',
'Symfony\\Component\\Console\\Descriptor\\Descriptor' => $vendorDir . '/symfony/console/Descriptor/Descriptor.php',
'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => $vendorDir . '/symfony/console/Descriptor/DescriptorInterface.php',
@@ -35,23 +593,28 @@ return array(
'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => $vendorDir . '/symfony/console/Descriptor/MarkdownDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => $vendorDir . '/symfony/console/Descriptor/TextDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => $vendorDir . '/symfony/console/Descriptor/XmlDescriptor.php',
+ 'Symfony\\Component\\Console\\EventListener\\ErrorListener' => $vendorDir . '/symfony/console/EventListener/ErrorListener.php',
'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => $vendorDir . '/symfony/console/Event/ConsoleCommandEvent.php',
+ 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => $vendorDir . '/symfony/console/Event/ConsoleErrorEvent.php',
'Symfony\\Component\\Console\\Event\\ConsoleEvent' => $vendorDir . '/symfony/console/Event/ConsoleEvent.php',
- 'Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent' => $vendorDir . '/symfony/console/Event/ConsoleExceptionEvent.php',
'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => $vendorDir . '/symfony/console/Event/ConsoleTerminateEvent.php',
'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => $vendorDir . '/symfony/console/Exception/CommandNotFoundException.php',
'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/console/Exception/ExceptionInterface.php',
'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/console/Exception/InvalidArgumentException.php',
'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => $vendorDir . '/symfony/console/Exception/InvalidOptionException.php',
'Symfony\\Component\\Console\\Exception\\LogicException' => $vendorDir . '/symfony/console/Exception/LogicException.php',
+ 'Symfony\\Component\\Console\\Exception\\MissingInputException' => $vendorDir . '/symfony/console/Exception/MissingInputException.php',
+ 'Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => $vendorDir . '/symfony/console/Exception/NamespaceNotFoundException.php',
'Symfony\\Component\\Console\\Exception\\RuntimeException' => $vendorDir . '/symfony/console/Exception/RuntimeException.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => $vendorDir . '/symfony/console/Formatter/OutputFormatter.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterInterface.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyle.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleInterface.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => $vendorDir . '/symfony/console/Formatter/OutputFormatterStyleStack.php',
+ 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php',
'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php',
+ 'Symfony\\Component\\Console\\Helper\\Dumper' => $vendorDir . '/symfony/console/Helper/Dumper.php',
'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Helper/Helper.php',
'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php',
@@ -64,6 +627,7 @@ return array(
'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => $vendorDir . '/symfony/console/Helper/SymfonyQuestionHelper.php',
'Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Helper/Table.php',
'Symfony\\Component\\Console\\Helper\\TableCell' => $vendorDir . '/symfony/console/Helper/TableCell.php',
+ 'Symfony\\Component\\Console\\Helper\\TableRows' => $vendorDir . '/symfony/console/Helper/TableRows.php',
'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Helper/TableSeparator.php',
'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Helper/TableStyle.php',
'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Input/ArgvInput.php',
@@ -74,39 +638,121 @@ return array(
'Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Input/InputDefinition.php',
'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Input/InputInterface.php',
'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Input/InputOption.php',
+ 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => $vendorDir . '/symfony/console/Input/StreamableInputInterface.php',
'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Input/StringInput.php',
'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Logger/ConsoleLogger.php',
'Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Output/BufferedOutput.php',
'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Output/ConsoleOutput.php',
'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Output/ConsoleOutputInterface.php',
+ 'Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => $vendorDir . '/symfony/console/Output/ConsoleSectionOutput.php',
'Symfony\\Component\\Console\\Output\\NullOutput' => $vendorDir . '/symfony/console/Output/NullOutput.php',
'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Output/Output.php',
'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Output/OutputInterface.php',
'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Output/StreamOutput.php',
+ 'Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => $vendorDir . '/symfony/console/Output/TrimmedBufferOutput.php',
'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Question/ChoiceQuestion.php',
'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Question/ConfirmationQuestion.php',
'Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Question/Question.php',
'Symfony\\Component\\Console\\Style\\OutputStyle' => $vendorDir . '/symfony/console/Style/OutputStyle.php',
'Symfony\\Component\\Console\\Style\\StyleInterface' => $vendorDir . '/symfony/console/Style/StyleInterface.php',
'Symfony\\Component\\Console\\Style\\SymfonyStyle' => $vendorDir . '/symfony/console/Style/SymfonyStyle.php',
+ 'Symfony\\Component\\Console\\Terminal' => $vendorDir . '/symfony/console/Terminal.php',
'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Tester/ApplicationTester.php',
'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Tester/CommandTester.php',
- 'Symfony\\Component\\Debug\\BufferingLogger' => $vendorDir . '/symfony/debug/BufferingLogger.php',
- 'Symfony\\Component\\Debug\\Debug' => $vendorDir . '/symfony/debug/Debug.php',
- 'Symfony\\Component\\Debug\\DebugClassLoader' => $vendorDir . '/symfony/debug/DebugClassLoader.php',
- 'Symfony\\Component\\Debug\\ErrorHandler' => $vendorDir . '/symfony/debug/ErrorHandler.php',
- 'Symfony\\Component\\Debug\\ExceptionHandler' => $vendorDir . '/symfony/debug/ExceptionHandler.php',
- 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/debug/Exception/ClassNotFoundException.php',
- 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Exception/ContextErrorException.php',
- 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Exception/FatalErrorException.php',
- 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' => $vendorDir . '/symfony/debug/Exception/FatalThrowableError.php',
- 'Symfony\\Component\\Debug\\Exception\\FlattenException' => $vendorDir . '/symfony/debug/Exception/FlattenException.php',
- 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => $vendorDir . '/symfony/debug/Exception/OutOfMemoryException.php',
- 'Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException' => $vendorDir . '/symfony/debug/Exception/UndefinedFunctionException.php',
- 'Symfony\\Component\\Debug\\Exception\\UndefinedMethodException' => $vendorDir . '/symfony/debug/Exception/UndefinedMethodException.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\ClassNotFoundFatalErrorHandler' => $vendorDir . '/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\FatalErrorHandlerInterface' => $vendorDir . '/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedFunctionFatalErrorHandler' => $vendorDir . '/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedMethodFatalErrorHandler' => $vendorDir . '/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php',
+ 'Symfony\\Component\\Console\\Tester\\TesterTrait' => $vendorDir . '/symfony/console/Tester/TesterTrait.php',
+ 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
+ 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
+ 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => $vendorDir . '/symfony/event-dispatcher/Debug/WrappedListener.php',
+ 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\AddEventAliasesPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php',
+ 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
+ 'Symfony\\Component\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher/Event.php',
+ 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/EventDispatcher.php',
+ 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher/EventDispatcherInterface.php',
+ 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => $vendorDir . '/symfony/event-dispatcher/EventSubscriberInterface.php',
+ 'Symfony\\Component\\EventDispatcher\\GenericEvent' => $vendorDir . '/symfony/event-dispatcher/GenericEvent.php',
+ 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/ImmutableEventDispatcher.php',
+ 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => $vendorDir . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php',
+ 'Symfony\\Component\\EventDispatcher\\LegacyEventProxy' => $vendorDir . '/symfony/event-dispatcher/LegacyEventProxy.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/ExceptionInterface.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/filesystem/Exception/FileNotFoundException.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\IOException' => $vendorDir . '/symfony/filesystem/Exception/IOException.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' => $vendorDir . '/symfony/filesystem/Exception/IOExceptionInterface.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/filesystem/Exception/InvalidArgumentException.php',
+ 'Symfony\\Component\\Filesystem\\Filesystem' => $vendorDir . '/symfony/filesystem/Filesystem.php',
+ 'Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Comparator/Comparator.php',
+ 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Comparator/DateComparator.php',
+ 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php',
+ 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php',
+ 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => $vendorDir . '/symfony/finder/Exception/DirectoryNotFoundException.php',
+ 'Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Finder.php',
+ 'Symfony\\Component\\Finder\\Gitignore' => $vendorDir . '/symfony/finder/Gitignore.php',
+ 'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php',
+ 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DepthRangeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => $vendorDir . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FileTypeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilecontentFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => $vendorDir . '/symfony/finder/Iterator/FilenameFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\LazyIterator' => $vendorDir . '/symfony/finder/Iterator/LazyIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => $vendorDir . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => $vendorDir . '/symfony/finder/Iterator/PathFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => $vendorDir . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/SizeRangeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => $vendorDir . '/symfony/finder/Iterator/SortableIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => $vendorDir . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php',
+ 'Symfony\\Component\\Finder\\SplFileInfo' => $vendorDir . '/symfony/finder/SplFileInfo.php',
+ 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/MissingOptionsException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/options-resolver/Exception/NoConfigurationException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
+ 'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => $vendorDir . '/symfony/options-resolver/OptionConfigurator.php',
+ 'Symfony\\Component\\OptionsResolver\\Options' => $vendorDir . '/symfony/options-resolver/Options.php',
+ 'Symfony\\Component\\OptionsResolver\\OptionsResolver' => $vendorDir . '/symfony/options-resolver/OptionsResolver.php',
+ 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Exception/ExceptionInterface.php',
+ 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/process/Exception/InvalidArgumentException.php',
+ 'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => $vendorDir . '/symfony/process/Exception/ProcessFailedException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => $vendorDir . '/symfony/process/Exception/ProcessSignaledException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => $vendorDir . '/symfony/process/Exception/ProcessTimedOutException.php',
+ 'Symfony\\Component\\Process\\Exception\\RuntimeException' => $vendorDir . '/symfony/process/Exception/RuntimeException.php',
+ 'Symfony\\Component\\Process\\ExecutableFinder' => $vendorDir . '/symfony/process/ExecutableFinder.php',
+ 'Symfony\\Component\\Process\\InputStream' => $vendorDir . '/symfony/process/InputStream.php',
+ 'Symfony\\Component\\Process\\PhpExecutableFinder' => $vendorDir . '/symfony/process/PhpExecutableFinder.php',
+ 'Symfony\\Component\\Process\\PhpProcess' => $vendorDir . '/symfony/process/PhpProcess.php',
+ 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' => $vendorDir . '/symfony/process/Pipes/AbstractPipes.php',
+ 'Symfony\\Component\\Process\\Pipes\\PipesInterface' => $vendorDir . '/symfony/process/Pipes/PipesInterface.php',
+ 'Symfony\\Component\\Process\\Pipes\\UnixPipes' => $vendorDir . '/symfony/process/Pipes/UnixPipes.php',
+ 'Symfony\\Component\\Process\\Pipes\\WindowsPipes' => $vendorDir . '/symfony/process/Pipes/WindowsPipes.php',
+ 'Symfony\\Component\\Process\\Process' => $vendorDir . '/symfony/process/Process.php',
+ 'Symfony\\Component\\Process\\ProcessUtils' => $vendorDir . '/symfony/process/ProcessUtils.php',
+ 'Symfony\\Component\\Stopwatch\\Section' => $vendorDir . '/symfony/stopwatch/Section.php',
+ 'Symfony\\Component\\Stopwatch\\Stopwatch' => $vendorDir . '/symfony/stopwatch/Stopwatch.php',
+ 'Symfony\\Component\\Stopwatch\\StopwatchEvent' => $vendorDir . '/symfony/stopwatch/StopwatchEvent.php',
+ 'Symfony\\Component\\Stopwatch\\StopwatchPeriod' => $vendorDir . '/symfony/stopwatch/StopwatchPeriod.php',
+ 'Symfony\\Contracts\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher-contracts/Event.php',
+ 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php',
+ 'Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php',
+ 'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php',
+ 'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php',
+ 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php',
+ 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php',
+ 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php',
+ 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php',
+ 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php',
+ 'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
+ 'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php',
+ 'Symfony\\Polyfill\\Php73\\Php73' => $vendorDir . '/symfony/polyfill-php73/Php73.php',
+ 'Symfony\\Polyfill\\Php80\\Php80' => $vendorDir . '/symfony/polyfill-php80/Php80.php',
+ 'Symfony\\Polyfill\\Php80\\PhpToken' => $vendorDir . '/symfony/polyfill-php80/PhpToken.php',
+ 'Symfony\\Polyfill\\Php81\\Php81' => $vendorDir . '/symfony/polyfill-php81/Php81.php',
+ 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
+ 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 315ab83..b31fa4d 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -2,9 +2,15 @@
// autoload_files.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
+ 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
+ '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
+ '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
+ '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
+ '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php',
);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
index b7fc012..15a2ff3 100644
--- a/vendor/composer/autoload_namespaces.php
+++ b/vendor/composer/autoload_namespaces.php
@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index 2cef3fe..b588742 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -2,13 +2,34 @@
// autoload_psr4.php @generated by Composer
-$vendorDir = dirname(dirname(__FILE__));
+$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
+ 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
+ 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
+ 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
+ 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
- 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
+ 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
+ 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
+ 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'),
+ 'Symfony\\Component\\Stopwatch\\' => array($vendorDir . '/symfony/stopwatch'),
+ 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
+ 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
+ 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
+ 'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
+ 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
+ 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
+ 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
+ 'PhpCsFixer\\' => array($vendorDir . '/friendsofphp/php-cs-fixer/src'),
+ 'Nextcloud\\CodingStandard\\' => array($vendorDir . '/nextcloud/coding-standard/src'),
'NC\\Updater\\' => array($baseDir . '/lib'),
+ 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
+ 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'),
+ 'Composer\\XdebugHandler\\' => array($vendorDir . '/composer/xdebug-handler/src'),
+ 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
+ 'Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'),
);
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 2096a58..ac23025 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -25,29 +25,16 @@ class ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6', 'loadClassLoader'), true, true);
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit994b8d870ddb923ebc3ff0ceaaaa96a6', 'loadClassLoader'));
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
- if ($useStaticLoader) {
- require __DIR__ . '/autoload_static.php';
-
- call_user_func(\Composer\Autoload\ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6::getInitializer($loader));
- } else {
- $classMap = require __DIR__ . '/autoload_classmap.php';
- if ($classMap) {
- $loader->addClassMap($classMap);
- }
- }
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
- if ($useStaticLoader) {
- $includeFiles = Composer\Autoload\ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6::$files;
- } else {
- $includeFiles = require __DIR__ . '/autoload_files.php';
- }
+ $includeFiles = \Composer\Autoload\ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire994b8d870ddb923ebc3ff0ceaaaa96a6($fileIdentifier, $file);
}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index ba2aacb..a347a18 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -7,34 +7,115 @@ namespace Composer\Autoload;
class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
{
public static $files = array (
+ 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
+ '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
+ '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
+ '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
+ '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
+ '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
);
public static $prefixLengthsPsr4 = array (
'S' =>
array (
+ 'Symfony\\Polyfill\\Php81\\' => 23,
+ 'Symfony\\Polyfill\\Php80\\' => 23,
+ 'Symfony\\Polyfill\\Php73\\' => 23,
+ 'Symfony\\Polyfill\\Php72\\' => 23,
'Symfony\\Polyfill\\Mbstring\\' => 26,
- 'Symfony\\Component\\Debug\\' => 24,
+ 'Symfony\\Polyfill\\Ctype\\' => 23,
+ 'Symfony\\Contracts\\Service\\' => 26,
+ 'Symfony\\Contracts\\EventDispatcher\\' => 34,
+ 'Symfony\\Component\\Stopwatch\\' => 28,
+ 'Symfony\\Component\\Process\\' => 26,
+ 'Symfony\\Component\\OptionsResolver\\' => 34,
+ 'Symfony\\Component\\Finder\\' => 25,
+ 'Symfony\\Component\\Filesystem\\' => 29,
+ 'Symfony\\Component\\EventDispatcher\\' => 34,
'Symfony\\Component\\Console\\' => 26,
),
'P' =>
array (
'Psr\\Log\\' => 8,
+ 'Psr\\Container\\' => 14,
+ 'Psr\\Cache\\' => 10,
+ 'PhpCsFixer\\' => 11,
),
'N' =>
array (
+ 'Nextcloud\\CodingStandard\\' => 25,
'NC\\Updater\\' => 11,
),
+ 'D' =>
+ array (
+ 'Doctrine\\Common\\Lexer\\' => 22,
+ 'Doctrine\\Common\\Annotations\\' => 28,
+ ),
+ 'C' =>
+ array (
+ 'Composer\\XdebugHandler\\' => 23,
+ 'Composer\\Semver\\' => 16,
+ 'Composer\\Pcre\\' => 14,
+ ),
);
public static $prefixDirsPsr4 = array (
+ 'Symfony\\Polyfill\\Php81\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php81',
+ ),
+ 'Symfony\\Polyfill\\Php80\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
+ ),
+ 'Symfony\\Polyfill\\Php73\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
+ ),
+ 'Symfony\\Polyfill\\Php72\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
+ ),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
- 'Symfony\\Component\\Debug\\' =>
+ 'Symfony\\Polyfill\\Ctype\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
+ ),
+ 'Symfony\\Contracts\\Service\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/service-contracts',
+ ),
+ 'Symfony\\Contracts\\EventDispatcher\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts',
+ ),
+ 'Symfony\\Component\\Stopwatch\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/stopwatch',
+ ),
+ 'Symfony\\Component\\Process\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/process',
+ ),
+ 'Symfony\\Component\\OptionsResolver\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/options-resolver',
+ ),
+ 'Symfony\\Component\\Finder\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/finder',
+ ),
+ 'Symfony\\Component\\Filesystem\\' =>
array (
- 0 => __DIR__ . '/..' . '/symfony/debug',
+ 0 => __DIR__ . '/..' . '/symfony/filesystem',
+ ),
+ 'Symfony\\Component\\EventDispatcher\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/symfony/event-dispatcher',
),
'Symfony\\Component\\Console\\' =>
array (
@@ -44,21 +125,606 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
array (
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
),
+ 'Psr\\Container\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/container/src',
+ ),
+ 'Psr\\Cache\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/psr/cache/src',
+ ),
+ 'PhpCsFixer\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src',
+ ),
+ 'Nextcloud\\CodingStandard\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/nextcloud/coding-standard/src',
+ ),
'NC\\Updater\\' =>
array (
0 => __DIR__ . '/../..' . '/lib',
),
+ 'Doctrine\\Common\\Lexer\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer',
+ ),
+ 'Doctrine\\Common\\Annotations\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations',
+ ),
+ 'Composer\\XdebugHandler\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/composer/xdebug-handler/src',
+ ),
+ 'Composer\\Semver\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/composer/semver/src',
+ ),
+ 'Composer\\Pcre\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/composer/pcre/src',
+ ),
);
public static $classMap = array (
+ 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'Composer\\Pcre\\MatchAllResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchAllResult.php',
+ 'Composer\\Pcre\\MatchAllWithOffsetsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchAllWithOffsetsResult.php',
+ 'Composer\\Pcre\\MatchResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchResult.php',
+ 'Composer\\Pcre\\MatchWithOffsetsResult' => __DIR__ . '/..' . '/composer/pcre/src/MatchWithOffsetsResult.php',
+ 'Composer\\Pcre\\PcreException' => __DIR__ . '/..' . '/composer/pcre/src/PcreException.php',
+ 'Composer\\Pcre\\Preg' => __DIR__ . '/..' . '/composer/pcre/src/Preg.php',
+ 'Composer\\Pcre\\Regex' => __DIR__ . '/..' . '/composer/pcre/src/Regex.php',
+ 'Composer\\Pcre\\ReplaceResult' => __DIR__ . '/..' . '/composer/pcre/src/ReplaceResult.php',
+ 'Composer\\Semver\\Comparator' => __DIR__ . '/..' . '/composer/semver/src/Comparator.php',
+ 'Composer\\Semver\\CompilingMatcher' => __DIR__ . '/..' . '/composer/semver/src/CompilingMatcher.php',
+ 'Composer\\Semver\\Constraint\\Bound' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Bound.php',
+ 'Composer\\Semver\\Constraint\\Constraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Constraint.php',
+ 'Composer\\Semver\\Constraint\\ConstraintInterface' => __DIR__ . '/..' . '/composer/semver/src/Constraint/ConstraintInterface.php',
+ 'Composer\\Semver\\Constraint\\MatchAllConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MatchAllConstraint.php',
+ 'Composer\\Semver\\Constraint\\MatchNoneConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MatchNoneConstraint.php',
+ 'Composer\\Semver\\Constraint\\MultiConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MultiConstraint.php',
+ 'Composer\\Semver\\Interval' => __DIR__ . '/..' . '/composer/semver/src/Interval.php',
+ 'Composer\\Semver\\Intervals' => __DIR__ . '/..' . '/composer/semver/src/Intervals.php',
+ 'Composer\\Semver\\Semver' => __DIR__ . '/..' . '/composer/semver/src/Semver.php',
+ 'Composer\\Semver\\VersionParser' => __DIR__ . '/..' . '/composer/semver/src/VersionParser.php',
+ 'Composer\\XdebugHandler\\PhpConfig' => __DIR__ . '/..' . '/composer/xdebug-handler/src/PhpConfig.php',
+ 'Composer\\XdebugHandler\\Process' => __DIR__ . '/..' . '/composer/xdebug-handler/src/Process.php',
+ 'Composer\\XdebugHandler\\Status' => __DIR__ . '/..' . '/composer/xdebug-handler/src/Status.php',
+ 'Composer\\XdebugHandler\\XdebugHandler' => __DIR__ . '/..' . '/composer/xdebug-handler/src/XdebugHandler.php',
+ 'Doctrine\\Common\\Annotations\\Annotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php',
+ 'Doctrine\\Common\\Annotations\\AnnotationException' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php',
+ 'Doctrine\\Common\\Annotations\\AnnotationReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php',
+ 'Doctrine\\Common\\Annotations\\AnnotationRegistry' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Attribute' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Attributes' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Enum' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\IgnoreAnnotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\NamedArgumentConstructor' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Required' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php',
+ 'Doctrine\\Common\\Annotations\\Annotation\\Target' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php',
+ 'Doctrine\\Common\\Annotations\\CachedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php',
+ 'Doctrine\\Common\\Annotations\\DocLexer' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php',
+ 'Doctrine\\Common\\Annotations\\DocParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php',
+ 'Doctrine\\Common\\Annotations\\FileCacheReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php',
+ 'Doctrine\\Common\\Annotations\\ImplicitlyIgnoredAnnotationNames' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php',
+ 'Doctrine\\Common\\Annotations\\IndexedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php',
+ 'Doctrine\\Common\\Annotations\\NamedArgumentConstructorAnnotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php',
+ 'Doctrine\\Common\\Annotations\\PhpParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php',
+ 'Doctrine\\Common\\Annotations\\PsrCachedReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php',
+ 'Doctrine\\Common\\Annotations\\Reader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php',
+ 'Doctrine\\Common\\Annotations\\SimpleAnnotationReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php',
+ 'Doctrine\\Common\\Annotations\\TokenParser' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php',
+ 'Doctrine\\Common\\Lexer\\AbstractLexer' => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php',
+ 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
'NC\\Updater\\CommandApplication' => __DIR__ . '/../..' . '/lib/CommandApplication.php',
'NC\\Updater\\LogException' => __DIR__ . '/../..' . '/lib/LogException.php',
'NC\\Updater\\RecursiveDirectoryIteratorWithoutData' => __DIR__ . '/../..' . '/lib/RecursiveDirectoryIteratorWithoutData.php',
'NC\\Updater\\UpdateCommand' => __DIR__ . '/../..' . '/lib/UpdateCommand.php',
'NC\\Updater\\UpdateException' => __DIR__ . '/../..' . '/lib/UpdateException.php',
'NC\\Updater\\Updater' => __DIR__ . '/../..' . '/lib/Updater.php',
- 'NC\\Updater\\Version' => __DIR__ . '/../..' . '/lib/Version.php',
+ 'Nextcloud\\CodingStandard\\Config' => __DIR__ . '/..' . '/nextcloud/coding-standard/src/Config.php',
+ 'PhpCsFixer\\AbstractDoctrineAnnotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php',
+ 'PhpCsFixer\\AbstractFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractFixer.php',
+ 'PhpCsFixer\\AbstractFopenFlagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractFopenFlagFixer.php',
+ 'PhpCsFixer\\AbstractFunctionReferenceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractFunctionReferenceFixer.php',
+ 'PhpCsFixer\\AbstractLinesBeforeNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractLinesBeforeNamespaceFixer.php',
+ 'PhpCsFixer\\AbstractNoUselessElseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractNoUselessElseFixer.php',
+ 'PhpCsFixer\\AbstractPhpdocToTypeDeclarationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php',
+ 'PhpCsFixer\\AbstractPhpdocTypesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractPhpdocTypesFixer.php',
+ 'PhpCsFixer\\AbstractProxyFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/AbstractProxyFixer.php',
+ 'PhpCsFixer\\Cache\\Cache' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/Cache.php',
+ 'PhpCsFixer\\Cache\\CacheInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/CacheInterface.php',
+ 'PhpCsFixer\\Cache\\CacheManagerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/CacheManagerInterface.php',
+ 'PhpCsFixer\\Cache\\Directory' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/Directory.php',
+ 'PhpCsFixer\\Cache\\DirectoryInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/DirectoryInterface.php',
+ 'PhpCsFixer\\Cache\\FileCacheManager' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/FileCacheManager.php',
+ 'PhpCsFixer\\Cache\\FileHandler' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php',
+ 'PhpCsFixer\\Cache\\FileHandlerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/FileHandlerInterface.php',
+ 'PhpCsFixer\\Cache\\NullCacheManager' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/NullCacheManager.php',
+ 'PhpCsFixer\\Cache\\Signature' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/Signature.php',
+ 'PhpCsFixer\\Cache\\SignatureInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Cache/SignatureInterface.php',
+ 'PhpCsFixer\\Config' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Config.php',
+ 'PhpCsFixer\\ConfigInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigInterface.php',
+ 'PhpCsFixer\\ConfigurationException\\InvalidConfigurationException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidConfigurationException.php',
+ 'PhpCsFixer\\ConfigurationException\\InvalidFixerConfigurationException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php',
+ 'PhpCsFixer\\ConfigurationException\\InvalidForEnvFixerConfigurationException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php',
+ 'PhpCsFixer\\ConfigurationException\\RequiredFixerConfigurationException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php',
+ 'PhpCsFixer\\Console\\Application' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Application.php',
+ 'PhpCsFixer\\Console\\Command\\DescribeCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php',
+ 'PhpCsFixer\\Console\\Command\\DescribeNameNotFoundException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php',
+ 'PhpCsFixer\\Console\\Command\\DocumentationCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php',
+ 'PhpCsFixer\\Console\\Command\\FixCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php',
+ 'PhpCsFixer\\Console\\Command\\FixCommandExitStatusCalculator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php',
+ 'PhpCsFixer\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php',
+ 'PhpCsFixer\\Console\\Command\\ListFilesCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php',
+ 'PhpCsFixer\\Console\\Command\\ListSetsCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php',
+ 'PhpCsFixer\\Console\\Command\\SelfUpdateCommand' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php',
+ 'PhpCsFixer\\Console\\ConfigurationResolver' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php',
+ 'PhpCsFixer\\Console\\Output\\ErrorOutput' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php',
+ 'PhpCsFixer\\Console\\Output\\NullOutput' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php',
+ 'PhpCsFixer\\Console\\Output\\ProcessOutput' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutput.php',
+ 'PhpCsFixer\\Console\\Output\\ProcessOutputInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutputInterface.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\CheckstyleReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\GitlabReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\JsonReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\JunitReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\ReportSummary' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReportSummary.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\ReporterFactory' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\ReporterInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterInterface.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\TextReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php',
+ 'PhpCsFixer\\Console\\Report\\FixReport\\XmlReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/XmlReporter.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\JsonReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/JsonReporter.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\ReportSummary' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReportSummary.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\ReporterFactory' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\ReporterInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterInterface.php',
+ 'PhpCsFixer\\Console\\Report\\ListSetsReport\\TextReporter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\GithubClient' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\GithubClientInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClientInterface.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\NewVersionChecker' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionChecker.php',
+ 'PhpCsFixer\\Console\\SelfUpdate\\NewVersionCheckerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionCheckerInterface.php',
+ 'PhpCsFixer\\Console\\WarningsDetector' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php',
+ 'PhpCsFixer\\Diff\\Chunk' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Chunk.php',
+ 'PhpCsFixer\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Exception/ConfigurationException.php',
+ 'PhpCsFixer\\Diff\\Diff' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Diff.php',
+ 'PhpCsFixer\\Diff\\Differ' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Differ.php',
+ 'PhpCsFixer\\Diff\\Exception' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Exception/Exception.php',
+ 'PhpCsFixer\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Exception/InvalidArgumentException.php',
+ 'PhpCsFixer\\Diff\\Line' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Line.php',
+ 'PhpCsFixer\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/LongestCommonSubsequenceCalculator.php',
+ 'PhpCsFixer\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
+ 'PhpCsFixer\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Output/AbstractChunkOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Output/DiffOnlyOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Output/DiffOutputBuilderInterface.php',
+ 'PhpCsFixer\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Output/UnifiedDiffOutputBuilder.php',
+ 'PhpCsFixer\\Diff\\Parser' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/Parser.php',
+ 'PhpCsFixer\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/php-cs-fixer/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
+ 'PhpCsFixer\\Differ\\DiffConsoleFormatter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php',
+ 'PhpCsFixer\\Differ\\DifferInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php',
+ 'PhpCsFixer\\Differ\\FullDiffer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Differ/FullDiffer.php',
+ 'PhpCsFixer\\Differ\\NullDiffer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php',
+ 'PhpCsFixer\\Differ\\UnifiedDiffer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php',
+ 'PhpCsFixer\\DocBlock\\Annotation' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php',
+ 'PhpCsFixer\\DocBlock\\DocBlock' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/DocBlock.php',
+ 'PhpCsFixer\\DocBlock\\Line' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/Line.php',
+ 'PhpCsFixer\\DocBlock\\ShortDescription' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/ShortDescription.php',
+ 'PhpCsFixer\\DocBlock\\Tag' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php',
+ 'PhpCsFixer\\DocBlock\\TagComparator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php',
+ 'PhpCsFixer\\DocBlock\\TypeExpression' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php',
+ 'PhpCsFixer\\Doctrine\\Annotation\\Token' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php',
+ 'PhpCsFixer\\Doctrine\\Annotation\\Tokens' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php',
+ 'PhpCsFixer\\Documentation\\DocumentationLocator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php',
+ 'PhpCsFixer\\Documentation\\FixerDocumentGenerator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php',
+ 'PhpCsFixer\\Documentation\\ListDocumentGenerator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Documentation/ListDocumentGenerator.php',
+ 'PhpCsFixer\\Documentation\\RstUtils' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Documentation/RstUtils.php',
+ 'PhpCsFixer\\Documentation\\RuleSetDocumentationGenerator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php',
+ 'PhpCsFixer\\Error\\Error' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Error/Error.php',
+ 'PhpCsFixer\\Error\\ErrorsManager' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Error/ErrorsManager.php',
+ 'PhpCsFixer\\FileReader' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FileReader.php',
+ 'PhpCsFixer\\FileRemoval' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FileRemoval.php',
+ 'PhpCsFixer\\Finder' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Finder.php',
+ 'PhpCsFixer\\FixerConfiguration\\AliasedFixerOption' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOption.php',
+ 'PhpCsFixer\\FixerConfiguration\\AliasedFixerOptionBuilder' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOptionBuilder.php',
+ 'PhpCsFixer\\FixerConfiguration\\AllowedValueSubset' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/AllowedValueSubset.php',
+ 'PhpCsFixer\\FixerConfiguration\\DeprecatedFixerOption' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOption.php',
+ 'PhpCsFixer\\FixerConfiguration\\DeprecatedFixerOptionInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOptionInterface.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerConfigurationResolver' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerConfigurationResolverInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolverInterface.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerOption' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerOptionBuilder' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php',
+ 'PhpCsFixer\\FixerConfiguration\\FixerOptionInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php',
+ 'PhpCsFixer\\FixerConfiguration\\InvalidOptionsForEnvException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php',
+ 'PhpCsFixer\\FixerDefinition\\CodeSample' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php',
+ 'PhpCsFixer\\FixerDefinition\\CodeSampleInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\FileSpecificCodeSample' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSample.php',
+ 'PhpCsFixer\\FixerDefinition\\FileSpecificCodeSampleInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSampleInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\FixerDefinition' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinition.php',
+ 'PhpCsFixer\\FixerDefinition\\FixerDefinitionInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinitionInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecificCodeSample' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSample.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecificCodeSampleInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSampleInterface.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecification' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecification.php',
+ 'PhpCsFixer\\FixerDefinition\\VersionSpecificationInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificationInterface.php',
+ 'PhpCsFixer\\FixerFactory' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerFactory.php',
+ 'PhpCsFixer\\FixerFileProcessedEvent' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerFileProcessedEvent.php',
+ 'PhpCsFixer\\FixerNameValidator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/FixerNameValidator.php',
+ 'PhpCsFixer\\Fixer\\AbstractIncrementOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php',
+ 'PhpCsFixer\\Fixer\\AbstractPhpUnitFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\ArrayPushFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\BacktickToShellExecFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\EregToPregFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\MbStrFunctionsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/MbStrFunctionsFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\ModernizeStrposFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/ModernizeStrposFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\NoAliasFunctionsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\NoAliasLanguageConstructCallFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasLanguageConstructCallFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\NoMixedEchoPrintFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\PowToExponentiationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/PowToExponentiationFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\RandomApiMigrationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php',
+ 'PhpCsFixer\\Fixer\\Alias\\SetTypeToCastFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\ArraySyntaxFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NoMultilineWhitespaceAroundDoubleArrowFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NoTrailingCommaInSinglelineArrayFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NoWhitespaceBeforeCommaInArrayFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\NormalizeIndexBraceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\TrimArraySpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\ArrayNotation\\WhitespaceAfterCommaInArrayFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\BracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\EncodingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\NonPrintableCharacterFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\OctalNotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php',
+ 'PhpCsFixer\\Fixer\\Basic\\PsrAutoloadingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\ConstantCaseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\IntegerLiteralCaseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\LowercaseKeywordsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseKeywordsFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\LowercaseStaticReferenceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseStaticReferenceFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\MagicConstantCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicConstantCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\MagicMethodCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Casing\\NativeFunctionTypeDeclarationCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\CastSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\LowercaseCastFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\ModernizeTypesCastingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\NoShortBoolCastFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoShortBoolCastFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\NoUnsetCastFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoUnsetCastFixer.php',
+ 'PhpCsFixer\\Fixer\\CastNotation\\ShortScalarCastFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ShortScalarCastFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\ClassAttributesSeparationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\ClassDefinitionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\FinalClassFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\FinalInternalClassFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\FinalPublicMethodForAbstractClassFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoBlankLinesAfterClassOpeningFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoNullPropertyInitializationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoPhp4ConstructorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\NoUnneededFinalMethodFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedClassElementsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedInterfacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\OrderedTraitsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\ProtectedToPrivateFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SelfAccessorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SelfStaticAccessorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SingleClassElementPerStatementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\SingleTraitInsertPerStatementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleTraitInsertPerStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassNotation\\VisibilityRequiredFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php',
+ 'PhpCsFixer\\Fixer\\ClassUsage\\DateTimeImmutableFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ClassUsage/DateTimeImmutableFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\CommentToPhpdocFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\HeaderCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\MultilineCommentOpeningClosingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\NoEmptyCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoEmptyCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\NoTrailingWhitespaceInCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoTrailingWhitespaceInCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Comment\\SingleLineCommentStyleFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php',
+ 'PhpCsFixer\\Fixer\\ConfigurableFixerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php',
+ 'PhpCsFixer\\Fixer\\ConstantNotation\\NativeConstantInvocationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\ControlStructureContinuationPositionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\ElseifFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ElseifFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\EmptyLoopBodyFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\EmptyLoopConditionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\IncludeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/IncludeFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoAlternativeSyntaxFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoBreakCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoSuperfluousElseifFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoTrailingCommaInListCallFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededControlParenthesesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededCurlyBracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\NoUselessElseFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SimplifiedIfReturnFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SimplifiedIfReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SwitchCaseSemicolonToColonFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSemicolonToColonFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SwitchCaseSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\SwitchContinueToBreakFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchContinueToBreakFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\TrailingCommaInMultilineFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php',
+ 'PhpCsFixer\\Fixer\\ControlStructure\\YodaStyleFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php',
+ 'PhpCsFixer\\Fixer\\DeprecatedFixerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/DeprecatedFixerInterface.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationArrayAssignmentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationBracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\DoctrineAnnotation\\DoctrineAnnotationSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\FixerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FixerInterface.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\CombineNestedDirnameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FopenFlagOrderFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FopenFlagsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FunctionDeclarationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\FunctionTypehintSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionTypehintSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\ImplodeCallFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ImplodeCallFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\LambdaNotUsedImportFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/LambdaNotUsedImportFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\MethodArgumentSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NativeFunctionInvocationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NoSpacesAfterFunctionNameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NoUnreachableDefaultArgumentValueFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NoUselessSprintfFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUselessSprintfFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\NullableTypeDeclarationForDefaultNullValueFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\PhpdocToParamTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\PhpdocToPropertyTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\PhpdocToReturnTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\RegularCallableCallFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/RegularCallableCallFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\ReturnTypeDeclarationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ReturnTypeDeclarationFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\SingleLineThrowFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/SingleLineThrowFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\StaticLambdaFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/StaticLambdaFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\UseArrowFunctionsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/UseArrowFunctionsFixer.php',
+ 'PhpCsFixer\\Fixer\\FunctionNotation\\VoidReturnFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/VoidReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\FullyQualifiedStrictTypesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\GlobalNamespaceImportFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\GroupImportFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\NoLeadingImportSlashFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/NoLeadingImportSlashFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\NoUnusedImportsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\OrderedImportsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\SingleImportPerStatementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\Import\\SingleLineAfterImportsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleLineAfterImportsFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\ClassKeywordRemoveFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ClassKeywordRemoveFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\CombineConsecutiveIssetsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\CombineConsecutiveUnsetsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\DeclareEqualNormalizeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\DeclareParenthesesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareParenthesesFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\DirConstantFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DirConstantFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\ErrorSuppressionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\ExplicitIndirectVariableFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ExplicitIndirectVariableFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\FunctionToConstantFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\IsNullFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\NoUnsetOnPropertyFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php',
+ 'PhpCsFixer\\Fixer\\LanguageConstruct\\SingleSpaceAfterConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php',
+ 'PhpCsFixer\\Fixer\\ListNotation\\ListSyntaxFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\BlankLineAfterNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\CleanNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoBlankLinesBeforeNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\NoLeadingNamespaceWhitespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\NamespaceNotation\\SingleBlankLineBeforeNamespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/SingleBlankLineBeforeNamespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Naming\\NoHomoglyphNamesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\AssignNullCoalescingToCoalesceEqualFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/AssignNullCoalescingToCoalesceEqualFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\BinaryOperatorSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\ConcatSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\IncrementStyleFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\LogicalOperatorsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NewWithBracesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NoSpaceAroundDoubleColonFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NotOperatorWithSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\NotOperatorWithSuccessorSpaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSuccessorSpaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\ObjectOperatorWithoutWhitespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/ObjectOperatorWithoutWhitespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\OperatorLinebreakFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\StandardizeIncrementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeIncrementFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\StandardizeNotEqualsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\TernaryOperatorSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryOperatorSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\TernaryToElvisOperatorFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToElvisOperatorFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\TernaryToNullCoalescingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToNullCoalescingFixer.php',
+ 'PhpCsFixer\\Fixer\\Operator\\UnaryOperatorSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\BlankLineAfterOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\EchoTagSyntaxFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\FullOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\LinebreakAfterOpeningTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpTag\\NoClosingTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitConstructFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitDedicateAssertInternalTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitExpectationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitFqcnAnnotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitFqcnAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitInternalClassFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitMethodCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitMockFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitMockShortWillReturnFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockShortWillReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitNamespacedFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitNoExpectationAnnotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitSetUpTearDownVisibilityFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSetUpTearDownVisibilityFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitSizeClassFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitStrictFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTargetVersion' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTestAnnotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTestCaseStaticMethodCallsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php',
+ 'PhpCsFixer\\Fixer\\PhpUnit\\PhpUnitTestClassRequiresCoversFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestClassRequiresCoversFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\AlignMultilineCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\GeneralPhpdocAnnotationRemoveFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\GeneralPhpdocTagRenameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\NoBlankLinesAfterPhpdocFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\NoEmptyPhpdocFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\NoSuperfluousPhpdocTagsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAddMissingParamAnnotationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAlignFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocAnnotationWithoutDotFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocIndentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocInlineTagNormalizerFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocLineSpanFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoAccessFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoAliasTagFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoEmptyReturnFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoPackageFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoUselessInheritdocFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderByValueFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocOrderFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocReturnSelfReferenceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocScalarFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSeparationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSingleLineVarSpacingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSingleLineVarSpacingFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocSummaryFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSummaryFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTagCasingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTagTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocToCommentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTrimConsecutiveBlankLineSeparationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTrimFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTypesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTypesOrderFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocVarAnnotationCorrectOrderFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarAnnotationCorrectOrderFixer.php',
+ 'PhpCsFixer\\Fixer\\Phpdoc\\PhpdocVarWithoutNameFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php',
+ 'PhpCsFixer\\Fixer\\ReturnNotation\\NoUselessReturnFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/NoUselessReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\ReturnNotation\\ReturnAssignmentFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/ReturnAssignmentFixer.php',
+ 'PhpCsFixer\\Fixer\\ReturnNotation\\SimplifiedNullReturnFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/SimplifiedNullReturnFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\MultilineWhitespaceBeforeSemicolonsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\NoEmptyStatementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoEmptyStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\NoSinglelineWhitespaceBeforeSemicolonsFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoSinglelineWhitespaceBeforeSemicolonsFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\SemicolonAfterInstructionFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SemicolonAfterInstructionFixer.php',
+ 'PhpCsFixer\\Fixer\\Semicolon\\SpaceAfterSemicolonFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SpaceAfterSemicolonFixer.php',
+ 'PhpCsFixer\\Fixer\\Strict\\DeclareStrictTypesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php',
+ 'PhpCsFixer\\Fixer\\Strict\\StrictComparisonFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictComparisonFixer.php',
+ 'PhpCsFixer\\Fixer\\Strict\\StrictParamFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictParamFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\EscapeImplicitBackslashesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\ExplicitStringVariableFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/ExplicitStringVariableFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\HeredocToNowdocFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/HeredocToNowdocFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\NoBinaryStringFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoBinaryStringFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\NoTrailingWhitespaceInStringFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\SimpleToComplexStringVariableFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SimpleToComplexStringVariableFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\SingleQuoteFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\StringLengthToEmptyFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLengthToEmptyFixer.php',
+ 'PhpCsFixer\\Fixer\\StringNotation\\StringLineEndingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLineEndingFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\ArrayIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\BlankLineBeforeStatementFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\CompactNullableTypehintFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\HeredocIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\IndentationTypeFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\LineEndingFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/LineEndingFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\MethodChainingIndentationFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/MethodChainingIndentationFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoExtraBlankLinesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoExtraBlankLinesFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoSpacesAroundOffsetFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesAroundOffsetFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoSpacesInsideParenthesisFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesInsideParenthesisFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoTrailingWhitespaceFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\NoWhitespaceInBlankLineFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\SingleBlankLineAtEofFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php',
+ 'PhpCsFixer\\Fixer\\Whitespace\\TypesSpacesFixer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php',
+ 'PhpCsFixer\\Fixer\\WhitespacesAwareFixerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php',
+ 'PhpCsFixer\\Indicator\\PhpUnitTestCaseIndicator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php',
+ 'PhpCsFixer\\Linter\\CachingLinter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/CachingLinter.php',
+ 'PhpCsFixer\\Linter\\Linter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/Linter.php',
+ 'PhpCsFixer\\Linter\\LinterInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/LinterInterface.php',
+ 'PhpCsFixer\\Linter\\LintingException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/LintingException.php',
+ 'PhpCsFixer\\Linter\\LintingResultInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/LintingResultInterface.php',
+ 'PhpCsFixer\\Linter\\ProcessLinter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php',
+ 'PhpCsFixer\\Linter\\ProcessLinterProcessBuilder' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/ProcessLinterProcessBuilder.php',
+ 'PhpCsFixer\\Linter\\ProcessLintingResult' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php',
+ 'PhpCsFixer\\Linter\\TokenizerLinter' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/TokenizerLinter.php',
+ 'PhpCsFixer\\Linter\\TokenizerLintingResult' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php',
+ 'PhpCsFixer\\Linter\\UnavailableLinterException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Linter/UnavailableLinterException.php',
+ 'PhpCsFixer\\PharChecker' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/PharChecker.php',
+ 'PhpCsFixer\\PharCheckerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/PharCheckerInterface.php',
+ 'PhpCsFixer\\Preg' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Preg.php',
+ 'PhpCsFixer\\PregException' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/PregException.php',
+ 'PhpCsFixer\\RuleSet\\AbstractMigrationSetDescription' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php',
+ 'PhpCsFixer\\RuleSet\\AbstractRuleSetDescription' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/AbstractRuleSetDescription.php',
+ 'PhpCsFixer\\RuleSet\\RuleSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php',
+ 'PhpCsFixer\\RuleSet\\RuleSetDescriptionInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetDescriptionInterface.php',
+ 'PhpCsFixer\\RuleSet\\RuleSetInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php',
+ 'PhpCsFixer\\RuleSet\\RuleSets' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\DoctrineAnnotationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP54MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP56MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP56MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP70MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP70MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP71MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP71MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP73MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP73MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP74MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP74MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP80MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP80MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHP81MigrationSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit30MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit32MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit35MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit43MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit48MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit50MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit50MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit52MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit54MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit55MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit56MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit57MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit60MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit75MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PHPUnit84MigrationRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR12RiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR12Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR1Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PSR2Set' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR2Set.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PhpCsFixerRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\PhpCsFixerSet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerSet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\SymfonyRiskySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonyRiskySet.php',
+ 'PhpCsFixer\\RuleSet\\Sets\\SymfonySet' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonySet.php',
+ 'PhpCsFixer\\Runner\\FileCachingLintingIterator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Runner/FileCachingLintingIterator.php',
+ 'PhpCsFixer\\Runner\\FileFilterIterator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php',
+ 'PhpCsFixer\\Runner\\FileLintingIterator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Runner/FileLintingIterator.php',
+ 'PhpCsFixer\\Runner\\Runner' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Runner/Runner.php',
+ 'PhpCsFixer\\StdinFileInfo' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/StdinFileInfo.php',
+ 'PhpCsFixer\\Tokenizer\\AbstractTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\AbstractTypeTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTypeTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\AbstractControlCaseStructuresAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\ArgumentAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\CaseAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\DefaultAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\EnumAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\MatchAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\NamespaceAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\NamespaceUseAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceUseAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\StartEndTokenAwareAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/StartEndTokenAwareAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\SwitchAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/SwitchAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\Analysis\\TypeAnalysis' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ArgumentsAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ArgumentsAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\AttributeAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AttributeAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\BlocksAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ClassyAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\CommentsAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ControlCaseStructuresAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\FunctionsAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\GotoLabelAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\NamespaceUsesAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\NamespacesAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\ReferenceAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ReferenceAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\Analyzer\\WhitespacesAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/WhitespacesAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\CT' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php',
+ 'PhpCsFixer\\Tokenizer\\CodeHasher' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/CodeHasher.php',
+ 'PhpCsFixer\\Tokenizer\\Generator\\NamespacedStringTokenGenerator' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Generator/NamespacedStringTokenGenerator.php',
+ 'PhpCsFixer\\Tokenizer\\Resolver\\TypeShortNameResolver' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Resolver/TypeShortNameResolver.php',
+ 'PhpCsFixer\\Tokenizer\\Token' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php',
+ 'PhpCsFixer\\Tokenizer\\Tokens' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php',
+ 'PhpCsFixer\\Tokenizer\\TokensAnalyzer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php',
+ 'PhpCsFixer\\Tokenizer\\TransformerInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/TransformerInterface.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ArrayTypehintTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\AttributeTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\BraceClassInstantiationTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ClassConstantTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ConstructorPromotionTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\CurlyBraceTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/CurlyBraceTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\FirstClassCallableTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ImportTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NameQualifiedTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NamedArgumentTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamedArgumentTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NamespaceOperatorTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamespaceOperatorTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\NullableTypeTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NullableTypeTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\ReturnRefTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ReturnRefTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\SquareBraceTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/SquareBraceTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\TypeAlternationTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeAlternationTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\TypeColonTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeColonTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\TypeIntersectionTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeIntersectionTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\UseTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/UseTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformer\\WhitespacyCommentTransformer' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/WhitespacyCommentTransformer.php',
+ 'PhpCsFixer\\Tokenizer\\Transformers' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Tokenizer/Transformers.php',
+ 'PhpCsFixer\\ToolInfo' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ToolInfo.php',
+ 'PhpCsFixer\\ToolInfoInterface' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/ToolInfoInterface.php',
+ 'PhpCsFixer\\Utils' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/Utils.php',
+ 'PhpCsFixer\\WhitespacesFixerConfig' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/WhitespacesFixerConfig.php',
+ 'PhpCsFixer\\WordMatcher' => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src/WordMatcher.php',
+ 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
+ 'Psr\\Cache\\CacheException' => __DIR__ . '/..' . '/psr/cache/src/CacheException.php',
+ 'Psr\\Cache\\CacheItemInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemInterface.php',
+ 'Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/..' . '/psr/cache/src/CacheItemPoolInterface.php',
+ 'Psr\\Cache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/cache/src/InvalidArgumentException.php',
+ 'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php',
+ 'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php',
+ 'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php',
'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php',
'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php',
'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php',
@@ -67,12 +733,21 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
+ 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
+ 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
+ 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
+ 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php',
+ 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php',
+ 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php',
+ 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/FactoryCommandLoader.php',
'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php',
'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php',
'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php',
+ 'Symfony\\Component\\Console\\Command\\LockableTrait' => __DIR__ . '/..' . '/symfony/console/Command/LockableTrait.php',
'Symfony\\Component\\Console\\ConsoleEvents' => __DIR__ . '/..' . '/symfony/console/ConsoleEvents.php',
+ 'Symfony\\Component\\Console\\DependencyInjection\\AddConsoleCommandPass' => __DIR__ . '/..' . '/symfony/console/DependencyInjection/AddConsoleCommandPass.php',
'Symfony\\Component\\Console\\Descriptor\\ApplicationDescription' => __DIR__ . '/..' . '/symfony/console/Descriptor/ApplicationDescription.php',
'Symfony\\Component\\Console\\Descriptor\\Descriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/Descriptor.php',
'Symfony\\Component\\Console\\Descriptor\\DescriptorInterface' => __DIR__ . '/..' . '/symfony/console/Descriptor/DescriptorInterface.php',
@@ -80,23 +755,28 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
'Symfony\\Component\\Console\\Descriptor\\MarkdownDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/MarkdownDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\TextDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/TextDescriptor.php',
'Symfony\\Component\\Console\\Descriptor\\XmlDescriptor' => __DIR__ . '/..' . '/symfony/console/Descriptor/XmlDescriptor.php',
+ 'Symfony\\Component\\Console\\EventListener\\ErrorListener' => __DIR__ . '/..' . '/symfony/console/EventListener/ErrorListener.php',
'Symfony\\Component\\Console\\Event\\ConsoleCommandEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleCommandEvent.php',
+ 'Symfony\\Component\\Console\\Event\\ConsoleErrorEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleErrorEvent.php',
'Symfony\\Component\\Console\\Event\\ConsoleEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleEvent.php',
- 'Symfony\\Component\\Console\\Event\\ConsoleExceptionEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleExceptionEvent.php',
'Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent' => __DIR__ . '/..' . '/symfony/console/Event/ConsoleTerminateEvent.php',
'Symfony\\Component\\Console\\Exception\\CommandNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/CommandNotFoundException.php',
'Symfony\\Component\\Console\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/console/Exception/ExceptionInterface.php',
'Symfony\\Component\\Console\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidArgumentException.php',
'Symfony\\Component\\Console\\Exception\\InvalidOptionException' => __DIR__ . '/..' . '/symfony/console/Exception/InvalidOptionException.php',
'Symfony\\Component\\Console\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/console/Exception/LogicException.php',
+ 'Symfony\\Component\\Console\\Exception\\MissingInputException' => __DIR__ . '/..' . '/symfony/console/Exception/MissingInputException.php',
+ 'Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException' => __DIR__ . '/..' . '/symfony/console/Exception/NamespaceNotFoundException.php',
'Symfony\\Component\\Console\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/console/Exception/RuntimeException.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatter' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatter.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterInterface.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyle.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleInterface.php',
'Symfony\\Component\\Console\\Formatter\\OutputFormatterStyleStack' => __DIR__ . '/..' . '/symfony/console/Formatter/OutputFormatterStyleStack.php',
+ 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php',
'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php',
+ 'Symfony\\Component\\Console\\Helper\\Dumper' => __DIR__ . '/..' . '/symfony/console/Helper/Dumper.php',
'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php',
'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/..' . '/symfony/console/Helper/Helper.php',
'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php',
@@ -109,6 +789,7 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
'Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/SymfonyQuestionHelper.php',
'Symfony\\Component\\Console\\Helper\\Table' => __DIR__ . '/..' . '/symfony/console/Helper/Table.php',
'Symfony\\Component\\Console\\Helper\\TableCell' => __DIR__ . '/..' . '/symfony/console/Helper/TableCell.php',
+ 'Symfony\\Component\\Console\\Helper\\TableRows' => __DIR__ . '/..' . '/symfony/console/Helper/TableRows.php',
'Symfony\\Component\\Console\\Helper\\TableSeparator' => __DIR__ . '/..' . '/symfony/console/Helper/TableSeparator.php',
'Symfony\\Component\\Console\\Helper\\TableStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableStyle.php',
'Symfony\\Component\\Console\\Input\\ArgvInput' => __DIR__ . '/..' . '/symfony/console/Input/ArgvInput.php',
@@ -119,41 +800,123 @@ class ComposerStaticInit994b8d870ddb923ebc3ff0ceaaaa96a6
'Symfony\\Component\\Console\\Input\\InputDefinition' => __DIR__ . '/..' . '/symfony/console/Input/InputDefinition.php',
'Symfony\\Component\\Console\\Input\\InputInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputInterface.php',
'Symfony\\Component\\Console\\Input\\InputOption' => __DIR__ . '/..' . '/symfony/console/Input/InputOption.php',
+ 'Symfony\\Component\\Console\\Input\\StreamableInputInterface' => __DIR__ . '/..' . '/symfony/console/Input/StreamableInputInterface.php',
'Symfony\\Component\\Console\\Input\\StringInput' => __DIR__ . '/..' . '/symfony/console/Input/StringInput.php',
'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => __DIR__ . '/..' . '/symfony/console/Logger/ConsoleLogger.php',
'Symfony\\Component\\Console\\Output\\BufferedOutput' => __DIR__ . '/..' . '/symfony/console/Output/BufferedOutput.php',
'Symfony\\Component\\Console\\Output\\ConsoleOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutput.php',
'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleOutputInterface.php',
+ 'Symfony\\Component\\Console\\Output\\ConsoleSectionOutput' => __DIR__ . '/..' . '/symfony/console/Output/ConsoleSectionOutput.php',
'Symfony\\Component\\Console\\Output\\NullOutput' => __DIR__ . '/..' . '/symfony/console/Output/NullOutput.php',
'Symfony\\Component\\Console\\Output\\Output' => __DIR__ . '/..' . '/symfony/console/Output/Output.php',
'Symfony\\Component\\Console\\Output\\OutputInterface' => __DIR__ . '/..' . '/symfony/console/Output/OutputInterface.php',
'Symfony\\Component\\Console\\Output\\StreamOutput' => __DIR__ . '/..' . '/symfony/console/Output/StreamOutput.php',
+ 'Symfony\\Component\\Console\\Output\\TrimmedBufferOutput' => __DIR__ . '/..' . '/symfony/console/Output/TrimmedBufferOutput.php',
'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ChoiceQuestion.php',
'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => __DIR__ . '/..' . '/symfony/console/Question/ConfirmationQuestion.php',
'Symfony\\Component\\Console\\Question\\Question' => __DIR__ . '/..' . '/symfony/console/Question/Question.php',
'Symfony\\Component\\Console\\Style\\OutputStyle' => __DIR__ . '/..' . '/symfony/console/Style/OutputStyle.php',
'Symfony\\Component\\Console\\Style\\StyleInterface' => __DIR__ . '/..' . '/symfony/console/Style/StyleInterface.php',
'Symfony\\Component\\Console\\Style\\SymfonyStyle' => __DIR__ . '/..' . '/symfony/console/Style/SymfonyStyle.php',
+ 'Symfony\\Component\\Console\\Terminal' => __DIR__ . '/..' . '/symfony/console/Terminal.php',
'Symfony\\Component\\Console\\Tester\\ApplicationTester' => __DIR__ . '/..' . '/symfony/console/Tester/ApplicationTester.php',
'Symfony\\Component\\Console\\Tester\\CommandTester' => __DIR__ . '/..' . '/symfony/console/Tester/CommandTester.php',
- 'Symfony\\Component\\Debug\\BufferingLogger' => __DIR__ . '/..' . '/symfony/debug/BufferingLogger.php',
- 'Symfony\\Component\\Debug\\Debug' => __DIR__ . '/..' . '/symfony/debug/Debug.php',
- 'Symfony\\Component\\Debug\\DebugClassLoader' => __DIR__ . '/..' . '/symfony/debug/DebugClassLoader.php',
- 'Symfony\\Component\\Debug\\ErrorHandler' => __DIR__ . '/..' . '/symfony/debug/ErrorHandler.php',
- 'Symfony\\Component\\Debug\\ExceptionHandler' => __DIR__ . '/..' . '/symfony/debug/ExceptionHandler.php',
- 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/debug/Exception/ClassNotFoundException.php',
- 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/ContextErrorException.php',
- 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalErrorException.php',
- 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalThrowableError.php',
- 'Symfony\\Component\\Debug\\Exception\\FlattenException' => __DIR__ . '/..' . '/symfony/debug/Exception/FlattenException.php',
- 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => __DIR__ . '/..' . '/symfony/debug/Exception/OutOfMemoryException.php',
- 'Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException' => __DIR__ . '/..' . '/symfony/debug/Exception/UndefinedFunctionException.php',
- 'Symfony\\Component\\Debug\\Exception\\UndefinedMethodException' => __DIR__ . '/..' . '/symfony/debug/Exception/UndefinedMethodException.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\ClassNotFoundFatalErrorHandler' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\FatalErrorHandlerInterface' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedFunctionFatalErrorHandler' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php',
- 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedMethodFatalErrorHandler' => __DIR__ . '/..' . '/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php',
+ 'Symfony\\Component\\Console\\Tester\\TesterTrait' => __DIR__ . '/..' . '/symfony/console/Tester/TesterTrait.php',
+ 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php',
+ 'Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php',
+ 'Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener' => __DIR__ . '/..' . '/symfony/event-dispatcher/Debug/WrappedListener.php',
+ 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\AddEventAliasesPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php',
+ 'Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass' => __DIR__ . '/..' . '/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php',
+ 'Symfony\\Component\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher/Event.php',
+ 'Symfony\\Component\\EventDispatcher\\EventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcher.php',
+ 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventDispatcherInterface.php',
+ 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventSubscriberInterface.php',
+ 'Symfony\\Component\\EventDispatcher\\GenericEvent' => __DIR__ . '/..' . '/symfony/event-dispatcher/GenericEvent.php',
+ 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/ImmutableEventDispatcher.php',
+ 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => __DIR__ . '/..' . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php',
+ 'Symfony\\Component\\EventDispatcher\\LegacyEventProxy' => __DIR__ . '/..' . '/symfony/event-dispatcher/LegacyEventProxy.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/ExceptionInterface.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/FileNotFoundException.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\IOException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/IOException.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\IOExceptionInterface' => __DIR__ . '/..' . '/symfony/filesystem/Exception/IOExceptionInterface.php',
+ 'Symfony\\Component\\Filesystem\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/filesystem/Exception/InvalidArgumentException.php',
+ 'Symfony\\Component\\Filesystem\\Filesystem' => __DIR__ . '/..' . '/symfony/filesystem/Filesystem.php',
+ 'Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/Comparator.php',
+ 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/DateComparator.php',
+ 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php',
+ 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php',
+ 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => __DIR__ . '/..' . '/symfony/finder/Exception/DirectoryNotFoundException.php',
+ 'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/..' . '/symfony/finder/Finder.php',
+ 'Symfony\\Component\\Finder\\Gitignore' => __DIR__ . '/..' . '/symfony/finder/Gitignore.php',
+ 'Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php',
+ 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\DepthRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DepthRangeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\ExcludeDirectoryFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\FileTypeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FileTypeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\FilecontentFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilecontentFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\FilenameFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/FilenameFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\LazyIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/LazyIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/MultiplePcreFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\PathFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/PathFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\RecursiveDirectoryIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/RecursiveDirectoryIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\SizeRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SizeRangeFilterIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\SortableIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/SortableIterator.php',
+ 'Symfony\\Component\\Finder\\Iterator\\VcsIgnoredFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/VcsIgnoredFilterIterator.php',
+ 'Symfony\\Component\\Finder\\SplFileInfo' => __DIR__ . '/..' . '/symfony/finder/SplFileInfo.php',
+ 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/MissingOptionsException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoConfigurationException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
+ 'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
+ 'Symfony\\Component\\OptionsResolver\\OptionConfigurator' => __DIR__ . '/..' . '/symfony/options-resolver/OptionConfigurator.php',
+ 'Symfony\\Component\\OptionsResolver\\Options' => __DIR__ . '/..' . '/symfony/options-resolver/Options.php',
+ 'Symfony\\Component\\OptionsResolver\\OptionsResolver' => __DIR__ . '/..' . '/symfony/options-resolver/OptionsResolver.php',
+ 'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/process/Exception/ExceptionInterface.php',
+ 'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/process/Exception/InvalidArgumentException.php',
+ 'Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessFailedException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessFailedException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessSignaledException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessSignaledException.php',
+ 'Symfony\\Component\\Process\\Exception\\ProcessTimedOutException' => __DIR__ . '/..' . '/symfony/process/Exception/ProcessTimedOutException.php',
+ 'Symfony\\Component\\Process\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/process/Exception/RuntimeException.php',
+ 'Symfony\\Component\\Process\\ExecutableFinder' => __DIR__ . '/..' . '/symfony/process/ExecutableFinder.php',
+ 'Symfony\\Component\\Process\\InputStream' => __DIR__ . '/..' . '/symfony/process/InputStream.php',
+ 'Symfony\\Component\\Process\\PhpExecutableFinder' => __DIR__ . '/..' . '/symfony/process/PhpExecutableFinder.php',
+ 'Symfony\\Component\\Process\\PhpProcess' => __DIR__ . '/..' . '/symfony/process/PhpProcess.php',
+ 'Symfony\\Component\\Process\\Pipes\\AbstractPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/AbstractPipes.php',
+ 'Symfony\\Component\\Process\\Pipes\\PipesInterface' => __DIR__ . '/..' . '/symfony/process/Pipes/PipesInterface.php',
+ 'Symfony\\Component\\Process\\Pipes\\UnixPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/UnixPipes.php',
+ 'Symfony\\Component\\Process\\Pipes\\WindowsPipes' => __DIR__ . '/..' . '/symfony/process/Pipes/WindowsPipes.php',
+ 'Symfony\\Component\\Process\\Process' => __DIR__ . '/..' . '/symfony/process/Process.php',
+ 'Symfony\\Component\\Process\\ProcessUtils' => __DIR__ . '/..' . '/symfony/process/ProcessUtils.php',
+ 'Symfony\\Component\\Stopwatch\\Section' => __DIR__ . '/..' . '/symfony/stopwatch/Section.php',
+ 'Symfony\\Component\\Stopwatch\\Stopwatch' => __DIR__ . '/..' . '/symfony/stopwatch/Stopwatch.php',
+ 'Symfony\\Component\\Stopwatch\\StopwatchEvent' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchEvent.php',
+ 'Symfony\\Component\\Stopwatch\\StopwatchPeriod' => __DIR__ . '/..' . '/symfony/stopwatch/StopwatchPeriod.php',
+ 'Symfony\\Contracts\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/Event.php',
+ 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php',
+ 'Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php',
+ 'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php',
+ 'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php',
+ 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php',
+ 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php',
+ 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php',
+ 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php',
+ 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php',
+ 'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
+ 'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php',
+ 'Symfony\\Polyfill\\Php73\\Php73' => __DIR__ . '/..' . '/symfony/polyfill-php73/Php73.php',
+ 'Symfony\\Polyfill\\Php80\\Php80' => __DIR__ . '/..' . '/symfony/polyfill-php80/Php80.php',
+ 'Symfony\\Polyfill\\Php80\\PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/PhpToken.php',
+ 'Symfony\\Polyfill\\Php81\\Php81' => __DIR__ . '/..' . '/symfony/polyfill-php81/Php81.php',
+ 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
+ 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
);
public static function getInitializer(ClassLoader $loader)
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index a0c7fd4..9670acf 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,234 +1,1985 @@
-[
- {
- "name": "psr/log",
- "version": "1.0.2",
- "version_normalized": "1.0.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "time": "2016-10-10T12:19:37+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Log\\": "Psr/Log/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for logging libraries",
- "homepage": "https://github.com/php-fig/log",
- "keywords": [
- "log",
- "psr",
- "psr-3"
- ]
- },
- {
- "name": "symfony/debug",
- "version": "v3.1.6",
- "version_normalized": "3.1.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/debug.git",
- "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/e2b3f74a67fc928adc3c1b9027f73e1bc01190a8",
- "reference": "e2b3f74a67fc928adc3c1b9027f73e1bc01190a8",
- "shasum": ""
- },
- "require": {
- "php": ">=5.5.9",
- "psr/log": "~1.0"
- },
- "conflict": {
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
- },
- "require-dev": {
- "symfony/class-loader": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0"
- },
- "time": "2016-09-06T11:02:40+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Debug\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Debug Component",
- "homepage": "https://symfony.com"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.2.0",
- "version_normalized": "1.2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "dff51f72b0706335131b00a7f49606168c582594"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
- "reference": "dff51f72b0706335131b00a7f49606168c582594",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "time": "2016-05-18T14:26:46+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ]
- },
- {
- "name": "symfony/console",
- "version": "v3.1.6",
- "version_normalized": "3.1.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "c99da1119ae61e15de0e4829196b9fba6f73d065"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/c99da1119ae61e15de0e4829196b9fba6f73d065",
- "reference": "c99da1119ae61e15de0e4829196b9fba6f73d065",
- "shasum": ""
- },
- "require": {
- "php": ">=5.5.9",
- "symfony/debug": "~2.8|~3.0",
- "symfony/polyfill-mbstring": "~1.0"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/process": ""
- },
- "time": "2016-10-06T01:44:51+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Console Component",
- "homepage": "https://symfony.com"
- }
-]
+{
+ "packages": [
+ {
+ "name": "composer/pcre",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/pcre.git",
+ "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560",
+ "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "time": "2022-01-21T20:24:37+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "keywords": [
+ "PCRE",
+ "preg",
+ "regex",
+ "regular expression"
+ ],
+ "support": {
+ "issues": "https://github.com/composer/pcre/issues",
+ "source": "https://github.com/composer/pcre/tree/1.0.1"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "./pcre"
+ },
+ {
+ "name": "composer/semver",
+ "version": "3.3.2",
+ "version_normalized": "3.3.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
+ "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.4",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "time": "2022-04-01T19:23:25+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/3.3.2"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "./semver"
+ },
+ {
+ "name": "composer/xdebug-handler",
+ "version": "2.0.5",
+ "version_normalized": "2.0.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/xdebug-handler.git",
+ "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a",
+ "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a",
+ "shasum": ""
+ },
+ "require": {
+ "composer/pcre": "^1",
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1 || ^2 || ^3"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.1",
+ "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0"
+ },
+ "time": "2022-02-24T20:20:32+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "John Stevenson",
+ "email": "john-stevenson@blueyonder.co.uk"
+ }
+ ],
+ "description": "Restarts a process without Xdebug.",
+ "keywords": [
+ "Xdebug",
+ "performance"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/xdebug-handler/issues",
+ "source": "https://github.com/composer/xdebug-handler/tree/2.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "./xdebug-handler"
+ },
+ {
+ "name": "doctrine/annotations",
+ "version": "1.13.3",
+ "version_normalized": "1.13.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/annotations.git",
+ "reference": "648b0343343565c4a056bfc8392201385e8d89f0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0",
+ "reference": "648b0343343565c4a056bfc8392201385e8d89f0",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/lexer": "1.*",
+ "ext-tokenizer": "*",
+ "php": "^7.1 || ^8.0",
+ "psr/cache": "^1 || ^2 || ^3"
+ },
+ "require-dev": {
+ "doctrine/cache": "^1.11 || ^2.0",
+ "doctrine/coding-standard": "^6.0 || ^8.1",
+ "phpstan/phpstan": "^1.4.10 || ^1.8.0",
+ "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
+ "symfony/cache": "^4.4 || ^5.2",
+ "vimeo/psalm": "^4.10"
+ },
+ "time": "2022-07-02T10:48:51+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Docblock Annotations Parser",
+ "homepage": "https://www.doctrine-project.org/projects/annotations.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "parser"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/annotations/issues",
+ "source": "https://github.com/doctrine/annotations/tree/1.13.3"
+ },
+ "install-path": "../doctrine/annotations"
+ },
+ {
+ "name": "doctrine/lexer",
+ "version": "1.2.3",
+ "version_normalized": "1.2.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229",
+ "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^9.0",
+ "phpstan/phpstan": "^1.3",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.11"
+ },
+ "time": "2022-02-28T11:07:21+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "https://www.doctrine-project.org/projects/lexer.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "lexer",
+ "parser",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/lexer/issues",
+ "source": "https://github.com/doctrine/lexer/tree/1.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../doctrine/lexer"
+ },
+ {
+ "name": "friendsofphp/php-cs-fixer",
+ "version": "v3.2.1",
+ "version_normalized": "3.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
+ "reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/13ae36a76b6e329e44ca3cafaa784ea02db9ff14",
+ "reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14",
+ "shasum": ""
+ },
+ "require": {
+ "composer/semver": "^3.2",
+ "composer/xdebug-handler": "^2.0",
+ "doctrine/annotations": "^1.12",
+ "ext-json": "*",
+ "ext-tokenizer": "*",
+ "php": "^7.2 || ^8.0",
+ "php-cs-fixer/diff": "^2.0",
+ "symfony/console": "^4.4.20 || ^5.1.3",
+ "symfony/event-dispatcher": "^4.4.20 || ^5.0",
+ "symfony/filesystem": "^4.4.20 || ^5.0",
+ "symfony/finder": "^4.4.20 || ^5.0",
+ "symfony/options-resolver": "^4.4.20 || ^5.0",
+ "symfony/polyfill-php72": "^1.23",
+ "symfony/polyfill-php80": "^1.23",
+ "symfony/polyfill-php81": "^1.23",
+ "symfony/process": "^4.4.20 || ^5.0",
+ "symfony/stopwatch": "^4.4.20 || ^5.0"
+ },
+ "require-dev": {
+ "justinrainbow/json-schema": "^5.2",
+ "keradus/cli-executor": "^1.5",
+ "mikey179/vfsstream": "^1.6.8",
+ "php-coveralls/php-coveralls": "^2.4.3",
+ "php-cs-fixer/accessible-object": "^1.1",
+ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
+ "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
+ "phpspec/prophecy": "^1.10.3",
+ "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5",
+ "phpunitgoodpractices/polyfill": "^1.5",
+ "phpunitgoodpractices/traits": "^1.9.1",
+ "symfony/phpunit-bridge": "^5.2.4",
+ "symfony/yaml": "^4.4.20 || ^5.0"
+ },
+ "suggest": {
+ "ext-dom": "For handling output formats in XML",
+ "ext-mbstring": "For handling non-UTF8 characters.",
+ "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
+ },
+ "time": "2021-10-05T08:12:17+00:00",
+ "bin": [
+ "php-cs-fixer"
+ ],
+ "type": "application",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "PhpCsFixer\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Dariusz Rumiński",
+ "email": "dariusz.ruminski@gmail.com"
+ }
+ ],
+ "description": "A tool to automatically fix PHP code style",
+ "support": {
+ "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
+ "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/keradus",
+ "type": "github"
+ }
+ ],
+ "install-path": "../friendsofphp/php-cs-fixer"
+ },
+ {
+ "name": "nextcloud/coding-standard",
+ "version": "v1.0.0",
+ "version_normalized": "1.0.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nextcloud/coding-standard.git",
+ "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/f3d1f9375e89c605deb1734f59a9f51ecbe80578",
+ "reference": "f3d1f9375e89c605deb1734f59a9f51ecbe80578",
+ "shasum": ""
+ },
+ "require": {
+ "friendsofphp/php-cs-fixer": "^3.2",
+ "php": "^7.3|^8.0"
+ },
+ "time": "2021-11-10T08:44:10+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Nextcloud\\CodingStandard\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christoph Wurst",
+ "email": "christoph@winzerhof-wurst.at"
+ }
+ ],
+ "description": "Nextcloud coding standards for the php cs fixer",
+ "support": {
+ "issues": "https://github.com/nextcloud/coding-standard/issues",
+ "source": "https://github.com/nextcloud/coding-standard/tree/v1.0.0"
+ },
+ "install-path": "../nextcloud/coding-standard"
+ },
+ {
+ "name": "php-cs-fixer/diff",
+ "version": "v2.0.2",
+ "version_normalized": "2.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHP-CS-Fixer/diff.git",
+ "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3",
+ "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
+ "symfony/process": "^3.3"
+ },
+ "time": "2020-10-14T08:32:19+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ }
+ ],
+ "description": "sebastian/diff v3 backport support for PHP 5.6+",
+ "homepage": "https://github.com/PHP-CS-Fixer",
+ "keywords": [
+ "diff"
+ ],
+ "support": {
+ "issues": "https://github.com/PHP-CS-Fixer/diff/issues",
+ "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2"
+ },
+ "install-path": "../php-cs-fixer/diff"
+ },
+ {
+ "name": "psr/cache",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/cache.git",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "time": "2016-08-06T20:24:11+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for caching libraries",
+ "keywords": [
+ "cache",
+ "psr",
+ "psr-6"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/cache/tree/master"
+ },
+ "install-path": "../psr/cache"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.1.2",
+ "version_normalized": "1.1.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "time": "2021-11-05T16:50:12+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
+ },
+ "install-path": "../psr/container"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.1.4",
+ "version_normalized": "1.1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "time": "2021-05-03T11:20:27+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
+ "install-path": "../psr/log"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v4.4.43",
+ "version_normalized": "4.4.43.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8a2628d2d5639f35113dc1b833ecd91e1ed1cf46",
+ "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.8",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2"
+ },
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<3.4",
+ "symfony/event-dispatcher": "<4.3|>=5",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<3.3"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/event-dispatcher": "^4.3",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^3.4|^4.0|^5.0",
+ "symfony/var-dumper": "^4.3|^5.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "time": "2022-06-23T12:22:25+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/console/tree/v4.4.43"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/console"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.5.2",
+ "version_normalized": "2.5.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+ "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-01-02T09:53:40+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/deprecation-contracts"
+ },
+ {
+ "name": "symfony/event-dispatcher",
+ "version": "v4.4.42",
+ "version_normalized": "4.4.42.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "708e761740c16b02c86e3f0c932018a06b895d40"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40",
+ "reference": "708e761740c16b02c86e3f0c932018a06b895d40",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3",
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<3.4"
+ },
+ "provide": {
+ "psr/event-dispatcher-implementation": "1.0",
+ "symfony/event-dispatcher-implementation": "1.1"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2|^3",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/error-handler": "~3.4|~4.4",
+ "symfony/expression-language": "^3.4|^4.0|^5.0",
+ "symfony/http-foundation": "^3.4|^4.0|^5.0",
+ "symfony/service-contracts": "^1.1|^2",
+ "symfony/stopwatch": "^3.4|^4.0|^5.0"
+ },
+ "suggest": {
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "time": "2022-05-05T15:33:49+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\EventDispatcher\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/event-dispatcher"
+ },
+ {
+ "name": "symfony/event-dispatcher-contracts",
+ "version": "v1.1.13",
+ "version_normalized": "1.1.13.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher-contracts.git",
+ "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/1d5cd762abaa6b2a4169d3e77610193a7157129e",
+ "reference": "1d5cd762abaa6b2a4169d3e77610193a7157129e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1.3"
+ },
+ "suggest": {
+ "psr/event-dispatcher": "",
+ "symfony/event-dispatcher-implementation": ""
+ },
+ "time": "2022-01-02T09:41:36+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.1-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\EventDispatcher\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to dispatching event",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/event-dispatcher-contracts"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v5.3.14",
+ "version_normalized": "5.3.14.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "1c11c4846dff1b62c869a47d45fa5ed5e93faea2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/1c11c4846dff1b62c869a47d45fa5ed5e93faea2",
+ "reference": "1c11c4846dff1b62c869a47d45fa5ed5e93faea2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "time": "2022-01-02T09:51:59+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Filesystem\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides basic utilities for the filesystem",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/filesystem/tree/v5.3.14"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/filesystem"
+ },
+ {
+ "name": "symfony/finder",
+ "version": "v5.4.8",
+ "version_normalized": "5.4.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9",
+ "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "time": "2022-04-15T08:07:45+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Finder\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Finds files and directories via an intuitive fluent interface",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/v5.4.8"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/finder"
+ },
+ {
+ "name": "symfony/options-resolver",
+ "version": "v5.4.3",
+ "version_normalized": "5.4.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/options-resolver.git",
+ "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8",
+ "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php73": "~1.0",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "time": "2022-01-02T09:53:40+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\OptionsResolver\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an improved replacement for the array_replace PHP function",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "config",
+ "configuration",
+ "options"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/options-resolver/tree/v5.4.3"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/options-resolver"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
+ "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-ctype": "*"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "time": "2022-05-24T11:49:31+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-ctype"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.2.0",
+ "version_normalized": "1.2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "dff51f72b0706335131b00a7f49606168c582594"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594",
+ "reference": "dff51f72b0706335131b00a7f49606168c582594",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "time": "2016-05-18T14:26:46+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "install-path": "../symfony/polyfill-mbstring"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2",
+ "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-05-24T11:49:31+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php72\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php72"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-05-24T11:49:31+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php73"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-05-10T07:21:04+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php80"
+ },
+ {
+ "name": "symfony/polyfill-php81",
+ "version": "v1.26.0",
+ "version_normalized": "1.26.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php81.git",
+ "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1",
+ "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "time": "2022-05-24T11:49:31+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php81\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/polyfill-php81"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v5.4.8",
+ "version_normalized": "5.4.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/597f3fff8e3e91836bb0bd38f5718b56ddbde2f3",
+ "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "time": "2022-04-08T05:07:18+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Executes commands in sub-processes",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/process/tree/v5.4.8"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/process"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v2.5.2",
+ "version_normalized": "2.5.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
+ "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.1",
+ "symfony/deprecation-contracts": "^2.1|^3"
+ },
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "time": "2022-05-30T19:17:29+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/v2.5.2"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/service-contracts"
+ },
+ {
+ "name": "symfony/stopwatch",
+ "version": "v5.4.5",
+ "version_normalized": "5.4.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/stopwatch.git",
+ "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/4d04b5c24f3c9a1a168a131f6cbe297155bc0d30",
+ "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/service-contracts": "^1|^2|^3"
+ },
+ "time": "2022-02-18T16:06:09+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Stopwatch\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides a way to profile code",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/stopwatch/tree/v5.4.5"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "install-path": "../symfony/stopwatch"
+ }
+ ],
+ "dev": true,
+ "dev-package-names": [
+ "composer/pcre",
+ "composer/semver",
+ "composer/xdebug-handler",
+ "doctrine/annotations",
+ "doctrine/lexer",
+ "friendsofphp/php-cs-fixer",
+ "nextcloud/coding-standard",
+ "php-cs-fixer/diff",
+ "psr/cache",
+ "psr/log",
+ "symfony/event-dispatcher",
+ "symfony/event-dispatcher-contracts",
+ "symfony/filesystem",
+ "symfony/finder",
+ "symfony/options-resolver",
+ "symfony/polyfill-ctype",
+ "symfony/polyfill-php72",
+ "symfony/polyfill-php81",
+ "symfony/process",
+ "symfony/stopwatch"
+ ]
+}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
new file mode 100644
index 0000000..54afa4b
--- /dev/null
+++ b/vendor/composer/installed.php
@@ -0,0 +1,284 @@
+<?php return array(
+ 'root' => array(
+ 'name' => '__root__',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'bd6a4114864faec390044e8bb4f4505db73bfbce',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev' => true,
+ ),
+ 'versions' => array(
+ '__root__' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'bd6a4114864faec390044e8bb4f4505db73bfbce',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'composer/pcre' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'reference' => '67a32d7d6f9f560b726ab25a061b38ff3a80c560',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/./pcre',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'composer/semver' => array(
+ 'pretty_version' => '3.3.2',
+ 'version' => '3.3.2.0',
+ 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/./semver',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'composer/xdebug-handler' => array(
+ 'pretty_version' => '2.0.5',
+ 'version' => '2.0.5.0',
+ 'reference' => '9e36aeed4616366d2b690bdce11f71e9178c579a',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/./xdebug-handler',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'doctrine/annotations' => array(
+ 'pretty_version' => '1.13.3',
+ 'version' => '1.13.3.0',
+ 'reference' => '648b0343343565c4a056bfc8392201385e8d89f0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../doctrine/annotations',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'doctrine/lexer' => array(
+ 'pretty_version' => '1.2.3',
+ 'version' => '1.2.3.0',
+ 'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../doctrine/lexer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'friendsofphp/php-cs-fixer' => array(
+ 'pretty_version' => 'v3.2.1',
+ 'version' => '3.2.1.0',
+ 'reference' => '13ae36a76b6e329e44ca3cafaa784ea02db9ff14',
+ 'type' => 'application',
+ 'install_path' => __DIR__ . '/../friendsofphp/php-cs-fixer',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'nextcloud/coding-standard' => array(
+ 'pretty_version' => 'v1.0.0',
+ 'version' => '1.0.0.0',
+ 'reference' => 'f3d1f9375e89c605deb1734f59a9f51ecbe80578',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../nextcloud/coding-standard',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'php-cs-fixer/diff' => array(
+ 'pretty_version' => 'v2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => '29dc0d507e838c4580d018bd8b5cb412474f7ec3',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../php-cs-fixer/diff',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'psr/cache' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/cache',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'psr/container' => array(
+ 'pretty_version' => '1.1.2',
+ 'version' => '1.1.2.0',
+ 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/container',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'psr/event-dispatcher-implementation' => array(
+ 'dev_requirement' => true,
+ 'provided' => array(
+ 0 => '1.0',
+ ),
+ ),
+ 'psr/log' => array(
+ 'pretty_version' => '1.1.4',
+ 'version' => '1.1.4.0',
+ 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/log',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'psr/log-implementation' => array(
+ 'dev_requirement' => false,
+ 'provided' => array(
+ 0 => '1.0|2.0',
+ ),
+ ),
+ 'symfony/console' => array(
+ 'pretty_version' => 'v4.4.43',
+ 'version' => '4.4.43.0',
+ 'reference' => '8a2628d2d5639f35113dc1b833ecd91e1ed1cf46',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/console',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/deprecation-contracts' => array(
+ 'pretty_version' => 'v2.5.2',
+ 'version' => '2.5.2.0',
+ 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/event-dispatcher' => array(
+ 'pretty_version' => 'v4.4.42',
+ 'version' => '4.4.42.0',
+ 'reference' => '708e761740c16b02c86e3f0c932018a06b895d40',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/event-dispatcher',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/event-dispatcher-contracts' => array(
+ 'pretty_version' => 'v1.1.13',
+ 'version' => '1.1.13.0',
+ 'reference' => '1d5cd762abaa6b2a4169d3e77610193a7157129e',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/event-dispatcher-implementation' => array(
+ 'dev_requirement' => true,
+ 'provided' => array(
+ 0 => '1.1',
+ ),
+ ),
+ 'symfony/filesystem' => array(
+ 'pretty_version' => 'v5.3.14',
+ 'version' => '5.3.14.0',
+ 'reference' => '1c11c4846dff1b62c869a47d45fa5ed5e93faea2',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/filesystem',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/finder' => array(
+ 'pretty_version' => 'v5.4.8',
+ 'version' => '5.4.8.0',
+ 'reference' => '9b630f3427f3ebe7cd346c277a1408b00249dad9',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/finder',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/options-resolver' => array(
+ 'pretty_version' => 'v5.4.3',
+ 'version' => '5.4.3.0',
+ 'reference' => 'cc1147cb11af1b43f503ac18f31aa3bec213aba8',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/options-resolver',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-ctype' => array(
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
+ 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-mbstring' => array(
+ 'pretty_version' => 'v1.2.0',
+ 'version' => '1.2.0.0',
+ 'reference' => 'dff51f72b0706335131b00a7f49606168c582594',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php72' => array(
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
+ 'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php72',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-php73' => array(
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
+ 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php73',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php80' => array(
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
+ 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php81' => array(
+ 'pretty_version' => 'v1.26.0',
+ 'version' => '1.26.0.0',
+ 'reference' => '13f6d1271c663dc5ae9fb843a8f16521db7687a1',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php81',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/process' => array(
+ 'pretty_version' => 'v5.4.8',
+ 'version' => '5.4.8.0',
+ 'reference' => '597f3fff8e3e91836bb0bd38f5718b56ddbde2f3',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/process',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ 'symfony/service-contracts' => array(
+ 'pretty_version' => 'v2.5.2',
+ 'version' => '2.5.2.0',
+ 'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/service-contracts',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ 'symfony/stopwatch' => array(
+ 'pretty_version' => 'v5.4.5',
+ 'version' => '5.4.5.0',
+ 'reference' => '4d04b5c24f3c9a1a168a131f6cbe297155bc0d30',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/stopwatch',
+ 'aliases' => array(),
+ 'dev_requirement' => true,
+ ),
+ ),
+);
diff --git a/vendor/composer/pcre/LICENSE b/vendor/composer/pcre/LICENSE
new file mode 100644
index 0000000..c5a282f
--- /dev/null
+++ b/vendor/composer/pcre/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2021 Composer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/composer/pcre/README.md b/vendor/composer/pcre/README.md
new file mode 100644
index 0000000..2ddaf74
--- /dev/null
+++ b/vendor/composer/pcre/README.md
@@ -0,0 +1,134 @@
+composer/pcre
+=============
+
+PCRE wrapping library that offers type-safe `preg_*` replacements.
+
+This library gives you a way to ensure `preg_*` functions do not fail silently, returning
+unexpected `null`s that may not be handled.
+
+It also makes it easier ot work with static analysis tools like PHPStan or Psalm as it
+simplifies and reduces the possible return values from all the `preg_*` functions which
+are quite packed with edge cases.
+
+This library is a thin wrapper around `preg_*` functions with [some limitations](#restrictions--limitations).
+If you are looking for a richer API to handle regular expressions have a look at
+[rawr/t-regx](https://packagist.org/packages/rawr/t-regx) instead.
+
+[![Continuous Integration](https://github.com/composer/pcre/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/composer/pcre/actions)
+
+
+Installation
+------------
+
+Install the latest version with:
+
+```bash
+$ composer require composer/pcre
+```
+
+
+Requirements
+------------
+
+* PHP 5.3.2 is required but using the latest version of PHP is highly recommended.
+
+
+Basic usage
+-----------
+
+Instead of:
+
+```php
+if (preg_match('{fo+}', $string, $matches)) { ... }
+if (preg_match('{fo+}', $string, $matches, PREG_OFFSET_CAPTURE)) { ... }
+if (preg_match_all('{fo+}', $string, $matches)) { ... }
+$newString = preg_replace('{fo+}', 'bar', $string);
+$newString = preg_replace_callback('{fo+}', function ($match) { return strtoupper($match[0]); }, $string);
+$newString = preg_replace_callback_array(['{fo+}' => fn ($match) => strtoupper($match[0])], $string);
+$filtered = preg_grep('{[a-z]}', $elements);
+$array = preg_split('{[a-z]+}', $string);
+```
+
+You can now call these on the `Preg` class:
+
+```php
+use Composer\Pcre\Preg;
+
+if (Preg::match('{fo+}', $string, $matches)) { ... }
+if (Preg::matchWithOffsets('{fo+}', $string, $matches)) { ... }
+if (Preg::matchAll('{fo+}', $string, $matches)) { ... }
+$newString = Preg::replace('{fo+}', 'bar', $string);
+$newString = Preg::replaceCallback('{fo+}', function ($match) { return strtoupper($match[0]); }, $string);
+$newString = Preg::replaceCallbackArray(['{fo+}' => fn ($match) => strtoupper($match[0])], $string);
+$filtered = Preg::grep('{[a-z]}', $elements);
+$array = Preg::split('{[a-z]+}', $string);
+```
+
+The main difference is if anything fails to match/replace/.., it will throw a `Composer\Pcre\PcreException`
+instead of returning `null` (or false in some cases), so you can now use the return values safely relying on
+the fact that they can only be strings (for replace), ints (for match) or arrays (for grep/split).
+
+Additionally the `Preg` class provides match methods that return `bool` rather than `int`, for stricter type safety
+when the number of pattern matches is not useful:
+
+```php
+use Composer\Pcre\Preg;
+
+if (Preg::isMatch('{fo+}', $string, $matches)) // bool
+if (Preg::isMatchAll('{fo+}', $string, $matches)) // bool
+```
+
+If you would prefer a slightly more verbose usage, replacing by-ref arguments by result objects, you can use the `Regex` class:
+
+```php
+use Composer\Pcre\Regex;
+
+// this is useful when you are just interested in knowing if something matched
+// as it returns a bool instead of int(1/0) for match
+$bool = Regex::isMatch('{fo+}', $string);
+
+$result = Regex::match('{fo+}', $string);
+if ($result->matched) { something($result->matches); }
+
+$result = Regex::matchWithOffsets('{fo+}', $string);
+if ($result->matched) { something($result->matches); }
+
+$result = Regex::matchAll('{fo+}', $string);
+if ($result->matched && $result->count > 3) { something($result->matches); }
+
+$newString = Regex::replace('{fo+}', 'bar', $string)->result;
+$newString = Regex::replaceCallback('{fo+}', function ($match) { return strtoupper($match[0]); }, $string)->result;
+$newString = Regex::replaceCallbackArray(['{fo+}' => fn ($match) => strtoupper($match[0])], $string)->result;
+```
+
+Note that `preg_grep` and `preg_split` are only callable via the `Preg` class as they do not have
+complex return types warranting a specific result object.
+
+See the [MatchResult](src/MatchResult.php), [MatchWithOffsetsResult](src/MatchWithOffsetsResult.php), [MatchAllResult](src/MatchAllResult.php),
+[MatchAllWithOffsetsResult](src/MatchAllWithOffsetsResult.php), and [ReplaceResult](src/ReplaceResult.php) class sources for more details.
+
+Restrictions / Limitations
+--------------------------
+
+Due to type safety requirements a few restrictions are in place.matchWithOffsets
+
+- matching using `PREG_OFFSET_CAPTURE` is made available via `matchWithOffsets` and `matchAllWithOffsets`.
+ You cannot pass the flag to `match`/`matchAll`.
+- `Preg::split` will also reject `PREG_SPLIT_OFFSET_CAPTURE` and you should use `splitWithOffsets`
+ instead.
+- `matchAll` rejects `PREG_SET_ORDER` as it also changes the shape of the returned matches. There
+ is no alternative provided as you can fairly easily code around it.
+- `preg_filter` is not supported as it has a rather crazy API, most likely you should rather
+ use `Preg::grep` in combination with some loop and `Preg::replace`.
+- `replace`, `replaceCallback` and `replaceCallbackArray` do not support an array `$subject`,
+ only simple strings.
+- in 2.x, we plan to always implicitly use `PREG_UNMATCHED_AS_NULL` for matching, which offers much
+ saner/predictable results. This is currently not doable due to the PHP version requirement and to
+ keep things working the same across all PHP versions. If you use the library on a PHP 7.2+ project
+ however we highly recommend using `PREG_UNMATCHED_AS_NULL` with all `match*` and `replaceCallback*`
+ methods.
+
+License
+-------
+
+composer/pcre is licensed under the MIT License, see the LICENSE file for details.
diff --git a/vendor/composer/pcre/composer.json b/vendor/composer/pcre/composer.json
new file mode 100644
index 0000000..e49047c
--- /dev/null
+++ b/vendor/composer/pcre/composer.json
@@ -0,0 +1,46 @@
+{
+ "name": "composer/pcre",
+ "description": "PCRE wrapping library that offers type-safe preg_* replacements.",
+ "type": "library",
+ "license": "MIT",
+ "keywords": [
+ "pcre",
+ "regex",
+ "preg",
+ "regular expression"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ }
+ ],
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.2 || ^5",
+ "phpstan/phpstan": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.1"
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Pcre\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Composer\\Pcre\\": "tests"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "scripts": {
+ "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
+ "phpstan": "phpstan analyse"
+ }
+}
diff --git a/vendor/composer/pcre/src/MatchAllResult.php b/vendor/composer/pcre/src/MatchAllResult.php
new file mode 100644
index 0000000..4c367b0
--- /dev/null
+++ b/vendor/composer/pcre/src/MatchAllResult.php
@@ -0,0 +1,46 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+final class MatchAllResult
+{
+ /**
+ * An array of match group => list of matched strings
+ *
+ * @readonly
+ * @var array<int|string, list<string|null>>
+ */
+ public $matches;
+
+ /**
+ * @readonly
+ * @var 0|positive-int
+ */
+ public $count;
+
+ /**
+ * @readonly
+ * @var bool
+ */
+ public $matched;
+
+ /**
+ * @param 0|positive-int $count
+ * @param array<array<string|null>> $matches
+ */
+ public function __construct($count, array $matches)
+ {
+ $this->matches = $matches;
+ $this->matched = (bool) $count;
+ $this->count = $count;
+ }
+}
diff --git a/vendor/composer/pcre/src/MatchAllWithOffsetsResult.php b/vendor/composer/pcre/src/MatchAllWithOffsetsResult.php
new file mode 100644
index 0000000..4e893fe
--- /dev/null
+++ b/vendor/composer/pcre/src/MatchAllWithOffsetsResult.php
@@ -0,0 +1,48 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+final class MatchAllWithOffsetsResult
+{
+ /**
+ * An array of match group => list of matches, every match being a pair of string matched + offset in bytes (or -1 if no match)
+ *
+ * @readonly
+ * @var array<int|string, list<array{string|null, int}>>
+ * @phpstan-var array<int|string, list<array{string|null, int<-1, max>}>>
+ */
+ public $matches;
+
+ /**
+ * @readonly
+ * @var 0|positive-int
+ */
+ public $count;
+
+ /**
+ * @readonly
+ * @var bool
+ */
+ public $matched;
+
+ /**
+ * @param 0|positive-int $count
+ * @param array<int|string, list<array{string|null, int}>> $matches
+ * @phpstan-param array<int|string, list<array{string|null, int<-1, max>}>> $matches
+ */
+ public function __construct($count, array $matches)
+ {
+ $this->matches = $matches;
+ $this->matched = (bool) $count;
+ $this->count = $count;
+ }
+}
diff --git a/vendor/composer/pcre/src/MatchResult.php b/vendor/composer/pcre/src/MatchResult.php
new file mode 100644
index 0000000..d8e3460
--- /dev/null
+++ b/vendor/composer/pcre/src/MatchResult.php
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+final class MatchResult
+{
+ /**
+ * An array of match group => string matched
+ *
+ * @readonly
+ * @var array<int|string, string|null>
+ */
+ public $matches;
+
+ /**
+ * @readonly
+ * @var bool
+ */
+ public $matched;
+
+ /**
+ * @param 0|positive-int $count
+ * @param array<string|null> $matches
+ */
+ public function __construct($count, array $matches)
+ {
+ $this->matches = $matches;
+ $this->matched = (bool) $count;
+ }
+}
diff --git a/vendor/composer/pcre/src/MatchWithOffsetsResult.php b/vendor/composer/pcre/src/MatchWithOffsetsResult.php
new file mode 100644
index 0000000..9bd813b
--- /dev/null
+++ b/vendor/composer/pcre/src/MatchWithOffsetsResult.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+final class MatchWithOffsetsResult
+{
+ /**
+ * An array of match group => pair of string matched + offset in bytes (or -1 if no match)
+ *
+ * @readonly
+ * @var array<int|string, array{string|null, int}>
+ * @phpstan-var array<int|string, array{string|null, int<-1, max>}>
+ */
+ public $matches;
+
+ /**
+ * @readonly
+ * @var bool
+ */
+ public $matched;
+
+ /**
+ * @param 0|positive-int $count
+ * @param array<array{string|null, int}> $matches
+ * @phpstan-param array<int|string, array{string|null, int<-1, max>}> $matches
+ */
+ public function __construct($count, array $matches)
+ {
+ $this->matches = $matches;
+ $this->matched = (bool) $count;
+ }
+}
diff --git a/vendor/composer/pcre/src/PcreException.php b/vendor/composer/pcre/src/PcreException.php
new file mode 100644
index 0000000..f62e681
--- /dev/null
+++ b/vendor/composer/pcre/src/PcreException.php
@@ -0,0 +1,60 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+class PcreException extends \RuntimeException
+{
+ /**
+ * @param string $function
+ * @param string|string[] $pattern
+ * @return self
+ */
+ public static function fromFunction($function, $pattern)
+ {
+ $code = preg_last_error();
+
+ if (is_array($pattern)) {
+ $pattern = implode(', ', $pattern);
+ }
+
+ return new PcreException($function.'(): failed executing "'.$pattern.'": '.self::pcreLastErrorMessage($code), $code);
+ }
+
+ /**
+ * @param int $code
+ * @return string
+ */
+ private static function pcreLastErrorMessage($code)
+ {
+ if (PHP_VERSION_ID >= 80000) {
+ return preg_last_error_msg();
+ }
+
+ // older php versions did not set the code properly in all cases
+ if (PHP_VERSION_ID < 70201 && $code === 0) {
+ return 'UNDEFINED_ERROR';
+ }
+
+ $constants = get_defined_constants(true);
+ if (!isset($constants['pcre'])) {
+ return 'UNDEFINED_ERROR';
+ }
+
+ foreach ($constants['pcre'] as $const => $val) {
+ if ($val === $code && substr($const, -6) === '_ERROR') {
+ return $const;
+ }
+ }
+
+ return 'UNDEFINED_ERROR';
+ }
+}
diff --git a/vendor/composer/pcre/src/Preg.php b/vendor/composer/pcre/src/Preg.php
new file mode 100644
index 0000000..278bc89
--- /dev/null
+++ b/vendor/composer/pcre/src/Preg.php
@@ -0,0 +1,303 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+class Preg
+{
+ const ARRAY_MSG = '$subject as an array is not supported. You can use \'foreach\' instead.';
+
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<string|null> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return 0|1
+ */
+ public static function match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0)
+ {
+ if (($flags & PREG_OFFSET_CAPTURE) !== 0) {
+ throw new \InvalidArgumentException('PREG_OFFSET_CAPTURE is not supported as it changes the type of $matches, use matchWithOffsets() instead');
+ }
+
+ $result = preg_match($pattern, $subject, $matches, $flags, $offset);
+ if ($result === false) {
+ throw PcreException::fromFunction('preg_match', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Runs preg_match with PREG_OFFSET_CAPTURE
+ *
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<int|string, array{string|null, int}> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return 0|1
+ *
+ * @phpstan-param array<int|string, array{string|null, int<-1, max>}> $matches
+ */
+ public static function matchWithOffsets($pattern, $subject, &$matches, $flags = 0, $offset = 0)
+ {
+ $result = preg_match($pattern, $subject, $matches, $flags | PREG_OFFSET_CAPTURE, $offset);
+ if ($result === false) {
+ throw PcreException::fromFunction('preg_match', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<int|string, list<string|null>> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return 0|positive-int
+ */
+ public static function matchAll($pattern, $subject, &$matches = null, $flags = 0, $offset = 0)
+ {
+ if (($flags & PREG_OFFSET_CAPTURE) !== 0) {
+ throw new \InvalidArgumentException('PREG_OFFSET_CAPTURE is not supported as it changes the type of $matches, use matchAllWithOffsets() instead');
+ }
+
+ if (($flags & PREG_SET_ORDER) !== 0) {
+ throw new \InvalidArgumentException('PREG_SET_ORDER is not supported as it changes the type of $matches');
+ }
+
+ $result = preg_match_all($pattern, $subject, $matches, $flags, $offset);
+ if ($result === false || $result === null) {
+ throw PcreException::fromFunction('preg_match_all', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Runs preg_match_all with PREG_OFFSET_CAPTURE
+ *
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<int|string, list<array{string|null, int}>> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return 0|positive-int
+ *
+ * @phpstan-param array<int|string, list<array{string|null, int<-1, max>}>> $matches
+ */
+ public static function matchAllWithOffsets($pattern, $subject, &$matches, $flags = 0, $offset = 0)
+ {
+ $result = preg_match_all($pattern, $subject, $matches, $flags | PREG_OFFSET_CAPTURE, $offset);
+ if ($result === false || $result === null) {
+ throw PcreException::fromFunction('preg_match_all', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param string|string[] $pattern
+ * @param string|string[] $replacement
+ * @param string $subject
+ * @param int $limit
+ * @param int $count Set by method
+ * @return string
+ */
+ public static function replace($pattern, $replacement, $subject, $limit = -1, &$count = null)
+ {
+ if (is_array($subject)) { // @phpstan-ignore-line
+ throw new \InvalidArgumentException(static::ARRAY_MSG);
+ }
+
+ $result = preg_replace($pattern, $replacement, $subject, $limit, $count);
+ if ($result === null) {
+ throw PcreException::fromFunction('preg_replace', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param string|string[] $pattern
+ * @param callable $replacement
+ * @param string $subject
+ * @param int $limit
+ * @param int $count Set by method
+ * @param int $flags PREG_OFFSET_CAPTURE or PREG_UNMATCHED_AS_NULL, only available on PHP 7.4+
+ * @return string
+ */
+ public static function replaceCallback($pattern, $replacement, $subject, $limit = -1, &$count = null, $flags = 0)
+ {
+ if (is_array($subject)) { // @phpstan-ignore-line
+ throw new \InvalidArgumentException(static::ARRAY_MSG);
+ }
+
+ if (PHP_VERSION_ID >= 70400) {
+ $result = preg_replace_callback($pattern, $replacement, $subject, $limit, $count, $flags);
+ } else {
+ $result = preg_replace_callback($pattern, $replacement, $subject, $limit, $count);
+ }
+ if ($result === null) {
+ throw PcreException::fromFunction('preg_replace_callback', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Available from PHP 7.0
+ *
+ * @param array<string, callable> $pattern
+ * @param string $subject
+ * @param int $limit
+ * @param int $count Set by method
+ * @param int $flags PREG_OFFSET_CAPTURE or PREG_UNMATCHED_AS_NULL, only available on PHP 7.4+
+ * @return string
+ */
+ public static function replaceCallbackArray(array $pattern, $subject, $limit = -1, &$count = null, $flags = 0)
+ {
+ if (is_array($subject)) { // @phpstan-ignore-line
+ throw new \InvalidArgumentException(static::ARRAY_MSG);
+ }
+
+ if (PHP_VERSION_ID >= 70400) {
+ $result = preg_replace_callback_array($pattern, $subject, $limit, $count, $flags);
+ } else {
+ $result = preg_replace_callback_array($pattern, $subject, $limit, $count);
+ }
+ if ($result === null) {
+ $pattern = array_keys($pattern);
+ throw PcreException::fromFunction('preg_replace_callback_array', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param string $pattern
+ * @param string $subject
+ * @param int $limit
+ * @param int $flags PREG_SPLIT_NO_EMPTY or PREG_SPLIT_DELIM_CAPTURE
+ * @return list<string>
+ */
+ public static function split($pattern, $subject, $limit = -1, $flags = 0)
+ {
+ if (($flags & PREG_SPLIT_OFFSET_CAPTURE) !== 0) {
+ throw new \InvalidArgumentException('PREG_SPLIT_OFFSET_CAPTURE is not supported as it changes the type of $matches, use splitWithOffsets() instead');
+ }
+
+ $result = preg_split($pattern, $subject, $limit, $flags);
+ if ($result === false) {
+ throw PcreException::fromFunction('preg_split', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param string $pattern
+ * @param string $subject
+ * @param int $limit
+ * @param int $flags PREG_SPLIT_NO_EMPTY or PREG_SPLIT_DELIM_CAPTURE
+ * @return list<array{string, int}>
+ * @phpstan-return list<array{string, int<0, max>}>
+ */
+ public static function splitWithOffsets($pattern, $subject, $limit = -1, $flags = 0)
+ {
+ $result = preg_split($pattern, $subject, $limit, $flags | PREG_SPLIT_OFFSET_CAPTURE);
+ if ($result === false) {
+ throw PcreException::fromFunction('preg_split', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @template T of string|\Stringable
+ * @param string $pattern
+ * @param array<T> $array
+ * @param int $flags PREG_GREP_INVERT
+ * @return array<T>
+ */
+ public static function grep($pattern, array $array, $flags = 0)
+ {
+ $result = preg_grep($pattern, $array, $flags);
+ if ($result === false) {
+ throw PcreException::fromFunction('preg_grep', $pattern);
+ }
+
+ return $result;
+ }
+
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<string|null> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return bool
+ */
+ public static function isMatch($pattern, $subject, &$matches = null, $flags = 0, $offset = 0)
+ {
+ return (bool) static::match($pattern, $subject, $matches, $flags, $offset);
+ }
+
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<int|string, list<string|null>> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return bool
+ */
+ public static function isMatchAll($pattern, $subject, &$matches = null, $flags = 0, $offset = 0)
+ {
+ return (bool) static::matchAll($pattern, $subject, $matches, $flags, $offset);
+ }
+
+ /**
+ * Runs preg_match with PREG_OFFSET_CAPTURE
+ *
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<int|string, array{string|null, int}> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return bool
+ *
+ * @phpstan-param array<int|string, array{string|null, int<-1, max>}> $matches
+ */
+ public static function isMatchWithOffsets($pattern, $subject, &$matches, $flags = 0, $offset = 0)
+ {
+ return (bool) static::matchWithOffsets($pattern, $subject, $matches, $flags, $offset);
+ }
+
+ /**
+ * Runs preg_match_all with PREG_OFFSET_CAPTURE
+ *
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param array<int|string, list<array{string|null, int}>> $matches Set by method
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return bool
+ *
+ * @phpstan-param array<int|string, list<array{string|null, int<-1, max>}>> $matches
+ */
+ public static function isMatchAllWithOffsets($pattern, $subject, &$matches, $flags = 0, $offset = 0)
+ {
+ return (bool) static::matchAllWithOffsets($pattern, $subject, $matches, $flags, $offset);
+ }
+}
diff --git a/vendor/composer/pcre/src/Regex.php b/vendor/composer/pcre/src/Regex.php
new file mode 100644
index 0000000..008dca8
--- /dev/null
+++ b/vendor/composer/pcre/src/Regex.php
@@ -0,0 +1,142 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+class Regex
+{
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param int $offset
+ * @return bool
+ */
+ public static function isMatch($pattern, $subject, $offset = 0)
+ {
+ return (bool) Preg::match($pattern, $subject, $matches, 0, $offset);
+ }
+
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return MatchResult
+ */
+ public static function match($pattern, $subject, $flags = 0, $offset = 0)
+ {
+ if (($flags & PREG_OFFSET_CAPTURE) !== 0) {
+ throw new \InvalidArgumentException('PREG_OFFSET_CAPTURE is not supported as it changes the return type, use matchWithOffsets() instead');
+ }
+
+ $count = Preg::match($pattern, $subject, $matches, $flags, $offset);
+
+ return new MatchResult($count, $matches);
+ }
+
+ /**
+ * Runs preg_match with PREG_OFFSET_CAPTURE
+ *
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return MatchWithOffsetsResult
+ */
+ public static function matchWithOffsets($pattern, $subject, $flags = 0, $offset = 0)
+ {
+ $count = Preg::matchWithOffsets($pattern, $subject, $matches, $flags, $offset);
+
+ return new MatchWithOffsetsResult($count, $matches);
+ }
+
+ /**
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return MatchAllResult
+ */
+ public static function matchAll($pattern, $subject, $flags = 0, $offset = 0)
+ {
+ if (($flags & PREG_OFFSET_CAPTURE) !== 0) {
+ throw new \InvalidArgumentException('PREG_OFFSET_CAPTURE is not supported as it changes the return type, use matchAllWithOffsets() instead');
+ }
+
+ if (($flags & PREG_SET_ORDER) !== 0) {
+ throw new \InvalidArgumentException('PREG_SET_ORDER is not supported as it changes the return type');
+ }
+
+ $count = Preg::matchAll($pattern, $subject, $matches, $flags, $offset);
+
+ return new MatchAllResult($count, $matches);
+ }
+
+ /**
+ * Runs preg_match_all with PREG_OFFSET_CAPTURE
+ *
+ * @param non-empty-string $pattern
+ * @param string $subject
+ * @param int $flags PREG_UNMATCHED_AS_NULL, only available on PHP 7.2+
+ * @param int $offset
+ * @return MatchAllWithOffsetsResult
+ */
+ public static function matchAllWithOffsets($pattern, $subject, $flags = 0, $offset = 0)
+ {
+ $count = Preg::matchAllWithOffsets($pattern, $subject, $matches, $flags, $offset);
+
+ return new MatchAllWithOffsetsResult($count, $matches);
+ }
+ /**
+ * @param string|string[] $pattern
+ * @param string|string[] $replacement
+ * @param string $subject
+ * @param int $limit
+ * @return ReplaceResult
+ */
+ public static function replace($pattern, $replacement, $subject, $limit = -1)
+ {
+ $result = Preg::replace($pattern, $replacement, $subject, $limit, $count);
+
+ return new ReplaceResult($count, $result);
+ }
+
+ /**
+ * @param string|string[] $pattern
+ * @param callable $replacement
+ * @param string $subject
+ * @param int $limit
+ * @param int $flags PREG_OFFSET_CAPTURE or PREG_UNMATCHED_AS_NULL, only available on PHP 7.4+
+ * @return ReplaceResult
+ */
+ public static function replaceCallback($pattern, $replacement, $subject, $limit = -1, $flags = 0)
+ {
+ $result = Preg::replaceCallback($pattern, $replacement, $subject, $limit, $count, $flags);
+
+ return new ReplaceResult($count, $result);
+ }
+
+ /**
+ * Available from PHP 7.0
+ *
+ * @param array<string, callable> $pattern
+ * @param string $subject
+ * @param int $limit
+ * @param int $flags PREG_OFFSET_CAPTURE or PREG_UNMATCHED_AS_NULL, only available on PHP 7.4+
+ * @return ReplaceResult
+ */
+ public static function replaceCallbackArray($pattern, $subject, $limit = -1, $flags = 0)
+ {
+ $result = Preg::replaceCallbackArray($pattern, $subject, $limit, $count, $flags);
+
+ return new ReplaceResult($count, $result);
+ }
+}
diff --git a/vendor/composer/pcre/src/ReplaceResult.php b/vendor/composer/pcre/src/ReplaceResult.php
new file mode 100644
index 0000000..0ac0840
--- /dev/null
+++ b/vendor/composer/pcre/src/ReplaceResult.php
@@ -0,0 +1,44 @@
+<?php
+
+/*
+ * This file is part of composer/pcre.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Pcre;
+
+final class ReplaceResult
+{
+ /**
+ * @readonly
+ * @var string
+ */
+ public $result;
+
+ /**
+ * @readonly
+ * @var 0|positive-int
+ */
+ public $count;
+
+ /**
+ * @readonly
+ * @var bool
+ */
+ public $matched;
+
+ /**
+ * @param 0|positive-int $count
+ * @param string $result
+ */
+ public function __construct($count, $result)
+ {
+ $this->count = $count;
+ $this->matched = (bool) $count;
+ $this->result = $result;
+ }
+}
diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php
new file mode 100644
index 0000000..580fa96
--- /dev/null
+++ b/vendor/composer/platform_check.php
@@ -0,0 +1,26 @@
+<?php
+
+// platform_check.php @generated by Composer
+
+$issues = array();
+
+if (!(PHP_VERSION_ID >= 70400)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
+}
+
+if ($issues) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
+ } elseif (!headers_sent()) {
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
+ }
+ }
+ trigger_error(
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
+ E_USER_ERROR
+ );
+}
diff --git a/vendor/composer/semver/CHANGELOG.md b/vendor/composer/semver/CHANGELOG.md
new file mode 100644
index 0000000..c951477
--- /dev/null
+++ b/vendor/composer/semver/CHANGELOG.md
@@ -0,0 +1,209 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+This project adheres to [Semantic Versioning](http://semver.org/).
+
+### [3.3.2] 2022-04-01
+
+ * Fixed handling of non-string values (#134)
+
+### [3.3.1] 2022-03-16
+
+ * Fixed possible cache key clash in the CompilingMatcher memoization (#132)
+
+### [3.3.0] 2022-03-15
+
+ * Improved performance of CompilingMatcher by memoizing more (#131)
+ * Added CompilingMatcher::clear to clear all memoization caches
+
+### [3.2.9] 2022-02-04
+
+ * Revert #129 (Fixed MultiConstraint with MatchAllConstraint) which caused regressions
+
+### [3.2.8] 2022-02-04
+
+ * Updates to latest phpstan / CI by @Seldaek in https://github.com/composer/semver/pull/130
+ * Fixed MultiConstraint with MatchAllConstraint by @Toflar in https://github.com/composer/semver/pull/129
+
+### [3.2.7] 2022-01-04
+
+ * Fixed: typo in type definition of Intervals class causing issues with Psalm scanning vendors
+
+### [3.2.6] 2021-10-25
+
+ * Fixed: type improvements to parseStability
+
+### [3.2.5] 2021-05-24
+
+ * Fixed: issue comparing disjunctive MultiConstraints to conjunctive ones (#127)
+ * Fixed: added complete type information using phpstan annotations
+
+### [3.2.4] 2020-11-13
+
+ * Fixed: code clean-up
+
+### [3.2.3] 2020-11-12
+
+ * Fixed: constraints in the form of `X || Y, >=Y.1` and other such complex constructs were in some cases being optimized into a more restrictive constraint
+
+### [3.2.2] 2020-10-14
+
+ * Fixed: internal code cleanups
+
+### [3.2.1] 2020-09-27
+
+ * Fixed: accidental validation of broken constraints combining ^/~ and wildcards, and -dev suffix allowing weird cases
+ * Fixed: normalization of beta0 and such which was dropping the 0
+
+### [3.2.0] 2020-09-09
+
+ * Added: support for `x || @dev`, not very useful but seen in the wild and failed to validate with 1.5.2/1.6.0
+ * Added: support for `foobar-dev` being equal to `dev-foobar`, dev-foobar is the official way to write it but we need to support the other for BC and convenience
+
+### [3.1.0] 2020-09-08
+
+ * Added: support for constraints like `^2.x-dev` and `~2.x-dev`, not very useful but seen in the wild and failed to validate with 3.0.1
+ * Fixed: invalid aliases will no longer throw, unless explicitly validated by Composer in the root package
+
+### [3.0.1] 2020-09-08
+
+ * Fixed: handling of some invalid -dev versions which were seen as valid
+
+### [3.0.0] 2020-05-26
+
+ * Break: Renamed `EmptyConstraint`, replace it with `MatchAllConstraint`
+ * Break: Unlikely to affect anyone but strictly speaking a breaking change, `*.*` and such variants will not match all `dev-*` versions anymore, only `*` does
+ * Break: ConstraintInterface is now considered internal/private and not meant to be implemented by third parties anymore
+ * Added `Intervals` class to check if a constraint is a subsets of another one, and allow compacting complex MultiConstraints into simpler ones
+ * Added `CompilingMatcher` class to speed up constraint matching against simple Constraint instances
+ * Added `MatchAllConstraint` and `MatchNoneConstraint` which match everything and nothing
+ * Added more advanced optimization of contiguous constraints inside MultiConstraint
+ * Added tentative support for PHP 8
+ * Fixed ConstraintInterface::matches to be commutative in all cases
+
+### [2.0.0] 2020-04-21
+
+ * Break: `dev-master`, `dev-trunk` and `dev-default` now normalize to `dev-master`, `dev-trunk` and `dev-default` instead of `9999999-dev` in 1.x
+ * Break: Removed the deprecated `AbstractConstraint`
+ * Added `getUpperBound` and `getLowerBound` to ConstraintInterface. They return `Composer\Semver\Constraint\Bound` instances
+ * Added `MultiConstraint::create` to create the most-optimal form of ConstraintInterface from an array of constraint strings
+
+### [1.7.2] 2020-12-03
+
+ * Fixed: Allow installing on php 8
+
+### [1.7.1] 2020-09-27
+
+ * Fixed: accidental validation of broken constraints combining ^/~ and wildcards, and -dev suffix allowing weird cases
+ * Fixed: normalization of beta0 and such which was dropping the 0
+
+### [1.7.0] 2020-09-09
+
+ * Added: support for `x || @dev`, not very useful but seen in the wild and failed to validate with 1.5.2/1.6.0
+ * Added: support for `foobar-dev` being equal to `dev-foobar`, dev-foobar is the official way to write it but we need to support the other for BC and convenience
+
+### [1.6.0] 2020-09-08
+
+ * Added: support for constraints like `^2.x-dev` and `~2.x-dev`, not very useful but seen in the wild and failed to validate with 1.5.2
+ * Fixed: invalid aliases will no longer throw, unless explicitly validated by Composer in the root package
+
+### [1.5.2] 2020-09-08
+
+ * Fixed: handling of some invalid -dev versions which were seen as valid
+ * Fixed: some doctypes
+
+### [1.5.1] 2020-01-13
+
+ * Fixed: Parsing of aliased version was not validating the alias to be a valid version
+
+### [1.5.0] 2019-03-19
+
+ * Added: some support for date versions (e.g. 201903) in `~` operator
+ * Fixed: support for stabilities in `~` operator was inconsistent
+
+### [1.4.2] 2016-08-30
+
+ * Fixed: collapsing of complex constraints lead to buggy constraints
+
+### [1.4.1] 2016-06-02
+
+ * Changed: branch-like requirements no longer strip build metadata - [composer/semver#38](https://github.com/composer/semver/pull/38).
+
+### [1.4.0] 2016-03-30
+
+ * Added: getters on MultiConstraint - [composer/semver#35](https://github.com/composer/semver/pull/35).
+
+### [1.3.0] 2016-02-25
+
+ * Fixed: stability parsing - [composer/composer#1234](https://github.com/composer/composer/issues/4889).
+ * Changed: collapse contiguous constraints when possible.
+
+### [1.2.0] 2015-11-10
+
+ * Changed: allow multiple numerical identifiers in 'pre-release' version part.
+ * Changed: add more 'v' prefix support.
+
+### [1.1.0] 2015-11-03
+
+ * Changed: dropped redundant `test` namespace.
+ * Changed: minor adjustment in datetime parsing normalization.
+ * Changed: `ConstraintInterface` relaxed, setPrettyString is not required anymore.
+ * Changed: `AbstractConstraint` marked deprecated, will be removed in 2.0.
+ * Changed: `Constraint` is now extensible.
+
+### [1.0.0] 2015-09-21
+
+ * Break: `VersionConstraint` renamed to `Constraint`.
+ * Break: `SpecificConstraint` renamed to `AbstractConstraint`.
+ * Break: `LinkConstraintInterface` renamed to `ConstraintInterface`.
+ * Break: `VersionParser::parseNameVersionPairs` was removed.
+ * Changed: `VersionParser::parseConstraints` allows (but ignores) build metadata now.
+ * Changed: `VersionParser::parseConstraints` allows (but ignores) prefixing numeric versions with a 'v' now.
+ * Changed: Fixed namespace(s) of test files.
+ * Changed: `Comparator::compare` no longer throws `InvalidArgumentException`.
+ * Changed: `Constraint` now throws `InvalidArgumentException`.
+
+### [0.1.0] 2015-07-23
+
+ * Added: `Composer\Semver\Comparator`, various methods to compare versions.
+ * Added: various documents such as README.md, LICENSE, etc.
+ * Added: configuration files for Git, Travis, php-cs-fixer, phpunit.
+ * Break: the following namespaces were renamed:
+ - Namespace: `Composer\Package\Version` -> `Composer\Semver`
+ - Namespace: `Composer\Package\LinkConstraint` -> `Composer\Semver\Constraint`
+ - Namespace: `Composer\Test\Package\Version` -> `Composer\Test\Semver`
+ - Namespace: `Composer\Test\Package\LinkConstraint` -> `Composer\Test\Semver\Constraint`
+ * Changed: code style using php-cs-fixer.
+
+[3.3.2]: https://github.com/composer/semver/compare/3.3.1...3.3.2
+[3.3.1]: https://github.com/composer/semver/compare/3.3.0...3.3.1
+[3.3.0]: https://github.com/composer/semver/compare/3.2.9...3.3.0
+[3.2.9]: https://github.com/composer/semver/compare/3.2.8...3.2.9
+[3.2.8]: https://github.com/composer/semver/compare/3.2.7...3.2.8
+[3.2.7]: https://github.com/composer/semver/compare/3.2.6...3.2.7
+[3.2.6]: https://github.com/composer/semver/compare/3.2.5...3.2.6
+[3.2.5]: https://github.com/composer/semver/compare/3.2.4...3.2.5
+[3.2.4]: https://github.com/composer/semver/compare/3.2.3...3.2.4
+[3.2.3]: https://github.com/composer/semver/compare/3.2.2...3.2.3
+[3.2.2]: https://github.com/composer/semver/compare/3.2.1...3.2.2
+[3.2.1]: https://github.com/composer/semver/compare/3.2.0...3.2.1
+[3.2.0]: https://github.com/composer/semver/compare/3.1.0...3.2.0
+[3.1.0]: https://github.com/composer/semver/compare/3.0.1...3.1.0
+[3.0.1]: https://github.com/composer/semver/compare/3.0.0...3.0.1
+[3.0.0]: https://github.com/composer/semver/compare/2.0.0...3.0.0
+[2.0.0]: https://github.com/composer/semver/compare/1.5.1...2.0.0
+[1.7.2]: https://github.com/composer/semver/compare/1.7.1...1.7.2
+[1.7.1]: https://github.com/composer/semver/compare/1.7.0...1.7.1
+[1.7.0]: https://github.com/composer/semver/compare/1.6.0...1.7.0
+[1.6.0]: https://github.com/composer/semver/compare/1.5.2...1.6.0
+[1.5.2]: https://github.com/composer/semver/compare/1.5.1...1.5.2
+[1.5.1]: https://github.com/composer/semver/compare/1.5.0...1.5.1
+[1.5.0]: https://github.com/composer/semver/compare/1.4.2...1.5.0
+[1.4.2]: https://github.com/composer/semver/compare/1.4.1...1.4.2
+[1.4.1]: https://github.com/composer/semver/compare/1.4.0...1.4.1
+[1.4.0]: https://github.com/composer/semver/compare/1.3.0...1.4.0
+[1.3.0]: https://github.com/composer/semver/compare/1.2.0...1.3.0
+[1.2.0]: https://github.com/composer/semver/compare/1.1.0...1.2.0
+[1.1.0]: https://github.com/composer/semver/compare/1.0.0...1.1.0
+[1.0.0]: https://github.com/composer/semver/compare/0.1.0...1.0.0
+[0.1.0]: https://github.com/composer/semver/compare/5e0b9a4da...0.1.0
diff --git a/vendor/composer/semver/LICENSE b/vendor/composer/semver/LICENSE
new file mode 100644
index 0000000..4669758
--- /dev/null
+++ b/vendor/composer/semver/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2015 Composer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/composer/semver/README.md b/vendor/composer/semver/README.md
new file mode 100644
index 0000000..35db99a
--- /dev/null
+++ b/vendor/composer/semver/README.md
@@ -0,0 +1,98 @@
+composer/semver
+===============
+
+Semver (Semantic Versioning) library that offers utilities, version constraint parsing and validation.
+
+Originally written as part of [composer/composer](https://github.com/composer/composer),
+now extracted and made available as a stand-alone library.
+
+[![Continuous Integration](https://github.com/composer/semver/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/composer/semver/actions)
+
+
+Installation
+------------
+
+Install the latest version with:
+
+```bash
+$ composer require composer/semver
+```
+
+
+Requirements
+------------
+
+* PHP 5.3.2 is required but using the latest version of PHP is highly recommended.
+
+
+Version Comparison
+------------------
+
+For details on how versions are compared, refer to the [Versions](https://getcomposer.org/doc/articles/versions.md)
+article in the documentation section of the [getcomposer.org](https://getcomposer.org) website.
+
+
+Basic usage
+-----------
+
+### Comparator
+
+The [`Composer\Semver\Comparator`](https://github.com/composer/semver/blob/main/src/Comparator.php) class provides the following methods for comparing versions:
+
+* greaterThan($v1, $v2)
+* greaterThanOrEqualTo($v1, $v2)
+* lessThan($v1, $v2)
+* lessThanOrEqualTo($v1, $v2)
+* equalTo($v1, $v2)
+* notEqualTo($v1, $v2)
+
+Each function takes two version strings as arguments and returns a boolean. For example:
+
+```php
+use Composer\Semver\Comparator;
+
+Comparator::greaterThan('1.25.0', '1.24.0'); // 1.25.0 > 1.24.0
+```
+
+### Semver
+
+The [`Composer\Semver\Semver`](https://github.com/composer/semver/blob/main/src/Semver.php) class provides the following methods:
+
+* satisfies($version, $constraints)
+* satisfiedBy(array $versions, $constraint)
+* sort($versions)
+* rsort($versions)
+
+### Intervals
+
+The [`Composer\Semver\Intervals`](https://github.com/composer/semver/blob/main/src/Intervals.php) static class provides
+a few utilities to work with complex constraints or read version intervals from a constraint:
+
+```php
+use Composer\Semver\Intervals;
+
+// Checks whether $candidate is a subset of $constraint
+Intervals::isSubsetOf(ConstraintInterface $candidate, ConstraintInterface $constraint);
+
+// Checks whether $a and $b have any intersection, equivalent to $a->matches($b)
+Intervals::haveIntersections(ConstraintInterface $a, ConstraintInterface $b);
+
+// Optimizes a complex multi constraint by merging all intervals down to the smallest
+// possible multi constraint. The drawbacks are this is not very fast, and the resulting
+// multi constraint will have no human readable prettyConstraint configured on it
+Intervals::compactConstraint(ConstraintInterface $constraint);
+
+// Creates an array of numeric intervals and branch constraints representing a given constraint
+Intervals::get(ConstraintInterface $constraint);
+
+// Clears the memoization cache when you are done processing constraints
+Intervals::clear()
+```
+
+See the class docblocks for more details.
+
+
+License
+-------
+
+composer/semver is licensed under the MIT License, see the LICENSE file for details.
diff --git a/vendor/composer/semver/composer.json b/vendor/composer/semver/composer.json
new file mode 100644
index 0000000..ba78676
--- /dev/null
+++ b/vendor/composer/semver/composer.json
@@ -0,0 +1,59 @@
+{
+ "name": "composer/semver",
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "type": "library",
+ "license": "MIT",
+ "keywords": [
+ "semver",
+ "semantic",
+ "versioning",
+ "validation"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/semver/issues"
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.2 || ^5",
+ "phpstan/phpstan": "^1.4"
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Composer\\Semver\\": "tests"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "scripts": {
+ "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
+ "phpstan": "@php vendor/bin/phpstan analyse"
+ }
+}
diff --git a/vendor/composer/semver/src/Comparator.php b/vendor/composer/semver/src/Comparator.php
new file mode 100644
index 0000000..38f483a
--- /dev/null
+++ b/vendor/composer/semver/src/Comparator.php
@@ -0,0 +1,113 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver;
+
+use Composer\Semver\Constraint\Constraint;
+
+class Comparator
+{
+ /**
+ * Evaluates the expression: $version1 > $version2.
+ *
+ * @param string $version1
+ * @param string $version2
+ *
+ * @return bool
+ */
+ public static function greaterThan($version1, $version2)
+ {
+ return self::compare($version1, '>', $version2);
+ }
+
+ /**
+ * Evaluates the expression: $version1 >= $version2.
+ *
+ * @param string $version1
+ * @param string $version2
+ *
+ * @return bool
+ */
+ public static function greaterThanOrEqualTo($version1, $version2)
+ {
+ return self::compare($version1, '>=', $version2);
+ }
+
+ /**
+ * Evaluates the expression: $version1 < $version2.
+ *
+ * @param string $version1
+ * @param string $version2
+ *
+ * @return bool
+ */
+ public static function lessThan($version1, $version2)
+ {
+ return self::compare($version1, '<', $version2);
+ }
+
+ /**
+ * Evaluates the expression: $version1 <= $version2.
+ *
+ * @param string $version1
+ * @param string $version2
+ *
+ * @return bool
+ */
+ public static function lessThanOrEqualTo($version1, $version2)
+ {
+ return self::compare($version1, '<=', $version2);
+ }
+
+ /**
+ * Evaluates the expression: $version1 == $version2.
+ *
+ * @param string $version1
+ * @param string $version2
+ *
+ * @return bool
+ */
+ public static function equalTo($version1, $version2)
+ {
+ return self::compare($version1, '==', $version2);
+ }
+
+ /**
+ * Evaluates the expression: $version1 != $version2.
+ *
+ * @param string $version1
+ * @param string $version2
+ *
+ * @return bool
+ */
+ public static function notEqualTo($version1, $version2)
+ {
+ return self::compare($version1, '!=', $version2);
+ }
+
+ /**
+ * Evaluates the expression: $version1 $operator $version2.
+ *
+ * @param string $version1
+ * @param string $operator
+ * @param string $version2
+ *
+ * @return bool
+ *
+ * @phpstan-param Constraint::STR_OP_* $operator
+ */
+ public static function compare($version1, $operator, $version2)
+ {
+ $constraint = new Constraint($operator, $version2);
+
+ return $constraint->matchSpecific(new Constraint('==', $version1), true);
+ }
+}
diff --git a/vendor/composer/semver/src/CompilingMatcher.php b/vendor/composer/semver/src/CompilingMatcher.php
new file mode 100644
index 0000000..45bce70
--- /dev/null
+++ b/vendor/composer/semver/src/CompilingMatcher.php
@@ -0,0 +1,94 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver;
+
+use Composer\Semver\Constraint\Constraint;
+use Composer\Semver\Constraint\ConstraintInterface;
+
+/**
+ * Helper class to evaluate constraint by compiling and reusing the code to evaluate
+ */
+class CompilingMatcher
+{
+ /**
+ * @var array
+ * @phpstan-var array<string, callable>
+ */
+ private static $compiledCheckerCache = array();
+ /**
+ * @var array
+ * @phpstan-var array<string, bool>
+ */
+ private static $resultCache = array();
+
+ /** @var bool */
+ private static $enabled;
+
+ /**
+ * @phpstan-var array<Constraint::OP_*, Constraint::STR_OP_*>
+ */
+ private static $transOpInt = array(
+ Constraint::OP_EQ => Constraint::STR_OP_EQ,
+ Constraint::OP_LT => Constraint::STR_OP_LT,
+ Constraint::OP_LE => Constraint::STR_OP_LE,
+ Constraint::OP_GT => Constraint::STR_OP_GT,
+ Constraint::OP_GE => Constraint::STR_OP_GE,
+ Constraint::OP_NE => Constraint::STR_OP_NE,
+ );
+
+ /**
+ * Clears the memoization cache once you are done
+ *
+ * @return void
+ */
+ public static function clear()
+ {
+ self::$resultCache = array();
+ self::$compiledCheckerCache = array();
+ }
+
+ /**
+ * Evaluates the expression: $constraint match $operator $version
+ *
+ * @param ConstraintInterface $constraint
+ * @param int $operator
+ * @phpstan-param Constraint::OP_* $operator
+ * @param string $version
+ *
+ * @return mixed
+ */
+ public static function match(ConstraintInterface $constraint, $operator, $version)
+ {
+ $resultCacheKey = $operator.$constraint.';'.$version;
+
+ if (isset(self::$resultCache[$resultCacheKey])) {
+ return self::$resultCache[$resultCacheKey];
+ }
+
+ if (self::$enabled === null) {
+ self::$enabled = !\in_array('eval', explode(',', (string) ini_get('disable_functions')), true);
+ }
+ if (!self::$enabled) {
+ return self::$resultCache[$resultCacheKey] = $constraint->matches(new Constraint(self::$transOpInt[$operator], $version));
+ }
+
+ $cacheKey = $operator.$constraint;
+ if (!isset(self::$compiledCheckerCache[$cacheKey])) {
+ $code = $constraint->compile($operator);
+ self::$compiledCheckerCache[$cacheKey] = $function = eval('return function($v, $b){return '.$code.';};');
+ } else {
+ $function = self::$compiledCheckerCache[$cacheKey];
+ }
+
+ return self::$resultCache[$resultCacheKey] = $function($version, strpos($version, 'dev-') === 0);
+ }
+}
diff --git a/vendor/composer/semver/src/Constraint/Bound.php b/vendor/composer/semver/src/Constraint/Bound.php
new file mode 100644
index 0000000..7effb11
--- /dev/null
+++ b/vendor/composer/semver/src/Constraint/Bound.php
@@ -0,0 +1,122 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver\Constraint;
+
+class Bound
+{
+ /**
+ * @var string
+ */
+ private $version;
+
+ /**
+ * @var bool
+ */
+ private $isInclusive;
+
+ /**
+ * @param string $version
+ * @param bool $isInclusive
+ */
+ public function __construct($version, $isInclusive)
+ {
+ $this->version = $version;
+ $this->isInclusive = $isInclusive;
+ }
+
+ /**
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isInclusive()
+ {
+ return $this->isInclusive;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isZero()
+ {
+ return $this->getVersion() === '0.0.0.0-dev' && $this->isInclusive();
+ }
+
+ /**
+ * @return bool
+ */
+ public function isPositiveInfinity()
+ {
+ return $this->getVersion() === PHP_INT_MAX.'.0.0.0' && !$this->isInclusive();
+ }
+
+ /**
+ * Compares a bound to another with a given operator.
+ *
+ * @param Bound $other
+ * @param string $operator
+ *
+ * @return bool
+ */
+ public function compareTo(Bound $other, $operator)
+ {
+ if (!\in_array($operator, array('<', '>'), true)) {
+ throw new \InvalidArgumentException('Does not support any other operator other than > or <.');
+ }
+
+ // If they are the same it doesn't matter
+ if ($this == $other) {
+ return false;
+ }
+
+ $compareResult = version_compare($this->getVersion(), $other->getVersion());
+
+ // Not the same version means we don't need to check if the bounds are inclusive or not
+ if (0 !== $compareResult) {
+ return (('>' === $operator) ? 1 : -1) === $compareResult;
+ }
+
+ // Question we're answering here is "am I higher than $other?"
+ return '>' === $operator ? $other->isInclusive() : !$other->isInclusive();
+ }
+
+ public function __toString()
+ {
+ return sprintf(
+ '%s [%s]',
+ $this->getVersion(),
+ $this->isInclusive() ? 'inclusive' : 'exclusive'
+ );
+ }
+
+ /**
+ * @return self
+ */
+ public static function zero()
+ {
+ return new Bound('0.0.0.0-dev', true);
+ }
+
+ /**
+ * @return self
+ */
+ public static function positiveInfinity()
+ {
+ return new Bound(PHP_INT_MAX.'.0.0.0', false);
+ }
+}
diff --git a/vendor/composer/semver/src/Constraint/Constraint.php b/vendor/composer/semver/src/Constraint/Constraint.php
new file mode 100644
index 0000000..dc39482
--- /dev/null
+++ b/vendor/composer/semver/src/Constraint/Constraint.php
@@ -0,0 +1,435 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver\Constraint;
+
+/**
+ * Defines a constraint.
+ */
+class Constraint implements ConstraintInterface
+{
+ /* operator integer values */
+ const OP_EQ = 0;
+ const OP_LT = 1;
+ const OP_LE = 2;
+ const OP_GT = 3;
+ const OP_GE = 4;
+ const OP_NE = 5;
+
+ /* operator string values */
+ const STR_OP_EQ = '==';
+ const STR_OP_EQ_ALT = '=';
+ const STR_OP_LT = '<';
+ const STR_OP_LE = '<=';
+ const STR_OP_GT = '>';
+ const STR_OP_GE = '>=';
+ const STR_OP_NE = '!=';
+ const STR_OP_NE_ALT = '<>';
+
+ /**
+ * Operator to integer translation table.
+ *
+ * @var array
+ * @phpstan-var array<self::STR_OP_*, self::OP_*>
+ */
+ private static $transOpStr = array(
+ '=' => self::OP_EQ,
+ '==' => self::OP_EQ,
+ '<' => self::OP_LT,
+ '<=' => self::OP_LE,
+ '>' => self::OP_GT,
+ '>=' => self::OP_GE,
+ '<>' => self::OP_NE,
+ '!=' => self::OP_NE,
+ );
+
+ /**
+ * Integer to operator translation table.
+ *
+ * @var array
+ * @phpstan-var array<self::OP_*, self::STR_OP_*>
+ */
+ private static $transOpInt = array(
+ self::OP_EQ => '==',
+ self::OP_LT => '<',
+ self::OP_LE => '<=',
+ self::OP_GT => '>',
+ self::OP_GE => '>=',
+ self::OP_NE => '!=',
+ );
+
+ /**
+ * @var int
+ * @phpstan-var self::OP_*
+ */
+ protected $operator;
+
+ /** @var string */
+ protected $version;
+
+ /** @var string|null */
+ protected $prettyString;
+
+ /** @var Bound */
+ protected $lowerBound;
+
+ /** @var Bound */
+ protected $upperBound;
+
+ /**
+ * Sets operator and version to compare with.
+ *
+ * @param string $operator
+ * @param string $version
+ *
+ * @throws \InvalidArgumentException if invalid operator is given.
+ *
+ * @phpstan-param self::STR_OP_* $operator
+ */
+ public function __construct($operator, $version)
+ {
+ if (!isset(self::$transOpStr[$operator])) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Invalid operator "%s" given, expected one of: %s',
+ $operator,
+ implode(', ', self::getSupportedOperators())
+ ));
+ }
+
+ $this->operator = self::$transOpStr[$operator];
+ $this->version = $version;
+ }
+
+ /**
+ * @return string
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * @return string
+ *
+ * @phpstan-return self::STR_OP_*
+ */
+ public function getOperator()
+ {
+ return self::$transOpInt[$this->operator];
+ }
+
+ /**
+ * @param ConstraintInterface $provider
+ *
+ * @return bool
+ */
+ public function matches(ConstraintInterface $provider)
+ {
+ if ($provider instanceof self) {
+ return $this->matchSpecific($provider);
+ }
+
+ // turn matching around to find a match
+ return $provider->matches($this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function setPrettyString($prettyString)
+ {
+ $this->prettyString = $prettyString;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPrettyString()
+ {
+ if ($this->prettyString) {
+ return $this->prettyString;
+ }
+
+ return $this->__toString();
+ }
+
+ /**
+ * Get all supported comparison operators.
+ *
+ * @return array
+ *
+ * @phpstan-return list<self::STR_OP_*>
+ */
+ public static function getSupportedOperators()
+ {
+ return array_keys(self::$transOpStr);
+ }
+
+ /**
+ * @param string $operator
+ * @return int
+ *
+ * @phpstan-param self::STR_OP_* $operator
+ * @phpstan-return self::OP_*
+ */
+ public static function getOperatorConstant($operator)
+ {
+ return self::$transOpStr[$operator];
+ }
+
+ /**
+ * @param string $a
+ * @param string $b
+ * @param string $operator
+ * @param bool $compareBranches
+ *
+ * @throws \InvalidArgumentException if invalid operator is given.
+ *
+ * @return bool
+ *
+ * @phpstan-param self::STR_OP_* $operator
+ */
+ public function versionCompare($a, $b, $operator, $compareBranches = false)
+ {
+ if (!isset(self::$transOpStr[$operator])) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Invalid operator "%s" given, expected one of: %s',
+ $operator,
+ implode(', ', self::getSupportedOperators())
+ ));
+ }
+
+ $aIsBranch = strpos($a, 'dev-') === 0;
+ $bIsBranch = strpos($b, 'dev-') === 0;
+
+ if ($operator === '!=' && ($aIsBranch || $bIsBranch)) {
+ return $a !== $b;
+ }
+
+ if ($aIsBranch && $bIsBranch) {
+ return $operator === '==' && $a === $b;
+ }
+
+ // when branches are not comparable, we make sure dev branches never match anything
+ if (!$compareBranches && ($aIsBranch || $bIsBranch)) {
+ return false;
+ }
+
+ return \version_compare($a, $b, $operator);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function compile($otherOperator)
+ {
+ if (strpos($this->version, 'dev-') === 0) {
+ if (self::OP_EQ === $this->operator) {
+ if (self::OP_EQ === $otherOperator) {
+ return sprintf('$b && $v === %s', \var_export($this->version, true));
+ }
+ if (self::OP_NE === $otherOperator) {
+ return sprintf('!$b || $v !== %s', \var_export($this->version, true));
+ }
+ return 'false';
+ }
+
+ if (self::OP_NE === $this->operator) {
+ if (self::OP_EQ === $otherOperator) {
+ return sprintf('!$b || $v !== %s', \var_export($this->version, true));
+ }
+ if (self::OP_NE === $otherOperator) {
+ return 'true';
+ }
+ return '!$b';
+ }
+
+ return 'false';
+ }
+
+ if (self::OP_EQ === $this->operator) {
+ if (self::OP_EQ === $otherOperator) {
+ return sprintf('\version_compare($v, %s, \'==\')', \var_export($this->version, true));
+ }
+ if (self::OP_NE === $otherOperator) {
+ return sprintf('$b || \version_compare($v, %s, \'!=\')', \var_export($this->version, true));
+ }
+
+ return sprintf('!$b && \version_compare(%s, $v, \'%s\')', \var_export($this->version, true), self::$transOpInt[$otherOperator]);
+ }
+
+ if (self::OP_NE === $this->operator) {
+ if (self::OP_EQ === $otherOperator) {
+ return sprintf('$b || (!$b && \version_compare($v, %s, \'!=\'))', \var_export($this->version, true));
+ }
+
+ if (self::OP_NE === $otherOperator) {
+ return 'true';
+ }
+ return '!$b';
+ }
+
+ if (self::OP_LT === $this->operator || self::OP_LE === $this->operator) {
+ if (self::OP_LT === $otherOperator || self::OP_LE === $otherOperator) {
+ return '!$b';
+ }
+ } else { // $this->operator must be self::OP_GT || self::OP_GE here
+ if (self::OP_GT === $otherOperator || self::OP_GE === $otherOperator) {
+ return '!$b';
+ }
+ }
+
+ if (self::OP_NE === $otherOperator) {
+ return 'true';
+ }
+
+ $codeComparison = sprintf('\version_compare($v, %s, \'%s\')', \var_export($this->version, true), self::$transOpInt[$this->operator]);
+ if ($this->operator === self::OP_LE) {
+ if ($otherOperator === self::OP_GT) {
+ return sprintf('!$b && \version_compare($v, %s, \'!=\') && ', \var_export($this->version, true)) . $codeComparison;
+ }
+ } elseif ($this->operator === self::OP_GE) {
+ if ($otherOperator === self::OP_LT) {
+ return sprintf('!$b && \version_compare($v, %s, \'!=\') && ', \var_export($this->version, true)) . $codeComparison;
+ }
+ }
+
+ return sprintf('!$b && %s', $codeComparison);
+ }
+
+ /**
+ * @param Constraint $provider
+ * @param bool $compareBranches
+ *
+ * @return bool
+ */
+ public function matchSpecific(Constraint $provider, $compareBranches = false)
+ {
+ $noEqualOp = str_replace('=', '', self::$transOpInt[$this->operator]);
+ $providerNoEqualOp = str_replace('=', '', self::$transOpInt[$provider->operator]);
+
+ $isEqualOp = self::OP_EQ === $this->operator;
+ $isNonEqualOp = self::OP_NE === $this->operator;
+ $isProviderEqualOp = self::OP_EQ === $provider->operator;
+ $isProviderNonEqualOp = self::OP_NE === $provider->operator;
+
+ // '!=' operator is match when other operator is not '==' operator or version is not match
+ // these kinds of comparisons always have a solution
+ if ($isNonEqualOp || $isProviderNonEqualOp) {
+ if ($isNonEqualOp && !$isProviderNonEqualOp && !$isProviderEqualOp && strpos($provider->version, 'dev-') === 0) {
+ return false;
+ }
+
+ if ($isProviderNonEqualOp && !$isNonEqualOp && !$isEqualOp && strpos($this->version, 'dev-') === 0) {
+ return false;
+ }
+
+ if (!$isEqualOp && !$isProviderEqualOp) {
+ return true;
+ }
+ return $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
+ }
+
+ // an example for the condition is <= 2.0 & < 1.0
+ // these kinds of comparisons always have a solution
+ if ($this->operator !== self::OP_EQ && $noEqualOp === $providerNoEqualOp) {
+ return !(strpos($this->version, 'dev-') === 0 || strpos($provider->version, 'dev-') === 0);
+ }
+
+ $version1 = $isEqualOp ? $this->version : $provider->version;
+ $version2 = $isEqualOp ? $provider->version : $this->version;
+ $operator = $isEqualOp ? $provider->operator : $this->operator;
+
+ if ($this->versionCompare($version1, $version2, self::$transOpInt[$operator], $compareBranches)) {
+ // special case, e.g. require >= 1.0 and provide < 1.0
+ // 1.0 >= 1.0 but 1.0 is outside of the provided interval
+
+ return !(self::$transOpInt[$provider->operator] === $providerNoEqualOp
+ && self::$transOpInt[$this->operator] !== $noEqualOp
+ && \version_compare($provider->version, $this->version, '=='));
+ }
+
+ return false;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString()
+ {
+ return self::$transOpInt[$this->operator] . ' ' . $this->version;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getLowerBound()
+ {
+ $this->extractBounds();
+
+ return $this->lowerBound;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getUpperBound()
+ {
+ $this->extractBounds();
+
+ return $this->upperBound;
+ }
+
+ /**
+ * @return void
+ */
+ private function extractBounds()
+ {
+ if (null !== $this->lowerBound) {
+ return;
+ }
+
+ // Branches
+ if (strpos($this->version, 'dev-') === 0) {
+ $this->lowerBound = Bound::zero();
+ $this->upperBound = Bound::positiveInfinity();
+
+ return;
+ }
+
+ switch ($this->operator) {
+ case self::OP_EQ:
+ $this->lowerBound = new Bound($this->version, true);
+ $this->upperBound = new Bound($this->version, true);
+ break;
+ case self::OP_LT:
+ $this->lowerBound = Bound::zero();
+ $this->upperBound = new Bound($this->version, false);
+ break;
+ case self::OP_LE:
+ $this->lowerBound = Bound::zero();
+ $this->upperBound = new Bound($this->version, true);
+ break;
+ case self::OP_GT:
+ $this->lowerBound = new Bound($this->version, false);
+ $this->upperBound = Bound::positiveInfinity();
+ break;
+ case self::OP_GE:
+ $this->lowerBound = new Bound($this->version, true);
+ $this->upperBound = Bound::positiveInfinity();
+ break;
+ case self::OP_NE:
+ $this->lowerBound = Bound::zero();
+ $this->upperBound = Bound::positiveInfinity();
+ break;
+ }
+ }
+}
diff --git a/vendor/composer/semver/src/Constraint/ConstraintInterface.php b/vendor/composer/semver/src/Constraint/ConstraintInterface.php
new file mode 100644
index 0000000..389b935
--- /dev/null
+++ b/vendor/composer/semver/src/Constraint/ConstraintInterface.php
@@ -0,0 +1,75 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver\Constraint;
+
+/**
+ * DO NOT IMPLEMENT this interface. It is only meant for usage as a type hint
+ * in libraries relying on composer/semver but creating your own constraint class
+ * that implements this interface is not a supported use case and will cause the
+ * composer/semver components to return unexpected results.
+ */
+interface ConstraintInterface
+{
+ /**
+ * Checks whether the given constraint intersects in any way with this constraint
+ *
+ * @param ConstraintInterface $provider
+ *
+ * @return bool
+ */
+ public function matches(ConstraintInterface $provider);
+
+ /**
+ * Provides a compiled version of the constraint for the given operator
+ * The compiled version must be a PHP expression.
+ * Executor of compile version must provide 2 variables:
+ * - $v = the string version to compare with
+ * - $b = whether or not the version is a non-comparable branch (starts with "dev-")
+ *
+ * @see Constraint::OP_* for the list of available operators.
+ * @example return '!$b && version_compare($v, '1.0', '>')';
+ *
+ * @param int $otherOperator one Constraint::OP_*
+ *
+ * @return string
+ *
+ * @phpstan-param Constraint::OP_* $otherOperator
+ */
+ public function compile($otherOperator);
+
+ /**
+ * @return Bound
+ */
+ public function getUpperBound();
+
+ /**
+ * @return Bound
+ */
+ public function getLowerBound();
+
+ /**
+ * @return string
+ */
+ public function getPrettyString();
+
+ /**
+ * @param string|null $prettyString
+ *
+ * @return void
+ */
+ public function setPrettyString($prettyString);
+
+ /**
+ * @return string
+ */
+ public function __toString();
+}
diff --git a/vendor/composer/semver/src/Constraint/MatchAllConstraint.php b/vendor/composer/semver/src/Constraint/MatchAllConstraint.php
new file mode 100644
index 0000000..5e51af9
--- /dev/null
+++ b/vendor/composer/semver/src/Constraint/MatchAllConstraint.php
@@ -0,0 +1,85 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver\Constraint;
+
+/**
+ * Defines the absence of a constraint.
+ *
+ * This constraint matches everything.
+ */
+class MatchAllConstraint implements ConstraintInterface
+{
+ /** @var string|null */
+ protected $prettyString;
+
+ /**
+ * @param ConstraintInterface $provider
+ *
+ * @return bool
+ */
+ public function matches(ConstraintInterface $provider)
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function compile($otherOperator)
+ {
+ return 'true';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function setPrettyString($prettyString)
+ {
+ $this->prettyString = $prettyString;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPrettyString()
+ {
+ if ($this->prettyString) {
+ return $this->prettyString;
+ }
+
+ return (string) $this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function __toString()
+ {
+ return '*';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getUpperBound()
+ {
+ return Bound::positiveInfinity();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getLowerBound()
+ {
+ return Bound::zero();
+ }
+}
diff --git a/vendor/composer/semver/src/Constraint/MatchNoneConstraint.php b/vendor/composer/semver/src/Constraint/MatchNoneConstraint.php
new file mode 100644
index 0000000..dadcf62
--- /dev/null
+++ b/vendor/composer/semver/src/Constraint/MatchNoneConstraint.php
@@ -0,0 +1,83 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver\Constraint;
+
+/**
+ * Blackhole of constraints, nothing escapes it
+ */
+class MatchNoneConstraint implements ConstraintInterface
+{
+ /** @var string|null */
+ protected $prettyString;
+
+ /**
+ * @param ConstraintInterface $provider
+ *
+ * @return bool
+ */
+ public function matches(ConstraintInterface $provider)
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function compile($otherOperator)
+ {
+ return 'false';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function setPrettyString($prettyString)
+ {
+ $this->prettyString = $prettyString;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPrettyString()
+ {
+ if ($this->prettyString) {
+ return $this->prettyString;
+ }
+
+ return (string) $this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function __toString()
+ {
+ return '[]';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getUpperBound()
+ {
+ return new Bound('0.0.0.0-dev', false);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getLowerBound()
+ {
+ return new Bound('0.0.0.0-dev', false);
+ }
+}
diff --git a/vendor/composer/semver/src/Constraint/MultiConstraint.php b/vendor/composer/semver/src/Constraint/MultiConstraint.php
new file mode 100644
index 0000000..1f4c006
--- /dev/null
+++ b/vendor/composer/semver/src/Constraint/MultiConstraint.php
@@ -0,0 +1,325 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver\Constraint;
+
+/**
+ * Defines a conjunctive or disjunctive set of constraints.
+ */
+class MultiConstraint implements ConstraintInterface
+{
+ /**
+ * @var ConstraintInterface[]
+ * @phpstan-var non-empty-array<ConstraintInterface>
+ */
+ protected $constraints;
+
+ /** @var string|null */
+ protected $prettyString;
+
+ /** @var string|null */
+ protected $string;
+
+ /** @var bool */
+ protected $conjunctive;
+
+ /** @var Bound|null */
+ protected $lowerBound;
+
+ /** @var Bound|null */
+ protected $upperBound;
+
+ /**
+ * @param ConstraintInterface[] $constraints A set of constraints
+ * @param bool $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
+ *
+ * @throws \InvalidArgumentException If less than 2 constraints are passed
+ */
+ public function __construct(array $constraints, $conjunctive = true)
+ {
+ if (\count($constraints) < 2) {
+ throw new \InvalidArgumentException(
+ 'Must provide at least two constraints for a MultiConstraint. Use '.
+ 'the regular Constraint class for one constraint only or MatchAllConstraint for none. You may use '.
+ 'MultiConstraint::create() which optimizes and handles those cases automatically.'
+ );
+ }
+
+ $this->constraints = $constraints;
+ $this->conjunctive = $conjunctive;
+ }
+
+ /**
+ * @return ConstraintInterface[]
+ */
+ public function getConstraints()
+ {
+ return $this->constraints;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isConjunctive()
+ {
+ return $this->conjunctive;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isDisjunctive()
+ {
+ return !$this->conjunctive;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function compile($otherOperator)
+ {
+ $parts = array();
+ foreach ($this->constraints as $constraint) {
+ $code = $constraint->compile($otherOperator);
+ if ($code === 'true') {
+ if (!$this->conjunctive) {
+ return 'true';
+ }
+ } elseif ($code === 'false') {
+ if ($this->conjunctive) {
+ return 'false';
+ }
+ } else {
+ $parts[] = '('.$code.')';
+ }
+ }
+
+ if (!$parts) {
+ return $this->conjunctive ? 'true' : 'false';
+ }
+
+ return $this->conjunctive ? implode('&&', $parts) : implode('||', $parts);
+ }
+
+ /**
+ * @param ConstraintInterface $provider
+ *
+ * @return bool
+ */
+ public function matches(ConstraintInterface $provider)
+ {
+ if (false === $this->conjunctive) {
+ foreach ($this->constraints as $constraint) {
+ if ($provider->matches($constraint)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // when matching a conjunctive and a disjunctive multi constraint we have to iterate over the disjunctive one
+ // otherwise we'd return true if different parts of the disjunctive constraint match the conjunctive one
+ // which would lead to incorrect results, e.g. [>1 and <2] would match [<1 or >2] although they do not intersect
+ if ($provider instanceof MultiConstraint && $provider->isDisjunctive()) {
+ return $provider->matches($this);
+ }
+
+ foreach ($this->constraints as $constraint) {
+ if (!$provider->matches($constraint)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function setPrettyString($prettyString)
+ {
+ $this->prettyString = $prettyString;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPrettyString()
+ {
+ if ($this->prettyString) {
+ return $this->prettyString;
+ }
+
+ return (string) $this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function __toString()
+ {
+ if ($this->string !== null) {
+ return $this->string;
+ }
+
+ $constraints = array();
+ foreach ($this->constraints as $constraint) {
+ $constraints[] = (string) $constraint;
+ }
+
+ return $this->string = '[' . implode($this->conjunctive ? ' ' : ' || ', $constraints) . ']';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getLowerBound()
+ {
+ $this->extractBounds();
+
+ if (null === $this->lowerBound) {
+ throw new \LogicException('extractBounds should have populated the lowerBound property');
+ }
+
+ return $this->lowerBound;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getUpperBound()
+ {
+ $this->extractBounds();
+
+ if (null === $this->upperBound) {
+ throw new \LogicException('extractBounds should have populated the upperBound property');
+ }
+
+ return $this->upperBound;
+ }
+
+ /**
+ * Tries to optimize the constraints as much as possible, meaning
+ * reducing/collapsing congruent constraints etc.
+ * Does not necessarily return a MultiConstraint instance if
+ * things can be reduced to a simple constraint
+ *
+ * @param ConstraintInterface[] $constraints A set of constraints
+ * @param bool $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
+ *
+ * @return ConstraintInterface
+ */
+ public static function create(array $constraints, $conjunctive = true)
+ {
+ if (0 === \count($constraints)) {
+ return new MatchAllConstraint();
+ }
+
+ if (1 === \count($constraints)) {
+ return $constraints[0];
+ }
+
+ $optimized = self::optimizeConstraints($constraints, $conjunctive);
+ if ($optimized !== null) {
+ list($constraints, $conjunctive) = $optimized;
+ if (\count($constraints) === 1) {
+ return $constraints[0];
+ }
+ }
+
+ return new self($constraints, $conjunctive);
+ }
+
+ /**
+ * @param ConstraintInterface[] $constraints
+ * @param bool $conjunctive
+ * @return ?array
+ *
+ * @phpstan-return array{0: list<ConstraintInterface>, 1: bool}|null
+ */
+ private static function optimizeConstraints(array $constraints, $conjunctive)
+ {
+ // parse the two OR groups and if they are contiguous we collapse
+ // them into one constraint
+ // [>= 1 < 2] || [>= 2 < 3] || [>= 3 < 4] => [>= 1 < 4]
+ if (!$conjunctive) {
+ $left = $constraints[0];
+ $mergedConstraints = array();
+ $optimized = false;
+ for ($i = 1, $l = \count($constraints); $i < $l; $i++) {
+ $right = $constraints[$i];
+ if (
+ $left instanceof self
+ && $left->conjunctive
+ && $right instanceof self
+ && $right->conjunctive
+ && \count($left->constraints) === 2
+ && \count($right->constraints) === 2
+ && ($left0 = (string) $left->constraints[0])
+ && $left0[0] === '>' && $left0[1] === '='
+ && ($left1 = (string) $left->constraints[1])
+ && $left1[0] === '<'
+ && ($right0 = (string) $right->constraints[0])
+ && $right0[0] === '>' && $right0[1] === '='
+ && ($right1 = (string) $right->constraints[1])
+ && $right1[0] === '<'
+ && substr($left1, 2) === substr($right0, 3)
+ ) {
+ $optimized = true;
+ $left = new MultiConstraint(
+ array(
+ $left->constraints[0],
+ $right->constraints[1],
+ ),
+ true);
+ } else {
+ $mergedConstraints[] = $left;
+ $left = $right;
+ }
+ }
+ if ($optimized) {
+ $mergedConstraints[] = $left;
+ return array($mergedConstraints, false);
+ }
+ }
+
+ // TODO: Here's the place to put more optimizations
+
+ return null;
+ }
+
+ /**
+ * @return void
+ */
+ private function extractBounds()
+ {
+ if (null !== $this->lowerBound) {
+ return;
+ }
+
+ foreach ($this->constraints as $constraint) {
+ if (null === $this->lowerBound || null === $this->upperBound) {
+ $this->lowerBound = $constraint->getLowerBound();
+ $this->upperBound = $constraint->getUpperBound();
+ continue;
+ }
+
+ if ($constraint->getLowerBound()->compareTo($this->lowerBound, $this->isConjunctive() ? '>' : '<')) {
+ $this->lowerBound = $constraint->getLowerBound();
+ }
+
+ if ($constraint->getUpperBound()->compareTo($this->upperBound, $this->isConjunctive() ? '<' : '>')) {
+ $this->upperBound = $constraint->getUpperBound();
+ }
+ }
+ }
+}
diff --git a/vendor/composer/semver/src/Interval.php b/vendor/composer/semver/src/Interval.php
new file mode 100644
index 0000000..43d5a4f
--- /dev/null
+++ b/vendor/composer/semver/src/Interval.php
@@ -0,0 +1,98 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver;
+
+use Composer\Semver\Constraint\Constraint;
+
+class Interval
+{
+ /** @var Constraint */
+ private $start;
+ /** @var Constraint */
+ private $end;
+
+ public function __construct(Constraint $start, Constraint $end)
+ {
+ $this->start = $start;
+ $this->end = $end;
+ }
+
+ /**
+ * @return Constraint
+ */
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ /**
+ * @return Constraint
+ */
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ /**
+ * @return Constraint
+ */
+ public static function fromZero()
+ {
+ static $zero;
+
+ if (null === $zero) {
+ $zero = new Constraint('>=', '0.0.0.0-dev');
+ }
+
+ return $zero;
+ }
+
+ /**
+ * @return Constraint
+ */
+ public static function untilPositiveInfinity()
+ {
+ static $positiveInfinity;
+
+ if (null === $positiveInfinity) {
+ $positiveInfinity = new Constraint('<', PHP_INT_MAX.'.0.0.0');
+ }
+
+ return $positiveInfinity;
+ }
+
+ /**
+ * @return self
+ */
+ public static function any()
+ {
+ return new self(self::fromZero(), self::untilPositiveInfinity());
+ }
+
+ /**
+ * @return array{'names': string[], 'exclude': bool}
+ */
+ public static function anyDev()
+ {
+ // any == exclude nothing
+ return array('names' => array(), 'exclude' => true);
+ }
+
+ /**
+ * @return array{'names': string[], 'exclude': bool}
+ */
+ public static function noDev()
+ {
+ // nothing == no names included
+ return array('names' => array(), 'exclude' => false);
+ }
+}
diff --git a/vendor/composer/semver/src/Intervals.php b/vendor/composer/semver/src/Intervals.php
new file mode 100644
index 0000000..d889d0a
--- /dev/null
+++ b/vendor/composer/semver/src/Intervals.php
@@ -0,0 +1,478 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver;
+
+use Composer\Semver\Constraint\Constraint;
+use Composer\Semver\Constraint\ConstraintInterface;
+use Composer\Semver\Constraint\MatchAllConstraint;
+use Composer\Semver\Constraint\MatchNoneConstraint;
+use Composer\Semver\Constraint\MultiConstraint;
+
+/**
+ * Helper class generating intervals from constraints
+ *
+ * This contains utilities for:
+ *
+ * - compacting an existing constraint which can be used to combine several into one
+ * by creating a MultiConstraint out of the many constraints you have.
+ *
+ * - checking whether one subset is a subset of another.
+ *
+ * Note: You should call clear to free memoization memory usage when you are done using this class
+ */
+class Intervals
+{
+ /**
+ * @phpstan-var array<string, array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}>
+ */
+ private static $intervalsCache = array();
+
+ /**
+ * @phpstan-var array<string, int>
+ */
+ private static $opSortOrder = array(
+ '>=' => -3,
+ '<' => -2,
+ '>' => 2,
+ '<=' => 3,
+ );
+
+ /**
+ * Clears the memoization cache once you are done
+ *
+ * @return void
+ */
+ public static function clear()
+ {
+ self::$intervalsCache = array();
+ }
+
+ /**
+ * Checks whether $candidate is a subset of $constraint
+ *
+ * @return bool
+ */
+ public static function isSubsetOf(ConstraintInterface $candidate, ConstraintInterface $constraint)
+ {
+ if ($constraint instanceof MatchAllConstraint) {
+ return true;
+ }
+
+ if ($candidate instanceof MatchNoneConstraint || $constraint instanceof MatchNoneConstraint) {
+ return false;
+ }
+
+ $intersectionIntervals = self::get(new MultiConstraint(array($candidate, $constraint), true));
+ $candidateIntervals = self::get($candidate);
+ if (\count($intersectionIntervals['numeric']) !== \count($candidateIntervals['numeric'])) {
+ return false;
+ }
+
+ foreach ($intersectionIntervals['numeric'] as $index => $interval) {
+ if (!isset($candidateIntervals['numeric'][$index])) {
+ return false;
+ }
+
+ if ((string) $candidateIntervals['numeric'][$index]->getStart() !== (string) $interval->getStart()) {
+ return false;
+ }
+
+ if ((string) $candidateIntervals['numeric'][$index]->getEnd() !== (string) $interval->getEnd()) {
+ return false;
+ }
+ }
+
+ if ($intersectionIntervals['branches']['exclude'] !== $candidateIntervals['branches']['exclude']) {
+ return false;
+ }
+ if (\count($intersectionIntervals['branches']['names']) !== \count($candidateIntervals['branches']['names'])) {
+ return false;
+ }
+ foreach ($intersectionIntervals['branches']['names'] as $index => $name) {
+ if ($name !== $candidateIntervals['branches']['names'][$index]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks whether $a and $b have any intersection, equivalent to $a->matches($b)
+ *
+ * @return bool
+ */
+ public static function haveIntersections(ConstraintInterface $a, ConstraintInterface $b)
+ {
+ if ($a instanceof MatchAllConstraint || $b instanceof MatchAllConstraint) {
+ return true;
+ }
+
+ if ($a instanceof MatchNoneConstraint || $b instanceof MatchNoneConstraint) {
+ return false;
+ }
+
+ $intersectionIntervals = self::generateIntervals(new MultiConstraint(array($a, $b), true), true);
+
+ return \count($intersectionIntervals['numeric']) > 0 || $intersectionIntervals['branches']['exclude'] || \count($intersectionIntervals['branches']['names']) > 0;
+ }
+
+ /**
+ * Attempts to optimize a MultiConstraint
+ *
+ * When merging MultiConstraints together they can get very large, this will
+ * compact it by looking at the real intervals covered by all the constraints
+ * and then creates a new constraint containing only the smallest amount of rules
+ * to match the same intervals.
+ *
+ * @return ConstraintInterface
+ */
+ public static function compactConstraint(ConstraintInterface $constraint)
+ {
+ if (!$constraint instanceof MultiConstraint) {
+ return $constraint;
+ }
+
+ $intervals = self::generateIntervals($constraint);
+ $constraints = array();
+ $hasNumericMatchAll = false;
+
+ if (\count($intervals['numeric']) === 1 && (string) $intervals['numeric'][0]->getStart() === (string) Interval::fromZero() && (string) $intervals['numeric'][0]->getEnd() === (string) Interval::untilPositiveInfinity()) {
+ $constraints[] = $intervals['numeric'][0]->getStart();
+ $hasNumericMatchAll = true;
+ } else {
+ $unEqualConstraints = array();
+ for ($i = 0, $count = \count($intervals['numeric']); $i < $count; $i++) {
+ $interval = $intervals['numeric'][$i];
+
+ // if current interval ends with < N and next interval begins with > N we can swap this out for != N
+ // but this needs to happen as a conjunctive expression together with the start of the current interval
+ // and end of next interval, so [>=M, <N] || [>N, <P] => [>=M, !=N, <P] but M/P can be skipped if
+ // they are zero/+inf
+ if ($interval->getEnd()->getOperator() === '<' && $i+1 < $count) {
+ $nextInterval = $intervals['numeric'][$i+1];
+ if ($interval->getEnd()->getVersion() === $nextInterval->getStart()->getVersion() && $nextInterval->getStart()->getOperator() === '>') {
+ // only add a start if we didn't already do so, can be skipped if we're looking at second
+ // interval in [>=M, <N] || [>N, <P] || [>P, <Q] where unEqualConstraints currently contains
+ // [>=M, !=N] already and we only want to add !=P right now
+ if (\count($unEqualConstraints) === 0 && (string) $interval->getStart() !== (string) Interval::fromZero()) {
+ $unEqualConstraints[] = $interval->getStart();
+ }
+ $unEqualConstraints[] = new Constraint('!=', $interval->getEnd()->getVersion());
+ continue;
+ }
+ }
+
+ if (\count($unEqualConstraints) > 0) {
+ // this is where the end of the following interval of a != constraint is added as explained above
+ if ((string) $interval->getEnd() !== (string) Interval::untilPositiveInfinity()) {
+ $unEqualConstraints[] = $interval->getEnd();
+ }
+
+ // count is 1 if entire constraint is just one != expression
+ if (\count($unEqualConstraints) > 1) {
+ $constraints[] = new MultiConstraint($unEqualConstraints, true);
+ } else {
+ $constraints[] = $unEqualConstraints[0];
+ }
+
+ $unEqualConstraints = array();
+ continue;
+ }
+
+ // convert back >= x - <= x intervals to == x
+ if ($interval->getStart()->getVersion() === $interval->getEnd()->getVersion() && $interval->getStart()->getOperator() === '>=' && $interval->getEnd()->getOperator() === '<=') {
+ $constraints[] = new Constraint('==', $interval->getStart()->getVersion());
+ continue;
+ }
+
+ if ((string) $interval->getStart() === (string) Interval::fromZero()) {
+ $constraints[] = $interval->getEnd();
+ } elseif ((string) $interval->getEnd() === (string) Interval::untilPositiveInfinity()) {
+ $constraints[] = $interval->getStart();
+ } else {
+ $constraints[] = new MultiConstraint(array($interval->getStart(), $interval->getEnd()), true);
+ }
+ }
+ }
+
+ $devConstraints = array();
+
+ if (0 === \count($intervals['branches']['names'])) {
+ if ($intervals['branches']['exclude']) {
+ if ($hasNumericMatchAll) {
+ return new MatchAllConstraint;
+ }
+ // otherwise constraint should contain a != operator and already cover this
+ }
+ } else {
+ foreach ($intervals['branches']['names'] as $branchName) {
+ if ($intervals['branches']['exclude']) {
+ $devConstraints[] = new Constraint('!=', $branchName);
+ } else {
+ $devConstraints[] = new Constraint('==', $branchName);
+ }
+ }
+
+ // excluded branches, e.g. != dev-foo are conjunctive with the interval, so
+ // > 2.0 != dev-foo must return a conjunctive constraint
+ if ($intervals['branches']['exclude']) {
+ if (\count($constraints) > 1) {
+ return new MultiConstraint(array_merge(
+ array(new MultiConstraint($constraints, false)),
+ $devConstraints
+ ), true);
+ }
+
+ if (\count($constraints) === 1 && (string)$constraints[0] === (string)Interval::fromZero()) {
+ if (\count($devConstraints) > 1) {
+ return new MultiConstraint($devConstraints, true);
+ }
+ return $devConstraints[0];
+ }
+
+ return new MultiConstraint(array_merge($constraints, $devConstraints), true);
+ }
+
+ // otherwise devConstraints contains a list of == operators for branches which are disjunctive with the
+ // rest of the constraint
+ $constraints = array_merge($constraints, $devConstraints);
+ }
+
+ if (\count($constraints) > 1) {
+ return new MultiConstraint($constraints, false);
+ }
+
+ if (\count($constraints) === 1) {
+ return $constraints[0];
+ }
+
+ return new MatchNoneConstraint;
+ }
+
+ /**
+ * Creates an array of numeric intervals and branch constraints representing a given constraint
+ *
+ * if the returned numeric array is empty it means the constraint matches nothing in the numeric range (0 - +inf)
+ * if the returned branches array is empty it means no dev-* versions are matched
+ * if a constraint matches all possible dev-* versions, branches will contain Interval::anyDev()
+ *
+ * @return array
+ * @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
+ */
+ public static function get(ConstraintInterface $constraint)
+ {
+ $key = (string) $constraint;
+
+ if (!isset(self::$intervalsCache[$key])) {
+ self::$intervalsCache[$key] = self::generateIntervals($constraint);
+ }
+
+ return self::$intervalsCache[$key];
+ }
+
+ /**
+ * @param bool $stopOnFirstValidInterval
+ *
+ * @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
+ */
+ private static function generateIntervals(ConstraintInterface $constraint, $stopOnFirstValidInterval = false)
+ {
+ if ($constraint instanceof MatchAllConstraint) {
+ return array('numeric' => array(new Interval(Interval::fromZero(), Interval::untilPositiveInfinity())), 'branches' => Interval::anyDev());
+ }
+
+ if ($constraint instanceof MatchNoneConstraint) {
+ return array('numeric' => array(), 'branches' => array('names' => array(), 'exclude' => false));
+ }
+
+ if ($constraint instanceof Constraint) {
+ return self::generateSingleConstraintIntervals($constraint);
+ }
+
+ if (!$constraint instanceof MultiConstraint) {
+ throw new \UnexpectedValueException('The constraint passed in should be an MatchAllConstraint, Constraint or MultiConstraint instance, got '.\get_class($constraint).'.');
+ }
+
+ $constraints = $constraint->getConstraints();
+
+ $numericGroups = array();
+ $constraintBranches = array();
+ foreach ($constraints as $c) {
+ $res = self::get($c);
+ $numericGroups[] = $res['numeric'];
+ $constraintBranches[] = $res['branches'];
+ }
+
+ if ($constraint->isDisjunctive()) {
+ $branches = Interval::noDev();
+ foreach ($constraintBranches as $b) {
+ if ($b['exclude']) {
+ if ($branches['exclude']) {
+ // disjunctive constraint, so only exclude what's excluded in all constraints
+ // !=a,!=b || !=b,!=c => !=b
+ $branches['names'] = array_intersect($branches['names'], $b['names']);
+ } else {
+ // disjunctive constraint so exclude all names which are not explicitly included in the alternative
+ // (==b || ==c) || !=a,!=b => !=a
+ $branches['exclude'] = true;
+ $branches['names'] = array_diff($b['names'], $branches['names']);
+ }
+ } else {
+ if ($branches['exclude']) {
+ // disjunctive constraint so exclude all names which are not explicitly included in the alternative
+ // !=a,!=b || (==b || ==c) => !=a
+ $branches['names'] = array_diff($branches['names'], $b['names']);
+ } else {
+ // disjunctive constraint, so just add all the other branches
+ // (==a || ==b) || ==c => ==a || ==b || ==c
+ $branches['names'] = array_merge($branches['names'], $b['names']);
+ }
+ }
+ }
+ } else {
+ $branches = Interval::anyDev();
+ foreach ($constraintBranches as $b) {
+ if ($b['exclude']) {
+ if ($branches['exclude']) {
+ // conjunctive, so just add all branch names to be excluded
+ // !=a && !=b => !=a,!=b
+ $branches['names'] = array_merge($branches['names'], $b['names']);
+ } else {
+ // conjunctive, so only keep included names which are not excluded
+ // (==a||==c) && !=a,!=b => ==c
+ $branches['names'] = array_diff($branches['names'], $b['names']);
+ }
+ } else {
+ if ($branches['exclude']) {
+ // conjunctive, so only keep included names which are not excluded
+ // !=a,!=b && (==a||==c) => ==c
+ $branches['names'] = array_diff($b['names'], $branches['names']);
+ $branches['exclude'] = false;
+ } else {
+ // conjunctive, so only keep names that are included in both
+ // (==a||==b) && (==a||==c) => ==a
+ $branches['names'] = array_intersect($branches['names'], $b['names']);
+ }
+ }
+ }
+ }
+
+ $branches['names'] = array_unique($branches['names']);
+
+ if (\count($numericGroups) === 1) {
+ return array('numeric' => $numericGroups[0], 'branches' => $branches);
+ }
+
+ $borders = array();
+ foreach ($numericGroups as $group) {
+ foreach ($group as $interval) {
+ $borders[] = array('version' => $interval->getStart()->getVersion(), 'operator' => $interval->getStart()->getOperator(), 'side' => 'start');
+ $borders[] = array('version' => $interval->getEnd()->getVersion(), 'operator' => $interval->getEnd()->getOperator(), 'side' => 'end');
+ }
+ }
+
+ $opSortOrder = self::$opSortOrder;
+ usort($borders, function ($a, $b) use ($opSortOrder) {
+ $order = version_compare($a['version'], $b['version']);
+ if ($order === 0) {
+ return $opSortOrder[$a['operator']] - $opSortOrder[$b['operator']];
+ }
+
+ return $order;
+ });
+
+ $activeIntervals = 0;
+ $intervals = array();
+ $index = 0;
+ $activationThreshold = $constraint->isConjunctive() ? \count($numericGroups) : 1;
+ $start = null;
+ foreach ($borders as $border) {
+ if ($border['side'] === 'start') {
+ $activeIntervals++;
+ } else {
+ $activeIntervals--;
+ }
+ if (!$start && $activeIntervals >= $activationThreshold) {
+ $start = new Constraint($border['operator'], $border['version']);
+ } elseif ($start && $activeIntervals < $activationThreshold) {
+ // filter out invalid intervals like > x - <= x, or >= x - < x
+ if (
+ version_compare($start->getVersion(), $border['version'], '=')
+ && (
+ ($start->getOperator() === '>' && $border['operator'] === '<=')
+ || ($start->getOperator() === '>=' && $border['operator'] === '<')
+ )
+ ) {
+ unset($intervals[$index]);
+ } else {
+ $intervals[$index] = new Interval($start, new Constraint($border['operator'], $border['version']));
+ $index++;
+
+ if ($stopOnFirstValidInterval) {
+ break;
+ }
+ }
+
+ $start = null;
+ }
+ }
+
+ return array('numeric' => $intervals, 'branches' => $branches);
+ }
+
+ /**
+ * @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
+ */
+ private static function generateSingleConstraintIntervals(Constraint $constraint)
+ {
+ $op = $constraint->getOperator();
+
+ // handle branch constraints first
+ if (strpos($constraint->getVersion(), 'dev-') === 0) {
+ $intervals = array();
+ $branches = array('names' => array(), 'exclude' => false);
+
+ // != dev-foo means any numeric version may match, we treat >/< like != they are not really defined for branches
+ if ($op === '!=') {
+ $intervals[] = new Interval(Interval::fromZero(), Interval::untilPositiveInfinity());
+ $branches = array('names' => array($constraint->getVersion()), 'exclude' => true);
+ } elseif ($op === '==') {
+ $branches['names'][] = $constraint->getVersion();
+ }
+
+ return array(
+ 'numeric' => $intervals,
+ 'branches' => $branches,
+ );
+ }
+
+ if ($op[0] === '>') { // > & >=
+ return array('numeric' => array(new Interval($constraint, Interval::untilPositiveInfinity())), 'branches' => Interval::noDev());
+ }
+ if ($op[0] === '<') { // < & <=
+ return array('numeric' => array(new Interval(Interval::fromZero(), $constraint)), 'branches' => Interval::noDev());
+ }
+ if ($op === '!=') {
+ // convert !=x to intervals of 0 - <x && >x - +inf + dev*
+ return array('numeric' => array(
+ new Interval(Interval::fromZero(), new Constraint('<', $constraint->getVersion())),
+ new Interval(new Constraint('>', $constraint->getVersion()), Interval::untilPositiveInfinity()),
+ ), 'branches' => Interval::anyDev());
+ }
+
+ // convert ==x to an interval of >=x - <=x
+ return array('numeric' => array(
+ new Interval(new Constraint('>=', $constraint->getVersion()), new Constraint('<=', $constraint->getVersion())),
+ ), 'branches' => Interval::noDev());
+ }
+}
diff --git a/vendor/composer/semver/src/Semver.php b/vendor/composer/semver/src/Semver.php
new file mode 100644
index 0000000..4d6de3c
--- /dev/null
+++ b/vendor/composer/semver/src/Semver.php
@@ -0,0 +1,129 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver;
+
+use Composer\Semver\Constraint\Constraint;
+
+class Semver
+{
+ const SORT_ASC = 1;
+ const SORT_DESC = -1;
+
+ /** @var VersionParser */
+ private static $versionParser;
+
+ /**
+ * Determine if given version satisfies given constraints.
+ *
+ * @param string $version
+ * @param string $constraints
+ *
+ * @return bool
+ */
+ public static function satisfies($version, $constraints)
+ {
+ if (null === self::$versionParser) {
+ self::$versionParser = new VersionParser();
+ }
+
+ $versionParser = self::$versionParser;
+ $provider = new Constraint('==', $versionParser->normalize($version));
+ $parsedConstraints = $versionParser->parseConstraints($constraints);
+
+ return $parsedConstraints->matches($provider);
+ }
+
+ /**
+ * Return all versions that satisfy given constraints.
+ *
+ * @param string[] $versions
+ * @param string $constraints
+ *
+ * @return string[]
+ */
+ public static function satisfiedBy(array $versions, $constraints)
+ {
+ $versions = array_filter($versions, function ($version) use ($constraints) {
+ return Semver::satisfies($version, $constraints);
+ });
+
+ return array_values($versions);
+ }
+
+ /**
+ * Sort given array of versions.
+ *
+ * @param string[] $versions
+ *
+ * @return string[]
+ */
+ public static function sort(array $versions)
+ {
+ return self::usort($versions, self::SORT_ASC);
+ }
+
+ /**
+ * Sort given array of versions in reverse.
+ *
+ * @param string[] $versions
+ *
+ * @return string[]
+ */
+ public static function rsort(array $versions)
+ {
+ return self::usort($versions, self::SORT_DESC);
+ }
+
+ /**
+ * @param string[] $versions
+ * @param int $direction
+ *
+ * @return string[]
+ */
+ private static function usort(array $versions, $direction)
+ {
+ if (null === self::$versionParser) {
+ self::$versionParser = new VersionParser();
+ }
+
+ $versionParser = self::$versionParser;
+ $normalized = array();
+
+ // Normalize outside of usort() scope for minor performance increase.
+ // Creates an array of arrays: [[normalized, key], ...]
+ foreach ($versions as $key => $version) {
+ $normalizedVersion = $versionParser->normalize($version);
+ $normalizedVersion = $versionParser->normalizeDefaultBranch($normalizedVersion);
+ $normalized[] = array($normalizedVersion, $key);
+ }
+
+ usort($normalized, function (array $left, array $right) use ($direction) {
+ if ($left[0] === $right[0]) {
+ return 0;
+ }
+
+ if (Comparator::lessThan($left[0], $right[0])) {
+ return -$direction;
+ }
+
+ return $direction;
+ });
+
+ // Recreate input array, using the original indexes which are now in sorted order.
+ $sorted = array();
+ foreach ($normalized as $item) {
+ $sorted[] = $versions[$item[1]];
+ }
+
+ return $sorted;
+ }
+}
diff --git a/vendor/composer/semver/src/VersionParser.php b/vendor/composer/semver/src/VersionParser.php
new file mode 100644
index 0000000..202ce24
--- /dev/null
+++ b/vendor/composer/semver/src/VersionParser.php
@@ -0,0 +1,586 @@
+<?php
+
+/*
+ * This file is part of composer/semver.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\Semver;
+
+use Composer\Semver\Constraint\ConstraintInterface;
+use Composer\Semver\Constraint\MatchAllConstraint;
+use Composer\Semver\Constraint\MultiConstraint;
+use Composer\Semver\Constraint\Constraint;
+
+/**
+ * Version parser.
+ *
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class VersionParser
+{
+ /**
+ * Regex to match pre-release data (sort of).
+ *
+ * Due to backwards compatibility:
+ * - Instead of enforcing hyphen, an underscore, dot or nothing at all are also accepted.
+ * - Only stabilities as recognized by Composer are allowed to precede a numerical identifier.
+ * - Numerical-only pre-release identifiers are not supported, see tests.
+ *
+ * |--------------|
+ * [major].[minor].[patch] -[pre-release] +[build-metadata]
+ *
+ * @var string
+ */
+ private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\d+)*+)?)?([.-]?dev)?';
+
+ /** @var string */
+ private static $stabilitiesRegex = 'stable|RC|beta|alpha|dev';
+
+ /**
+ * Returns the stability of a version.
+ *
+ * @param string $version
+ *
+ * @return string
+ * @phpstan-return 'stable'|'RC'|'beta'|'alpha'|'dev'
+ */
+ public static function parseStability($version)
+ {
+ $version = (string) preg_replace('{#.+$}', '', (string) $version);
+
+ if (strpos($version, 'dev-') === 0 || '-dev' === substr($version, -4)) {
+ return 'dev';
+ }
+
+ preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
+
+ if (!empty($match[3])) {
+ return 'dev';
+ }
+
+ if (!empty($match[1])) {
+ if ('beta' === $match[1] || 'b' === $match[1]) {
+ return 'beta';
+ }
+ if ('alpha' === $match[1] || 'a' === $match[1]) {
+ return 'alpha';
+ }
+ if ('rc' === $match[1]) {
+ return 'RC';
+ }
+ }
+
+ return 'stable';
+ }
+
+ /**
+ * @param string $stability
+ *
+ * @return string
+ */
+ public static function normalizeStability($stability)
+ {
+ $stability = strtolower((string) $stability);
+
+ return $stability === 'rc' ? 'RC' : $stability;
+ }
+
+ /**
+ * Normalizes a version string to be able to perform comparisons on it.
+ *
+ * @param string $version
+ * @param ?string $fullVersion optional complete version string to give more context
+ *
+ * @throws \UnexpectedValueException
+ *
+ * @return string
+ */
+ public function normalize($version, $fullVersion = null)
+ {
+ $version = trim((string) $version);
+ $origVersion = $version;
+ if (null === $fullVersion) {
+ $fullVersion = $version;
+ }
+
+ // strip off aliasing
+ if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $version, $match)) {
+ $version = $match[1];
+ }
+
+ // strip off stability flag
+ if (preg_match('{@(?:' . self::$stabilitiesRegex . ')$}i', $version, $match)) {
+ $version = substr($version, 0, strlen($version) - strlen($match[0]));
+ }
+
+ // normalize master/trunk/default branches to dev-name for BC with 1.x as these used to be valid constraints
+ if (\in_array($version, array('master', 'trunk', 'default'), true)) {
+ $version = 'dev-' . $version;
+ }
+
+ // if requirement is branch-like, use full name
+ if (stripos($version, 'dev-') === 0) {
+ return 'dev-' . substr($version, 4);
+ }
+
+ // strip off build metadata
+ if (preg_match('{^([^,\s+]++)\+[^\s]++$}', $version, $match)) {
+ $version = $match[1];
+ }
+
+ // match classical versioning
+ if (preg_match('{^v?(\d{1,5})(\.\d++)?(\.\d++)?(\.\d++)?' . self::$modifierRegex . '$}i', $version, $matches)) {
+ $version = $matches[1]
+ . (!empty($matches[2]) ? $matches[2] : '.0')
+ . (!empty($matches[3]) ? $matches[3] : '.0')
+ . (!empty($matches[4]) ? $matches[4] : '.0');
+ $index = 5;
+ // match date(time) based versioning
+ } elseif (preg_match('{^v?(\d{4}(?:[.:-]?\d{2}){1,6}(?:[.:-]?\d{1,3})?)' . self::$modifierRegex . '$}i', $version, $matches)) {
+ $version = preg_replace('{\D}', '.', $matches[1]);
+ $index = 2;
+ }
+
+ // add version modifiers if a version was matched
+ if (isset($index)) {
+ if (!empty($matches[$index])) {
+ if ('stable' === $matches[$index]) {
+ return $version;
+ }
+ $version .= '-' . $this->expandStability($matches[$index]) . (isset($matches[$index + 1]) && '' !== $matches[$index + 1] ? ltrim($matches[$index + 1], '.-') : '');
+ }
+
+ if (!empty($matches[$index + 2])) {
+ $version .= '-dev';
+ }
+
+ return $version;
+ }
+
+ // match dev branches
+ if (preg_match('{(.*?)[.-]?dev$}i', $version, $match)) {
+ try {
+ $normalized = $this->normalizeBranch($match[1]);
+ // a branch ending with -dev is only valid if it is numeric
+ // if it gets prefixed with dev- it means the branch name should
+ // have had a dev- prefix already when passed to normalize
+ if (strpos($normalized, 'dev-') === false) {
+ return $normalized;
+ }
+ } catch (\Exception $e) {
+ }
+ }
+
+ $extraMessage = '';
+ if (preg_match('{ +as +' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))?$}', $fullVersion)) {
+ $extraMessage = ' in "' . $fullVersion . '", the alias must be an exact version';
+ } elseif (preg_match('{^' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))? +as +}', $fullVersion)) {
+ $extraMessage = ' in "' . $fullVersion . '", the alias source must be an exact version, if it is a branch name you should prefix it with dev-';
+ }
+
+ throw new \UnexpectedValueException('Invalid version string "' . $origVersion . '"' . $extraMessage);
+ }
+
+ /**
+ * Extract numeric prefix from alias, if it is in numeric format, suitable for version comparison.
+ *
+ * @param string $branch Branch name (e.g. 2.1.x-dev)
+ *
+ * @return string|false Numeric prefix if present (e.g. 2.1.) or false
+ */
+ public function parseNumericAliasPrefix($branch)
+ {
+ if (preg_match('{^(?P<version>(\d++\\.)*\d++)(?:\.x)?-dev$}i', (string) $branch, $matches)) {
+ return $matches['version'] . '.';
+ }
+
+ return false;
+ }
+
+ /**
+ * Normalizes a branch name to be able to perform comparisons on it.
+ *
+ * @param string $name
+ *
+ * @return string
+ */
+ public function normalizeBranch($name)
+ {
+ $name = trim((string) $name);
+
+ if (preg_match('{^v?(\d++)(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?$}i', $name, $matches)) {
+ $version = '';
+ for ($i = 1; $i < 5; ++$i) {
+ $version .= isset($matches[$i]) ? str_replace(array('*', 'X'), 'x', $matches[$i]) : '.x';
+ }
+
+ return str_replace('x', '9999999', $version) . '-dev';
+ }
+
+ return 'dev-' . $name;
+ }
+
+ /**
+ * Normalizes a default branch name (i.e. master on git) to 9999999-dev.
+ *
+ * @param string $name
+ *
+ * @return string
+ *
+ * @deprecated No need to use this anymore in theory, Composer 2 does not normalize any branch names to 9999999-dev anymore
+ */
+ public function normalizeDefaultBranch($name)
+ {
+ if ($name === 'dev-master' || $name === 'dev-default' || $name === 'dev-trunk') {
+ return '9999999-dev';
+ }
+
+ return (string) $name;
+ }
+
+ /**
+ * Parses a constraint string into MultiConstraint and/or Constraint objects.
+ *
+ * @param string $constraints
+ *
+ * @return ConstraintInterface
+ */
+ public function parseConstraints($constraints)
+ {
+ $prettyConstraint = (string) $constraints;
+
+ $orConstraints = preg_split('{\s*\|\|?\s*}', trim((string) $constraints));
+ if (false === $orConstraints) {
+ throw new \RuntimeException('Failed to preg_split string: '.$constraints);
+ }
+ $orGroups = array();
+
+ foreach ($orConstraints as $constraints) {
+ $andConstraints = preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $constraints);
+ if (false === $andConstraints) {
+ throw new \RuntimeException('Failed to preg_split string: '.$constraints);
+ }
+ if (\count($andConstraints) > 1) {
+ $constraintObjects = array();
+ foreach ($andConstraints as $constraint) {
+ foreach ($this->parseConstraint($constraint) as $parsedConstraint) {
+ $constraintObjects[] = $parsedConstraint;
+ }
+ }
+ } else {
+ $constraintObjects = $this->parseConstraint($andConstraints[0]);
+ }
+
+ if (1 === \count($constraintObjects)) {
+ $constraint = $constraintObjects[0];
+ } else {
+ $constraint = new MultiConstraint($constraintObjects);
+ }
+
+ $orGroups[] = $constraint;
+ }
+
+ $constraint = MultiConstraint::create($orGroups, false);
+
+ $constraint->setPrettyString($prettyConstraint);
+
+ return $constraint;
+ }
+
+ /**
+ * @param string $constraint
+ *
+ * @throws \UnexpectedValueException
+ *
+ * @return array
+ *
+ * @phpstan-return non-empty-array<ConstraintInterface>
+ */
+ private function parseConstraint($constraint)
+ {
+ // strip off aliasing
+ if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $constraint, $match)) {
+ $constraint = $match[1];
+ }
+
+ // strip @stability flags, and keep it for later use
+ if (preg_match('{^([^,\s]*?)@(' . self::$stabilitiesRegex . ')$}i', $constraint, $match)) {
+ $constraint = '' !== $match[1] ? $match[1] : '*';
+ if ($match[2] !== 'stable') {
+ $stabilityModifier = $match[2];
+ }
+ }
+
+ // get rid of #refs as those are used by composer only
+ if (preg_match('{^(dev-[^,\s@]+?|[^,\s@]+?\.x-dev)#.+$}i', $constraint, $match)) {
+ $constraint = $match[1];
+ }
+
+ if (preg_match('{^(v)?[xX*](\.[xX*])*$}i', $constraint, $match)) {
+ if (!empty($match[1]) || !empty($match[2])) {
+ return array(new Constraint('>=', '0.0.0.0-dev'));
+ }
+
+ return array(new MatchAllConstraint());
+ }
+
+ $versionRegex = 'v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.(\d++))?(?:' . self::$modifierRegex . '|\.([xX*][.-]?dev))(?:\+[^\s]+)?';
+
+ // Tilde Range
+ //
+ // Like wildcard constraints, unsuffixed tilde constraints say that they must be greater than the previous
+ // version, to ensure that unstable instances of the current version are allowed. However, if a stability
+ // suffix is added to the constraint, then a >= match on the current version is used instead.
+ if (preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
+ if (strpos($constraint, '~>') === 0) {
+ throw new \UnexpectedValueException(
+ 'Could not parse version constraint ' . $constraint . ': ' .
+ 'Invalid operator "~>", you probably meant to use the "~" operator'
+ );
+ }
+
+ // Work out which position in the version we are operating at
+ if (isset($matches[4]) && '' !== $matches[4] && null !== $matches[4]) {
+ $position = 4;
+ } elseif (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
+ $position = 3;
+ } elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
+ $position = 2;
+ } else {
+ $position = 1;
+ }
+
+ // when matching 2.x-dev or 3.0.x-dev we have to shift the second or third number, despite no second/third number matching above
+ if (!empty($matches[8])) {
+ $position++;
+ }
+
+ // Calculate the stability suffix
+ $stabilitySuffix = '';
+ if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
+ $stabilitySuffix .= '-dev';
+ }
+
+ $lowVersion = $this->normalize(substr($constraint . $stabilitySuffix, 1));
+ $lowerBound = new Constraint('>=', $lowVersion);
+
+ // For upper bound, we increment the position of one more significance,
+ // but highPosition = 0 would be illegal
+ $highPosition = max(1, $position - 1);
+ $highVersion = $this->manipulateVersionString($matches, $highPosition, 1) . '-dev';
+ $upperBound = new Constraint('<', $highVersion);
+
+ return array(
+ $lowerBound,
+ $upperBound,
+ );
+ }
+
+ // Caret Range
+ //
+ // Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple.
+ // In other words, this allows patch and minor updates for versions 1.0.0 and above, patch updates for
+ // versions 0.X >=0.1.0, and no updates for versions 0.0.X
+ if (preg_match('{^\^' . $versionRegex . '($)}i', $constraint, $matches)) {
+ // Work out which position in the version we are operating at
+ if ('0' !== $matches[1] || '' === $matches[2] || null === $matches[2]) {
+ $position = 1;
+ } elseif ('0' !== $matches[2] || '' === $matches[3] || null === $matches[3]) {
+ $position = 2;
+ } else {
+ $position = 3;
+ }
+
+ // Calculate the stability suffix
+ $stabilitySuffix = '';
+ if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
+ $stabilitySuffix .= '-dev';
+ }
+
+ $lowVersion = $this->normalize(substr($constraint . $stabilitySuffix, 1));
+ $lowerBound = new Constraint('>=', $lowVersion);
+
+ // For upper bound, we increment the position of one more significance,
+ // but highPosition = 0 would be illegal
+ $highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev';
+ $upperBound = new Constraint('<', $highVersion);
+
+ return array(
+ $lowerBound,
+ $upperBound,
+ );
+ }
+
+ // X Range
+ //
+ // Any of X, x, or * may be used to "stand in" for one of the numeric values in the [major, minor, patch] tuple.
+ // A partial version range is treated as an X-Range, so the special character is in fact optional.
+ if (preg_match('{^v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.[xX*])++$}', $constraint, $matches)) {
+ if (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
+ $position = 3;
+ } elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
+ $position = 2;
+ } else {
+ $position = 1;
+ }
+
+ $lowVersion = $this->manipulateVersionString($matches, $position) . '-dev';
+ $highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev';
+
+ if ($lowVersion === '0.0.0.0-dev') {
+ return array(new Constraint('<', $highVersion));
+ }
+
+ return array(
+ new Constraint('>=', $lowVersion),
+ new Constraint('<', $highVersion),
+ );
+ }
+
+ // Hyphen Range
+ //
+ // Specifies an inclusive set. If a partial version is provided as the first version in the inclusive range,
+ // then the missing pieces are replaced with zeroes. If a partial version is provided as the second version in
+ // the inclusive range, then all versions that start with the supplied parts of the tuple are accepted, but
+ // nothing that would be greater than the provided tuple parts.
+ if (preg_match('{^(?P<from>' . $versionRegex . ') +- +(?P<to>' . $versionRegex . ')($)}i', $constraint, $matches)) {
+ // Calculate the stability suffix
+ $lowStabilitySuffix = '';
+ if (empty($matches[6]) && empty($matches[8]) && empty($matches[9])) {
+ $lowStabilitySuffix = '-dev';
+ }
+
+ $lowVersion = $this->normalize($matches['from']);
+ $lowerBound = new Constraint('>=', $lowVersion . $lowStabilitySuffix);
+
+ $empty = function ($x) {
+ return ($x === 0 || $x === '0') ? false : empty($x);
+ };
+
+ if ((!$empty($matches[12]) && !$empty($matches[13])) || !empty($matches[15]) || !empty($matches[17]) || !empty($matches[18])) {
+ $highVersion = $this->normalize($matches['to']);
+ $upperBound = new Constraint('<=', $highVersion);
+ } else {
+ $highMatch = array('', $matches[11], $matches[12], $matches[13], $matches[14]);
+
+ // validate to version
+ $this->normalize($matches['to']);
+
+ $highVersion = $this->manipulateVersionString($highMatch, $empty($matches[12]) ? 1 : 2, 1) . '-dev';
+ $upperBound = new Constraint('<', $highVersion);
+ }
+
+ return array(
+ $lowerBound,
+ $upperBound,
+ );
+ }
+
+ // Basic Comparators
+ if (preg_match('{^(<>|!=|>=?|<=?|==?)?\s*(.*)}', $constraint, $matches)) {
+ try {
+ try {
+ $version = $this->normalize($matches[2]);
+ } catch (\UnexpectedValueException $e) {
+ // recover from an invalid constraint like foobar-dev which should be dev-foobar
+ // except if the constraint uses a known operator, in which case it must be a parse error
+ if (substr($matches[2], -4) === '-dev' && preg_match('{^[0-9a-zA-Z-./]+$}', $matches[2])) {
+ $version = $this->normalize('dev-'.substr($matches[2], 0, -4));
+ } else {
+ throw $e;
+ }
+ }
+
+ $op = $matches[1] ?: '=';
+
+ if ($op !== '==' && $op !== '=' && !empty($stabilityModifier) && self::parseStability($version) === 'stable') {
+ $version .= '-' . $stabilityModifier;
+ } elseif ('<' === $op || '>=' === $op) {
+ if (!preg_match('/-' . self::$modifierRegex . '$/', strtolower($matches[2]))) {
+ if (strpos($matches[2], 'dev-') !== 0) {
+ $version .= '-dev';
+ }
+ }
+ }
+
+ return array(new Constraint($matches[1] ?: '=', $version));
+ } catch (\Exception $e) {
+ }
+ }
+
+ $message = 'Could not parse version constraint ' . $constraint;
+ if (isset($e)) {
+ $message .= ': ' . $e->getMessage();
+ }
+
+ throw new \UnexpectedValueException($message);
+ }
+
+ /**
+ * Increment, decrement, or simply pad a version number.
+ *
+ * Support function for {@link parseConstraint()}
+ *
+ * @param array $matches Array with version parts in array indexes 1,2,3,4
+ * @param int $position 1,2,3,4 - which segment of the version to increment/decrement
+ * @param int $increment
+ * @param string $pad The string to pad version parts after $position
+ *
+ * @return string|null The new version
+ *
+ * @phpstan-param string[] $matches
+ */
+ private function manipulateVersionString(array $matches, $position, $increment = 0, $pad = '0')
+ {
+ for ($i = 4; $i > 0; --$i) {
+ if ($i > $position) {
+ $matches[$i] = $pad;
+ } elseif ($i === $position && $increment) {
+ $matches[$i] += $increment;
+ // If $matches[$i] was 0, carry the decrement
+ if ($matches[$i] < 0) {
+ $matches[$i] = $pad;
+ --$position;
+
+ // Return null on a carry overflow
+ if ($i === 1) {
+ return null;
+ }
+ }
+ }
+ }
+
+ return $matches[1] . '.' . $matches[2] . '.' . $matches[3] . '.' . $matches[4];
+ }
+
+ /**
+ * Expand shorthand stability string to long version.
+ *
+ * @param string $stability
+ *
+ * @return string
+ */
+ private function expandStability($stability)
+ {
+ $stability = strtolower($stability);
+
+ switch ($stability) {
+ case 'a':
+ return 'alpha';
+ case 'b':
+ return 'beta';
+ case 'p':
+ case 'pl':
+ return 'patch';
+ case 'rc':
+ return 'RC';
+ default:
+ return $stability;
+ }
+ }
+}
diff --git a/vendor/composer/xdebug-handler/CHANGELOG.md b/vendor/composer/xdebug-handler/CHANGELOG.md
new file mode 100644
index 0000000..a3a170c
--- /dev/null
+++ b/vendor/composer/xdebug-handler/CHANGELOG.md
@@ -0,0 +1,124 @@
+## [Unreleased]
+
+## [2.0.5] - 2022-02-24
+ * Fixed: regression in 2.0.4 affecting Xdebug 2.
+
+## [2.0.4] - 2022-01-04
+ * Fixed: allow calling `isXdebugActive` before class instantiation.
+
+## [2.0.3] - 2021-12-08
+ * Added: support, type annotations and refactoring for stricter PHPStan analysis.
+
+## [2.0.2] - 2021-07-31
+ * Added: support for `xdebug_info('mode')` in Xdebug 3.1.
+ * Added: support for Psr\Log versions 2 and 3.
+ * Fixed: remove ini directives from non-cli HOST/PATH sections.
+
+## [2.0.1] - 2021-05-05
+ * Fixed: don't restart if the cwd is a UNC path and cmd.exe will be invoked.
+
+## [2.0.0] - 2021-04-09
+ * Break: this is a major release, see [UPGRADE.md](UPGRADE.md) for more information.
+ * Break: removed optional `$colorOption` constructor param and passthru fallback.
+ * Break: renamed `requiresRestart` param from `$isLoaded` to `$default`.
+ * Break: changed `restart` param `$command` from a string to an array.
+ * Added: support for Xdebug3 to only restart if Xdebug is not running with `xdebug.mode=off`.
+ * Added: `isXdebugActive()` method to determine if Xdebug is still running in the restart.
+ * Added: feature to bypass the shell in PHP-7.4+ by giving `proc_open` an array of arguments.
+ * Added: Process utility class to the API.
+
+## [1.4.6] - 2021-03-25
+ * Fixed: fail restart if `proc_open` has been disabled in `disable_functions`.
+ * Fixed: enable Windows CTRL event handling in the restarted process.
+
+## [1.4.5] - 2020-11-13
+ * Fixed: use `proc_open` when available for correct FD forwarding to the restarted process.
+
+## [1.4.4] - 2020-10-24
+ * Fixed: exception if 'pcntl_signal' is disabled.
+
+## [1.4.3] - 2020-08-19
+ * Fixed: restore SIGINT to default handler in restarted process if no other handler exists.
+
+## [1.4.2] - 2020-06-04
+ * Fixed: ignore SIGINTs to let the restarted process handle them.
+
+## [1.4.1] - 2020-03-01
+ * Fixed: restart fails if an ini file is empty.
+
+## [1.4.0] - 2019-11-06
+ * Added: support for `NO_COLOR` environment variable: https://no-color.org
+ * Added: color support for Hyper terminal: https://github.com/zeit/hyper
+ * Fixed: correct capitalization of Xdebug (apparently).
+ * Fixed: improved handling for uopz extension.
+
+## [1.3.3] - 2019-05-27
+ * Fixed: add environment changes to `$_ENV` if it is being used.
+
+## [1.3.2] - 2019-01-28
+ * Fixed: exit call being blocked by uopz extension, resulting in application code running twice.
+
+## [1.3.1] - 2018-11-29
+ * Fixed: fail restart if `passthru` has been disabled in `disable_functions`.
+ * Fixed: fail restart if an ini file cannot be opened, otherwise settings will be missing.
+
+## [1.3.0] - 2018-08-31
+ * Added: `setPersistent` method to use environment variables for the restart.
+ * Fixed: improved debugging by writing output to stderr.
+ * Fixed: no restart when `php_ini_scanned_files` is not functional and is needed.
+
+## [1.2.1] - 2018-08-23
+ * Fixed: fatal error with apc, when using `apc.mmap_file_mask`.
+
+## [1.2.0] - 2018-08-16
+ * Added: debug information using `XDEBUG_HANDLER_DEBUG`.
+ * Added: fluent interface for setters.
+ * Added: `PhpConfig` helper class for calling PHP sub-processes.
+ * Added: `PHPRC` original value to restart stettings, for use in a restarted process.
+ * Changed: internal procedure to disable ini-scanning, using `-n` command-line option.
+ * Fixed: replaced `escapeshellarg` usage to avoid locale problems.
+ * Fixed: improved color-option handling to respect double-dash delimiter.
+ * Fixed: color-option handling regression from main script changes.
+ * Fixed: improved handling when checking main script.
+ * Fixed: handling for standard input, that never actually did anything.
+ * Fixed: fatal error when ctype extension is not available.
+
+## [1.1.0] - 2018-04-11
+ * Added: `getRestartSettings` method for calling PHP processes in a restarted process.
+ * Added: API definition and @internal class annotations.
+ * Added: protected `requiresRestart` method for extending classes.
+ * Added: `setMainScript` method for applications that change the working directory.
+ * Changed: private `tmpIni` variable to protected for extending classes.
+ * Fixed: environment variables not available in $_SERVER when restored in the restart.
+ * Fixed: relative path problems caused by Phar::interceptFileFuncs.
+ * Fixed: incorrect handling when script file cannot be found.
+
+## [1.0.0] - 2018-03-08
+ * Added: PSR3 logging for optional status output.
+ * Added: existing ini settings are merged to catch command-line overrides.
+ * Added: code, tests and other artefacts to decouple from Composer.
+ * Break: the following class was renamed:
+ - `Composer\XdebugHandler` -> `Composer\XdebugHandler\XdebugHandler`
+
+[Unreleased]: https://github.com/composer/xdebug-handler/compare/2.0.5...HEAD
+[2.0.5]: https://github.com/composer/xdebug-handler/compare/2.0.4...2.0.5
+[2.0.4]: https://github.com/composer/xdebug-handler/compare/2.0.3...2.0.4
+[2.0.3]: https://github.com/composer/xdebug-handler/compare/2.0.2...2.0.3
+[2.0.2]: https://github.com/composer/xdebug-handler/compare/2.0.1...2.0.2
+[2.0.1]: https://github.com/composer/xdebug-handler/compare/2.0.0...2.0.1
+[2.0.0]: https://github.com/composer/xdebug-handler/compare/1.4.6...2.0.0
+[1.4.6]: https://github.com/composer/xdebug-handler/compare/1.4.5...1.4.6
+[1.4.5]: https://github.com/composer/xdebug-handler/compare/1.4.4...1.4.5
+[1.4.4]: https://github.com/composer/xdebug-handler/compare/1.4.3...1.4.4
+[1.4.3]: https://github.com/composer/xdebug-handler/compare/1.4.2...1.4.3
+[1.4.2]: https://github.com/composer/xdebug-handler/compare/1.4.1...1.4.2
+[1.4.1]: https://github.com/composer/xdebug-handler/compare/1.4.0...1.4.1
+[1.4.0]: https://github.com/composer/xdebug-handler/compare/1.3.3...1.4.0
+[1.3.3]: https://github.com/composer/xdebug-handler/compare/1.3.2...1.3.3
+[1.3.2]: https://github.com/composer/xdebug-handler/compare/1.3.1...1.3.2
+[1.3.1]: https://github.com/composer/xdebug-handler/compare/1.3.0...1.3.1
+[1.3.0]: https://github.com/composer/xdebug-handler/compare/1.2.1...1.3.0
+[1.2.1]: https://github.com/composer/xdebug-handler/compare/1.2.0...1.2.1
+[1.2.0]: https://github.com/composer/xdebug-handler/compare/1.1.0...1.2.0
+[1.1.0]: https://github.com/composer/xdebug-handler/compare/1.0.0...1.1.0
+[1.0.0]: https://github.com/composer/xdebug-handler/compare/d66f0d15cb57...1.0.0
diff --git a/vendor/composer/xdebug-handler/LICENSE b/vendor/composer/xdebug-handler/LICENSE
new file mode 100644
index 0000000..963618a
--- /dev/null
+++ b/vendor/composer/xdebug-handler/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Composer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/composer/xdebug-handler/README.md b/vendor/composer/xdebug-handler/README.md
new file mode 100644
index 0000000..557d100
--- /dev/null
+++ b/vendor/composer/xdebug-handler/README.md
@@ -0,0 +1,291 @@
+# composer/xdebug-handler
+
+[![packagist](https://img.shields.io/badge/packagist-v2.0.4-blue)](https://packagist.org/packages/composer/xdebug-handler#2.0.4)
+[![Continuous Integration](https://github.com/composer/xdebug-handler/actions/workflows/continuous-integration.yml/badge.svg?branch=2.0)](https://github.com/composer/xdebug-handler/actions?query=branch:2.0)
+![license](https://img.shields.io/github/license/composer/xdebug-handler.svg)
+![php](https://img.shields.io/packagist/php-v/composer/xdebug-handler/2.0.2?colorB=8892BF)
+
+Restart a CLI process without loading the Xdebug extension, unless `xdebug.mode=off`.
+
+Originally written as part of [composer/composer](https://github.com/composer/composer),
+now extracted and made available as a stand-alone library.
+
+### Version 2
+
+Support added for Xdebug3. See [UPGRADE](UPGRADE.md) for more information.
+
+## Installation
+
+Install the latest version with:
+
+```bash
+$ composer require composer/xdebug-handler
+```
+
+## Requirements
+
+* PHP 5.3.2 minimum, although functionality is disabled below PHP 5.4.0. Using the latest PHP version is highly recommended.
+
+## Basic Usage
+```php
+use Composer\XdebugHandler\XdebugHandler;
+
+$xdebug = new XdebugHandler('myapp');
+$xdebug->check();
+unset($xdebug);
+```
+
+The constructor takes a single parameter, `$envPrefix`, which is upper-cased and prepended to default base values to create two distinct environment variables. The above example enables the use of:
+
+- `MYAPP_ALLOW_XDEBUG=1` to override automatic restart and allow Xdebug
+- `MYAPP_ORIGINAL_INIS` to obtain ini file locations in a restarted process
+
+## Advanced Usage
+
+* [How it works](#how-it-works)
+* [Limitations](#limitations)
+* [Helper methods](#helper-methods)
+* [Setter methods](#setter-methods)
+* [Process configuration](#process-configuration)
+* [Troubleshooting](#troubleshooting)
+* [Extending the library](#extending-the-library)
+
+### How it works
+
+A temporary ini file is created from the loaded (and scanned) ini files, with any references to the Xdebug extension commented out. Current ini settings are merged, so that most ini settings made on the command-line or by the application are included (see [Limitations](#limitations))
+
+* `MYAPP_ALLOW_XDEBUG` is set with internal data to flag and use in the restart.
+* The command-line and environment are [configured](#process-configuration) for the restart.
+* The application is restarted in a new process.
+ * The restart settings are stored in the environment.
+ * `MYAPP_ALLOW_XDEBUG` is unset.
+ * The application runs and exits.
+* The main process exits with the exit code from the restarted process.
+
+#### Signal handling
+From PHP 7.1 with the pcntl extension loaded, asynchronous signal handling is automatically enabled. `SIGINT` is set to `SIG_IGN` in the parent
+process and restored to `SIG_DFL` in the restarted process (if no other handler has been set).
+
+From PHP 7.4 on Windows, `CTRL+C` and `CTRL+BREAK` handling is ignored in the parent process and automatically enabled in the restarted process.
+
+### Limitations
+There are a few things to be aware of when running inside a restarted process.
+
+* Extensions set on the command-line will not be loaded.
+* Ini file locations will be reported as per the restart - see [getAllIniFiles()](#getallinifiles).
+* Php sub-processes may be loaded with Xdebug enabled - see [Process configuration](#process-configuration).
+
+### Helper methods
+These static methods provide information from the current process, regardless of whether it has been restarted or not.
+
+#### _getAllIniFiles()_
+Returns an array of the original ini file locations. Use this instead of calling `php_ini_loaded_file` and `php_ini_scanned_files`, which will report the wrong values in a restarted process.
+
+```php
+use Composer\XdebugHandler\XdebugHandler;
+
+$files = XdebugHandler::getAllIniFiles();
+
+# $files[0] always exists, it could be an empty string
+$loadedIni = array_shift($files);
+$scannedInis = $files;
+```
+
+These locations are also available in the `MYAPP_ORIGINAL_INIS` environment variable. This is a path-separated string comprising the location returned from `php_ini_loaded_file`, which could be empty, followed by locations parsed from calling `php_ini_scanned_files`.
+
+#### _getRestartSettings()_
+Returns an array of settings that can be used with PHP [sub-processes](#sub-processes), or null if the process was not restarted.
+
+```php
+use Composer\XdebugHandler\XdebugHandler;
+
+$settings = XdebugHandler::getRestartSettings();
+/**
+ * $settings: array (if the current process was restarted,
+ * or called with the settings from a previous restart), or null
+ *
+ * 'tmpIni' => the temporary ini file used in the restart (string)
+ * 'scannedInis' => if there were any scanned inis (bool)
+ * 'scanDir' => the original PHP_INI_SCAN_DIR value (false|string)
+ * 'phprc' => the original PHPRC value (false|string)
+ * 'inis' => the original inis from getAllIniFiles (array)
+ * 'skipped' => the skipped version from getSkippedVersion (string)
+ */
+```
+
+#### _getSkippedVersion()_
+Returns the Xdebug version string that was skipped by the restart, or an empty value if there was no restart (or Xdebug is still loaded, perhaps by an extending class restarting for a reason other than removing Xdebug).
+
+```php
+use Composer\XdebugHandler\XdebugHandler;
+
+$version = XdebugHandler::getSkippedVersion();
+# $version: '2.6.0' (for example), or an empty string
+```
+
+#### _isXdebugActive()_
+Returns true if Xdebug is loaded and is running in an active mode (if it supports modes). Returns false if Xdebug is not loaded, or it is running with `xdebug.mode=off`.
+
+### Setter methods
+These methods implement a fluent interface and must be called before the main `check()` method.
+
+#### _setLogger($logger)_
+Enables the output of status messages to an external PSR3 logger. All messages are reported with either `DEBUG` or `WARNING` log levels. For example (showing the level and message):
+
+```
+// Restart overridden
+DEBUG Checking MYAPP_ALLOW_XDEBUG
+DEBUG The Xdebug extension is loaded (2.5.0)
+DEBUG No restart (MYAPP_ALLOW_XDEBUG=1)
+
+// Failed restart
+DEBUG Checking MYAPP_ALLOW_XDEBUG
+DEBUG The Xdebug extension is loaded (2.5.0)
+WARNING No restart (Unable to create temp ini file at: ...)
+```
+
+Status messages can also be output with `XDEBUG_HANDLER_DEBUG`. See [Troubleshooting](#troubleshooting).
+
+#### _setMainScript($script)_
+Sets the location of the main script to run in the restart. This is only needed in more esoteric use-cases, or if the `argv[0]` location is inaccessible. The script name `--` is supported for standard input.
+
+#### _setPersistent()_
+Configures the restart using [persistent settings](#persistent-settings), so that Xdebug is not loaded in any sub-process.
+
+Use this method if your application invokes one or more PHP sub-process and the Xdebug extension is not needed. This avoids the overhead of implementing specific [sub-process](#sub-processes) strategies.
+
+Alternatively, this method can be used to set up a default _Xdebug-free_ environment which can be changed if a sub-process requires Xdebug, then restored afterwards:
+
+```php
+function SubProcessWithXdebug()
+{
+ $phpConfig = new Composer\XdebugHandler\PhpConfig();
+
+ # Set the environment to the original configuration
+ $phpConfig->useOriginal();
+
+ # run the process with Xdebug loaded
+ ...
+
+ # Restore Xdebug-free environment
+ $phpConfig->usePersistent();
+}
+```
+
+### Process configuration
+The library offers two strategies to invoke a new PHP process without loading Xdebug, using either _standard_ or _persistent_ settings. Note that this is only important if the application calls a PHP sub-process.
+
+#### Standard settings
+Uses command-line options to remove Xdebug from the new process only.
+
+* The -n option is added to the command-line. This tells PHP not to scan for additional inis.
+* The temporary ini is added to the command-line with the -c option.
+
+>_If the new process calls a PHP sub-process, Xdebug will be loaded in that sub-process (unless it implements xdebug-handler, in which case there will be another restart)._
+
+This is the default strategy used in the restart.
+
+#### Persistent settings
+Uses environment variables to remove Xdebug from the new process and persist these settings to any sub-process.
+
+* `PHP_INI_SCAN_DIR` is set to an empty string. This tells PHP not to scan for additional inis.
+* `PHPRC` is set to the temporary ini.
+
+>_If the new process calls a PHP sub-process, Xdebug will not be loaded in that sub-process._
+
+This strategy can be used in the restart by calling [setPersistent()](#setpersistent).
+
+#### Sub-processes
+The `PhpConfig` helper class makes it easy to invoke a PHP sub-process (with or without Xdebug loaded), regardless of whether there has been a restart.
+
+Each of its methods returns an array of PHP options (to add to the command-line) and sets up the environment for the required strategy. The [getRestartSettings()](#getrestartsettings) method is used internally.
+
+* `useOriginal()` - Xdebug will be loaded in the new process.
+* `useStandard()` - Xdebug will **not** be loaded in the new process - see [standard settings](#standard-settings).
+* `userPersistent()` - Xdebug will **not** be loaded in the new process - see [persistent settings](#persistent-settings)
+
+If there was no restart, an empty options array is returned and the environment is not changed.
+
+```php
+use Composer\XdebugHandler\PhpConfig;
+
+$config = new PhpConfig;
+
+$options = $config->useOriginal();
+# $options: empty array
+# environment: PHPRC and PHP_INI_SCAN_DIR set to original values
+
+$options = $config->useStandard();
+# $options: [-n, -c, tmpIni]
+# environment: PHPRC and PHP_INI_SCAN_DIR set to original values
+
+$options = $config->usePersistent();
+# $options: empty array
+# environment: PHPRC=tmpIni, PHP_INI_SCAN_DIR=''
+```
+
+### Troubleshooting
+The following environment settings can be used to troubleshoot unexpected behavior:
+
+* `XDEBUG_HANDLER_DEBUG=1` Outputs status messages to `STDERR`, if it is defined, irrespective of any PSR3 logger. Each message is prefixed `xdebug-handler[pid]`, where pid is the process identifier.
+
+* `XDEBUG_HANDLER_DEBUG=2` As above, but additionally saves the temporary ini file and reports its location in a status message.
+
+### Extending the library
+The API is defined by classes and their accessible elements that are not annotated as @internal. The main class has two protected methods that can be overridden to provide additional functionality:
+
+#### _requiresRestart($default)_
+By default the process will restart if Xdebug is loaded and not running with `xdebug.mode=off`. Extending this method allows an application to decide, by returning a boolean (or equivalent) value.
+It is only called if `MYAPP_ALLOW_XDEBUG` is empty, so it will not be called in the restarted process (where this variable contains internal data), or if the restart has been overridden.
+
+Note that the [setMainScript()](#setmainscriptscript) and [setPersistent()](#setpersistent) setters can be used here, if required.
+
+#### _restart($command)_
+An application can extend this to modify the temporary ini file, its location given in the `tmpIni` property. New settings can be safely appended to the end of the data, which is `PHP_EOL` terminated.
+
+The `$command` parameter is an array of unescaped command-line arguments that will be used for the new process.
+
+Remember to finish with `parent::restart($command)`.
+
+#### Example
+This example demonstrates two ways to extend basic functionality:
+
+* To avoid the overhead of spinning up a new process, the restart is skipped if a simple help command is requested.
+
+* The application needs write-access to phar files, so it will force a restart if `phar.readonly` is set (regardless of whether Xdebug is loaded) and change this value in the temporary ini file.
+
+```php
+use Composer\XdebugHandler\XdebugHandler;
+use MyApp\Command;
+
+class MyRestarter extends XdebugHandler
+{
+ private $required;
+
+ protected function requiresRestart($default)
+ {
+ if (Command::isHelp()) {
+ # No need to disable Xdebug for this
+ return false;
+ }
+
+ $this->required = (bool) ini_get('phar.readonly');
+ return $this->required || $default;
+ }
+
+ protected function restart($command)
+ {
+ if ($this->required) {
+ # Add required ini setting to tmpIni
+ $content = file_get_contents($this->tmpIni);
+ $content .= 'phar.readonly=0'.PHP_EOL;
+ file_put_contents($this->tmpIni, $content);
+ }
+
+ parent::restart($command);
+ }
+}
+```
+
+## License
+composer/xdebug-handler is licensed under the MIT License, see the LICENSE file for details.
diff --git a/vendor/composer/xdebug-handler/UPGRADE.md b/vendor/composer/xdebug-handler/UPGRADE.md
new file mode 100644
index 0000000..3d62e17
--- /dev/null
+++ b/vendor/composer/xdebug-handler/UPGRADE.md
@@ -0,0 +1,30 @@
+## Upgrading from 1.x
+
+The default behaviour has changed from always restarting if Xdebug is loaded, to only restarting if
+Xdebug is _active_. This has been introduced to support Xdebug3
+[modes](https://xdebug.org/docs/all_settings#mode). Xdebug is considered active if it is loaded, and
+for Xdebug3, if it is running in a mode other than `xdebug.mode=off`.
+
+* Break: removed optional `$colorOption` constructor param and passthru fallback.
+
+ Just use `new XdebugHandler('myapp')` to instantiate the class and color support will be
+detectable in the restarted process.
+
+* Added: `isXdebugActive()` method to determine if Xdebug is still running in the restart.
+
+ Returns true if Xdebug is loaded and is running in an active mode (if it supports modes).
+Returns false if Xdebug is not loaded, or it is running with `xdebug.mode=off`.
+
+### Extending classes
+
+* Break: renamed `requiresRestart` param from `$isLoaded` to `$default`.
+
+ This reflects the new default behaviour which is to restart only if Xdebug is active.
+
+* Break: changed `restart` param `$command` from a string to an array.
+
+ Only important if you modified the string. `$command` is now an array of unescaped arguments.
+
+* Added: Process utility class to the API.
+
+ This class was previously annotated as @internal and has been refactored due to recent changes.
diff --git a/vendor/composer/xdebug-handler/composer.json b/vendor/composer/xdebug-handler/composer.json
new file mode 100644
index 0000000..ccd33ef
--- /dev/null
+++ b/vendor/composer/xdebug-handler/composer.json
@@ -0,0 +1,44 @@
+{
+ "name": "composer/xdebug-handler",
+ "description": "Restarts a process without Xdebug.",
+ "type": "library",
+ "license": "MIT",
+ "keywords": [
+ "xdebug",
+ "performance"
+ ],
+ "authors": [
+ {
+ "name": "John Stevenson",
+ "email": "john-stevenson@blueyonder.co.uk"
+ }
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/xdebug-handler/issues"
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1 || ^2 || ^3",
+ "composer/pcre": "^1"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0",
+ "phpstan/phpstan": "^1.0",
+ "phpstan/phpstan-strict-rules": "^1.1"
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\Tests\\": "tests"
+ }
+ },
+ "scripts": {
+ "test": "vendor/bin/simple-phpunit",
+ "phpstan": "vendor/bin/phpstan analyse"
+ }
+}
diff --git a/vendor/composer/xdebug-handler/src/PhpConfig.php b/vendor/composer/xdebug-handler/src/PhpConfig.php
new file mode 100644
index 0000000..15c3d6f
--- /dev/null
+++ b/vendor/composer/xdebug-handler/src/PhpConfig.php
@@ -0,0 +1,92 @@
+<?php
+
+/*
+ * This file is part of composer/xdebug-handler.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\XdebugHandler;
+
+/**
+ * @author John Stevenson <john-stevenson@blueyonder.co.uk>
+ *
+ * @phpstan-type restartData array{tmpIni: string, scannedInis: bool, scanDir: false|string, phprc: false|string, inis: string[], skipped: string}
+ */
+class PhpConfig
+{
+ /**
+ * Use the original PHP configuration
+ *
+ * @return string[] Empty array of PHP cli options
+ */
+ public function useOriginal()
+ {
+ $this->getDataAndReset();
+ return array();
+ }
+
+ /**
+ * Use standard restart settings
+ *
+ * @return string[] PHP cli options
+ */
+ public function useStandard()
+ {
+ $data = $this->getDataAndReset();
+ if ($data !== null) {
+ return array('-n', '-c', $data['tmpIni']);
+ }
+
+ return array();
+ }
+
+ /**
+ * Use environment variables to persist settings
+ *
+ * @return string[] Empty array of PHP cli options
+ */
+ public function usePersistent()
+ {
+ $data = $this->getDataAndReset();
+ if ($data !== null) {
+ $this->updateEnv('PHPRC', $data['tmpIni']);
+ $this->updateEnv('PHP_INI_SCAN_DIR', '');
+ }
+
+ return array();
+ }
+
+ /**
+ * Returns restart data if available and resets the environment
+ *
+ * @return array|null
+ * @phpstan-return restartData|null
+ */
+ private function getDataAndReset()
+ {
+ $data = XdebugHandler::getRestartSettings();
+ if ($data !== null) {
+ $this->updateEnv('PHPRC', $data['phprc']);
+ $this->updateEnv('PHP_INI_SCAN_DIR', $data['scanDir']);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Updates a restart settings value in the environment
+ *
+ * @param string $name
+ * @param string|false $value
+ *
+ * @return void
+ */
+ private function updateEnv($name, $value)
+ {
+ Process::setEnv($name, false !== $value ? $value : null);
+ }
+}
diff --git a/vendor/composer/xdebug-handler/src/Process.php b/vendor/composer/xdebug-handler/src/Process.php
new file mode 100644
index 0000000..3167239
--- /dev/null
+++ b/vendor/composer/xdebug-handler/src/Process.php
@@ -0,0 +1,122 @@
+<?php
+
+/*
+ * This file is part of composer/xdebug-handler.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\XdebugHandler;
+
+use Composer\Pcre\Preg;
+
+/**
+ * Process utility functions
+ *
+ * @author John Stevenson <john-stevenson@blueyonder.co.uk>
+ */
+class Process
+{
+ /**
+ * Escapes a string to be used as a shell argument.
+ *
+ * From https://github.com/johnstevenson/winbox-args
+ * MIT Licensed (c) John Stevenson <john-stevenson@blueyonder.co.uk>
+ *
+ * @param string $arg The argument to be escaped
+ * @param bool $meta Additionally escape cmd.exe meta characters
+ * @param bool $module The argument is the module to invoke
+ *
+ * @return string The escaped argument
+ */
+ public static function escape($arg, $meta = true, $module = false)
+ {
+ if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
+ return "'".str_replace("'", "'\\''", $arg)."'";
+ }
+
+ $quote = strpbrk($arg, " \t") !== false || $arg === '';
+
+ $arg = Preg::replace('/(\\\\*)"/', '$1$1\\"', $arg, -1, $dquotes);
+
+ if ($meta) {
+ $meta = $dquotes || Preg::isMatch('/%[^%]+%/', $arg);
+
+ if (!$meta) {
+ $quote = $quote || strpbrk($arg, '^&|<>()') !== false;
+ } elseif ($module && !$dquotes && $quote) {
+ $meta = false;
+ }
+ }
+
+ if ($quote) {
+ $arg = '"'.(Preg::replace('/(\\\\*)$/', '$1$1', $arg)).'"';
+ }
+
+ if ($meta) {
+ $arg = Preg::replace('/(["^&|<>()%])/', '^$1', $arg);
+ }
+
+ return $arg;
+ }
+
+ /**
+ * Escapes an array of arguments that make up a shell command
+ *
+ * @param string[] $args Argument list, with the module name first
+ *
+ * @return string The escaped command line
+ */
+ public static function escapeShellCommand(array $args)
+ {
+ $command = '';
+ $module = array_shift($args);
+
+ if ($module !== null) {
+ $command = self::escape($module, true, true);
+
+ foreach ($args as $arg) {
+ $command .= ' '.self::escape($arg);
+ }
+ }
+
+ return $command;
+ }
+
+ /**
+ * Makes putenv environment changes available in $_SERVER and $_ENV
+ *
+ * @param string $name
+ * @param string|null $value A null value unsets the variable
+ *
+ * @return bool Whether the environment variable was set
+ */
+ public static function setEnv($name, $value = null)
+ {
+ $unset = null === $value;
+
+ if (!putenv($unset ? $name : $name.'='.$value)) {
+ return false;
+ }
+
+ if ($unset) {
+ unset($_SERVER[$name]);
+ } else {
+ $_SERVER[$name] = $value;
+ }
+
+ // Update $_ENV if it is being used
+ if (false !== stripos((string) ini_get('variables_order'), 'E')) {
+ if ($unset) {
+ unset($_ENV[$name]);
+ } else {
+ $_ENV[$name] = $value;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/composer/xdebug-handler/src/Status.php b/vendor/composer/xdebug-handler/src/Status.php
new file mode 100644
index 0000000..b7aad7b
--- /dev/null
+++ b/vendor/composer/xdebug-handler/src/Status.php
@@ -0,0 +1,224 @@
+<?php
+
+/*
+ * This file is part of composer/xdebug-handler.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\XdebugHandler;
+
+use Psr\Log\LoggerInterface;
+use Psr\Log\LogLevel;
+
+/**
+ * @author John Stevenson <john-stevenson@blueyonder.co.uk>
+ * @internal
+ */
+class Status
+{
+ const ENV_RESTART = 'XDEBUG_HANDLER_RESTART';
+ const CHECK = 'Check';
+ const ERROR = 'Error';
+ const INFO = 'Info';
+ const NORESTART = 'NoRestart';
+ const RESTART = 'Restart';
+ const RESTARTING = 'Restarting';
+ const RESTARTED = 'Restarted';
+
+ /** @var bool */
+ private $debug;
+
+ /** @var string */
+ private $envAllowXdebug;
+
+ /** @var string|null */
+ private $loaded;
+
+ /** @var LoggerInterface|null */
+ private $logger;
+
+ /** @var bool */
+ private $modeOff;
+
+ /** @var float */
+ private $time;
+
+ /**
+ * Constructor
+ *
+ * @param string $envAllowXdebug Prefixed _ALLOW_XDEBUG name
+ * @param bool $debug Whether debug output is required
+ */
+ public function __construct($envAllowXdebug, $debug)
+ {
+ $start = getenv(self::ENV_RESTART);
+ Process::setEnv(self::ENV_RESTART);
+ $this->time = is_numeric($start) ? round((microtime(true) - $start) * 1000) : 0;
+
+ $this->envAllowXdebug = $envAllowXdebug;
+ $this->debug = $debug && defined('STDERR');
+ $this->modeOff = false;
+ }
+
+ /**
+ * @param LoggerInterface $logger
+ *
+ * @return void
+ */
+ public function setLogger(LoggerInterface $logger)
+ {
+ $this->logger = $logger;
+ }
+
+ /**
+ * Calls a handler method to report a message
+ *
+ * @param string $op The handler constant
+ * @param null|string $data Data required by the handler
+ *
+ * @return void
+ * @throws \InvalidArgumentException If $op is not known
+ */
+ public function report($op, $data)
+ {
+ if ($this->logger !== null || $this->debug) {
+ $callable = array($this, 'report'.$op);
+
+ if (!is_callable($callable)) {
+ throw new \InvalidArgumentException('Unknown op handler: '.$op);
+ }
+
+ $params = $data !== null ? $data : array();
+ call_user_func_array($callable, array($params));
+ }
+ }
+
+ /**
+ * Outputs a status message
+ *
+ * @param string $text
+ * @param string $level
+ *
+ * @return void
+ */
+ private function output($text, $level = null)
+ {
+ if ($this->logger !== null) {
+ $this->logger->log($level !== null ? $level: LogLevel::DEBUG, $text);
+ }
+
+ if ($this->debug) {
+ fwrite(STDERR, sprintf('xdebug-handler[%d] %s', getmypid(), $text.PHP_EOL));
+ }
+ }
+
+ /**
+ * @param string $loaded
+ *
+ * @return void
+ */
+ private function reportCheck($loaded)
+ {
+ list($version, $mode) = explode('|', $loaded);
+
+ if ($version !== '') {
+ $this->loaded = '('.$version.')'.($mode !== '' ? ' mode='.$mode : '');
+ }
+ $this->modeOff = $mode === 'off';
+ $this->output('Checking '.$this->envAllowXdebug);
+ }
+
+ /**
+ * @param string $error
+ *
+ * @return void
+ */
+ private function reportError($error)
+ {
+ $this->output(sprintf('No restart (%s)', $error), LogLevel::WARNING);
+ }
+
+ /**
+ * @param string $info
+ *
+ * @return void
+ */
+ private function reportInfo($info)
+ {
+ $this->output($info);
+ }
+
+ /**
+ * @return void
+ */
+ private function reportNoRestart()
+ {
+ $this->output($this->getLoadedMessage());
+
+ if ($this->loaded !== null) {
+ $text = sprintf('No restart (%s)', $this->getEnvAllow());
+ if (!((bool) getenv($this->envAllowXdebug))) {
+ $text .= ' Allowed by '.($this->modeOff ? 'mode' : 'application');
+ }
+ $this->output($text);
+ }
+ }
+
+ /**
+ * @return void
+ */
+ private function reportRestart()
+ {
+ $this->output($this->getLoadedMessage());
+ Process::setEnv(self::ENV_RESTART, (string) microtime(true));
+ }
+
+ /**
+ * @return void
+ */
+ private function reportRestarted()
+ {
+ $loaded = $this->getLoadedMessage();
+ $text = sprintf('Restarted (%d ms). %s', $this->time, $loaded);
+ $level = $this->loaded !== null ? LogLevel::WARNING : null;
+ $this->output($text, $level);
+ }
+
+ /**
+ * @param string $command
+ *
+ * @return void
+ */
+ private function reportRestarting($command)
+ {
+ $text = sprintf('Process restarting (%s)', $this->getEnvAllow());
+ $this->output($text);
+ $text = 'Running '.$command;
+ $this->output($text);
+ }
+
+ /**
+ * Returns the _ALLOW_XDEBUG environment variable as name=value
+ *
+ * @return string
+ */
+ private function getEnvAllow()
+ {
+ return $this->envAllowXdebug.'='.getenv($this->envAllowXdebug);
+ }
+
+ /**
+ * Returns the Xdebug status and version
+ *
+ * @return string
+ */
+ private function getLoadedMessage()
+ {
+ $loaded = $this->loaded !== null ? sprintf('loaded %s', $this->loaded) : 'not loaded';
+ return 'The Xdebug extension is '.$loaded;
+ }
+}
diff --git a/vendor/composer/xdebug-handler/src/XdebugHandler.php b/vendor/composer/xdebug-handler/src/XdebugHandler.php
new file mode 100644
index 0000000..413a2fa
--- /dev/null
+++ b/vendor/composer/xdebug-handler/src/XdebugHandler.php
@@ -0,0 +1,745 @@
+<?php
+
+/*
+ * This file is part of composer/xdebug-handler.
+ *
+ * (c) Composer <https://github.com/composer>
+ *
+ * For the full copyright and license information, please view
+ * the LICENSE file that was distributed with this source code.
+ */
+
+namespace Composer\XdebugHandler;
+
+use Composer\Pcre\Preg;
+use Psr\Log\LoggerInterface;
+
+/**
+ * @author John Stevenson <john-stevenson@blueyonder.co.uk>
+ *
+ * @phpstan-import-type restartData from PhpConfig
+ */
+class XdebugHandler
+{
+ const SUFFIX_ALLOW = '_ALLOW_XDEBUG';
+ const SUFFIX_INIS = '_ORIGINAL_INIS';
+ const RESTART_ID = 'internal';
+ const RESTART_SETTINGS = 'XDEBUG_HANDLER_SETTINGS';
+ const DEBUG = 'XDEBUG_HANDLER_DEBUG';
+
+ /** @var string|null */
+ protected $tmpIni;
+
+ /** @var bool */
+ private static $inRestart;
+
+ /** @var string */
+ private static $name;
+
+ /** @var string|null */
+ private static $skipped;
+
+ /** @var bool */
+ private static $xdebugActive;
+
+ /** @var string|null */
+ private static $xdebugMode;
+
+ /** @var string|null */
+ private static $xdebugVersion;
+
+ /** @var bool */
+ private $cli;
+
+ /** @var string|null */
+ private $debug;
+
+ /** @var string */
+ private $envAllowXdebug;
+
+ /** @var string */
+ private $envOriginalInis;
+
+ /** @var bool */
+ private $persistent;
+
+ /** @var string|null */
+ private $script;
+
+ /** @var Status */
+ private $statusWriter;
+
+ /**
+ * Constructor
+ *
+ * The $envPrefix is used to create distinct environment variables. It is
+ * uppercased and prepended to the default base values. For example 'myapp'
+ * would result in MYAPP_ALLOW_XDEBUG and MYAPP_ORIGINAL_INIS.
+ *
+ * @param string $envPrefix Value used in environment variables
+ * @throws \RuntimeException If the parameter is invalid
+ */
+ public function __construct($envPrefix)
+ {
+ if (!is_string($envPrefix) || $envPrefix === '') {
+ throw new \RuntimeException('Invalid constructor parameter');
+ }
+
+ self::$name = strtoupper($envPrefix);
+ $this->envAllowXdebug = self::$name.self::SUFFIX_ALLOW;
+ $this->envOriginalInis = self::$name.self::SUFFIX_INIS;
+
+ self::setXdebugDetails();
+ self::$inRestart = false;
+
+ if ($this->cli = PHP_SAPI === 'cli') {
+ $this->debug = (string) getenv(self::DEBUG);
+ }
+
+ $this->statusWriter = new Status($this->envAllowXdebug, (bool) $this->debug);
+ }
+
+ /**
+ * Activates status message output to a PSR3 logger
+ *
+ * @param LoggerInterface $logger
+ *
+ * @return $this
+ */
+ public function setLogger(LoggerInterface $logger)
+ {
+ $this->statusWriter->setLogger($logger);
+ return $this;
+ }
+
+ /**
+ * Sets the main script location if it cannot be called from argv
+ *
+ * @param string $script
+ *
+ * @return $this
+ */
+ public function setMainScript($script)
+ {
+ $this->script = $script;
+ return $this;
+ }
+
+ /**
+ * Persist the settings to keep Xdebug out of sub-processes
+ *
+ * @return $this
+ */
+ public function setPersistent()
+ {
+ $this->persistent = true;
+ return $this;
+ }
+
+ /**
+ * Checks if Xdebug is loaded and the process needs to be restarted
+ *
+ * This behaviour can be disabled by setting the MYAPP_ALLOW_XDEBUG
+ * environment variable to 1. This variable is used internally so that
+ * the restarted process is created only once.
+ *
+ * @return void
+ */
+ public function check()
+ {
+ $this->notify(Status::CHECK, self::$xdebugVersion.'|'.self::$xdebugMode);
+ $envArgs = explode('|', (string) getenv($this->envAllowXdebug));
+
+ if (!((bool) $envArgs[0]) && $this->requiresRestart(self::$xdebugActive)) {
+ // Restart required
+ $this->notify(Status::RESTART);
+
+ if ($this->prepareRestart()) {
+ $command = $this->getCommand();
+ $this->restart($command);
+ }
+ return;
+ }
+
+ if (self::RESTART_ID === $envArgs[0] && count($envArgs) === 5) {
+ // Restarted, so unset environment variable and use saved values
+ $this->notify(Status::RESTARTED);
+
+ Process::setEnv($this->envAllowXdebug);
+ self::$inRestart = true;
+
+ if (self::$xdebugVersion === null) {
+ // Skipped version is only set if Xdebug is not loaded
+ self::$skipped = $envArgs[1];
+ }
+
+ $this->tryEnableSignals();
+
+ // Put restart settings in the environment
+ $this->setEnvRestartSettings($envArgs);
+ return;
+ }
+
+ $this->notify(Status::NORESTART);
+ $settings = self::getRestartSettings();
+
+ if ($settings !== null) {
+ // Called with existing settings, so sync our settings
+ $this->syncSettings($settings);
+ }
+ }
+
+ /**
+ * Returns an array of php.ini locations with at least one entry
+ *
+ * The equivalent of calling php_ini_loaded_file then php_ini_scanned_files.
+ * The loaded ini location is the first entry and may be empty.
+ *
+ * @return string[]
+ */
+ public static function getAllIniFiles()
+ {
+ if (self::$name !== null) {
+ $env = getenv(self::$name.self::SUFFIX_INIS);
+
+ if (false !== $env) {
+ return explode(PATH_SEPARATOR, $env);
+ }
+ }
+
+ $paths = array((string) php_ini_loaded_file());
+ $scanned = php_ini_scanned_files();
+
+ if ($scanned !== false) {
+ $paths = array_merge($paths, array_map('trim', explode(',', $scanned)));
+ }
+
+ return $paths;
+ }
+
+ /**
+ * Returns an array of restart settings or null
+ *
+ * Settings will be available if the current process was restarted, or
+ * called with the settings from an existing restart.
+ *
+ * @return array|null
+ * @phpstan-return restartData|null
+ */
+ public static function getRestartSettings()
+ {
+ $envArgs = explode('|', (string) getenv(self::RESTART_SETTINGS));
+
+ if (count($envArgs) !== 6
+ || (!self::$inRestart && php_ini_loaded_file() !== $envArgs[0])) {
+ return null;
+ }
+
+ return array(
+ 'tmpIni' => $envArgs[0],
+ 'scannedInis' => (bool) $envArgs[1],
+ 'scanDir' => '*' === $envArgs[2] ? false : $envArgs[2],
+ 'phprc' => '*' === $envArgs[3] ? false : $envArgs[3],
+ 'inis' => explode(PATH_SEPARATOR, $envArgs[4]),
+ 'skipped' => $envArgs[5],
+ );
+ }
+
+ /**
+ * Returns the Xdebug version that triggered a successful restart
+ *
+ * @return string
+ */
+ public static function getSkippedVersion()
+ {
+ return (string) self::$skipped;
+ }
+
+ /**
+ * Returns whether Xdebug is loaded and active
+ *
+ * true: if Xdebug is loaded and is running in an active mode.
+ * false: if Xdebug is not loaded, or it is running with xdebug.mode=off.
+ *
+ * @return bool
+ */
+ public static function isXdebugActive()
+ {
+ self::setXdebugDetails();
+ return self::$xdebugActive;
+ }
+
+ /**
+ * Allows an extending class to decide if there should be a restart
+ *
+ * The default is to restart if Xdebug is loaded and its mode is not "off".
+ * Do not typehint for 1.x compatibility.
+ *
+ * @param bool $default The default behaviour
+ *
+ * @return bool Whether the process should restart
+ */
+ protected function requiresRestart($default)
+ {
+ return $default;
+ }
+
+ /**
+ * Allows an extending class to access the tmpIni
+ *
+ * Do not typehint for 1.x compatibility
+ *
+ * @param string[] $command
+ *
+ * @return void
+ */
+ protected function restart($command)
+ {
+ $this->doRestart($command);
+ }
+
+ /**
+ * Executes the restarted command then deletes the tmp ini
+ *
+ * @param string[] $command
+ *
+ * @return void
+ * @phpstan-return never
+ */
+ private function doRestart(array $command)
+ {
+ $this->tryEnableSignals();
+ $this->notify(Status::RESTARTING, implode(' ', $command));
+
+ if (PHP_VERSION_ID >= 70400) {
+ $cmd = $command;
+ } else {
+ $cmd = Process::escapeShellCommand($command);
+ if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+ // Outer quotes required on cmd string below PHP 8
+ $cmd = '"'.$cmd.'"';
+ }
+ }
+
+ $process = proc_open($cmd, array(), $pipes);
+ if (is_resource($process)) {
+ $exitCode = proc_close($process);
+ }
+
+ if (!isset($exitCode)) {
+ // Unlikely that php or the default shell cannot be invoked
+ $this->notify(Status::ERROR, 'Unable to restart process');
+ $exitCode = -1;
+ } else {
+ $this->notify(Status::INFO, 'Restarted process exited '.$exitCode);
+ }
+
+ if ($this->debug === '2') {
+ $this->notify(Status::INFO, 'Temp ini saved: '.$this->tmpIni);
+ } else {
+ @unlink((string) $this->tmpIni);
+ }
+
+ exit($exitCode);
+ }
+
+ /**
+ * Returns true if everything was written for the restart
+ *
+ * If any of the following fails (however unlikely) we must return false to
+ * stop potential recursion:
+ * - tmp ini file creation
+ * - environment variable creation
+ *
+ * @return bool
+ */
+ private function prepareRestart()
+ {
+ $error = null;
+ $iniFiles = self::getAllIniFiles();
+ $scannedInis = count($iniFiles) > 1;
+ $tmpDir = sys_get_temp_dir();
+
+ if (!$this->cli) {
+ $error = 'Unsupported SAPI: '.PHP_SAPI;
+ } elseif (!defined('PHP_BINARY')) {
+ $error = 'PHP version is too old: '.PHP_VERSION;
+ } elseif (!$this->checkConfiguration($info)) {
+ $error = $info;
+ } elseif (!$this->checkScanDirConfig()) {
+ $error = 'PHP version does not report scanned inis: '.PHP_VERSION;
+ } elseif (!$this->checkMainScript()) {
+ $error = 'Unable to access main script: '.$this->script;
+ } elseif (!$this->writeTmpIni($iniFiles, $tmpDir, $error)) {
+ $error = $error !== null ? $error : 'Unable to create temp ini file at: '.$tmpDir;
+ } elseif (!$this->setEnvironment($scannedInis, $iniFiles)) {
+ $error = 'Unable to set environment variables';
+ }
+
+ if ($error !== null) {
+ $this->notify(Status::ERROR, $error);
+ }
+
+ return $error === null;
+ }
+
+ /**
+ * Returns true if the tmp ini file was written
+ *
+ * @param string[] $iniFiles All ini files used in the current process
+ * @param string $tmpDir The system temporary directory
+ * @param null|string $error Set by method if ini file cannot be read
+ *
+ * @return bool
+ */
+ private function writeTmpIni(array $iniFiles, $tmpDir, &$error)
+ {
+ if (($tmpfile = @tempnam($tmpDir, '')) === false) {
+ return false;
+ }
+
+ $this->tmpIni = $tmpfile;
+
+ // $iniFiles has at least one item and it may be empty
+ if ($iniFiles[0] === '') {
+ array_shift($iniFiles);
+ }
+
+ $content = '';
+ $sectionRegex = '/^\s*\[(?:PATH|HOST)\s*=/mi';
+ $xdebugRegex = '/^\s*(zend_extension\s*=.*xdebug.*)$/mi';
+
+ foreach ($iniFiles as $file) {
+ // Check for inaccessible ini files
+ if (($data = @file_get_contents($file)) === false) {
+ $error = 'Unable to read ini: '.$file;
+ return false;
+ }
+ // Check and remove directives after HOST and PATH sections
+ if (Preg::isMatchWithOffsets($sectionRegex, $data, $matches, PREG_OFFSET_CAPTURE)) {
+ $data = substr($data, 0, $matches[0][1]);
+ }
+ $content .= Preg::replace($xdebugRegex, ';$1', $data).PHP_EOL;
+ }
+
+ // Merge loaded settings into our ini content, if it is valid
+ $config = parse_ini_string($content);
+ $loaded = ini_get_all(null, false);
+
+ if (false === $config || false === $loaded) {
+ $error = 'Unable to parse ini data';
+ return false;
+ }
+
+ $content .= $this->mergeLoadedConfig($loaded, $config);
+
+ // Work-around for https://bugs.php.net/bug.php?id=75932
+ $content .= 'opcache.enable_cli=0'.PHP_EOL;
+
+ return (bool) @file_put_contents($this->tmpIni, $content);
+ }
+
+ /**
+ * Returns the command line arguments for the restart
+ *
+ * @return string[]
+ */
+ private function getCommand()
+ {
+ $php = array(PHP_BINARY);
+ $args = array_slice($_SERVER['argv'], 1);
+
+ if (!$this->persistent) {
+ // Use command-line options
+ array_push($php, '-n', '-c', $this->tmpIni);
+ }
+
+ return array_merge($php, array($this->script), $args);
+ }
+
+ /**
+ * Returns true if the restart environment variables were set
+ *
+ * No need to update $_SERVER since this is set in the restarted process.
+ *
+ * @param bool $scannedInis Whether there were scanned ini files
+ * @param string[] $iniFiles All ini files used in the current process
+ *
+ * @return bool
+ */
+ private function setEnvironment($scannedInis, array $iniFiles)
+ {
+ $scanDir = getenv('PHP_INI_SCAN_DIR');
+ $phprc = getenv('PHPRC');
+
+ // Make original inis available to restarted process
+ if (!putenv($this->envOriginalInis.'='.implode(PATH_SEPARATOR, $iniFiles))) {
+ return false;
+ }
+
+ if ($this->persistent) {
+ // Use the environment to persist the settings
+ if (!putenv('PHP_INI_SCAN_DIR=') || !putenv('PHPRC='.$this->tmpIni)) {
+ return false;
+ }
+ }
+
+ // Flag restarted process and save values for it to use
+ $envArgs = array(
+ self::RESTART_ID,
+ self::$xdebugVersion,
+ (int) $scannedInis,
+ false === $scanDir ? '*' : $scanDir,
+ false === $phprc ? '*' : $phprc,
+ );
+
+ return putenv($this->envAllowXdebug.'='.implode('|', $envArgs));
+ }
+
+ /**
+ * Logs status messages
+ *
+ * @param string $op Status handler constant
+ * @param null|string $data Optional data
+ *
+ * @return void
+ */
+ private function notify($op, $data = null)
+ {
+ $this->statusWriter->report($op, $data);
+ }
+
+ /**
+ * Returns default, changed and command-line ini settings
+ *
+ * @param mixed[] $loadedConfig All current ini settings
+ * @param mixed[] $iniConfig Settings from user ini files
+ *
+ * @return string
+ */
+ private function mergeLoadedConfig(array $loadedConfig, array $iniConfig)
+ {
+ $content = '';
+
+ foreach ($loadedConfig as $name => $value) {
+ // Value will either be null, string or array (HHVM only)
+ if (!is_string($value)
+ || strpos($name, 'xdebug') === 0
+ || $name === 'apc.mmap_file_mask') {
+ continue;
+ }
+
+ if (!isset($iniConfig[$name]) || $iniConfig[$name] !== $value) {
+ // Double-quote escape each value
+ $content .= $name.'="'.addcslashes($value, '\\"').'"'.PHP_EOL;
+ }
+ }
+
+ return $content;
+ }
+
+ /**
+ * Returns true if the script name can be used
+ *
+ * @return bool
+ */
+ private function checkMainScript()
+ {
+ if (null !== $this->script) {
+ // Allow an application to set -- for standard input
+ return file_exists($this->script) || '--' === $this->script;
+ }
+
+ if (file_exists($this->script = $_SERVER['argv'][0])) {
+ return true;
+ }
+
+ // Use a backtrace to resolve Phar and chdir issues.
+ $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+ $main = end($trace);
+
+ if ($main !== false && isset($main['file'])) {
+ return file_exists($this->script = $main['file']);
+ }
+
+ return false;
+ }
+
+ /**
+ * Adds restart settings to the environment
+ *
+ * @param string[] $envArgs
+ *
+ * @return void
+ */
+ private function setEnvRestartSettings($envArgs)
+ {
+ $settings = array(
+ php_ini_loaded_file(),
+ $envArgs[2],
+ $envArgs[3],
+ $envArgs[4],
+ getenv($this->envOriginalInis),
+ self::$skipped,
+ );
+
+ Process::setEnv(self::RESTART_SETTINGS, implode('|', $settings));
+ }
+
+ /**
+ * Syncs settings and the environment if called with existing settings
+ *
+ * @param array $settings
+ * @phpstan-param restartData $settings
+ *
+ * @return void
+ */
+ private function syncSettings(array $settings)
+ {
+ if (false === getenv($this->envOriginalInis)) {
+ // Called by another app, so make original inis available
+ Process::setEnv($this->envOriginalInis, implode(PATH_SEPARATOR, $settings['inis']));
+ }
+
+ self::$skipped = $settings['skipped'];
+ $this->notify(Status::INFO, 'Process called with existing restart settings');
+ }
+
+ /**
+ * Returns true if there are scanned inis and PHP is able to report them
+ *
+ * php_ini_scanned_files will fail when PHP_CONFIG_FILE_SCAN_DIR is empty.
+ * Fixed in 7.1.13 and 7.2.1
+ *
+ * @return bool
+ */
+ private function checkScanDirConfig()
+ {
+ if (PHP_VERSION_ID >= 70113 && PHP_VERSION_ID !== 70200) {
+ return true;
+ }
+
+ return ((string) getenv('PHP_INI_SCAN_DIR') === '')
+ || PHP_CONFIG_FILE_SCAN_DIR !== '';
+ }
+
+ /**
+ * Returns true if there are no known configuration issues
+ *
+ * @param string $info Set by method
+ * @return bool
+ */
+ private function checkConfiguration(&$info)
+ {
+ if (!function_exists('proc_open')) {
+ $info = 'proc_open function is disabled';
+ return false;
+ }
+
+ if (extension_loaded('uopz') && !((bool) ini_get('uopz.disable'))) {
+ // uopz works at opcode level and disables exit calls
+ if (function_exists('uopz_allow_exit')) {
+ @uopz_allow_exit(true);
+ } else {
+ $info = 'uopz extension is not compatible';
+ return false;
+ }
+ }
+
+ // Check UNC paths when using cmd.exe
+ if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 70400) {
+ $workingDir = getcwd();
+
+ if ($workingDir === false) {
+ $info = 'unable to determine working directory';
+ return false;
+ }
+
+ if (0 === strpos($workingDir, '\\\\')) {
+ $info = 'cmd.exe does not support UNC paths: '.$workingDir;
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Enables async signals and control interrupts in the restarted process
+ *
+ * Available on Unix PHP 7.1+ with the pcntl extension and Windows PHP 7.4+.
+ *
+ * @return void
+ */
+ private function tryEnableSignals()
+ {
+ if (function_exists('pcntl_async_signals') && function_exists('pcntl_signal')) {
+ pcntl_async_signals(true);
+ $message = 'Async signals enabled';
+
+ if (!self::$inRestart) {
+ // Restarting, so ignore SIGINT in parent
+ pcntl_signal(SIGINT, SIG_IGN);
+ } elseif (is_int(pcntl_signal_get_handler(SIGINT))) {
+ // Restarted, no handler set so force default action
+ pcntl_signal(SIGINT, SIG_DFL);
+ }
+ }
+
+ if (!self::$inRestart && function_exists('sapi_windows_set_ctrl_handler')) {
+ // Restarting, so set a handler to ignore CTRL events in the parent.
+ // This ensures that CTRL+C events will be available in the child
+ // process without having to enable them there, which is unreliable.
+ sapi_windows_set_ctrl_handler(function ($evt) {});
+ }
+ }
+
+ /**
+ * Sets static properties $xdebugActive, $xdebugVersion and $xdebugMode
+ *
+ * @return void
+ */
+ private static function setXdebugDetails()
+ {
+ if (self::$xdebugActive !== null) {
+ return;
+ }
+
+ self::$xdebugActive = false;
+ if (!extension_loaded('xdebug')) {
+ return;
+ }
+
+ $version = phpversion('xdebug');
+ self::$xdebugVersion = $version !== false ? $version : 'unknown';
+
+ if (version_compare(self::$xdebugVersion, '3.1', '>=')) {
+ $modes = xdebug_info('mode');
+ self::$xdebugMode = count($modes) === 0 ? 'off' : implode(',', $modes);
+ self::$xdebugActive = self::$xdebugMode !== 'off';
+ return;
+ }
+
+ // See if xdebug.mode is supported in this version
+ $iniMode = ini_get('xdebug.mode');
+ if ($iniMode === false) {
+ self::$xdebugActive = true;
+ return;
+ }
+
+ // Environment value wins but cannot be empty
+ $envMode = (string) getenv('XDEBUG_MODE');
+ if ($envMode !== '') {
+ self::$xdebugMode = $envMode;
+ } else {
+ self::$xdebugMode = $iniMode !== '' ? $iniMode : 'off';
+ }
+
+ // An empty comma-separated list is treated as mode 'off'
+ if (Preg::isMatch('/^,+$/', str_replace(' ', '', self::$xdebugMode))) {
+ self::$xdebugMode = 'off';
+ }
+
+ self::$xdebugActive = self::$xdebugMode !== 'off';
+ }
+}
diff --git a/vendor/doctrine/annotations/LICENSE b/vendor/doctrine/annotations/LICENSE
new file mode 100644
index 0000000..5e781fc
--- /dev/null
+++ b/vendor/doctrine/annotations/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2006-2013 Doctrine Project
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/doctrine/annotations/README.md b/vendor/doctrine/annotations/README.md
new file mode 100644
index 0000000..c2c7eb7
--- /dev/null
+++ b/vendor/doctrine/annotations/README.md
@@ -0,0 +1,18 @@
+# Doctrine Annotations
+
+[![Build Status](https://github.com/doctrine/annotations/workflows/Continuous%20Integration/badge.svg?label=build)](https://github.com/doctrine/persistence/actions)
+[![Dependency Status](https://www.versioneye.com/package/php--doctrine--annotations/badge.png)](https://www.versioneye.com/package/php--doctrine--annotations)
+[![Reference Status](https://www.versioneye.com/php/doctrine:annotations/reference_badge.svg)](https://www.versioneye.com/php/doctrine:annotations/references)
+[![Total Downloads](https://poser.pugx.org/doctrine/annotations/downloads.png)](https://packagist.org/packages/doctrine/annotations)
+[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/annotations.svg?label=stable)](https://packagist.org/packages/doctrine/annotations)
+
+Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)).
+
+## Documentation
+
+See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html).
+
+## Contributing
+
+When making a pull request, make sure your changes follow the
+[Coding Standard Guidelines](https://www.doctrine-project.org/projects/doctrine-coding-standard/en/current/reference/index.html#introduction).
diff --git a/vendor/doctrine/annotations/composer.json b/vendor/doctrine/annotations/composer.json
new file mode 100644
index 0000000..b4dfbd3
--- /dev/null
+++ b/vendor/doctrine/annotations/composer.json
@@ -0,0 +1,69 @@
+{
+ "name": "doctrine/annotations",
+ "description": "Docblock Annotations Parser",
+ "license": "MIT",
+ "type": "library",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "parser"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "homepage": "https://www.doctrine-project.org/projects/annotations.html",
+ "require": {
+ "php": "^7.1 || ^8.0",
+ "ext-tokenizer": "*",
+ "doctrine/lexer": "1.*",
+ "psr/cache": "^1 || ^2 || ^3"
+ },
+ "require-dev": {
+ "doctrine/cache": "^1.11 || ^2.0",
+ "doctrine/coding-standard": "^6.0 || ^8.1",
+ "phpstan/phpstan": "^1.4.10 || ^1.8.0",
+ "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
+ "symfony/cache": "^4.4 || ^5.2",
+ "vimeo/psalm": "^4.10"
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Doctrine\\Performance\\Common\\Annotations\\": "tests/Doctrine/Performance/Common/Annotations",
+ "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations"
+ },
+ "files": [
+ "tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php",
+ "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php"
+ ]
+ },
+ "config": {
+ "allow-plugins": {
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ },
+ "sort-packages": true
+ }
+}
diff --git a/vendor/doctrine/annotations/docs/en/annotations.rst b/vendor/doctrine/annotations/docs/en/annotations.rst
new file mode 100644
index 0000000..2c3c428
--- /dev/null
+++ b/vendor/doctrine/annotations/docs/en/annotations.rst
@@ -0,0 +1,252 @@
+Handling Annotations
+====================
+
+There are several different approaches to handling annotations in PHP.
+Doctrine Annotations maps docblock annotations to PHP classes. Because
+not all docblock annotations are used for metadata purposes a filter is
+applied to ignore or skip classes that are not Doctrine annotations.
+
+Take a look at the following code snippet:
+
+.. code-block:: php
+
+ namespace MyProject\Entities;
+
+ use Doctrine\ORM\Mapping AS ORM;
+ use Symfony\Component\Validator\Constraints AS Assert;
+
+ /**
+ * @author Benjamin Eberlei
+ * @ORM\Entity
+ * @MyProject\Annotations\Foobarable
+ */
+ class User
+ {
+ /**
+ * @ORM\Id @ORM\Column @ORM\GeneratedValue
+ * @dummy
+ * @var int
+ */
+ private $id;
+
+ /**
+ * @ORM\Column(type="string")
+ * @Assert\NotEmpty
+ * @Assert\Email
+ * @var string
+ */
+ private $email;
+ }
+
+In this snippet you can see a variety of different docblock annotations:
+
+- Documentation annotations such as ``@var`` and ``@author``. These
+ annotations are ignored and never considered for throwing an
+ exception due to wrongly used annotations.
+- Annotations imported through use statements. The statement ``use
+ Doctrine\ORM\Mapping AS ORM`` makes all classes under that namespace
+ available as ``@ORM\ClassName``. Same goes for the import of
+ ``@Assert``.
+- The ``@dummy`` annotation. It is not a documentation annotation and
+ not ignored. For Doctrine Annotations it is not entirely clear how
+ to handle this annotation. Depending on the configuration an exception
+ (unknown annotation) will be thrown when parsing this annotation.
+- The fully qualified annotation ``@MyProject\Annotations\Foobarable``.
+ This is transformed directly into the given class name.
+
+How are these annotations loaded? From looking at the code you could
+guess that the ORM Mapping, Assert Validation and the fully qualified
+annotation can just be loaded using
+the defined PHP autoloaders. This is not the case however: For error
+handling reasons every check for class existence inside the
+``AnnotationReader`` sets the second parameter $autoload
+of ``class_exists($name, $autoload)`` to false. To work flawlessly the
+``AnnotationReader`` requires silent autoloaders which many autoloaders are
+not. Silent autoloading is NOT part of the `PSR-0 specification
+<https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md>`_
+for autoloading.
+
+This is why Doctrine Annotations uses its own autoloading mechanism
+through a global registry. If you are wondering about the annotation
+registry being global, there is no other way to solve the architectural
+problems of autoloading annotation classes in a straightforward fashion.
+Additionally if you think about PHP autoloading then you recognize it is
+a global as well.
+
+To anticipate the configuration section, making the above PHP class work
+with Doctrine Annotations requires this setup:
+
+.. code-block:: php
+
+ use Doctrine\Common\Annotations\AnnotationReader;
+ use Doctrine\Common\Annotations\AnnotationRegistry;
+
+ AnnotationRegistry::registerFile("/path/to/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php");
+ AnnotationRegistry::registerAutoloadNamespace("Symfony\Component\Validator\Constraint", "/path/to/symfony/src");
+ AnnotationRegistry::registerAutoloadNamespace("MyProject\Annotations", "/path/to/myproject/src");
+
+ $reader = new AnnotationReader();
+ AnnotationReader::addGlobalIgnoredName('dummy');
+
+The second block with the annotation registry calls registers all the
+three different annotation namespaces that are used.
+Doctrine Annotations saves all its annotations in a single file, that is
+why ``AnnotationRegistry#registerFile`` is used in contrast to
+``AnnotationRegistry#registerAutoloadNamespace`` which creates a PSR-0
+compatible loading mechanism for class to file names.
+
+In the third block, we create the actual ``AnnotationReader`` instance.
+Note that we also add ``dummy`` to the global list of ignored
+annotations for which we do not throw exceptions. Setting this is
+necessary in our example case, otherwise ``@dummy`` would trigger an
+exception to be thrown during the parsing of the docblock of
+``MyProject\Entities\User#id``.
+
+Setup and Configuration
+-----------------------
+
+To use the annotations library is simple, you just need to create a new
+``AnnotationReader`` instance:
+
+.. code-block:: php
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader();
+
+This creates a simple annotation reader with no caching other than in
+memory (in php arrays). Since parsing docblocks can be expensive you
+should cache this process by using a caching reader.
+
+To cache annotations, you can create a ``Doctrine\Common\Annotations\PsrCachedReader``.
+This reader decorates the original reader and stores all annotations in a PSR-6
+cache:
+
+.. code-block:: php
+
+ use Doctrine\Common\Annotations\AnnotationReader;
+ use Doctrine\Common\Annotations\PsrCachedReader;
+
+ $cache = ... // instantiate a PSR-6 Cache pool
+
+ $reader = new PsrCachedReader(
+ new AnnotationReader(),
+ $cache,
+ $debug = true
+ );
+
+The ``debug`` flag is used here as well to invalidate the cache files
+when the PHP class with annotations changed and should be used during
+development.
+
+.. warning ::
+
+ The ``AnnotationReader`` works and caches under the
+ assumption that all annotations of a doc-block are processed at
+ once. That means that annotation classes that do not exist and
+ aren't loaded and cannot be autoloaded (using the
+ AnnotationRegistry) would never be visible and not accessible if a
+ cache is used unless the cache is cleared and the annotations
+ requested again, this time with all annotations defined.
+
+By default the annotation reader returns a list of annotations with
+numeric indexes. If you want your annotations to be indexed by their
+class name you can wrap the reader in an ``IndexedReader``:
+
+.. code-block:: php
+
+ use Doctrine\Common\Annotations\AnnotationReader;
+ use Doctrine\Common\Annotations\IndexedReader;
+
+ $reader = new IndexedReader(new AnnotationReader());
+
+.. warning::
+
+ You should never wrap the indexed reader inside a cached reader,
+ only the other way around. This way you can re-use the cache with
+ indexed or numeric keys, otherwise your code may experience failures
+ due to caching in a numerical or indexed format.
+
+Registering Annotations
+~~~~~~~~~~~~~~~~~~~~~~~
+
+As explained in the introduction, Doctrine Annotations uses its own
+autoloading mechanism to determine if a given annotation has a
+corresponding PHP class that can be autoloaded. For annotation
+autoloading you have to configure the
+``Doctrine\Common\Annotations\AnnotationRegistry``. There are three
+different mechanisms to configure annotation autoloading:
+
+- Calling ``AnnotationRegistry#registerFile($file)`` to register a file
+ that contains one or more annotation classes.
+- Calling ``AnnotationRegistry#registerNamespace($namespace, $dirs =
+ null)`` to register that the given namespace contains annotations and
+ that their base directory is located at the given $dirs or in the
+ include path if ``NULL`` is passed. The given directories should *NOT*
+ be the directory where classes of the namespace are in, but the base
+ directory of the root namespace. The AnnotationRegistry uses a
+ namespace to directory separator approach to resolve the correct path.
+- Calling ``AnnotationRegistry#registerLoader($callable)`` to register
+ an autoloader callback. The callback accepts the class as first and
+ only parameter and has to return ``true`` if the corresponding file
+ was found and included.
+
+.. note::
+
+ Loaders have to fail silently, if a class is not found even if it
+ matches for example the namespace prefix of that loader. Never is a
+ loader to throw a warning or exception if the loading failed
+ otherwise parsing doc block annotations will become a huge pain.
+
+A sample loader callback could look like:
+
+.. code-block:: php
+
+ use Doctrine\Common\Annotations\AnnotationRegistry;
+ use Symfony\Component\ClassLoader\UniversalClassLoader;
+
+ AnnotationRegistry::registerLoader(function($class) {
+ $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php";
+
+ if (file_exists("/my/base/path/" . $file)) {
+ // file_exists() makes sure that the loader fails silently
+ require "/my/base/path/" . $file;
+ }
+ });
+
+ $loader = new UniversalClassLoader();
+ AnnotationRegistry::registerLoader(array($loader, "loadClass"));
+
+
+Ignoring missing exceptions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+By default an exception is thrown from the ``AnnotationReader`` if an
+annotation was found that:
+
+- is not part of the list of ignored "documentation annotations";
+- was not imported through a use statement;
+- is not a fully qualified class that exists.
+
+You can disable this behavior for specific names if your docblocks do
+not follow strict requirements:
+
+.. code-block:: php
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader();
+ AnnotationReader::addGlobalIgnoredName('foo');
+
+PHP Imports
+~~~~~~~~~~~
+
+By default the annotation reader parses the use-statement of a php file
+to gain access to the import rules and register them for the annotation
+processing. Only if you are using PHP Imports can you validate the
+correct usage of annotations and throw exceptions if you misspelled an
+annotation. This mechanism is enabled by default.
+
+To ease the upgrade path, we still allow you to disable this mechanism.
+Note however that we will remove this in future versions:
+
+.. code-block:: php
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader();
+ $reader->setEnabledPhpImports(false);
diff --git a/vendor/doctrine/annotations/docs/en/custom.rst b/vendor/doctrine/annotations/docs/en/custom.rst
new file mode 100644
index 0000000..11fbe1a
--- /dev/null
+++ b/vendor/doctrine/annotations/docs/en/custom.rst
@@ -0,0 +1,443 @@
+Custom Annotation Classes
+=========================
+
+If you want to define your own annotations, you just have to group them
+in a namespace and register this namespace in the ``AnnotationRegistry``.
+Annotation classes have to contain a class-level docblock with the text
+``@Annotation``:
+
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ /** @Annotation */
+ class Bar
+ {
+ // some code
+ }
+
+Inject annotation values
+------------------------
+
+The annotation parser checks if the annotation constructor has arguments,
+if so then it will pass the value array, otherwise it will try to inject
+values into public properties directly:
+
+
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ /**
+ * @Annotation
+ *
+ * Some Annotation using a constructor
+ */
+ class Bar
+ {
+ private $foo;
+
+ public function __construct(array $values)
+ {
+ $this->foo = $values['foo'];
+ }
+ }
+
+ /**
+ * @Annotation
+ *
+ * Some Annotation without a constructor
+ */
+ class Foo
+ {
+ public $bar;
+ }
+
+Optional: Constructors with Named Parameters
+--------------------------------------------
+
+Starting with Annotations v1.11 a new annotation instantiation strategy
+is available that aims at compatibility of Annotation classes with the PHP 8
+attribute feature. You need to declare a constructor with regular parameter
+names that match the named arguments in the annotation syntax.
+
+To enable this feature, you can tag your annotation class with
+``@NamedArgumentConstructor`` (available from v1.12) or implement the
+``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation`` interface
+(available from v1.11 and deprecated as of v1.12).
+When using the ``@NamedArgumentConstructor`` tag, the first argument of the
+constructor is considered as the default one.
+
+
+Usage with the ``@NamedArgumentContrustor`` tag
+
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ /**
+ * @Annotation
+ * @NamedArgumentConstructor
+ */
+ class Bar implements NamedArgumentConstructorAnnotation
+ {
+ private $foo;
+
+ public function __construct(string $foo)
+ {
+ $this->foo = $foo;
+ }
+ }
+
+ /** Usable with @Bar(foo="baz") */
+ /** Usable with @Bar("baz") */
+
+In combination with PHP 8's constructor property promotion feature
+you can simplify this to:
+
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ /**
+ * @Annotation
+ * @NamedArgumentConstructor
+ */
+ class Bar implements NamedArgumentConstructorAnnotation
+ {
+ public function __construct(private string $foo) {}
+ }
+
+
+Usage with the
+``Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation``
+interface (v1.11, deprecated as of v1.12):
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ use Doctrine\Common\Annotations\NamedArgumentConstructorAnnotation;
+
+ /** @Annotation */
+ class Bar implements NamedArgumentConstructorAnnotation
+ {
+ private $foo;
+
+ public function __construct(private string $foo) {}
+ }
+
+ /** Usable with @Bar(foo="baz") */
+
+Annotation Target
+-----------------
+
+``@Target`` indicates the kinds of class elements to which an annotation
+type is applicable. Then you could define one or more targets:
+
+- ``CLASS`` Allowed in class docblocks
+- ``PROPERTY`` Allowed in property docblocks
+- ``METHOD`` Allowed in the method docblocks
+- ``FUNCTION`` Allowed in function dockblocks
+- ``ALL`` Allowed in class, property, method and function docblocks
+- ``ANNOTATION`` Allowed inside other annotations
+
+If the annotations is not allowed in the current context, an
+``AnnotationException`` is thrown.
+
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ /**
+ * @Annotation
+ * @Target({"METHOD","PROPERTY"})
+ */
+ class Bar
+ {
+ // some code
+ }
+
+ /**
+ * @Annotation
+ * @Target("CLASS")
+ */
+ class Foo
+ {
+ // some code
+ }
+
+Attribute types
+---------------
+
+The annotation parser checks the given parameters using the phpdoc
+annotation ``@var``, The data type could be validated using the ``@var``
+annotation on the annotation properties or using the ``@Attributes`` and
+``@Attribute`` annotations.
+
+If the data type does not match you get an ``AnnotationException``
+
+.. code-block:: php
+
+ namespace MyCompany\Annotations;
+
+ /**
+ * @Annotation
+ * @Target({"METHOD","PROPERTY"})
+ */
+ class Bar
+ {
+ /** @var mixed */
+ public $mixed;
+
+ /** @var boolean */
+ public $boolean;
+
+ /** @var bool */
+ public $bool;
+
+ /** @var float */
+ public $float;
+
+ /** @var string */
+ public $string;
+
+ /** @var integer */
+ public $integer;
+
+ /** @var array */
+ public $array;
+
+ /** @var SomeAnnotationClass */
+ public $annotation;
+
+ /** @var array<integer> */
+ public $arrayOfIntegers;
+
+ /** @var array<SomeAnnotationClass> */
+ public $arrayOfAnnotations;
+ }
+
+ /**
+ * @Annotation
+ * @Target({"METHOD","PROPERTY"})
+ * @Attributes({
+ * @Attribute("stringProperty", type = "string"),
+ * @Attribute("annotProperty", type = "SomeAnnotationClass"),
+ * })
+ */
+ class Foo
+ {
+ public function __construct(array $values)
+ {
+ $this->stringProperty = $values['stringProperty'];
+ $this->annotProperty = $values['annotProperty'];
+ }
+
+ // some code
+ }
+
+Annotation Required
+-------------------
+
+``@Required`` indicates that the field must be specified when the
+annotation is used. If it is not used you get an ``AnnotationException``
+stating that this value can not be null.
+
+Declaring a required field:
+
+.. code-block:: php
+
+ /**
+ * @Annotation
+ * @Target("ALL")
+ */
+ class Foo
+ {
+ /** @Required */
+ public $requiredField;
+ }
+
+Usage:
+
+.. code-block:: php
+
+ /** @Foo(requiredField="value") */
+ public $direction; // Valid
+
+ /** @Foo */
+ public $direction; // Required field missing, throws an AnnotationException
+
+
+Enumerated values
+-----------------
+
+- An annotation property marked with ``@Enum`` is a field that accepts a
+ fixed set of scalar values.
+- You should use ``@Enum`` fields any time you need to represent fixed
+ values.
+- The annotation parser checks the given value and throws an
+ ``AnnotationException`` if the value does not match.
+
+
+Declaring an enumerated property:
+
+.. code-block:: php
+
+ /**
+ * @Annotation
+ * @Target("ALL")
+ */
+ class Direction
+ {
+ /**
+ * @Enum({"NORTH", "SOUTH", "EAST", "WEST"})
+ */
+ public $value;
+ }
+
+Annotation usage:
+
+.. code-block:: php
+
+ /** @Direction("NORTH") */
+ public $direction; // Valid value
+
+ /** @Direction("NORTHEAST") */
+ public $direction; // Invalid value, throws an AnnotationException
+
+
+Constants
+---------
+
+The use of constants and class constants is available on the annotations
+parser.
+
+The following usages are allowed:
+
+.. code-block:: php
+
+ namespace MyCompany\Entity;
+
+ use MyCompany\Annotations\Foo;
+ use MyCompany\Annotations\Bar;
+ use MyCompany\Entity\SomeClass;
+
+ /**
+ * @Foo(PHP_EOL)
+ * @Bar(Bar::FOO)
+ * @Foo({SomeClass::FOO, SomeClass::BAR})
+ * @Bar({SomeClass::FOO_KEY = SomeClass::BAR_VALUE})
+ */
+ class User
+ {
+ }
+
+
+Be careful with constants and the cache !
+
+.. note::
+
+ The cached reader will not re-evaluate each time an annotation is
+ loaded from cache. When a constant is changed the cache must be
+ cleaned.
+
+
+Usage
+-----
+
+Using the library API is simple. Using the annotations described in the
+previous section, you can now annotate other classes with your
+annotations:
+
+.. code-block:: php
+
+ namespace MyCompany\Entity;
+
+ use MyCompany\Annotations\Foo;
+ use MyCompany\Annotations\Bar;
+
+ /**
+ * @Foo(bar="foo")
+ * @Bar(foo="bar")
+ */
+ class User
+ {
+ }
+
+Now we can write a script to get the annotations above:
+
+.. code-block:: php
+
+ $reflClass = new ReflectionClass('MyCompany\Entity\User');
+ $classAnnotations = $reader->getClassAnnotations($reflClass);
+
+ foreach ($classAnnotations AS $annot) {
+ if ($annot instanceof \MyCompany\Annotations\Foo) {
+ echo $annot->bar; // prints "foo";
+ } else if ($annot instanceof \MyCompany\Annotations\Bar) {
+ echo $annot->foo; // prints "bar";
+ }
+ }
+
+You have a complete API for retrieving annotation class instances from a
+class, property or method docblock:
+
+
+Reader API
+~~~~~~~~~~
+
+Access all annotations of a class
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getClassAnnotations(\ReflectionClass $class);
+
+Access one annotation of a class
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getClassAnnotation(\ReflectionClass $class, $annotationName);
+
+Access all annotations of a method
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getMethodAnnotations(\ReflectionMethod $method);
+
+Access one annotation of a method
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName);
+
+Access all annotations of a property
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getPropertyAnnotations(\ReflectionProperty $property);
+
+Access one annotation of a property
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName);
+
+Access all annotations of a function
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getFunctionAnnotations(\ReflectionFunction $property);
+
+Access one annotation of a function
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: php
+
+ public function getFunctionAnnotation(\ReflectionFunction $property, $annotationName);
diff --git a/vendor/doctrine/annotations/docs/en/index.rst b/vendor/doctrine/annotations/docs/en/index.rst
new file mode 100644
index 0000000..95476c3
--- /dev/null
+++ b/vendor/doctrine/annotations/docs/en/index.rst
@@ -0,0 +1,101 @@
+Introduction
+============
+
+Doctrine Annotations allows to implement custom annotation
+functionality for PHP classes and functions.
+
+.. code-block:: php
+
+ class Foo
+ {
+ /**
+ * @MyAnnotation(myProperty="value")
+ */
+ private $bar;
+ }
+
+Annotations aren't implemented in PHP itself which is why this component
+offers a way to use the PHP doc-blocks as a place for the well known
+annotation syntax using the ``@`` char.
+
+Annotations in Doctrine are used for the ORM configuration to build the
+class mapping, but it can be used in other projects for other purposes
+too.
+
+Installation
+============
+
+You can install the Annotation component with composer:
+
+.. code-block::
+
+   $ composer require doctrine/annotations
+
+Create an annotation class
+==========================
+
+An annotation class is a representation of the later used annotation
+configuration in classes. The annotation class of the previous example
+looks like this:
+
+.. code-block:: php
+
+ /**
+ * @Annotation
+ */
+ final class MyAnnotation
+ {
+ public $myProperty;
+ }
+
+The annotation class is declared as an annotation by ``@Annotation``.
+
+:ref:`Read more about custom annotations. <custom>`
+
+Reading annotations
+===================
+
+The access to the annotations happens by reflection of the class or function
+containing them. There are multiple reader-classes implementing the
+``Doctrine\Common\Annotations\Reader`` interface, that can access the
+annotations of a class. A common one is
+``Doctrine\Common\Annotations\AnnotationReader``:
+
+.. code-block:: php
+
+ use Doctrine\Common\Annotations\AnnotationReader;
+ use Doctrine\Common\Annotations\AnnotationRegistry;
+
+ // Deprecated and will be removed in 2.0 but currently needed
+ AnnotationRegistry::registerLoader('class_exists');
+
+ $reflectionClass = new ReflectionClass(Foo::class);
+ $property = $reflectionClass->getProperty('bar');
+
+ $reader = new AnnotationReader();
+ $myAnnotation = $reader->getPropertyAnnotation(
+ $property,
+ MyAnnotation::class
+ );
+
+ echo $myAnnotation->myProperty; // result: "value"
+
+Note that ``AnnotationRegistry::registerLoader('class_exists')`` only works
+if you already have an autoloader configured (i.e. composer autoloader).
+Otherwise, :ref:`please take a look to the other annotation autoload mechanisms <annotations>`.
+
+A reader has multiple methods to access the annotations of a class or
+function.
+
+:ref:`Read more about handling annotations. <annotations>`
+
+IDE Support
+-----------
+
+Some IDEs already provide support for annotations:
+
+- Eclipse via the `Symfony2 Plugin <https://github.com/pulse00/Symfony-2-Eclipse-Plugin>`_
+- PhpStorm via the `PHP Annotations Plugin <https://plugins.jetbrains.com/plugin/7320-php-annotations>`_ or the `Symfony Plugin <https://plugins.jetbrains.com/plugin/7219-symfony-support>`_
+
+.. _Read more about handling annotations.: annotations
+.. _Read more about custom annotations.: custom
diff --git a/vendor/doctrine/annotations/docs/en/sidebar.rst b/vendor/doctrine/annotations/docs/en/sidebar.rst
new file mode 100644
index 0000000..6f5d13c
--- /dev/null
+++ b/vendor/doctrine/annotations/docs/en/sidebar.rst
@@ -0,0 +1,6 @@
+.. toctree::
+ :depth: 3
+
+ index
+ annotations
+ custom
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php
new file mode 100644
index 0000000..750270e
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php
@@ -0,0 +1,59 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use BadMethodCallException;
+
+use function sprintf;
+
+/**
+ * Annotations class.
+ */
+class Annotation
+{
+ /**
+ * Value property. Common among all derived classes.
+ *
+ * @var mixed
+ */
+ public $value;
+
+ /**
+ * @param array<string, mixed> $data Key-value for properties to be defined in this class.
+ */
+ final public function __construct(array $data)
+ {
+ foreach ($data as $key => $value) {
+ $this->$key = $value;
+ }
+ }
+
+ /**
+ * Error handler for unknown property accessor in Annotation class.
+ *
+ * @param string $name Unknown property name.
+ *
+ * @throws BadMethodCallException
+ */
+ public function __get($name)
+ {
+ throw new BadMethodCallException(
+ sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class)
+ );
+ }
+
+ /**
+ * Error handler for unknown property mutator in Annotation class.
+ *
+ * @param string $name Unknown property name.
+ * @param mixed $value Property value.
+ *
+ * @throws BadMethodCallException
+ */
+ public function __set($name, $value)
+ {
+ throw new BadMethodCallException(
+ sprintf("Unknown property '%s' on annotation '%s'.", $name, static::class)
+ );
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php
new file mode 100644
index 0000000..b1f8514
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the attribute type during the parsing process.
+ *
+ * @Annotation
+ */
+final class Attribute
+{
+ /** @var string */
+ public $name;
+
+ /** @var string */
+ public $type;
+
+ /** @var bool */
+ public $required = false;
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php
new file mode 100644
index 0000000..8f758f3
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the types of all declared attributes during the parsing process.
+ *
+ * @Annotation
+ */
+final class Attributes
+{
+ /** @var array<Attribute> */
+ public $value;
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php
new file mode 100644
index 0000000..35d6410
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Enum.php
@@ -0,0 +1,69 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+use InvalidArgumentException;
+
+use function get_class;
+use function gettype;
+use function in_array;
+use function is_object;
+use function is_scalar;
+use function sprintf;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the available values during the parsing process.
+ *
+ * @Annotation
+ * @Attributes({
+ * @Attribute("value", required = true, type = "array"),
+ * @Attribute("literal", required = false, type = "array")
+ * })
+ */
+final class Enum
+{
+ /** @phpstan-var list<scalar> */
+ public $value;
+
+ /**
+ * Literal target declaration.
+ *
+ * @var mixed[]
+ */
+ public $literal;
+
+ /**
+ * @throws InvalidArgumentException
+ *
+ * @phpstan-param array{literal?: mixed[], value: list<scalar>} $values
+ */
+ public function __construct(array $values)
+ {
+ if (! isset($values['literal'])) {
+ $values['literal'] = [];
+ }
+
+ foreach ($values['value'] as $var) {
+ if (! is_scalar($var)) {
+ throw new InvalidArgumentException(sprintf(
+ '@Enum supports only scalar values "%s" given.',
+ is_object($var) ? get_class($var) : gettype($var)
+ ));
+ }
+ }
+
+ foreach ($values['literal'] as $key => $var) {
+ if (! in_array($key, $values['value'])) {
+ throw new InvalidArgumentException(sprintf(
+ 'Undefined enumerator value "%s" for literal "%s".',
+ $key,
+ $var
+ ));
+ }
+ }
+
+ $this->value = $values['value'];
+ $this->literal = $values['literal'];
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php
new file mode 100644
index 0000000..ae60f7d
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+use RuntimeException;
+
+use function is_array;
+use function is_string;
+use function json_encode;
+use function sprintf;
+
+/**
+ * Annotation that can be used to signal to the parser to ignore specific
+ * annotations during the parsing process.
+ *
+ * @Annotation
+ */
+final class IgnoreAnnotation
+{
+ /** @phpstan-var list<string> */
+ public $names;
+
+ /**
+ * @throws RuntimeException
+ *
+ * @phpstan-param array{value: string|list<string>} $values
+ */
+ public function __construct(array $values)
+ {
+ if (is_string($values['value'])) {
+ $values['value'] = [$values['value']];
+ }
+
+ if (! is_array($values['value'])) {
+ throw new RuntimeException(sprintf(
+ '@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.',
+ json_encode($values['value'])
+ ));
+ }
+
+ $this->names = $values['value'];
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php
new file mode 100644
index 0000000..1690601
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/NamedArgumentConstructor.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that indicates that the annotated class should be constructed with a named argument call.
+ *
+ * @Annotation
+ * @Target("CLASS")
+ */
+final class NamedArgumentConstructor
+{
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php
new file mode 100644
index 0000000..dee5857
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check if that attribute is required during the parsing process.
+ *
+ * @Annotation
+ */
+final class Required
+{
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php
new file mode 100644
index 0000000..7fd75e2
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Target.php
@@ -0,0 +1,101 @@
+<?php
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+use InvalidArgumentException;
+
+use function array_keys;
+use function get_class;
+use function gettype;
+use function implode;
+use function is_array;
+use function is_object;
+use function is_string;
+use function sprintf;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the annotation target during the parsing process.
+ *
+ * @Annotation
+ */
+final class Target
+{
+ public const TARGET_CLASS = 1;
+ public const TARGET_METHOD = 2;
+ public const TARGET_PROPERTY = 4;
+ public const TARGET_ANNOTATION = 8;
+ public const TARGET_FUNCTION = 16;
+ public const TARGET_ALL = 31;
+
+ /** @var array<string, int> */
+ private static $map = [
+ 'ALL' => self::TARGET_ALL,
+ 'CLASS' => self::TARGET_CLASS,
+ 'METHOD' => self::TARGET_METHOD,
+ 'PROPERTY' => self::TARGET_PROPERTY,
+ 'FUNCTION' => self::TARGET_FUNCTION,
+ 'ANNOTATION' => self::TARGET_ANNOTATION,
+ ];
+
+ /** @phpstan-var list<string> */
+ public $value;
+
+ /**
+ * Targets as bitmask.
+ *
+ * @var int
+ */
+ public $targets;
+
+ /**
+ * Literal target declaration.
+ *
+ * @var string
+ */
+ public $literal;
+
+ /**
+ * @throws InvalidArgumentException
+ *
+ * @phpstan-param array{value?: string|list<string>} $values
+ */
+ public function __construct(array $values)
+ {
+ if (! isset($values['value'])) {
+ $values['value'] = null;
+ }
+
+ if (is_string($values['value'])) {
+ $values['value'] = [$values['value']];
+ }
+
+ if (! is_array($values['value'])) {
+ throw new InvalidArgumentException(
+ sprintf(
+ '@Target expects either a string value, or an array of strings, "%s" given.',
+ is_object($values['value']) ? get_class($values['value']) : gettype($values['value'])
+ )
+ );
+ }
+
+ $bitmask = 0;
+ foreach ($values['value'] as $literal) {
+ if (! isset(self::$map[$literal])) {
+ throw new InvalidArgumentException(
+ sprintf(
+ 'Invalid Target "%s". Available targets: [%s]',
+ $literal,
+ implode(', ', array_keys(self::$map))
+ )
+ );
+ }
+
+ $bitmask |= self::$map[$literal];
+ }
+
+ $this->targets = $bitmask;
+ $this->value = $values['value'];
+ $this->literal = implode(', ', $this->value);
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php
new file mode 100644
index 0000000..4d91825
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php
@@ -0,0 +1,172 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use Exception;
+use Throwable;
+
+use function get_class;
+use function gettype;
+use function implode;
+use function is_object;
+use function sprintf;
+
+/**
+ * Description of AnnotationException
+ */
+class AnnotationException extends Exception
+{
+ /**
+ * Creates a new AnnotationException describing a Syntax error.
+ *
+ * @param string $message Exception message
+ *
+ * @return AnnotationException
+ */
+ public static function syntaxError($message)
+ {
+ return new self('[Syntax Error] ' . $message);
+ }
+
+ /**
+ * Creates a new AnnotationException describing a Semantical error.
+ *
+ * @param string $message Exception message
+ *
+ * @return AnnotationException
+ */
+ public static function semanticalError($message)
+ {
+ return new self('[Semantical Error] ' . $message);
+ }
+
+ /**
+ * Creates a new AnnotationException describing an error which occurred during
+ * the creation of the annotation.
+ *
+ * @param string $message
+ *
+ * @return AnnotationException
+ */
+ public static function creationError($message, ?Throwable $previous = null)
+ {
+ return new self('[Creation Error] ' . $message, 0, $previous);
+ }
+
+ /**
+ * Creates a new AnnotationException describing a type error.
+ *
+ * @param string $message
+ *
+ * @return AnnotationException
+ */
+ public static function typeError($message)
+ {
+ return new self('[Type Error] ' . $message);
+ }
+
+ /**
+ * Creates a new AnnotationException describing a constant semantical error.
+ *
+ * @param string $identifier
+ * @param string $context
+ *
+ * @return AnnotationException
+ */
+ public static function semanticalErrorConstants($identifier, $context = null)
+ {
+ return self::semanticalError(sprintf(
+ "Couldn't find constant %s%s.",
+ $identifier,
+ $context ? ', ' . $context : ''
+ ));
+ }
+
+ /**
+ * Creates a new AnnotationException describing an type error of an attribute.
+ *
+ * @param string $attributeName
+ * @param string $annotationName
+ * @param string $context
+ * @param string $expected
+ * @param mixed $actual
+ *
+ * @return AnnotationException
+ */
+ public static function attributeTypeError($attributeName, $annotationName, $context, $expected, $actual)
+ {
+ return self::typeError(sprintf(
+ 'Attribute "%s" of @%s declared on %s expects %s, but got %s.',
+ $attributeName,
+ $annotationName,
+ $context,
+ $expected,
+ is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual)
+ ));
+ }
+
+ /**
+ * Creates a new AnnotationException describing an required error of an attribute.
+ *
+ * @param string $attributeName
+ * @param string $annotationName
+ * @param string $context
+ * @param string $expected
+ *
+ * @return AnnotationException
+ */
+ public static function requiredError($attributeName, $annotationName, $context, $expected)
+ {
+ return self::typeError(sprintf(
+ 'Attribute "%s" of @%s declared on %s expects %s. This value should not be null.',
+ $attributeName,
+ $annotationName,
+ $context,
+ $expected
+ ));
+ }
+
+ /**
+ * Creates a new AnnotationException describing a invalid enummerator.
+ *
+ * @param string $attributeName
+ * @param string $annotationName
+ * @param string $context
+ * @param mixed $given
+ *
+ * @return AnnotationException
+ *
+ * @phpstan-param list<string> $available
+ */
+ public static function enumeratorError($attributeName, $annotationName, $context, $available, $given)
+ {
+ return new self(sprintf(
+ '[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.',
+ $attributeName,
+ $annotationName,
+ $context,
+ implode(', ', $available),
+ is_object($given) ? get_class($given) : $given
+ ));
+ }
+
+ /**
+ * @return AnnotationException
+ */
+ public static function optimizerPlusSaveComments()
+ {
+ return new self(
+ 'You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1.'
+ );
+ }
+
+ /**
+ * @return AnnotationException
+ */
+ public static function optimizerPlusLoadComments()
+ {
+ return new self(
+ 'You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1.'
+ );
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
new file mode 100644
index 0000000..1f538ee
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
@@ -0,0 +1,389 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation;
+use Doctrine\Common\Annotations\Annotation\Target;
+use ReflectionClass;
+use ReflectionFunction;
+use ReflectionMethod;
+use ReflectionProperty;
+
+use function array_merge;
+use function class_exists;
+use function extension_loaded;
+use function ini_get;
+
+/**
+ * A reader for docblock annotations.
+ */
+class AnnotationReader implements Reader
+{
+ /**
+ * Global map for imports.
+ *
+ * @var array<string, class-string>
+ */
+ private static $globalImports = [
+ 'ignoreannotation' => Annotation\IgnoreAnnotation::class,
+ ];
+
+ /**
+ * A list with annotations that are not causing exceptions when not resolved to an annotation class.
+ *
+ * The names are case sensitive.
+ *
+ * @var array<string, true>
+ */
+ private static $globalIgnoredNames = ImplicitlyIgnoredAnnotationNames::LIST;
+
+ /**
+ * A list with annotations that are not causing exceptions when not resolved to an annotation class.
+ *
+ * The names are case sensitive.
+ *
+ * @var array<string, true>
+ */
+ private static $globalIgnoredNamespaces = [];
+
+ /**
+ * Add a new annotation to the globally ignored annotation names with regard to exception handling.
+ *
+ * @param string $name
+ */
+ public static function addGlobalIgnoredName($name)
+ {
+ self::$globalIgnoredNames[$name] = true;
+ }
+
+ /**
+ * Add a new annotation to the globally ignored annotation namespaces with regard to exception handling.
+ *
+ * @param string $namespace
+ */
+ public static function addGlobalIgnoredNamespace($namespace)
+ {
+ self::$globalIgnoredNamespaces[$namespace] = true;
+ }
+
+ /**
+ * Annotations parser.
+ *
+ * @var DocParser
+ */
+ private $parser;
+
+ /**
+ * Annotations parser used to collect parsing metadata.
+ *
+ * @var DocParser
+ */
+ private $preParser;
+
+ /**
+ * PHP parser used to collect imports.
+ *
+ * @var PhpParser
+ */
+ private $phpParser;
+
+ /**
+ * In-memory cache mechanism to store imported annotations per class.
+ *
+ * @psalm-var array<'class'|'function', array<string, array<string, class-string>>>
+ */
+ private $imports = [];
+
+ /**
+ * In-memory cache mechanism to store ignored annotations per class.
+ *
+ * @psalm-var array<'class'|'function', array<string, array<string, true>>>
+ */
+ private $ignoredAnnotationNames = [];
+
+ /**
+ * Initializes a new AnnotationReader.
+ *
+ * @throws AnnotationException
+ */
+ public function __construct(?DocParser $parser = null)
+ {
+ if (
+ extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === '0' ||
+ ini_get('opcache.save_comments') === '0')
+ ) {
+ throw AnnotationException::optimizerPlusSaveComments();
+ }
+
+ if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') === 0) {
+ throw AnnotationException::optimizerPlusSaveComments();
+ }
+
+ // Make sure that the IgnoreAnnotation annotation is loaded
+ class_exists(IgnoreAnnotation::class);
+
+ $this->parser = $parser ?: new DocParser();
+
+ $this->preParser = new DocParser();
+
+ $this->preParser->setImports(self::$globalImports);
+ $this->preParser->setIgnoreNotImportedAnnotations(true);
+ $this->preParser->setIgnoredAnnotationNames(self::$globalIgnoredNames);
+
+ $this->phpParser = new PhpParser();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ $this->parser->setTarget(Target::TARGET_CLASS);
+ $this->parser->setImports($this->getImports($class));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
+ $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
+
+ return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ $annotations = $this->getClassAnnotations($class);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $context = 'property ' . $class->getName() . '::$' . $property->getName();
+
+ $this->parser->setTarget(Target::TARGET_PROPERTY);
+ $this->parser->setImports($this->getPropertyImports($property));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
+ $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
+
+ return $this->parser->parse($property->getDocComment(), $context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ $annotations = $this->getPropertyAnnotations($property);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $context = 'method ' . $class->getName() . '::' . $method->getName() . '()';
+
+ $this->parser->setTarget(Target::TARGET_METHOD);
+ $this->parser->setImports($this->getMethodImports($method));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
+ $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
+
+ return $this->parser->parse($method->getDocComment(), $context);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ $annotations = $this->getMethodAnnotations($method);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the annotations applied to a function.
+ *
+ * @phpstan-return list<object> An array of Annotations.
+ */
+ public function getFunctionAnnotations(ReflectionFunction $function): array
+ {
+ $context = 'function ' . $function->getName();
+
+ $this->parser->setTarget(Target::TARGET_FUNCTION);
+ $this->parser->setImports($this->getImports($function));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function));
+ $this->parser->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
+
+ return $this->parser->parse($function->getDocComment(), $context);
+ }
+
+ /**
+ * Gets a function annotation.
+ *
+ * @return object|null The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getFunctionAnnotation(ReflectionFunction $function, string $annotationName)
+ {
+ $annotations = $this->getFunctionAnnotations($function);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the ignored annotations for the given class or function.
+ *
+ * @param ReflectionClass|ReflectionFunction $reflection
+ *
+ * @return array<string, true>
+ */
+ private function getIgnoredAnnotationNames($reflection): array
+ {
+ $type = $reflection instanceof ReflectionClass ? 'class' : 'function';
+ $name = $reflection->getName();
+
+ if (isset($this->ignoredAnnotationNames[$type][$name])) {
+ return $this->ignoredAnnotationNames[$type][$name];
+ }
+
+ $this->collectParsingMetadata($reflection);
+
+ return $this->ignoredAnnotationNames[$type][$name];
+ }
+
+ /**
+ * Retrieves imports for a class or a function.
+ *
+ * @param ReflectionClass|ReflectionFunction $reflection
+ *
+ * @return array<string, class-string>
+ */
+ private function getImports($reflection): array
+ {
+ $type = $reflection instanceof ReflectionClass ? 'class' : 'function';
+ $name = $reflection->getName();
+
+ if (isset($this->imports[$type][$name])) {
+ return $this->imports[$type][$name];
+ }
+
+ $this->collectParsingMetadata($reflection);
+
+ return $this->imports[$type][$name];
+ }
+
+ /**
+ * Retrieves imports for methods.
+ *
+ * @return array<string, class-string>
+ */
+ private function getMethodImports(ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $classImports = $this->getImports($class);
+
+ $traitImports = [];
+
+ foreach ($class->getTraits() as $trait) {
+ if (
+ ! $trait->hasMethod($method->getName())
+ || $trait->getFileName() !== $method->getFileName()
+ ) {
+ continue;
+ }
+
+ $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait));
+ }
+
+ return array_merge($classImports, $traitImports);
+ }
+
+ /**
+ * Retrieves imports for properties.
+ *
+ * @return array<string, class-string>
+ */
+ private function getPropertyImports(ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $classImports = $this->getImports($class);
+
+ $traitImports = [];
+
+ foreach ($class->getTraits() as $trait) {
+ if (! $trait->hasProperty($property->getName())) {
+ continue;
+ }
+
+ $traitImports = array_merge($traitImports, $this->phpParser->parseUseStatements($trait));
+ }
+
+ return array_merge($classImports, $traitImports);
+ }
+
+ /**
+ * Collects parsing metadata for a given class or function.
+ *
+ * @param ReflectionClass|ReflectionFunction $reflection
+ */
+ private function collectParsingMetadata($reflection): void
+ {
+ $type = $reflection instanceof ReflectionClass ? 'class' : 'function';
+ $name = $reflection->getName();
+
+ $ignoredAnnotationNames = self::$globalIgnoredNames;
+ $annotations = $this->preParser->parse($reflection->getDocComment(), $type . ' ' . $name);
+
+ foreach ($annotations as $annotation) {
+ if (! ($annotation instanceof IgnoreAnnotation)) {
+ continue;
+ }
+
+ foreach ($annotation->names as $annot) {
+ $ignoredAnnotationNames[$annot] = true;
+ }
+ }
+
+ $this->imports[$type][$name] = array_merge(
+ self::$globalImports,
+ $this->phpParser->parseUseStatements($reflection),
+ [
+ '__NAMESPACE__' => $reflection->getNamespaceName(),
+ 'self' => $name,
+ ]
+ );
+
+ $this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
new file mode 100644
index 0000000..259d497
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
@@ -0,0 +1,190 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use function array_key_exists;
+use function array_merge;
+use function class_exists;
+use function in_array;
+use function is_file;
+use function str_replace;
+use function stream_resolve_include_path;
+use function strpos;
+
+use const DIRECTORY_SEPARATOR;
+
+final class AnnotationRegistry
+{
+ /**
+ * A map of namespaces to use for autoloading purposes based on a PSR-0 convention.
+ *
+ * Contains the namespace as key and an array of directories as value. If the value is NULL
+ * the include path is used for checking for the corresponding file.
+ *
+ * This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own.
+ *
+ * @var string[][]|string[]|null[]
+ */
+ private static $autoloadNamespaces = [];
+
+ /**
+ * A map of autoloader callables.
+ *
+ * @var callable[]
+ */
+ private static $loaders = [];
+
+ /**
+ * An array of classes which cannot be found
+ *
+ * @var null[] indexed by class name
+ */
+ private static $failedToAutoload = [];
+
+ /**
+ * Whenever registerFile() was used. Disables use of standard autoloader.
+ *
+ * @var bool
+ */
+ private static $registerFileUsed = false;
+
+ public static function reset(): void
+ {
+ self::$autoloadNamespaces = [];
+ self::$loaders = [];
+ self::$failedToAutoload = [];
+ self::$registerFileUsed = false;
+ }
+
+ /**
+ * Registers file.
+ *
+ * @deprecated This method is deprecated and will be removed in
+ * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0.
+ */
+ public static function registerFile(string $file): void
+ {
+ self::$registerFileUsed = true;
+
+ require_once $file;
+ }
+
+ /**
+ * Adds a namespace with one or many directories to look for files or null for the include path.
+ *
+ * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
+ *
+ * @deprecated This method is deprecated and will be removed in
+ * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0.
+ *
+ * @phpstan-param string|list<string>|null $dirs
+ */
+ public static function registerAutoloadNamespace(string $namespace, $dirs = null): void
+ {
+ self::$autoloadNamespaces[$namespace] = $dirs;
+ }
+
+ /**
+ * Registers multiple namespaces.
+ *
+ * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
+ *
+ * @deprecated This method is deprecated and will be removed in
+ * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0.
+ *
+ * @param string[][]|string[]|null[] $namespaces indexed by namespace name
+ */
+ public static function registerAutoloadNamespaces(array $namespaces): void
+ {
+ self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces);
+ }
+
+ /**
+ * Registers an autoloading callable for annotations, much like spl_autoload_register().
+ *
+ * NOTE: These class loaders HAVE to be silent when a class was not found!
+ * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class.
+ *
+ * @deprecated This method is deprecated and will be removed in
+ * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0.
+ */
+ public static function registerLoader(callable $callable): void
+ {
+ // Reset our static cache now that we have a new loader to work with
+ self::$failedToAutoload = [];
+ self::$loaders[] = $callable;
+ }
+
+ /**
+ * Registers an autoloading callable for annotations, if it is not already registered
+ *
+ * @deprecated This method is deprecated and will be removed in
+ * doctrine/annotations 2.0. Annotations will be autoloaded in 2.0.
+ */
+ public static function registerUniqueLoader(callable $callable): void
+ {
+ if (in_array($callable, self::$loaders, true)) {
+ return;
+ }
+
+ self::registerLoader($callable);
+ }
+
+ /**
+ * Autoloads an annotation class silently.
+ */
+ public static function loadAnnotationClass(string $class): bool
+ {
+ if (class_exists($class, false)) {
+ return true;
+ }
+
+ if (array_key_exists($class, self::$failedToAutoload)) {
+ return false;
+ }
+
+ foreach (self::$autoloadNamespaces as $namespace => $dirs) {
+ if (strpos($class, $namespace) !== 0) {
+ continue;
+ }
+
+ $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
+
+ if ($dirs === null) {
+ $path = stream_resolve_include_path($file);
+ if ($path) {
+ require $path;
+
+ return true;
+ }
+ } else {
+ foreach ((array) $dirs as $dir) {
+ if (is_file($dir . DIRECTORY_SEPARATOR . $file)) {
+ require $dir . DIRECTORY_SEPARATOR . $file;
+
+ return true;
+ }
+ }
+ }
+ }
+
+ foreach (self::$loaders as $loader) {
+ if ($loader($class) === true) {
+ return true;
+ }
+ }
+
+ if (
+ self::$loaders === [] &&
+ self::$autoloadNamespaces === [] &&
+ self::$registerFileUsed === false &&
+ class_exists($class)
+ ) {
+ return true;
+ }
+
+ self::$failedToAutoload[$class] = null;
+
+ return false;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
new file mode 100644
index 0000000..c036b2d
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php
@@ -0,0 +1,268 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Cache\Cache;
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+
+use function array_map;
+use function array_merge;
+use function assert;
+use function filemtime;
+use function max;
+use function time;
+
+/**
+ * A cache aware annotation reader.
+ *
+ * @deprecated the CachedReader is deprecated and will be removed
+ * in version 2.0.0 of doctrine/annotations. Please use the
+ * {@see \Doctrine\Common\Annotations\PsrCachedReader} instead.
+ */
+final class CachedReader implements Reader
+{
+ /** @var Reader */
+ private $delegate;
+
+ /** @var Cache */
+ private $cache;
+
+ /** @var bool */
+ private $debug;
+
+ /** @var array<string, array<object>> */
+ private $loadedAnnotations = [];
+
+ /** @var int[] */
+ private $loadedFilemtimes = [];
+
+ /**
+ * @param bool $debug
+ */
+ public function __construct(Reader $reader, Cache $cache, $debug = false)
+ {
+ $this->delegate = $reader;
+ $this->cache = $cache;
+ $this->debug = (bool) $debug;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ $cacheKey = $class->getName();
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ $annots = $this->fetchFromCache($cacheKey, $class);
+ if ($annots === false) {
+ $annots = $this->delegate->getClassAnnotations($class);
+ $this->saveToCache($cacheKey, $annots);
+ }
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ foreach ($this->getClassAnnotations($class) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $cacheKey = $class->getName() . '$' . $property->getName();
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ $annots = $this->fetchFromCache($cacheKey, $class);
+ if ($annots === false) {
+ $annots = $this->delegate->getPropertyAnnotations($property);
+ $this->saveToCache($cacheKey, $annots);
+ }
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ foreach ($this->getPropertyAnnotations($property) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $cacheKey = $class->getName() . '#' . $method->getName();
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ $annots = $this->fetchFromCache($cacheKey, $class);
+ if ($annots === false) {
+ $annots = $this->delegate->getMethodAnnotations($method);
+ $this->saveToCache($cacheKey, $annots);
+ }
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ foreach ($this->getMethodAnnotations($method) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Clears loaded annotations.
+ *
+ * @return void
+ */
+ public function clearLoadedAnnotations()
+ {
+ $this->loadedAnnotations = [];
+ $this->loadedFilemtimes = [];
+ }
+
+ /**
+ * Fetches a value from the cache.
+ *
+ * @param string $cacheKey The cache key.
+ *
+ * @return mixed The cached value or false when the value is not in cache.
+ */
+ private function fetchFromCache($cacheKey, ReflectionClass $class)
+ {
+ $data = $this->cache->fetch($cacheKey);
+ if ($data !== false) {
+ if (! $this->debug || $this->isCacheFresh($cacheKey, $class)) {
+ return $data;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Saves a value to the cache.
+ *
+ * @param string $cacheKey The cache key.
+ * @param mixed $value The value.
+ *
+ * @return void
+ */
+ private function saveToCache($cacheKey, $value)
+ {
+ $this->cache->save($cacheKey, $value);
+ if (! $this->debug) {
+ return;
+ }
+
+ $this->cache->save('[C]' . $cacheKey, time());
+ }
+
+ /**
+ * Checks if the cache is fresh.
+ *
+ * @param string $cacheKey
+ *
+ * @return bool
+ */
+ private function isCacheFresh($cacheKey, ReflectionClass $class)
+ {
+ $lastModification = $this->getLastModification($class);
+ if ($lastModification === 0) {
+ return true;
+ }
+
+ return $this->cache->fetch('[C]' . $cacheKey) >= $lastModification;
+ }
+
+ /**
+ * Returns the time the class was last modified, testing traits and parents
+ */
+ private function getLastModification(ReflectionClass $class): int
+ {
+ $filename = $class->getFileName();
+
+ if (isset($this->loadedFilemtimes[$filename])) {
+ return $this->loadedFilemtimes[$filename];
+ }
+
+ $parent = $class->getParentClass();
+
+ $lastModification = max(array_merge(
+ [$filename ? filemtime($filename) : 0],
+ array_map(function (ReflectionClass $reflectionTrait): int {
+ return $this->getTraitLastModificationTime($reflectionTrait);
+ }, $class->getTraits()),
+ array_map(function (ReflectionClass $class): int {
+ return $this->getLastModification($class);
+ }, $class->getInterfaces()),
+ $parent ? [$this->getLastModification($parent)] : []
+ ));
+
+ assert($lastModification !== false);
+
+ return $this->loadedFilemtimes[$filename] = $lastModification;
+ }
+
+ private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int
+ {
+ $fileName = $reflectionTrait->getFileName();
+
+ if (isset($this->loadedFilemtimes[$fileName])) {
+ return $this->loadedFilemtimes[$fileName];
+ }
+
+ $lastModificationTime = max(array_merge(
+ [$fileName ? filemtime($fileName) : 0],
+ array_map(function (ReflectionClass $reflectionTrait): int {
+ return $this->getTraitLastModificationTime($reflectionTrait);
+ }, $reflectionTrait->getTraits())
+ ));
+
+ assert($lastModificationTime !== false);
+
+ return $this->loadedFilemtimes[$fileName] = $lastModificationTime;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php
new file mode 100644
index 0000000..f6567c5
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocLexer.php
@@ -0,0 +1,129 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Lexer\AbstractLexer;
+
+use function ctype_alpha;
+use function is_numeric;
+use function str_replace;
+use function stripos;
+use function strlen;
+use function strpos;
+use function strtolower;
+use function substr;
+
+/**
+ * Simple lexer for docblock annotations.
+ */
+final class DocLexer extends AbstractLexer
+{
+ public const T_NONE = 1;
+ public const T_INTEGER = 2;
+ public const T_STRING = 3;
+ public const T_FLOAT = 4;
+
+ // All tokens that are also identifiers should be >= 100
+ public const T_IDENTIFIER = 100;
+ public const T_AT = 101;
+ public const T_CLOSE_CURLY_BRACES = 102;
+ public const T_CLOSE_PARENTHESIS = 103;
+ public const T_COMMA = 104;
+ public const T_EQUALS = 105;
+ public const T_FALSE = 106;
+ public const T_NAMESPACE_SEPARATOR = 107;
+ public const T_OPEN_CURLY_BRACES = 108;
+ public const T_OPEN_PARENTHESIS = 109;
+ public const T_TRUE = 110;
+ public const T_NULL = 111;
+ public const T_COLON = 112;
+ public const T_MINUS = 113;
+
+ /** @var array<string, int> */
+ protected $noCase = [
+ '@' => self::T_AT,
+ ',' => self::T_COMMA,
+ '(' => self::T_OPEN_PARENTHESIS,
+ ')' => self::T_CLOSE_PARENTHESIS,
+ '{' => self::T_OPEN_CURLY_BRACES,
+ '}' => self::T_CLOSE_CURLY_BRACES,
+ '=' => self::T_EQUALS,
+ ':' => self::T_COLON,
+ '-' => self::T_MINUS,
+ '\\' => self::T_NAMESPACE_SEPARATOR,
+ ];
+
+ /** @var array<string, int> */
+ protected $withCase = [
+ 'true' => self::T_TRUE,
+ 'false' => self::T_FALSE,
+ 'null' => self::T_NULL,
+ ];
+
+ /**
+ * Whether the next token starts immediately, or if there were
+ * non-captured symbols before that
+ */
+ public function nextTokenIsAdjacent(): bool
+ {
+ return $this->token === null
+ || ($this->lookahead !== null
+ && ($this->lookahead['position'] - $this->token['position']) === strlen($this->token['value']));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getCatchablePatterns()
+ {
+ return [
+ '[a-z_\\\][a-z0-9_\:\\\]*[a-z_][a-z0-9_]*',
+ '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?',
+ '"(?:""|[^"])*+"',
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getNonCatchablePatterns()
+ {
+ return ['\s+', '\*+', '(.)'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getType(&$value)
+ {
+ $type = self::T_NONE;
+
+ if ($value[0] === '"') {
+ $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2));
+
+ return self::T_STRING;
+ }
+
+ if (isset($this->noCase[$value])) {
+ return $this->noCase[$value];
+ }
+
+ if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) {
+ return self::T_IDENTIFIER;
+ }
+
+ $lowerValue = strtolower($value);
+
+ if (isset($this->withCase[$lowerValue])) {
+ return $this->withCase[$lowerValue];
+ }
+
+ // Checking numeric value
+ if (is_numeric($value)) {
+ return strpos($value, '.') !== false || stripos($value, 'e') !== false
+ ? self::T_FLOAT : self::T_INTEGER;
+ }
+
+ return $type;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
new file mode 100644
index 0000000..80f307c
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
@@ -0,0 +1,1487 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Annotations\Annotation\Attribute;
+use Doctrine\Common\Annotations\Annotation\Attributes;
+use Doctrine\Common\Annotations\Annotation\Enum;
+use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
+use Doctrine\Common\Annotations\Annotation\Target;
+use ReflectionClass;
+use ReflectionException;
+use ReflectionProperty;
+use RuntimeException;
+use stdClass;
+use Throwable;
+
+use function array_keys;
+use function array_map;
+use function array_pop;
+use function array_values;
+use function class_exists;
+use function constant;
+use function count;
+use function defined;
+use function explode;
+use function gettype;
+use function implode;
+use function in_array;
+use function interface_exists;
+use function is_array;
+use function is_object;
+use function json_encode;
+use function ltrim;
+use function preg_match;
+use function reset;
+use function rtrim;
+use function sprintf;
+use function stripos;
+use function strlen;
+use function strpos;
+use function strrpos;
+use function strtolower;
+use function substr;
+use function trim;
+
+use const PHP_VERSION_ID;
+
+/**
+ * A parser for docblock annotations.
+ *
+ * It is strongly discouraged to change the default annotation parsing process.
+ */
+final class DocParser
+{
+ /**
+ * An array of all valid tokens for a class name.
+ *
+ * @phpstan-var list<int>
+ */
+ private static $classIdentifiers = [
+ DocLexer::T_IDENTIFIER,
+ DocLexer::T_TRUE,
+ DocLexer::T_FALSE,
+ DocLexer::T_NULL,
+ ];
+
+ /**
+ * The lexer.
+ *
+ * @var DocLexer
+ */
+ private $lexer;
+
+ /**
+ * Current target context.
+ *
+ * @var int
+ */
+ private $target;
+
+ /**
+ * Doc parser used to collect annotation target.
+ *
+ * @var DocParser
+ */
+ private static $metadataParser;
+
+ /**
+ * Flag to control if the current annotation is nested or not.
+ *
+ * @var bool
+ */
+ private $isNestedAnnotation = false;
+
+ /**
+ * Hashmap containing all use-statements that are to be used when parsing
+ * the given doc block.
+ *
+ * @var array<string, class-string>
+ */
+ private $imports = [];
+
+ /**
+ * This hashmap is used internally to cache results of class_exists()
+ * look-ups.
+ *
+ * @var array<class-string, bool>
+ */
+ private $classExists = [];
+
+ /**
+ * Whether annotations that have not been imported should be ignored.
+ *
+ * @var bool
+ */
+ private $ignoreNotImportedAnnotations = false;
+
+ /**
+ * An array of default namespaces if operating in simple mode.
+ *
+ * @var string[]
+ */
+ private $namespaces = [];
+
+ /**
+ * A list with annotations that are not causing exceptions when not resolved to an annotation class.
+ *
+ * The names must be the raw names as used in the class, not the fully qualified
+ *
+ * @var bool[] indexed by annotation name
+ */
+ private $ignoredAnnotationNames = [];
+
+ /**
+ * A list with annotations in namespaced format
+ * that are not causing exceptions when not resolved to an annotation class.
+ *
+ * @var bool[] indexed by namespace name
+ */
+ private $ignoredAnnotationNamespaces = [];
+
+ /** @var string */
+ private $context = '';
+
+ /**
+ * Hash-map for caching annotation metadata.
+ *
+ * @var array<class-string, mixed[]>
+ */
+ private static $annotationMetadata = [
+ Annotation\Target::class => [
+ 'is_annotation' => true,
+ 'has_constructor' => true,
+ 'has_named_argument_constructor' => false,
+ 'properties' => [],
+ 'targets_literal' => 'ANNOTATION_CLASS',
+ 'targets' => Target::TARGET_CLASS,
+ 'default_property' => 'value',
+ 'attribute_types' => [
+ 'value' => [
+ 'required' => false,
+ 'type' => 'array',
+ 'array_type' => 'string',
+ 'value' => 'array<string>',
+ ],
+ ],
+ ],
+ Annotation\Attribute::class => [
+ 'is_annotation' => true,
+ 'has_constructor' => false,
+ 'has_named_argument_constructor' => false,
+ 'targets_literal' => 'ANNOTATION_ANNOTATION',
+ 'targets' => Target::TARGET_ANNOTATION,
+ 'default_property' => 'name',
+ 'properties' => [
+ 'name' => 'name',
+ 'type' => 'type',
+ 'required' => 'required',
+ ],
+ 'attribute_types' => [
+ 'value' => [
+ 'required' => true,
+ 'type' => 'string',
+ 'value' => 'string',
+ ],
+ 'type' => [
+ 'required' => true,
+ 'type' => 'string',
+ 'value' => 'string',
+ ],
+ 'required' => [
+ 'required' => false,
+ 'type' => 'boolean',
+ 'value' => 'boolean',
+ ],
+ ],
+ ],
+ Annotation\Attributes::class => [
+ 'is_annotation' => true,
+ 'has_constructor' => false,
+ 'has_named_argument_constructor' => false,
+ 'targets_literal' => 'ANNOTATION_CLASS',
+ 'targets' => Target::TARGET_CLASS,
+ 'default_property' => 'value',
+ 'properties' => ['value' => 'value'],
+ 'attribute_types' => [
+ 'value' => [
+ 'type' => 'array',
+ 'required' => true,
+ 'array_type' => Annotation\Attribute::class,
+ 'value' => 'array<' . Annotation\Attribute::class . '>',
+ ],
+ ],
+ ],
+ Annotation\Enum::class => [
+ 'is_annotation' => true,
+ 'has_constructor' => true,
+ 'has_named_argument_constructor' => false,
+ 'targets_literal' => 'ANNOTATION_PROPERTY',
+ 'targets' => Target::TARGET_PROPERTY,
+ 'default_property' => 'value',
+ 'properties' => ['value' => 'value'],
+ 'attribute_types' => [
+ 'value' => [
+ 'type' => 'array',
+ 'required' => true,
+ ],
+ 'literal' => [
+ 'type' => 'array',
+ 'required' => false,
+ ],
+ ],
+ ],
+ Annotation\NamedArgumentConstructor::class => [
+ 'is_annotation' => true,
+ 'has_constructor' => false,
+ 'has_named_argument_constructor' => false,
+ 'targets_literal' => 'ANNOTATION_CLASS',
+ 'targets' => Target::TARGET_CLASS,
+ 'default_property' => null,
+ 'properties' => [],
+ 'attribute_types' => [],
+ ],
+ ];
+
+ /**
+ * Hash-map for handle types declaration.
+ *
+ * @var array<string, string>
+ */
+ private static $typeMap = [
+ 'float' => 'double',
+ 'bool' => 'boolean',
+ // allow uppercase Boolean in honor of George Boole
+ 'Boolean' => 'boolean',
+ 'int' => 'integer',
+ ];
+
+ /**
+ * Constructs a new DocParser.
+ */
+ public function __construct()
+ {
+ $this->lexer = new DocLexer();
+ }
+
+ /**
+ * Sets the annotation names that are ignored during the parsing process.
+ *
+ * The names are supposed to be the raw names as used in the class, not the
+ * fully qualified class names.
+ *
+ * @param bool[] $names indexed by annotation name
+ *
+ * @return void
+ */
+ public function setIgnoredAnnotationNames(array $names)
+ {
+ $this->ignoredAnnotationNames = $names;
+ }
+
+ /**
+ * Sets the annotation namespaces that are ignored during the parsing process.
+ *
+ * @param bool[] $ignoredAnnotationNamespaces indexed by annotation namespace name
+ *
+ * @return void
+ */
+ public function setIgnoredAnnotationNamespaces($ignoredAnnotationNamespaces)
+ {
+ $this->ignoredAnnotationNamespaces = $ignoredAnnotationNamespaces;
+ }
+
+ /**
+ * Sets ignore on not-imported annotations.
+ *
+ * @param bool $bool
+ *
+ * @return void
+ */
+ public function setIgnoreNotImportedAnnotations($bool)
+ {
+ $this->ignoreNotImportedAnnotations = (bool) $bool;
+ }
+
+ /**
+ * Sets the default namespaces.
+ *
+ * @param string $namespace
+ *
+ * @return void
+ *
+ * @throws RuntimeException
+ */
+ public function addNamespace($namespace)
+ {
+ if ($this->imports) {
+ throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
+ }
+
+ $this->namespaces[] = $namespace;
+ }
+
+ /**
+ * Sets the imports.
+ *
+ * @param array<string, class-string> $imports
+ *
+ * @return void
+ *
+ * @throws RuntimeException
+ */
+ public function setImports(array $imports)
+ {
+ if ($this->namespaces) {
+ throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
+ }
+
+ $this->imports = $imports;
+ }
+
+ /**
+ * Sets current target context as bitmask.
+ *
+ * @param int $target
+ *
+ * @return void
+ */
+ public function setTarget($target)
+ {
+ $this->target = $target;
+ }
+
+ /**
+ * Parses the given docblock string for annotations.
+ *
+ * @param string $input The docblock string to parse.
+ * @param string $context The parsing context.
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ *
+ * @phpstan-return list<object> Array of annotations. If no annotations are found, an empty array is returned.
+ */
+ public function parse($input, $context = '')
+ {
+ $pos = $this->findInitialTokenPosition($input);
+ if ($pos === null) {
+ return [];
+ }
+
+ $this->context = $context;
+
+ $this->lexer->setInput(trim(substr($input, $pos), '* /'));
+ $this->lexer->moveNext();
+
+ return $this->Annotations();
+ }
+
+ /**
+ * Finds the first valid annotation
+ *
+ * @param string $input The docblock string to parse
+ */
+ private function findInitialTokenPosition($input): ?int
+ {
+ $pos = 0;
+
+ // search for first valid annotation
+ while (($pos = strpos($input, '@', $pos)) !== false) {
+ $preceding = substr($input, $pos - 1, 1);
+
+ // if the @ is preceded by a space, a tab or * it is valid
+ if ($pos === 0 || $preceding === ' ' || $preceding === '*' || $preceding === "\t") {
+ return $pos;
+ }
+
+ $pos++;
+ }
+
+ return null;
+ }
+
+ /**
+ * Attempts to match the given token with the current lookahead token.
+ * If they match, updates the lookahead token; otherwise raises a syntax error.
+ *
+ * @param int $token Type of token.
+ *
+ * @return bool True if tokens match; false otherwise.
+ *
+ * @throws AnnotationException
+ */
+ private function match(int $token): bool
+ {
+ if (! $this->lexer->isNextToken($token)) {
+ throw $this->syntaxError($this->lexer->getLiteral($token));
+ }
+
+ return $this->lexer->moveNext();
+ }
+
+ /**
+ * Attempts to match the current lookahead token with any of the given tokens.
+ *
+ * If any of them matches, this method updates the lookahead token; otherwise
+ * a syntax error is raised.
+ *
+ * @throws AnnotationException
+ *
+ * @phpstan-param list<mixed[]> $tokens
+ */
+ private function matchAny(array $tokens): bool
+ {
+ if (! $this->lexer->isNextTokenAny($tokens)) {
+ throw $this->syntaxError(implode(' or ', array_map([$this->lexer, 'getLiteral'], $tokens)));
+ }
+
+ return $this->lexer->moveNext();
+ }
+
+ /**
+ * Generates a new syntax error.
+ *
+ * @param string $expected Expected string.
+ * @param mixed[]|null $token Optional token.
+ */
+ private function syntaxError(string $expected, ?array $token = null): AnnotationException
+ {
+ if ($token === null) {
+ $token = $this->lexer->lookahead;
+ }
+
+ $message = sprintf('Expected %s, got ', $expected);
+ $message .= $this->lexer->lookahead === null
+ ? 'end of string'
+ : sprintf("'%s' at position %s", $token['value'], $token['position']);
+
+ if (strlen($this->context)) {
+ $message .= ' in ' . $this->context;
+ }
+
+ $message .= '.';
+
+ return AnnotationException::syntaxError($message);
+ }
+
+ /**
+ * Attempts to check if a class exists or not. This never goes through the PHP autoloading mechanism
+ * but uses the {@link AnnotationRegistry} to load classes.
+ *
+ * @param class-string $fqcn
+ */
+ private function classExists(string $fqcn): bool
+ {
+ if (isset($this->classExists[$fqcn])) {
+ return $this->classExists[$fqcn];
+ }
+
+ // first check if the class already exists, maybe loaded through another AnnotationReader
+ if (class_exists($fqcn, false)) {
+ return $this->classExists[$fqcn] = true;
+ }
+
+ // final check, does this class exist?
+ return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn);
+ }
+
+ /**
+ * Collects parsing metadata for a given annotation class
+ *
+ * @param class-string $name The annotation name
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function collectAnnotationMetadata(string $name): void
+ {
+ if (self::$metadataParser === null) {
+ self::$metadataParser = new self();
+
+ self::$metadataParser->setIgnoreNotImportedAnnotations(true);
+ self::$metadataParser->setIgnoredAnnotationNames($this->ignoredAnnotationNames);
+ self::$metadataParser->setImports([
+ 'enum' => Enum::class,
+ 'target' => Target::class,
+ 'attribute' => Attribute::class,
+ 'attributes' => Attributes::class,
+ 'namedargumentconstructor' => NamedArgumentConstructor::class,
+ ]);
+
+ // Make sure that annotations from metadata are loaded
+ class_exists(Enum::class);
+ class_exists(Target::class);
+ class_exists(Attribute::class);
+ class_exists(Attributes::class);
+ class_exists(NamedArgumentConstructor::class);
+ }
+
+ $class = new ReflectionClass($name);
+ $docComment = $class->getDocComment();
+
+ // Sets default values for annotation metadata
+ $constructor = $class->getConstructor();
+ $metadata = [
+ 'default_property' => null,
+ 'has_constructor' => $constructor !== null && $constructor->getNumberOfParameters() > 0,
+ 'constructor_args' => [],
+ 'properties' => [],
+ 'property_types' => [],
+ 'attribute_types' => [],
+ 'targets_literal' => null,
+ 'targets' => Target::TARGET_ALL,
+ 'is_annotation' => strpos($docComment, '@Annotation') !== false,
+ ];
+
+ $metadata['has_named_argument_constructor'] = $metadata['has_constructor']
+ && $class->implementsInterface(NamedArgumentConstructorAnnotation::class);
+
+ // verify that the class is really meant to be an annotation
+ if ($metadata['is_annotation']) {
+ self::$metadataParser->setTarget(Target::TARGET_CLASS);
+
+ foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) {
+ if ($annotation instanceof Target) {
+ $metadata['targets'] = $annotation->targets;
+ $metadata['targets_literal'] = $annotation->literal;
+
+ continue;
+ }
+
+ if ($annotation instanceof NamedArgumentConstructor) {
+ $metadata['has_named_argument_constructor'] = $metadata['has_constructor'];
+ if ($metadata['has_named_argument_constructor']) {
+ // choose the first argument as the default property
+ $metadata['default_property'] = $constructor->getParameters()[0]->getName();
+ }
+ }
+
+ if (! ($annotation instanceof Attributes)) {
+ continue;
+ }
+
+ foreach ($annotation->value as $attribute) {
+ $this->collectAttributeTypeMetadata($metadata, $attribute);
+ }
+ }
+
+ // if not has a constructor will inject values into public properties
+ if ($metadata['has_constructor'] === false) {
+ // collect all public properties
+ foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
+ $metadata['properties'][$property->name] = $property->name;
+
+ $propertyComment = $property->getDocComment();
+ if ($propertyComment === false) {
+ continue;
+ }
+
+ $attribute = new Attribute();
+
+ $attribute->required = (strpos($propertyComment, '@Required') !== false);
+ $attribute->name = $property->name;
+ $attribute->type = (strpos($propertyComment, '@var') !== false &&
+ preg_match('/@var\s+([^\s]+)/', $propertyComment, $matches))
+ ? $matches[1]
+ : 'mixed';
+
+ $this->collectAttributeTypeMetadata($metadata, $attribute);
+
+ // checks if the property has @Enum
+ if (strpos($propertyComment, '@Enum') === false) {
+ continue;
+ }
+
+ $context = 'property ' . $class->name . '::$' . $property->name;
+
+ self::$metadataParser->setTarget(Target::TARGET_PROPERTY);
+
+ foreach (self::$metadataParser->parse($propertyComment, $context) as $annotation) {
+ if (! $annotation instanceof Enum) {
+ continue;
+ }
+
+ $metadata['enum'][$property->name]['value'] = $annotation->value;
+ $metadata['enum'][$property->name]['literal'] = (! empty($annotation->literal))
+ ? $annotation->literal
+ : $annotation->value;
+ }
+ }
+
+ // choose the first property as default property
+ $metadata['default_property'] = reset($metadata['properties']);
+ } elseif ($metadata['has_named_argument_constructor']) {
+ foreach ($constructor->getParameters() as $parameter) {
+ $metadata['constructor_args'][$parameter->getName()] = [
+ 'position' => $parameter->getPosition(),
+ 'default' => $parameter->isOptional() ? $parameter->getDefaultValue() : null,
+ ];
+ }
+ }
+ }
+
+ self::$annotationMetadata[$name] = $metadata;
+ }
+
+ /**
+ * Collects parsing metadata for a given attribute.
+ *
+ * @param mixed[] $metadata
+ */
+ private function collectAttributeTypeMetadata(array &$metadata, Attribute $attribute): void
+ {
+ // handle internal type declaration
+ $type = self::$typeMap[$attribute->type] ?? $attribute->type;
+
+ // handle the case if the property type is mixed
+ if ($type === 'mixed') {
+ return;
+ }
+
+ // Evaluate type
+ $pos = strpos($type, '<');
+ if ($pos !== false) {
+ // Checks if the property has array<type>
+ $arrayType = substr($type, $pos + 1, -1);
+ $type = 'array';
+
+ if (isset(self::$typeMap[$arrayType])) {
+ $arrayType = self::$typeMap[$arrayType];
+ }
+
+ $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType;
+ } else {
+ // Checks if the property has type[]
+ $pos = strrpos($type, '[');
+ if ($pos !== false) {
+ $arrayType = substr($type, 0, $pos);
+ $type = 'array';
+
+ if (isset(self::$typeMap[$arrayType])) {
+ $arrayType = self::$typeMap[$arrayType];
+ }
+
+ $metadata['attribute_types'][$attribute->name]['array_type'] = $arrayType;
+ }
+ }
+
+ $metadata['attribute_types'][$attribute->name]['type'] = $type;
+ $metadata['attribute_types'][$attribute->name]['value'] = $attribute->type;
+ $metadata['attribute_types'][$attribute->name]['required'] = $attribute->required;
+ }
+
+ /**
+ * Annotations ::= Annotation {[ "*" ]* [Annotation]}*
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ *
+ * @phpstan-return list<object>
+ */
+ private function Annotations(): array
+ {
+ $annotations = [];
+
+ while ($this->lexer->lookahead !== null) {
+ if ($this->lexer->lookahead['type'] !== DocLexer::T_AT) {
+ $this->lexer->moveNext();
+ continue;
+ }
+
+ // make sure the @ is preceded by non-catchable pattern
+ if (
+ $this->lexer->token !== null &&
+ $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen(
+ $this->lexer->token['value']
+ )
+ ) {
+ $this->lexer->moveNext();
+ continue;
+ }
+
+ // make sure the @ is followed by either a namespace separator, or
+ // an identifier token
+ $peek = $this->lexer->glimpse();
+ if (
+ ($peek === null)
+ || ($peek['type'] !== DocLexer::T_NAMESPACE_SEPARATOR && ! in_array(
+ $peek['type'],
+ self::$classIdentifiers,
+ true
+ ))
+ || $peek['position'] !== $this->lexer->lookahead['position'] + 1
+ ) {
+ $this->lexer->moveNext();
+ continue;
+ }
+
+ $this->isNestedAnnotation = false;
+ $annot = $this->Annotation();
+ if ($annot === false) {
+ continue;
+ }
+
+ $annotations[] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * Annotation ::= "@" AnnotationName MethodCall
+ * AnnotationName ::= QualifiedName | SimpleName
+ * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName
+ * NameSpacePart ::= identifier | null | false | true
+ * SimpleName ::= identifier | null | false | true
+ *
+ * @return object|false False if it is not a valid annotation.
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function Annotation()
+ {
+ $this->match(DocLexer::T_AT);
+
+ // check if we have an annotation
+ $name = $this->Identifier();
+
+ if (
+ $this->lexer->isNextToken(DocLexer::T_MINUS)
+ && $this->lexer->nextTokenIsAdjacent()
+ ) {
+ // Annotations with dashes, such as "@foo-" or "@foo-bar", are to be discarded
+ return false;
+ }
+
+ // only process names which are not fully qualified, yet
+ // fully qualified names must start with a \
+ $originalName = $name;
+
+ if ($name[0] !== '\\') {
+ $pos = strpos($name, '\\');
+ $alias = ($pos === false) ? $name : substr($name, 0, $pos);
+ $found = false;
+ $loweredAlias = strtolower($alias);
+
+ if ($this->namespaces) {
+ foreach ($this->namespaces as $namespace) {
+ if ($this->classExists($namespace . '\\' . $name)) {
+ $name = $namespace . '\\' . $name;
+ $found = true;
+ break;
+ }
+ }
+ } elseif (isset($this->imports[$loweredAlias])) {
+ $namespace = ltrim($this->imports[$loweredAlias], '\\');
+ $name = ($pos !== false)
+ ? $namespace . substr($name, $pos)
+ : $namespace;
+ $found = $this->classExists($name);
+ } elseif (
+ ! isset($this->ignoredAnnotationNames[$name])
+ && isset($this->imports['__NAMESPACE__'])
+ && $this->classExists($this->imports['__NAMESPACE__'] . '\\' . $name)
+ ) {
+ $name = $this->imports['__NAMESPACE__'] . '\\' . $name;
+ $found = true;
+ } elseif (! isset($this->ignoredAnnotationNames[$name]) && $this->classExists($name)) {
+ $found = true;
+ }
+
+ if (! $found) {
+ if ($this->isIgnoredAnnotation($name)) {
+ return false;
+ }
+
+ throw AnnotationException::semanticalError(sprintf(
+ <<<'EXCEPTION'
+The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?
+EXCEPTION
+ ,
+ $name,
+ $this->context
+ ));
+ }
+ }
+
+ $name = ltrim($name, '\\');
+
+ if (! $this->classExists($name)) {
+ throw AnnotationException::semanticalError(sprintf(
+ 'The annotation "@%s" in %s does not exist, or could not be auto-loaded.',
+ $name,
+ $this->context
+ ));
+ }
+
+ // at this point, $name contains the fully qualified class name of the
+ // annotation, and it is also guaranteed that this class exists, and
+ // that it is loaded
+
+ // collects the metadata annotation only if there is not yet
+ if (! isset(self::$annotationMetadata[$name])) {
+ $this->collectAnnotationMetadata($name);
+ }
+
+ // verify that the class is really meant to be an annotation and not just any ordinary class
+ if (self::$annotationMetadata[$name]['is_annotation'] === false) {
+ if ($this->isIgnoredAnnotation($originalName) || $this->isIgnoredAnnotation($name)) {
+ return false;
+ }
+
+ throw AnnotationException::semanticalError(sprintf(
+ <<<'EXCEPTION'
+The class "%s" is not annotated with @Annotation.
+Are you sure this class can be used as annotation?
+If so, then you need to add @Annotation to the _class_ doc comment of "%s".
+If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.
+EXCEPTION
+ ,
+ $name,
+ $name,
+ $originalName,
+ $this->context
+ ));
+ }
+
+ //if target is nested annotation
+ $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target;
+
+ // Next will be nested
+ $this->isNestedAnnotation = true;
+
+ //if annotation does not support current target
+ if ((self::$annotationMetadata[$name]['targets'] & $target) === 0 && $target) {
+ throw AnnotationException::semanticalError(
+ sprintf(
+ <<<'EXCEPTION'
+Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.
+EXCEPTION
+ ,
+ $originalName,
+ $this->context,
+ self::$annotationMetadata[$name]['targets_literal']
+ )
+ );
+ }
+
+ $arguments = $this->MethodCall();
+ $values = $this->resolvePositionalValues($arguments, $name);
+
+ if (isset(self::$annotationMetadata[$name]['enum'])) {
+ // checks all declared attributes
+ foreach (self::$annotationMetadata[$name]['enum'] as $property => $enum) {
+ // checks if the attribute is a valid enumerator
+ if (isset($values[$property]) && ! in_array($values[$property], $enum['value'])) {
+ throw AnnotationException::enumeratorError(
+ $property,
+ $name,
+ $this->context,
+ $enum['literal'],
+ $values[$property]
+ );
+ }
+ }
+ }
+
+ // checks all declared attributes
+ foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) {
+ if (
+ $property === self::$annotationMetadata[$name]['default_property']
+ && ! isset($values[$property]) && isset($values['value'])
+ ) {
+ $property = 'value';
+ }
+
+ // handle a not given attribute or null value
+ if (! isset($values[$property])) {
+ if ($type['required']) {
+ throw AnnotationException::requiredError(
+ $property,
+ $originalName,
+ $this->context,
+ 'a(n) ' . $type['value']
+ );
+ }
+
+ continue;
+ }
+
+ if ($type['type'] === 'array') {
+ // handle the case of a single value
+ if (! is_array($values[$property])) {
+ $values[$property] = [$values[$property]];
+ }
+
+ // checks if the attribute has array type declaration, such as "array<string>"
+ if (isset($type['array_type'])) {
+ foreach ($values[$property] as $item) {
+ if (gettype($item) !== $type['array_type'] && ! $item instanceof $type['array_type']) {
+ throw AnnotationException::attributeTypeError(
+ $property,
+ $originalName,
+ $this->context,
+ 'either a(n) ' . $type['array_type'] . ', or an array of ' . $type['array_type'] . 's',
+ $item
+ );
+ }
+ }
+ }
+ } elseif (gettype($values[$property]) !== $type['type'] && ! $values[$property] instanceof $type['type']) {
+ throw AnnotationException::attributeTypeError(
+ $property,
+ $originalName,
+ $this->context,
+ 'a(n) ' . $type['value'],
+ $values[$property]
+ );
+ }
+ }
+
+ if (self::$annotationMetadata[$name]['has_named_argument_constructor']) {
+ if (PHP_VERSION_ID >= 80000) {
+ return $this->instantiateAnnotiation($originalName, $this->context, $name, $values);
+ }
+
+ $positionalValues = [];
+ foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) {
+ $positionalValues[$parameter['position']] = $parameter['default'];
+ }
+
+ foreach ($values as $property => $value) {
+ if (! isset(self::$annotationMetadata[$name]['constructor_args'][$property])) {
+ throw AnnotationException::creationError(sprintf(
+ <<<'EXCEPTION'
+The annotation @%s declared on %s does not have a property named "%s"
+that can be set through its named arguments constructor.
+Available named arguments: %s
+EXCEPTION
+ ,
+ $originalName,
+ $this->context,
+ $property,
+ implode(', ', array_keys(self::$annotationMetadata[$name]['constructor_args']))
+ ));
+ }
+
+ $positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value;
+ }
+
+ return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues);
+ }
+
+ // check if the annotation expects values via the constructor,
+ // or directly injected into public properties
+ if (self::$annotationMetadata[$name]['has_constructor'] === true) {
+ return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]);
+ }
+
+ $instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []);
+
+ foreach ($values as $property => $value) {
+ if (! isset(self::$annotationMetadata[$name]['properties'][$property])) {
+ if ($property !== 'value') {
+ throw AnnotationException::creationError(sprintf(
+ <<<'EXCEPTION'
+The annotation @%s declared on %s does not have a property named "%s".
+Available properties: %s
+EXCEPTION
+ ,
+ $originalName,
+ $this->context,
+ $property,
+ implode(', ', self::$annotationMetadata[$name]['properties'])
+ ));
+ }
+
+ // handle the case if the property has no annotations
+ $property = self::$annotationMetadata[$name]['default_property'];
+ if (! $property) {
+ throw AnnotationException::creationError(sprintf(
+ 'The annotation @%s declared on %s does not accept any values, but got %s.',
+ $originalName,
+ $this->context,
+ json_encode($values)
+ ));
+ }
+ }
+
+ $instance->{$property} = $value;
+ }
+
+ return $instance;
+ }
+
+ /**
+ * MethodCall ::= ["(" [Values] ")"]
+ *
+ * @return mixed[]
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function MethodCall(): array
+ {
+ $values = [];
+
+ if (! $this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) {
+ return $values;
+ }
+
+ $this->match(DocLexer::T_OPEN_PARENTHESIS);
+
+ if (! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {
+ $values = $this->Values();
+ }
+
+ $this->match(DocLexer::T_CLOSE_PARENTHESIS);
+
+ return $values;
+ }
+
+ /**
+ * Values ::= Array | Value {"," Value}* [","]
+ *
+ * @return mixed[]
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function Values(): array
+ {
+ $values = [$this->Value()];
+
+ while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
+ $this->match(DocLexer::T_COMMA);
+
+ if ($this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {
+ break;
+ }
+
+ $token = $this->lexer->lookahead;
+ $value = $this->Value();
+
+ $values[] = $value;
+ }
+
+ $namedArguments = [];
+ $positionalArguments = [];
+ foreach ($values as $k => $value) {
+ if (is_object($value) && $value instanceof stdClass) {
+ $namedArguments[$value->name] = $value->value;
+ } else {
+ $positionalArguments[$k] = $value;
+ }
+ }
+
+ return ['named_arguments' => $namedArguments, 'positional_arguments' => $positionalArguments];
+ }
+
+ /**
+ * Constant ::= integer | string | float | boolean
+ *
+ * @return mixed
+ *
+ * @throws AnnotationException
+ */
+ private function Constant()
+ {
+ $identifier = $this->Identifier();
+
+ if (! defined($identifier) && strpos($identifier, '::') !== false && $identifier[0] !== '\\') {
+ [$className, $const] = explode('::', $identifier);
+
+ $pos = strpos($className, '\\');
+ $alias = ($pos === false) ? $className : substr($className, 0, $pos);
+ $found = false;
+ $loweredAlias = strtolower($alias);
+
+ switch (true) {
+ case ! empty($this->namespaces):
+ foreach ($this->namespaces as $ns) {
+ if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) {
+ $className = $ns . '\\' . $className;
+ $found = true;
+ break;
+ }
+ }
+
+ break;
+
+ case isset($this->imports[$loweredAlias]):
+ $found = true;
+ $className = ($pos !== false)
+ ? $this->imports[$loweredAlias] . substr($className, $pos)
+ : $this->imports[$loweredAlias];
+ break;
+
+ default:
+ if (isset($this->imports['__NAMESPACE__'])) {
+ $ns = $this->imports['__NAMESPACE__'];
+
+ if (class_exists($ns . '\\' . $className) || interface_exists($ns . '\\' . $className)) {
+ $className = $ns . '\\' . $className;
+ $found = true;
+ }
+ }
+
+ break;
+ }
+
+ if ($found) {
+ $identifier = $className . '::' . $const;
+ }
+ }
+
+ /**
+ * Checks if identifier ends with ::class and remove the leading backslash if it exists.
+ */
+ if (
+ $this->identifierEndsWithClassConstant($identifier) &&
+ ! $this->identifierStartsWithBackslash($identifier)
+ ) {
+ return substr($identifier, 0, $this->getClassConstantPositionInIdentifier($identifier));
+ }
+
+ if ($this->identifierEndsWithClassConstant($identifier) && $this->identifierStartsWithBackslash($identifier)) {
+ return substr($identifier, 1, $this->getClassConstantPositionInIdentifier($identifier) - 1);
+ }
+
+ if (! defined($identifier)) {
+ throw AnnotationException::semanticalErrorConstants($identifier, $this->context);
+ }
+
+ return constant($identifier);
+ }
+
+ private function identifierStartsWithBackslash(string $identifier): bool
+ {
+ return $identifier[0] === '\\';
+ }
+
+ private function identifierEndsWithClassConstant(string $identifier): bool
+ {
+ return $this->getClassConstantPositionInIdentifier($identifier) === strlen($identifier) - strlen('::class');
+ }
+
+ /**
+ * @return int|false
+ */
+ private function getClassConstantPositionInIdentifier(string $identifier)
+ {
+ return stripos($identifier, '::class');
+ }
+
+ /**
+ * Identifier ::= string
+ *
+ * @throws AnnotationException
+ */
+ private function Identifier(): string
+ {
+ // check if we have an annotation
+ if (! $this->lexer->isNextTokenAny(self::$classIdentifiers)) {
+ throw $this->syntaxError('namespace separator or identifier');
+ }
+
+ $this->lexer->moveNext();
+
+ $className = $this->lexer->token['value'];
+
+ while (
+ $this->lexer->lookahead !== null &&
+ $this->lexer->lookahead['position'] === ($this->lexer->token['position'] +
+ strlen($this->lexer->token['value'])) &&
+ $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)
+ ) {
+ $this->match(DocLexer::T_NAMESPACE_SEPARATOR);
+ $this->matchAny(self::$classIdentifiers);
+
+ $className .= '\\' . $this->lexer->token['value'];
+ }
+
+ return $className;
+ }
+
+ /**
+ * Value ::= PlainValue | FieldAssignment
+ *
+ * @return mixed
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function Value()
+ {
+ $peek = $this->lexer->glimpse();
+
+ if ($peek['type'] === DocLexer::T_EQUALS) {
+ return $this->FieldAssignment();
+ }
+
+ return $this->PlainValue();
+ }
+
+ /**
+ * PlainValue ::= integer | string | float | boolean | Array | Annotation
+ *
+ * @return mixed
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function PlainValue()
+ {
+ if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {
+ return $this->Arrayx();
+ }
+
+ if ($this->lexer->isNextToken(DocLexer::T_AT)) {
+ return $this->Annotation();
+ }
+
+ if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) {
+ return $this->Constant();
+ }
+
+ switch ($this->lexer->lookahead['type']) {
+ case DocLexer::T_STRING:
+ $this->match(DocLexer::T_STRING);
+
+ return $this->lexer->token['value'];
+
+ case DocLexer::T_INTEGER:
+ $this->match(DocLexer::T_INTEGER);
+
+ return (int) $this->lexer->token['value'];
+
+ case DocLexer::T_FLOAT:
+ $this->match(DocLexer::T_FLOAT);
+
+ return (float) $this->lexer->token['value'];
+
+ case DocLexer::T_TRUE:
+ $this->match(DocLexer::T_TRUE);
+
+ return true;
+
+ case DocLexer::T_FALSE:
+ $this->match(DocLexer::T_FALSE);
+
+ return false;
+
+ case DocLexer::T_NULL:
+ $this->match(DocLexer::T_NULL);
+
+ return null;
+
+ default:
+ throw $this->syntaxError('PlainValue');
+ }
+ }
+
+ /**
+ * FieldAssignment ::= FieldName "=" PlainValue
+ * FieldName ::= identifier
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function FieldAssignment(): stdClass
+ {
+ $this->match(DocLexer::T_IDENTIFIER);
+ $fieldName = $this->lexer->token['value'];
+
+ $this->match(DocLexer::T_EQUALS);
+
+ $item = new stdClass();
+ $item->name = $fieldName;
+ $item->value = $this->PlainValue();
+
+ return $item;
+ }
+
+ /**
+ * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}"
+ *
+ * @return mixed[]
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ */
+ private function Arrayx(): array
+ {
+ $array = $values = [];
+
+ $this->match(DocLexer::T_OPEN_CURLY_BRACES);
+
+ // If the array is empty, stop parsing and return.
+ if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
+ $this->match(DocLexer::T_CLOSE_CURLY_BRACES);
+
+ return $array;
+ }
+
+ $values[] = $this->ArrayEntry();
+
+ while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
+ $this->match(DocLexer::T_COMMA);
+
+ // optional trailing comma
+ if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
+ break;
+ }
+
+ $values[] = $this->ArrayEntry();
+ }
+
+ $this->match(DocLexer::T_CLOSE_CURLY_BRACES);
+
+ foreach ($values as $value) {
+ [$key, $val] = $value;
+
+ if ($key !== null) {
+ $array[$key] = $val;
+ } else {
+ $array[] = $val;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * ArrayEntry ::= Value | KeyValuePair
+ * KeyValuePair ::= Key ("=" | ":") PlainValue | Constant
+ * Key ::= string | integer | Constant
+ *
+ * @throws AnnotationException
+ * @throws ReflectionException
+ *
+ * @phpstan-return array{mixed, mixed}
+ */
+ private function ArrayEntry(): array
+ {
+ $peek = $this->lexer->glimpse();
+
+ if (
+ $peek['type'] === DocLexer::T_EQUALS
+ || $peek['type'] === DocLexer::T_COLON
+ ) {
+ if ($this->lexer->isNextToken(DocLexer::T_IDENTIFIER)) {
+ $key = $this->Constant();
+ } else {
+ $this->matchAny([DocLexer::T_INTEGER, DocLexer::T_STRING]);
+ $key = $this->lexer->token['value'];
+ }
+
+ $this->matchAny([DocLexer::T_EQUALS, DocLexer::T_COLON]);
+
+ return [$key, $this->PlainValue()];
+ }
+
+ return [null, $this->Value()];
+ }
+
+ /**
+ * Checks whether the given $name matches any ignored annotation name or namespace
+ */
+ private function isIgnoredAnnotation(string $name): bool
+ {
+ if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) {
+ return true;
+ }
+
+ foreach (array_keys($this->ignoredAnnotationNamespaces) as $ignoredAnnotationNamespace) {
+ $ignoredAnnotationNamespace = rtrim($ignoredAnnotationNamespace, '\\') . '\\';
+
+ if (stripos(rtrim($name, '\\') . '\\', $ignoredAnnotationNamespace) === 0) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Resolve positional arguments (without name) to named ones
+ *
+ * @param array<string,mixed> $arguments
+ *
+ * @return array<string,mixed>
+ */
+ private function resolvePositionalValues(array $arguments, string $name): array
+ {
+ $positionalArguments = $arguments['positional_arguments'] ?? [];
+ $values = $arguments['named_arguments'] ?? [];
+
+ if (
+ self::$annotationMetadata[$name]['has_named_argument_constructor']
+ && self::$annotationMetadata[$name]['default_property'] !== null
+ ) {
+ // We must ensure that we don't have positional arguments after named ones
+ $positions = array_keys($positionalArguments);
+ $lastPosition = null;
+ foreach ($positions as $position) {
+ if (
+ ($lastPosition === null && $position !== 0) ||
+ ($lastPosition !== null && $position !== $lastPosition + 1)
+ ) {
+ throw $this->syntaxError('Positional arguments after named arguments is not allowed');
+ }
+
+ $lastPosition = $position;
+ }
+
+ foreach (self::$annotationMetadata[$name]['constructor_args'] as $property => $parameter) {
+ $position = $parameter['position'];
+ if (isset($values[$property]) || ! isset($positionalArguments[$position])) {
+ continue;
+ }
+
+ $values[$property] = $positionalArguments[$position];
+ }
+ } else {
+ if (count($positionalArguments) > 0 && ! isset($values['value'])) {
+ if (count($positionalArguments) === 1) {
+ $value = array_pop($positionalArguments);
+ } else {
+ $value = array_values($positionalArguments);
+ }
+
+ $values['value'] = $value;
+ }
+ }
+
+ return $values;
+ }
+
+ /**
+ * Try to instantiate the annotation and catch and process any exceptions related to failure
+ *
+ * @param class-string $name
+ * @param array<string,mixed> $arguments
+ *
+ * @return object
+ *
+ * @throws AnnotationException
+ */
+ private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments)
+ {
+ try {
+ return new $name(...$arguments);
+ } catch (Throwable $exception) {
+ throw AnnotationException::creationError(
+ sprintf(
+ 'An error occurred while instantiating the annotation @%s declared on %s: "%s".',
+ $originalName,
+ $context,
+ $exception->getMessage()
+ ),
+ $exception
+ );
+ }
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php
new file mode 100644
index 0000000..6c6c22c
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php
@@ -0,0 +1,315 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use InvalidArgumentException;
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+use RuntimeException;
+
+use function chmod;
+use function file_put_contents;
+use function filemtime;
+use function gettype;
+use function is_dir;
+use function is_file;
+use function is_int;
+use function is_writable;
+use function mkdir;
+use function rename;
+use function rtrim;
+use function serialize;
+use function sha1;
+use function sprintf;
+use function strtr;
+use function tempnam;
+use function uniqid;
+use function unlink;
+use function var_export;
+
+/**
+ * File cache reader for annotations.
+ *
+ * @deprecated the FileCacheReader is deprecated and will be removed
+ * in version 2.0.0 of doctrine/annotations. Please use the
+ * {@see \Doctrine\Common\Annotations\PsrCachedReader} instead.
+ */
+class FileCacheReader implements Reader
+{
+ /** @var Reader */
+ private $reader;
+
+ /** @var string */
+ private $dir;
+
+ /** @var bool */
+ private $debug;
+
+ /** @phpstan-var array<string, list<object>> */
+ private $loadedAnnotations = [];
+
+ /** @var array<string, string> */
+ private $classNameHashes = [];
+
+ /** @var int */
+ private $umask;
+
+ /**
+ * @param string $cacheDir
+ * @param bool $debug
+ * @param int $umask
+ *
+ * @throws InvalidArgumentException
+ */
+ public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 0002)
+ {
+ if (! is_int($umask)) {
+ throw new InvalidArgumentException(sprintf(
+ 'The parameter umask must be an integer, was: %s',
+ gettype($umask)
+ ));
+ }
+
+ $this->reader = $reader;
+ $this->umask = $umask;
+
+ if (! is_dir($cacheDir) && ! @mkdir($cacheDir, 0777 & (~$this->umask), true)) {
+ throw new InvalidArgumentException(sprintf(
+ 'The directory "%s" does not exist and could not be created.',
+ $cacheDir
+ ));
+ }
+
+ $this->dir = rtrim($cacheDir, '\\/');
+ $this->debug = $debug;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ if (! isset($this->classNameHashes[$class->name])) {
+ $this->classNameHashes[$class->name] = sha1($class->name);
+ }
+
+ $key = $this->classNameHashes[$class->name];
+
+ if (isset($this->loadedAnnotations[$key])) {
+ return $this->loadedAnnotations[$key];
+ }
+
+ $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php';
+ if (! is_file($path)) {
+ $annot = $this->reader->getClassAnnotations($class);
+ $this->saveCacheFile($path, $annot);
+
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ $filename = $class->getFilename();
+ if (
+ $this->debug
+ && $filename !== false
+ && filemtime($path) < filemtime($filename)
+ ) {
+ @unlink($path);
+
+ $annot = $this->reader->getClassAnnotations($class);
+ $this->saveCacheFile($path, $annot);
+
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ return $this->loadedAnnotations[$key] = include $path;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ if (! isset($this->classNameHashes[$class->name])) {
+ $this->classNameHashes[$class->name] = sha1($class->name);
+ }
+
+ $key = $this->classNameHashes[$class->name] . '$' . $property->getName();
+
+ if (isset($this->loadedAnnotations[$key])) {
+ return $this->loadedAnnotations[$key];
+ }
+
+ $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php';
+ if (! is_file($path)) {
+ $annot = $this->reader->getPropertyAnnotations($property);
+ $this->saveCacheFile($path, $annot);
+
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ $filename = $class->getFilename();
+ if (
+ $this->debug
+ && $filename !== false
+ && filemtime($path) < filemtime($filename)
+ ) {
+ @unlink($path);
+
+ $annot = $this->reader->getPropertyAnnotations($property);
+ $this->saveCacheFile($path, $annot);
+
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ return $this->loadedAnnotations[$key] = include $path;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ if (! isset($this->classNameHashes[$class->name])) {
+ $this->classNameHashes[$class->name] = sha1($class->name);
+ }
+
+ $key = $this->classNameHashes[$class->name] . '#' . $method->getName();
+
+ if (isset($this->loadedAnnotations[$key])) {
+ return $this->loadedAnnotations[$key];
+ }
+
+ $path = $this->dir . '/' . strtr($key, '\\', '-') . '.cache.php';
+ if (! is_file($path)) {
+ $annot = $this->reader->getMethodAnnotations($method);
+ $this->saveCacheFile($path, $annot);
+
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ $filename = $class->getFilename();
+ if (
+ $this->debug
+ && $filename !== false
+ && filemtime($path) < filemtime($filename)
+ ) {
+ @unlink($path);
+
+ $annot = $this->reader->getMethodAnnotations($method);
+ $this->saveCacheFile($path, $annot);
+
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ return $this->loadedAnnotations[$key] = include $path;
+ }
+
+ /**
+ * Saves the cache file.
+ *
+ * @param string $path
+ * @param mixed $data
+ *
+ * @return void
+ */
+ private function saveCacheFile($path, $data)
+ {
+ if (! is_writable($this->dir)) {
+ throw new InvalidArgumentException(sprintf(
+ <<<'EXCEPTION'
+The directory "%s" is not writable. Both the webserver and the console user need access.
+You can manage access rights for multiple users with "chmod +a".
+If your system does not support this, check out the acl package.,
+EXCEPTION
+ ,
+ $this->dir
+ ));
+ }
+
+ $tempfile = tempnam($this->dir, uniqid('', true));
+
+ if ($tempfile === false) {
+ throw new RuntimeException(sprintf('Unable to create tempfile in directory: %s', $this->dir));
+ }
+
+ @chmod($tempfile, 0666 & (~$this->umask));
+
+ $written = file_put_contents(
+ $tempfile,
+ '<?php return unserialize(' . var_export(serialize($data), true) . ');'
+ );
+
+ if ($written === false) {
+ throw new RuntimeException(sprintf('Unable to write cached file to: %s', $tempfile));
+ }
+
+ @chmod($tempfile, 0666 & (~$this->umask));
+
+ if (rename($tempfile, $path) === false) {
+ @unlink($tempfile);
+
+ throw new RuntimeException(sprintf('Unable to rename %s to %s', $tempfile, $path));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ $annotations = $this->getClassAnnotations($class);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ $annotations = $this->getMethodAnnotations($method);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ $annotations = $this->getPropertyAnnotations($property);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Clears loaded annotations.
+ *
+ * @return void
+ */
+ public function clearLoadedAnnotations()
+ {
+ $this->loadedAnnotations = [];
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php
new file mode 100644
index 0000000..ab27f8a
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/ImplicitlyIgnoredAnnotationNames.php
@@ -0,0 +1,178 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Doctrine\Common\Annotations;
+
+/**
+ * A list of annotations that are implicitly ignored during the parsing process.
+ *
+ * All names are case sensitive.
+ */
+final class ImplicitlyIgnoredAnnotationNames
+{
+ private const Reserved = [
+ 'Annotation' => true,
+ 'Attribute' => true,
+ 'Attributes' => true,
+ /* Can we enable this? 'Enum' => true, */
+ 'Required' => true,
+ 'Target' => true,
+ 'NamedArgumentConstructor' => true,
+ ];
+
+ private const WidelyUsedNonStandard = [
+ 'fix' => true,
+ 'fixme' => true,
+ 'override' => true,
+ ];
+
+ private const PhpDocumentor1 = [
+ 'abstract' => true,
+ 'access' => true,
+ 'code' => true,
+ 'deprec' => true,
+ 'endcode' => true,
+ 'exception' => true,
+ 'final' => true,
+ 'ingroup' => true,
+ 'inheritdoc' => true,
+ 'inheritDoc' => true,
+ 'magic' => true,
+ 'name' => true,
+ 'private' => true,
+ 'static' => true,
+ 'staticvar' => true,
+ 'staticVar' => true,
+ 'toc' => true,
+ 'tutorial' => true,
+ 'throw' => true,
+ ];
+
+ private const PhpDocumentor2 = [
+ 'api' => true,
+ 'author' => true,
+ 'category' => true,
+ 'copyright' => true,
+ 'deprecated' => true,
+ 'example' => true,
+ 'filesource' => true,
+ 'global' => true,
+ 'ignore' => true,
+ /* Can we enable this? 'index' => true, */
+ 'internal' => true,
+ 'license' => true,
+ 'link' => true,
+ 'method' => true,
+ 'package' => true,
+ 'param' => true,
+ 'property' => true,
+ 'property-read' => true,
+ 'property-write' => true,
+ 'return' => true,
+ 'see' => true,
+ 'since' => true,
+ 'source' => true,
+ 'subpackage' => true,
+ 'throws' => true,
+ 'todo' => true,
+ 'TODO' => true,
+ 'usedby' => true,
+ 'uses' => true,
+ 'var' => true,
+ 'version' => true,
+ ];
+
+ private const PHPUnit = [
+ 'author' => true,
+ 'after' => true,
+ 'afterClass' => true,
+ 'backupGlobals' => true,
+ 'backupStaticAttributes' => true,
+ 'before' => true,
+ 'beforeClass' => true,
+ 'codeCoverageIgnore' => true,
+ 'codeCoverageIgnoreStart' => true,
+ 'codeCoverageIgnoreEnd' => true,
+ 'covers' => true,
+ 'coversDefaultClass' => true,
+ 'coversNothing' => true,
+ 'dataProvider' => true,
+ 'depends' => true,
+ 'doesNotPerformAssertions' => true,
+ 'expectedException' => true,
+ 'expectedExceptionCode' => true,
+ 'expectedExceptionMessage' => true,
+ 'expectedExceptionMessageRegExp' => true,
+ 'group' => true,
+ 'large' => true,
+ 'medium' => true,
+ 'preserveGlobalState' => true,
+ 'requires' => true,
+ 'runTestsInSeparateProcesses' => true,
+ 'runInSeparateProcess' => true,
+ 'small' => true,
+ 'test' => true,
+ 'testdox' => true,
+ 'testWith' => true,
+ 'ticket' => true,
+ 'uses' => true,
+ ];
+
+ private const PhpCheckStyle = ['SuppressWarnings' => true];
+
+ private const PhpStorm = ['noinspection' => true];
+
+ private const PEAR = ['package_version' => true];
+
+ private const PlainUML = [
+ 'startuml' => true,
+ 'enduml' => true,
+ ];
+
+ private const Symfony = ['experimental' => true];
+
+ private const PhpCodeSniffer = [
+ 'codingStandardsIgnoreStart' => true,
+ 'codingStandardsIgnoreEnd' => true,
+ ];
+
+ private const SlevomatCodingStandard = ['phpcsSuppress' => true];
+
+ private const Phan = ['suppress' => true];
+
+ private const Rector = ['noRector' => true];
+
+ private const StaticAnalysis = [
+ // PHPStan, Psalm
+ 'extends' => true,
+ 'implements' => true,
+ 'readonly' => true,
+ 'template' => true,
+ 'use' => true,
+
+ // Psalm
+ 'pure' => true,
+ 'immutable' => true,
+ ];
+
+ public const LIST = self::Reserved
+ + self::WidelyUsedNonStandard
+ + self::PhpDocumentor1
+ + self::PhpDocumentor2
+ + self::PHPUnit
+ + self::PhpCheckStyle
+ + self::PhpStorm
+ + self::PEAR
+ + self::PlainUML
+ + self::Symfony
+ + self::SlevomatCodingStandard
+ + self::PhpCodeSniffer
+ + self::Phan
+ + self::Rector
+ + self::StaticAnalysis;
+
+ private function __construct()
+ {
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php
new file mode 100644
index 0000000..62dcf74
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php
@@ -0,0 +1,100 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+
+use function call_user_func_array;
+use function get_class;
+
+/**
+ * Allows the reader to be used in-place of Doctrine's reader.
+ */
+class IndexedReader implements Reader
+{
+ /** @var Reader */
+ private $delegate;
+
+ public function __construct(Reader $reader)
+ {
+ $this->delegate = $reader;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ $annotations = [];
+ foreach ($this->delegate->getClassAnnotations($class) as $annot) {
+ $annotations[get_class($annot)] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ return $this->delegate->getClassAnnotation($class, $annotationName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ $annotations = [];
+ foreach ($this->delegate->getMethodAnnotations($method) as $annot) {
+ $annotations[get_class($annot)] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ return $this->delegate->getMethodAnnotation($method, $annotationName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ $annotations = [];
+ foreach ($this->delegate->getPropertyAnnotations($property) as $annot) {
+ $annotations[get_class($annot)] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ return $this->delegate->getPropertyAnnotation($property, $annotationName);
+ }
+
+ /**
+ * Proxies all methods to the delegate.
+ *
+ * @param string $method
+ * @param mixed[] $args
+ *
+ * @return mixed
+ */
+ public function __call($method, $args)
+ {
+ return call_user_func_array([$this->delegate, $method], $args);
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php
new file mode 100644
index 0000000..8af224c
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/NamedArgumentConstructorAnnotation.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+/**
+ * Marker interface for PHP7/PHP8 compatible support
+ * for named arguments (and constructor property promotion).
+ *
+ * @deprecated Implementing this interface is deprecated
+ * Use the Annotation @NamedArgumentConstructor instead
+ */
+interface NamedArgumentConstructorAnnotation
+{
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php
new file mode 100644
index 0000000..d2263c0
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php
@@ -0,0 +1,92 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use ReflectionClass;
+use ReflectionFunction;
+use SplFileObject;
+
+use function is_file;
+use function method_exists;
+use function preg_quote;
+use function preg_replace;
+
+/**
+ * Parses a file for namespaces/use/class declarations.
+ */
+final class PhpParser
+{
+ /**
+ * Parses a class.
+ *
+ * @deprecated use parseUseStatements instead
+ *
+ * @param ReflectionClass $class A <code>ReflectionClass</code> object.
+ *
+ * @return array<string, class-string> A list with use statements in the form (Alias => FQN).
+ */
+ public function parseClass(ReflectionClass $class)
+ {
+ return $this->parseUseStatements($class);
+ }
+
+ /**
+ * Parse a class or function for use statements.
+ *
+ * @param ReflectionClass|ReflectionFunction $reflection
+ *
+ * @psalm-return array<string, string> a list with use statements in the form (Alias => FQN).
+ */
+ public function parseUseStatements($reflection): array
+ {
+ if (method_exists($reflection, 'getUseStatements')) {
+ return $reflection->getUseStatements();
+ }
+
+ $filename = $reflection->getFileName();
+
+ if ($filename === false) {
+ return [];
+ }
+
+ $content = $this->getFileContent($filename, $reflection->getStartLine());
+
+ if ($content === null) {
+ return [];
+ }
+
+ $namespace = preg_quote($reflection->getNamespaceName());
+ $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content);
+ $tokenizer = new TokenParser('<?php ' . $content);
+
+ return $tokenizer->parseUseStatements($reflection->getNamespaceName());
+ }
+
+ /**
+ * Gets the content of the file right up to the given line number.
+ *
+ * @param string $filename The name of the file to load.
+ * @param int $lineNumber The number of lines to read from file.
+ *
+ * @return string|null The content of the file or null if the file does not exist.
+ */
+ private function getFileContent($filename, $lineNumber)
+ {
+ if (! is_file($filename)) {
+ return null;
+ }
+
+ $content = '';
+ $lineCnt = 0;
+ $file = new SplFileObject($filename);
+ while (! $file->eof()) {
+ if ($lineCnt++ === $lineNumber) {
+ break;
+ }
+
+ $content .= $file->fgets();
+ }
+
+ return $content;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php
new file mode 100644
index 0000000..a7099d5
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php
@@ -0,0 +1,232 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use Psr\Cache\CacheItemPoolInterface;
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+use Reflector;
+
+use function array_map;
+use function array_merge;
+use function assert;
+use function filemtime;
+use function max;
+use function rawurlencode;
+use function time;
+
+/**
+ * A cache aware annotation reader.
+ */
+final class PsrCachedReader implements Reader
+{
+ /** @var Reader */
+ private $delegate;
+
+ /** @var CacheItemPoolInterface */
+ private $cache;
+
+ /** @var bool */
+ private $debug;
+
+ /** @var array<string, array<object>> */
+ private $loadedAnnotations = [];
+
+ /** @var int[] */
+ private $loadedFilemtimes = [];
+
+ public function __construct(Reader $reader, CacheItemPoolInterface $cache, bool $debug = false)
+ {
+ $this->delegate = $reader;
+ $this->cache = $cache;
+ $this->debug = (bool) $debug;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ $cacheKey = $class->getName();
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class);
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ foreach ($this->getClassAnnotations($class) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $cacheKey = $class->getName() . '$' . $property->getName();
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ $annots = $this->fetchFromCache($cacheKey, $class, 'getPropertyAnnotations', $property);
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ foreach ($this->getPropertyAnnotations($property) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $cacheKey = $class->getName() . '#' . $method->getName();
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method);
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ foreach ($this->getMethodAnnotations($method) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ public function clearLoadedAnnotations(): void
+ {
+ $this->loadedAnnotations = [];
+ $this->loadedFilemtimes = [];
+ }
+
+ /** @return mixed[] */
+ private function fetchFromCache(
+ string $cacheKey,
+ ReflectionClass $class,
+ string $method,
+ Reflector $reflector
+ ): array {
+ $cacheKey = rawurlencode($cacheKey);
+
+ $item = $this->cache->getItem($cacheKey);
+ if (($this->debug && ! $this->refresh($cacheKey, $class)) || ! $item->isHit()) {
+ $this->cache->save($item->set($this->delegate->{$method}($reflector)));
+ }
+
+ return $item->get();
+ }
+
+ /**
+ * Used in debug mode to check if the cache is fresh.
+ *
+ * @return bool Returns true if the cache was fresh, or false if the class
+ * being read was modified since writing to the cache.
+ */
+ private function refresh(string $cacheKey, ReflectionClass $class): bool
+ {
+ $lastModification = $this->getLastModification($class);
+ if ($lastModification === 0) {
+ return true;
+ }
+
+ $item = $this->cache->getItem('[C]' . $cacheKey);
+ if ($item->isHit() && $item->get() >= $lastModification) {
+ return true;
+ }
+
+ $this->cache->save($item->set(time()));
+
+ return false;
+ }
+
+ /**
+ * Returns the time the class was last modified, testing traits and parents
+ */
+ private function getLastModification(ReflectionClass $class): int
+ {
+ $filename = $class->getFileName();
+
+ if (isset($this->loadedFilemtimes[$filename])) {
+ return $this->loadedFilemtimes[$filename];
+ }
+
+ $parent = $class->getParentClass();
+
+ $lastModification = max(array_merge(
+ [$filename ? filemtime($filename) : 0],
+ array_map(function (ReflectionClass $reflectionTrait): int {
+ return $this->getTraitLastModificationTime($reflectionTrait);
+ }, $class->getTraits()),
+ array_map(function (ReflectionClass $class): int {
+ return $this->getLastModification($class);
+ }, $class->getInterfaces()),
+ $parent ? [$this->getLastModification($parent)] : []
+ ));
+
+ assert($lastModification !== false);
+
+ return $this->loadedFilemtimes[$filename] = $lastModification;
+ }
+
+ private function getTraitLastModificationTime(ReflectionClass $reflectionTrait): int
+ {
+ $fileName = $reflectionTrait->getFileName();
+
+ if (isset($this->loadedFilemtimes[$fileName])) {
+ return $this->loadedFilemtimes[$fileName];
+ }
+
+ $lastModificationTime = max(array_merge(
+ [$fileName ? filemtime($fileName) : 0],
+ array_map(function (ReflectionClass $reflectionTrait): int {
+ return $this->getTraitLastModificationTime($reflectionTrait);
+ }, $reflectionTrait->getTraits())
+ ));
+
+ assert($lastModificationTime !== false);
+
+ return $this->loadedFilemtimes[$fileName] = $lastModificationTime;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php
new file mode 100644
index 0000000..0663ffd
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Reader.php
@@ -0,0 +1,80 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+
+/**
+ * Interface for annotation readers.
+ */
+interface Reader
+{
+ /**
+ * Gets the annotations applied to a class.
+ *
+ * @param ReflectionClass $class The ReflectionClass of the class from which
+ * the class annotations should be read.
+ *
+ * @return array<object> An array of Annotations.
+ */
+ public function getClassAnnotations(ReflectionClass $class);
+
+ /**
+ * Gets a class annotation.
+ *
+ * @param ReflectionClass $class The ReflectionClass of the class from which
+ * the class annotations should be read.
+ * @param class-string<T> $annotationName The name of the annotation.
+ *
+ * @return T|null The Annotation or NULL, if the requested annotation does not exist.
+ *
+ * @template T
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName);
+
+ /**
+ * Gets the annotations applied to a method.
+ *
+ * @param ReflectionMethod $method The ReflectionMethod of the method from which
+ * the annotations should be read.
+ *
+ * @return array<object> An array of Annotations.
+ */
+ public function getMethodAnnotations(ReflectionMethod $method);
+
+ /**
+ * Gets a method annotation.
+ *
+ * @param ReflectionMethod $method The ReflectionMethod to read the annotations from.
+ * @param class-string<T> $annotationName The name of the annotation.
+ *
+ * @return T|null The Annotation or NULL, if the requested annotation does not exist.
+ *
+ * @template T
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName);
+
+ /**
+ * Gets the annotations applied to a property.
+ *
+ * @param ReflectionProperty $property The ReflectionProperty of the property
+ * from which the annotations should be read.
+ *
+ * @return array<object> An array of Annotations.
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property);
+
+ /**
+ * Gets a property annotation.
+ *
+ * @param ReflectionProperty $property The ReflectionProperty to read the annotations from.
+ * @param class-string<T> $annotationName The name of the annotation.
+ *
+ * @return T|null The Annotation or NULL, if the requested annotation does not exist.
+ *
+ * @template T
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName);
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php
new file mode 100644
index 0000000..8a78c11
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php
@@ -0,0 +1,114 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+
+/**
+ * Simple Annotation Reader.
+ *
+ * This annotation reader is intended to be used in projects where you have
+ * full-control over all annotations that are available.
+ *
+ * @deprecated Deprecated in favour of using AnnotationReader
+ */
+class SimpleAnnotationReader implements Reader
+{
+ /** @var DocParser */
+ private $parser;
+
+ /**
+ * Initializes a new SimpleAnnotationReader.
+ */
+ public function __construct()
+ {
+ $this->parser = new DocParser();
+ $this->parser->setIgnoreNotImportedAnnotations(true);
+ }
+
+ /**
+ * Adds a namespace in which we will look for annotations.
+ *
+ * @param string $namespace
+ *
+ * @return void
+ */
+ public function addNamespace($namespace)
+ {
+ $this->parser->addNamespace($namespace);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ return $this->parser->parse(
+ $method->getDocComment(),
+ 'method ' . $method->getDeclaringClass()->name . '::' . $method->getName() . '()'
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ return $this->parser->parse(
+ $property->getDocComment(),
+ 'property ' . $property->getDeclaringClass()->name . '::$' . $property->getName()
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ foreach ($this->getClassAnnotations($class) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ foreach ($this->getMethodAnnotations($method) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ foreach ($this->getPropertyAnnotations($property) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php
new file mode 100644
index 0000000..9605fb8
--- /dev/null
+++ b/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php
@@ -0,0 +1,208 @@
+<?php
+
+namespace Doctrine\Common\Annotations;
+
+use function array_merge;
+use function count;
+use function explode;
+use function strtolower;
+use function token_get_all;
+
+use const PHP_VERSION_ID;
+use const T_AS;
+use const T_COMMENT;
+use const T_DOC_COMMENT;
+use const T_NAME_FULLY_QUALIFIED;
+use const T_NAME_QUALIFIED;
+use const T_NAMESPACE;
+use const T_NS_SEPARATOR;
+use const T_STRING;
+use const T_USE;
+use const T_WHITESPACE;
+
+/**
+ * Parses a file for namespaces/use/class declarations.
+ */
+class TokenParser
+{
+ /**
+ * The token list.
+ *
+ * @phpstan-var list<mixed[]>
+ */
+ private $tokens;
+
+ /**
+ * The number of tokens.
+ *
+ * @var int
+ */
+ private $numTokens;
+
+ /**
+ * The current array pointer.
+ *
+ * @var int
+ */
+ private $pointer = 0;
+
+ /**
+ * @param string $contents
+ */
+ public function __construct($contents)
+ {
+ $this->tokens = token_get_all($contents);
+
+ // The PHP parser sets internal compiler globals for certain things. Annoyingly, the last docblock comment it
+ // saw gets stored in doc_comment. When it comes to compile the next thing to be include()d this stored
+ // doc_comment becomes owned by the first thing the compiler sees in the file that it considers might have a
+ // docblock. If the first thing in the file is a class without a doc block this would cause calls to
+ // getDocBlock() on said class to return our long lost doc_comment. Argh.
+ // To workaround, cause the parser to parse an empty docblock. Sure getDocBlock() will return this, but at least
+ // it's harmless to us.
+ token_get_all("<?php\n/**\n *\n */");
+
+ $this->numTokens = count($this->tokens);
+ }
+
+ /**
+ * Gets the next non whitespace and non comment token.
+ *
+ * @param bool $docCommentIsComment If TRUE then a doc comment is considered a comment and skipped.
+ * If FALSE then only whitespace and normal comments are skipped.
+ *
+ * @return mixed[]|string|null The token if exists, null otherwise.
+ */
+ public function next($docCommentIsComment = true)
+ {
+ for ($i = $this->pointer; $i < $this->numTokens; $i++) {
+ $this->pointer++;
+ if (
+ $this->tokens[$i][0] === T_WHITESPACE ||
+ $this->tokens[$i][0] === T_COMMENT ||
+ ($docCommentIsComment && $this->tokens[$i][0] === T_DOC_COMMENT)
+ ) {
+ continue;
+ }
+
+ return $this->tokens[$i];
+ }
+
+ return null;
+ }
+
+ /**
+ * Parses a single use statement.
+ *
+ * @return array<string, string> A list with all found class names for a use statement.
+ */
+ public function parseUseStatement()
+ {
+ $groupRoot = '';
+ $class = '';
+ $alias = '';
+ $statements = [];
+ $explicitAlias = false;
+ while (($token = $this->next())) {
+ if (! $explicitAlias && $token[0] === T_STRING) {
+ $class .= $token[1];
+ $alias = $token[1];
+ } elseif ($explicitAlias && $token[0] === T_STRING) {
+ $alias = $token[1];
+ } elseif (
+ PHP_VERSION_ID >= 80000 &&
+ ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED)
+ ) {
+ $class .= $token[1];
+
+ $classSplit = explode('\\', $token[1]);
+ $alias = $classSplit[count($classSplit) - 1];
+ } elseif ($token[0] === T_NS_SEPARATOR) {
+ $class .= '\\';
+ $alias = '';
+ } elseif ($token[0] === T_AS) {
+ $explicitAlias = true;
+ $alias = '';
+ } elseif ($token === ',') {
+ $statements[strtolower($alias)] = $groupRoot . $class;
+ $class = '';
+ $alias = '';
+ $explicitAlias = false;
+ } elseif ($token === ';') {
+ $statements[strtolower($alias)] = $groupRoot . $class;
+ break;
+ } elseif ($token === '{') {
+ $groupRoot = $class;
+ $class = '';
+ } elseif ($token === '}') {
+ continue;
+ } else {
+ break;
+ }
+ }
+
+ return $statements;
+ }
+
+ /**
+ * Gets all use statements.
+ *
+ * @param string $namespaceName The namespace name of the reflected class.
+ *
+ * @return array<string, string> A list with all found use statements.
+ */
+ public function parseUseStatements($namespaceName)
+ {
+ $statements = [];
+ while (($token = $this->next())) {
+ if ($token[0] === T_USE) {
+ $statements = array_merge($statements, $this->parseUseStatement());
+ continue;
+ }
+
+ if ($token[0] !== T_NAMESPACE || $this->parseNamespace() !== $namespaceName) {
+ continue;
+ }
+
+ // Get fresh array for new namespace. This is to prevent the parser to collect the use statements
+ // for a previous namespace with the same name. This is the case if a namespace is defined twice
+ // or if a namespace with the same name is commented out.
+ $statements = [];
+ }
+
+ return $statements;
+ }
+
+ /**
+ * Gets the namespace.
+ *
+ * @return string The found namespace.
+ */
+ public function parseNamespace()
+ {
+ $name = '';
+ while (
+ ($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || (
+ PHP_VERSION_ID >= 80000 &&
+ ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED)
+ ))
+ ) {
+ $name .= $token[1];
+ }
+
+ return $name;
+ }
+
+ /**
+ * Gets the class name.
+ *
+ * @return string The found class name.
+ */
+ public function parseClass()
+ {
+ // Namespaces and class names are tokenized the same: T_STRINGs
+ // separated by T_NS_SEPARATOR so we can use one function to provide
+ // both.
+ return $this->parseNamespace();
+ }
+}
diff --git a/vendor/doctrine/annotations/psalm.xml b/vendor/doctrine/annotations/psalm.xml
new file mode 100644
index 0000000..e6af389
--- /dev/null
+++ b/vendor/doctrine/annotations/psalm.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<psalm
+ errorLevel="7"
+ resolveFromConfigFile="true"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://getpsalm.org/schema/config"
+ xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
+>
+ <projectFiles>
+ <directory name="lib/Doctrine/Common/Annotations" />
+ <ignoreFiles>
+ <directory name="vendor" />
+ </ignoreFiles>
+ </projectFiles>
+</psalm>
diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE
new file mode 100644
index 0000000..e8fdec4
--- /dev/null
+++ b/vendor/doctrine/lexer/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2006-2018 Doctrine Project
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/doctrine/lexer/README.md b/vendor/doctrine/lexer/README.md
new file mode 100644
index 0000000..784f2a2
--- /dev/null
+++ b/vendor/doctrine/lexer/README.md
@@ -0,0 +1,9 @@
+# Doctrine Lexer
+
+[![Build Status](https://github.com/doctrine/lexer/workflows/Continuous%20Integration/badge.svg)](https://github.com/doctrine/lexer/actions)
+
+Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
+
+This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL).
+
+https://www.doctrine-project.org/projects/lexer.html
diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json
new file mode 100644
index 0000000..c435647
--- /dev/null
+++ b/vendor/doctrine/lexer/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "doctrine/lexer",
+ "type": "library",
+ "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+ "keywords": [
+ "php",
+ "parser",
+ "lexer",
+ "annotations",
+ "docblock"
+ ],
+ "homepage": "https://www.doctrine-project.org/projects/lexer.html",
+ "license": "MIT",
+ "authors": [
+ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
+ {"name": "Roman Borschel", "email": "roman@code-factory.org"},
+ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
+ ],
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^9.0",
+ "phpstan/phpstan": "^1.3",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.11"
+ },
+ "autoload": {
+ "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" }
+ },
+ "autoload-dev": {
+ "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" }
+ },
+ "config": {
+ "allow-plugins": {
+ "composer/package-versions-deprecated": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ },
+ "sort-packages": true
+ }
+}
diff --git a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php
new file mode 100644
index 0000000..7e8a11d
--- /dev/null
+++ b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php
@@ -0,0 +1,337 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Doctrine\Common\Lexer;
+
+use ReflectionClass;
+
+use function implode;
+use function in_array;
+use function preg_split;
+use function sprintf;
+use function substr;
+
+use const PREG_SPLIT_DELIM_CAPTURE;
+use const PREG_SPLIT_NO_EMPTY;
+use const PREG_SPLIT_OFFSET_CAPTURE;
+
+/**
+ * Base class for writing simple lexers, i.e. for creating small DSLs.
+ *
+ * @psalm-type Token = array{value: int|string, type:string|int|null, position:int}
+ */
+abstract class AbstractLexer
+{
+ /**
+ * Lexer original input string.
+ *
+ * @var string
+ */
+ private $input;
+
+ /**
+ * Array of scanned tokens.
+ *
+ * Each token is an associative array containing three items:
+ * - 'value' : the string value of the token in the input string
+ * - 'type' : the type of the token (identifier, numeric, string, input
+ * parameter, none)
+ * - 'position' : the position of the token in the input string
+ *
+ * @var mixed[][]
+ * @psalm-var list<Token>
+ */
+ private $tokens = [];
+
+ /**
+ * Current lexer position in input string.
+ *
+ * @var int
+ */
+ private $position = 0;
+
+ /**
+ * Current peek of current lexer position.
+ *
+ * @var int
+ */
+ private $peek = 0;
+
+ /**
+ * The next token in the input.
+ *
+ * @var mixed[]|null
+ * @psalm-var Token|null
+ */
+ public $lookahead;
+
+ /**
+ * The last matched/seen token.
+ *
+ * @var mixed[]|null
+ * @psalm-var Token|null
+ */
+ public $token;
+
+ /**
+ * Composed regex for input parsing.
+ *
+ * @var string|null
+ */
+ private $regex;
+
+ /**
+ * Sets the input data to be tokenized.
+ *
+ * The Lexer is immediately reset and the new input tokenized.
+ * Any unprocessed tokens from any previous input are lost.
+ *
+ * @param string $input The input to be tokenized.
+ *
+ * @return void
+ */
+ public function setInput($input)
+ {
+ $this->input = $input;
+ $this->tokens = [];
+
+ $this->reset();
+ $this->scan($input);
+ }
+
+ /**
+ * Resets the lexer.
+ *
+ * @return void
+ */
+ public function reset()
+ {
+ $this->lookahead = null;
+ $this->token = null;
+ $this->peek = 0;
+ $this->position = 0;
+ }
+
+ /**
+ * Resets the peek pointer to 0.
+ *
+ * @return void
+ */
+ public function resetPeek()
+ {
+ $this->peek = 0;
+ }
+
+ /**
+ * Resets the lexer position on the input to the given position.
+ *
+ * @param int $position Position to place the lexical scanner.
+ *
+ * @return void
+ */
+ public function resetPosition($position = 0)
+ {
+ $this->position = $position;
+ }
+
+ /**
+ * Retrieve the original lexer's input until a given position.
+ *
+ * @param int $position
+ *
+ * @return string
+ */
+ public function getInputUntilPosition($position)
+ {
+ return substr($this->input, 0, $position);
+ }
+
+ /**
+ * Checks whether a given token matches the current lookahead.
+ *
+ * @param int|string $type
+ *
+ * @return bool
+ */
+ public function isNextToken($type)
+ {
+ return $this->lookahead !== null && $this->lookahead['type'] === $type;
+ }
+
+ /**
+ * Checks whether any of the given tokens matches the current lookahead.
+ *
+ * @param list<int|string> $types
+ *
+ * @return bool
+ */
+ public function isNextTokenAny(array $types)
+ {
+ return $this->lookahead !== null && in_array($this->lookahead['type'], $types, true);
+ }
+
+ /**
+ * Moves to the next token in the input string.
+ *
+ * @return bool
+ */
+ public function moveNext()
+ {
+ $this->peek = 0;
+ $this->token = $this->lookahead;
+ $this->lookahead = isset($this->tokens[$this->position])
+ ? $this->tokens[$this->position++] : null;
+
+ return $this->lookahead !== null;
+ }
+
+ /**
+ * Tells the lexer to skip input tokens until it sees a token with the given value.
+ *
+ * @param string $type The token type to skip until.
+ *
+ * @return void
+ */
+ public function skipUntil($type)
+ {
+ while ($this->lookahead !== null && $this->lookahead['type'] !== $type) {
+ $this->moveNext();
+ }
+ }
+
+ /**
+ * Checks if given value is identical to the given token.
+ *
+ * @param mixed $value
+ * @param int|string $token
+ *
+ * @return bool
+ */
+ public function isA($value, $token)
+ {
+ return $this->getType($value) === $token;
+ }
+
+ /**
+ * Moves the lookahead token forward.
+ *
+ * @return mixed[]|null The next token or NULL if there are no more tokens ahead.
+ * @psalm-return Token|null
+ */
+ public function peek()
+ {
+ if (isset($this->tokens[$this->position + $this->peek])) {
+ return $this->tokens[$this->position + $this->peek++];
+ }
+
+ return null;
+ }
+
+ /**
+ * Peeks at the next token, returns it and immediately resets the peek.
+ *
+ * @return mixed[]|null The next token or NULL if there are no more tokens ahead.
+ * @psalm-return Token|null
+ */
+ public function glimpse()
+ {
+ $peek = $this->peek();
+ $this->peek = 0;
+
+ return $peek;
+ }
+
+ /**
+ * Scans the input string for tokens.
+ *
+ * @param string $input A query string.
+ *
+ * @return void
+ */
+ protected function scan($input)
+ {
+ if (! isset($this->regex)) {
+ $this->regex = sprintf(
+ '/(%s)|%s/%s',
+ implode(')|(', $this->getCatchablePatterns()),
+ implode('|', $this->getNonCatchablePatterns()),
+ $this->getModifiers()
+ );
+ }
+
+ $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;
+ $matches = preg_split($this->regex, $input, -1, $flags);
+
+ if ($matches === false) {
+ // Work around https://bugs.php.net/78122
+ $matches = [[$input, 0]];
+ }
+
+ foreach ($matches as $match) {
+ // Must remain before 'value' assignment since it can change content
+ $type = $this->getType($match[0]);
+
+ $this->tokens[] = [
+ 'value' => $match[0],
+ 'type' => $type,
+ 'position' => $match[1],
+ ];
+ }
+ }
+
+ /**
+ * Gets the literal for a given token.
+ *
+ * @param int|string $token
+ *
+ * @return int|string
+ */
+ public function getLiteral($token)
+ {
+ $className = static::class;
+ $reflClass = new ReflectionClass($className);
+ $constants = $reflClass->getConstants();
+
+ foreach ($constants as $name => $value) {
+ if ($value === $token) {
+ return $className . '::' . $name;
+ }
+ }
+
+ return $token;
+ }
+
+ /**
+ * Regex modifiers
+ *
+ * @return string
+ */
+ protected function getModifiers()
+ {
+ return 'iu';
+ }
+
+ /**
+ * Lexical catchable patterns.
+ *
+ * @return string[]
+ */
+ abstract protected function getCatchablePatterns();
+
+ /**
+ * Lexical non-catchable patterns.
+ *
+ * @return string[]
+ */
+ abstract protected function getNonCatchablePatterns();
+
+ /**
+ * Retrieve token type. Also processes the token value if necessary.
+ *
+ * @param string $value
+ *
+ * @return int|string|null
+ */
+ abstract protected function getType(&$value);
+}
diff --git a/vendor/doctrine/lexer/psalm.xml b/vendor/doctrine/lexer/psalm.xml
new file mode 100644
index 0000000..f331e50
--- /dev/null
+++ b/vendor/doctrine/lexer/psalm.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<psalm
+ errorLevel="5"
+ resolveFromConfigFile="true"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://getpsalm.org/schema/config"
+ xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
+>
+ <projectFiles>
+ <directory name="lib/Doctrine/Common/Lexer" />
+ <ignoreFiles>
+ <directory name="vendor" />
+ </ignoreFiles>
+ </projectFiles>
+</psalm>
diff --git a/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md b/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
new file mode 100644
index 0000000..b250faa
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/CHANGELOG.md
@@ -0,0 +1,4125 @@
+CHANGELOG for PHP CS Fixer
+==========================
+
+This file contains changelogs for stable releases only.
+
+Changelog for v3.2.1
+---------------------
+
+experimental release
+
+* Require PHP 7.2
+
+Changelog for v3.2.0
+--------------------
+
+* bug #5809 FunctionsAnalyzer - fix for recognizing global functions in attributes (kubawerlos)
+* bug #5909 NativeFunctionCasingFixer - fix for attributes and imported functions (kubawerlos)
+* bug #5920 ClassAttributesSeparationFixer - fixes & enhancements (SpacePossum)
+* bug #5923 TypeAlternationTransformer - fix for promoted properties (kubawerlos)
+* bug #5938 NoAliasFunctionsFixer - remove dir -> getdir mapping (SpacePossum)
+* bug #5941 TokensAnalyzer - isAnonymousClass bug on PHP8 (SpacePossum)
+* bug #5942 TokensAnalyzer - isConstantInvocation PHP 8 issue (SpacePossum)
+* bug #5943 NoUnusedImportsFixer - use in attribute (SpacePossum)
+* bug #5955 Fixed `class_attributes_separation` processing class with multiple trait imports (GrahamCampbell)
+* bug #5977 LowercaseStaticReference - SingleClassElementPerStatement - union types (SpacePossum)
+* bug #5984 RegularCallableCallFixer must run before NativeFunctionInvocationFixer (kubawerlos)
+* bug #5986 CurlyBraceTransformer - count T_CURLY_OPEN itself as level as well (SpacePossum)
+* bug #5989 NoAliasFunctionsFixer - Correct mapping (weshooper)
+* bug #6004 SwitchContinueToBreakFixer - Fix candidate check (SpacePossum)
+* bug #6005 CommentsAnalyzer - before static call (SpacePossum)
+* bug #6007 YodaStyleFixer - PHP8 named arguments support (liquid207)
+* bug #6015 CommentsAnalyzer - constructor property promotion support (liquid207)
+* bug #6020 RegularCallableCallFixer - case insensitive fixing (SpacePossum)
+* bug #6037 PhpdocLineSpanFixer - do not crash on trait imports (SpacePossum)
+* feature #4834 AssignNullCoalescingToCoalesceEqualFixer - introduction (SpacePossum)
+* feature #5754 ModernizeStrposFixer - introduction (derrabus, SpacePossum, keradus)
+* feature #5858 EmptyLoopConditionFixer - introduction (SpacePossum)
+* feature #5967 PHP8.1 - type "never" support (SpacePossum)
+* feature #5968 PHP8.1 - "readonly" property modifier support (SpacePossum)
+* feature #5970 IntegerLiteralCaseFixer - introduction (SpacePossum)
+* feature #5971 PHP8.1 - Explicit octal integer literal notation (SpacePossum)
+* feature #5997 NoSuperfluousPhpdocTagsFixer - Add union types support (julienfalque)
+* feature #6026 TypeIntersectionTransformer - introduction (kubawerlos, SpacePossum)
+* feature #6031 NoSpaceAroundDoubleColonFixer - introduction (SpacePossum)
+* feature #6047 StringLengthToEmptyFixer - introduction (SpacePossum)
+* minor #5773 NoAlternativeSyntaxFixer - Add option to not fix non-monolithic PHP code (paulbalandan)
+* minor #5887 Detect renamed rules in configuration resolver (shakaran)
+* minor #5901 DX: update PHPStan (kubawerlos)
+* minor #5906 Remove references to PHP 7.0 in tests (with updates) (kubawerlos)
+* minor #5918 Remove PHP version specific code sample constraint when not needed (kubawerlos)
+* minor #5924 PSR12 - ClassDefinition - space_before_parenthesis (SpacePossum)
+* minor #5925 DX: ProjectCodeTest - fix detection by testExpectedInputOrder (keradus)
+* minor #5926 DX: remove not needed requirements from fixtures (kubawerlos)
+* minor #5927 Symfonyset - EmptyLoopBody (SpacePossum)
+* minor #5928 PhpdocTo*TypeFixer - add more test cases (keradus)
+* minor #5929 Remove not needed PHP version checks (kubawerlos)
+* minor #5930 simplify code, more tests (SpacePossum)
+* minor #5931 logo copyright - bump year (SpacePossum)
+* minor #5932 Extract ControlStructureContinuationPositionFixer from BracesFixer (julienfalque)
+* minor #5933 Consistency invalid configuration exception for test (shakaran)
+* minor #5934 Add return types (SpacePossum)
+* minor #5949 Removed PHP 5 exception catch (GrahamCampbell)
+* minor #5952 ClassAttributesSeparationFixer - Re-add omitted `only_if_meta` option (paulbalandan)
+* minor #5957 Keep PHPStan cache between Docker runs (julienfalque)
+* minor #5958 Fix STDIN test when path is one level deep (julienfalque)
+* minor #5959 SymfonySet - add EmptyLoopConditionFixer (SpacePossum)
+* minor #5961 Remove duplicated method (julienfalque)
+* minor #5962 DX: Add return types (kubawerlos)
+* minor #5963 DX: extract config for special CI jobs (keradus)
+* minor #5964 DX: use modernize_strpos (keradus)
+* minor #5965 CI: don't try to execute jobs with Symfony:^3 (keradus)
+* minor #5972 PHP8.1 - FirstClassCallable (SpacePossum)
+* minor #5973 PHP8.1 - "final const" support (SpacePossum)
+* minor #5975 Tree shake PHP8.1 PRs (SpacePossum)
+* minor #5978 PHP8.1 - Enum (start) (SpacePossum)
+* minor #5982 Fix test warning (SpacePossum)
+* minor #5987 PHP8.1 - Enum (start) (SpacePossum)
+* minor #5995 Fix link to Code Climate SPEC.md in GitlabReporter (astehlik)
+* minor #5996 Fix URL to Doctrine Annotations documentation (astehlik)
+* minor #6000 Prevent PHP CS Fixer from fixing PHPStan cache files (julienfalque)
+* minor #6006 SCA/utilize PHP8.1 (SpacePossum)
+* minor #6008 SCA (SpacePossum)
+* minor #6010 SCA (SpacePossum)
+* minor #6011 NoSuperfluousPhpdocTagsFixer - Remove superfluous annotation `@abstract` and `@final` (liquid207, SpacePossum)
+* minor #6018 PhpdocLineSpan - Allow certain types to be ignored (devfrey)
+* minor #6019 Improve test coverage (SpacePossum)
+* minor #6021 Linter/*Exception - Tag as final (SpacePossum)
+* minor #6023 OrderedClassElementsFixer - PHP8.1 readonly properties support (SpacePossum)
+* minor #6027 MbStrFunctionsFixer - more details about risky (SpacePossum)
+* minor #6028 BinaryOperatorSpacesFixer - list all operators in doc (SpacePossum)
+* minor #6029 PhpUnitDedicateAssertFixer - add "assertStringContainsString" and "as… (SpacePossum)
+* minor #6030 SingleSpaceAfterConstructFixer - Add `switch` support (SpacePossum)
+* minor #6033 ArgumentsAnalyzerTest - add more tests (SpacePossum)
+* minor #6034 7.0|7.1 - cleanup tests (SpacePossum)
+* minor #6035 Documentation generation split up and add list. (SpacePossum)
+* minor #6048 Fix "can not" spelling (mvorisek)
+
+Changelog for v3.1.0
+--------------------
+
+* feature #5572 PhpdocToCommentFixer - Add `ignored_tags` option (VincentLanglet)
+* feature #5588 NoAliasFunctionsFixer - Add more function aliases (danog)
+* feature #5704 ClassAttributesSeparationFixer - Introduce `only_if_meta` spacing option (paulbalandan)
+* feature #5734 TypesSpacesFixer - Introduction (kubawerlos)
+* feature #5745 EmptyLoopBodyFixer - introduction (SpacePossum, keradus)
+* feature #5751 Extract DeclareParenthesesFixer from BracesFixer (julienfalque, keradus)
+* feature #5877 ClassDefinitionFixer - PSR12 for anonymous class (SpacePossum)
+* minor #5875 EmptyLoopBodyFixer - NoTrailingWhitespaceFixer - priority test (SpacePossum)
+* minor #5914 Deprecate ClassKeywordRemoveFixer (kubawerlos)
+
+Changelog for v3.0.3
+--------------------
+
+* bug #4927 PhpdocAlignFixer - fix for whitespace in type (kubawerlos)
+* bug #5720 NoUnusedImportsFixer - Fix undetected unused imports when type mismatch (julienfalque, SpacePossum)
+* bug #5806 DoctrineAnnotationFixer - Add template to ignored_tags (akalineskou)
+* bug #5849 PhpdocTagTypeFixer - must not remove inlined tags within other tags (boesing)
+* bug #5853 BracesFixer - handle alternative short foreach with if (SpacePossum)
+* bug #5855 GlobalNamespaceImportFixer - fix for attributes imported as constants (kubawerlos)
+* bug #5881 SelfUpdateCommand - fix link to UPGRADE docs (keradus)
+* bug #5884 CurlyBraceTransformer - fix handling dynamic property with string with variable (kubawerlos, keradus)
+* bug #5912 TypeAlternationTransformer - fix for "callable" type (kubawerlos)
+* bug #5913 SingleSpaceAfterConstructFixer - improve comma handling (keradus)
+* minor #5829 DX: Fix SCA with PHPMD (paulbalandan)
+* minor #5838 PHP7 - use spaceship (SpacePossum, keradus)
+* minor #5848 Docs: update PhpStorm integration link (keradus)
+* minor #5856 Add AttributeAnalyzer (kubawerlos)
+* minor #5857 DX: PHPMD - exclude fixtures (keradus)
+* minor #5859 Various fixes (kubawerlos)
+* minor #5864 DX: update dev tools (kubawerlos)
+* minor #5876 AttributeTransformerTest - add more tests (SpacePossum)
+* minor #5879 Update UPGRADE-v3.md adding relative links (shakaran, keradus)
+* minor #5882 Docs: don't use v2 for installation example (keradus)
+* minor #5883 Docs: typo (brianteeman, keradus)
+* minor #5890 DX: use PHP 8.1 polyfill (keradus)
+* minor #5902 Remove references to PHP 7.0 in tests (only removing lines) (kubawerlos)
+* minor #5905 DX: Use "yield from" in tests (kubawerlos, keradus)
+* minor #5917 Use `@PHP71Migration` rules (kubawerlos, keradus)
+
+Changelog for v3.0.2
+--------------------
+
+* bug #5816 FullyQualifiedStrictTypesFixer - fix for union types (kubawerlos, keradus)
+* bug #5835 PhpdocTypesOrderFixer: fix for array shapes (kubawerlos)
+* bug #5837 SingleImportPerStatementFixer - fix const and function imports (SpacePossum)
+* bug #5844 PhpdocTypesOrderFixer: handle callable() type (Slamdunk)
+* minor #5839 DX: automate checking 7.0 types on project itself (keradus)
+* minor #5840 DX: drop v2 compatible config in project itself (keradus)
+
+Changelog for v3.0.1
+--------------------
+
+* bug #5395 PhpdocTagTypeFixer: Do not modify array shapes (localheinz, julienfalque)
+* bug #5678 UseArrowFunctionsFixer - fix for return without value (kubawerlos)
+* bug #5679 PhpUnitNamespacedFixer - do not try to fix constant usage (kubawerlos)
+* bug #5681 RegularCallableCallFixer - fix for function name with escaped slash (kubawerlos)
+* bug #5687 FinalInternalClassFixer - fix for annotation with space after "@" (kubawerlos)
+* bug #5688 ArrayIndentationFixer - fix for really long arrays (kubawerlos)
+* bug #5690 PhpUnitNoExpectationAnnotationFixer - fix "expectedException" annotation with message below (kubawerlos)
+* bug #5693 YodaStyleFixer - fix for assignment operators (kubawerlos)
+* bug #5697 StrictParamFixer - fix for method definition (kubawerlos)
+* bug #5702 CommentToPhpdocFixer - fix for single line comments starting with more than 2 slashes (kubawerlos)
+* bug #5703 DateTimeImmutableFixer - fix for method definition (kubawerlos)
+* bug #5718 VoidReturnFixer - do not break syntax with magic methods (kubawerlos)
+* bug #5727 SingleSpaceAfterConstructFixer - Add support for `namespace` (julienfalque)
+* bug #5730 Fix transforming deprecations into exceptions (julienfalque)
+* bug #5738 TokensAnalyzer - fix for union types (kubawerlos)
+* bug #5741 Fix constant invocation detection cases (kubawerlos)
+* bug #5769 Fix priority between `phpdoc_to_property_type` and `no_superfluous_phpdoc_tags` (julienfalque)
+* bug #5774 FunctionsAnalyzer::isTheSameClassCall - fix for $this with double colon following (kubawerlos)
+* bug #5779 SingleLineThrowFixer - fix for throw in match (kubawerlos)
+* bug #5781 ClassDefinition - fix for anonymous class with trailing comma (kubawerlos)
+* bug #5783 StaticLambdaFixer - consider parent:: as a possible reference to $this (fancyweb)
+* bug #5791 NoBlankLinesAfterPhpdoc - Add T_NAMESPACE in array of forbidden successors (paulbalandan)
+* bug #5799 TypeAlternationTransformer - fix for multiple function parameters (kubawerlos)
+* bug #5804 NoBreakCommentFixer - fix for "default" in "match" (kubawerlos)
+* bug #5805 SingleLineCommentStyleFixer - run after HeaderCommentFixer (kubawerlos)
+* bug #5817 NativeFunctionTypeDeclarationCasingFixer - fix for union types (kubawerlos)
+* bug #5823 YodaStyleFixer - yield support (SpacePossum)
+* minor #4914 Improve PHPDoc types support (julienfalque, keradus)
+* minor #5592 Fix checking for default config used in rule sets (kubawerlos)
+* minor #5675 Docs: extend Upgrade Guide (keradus)
+* minor #5680 DX: benchmark.sh - ensure deps are updated to enable script working across less-similar branches (keradus)
+* minor #5689 Calculate code coverage on PHP 8 (kubawerlos)
+* minor #5694 DX: fail on risky tests (kubawerlos)
+* minor #5695 Utils - save only unique deprecations to avoid memory issues (PetrHeinz)
+* minor #5710 [typo] add correct backquotes (PhilETaylor)
+* minor #5711 Fix doc, "run-in" show-progress option is no longer present (mvorisek)
+* minor #5713 Upgrade-Guide: fix typo (staabm)
+* minor #5717 Run migration rules on PHP 8 (kubawerlos, keradus)
+* minor #5721 Fix reStructuredText markup (julienfalque)
+* minor #5725 Update LICENSE (exussum12)
+* minor #5731 CI - Fix checkbashisms installation (julienfalque)
+* minor #5736 Remove references to PHP 5.6 (kubawerlos, keradus)
+* minor #5739 DX: more typehinting (keradus)
+* minor #5740 DX: more type-related docblocks (keradus)
+* minor #5746 Config - Improve deprecation message with details (SpacePossum)
+* minor #5747 RandomApiMigrationFixer - better docs and better "random_int" support (SpacePossum)
+* minor #5748 Updated the link to netbeans plugins page (cyberguroo)
+* minor #5750 Test all const are in uppercase (SpacePossum)
+* minor #5752 NoNullPropertyInitializationFixer - fix static properties as well (HypeMC)
+* minor #5756 Fix rule sets descriptions (kubawerlos)
+* minor #5761 Fix links in custom rules documentation (julienfalque)
+* minor #5771 doc(config): change set's name (Kocal)
+* minor #5777 DX: update PHPStan (kubawerlos)
+* minor #5789 DX: update PHPStan (kubawerlos)
+* minor #5808 Update PHPStan to 0.12.92 (kubawerlos)
+* minor #5813 Docs: point to v3 in installation description (Jimbolino)
+* minor #5824 Deprecate v2 (keradus)
+* minor #5825 DX: update checkbashisms to v2.21.3 (keradus)
+* minor #5826 SCA: check both composer files (keradus)
+* minor #5827 ClassAttributesSeparationFixer - Add `trait_import` support (SpacePossum)
+* minor #5831 DX: fix SCA violations (keradus)
+
+Changelog for v3.0.0
+--------------------
+
+* bug #5164 Differ - surround file name with double quotes if it contains spacing. (SpacePossum)
+* bug #5560 PSR2: require visibility only for properties and methods (kubawerlos)
+* bug #5576 ClassAttributesSeparationFixer: do not allow using v2 config (kubawerlos)
+* feature #4979 Pass file to differ (paulhenri-l, SpacePossum)
+* minor #3374 show-progress option: drop run-in and estimating, rename estimating-max to dots (keradus)
+* minor #3375 Fixers - stop exposing extra properties/consts (keradus)
+* minor #3376 Tokenizer - remove deprecations and legacy mode (keradus)
+* minor #3377 rules - change default options (keradus)
+* minor #3378 SKIP_LINT_TEST_CASES - drop env (keradus)
+* minor #3379 MethodArgumentSpaceFixer - fixSpace is now private (keradus)
+* minor #3380 rules - drop rootless configurations (keradus)
+* minor #3381 rules - drop deprecated configurations (keradus)
+* minor #3382 DefinedFixerInterface - incorporate into FixerInterface (keradus)
+* minor #3383 FixerDefinitionInterface - drop getConfigurationDescription and getDefaultConfiguration (keradus)
+* minor #3384 diff-format option: drop sbd diff, use udiffer by default, drop SebastianBergmannDiffer and SebastianBergmannShortDiffer classes (keradus)
+* minor #3385 ConfigurableFixerInterface::configure - param is now not nullable and not optional (keradus)
+* minor #3386 ConfigurationDefinitionFixerInterface - incorporate into ConfigurableFixerInterface (keradus)
+* minor #3387 FixCommand - forbid passing 'config' and 'rules' options together (keradus)
+* minor #3388 Remove Helpers (keradus)
+* minor #3389 AccessibleObject - drop class (keradus)
+* minor #3390 Drop deprecated rules: blank_line_before_return, hash_to_slash_comment, method_separation, no_extra_consecutive_blank_lines, no_multiline_whitespace_before_semicolons and pre_increment (keradus)
+* minor #3456 AutoReview - drop references to removed rule (keradus)
+* minor #3659 use php-cs-fixer/diff ^2.0 (SpacePossum)
+* minor #3681 CiIntegrationTest - fix incompatibility from 2.x line (keradus)
+* minor #3740 NoUnusedImportsFixer - remove SF exception (SpacePossum)
+* minor #3771 UX: always set error_reporting in entry file, not Application (keradus)
+* minor #3922 Make some more classes final (ntzm, SpacePossum)
+* minor #3995 Change default config of native_function_invocation (dunglas, SpacePossum)
+* minor #4432 DX: remove empty sets from RuleSet (kubawerlos)
+* minor #4489 Fix ruleset @PHPUnit50Migration:risky (kubawerlos)
+* minor #4620 DX: cleanup additional, not used parameters (keradus)
+* minor #4666 Remove deprecated rules: lowercase_constants, php_unit_ordered_covers, silenced_deprecation_error (keradus)
+* minor #4697 Remove deprecated no_short_echo_tag rule (julienfalque)
+* minor #4851 fix phpstan on 3.0 (SpacePossum)
+* minor #4901 Fix SCA (SpacePossum)
+* minor #5069 Fixed failing tests on 3.0 due to unused import after merge (GrahamCampbell)
+* minor #5096 NativeFunctionInvocationFixer - BacktickToShellExecFixer - fix integration test (SpacePossum)
+* minor #5171 Fix test (SpacePossum)
+* minor #5245 Fix CI for 3.0 line (keradus)
+* minor #5351 clean ups (SpacePossum)
+* minor #5364 DX: Do not display runtime twice on 3.0 line (keradus)
+* minor #5412 3.0 - cleanup (SpacePossum, keradus)
+* minor #5417 Further BC cleanup for 3.0 (keradus)
+* minor #5418 Drop src/Test namespace (keradus)
+* minor #5436 Drop mapping of strings to boolean option other than yes/no (keradus)
+* minor #5440 Change default ruleset to PSR-12 (keradus)
+* minor #5477 Drop diff-format (keradus)
+* minor #5478 Docs: Cleanup UPGRADE markdown files (keradus)
+* minor #5479 ArraySyntaxFixer, ListSyntaxFixer - change default syntax to short (keradus)
+* minor #5480 Tokens::findBlockEnd - drop deprecated argument (keradus)
+* minor #5485 ClassAttributesSeparationFixer - drop deprecated flat list configuration (keradus)
+* minor #5486 CI: drop unused env variables (keradus)
+* minor #5488 Do not distribute documentation (szepeviktor)
+* minor #5513 DX: Tokens::warnPhp8SplFixerArrayChange - drop unused method (keradus)
+* minor #5520 DX: Drop IsIdenticalConstraint (keradus)
+* minor #5521 DX: apply rules configuration cleanups for PHP 7.1+ (keradus)
+* minor #5524 DX: drop support of very old deps (keradus)
+* minor #5525 Drop phpunit-legacy-adapter (keradus)
+* minor #5527 Bump required PHP to 7.1 (keradus)
+* minor #5529 DX: bump required PHPUnit to v7+ (keradus)
+* minor #5532 Apply PHP 7.1 typing (keradus)
+* minor #5541 RuleSet - disallow null usage to disable the rule (keradus)
+* minor #5555 DX: further typing improvements (keradus)
+* minor #5562 Fix table row rendering for default values of array_syntax and list_syntax (derrabus)
+* minor #5608 DX: new cache filename (keradus)
+* minor #5609 Forbid old config filename usage (keradus)
+* minor #5638 DX: remove Utils::calculateBitmask (keradus)
+* minor #5641 DX: use constants for PHPUnit version on 3.0 line (keradus)
+* minor #5643 FixCommand - simplify help (keradus)
+* minor #5644 Token::toJson() - remove parameter (keradus)
+* minor #5645 DX: YodaStyleFixerTest - fix CI (keradus)
+* minor #5649 DX: YodaStyleFixerTest - fix 8.0 compat (keradus)
+* minor #5650 DX: FixCommand - drop outdated/duplicated docs (keradus)
+* minor #5656 DX: mark some constants as internal or private (keradus)
+* minor #5657 DX: convert some properties to constants (keradus)
+* minor #5669 Remove TrailingCommaInMultilineArrayFixer (kubawerlos, keradus)
+
+Changelog for v2.19.2
+---------------------
+
+* bug #5881 SelfUpdateCommand - fix link to UPGRADE docs (keradus)
+
+Changelog for v2.19.1
+---------------------
+
+* bug #5395 PhpdocTagTypeFixer: Do not modify array shapes (localheinz, julienfalque)
+* bug #5678 UseArrowFunctionsFixer - fix for return without value (kubawerlos)
+* bug #5679 PhpUnitNamespacedFixer - do not try to fix constant usage (kubawerlos)
+* bug #5681 RegularCallableCallFixer - fix for function name with escaped slash (kubawerlos)
+* bug #5687 FinalInternalClassFixer - fix for annotation with space after "@" (kubawerlos)
+* bug #5688 ArrayIndentationFixer - fix for really long arrays (kubawerlos)
+* bug #5690 PhpUnitNoExpectationAnnotationFixer - fix "expectedException" annotation with message below (kubawerlos)
+* bug #5693 YodaStyleFixer - fix for assignment operators (kubawerlos)
+* bug #5697 StrictParamFixer - fix for method definition (kubawerlos)
+* bug #5702 CommentToPhpdocFixer - fix for single line comments starting with more than 2 slashes (kubawerlos)
+* bug #5703 DateTimeImmutableFixer - fix for method definition (kubawerlos)
+* bug #5718 VoidReturnFixer - do not break syntax with magic methods (kubawerlos)
+* bug #5727 SingleSpaceAfterConstructFixer - Add support for `namespace` (julienfalque)
+* bug #5730 Fix transforming deprecations into exceptions (julienfalque)
+* bug #5738 TokensAnalyzer - fix for union types (kubawerlos)
+* bug #5741 Fix constant invocation detection cases (kubawerlos)
+* bug #5769 Fix priority between `phpdoc_to_property_type` and `no_superfluous_phpdoc_tags` (julienfalque)
+* bug #5774 FunctionsAnalyzer::isTheSameClassCall - fix for $this with double colon following (kubawerlos)
+* bug #5779 SingleLineThrowFixer - fix for throw in match (kubawerlos)
+* bug #5781 ClassDefinition - fix for anonymous class with trailing comma (kubawerlos)
+* bug #5783 StaticLambdaFixer - consider parent:: as a possible reference to $this (fancyweb)
+* bug #5791 NoBlankLinesAfterPhpdoc - Add T_NAMESPACE in array of forbidden successors (paulbalandan)
+* bug #5799 TypeAlternationTransformer - fix for multiple function parameters (kubawerlos)
+* bug #5804 NoBreakCommentFixer - fix for "default" in "match" (kubawerlos)
+* bug #5805 SingleLineCommentStyleFixer - run after HeaderCommentFixer (kubawerlos)
+* bug #5817 NativeFunctionTypeDeclarationCasingFixer - fix for union types (kubawerlos)
+* bug #5823 YodaStyleFixer - yield support (SpacePossum)
+* minor #4914 Improve PHPDoc types support (julienfalque, keradus)
+* minor #5680 DX: benchmark.sh - ensure deps are updated to enable script working across less-similar branches (keradus)
+* minor #5689 Calculate code coverage on PHP 8 (kubawerlos)
+* minor #5694 DX: fail on risky tests (kubawerlos)
+* minor #5695 Utils - save only unique deprecations to avoid memory issues (PetrHeinz)
+* minor #5710 [typo] add correct backquotes (PhilETaylor)
+* minor #5717 Run migration rules on PHP 8 (kubawerlos, keradus)
+* minor #5721 Fix reStructuredText markup (julienfalque)
+* minor #5725 Update LICENSE (exussum12)
+* minor #5731 CI - Fix checkbashisms installation (julienfalque)
+* minor #5740 DX: more type-related docblocks (keradus)
+* minor #5746 Config - Improve deprecation message with details (SpacePossum)
+* minor #5747 RandomApiMigrationFixer - better docs and better "random_int" support (SpacePossum)
+* minor #5748 Updated the link to netbeans plugins page (cyberguroo)
+* minor #5750 Test all const are in uppercase (SpacePossum)
+* minor #5752 NoNullPropertyInitializationFixer - fix static properties as well (HypeMC)
+* minor #5756 Fix rule sets descriptions (kubawerlos)
+* minor #5761 Fix links in custom rules documentation (julienfalque)
+* minor #5777 DX: update PHPStan (kubawerlos)
+* minor #5789 DX: update PHPStan (kubawerlos)
+* minor #5808 Update PHPStan to 0.12.92 (kubawerlos)
+* minor #5824 Deprecate v2 (keradus)
+* minor #5825 DX: update checkbashisms to v2.21.3 (keradus)
+* minor #5826 SCA: check both composer files (keradus)
+* minor #5827 ClassAttributesSeparationFixer - Add `trait_import` support (SpacePossum)
+
+Changelog for v2.19.0
+---------------------
+
+* feature #4238 TrailingCommaInMultilineFixer - introduction (kubawerlos)
+* feature #4592 PhpdocToPropertyTypeFixer - introduction (julienfalque)
+* feature #5390 feature #4024 added a `list-files` command (clxmstaab, keradus)
+* feature #5635 Add list-sets command (keradus)
+* feature #5674 UX: Display deprecations to end-user (keradus)
+* minor #5601 Always stop when "PHP_CS_FIXER_FUTURE_MODE" is used (kubawerlos)
+* minor #5607 DX: new config filename (keradus)
+* minor #5613 DX: UtilsTest - add missing teardown (keradus)
+* minor #5631 DX: config deduplication (keradus)
+* minor #5633 fix typos (staabm)
+* minor #5642 Deprecate parameter of Token::toJson() (keradus)
+* minor #5672 DX: do not test deprecated fixer (kubawerlos)
+
+Changelog for v2.18.7
+---------------------
+
+* bug #5593 SingleLineThrowFixer - fix handling anonymous classes (kubawerlos)
+* bug #5654 SingleLineThrowFixer - fix for match expression (kubawerlos)
+* bug #5660 TypeAlternationTransformer - fix for "array" type in type alternation (kubawerlos)
+* bug #5665 NullableTypeDeclarationForDefaultNullValueFixer - fix for nullable with attribute (kubawerlos)
+* bug #5670 PhpUnitNamespacedFixer - do not try to fix constant (kubawerlos)
+* bug #5671 PhpdocToParamTypeFixer - do not change function call (kubawerlos)
+* bug #5673 GroupImportFixer - Fix failing case (julienfalque)
+* minor #4591 Refactor conversion of PHPDoc to type declarations (julienfalque, keradus)
+* minor #5611 DX: use method expectDeprecation from Symfony Bridge instead of annotation (kubawerlos)
+* minor #5658 DX: use constants in tests for Fixer configuration (keradus)
+* minor #5661 DX: remove PHPStan exceptions for "tests" from phpstan.neon (kubawerlos)
+* minor #5662 Change wording from "merge" to "intersect" (jschaedl)
+* minor #5663 DX: do not abuse "inheritdoc" tag (kubawerlos)
+* minor #5664 DX: code grooming (keradus)
+
+Changelog for v2.18.6
+---------------------
+
+* bug #5586 Add support for nullsafe object operator ("?->") (kubawerlos)
+* bug #5597 Tokens - fix for checking block edges (kubawerlos)
+* bug #5604 Custom annotations @type changed into @var (Leprechaunz)
+* bug #5606 DoctrineAnnotationBracesFixer false positive (Leprechaunz)
+* bug #5610 BracesFixer - fix braces of match expression (Leprechaunz)
+* bug #5615 GroupImportFixer severely broken (Leprechaunz)
+* bug #5617 ClassAttributesSeparationFixer - fix for using visibility for class elements (kubawerlos)
+* bug #5618 GroupImportFixer - fix removal of import type when mixing multiple types (Leprechaunz)
+* bug #5622 Exclude Doctrine documents from final fixer (ossinkine)
+* bug #5630 PhpdocTypesOrderFixer - handle complex keys (Leprechaunz)
+* minor #5554 DX: use tmp file in sys_temp_dir for integration tests (keradus)
+* minor #5564 DX: make integration tests matching entries in FixerFactoryTest (kubawerlos)
+* minor #5603 DX: DocumentationGenerator - no need to re-configure Differ (keradus)
+* minor #5612 DX: use ::class whenever possible (kubawerlos)
+* minor #5619 DX: allow XDebugHandler v2 (keradus)
+* minor #5623 DX: when displaying app version, don't put extra space if there is no CODENAME available (keradus)
+* minor #5626 DX: update PHPStan and way of ignoring flickering PHPStan exception (keradus)
+* minor #5629 DX: fix CiIntegrationTest (keradus)
+* minor #5636 DX: remove 'create' method in internal classes (keradus)
+* minor #5637 DX: do not calculate bitmap via helper anymore (keradus)
+* minor #5639 Move fix reports (classes and schemas) (keradus)
+* minor #5640 DX: use constants for PHPUnit version (keradus)
+* minor #5646 Cleanup YodaStyleFixerTest (kubawerlos)
+
+Changelog for v2.18.5
+---------------------
+
+* bug #5561 NoMixedEchoPrintFixer: fix for conditions without curly brackets (kubawerlos)
+* bug #5563 Priority fix: SingleSpaceAfterConstructFixer must run before BracesFixer (kubawerlos)
+* bug #5567 Fix order of BracesFixer and ClassDefinitionFixer (Daeroni)
+* bug #5596 NullableTypeTransformer - fix for attributes (kubawerlos, jrmajor)
+* bug #5598 GroupImportFixer - fix breaking code when fixing root classes (Leprechaunz)
+* minor #5571 DX: add test to make sure SingleSpaceAfterConstructFixer runs before FunctionDeclarationFixer (kubawerlos)
+* minor #5577 Extend priority test for "class_definition" vs "braces" (kubawerlos)
+* minor #5585 DX: make doc examples prettier (kubawerlos)
+* minor #5590 Docs: HeaderCommentFixer - document example how to remove header comment (keradus)
+* minor #5602 DX: regenerate docs (keradus)
+
+Changelog for v2.18.4
+---------------------
+
+* bug #4085 Priority: AlignMultilineComment should run before every PhpdocFixer (dmvdbrugge)
+* bug #5421 PsrAutoloadingFixer - Fix PSR autoloading outside configured directory (kelunik, keradus)
+* bug #5464 NativeFunctionInvocationFixer - PHP 8 attributes (HypeMC, keradus)
+* bug #5548 NullableTypeDeclarationForDefaultNullValueFixer - fix handling promoted properties (jrmajor, keradus)
+* bug #5550 TypeAlternationTransformer - fix for typed static properties (kubawerlos)
+* bug #5551 ClassAttributesSeparationFixer - fix for properties with type alternation (kubawerlos, keradus)
+* bug #5552 DX: test relation between function_declaration and method_argument_space (keradus)
+* minor #5540 DX: RuleSet - convert null handling to soft-warning (keradus)
+* minor #5545 DX: update checkbashisms (keradus)
+
+Changelog for v2.18.3
+---------------------
+
+* bug #5484 NullableTypeDeclarationForDefaultNullValueFixer - handle mixed pseudotype (keradus)
+* minor #5470 Disable CI fail-fast (mvorisek)
+* minor #5491 Support php8 static return type for NoSuperfluousPhpdocTagsFixer (tigitz)
+* minor #5494 BinaryOperatorSpacesFixer - extend examples (keradus)
+* minor #5499 DX: add TODOs for PHP requirements cleanup (keradus)
+* minor #5500 DX: Test that Transformers are adding only CustomTokens that they define and nothing else (keradus)
+* minor #5507 Fix quoting in exception message (gquemener)
+* minor #5514 DX: PHP 7.0 integration test - solve TODO for random_api_migration usage (keradus)
+* minor #5515 DX: do not override getConfigurationDefinition (keradus)
+* minor #5516 DX: AbstractDoctrineAnnotationFixer - no need for import aliases (keradus)
+* minor #5518 DX: minor typing and validation fixes (keradus)
+* minor #5522 Token - add handling json_encode crash (keradus)
+* minor #5523 DX: EregToPregFixer - fix sorting (keradus)
+* minor #5528 DX: code cleanup (keradus)
+
+Changelog for v2.18.2
+---------------------
+
+* bug #5466 Fix runtime check of PHP version (keradus)
+* minor #4250 POC Tokens::insertSlices (keradus)
+
+Changelog for v2.18.1
+---------------------
+
+* bug #5447 switch_case_semicolon_to_colon should skip match/default statements (derrabus)
+* bug #5453 SingleSpaceAfterConstructFixer - better handling of closing parenthesis and brace (keradus)
+* bug #5454 NullableTypeDeclarationForDefaultNullValueFixer - support property promotion via constructor (keradus)
+* bug #5455 PhpdocToCommentFixer - add support for attributes (keradus)
+* bug #5462 NullableTypeDeclarationForDefaultNullValueFixer - support union types (keradus)
+* minor #5444 Fix PHP version number in PHP54MigrationSet description (jdreesen, keradus)
+* minor #5445 DX: update usage of old TraversableContains in tests (keradus)
+* minor #5456 DX: Fix CiIntegrationTest (keradus)
+* minor #5457 CI: fix params order (keradus)
+* minor #5458 CI: fix migration workflow (keradus)
+* minor #5459 DX: cleanup PHP Migration rulesets (keradus)
+
+Changelog for v2.18.0
+---------------------
+
+* feature #4943 Add PSR12 ruleset (julienfalque, keradus)
+* feature #5426 Update Symfony ruleset (keradus)
+* feature #5428 Add/Change PHP.MigrationSet to update array/list syntax to short one (keradus)
+* minor #5441 Allow execution under PHP 8 (keradus)
+
+Changelog for v2.17.5
+---------------------
+
+* bug #5447 switch_case_semicolon_to_colon should skip match/default statements (derrabus)
+* bug #5453 SingleSpaceAfterConstructFixer - better handling of closing parenthesis and brace (keradus)
+* bug #5454 NullableTypeDeclarationForDefaultNullValueFixer - support property promotion via constructor (keradus)
+* bug #5455 PhpdocToCommentFixer - add support for attributes (keradus)
+* bug #5462 NullableTypeDeclarationForDefaultNullValueFixer - support union types (keradus)
+* minor #5445 DX: update usage of old TraversableContains in tests (keradus)
+* minor #5456 DX: Fix CiIntegrationTest (keradus)
+* minor #5457 CI: fix params order (keradus)
+* minor #5459 DX: cleanup PHP Migration rulesets (keradus)
+
+Changelog for v2.17.4
+---------------------
+
+* bug #5379 PhpUnitMethodCasingFixer - Do not modify class name (localheinz)
+* bug #5404 NullableTypeTransformer - constructor property promotion support (Wirone)
+* bug #5433 PhpUnitTestCaseStaticMethodCallsFixer - fix for abstract static method (kubawerlos)
+* minor #5234 DX: Add Docker dev setup (julienfalque, keradus)
+* minor #5391 PhpdocOrderByValueFixer - Add additional annotations to sort (localheinz)
+* minor #5392 PhpdocScalarFixer - Fix description (localheinz)
+* minor #5397 NoExtraBlankLinesFixer - PHP8 throw support (SpacePossum)
+* minor #5399 Add PHP8 integration test (keradus)
+* minor #5405 TypeAlternationTransformer - add support for PHP8 (SpacePossum)
+* minor #5406 SingleSpaceAfterConstructFixer - Attributes, comments and PHPDoc support (SpacePossum)
+* minor #5407 TokensAnalyzer::getClassyElements - return trait imports (SpacePossum)
+* minor #5410 minors (SpacePossum)
+* minor #5411 bump year in LICENSE file (SpacePossum)
+* minor #5414 TypeAlternationTransformer - T_FN support (SpacePossum)
+* minor #5415 Forbid execution under PHP 8.0.0 (keradus)
+* minor #5416 Drop Travis CI (keradus)
+* minor #5419 CI: separate SCA checks to dedicated jobs (keradus)
+* minor #5420 DX: unblock PHPUnit 9.5 (keradus)
+* minor #5423 DX: PHPUnit - disable verbose by default (keradus)
+* minor #5425 Cleanup 3.0 todos (keradus)
+* minor #5427 Plan changing defaults for array_syntax and list_syntax in 3.0 release (keradus)
+* minor #5429 DX: Drop speedtrap PHPUnit listener (keradus)
+* minor #5432 Don't allow unserializing classes with a destructor (jderusse)
+* minor #5435 DX: PHPUnit - groom configuration of time limits (keradus)
+* minor #5439 VisibilityRequiredFixer - support type alternation for properties (keradus)
+* minor #5442 DX: FunctionsAnalyzerTest - add missing 7.0 requirement (keradus)
+
+Changelog for v2.17.3
+---------------------
+
+* bug #5384 PsrAutoloadingFixer - do not remove directory structure from the Class name (kubawerlos, keradus)
+* bug #5385 SingleLineCommentStyleFixer- run before NoUselessReturnFixer (kubawerlos)
+* bug #5387 SingleSpaceAfterConstructFixer - do not touch multi line implements (SpacePossum)
+* minor #5329 DX: collect coverage with Github Actions (kubawerlos)
+* minor #5380 PhpdocOrderByValueFixer - Allow sorting of throws annotations by value (localheinz, keradus)
+* minor #5383 DX: fail PHPUnit tests on warning (kubawerlos)
+* minor #5386 DX: remove incorrect priority relations (kubawerlos)
+
+Changelog for v2.17.2
+---------------------
+
+* bug #5345 CleanNamespaceFixer - preserve traling comments (SpacePossum)
+* bug #5348 PsrAutoloadingFixer - fix for class without namespace (kubawerlos)
+* bug #5362 SingleSpaceAfterConstructFixer: Do not adjust whitespace before multiple multi-line extends (localheinz, SpacePossum)
+* minor #5314 Enable testing with PHPUnit 9.x (sanmai)
+* minor #5319 Clean ups (SpacePossum)
+* minor #5338 clean ups (SpacePossum)
+* minor #5339 NoEmptyStatementFixer - fix more cases (SpacePossum)
+* minor #5340 NamedArgumentTransformer - Introduction (SpacePossum)
+* minor #5344 Update docs: do not use deprecated create method (SpacePossum)
+* minor #5353 Fix typo in issue template (stof)
+* minor #5355 OrderedTraitsFixer - mark as risky (SpacePossum)
+* minor #5356 RuleSet description fixes (SpacePossum)
+* minor #5359 Add application version to "fix" out put when verbosity flag is set (SpacePossum)
+* minor #5360 DX: clean up detectIndent methods (kubawerlos)
+* minor #5363 Added missing self return type to ConfigInterface::registerCustomFixers() (vudaltsov)
+* minor #5366 PhpUnitDedicateAssertInternalTypeFixer - recover target option (keradus)
+* minor #5368 DX: PHPUnit 9 compatibility for 2.17 (keradus)
+* minor #5370 DX: update PHPUnit usage to use external Prophecy trait and solve warning (keradus)
+* minor #5371 Update documentation about PHP_CS_FIXER_IGNORE_ENV (SanderSander, keradus)
+* minor #5373 DX: MagicMethodCasingFixerTest - fix test case description (keradus)
+* minor #5374 DX: PhpUnitDedicateAssertInternalTypeFixer - add code sample for non-default config (keradus)
+
+Changelog for v2.17.1
+---------------------
+
+* bug #5325 NoBreakCommentFixer - better throw handling (SpacePossum)
+* bug #5327 StaticLambdaFixer - fix for arrow function used in class with $this (kubawerlos, SpacePossum)
+* bug #5332 Fix file missing for php8 (jderusse)
+* bug #5333 Fix file missing for php8 (jderusse)
+* minor #5328 Fixed deprecation message version (GrahamCampbell)
+* minor #5330 DX: cleanup Github Actions configs (kubawerlos)
+
+Changelog for v2.17.0
+---------------------
+
+* bug #4752 SimpleLambdaCallFixer - bug fixes (SpacePossum)
+* bug #4794 TernaryToElvisOperatorFixer - fix open tag with echo (SpacePossum)
+* bug #5084 Fix for variables within string interpolation in lambda_not_used_import (GrahamCampbell)
+* bug #5094 SwitchContinueToBreakFixer - do not support alternative syntax (SpacePossum)
+* feature #2619 PSR-5 @inheritDoc support (julienfalque)
+* feature #3253 Add SimplifiedIfReturnFixer (Slamdunk, SpacePossum)
+* feature #4005 GroupImportFixer - introduction (greeflas)
+* feature #4012 BracesFixer - add "allow_single_line_anonymous_class_with_empty_body" option (kubawerlos)
+* feature #4021 OperatorLinebreakFixer - Introduction (kubawerlos, SpacePossum)
+* feature #4259 PsrAutoloadingFixer - introduction (kubawerlos)
+* feature #4375 extend ruleset "@PHP73Migration" (gharlan)
+* feature #4435 SingleSpaceAfterConstructFixer - Introduction (localheinz)
+* feature #4493 Add echo_tag_syntax rule (mlocati, kubawerlos)
+* feature #4544 SimpleLambdaCallFixer - introduction (keradus)
+* feature #4569 PhpdocOrderByValueFixer - Introduction (localheinz)
+* feature #4590 SwitchContinueToBreakFixer - Introduction (SpacePossum)
+* feature #4679 NativeConstantInvocationFixer - add "strict" flag (kubawerlos)
+* feature #4701 OrderedTraitsFixer - introduction (julienfalque)
+* feature #4704 LambdaNotUsedImportFixer - introduction (SpacePossum)
+* feature #4740 NoAliasLanguageConstructCallFixer - introduction (SpacePossum)
+* feature #4741 TernaryToElvisOperatorFixer - introduction (SpacePossum)
+* feature #4778 UseArrowFunctionsFixer - introduction (gharlan)
+* feature #4790 ArrayPushFixer - introduction (SpacePossum)
+* feature #4800 NoUnneededFinalMethodFixer - Add "private_methods" option (SpacePossum)
+* feature #4831 BlankLineBeforeStatementFixer - add yield from (SpacePossum)
+* feature #4832 NoUnneededControlParenthesesFixer - add yield from (SpacePossum)
+* feature #4863 NoTrailingWhitespaceInStringFixer - introduction (gharlan)
+* feature #4875 ClassAttributesSeparationFixer - add option for no new lines between properties (adri, ruudk)
+* feature #4880 HeredocIndentationFixer - config option for indentation level (gharlan)
+* feature #4908 PhpUnitExpectationFixer - update for Phpunit 8.4 (ktomk)
+* feature #4942 OrderedClassElementsFixer - added support for abstract method sorting (carlalexander, SpacePossum)
+* feature #4947 NativeConstantInvocation - Add "PHP_INT_SIZE" to SF rule set (kubawerlos)
+* feature #4953 Add support for custom differ (paulhenri-l, SpacePossum)
+* feature #5264 CleanNamespaceFixer - Introduction (SpacePossum)
+* feature #5280 NoUselessSprintfFixer - Introduction (SpacePossum)
+* minor #4634 Make all options snake_case (kubawerlos)
+* minor #4667 PhpUnitOrderedCoversFixer - stop using deprecated fixer (keradus)
+* minor #4673 FinalStaticAccessFixer - deprecate (julienfalque)
+* minor #4762 Rename simple_lambda_call to regular_callable_call (julienfalque)
+* minor #4782 Update RuleSets (SpacePossum)
+* minor #4802 Master cleanup (SpacePossum)
+* minor #4828 Deprecate Config::create() (DocFX)
+* minor #4872 Update RuleSet SF and PHP-CS-Fixer with new config for `no_extra_blan… (SpacePossum)
+* minor #4900 Move "no_trailing_whitespace_in_string" to SF ruleset. (SpacePossum)
+* minor #4903 Docs: extend regular_callable_call rule docs (keradus, SpacePossum)
+* minor #4910 Add use_arrow_functions rule to PHP74Migration:risky set (keradus)
+* minor #5025 PhpUnitDedicateAssertInternalTypeFixer - deprecate "target" option (kubawerlos)
+* minor #5037 FinalInternalClassFixer- Rename option (SpacePossum)
+* minor #5093 LambdaNotUsedImportFixer - add heredoc test (SpacePossum)
+* minor #5163 Fix CS (SpacePossum)
+* minor #5169 PHP8 care package master (SpacePossum)
+* minor #5186 Fix tests (SpacePossum)
+* minor #5192 GotoLabelAnalyzer - introduction (SpacePossum)
+* minor #5230 Fix: Reference (localheinz)
+* minor #5240 PHP8 - Allow trailing comma in parameter list support (SpacePossum)
+* minor #5244 Fix 2.17 build (keradus)
+* minor #5251 PHP8 - match support (SpacePossum)
+* minor #5252 Update RuleSets (SpacePossum)
+* minor #5278 PHP8 constructor property promotion support (SpacePossum)
+* minor #5284 PHP8 - Attribute support (SpacePossum)
+* minor #5323 NoUselessSprintfFixer - Fix test on PHP5.6 (SpacePossum)
+* minor #5326 DX: relax composer requirements to not block installation under PHP v8, support for PHP v8 is not yet ready (keradus)
+
+
+Changelog for v2.16.10
+----------------------
+
+* minor #5314 Enable testing with PHPUnit 9.x (sanmai)
+* minor #5338 clean ups (SpacePossum)
+* minor #5339 NoEmptyStatementFixer - fix more cases (SpacePossum)
+* minor #5340 NamedArgumentTransformer - Introduction (SpacePossum)
+* minor #5344 Update docs: do not use deprecated create method (SpacePossum)
+* minor #5356 RuleSet description fixes (SpacePossum)
+* minor #5360 DX: clean up detectIndent methods (kubawerlos)
+* minor #5370 DX: update PHPUnit usage to use external Prophecy trait and solve warning (keradus)
+* minor #5373 DX: MagicMethodCasingFixerTest - fix test case description (keradus)
+* minor #5374 DX: PhpUnitDedicateAssertInternalTypeFixer - add code sample for non-default config (keradus)
+
+Changelog for v2.16.9
+---------------------
+
+* bug #5095 Annotation - fix for Windows line endings (SpacePossum)
+* bug #5221 NoSuperfluousPhpdocTagsFixer - fix for single line PHPDoc (kubawerlos)
+* bug #5225 TernaryOperatorSpacesFixer - fix for alternative control structures (kubawerlos)
+* bug #5235 ArrayIndentationFixer - fix for nested arrays (kubawerlos)
+* bug #5248 NoBreakCommentFixer - fix throw detect (SpacePossum)
+* bug #5250 SwitchAnalyzer - fix for semicolon after case/default (kubawerlos)
+* bug #5253 IO - fix cache info message (SpacePossum)
+* bug #5273 Fix PHPDoc line span fixer when property has array typehint (ossinkine)
+* bug #5274 TernaryToNullCoalescingFixer - concat precedence fix (SpacePossum)
+* feature #5216 Add RuleSets to docs (SpacePossum)
+* minor #5226 Applied CS fixes from 2.17-dev (GrahamCampbell)
+* minor #5229 Fixed incorrect phpdoc (GrahamCampbell)
+* minor #5231 CS: unify styling with younger branches (keradus)
+* minor #5232 PHP8 - throw expression support (SpacePossum)
+* minor #5233 DX: simplify check_file_permissions.sh (kubawerlos)
+* minor #5236 Improve handling of unavailable code samples (julienfalque, keradus)
+* minor #5239 PHP8 - Allow trailing comma in parameter list support (SpacePossum)
+* minor #5254 PHP8 - mixed type support (SpacePossum)
+* minor #5255 Tests: do not skip documentation test (keradus)
+* minor #5256 Docs: phpdoc_to_return_type - add new example in docs (keradus)
+* minor #5261 Do not update Composer twice (sanmai)
+* minor #5263 PHP8 support (SpacePossum)
+* minor #5266 PhpUnitTestCaseStaticMethodCallsFixer - PHPUnit 9.x support (sanmai)
+* minor #5267 Improve InstallViaComposerTest (sanmai)
+* minor #5268 Add GitHub Workflows CI, including testing on PHP 8 and on macOS/Windows/Ubuntu (sanmai)
+* minor #5269 Prep work to migrate to PHPUnit 9.x (sanmai, keradus)
+* minor #5275 remove not supported verbose options (SpacePossum)
+* minor #5276 PHP8 - add NoUnreachableDefaultArgumentValueFixer to risky set (SpacePossum)
+* minor #5277 PHP8 - Constructor Property Promotion support (SpacePossum)
+* minor #5292 Disable blank issue template and expose community chat (keradus)
+* minor #5293 Add documentation to "yoda_style" sniff to convert Yoda style to non-Yoda style (Luc45)
+* minor #5295 Run static code analysis off GitHub Actions (sanmai)
+* minor #5298 Add yamllint workflow, validates .yaml files (sanmai)
+* minor #5302 SingleLineCommentStyleFixer - do not fix possible attributes (PHP8) (SpacePossum)
+* minor #5303 Drop CircleCI and AppVeyor (keradus)
+* minor #5304 DX: rename TravisTest, as we no longer test only Travis there (keradus)
+* minor #5305 Groom GitHub CI and move some checks from TravisCI to GitHub CI (keradus)
+* minor #5308 Only run yamllint when a YAML file is changed (julienfalque, keradus)
+* minor #5309 CICD: create yamllint config file (keradus)
+* minor #5311 OrderedClassElementsFixer - PHPUnit Bridge support (ktomk)
+* minor #5316 PHP8 - Attribute support (SpacePossum)
+* minor #5321 DX: little code grooming (keradus)
+
+Changelog for v2.16.8
+---------------------
+
+* bug #5325 NoBreakCommentFixer - better throw handling (SpacePossum)
+* bug #5327 StaticLambdaFixer - fix for arrow function used in class with $this (kubawerlos, SpacePossum)
+* bug #5333 Fix file missing for php8 (jderusse)
+* minor #5328 Fixed deprecation message version (GrahamCampbell)
+* minor #5330 DX: cleanup Github Actions configs (kubawerlos)
+
+Changelog for v2.16.5
+---------------------
+
+* bug #4378 PhpUnitNoExpectationAnnotationFixer - annotation in single line doc comment (kubawerlos)
+* bug #4936 HeaderCommentFixer - Fix unexpected removal of regular comments (julienfalque)
+* bug #5006 PhpdocToParamTypeFixer - fix for breaking PHP syntax for type having reserved name (kubawerlos)
+* bug #5016 NoSuperfluousPhpdocTagsFixer - fix for @return with @inheritDoc in description (kubawerlos)
+* bug #5017 PhpdocTrimConsecutiveBlankLineSeparationFixer - must run after AlignMultilineCommentFixer (kubawerlos)
+* bug #5032 SingleLineAfterImportsFixer - fix for line after import (and before another import) already added using CRLF (kubawerlos)
+* bug #5033 VoidReturnFixer - must run after NoSuperfluousPhpdocTagsFixer (kubawerlos)
+* bug #5038 HelpCommandTest - toString nested array (SpacePossum)
+* bug #5040 LinebreakAfterOpeningTagFixer - do not change code if linebreak already present (kubawerlos)
+* bug #5044 StandardizeIncrementFixer - fix handling static properties (kubawerlos)
+* bug #5045 BacktickToShellExecFixer - add priority relation to NativeFunctionInvocationFixer and SingleQuoteFixer (kubawerlos)
+* bug #5054 PhpdocTypesFixer - fix for multidimensional array (kubawerlos)
+* bug #5065 TernaryOperatorSpacesFixer - fix for discovering ":" correctly (kubawerlos)
+* bug #5068 Fixed php-cs-fixer crashes on input file syntax error (GrahamCampbell)
+* bug #5087 NoAlternativeSyntaxFixer - add support for switch and declare (SpacePossum)
+* bug #5092 PhpdocToParamTypeFixer - remove not used option (SpacePossum)
+* bug #5105 ClassKeywordRemoveFixer - fix for fully qualified class (kubawerlos)
+* bug #5113 TernaryOperatorSpacesFixer - handle goto labels (SpacePossum)
+* bug #5124 Fix TernaryToNullCoalescingFixer when dealing with object properties (HypeMC)
+* bug #5137 DoctrineAnnotationSpacesFixer - fix for typed properties (kubawerlos)
+* bug #5180 Always lint test cases with the stricter process linter (GrahamCampbell)
+* bug #5190 PhpUnit*Fixers - Only fix in unit test class scope (SpacePossum)
+* bug #5195 YodaStyle - statements in braces should be treated as variables in strict … (SpacePossum)
+* bug #5220 NoUnneededFinalMethodFixer - do not fix private constructors (SpacePossum)
+* feature #3475 Rework documentation (julienfalque, SpacePossum)
+* feature #5166 PHP8 (SpacePossum)
+* minor #4878 ArrayIndentationFixer - refactor (julienfalque)
+* minor #5031 CI: skip_cleanup: true (keradus)
+* minor #5035 PhpdocToParamTypeFixer - Rename attribute (SpacePossum)
+* minor #5048 Allow composer/semver ^2.0 and ^3.0 (thomasvargiu)
+* minor #5050 DX: moving integration test for braces, indentation_type and no_break_comment into right place (kubawerlos)
+* minor #5051 DX: move all tests from AutoReview\FixerTest to Test\AbstractFixerTestCase (kubawerlos)
+* minor #5053 DX: cleanup FunctionTypehintSpaceFixer (kubawerlos)
+* minor #5056 DX: add missing priority test for indentation_type and phpdoc_indent (kubawerlos)
+* minor #5077 DX: add missing priority test between NoUnsetCastFixer and BinaryOperatorSpacesFixer (kubawerlos)
+* minor #5083 Update composer.json to prevent issue #5030 (mvorisek)
+* minor #5088 NoBreakCommentFixer - NoUselessElseFixer - priority test (SpacePossum)
+* minor #5100 Fixed invalid PHP 5.6 syntax (GrahamCampbell)
+* minor #5106 Symfony's finder already ignores vcs and dot files by default (GrahamCampbell)
+* minor #5112 DX: check file permissions (kubawerlos, SpacePossum)
+* minor #5122 Show runtime PHP version (kubawerlos)
+* minor #5132 Do not allow assignments in if statements (SpacePossum)
+* minor #5133 RuleSetTest - Early return for boolean and detect more defaults (SpacePossum)
+* minor #5139 revert some unneeded exclusions (SpacePossum)
+* minor #5148 Upgrade Xcode (kubawerlos)
+* minor #5149 NoUnsetOnPropertyFixer - risky description tweaks (SpacePossum)
+* minor #5161 minors (SpacePossum)
+* minor #5170 Fix test on PHP8 (SpacePossum)
+* minor #5172 Remove accidentally inserted newlines (GrahamCampbell)
+* minor #5173 Fix PHP8 RuleSet inherit (SpacePossum)
+* minor #5174 Corrected linting error messages (GrahamCampbell)
+* minor #5177 PHP8 (SpacePossum)
+* minor #5178 Fix tests (SpacePossum)
+* minor #5184 [FinalStaticAccessFixer] Handle new static() in final class (localheinz)
+* minor #5188 DX: Update sibling debs to version supporting PHP8/PHPUnit9 (keradus)
+* minor #5189 Create temporary linting file in system temp dir (keradus)
+* minor #5191 MethodArgumentSpaceFixer - support use/import of anonymous functions. (undefinedor)
+* minor #5193 DX: add AbstractPhpUnitFixer (kubawerlos)
+* minor #5204 DX: cleanup NullableTypeTransformerTest (kubawerlos)
+* minor #5207 Add © for logo (keradus)
+* minor #5208 DX: cleanup php-cs-fixer entry file (keradus)
+* minor #5210 CICD - temporarily disable problematic test (keradus)
+* minor #5211 CICD: fix file permissions (keradus)
+* minor #5213 DX: move report schemas to dedicated dir (keradus)
+* minor #5214 CICD: fix file permissions (keradus)
+* minor #5215 CICD: update checkbashisms (keradus)
+* minor #5217 CICD: use Composer v2 and drop hirak/prestissimo plugin (keradus)
+* minor #5218 DX: .gitignore - add .phpunit.result.cache (keradus)
+* minor #5222 Upgrade Xcode (kubawerlos)
+* minor #5223 Docs: regenerate docs on 2.16 line (keradus)
+
+Changelog for v2.16.4
+---------------------
+
+* bug #3893 Fix handling /** and */ on the same line as the first and/or last annotation (dmvdbrugge)
+* bug #4919 PhpUnitTestAnnotationFixer - fix function starting with "test" and having lowercase letter after (kubawerlos)
+* bug #4929 YodaStyleFixer - handling equals empty array (kubawerlos)
+* bug #4934 YodaStyleFixer - fix for conditions weird are (kubawerlos)
+* bug #4958 OrderedImportsFixer - fix for trailing comma in group (kubawerlos)
+* bug #4959 BlankLineBeforeStatementFixer - handle comment case (SpacePossum)
+* bug #4962 MethodArgumentSpaceFixer - must run after MethodChainingIndentationFixer (kubawerlos)
+* bug #4963 PhpdocToReturnTypeFixer - fix for breaking PHP syntax for type having reserved name (kubawerlos, Slamdunk)
+* bug #4978 ArrayIndentationFixer - must run after MethodArgumentSpaceFixer (kubawerlos)
+* bug #4994 FinalInternalClassFixer - must run before ProtectedToPrivateFixer (kubawerlos)
+* bug #4996 NoEmptyCommentFixer - handle multiline comments (kubawerlos)
+* bug #4999 BlankLineBeforeStatementFixer - better comment handling (SpacePossum)
+* bug #5009 NoEmptyCommentFixer - better handle comments sequence (kubawerlos)
+* bug #5010 SimplifiedNullReturnFixer - must run before VoidReturnFixer (kubawerlos)
+* bug #5011 SingleClassElementPerStatementFixer - must run before ClassAttributesSeparationFixer (kubawerlos)
+* bug #5012 StrictParamFixer - must run before NativeFunctionInvocationFixer (kubawerlos)
+* bug #5014 PhpdocToParamTypeFixer - fix for void as param (kubawerlos)
+* bug #5018 PhpdocScalarFixer - fix for comment with Windows line endings (kubawerlos)
+* bug #5029 SingleLineAfterImportsFixer - fix for line after import already added using CRLF (kubawerlos)
+* minor #4904 Increase PHPStan level to 8 with strict rules (julienfalque)
+* minor #4920 Enhancement: Use DocBlock itself to make it multi-line (localheinz)
+* minor #4930 DX: ensure PhpUnitNamespacedFixer handles all classes (kubawerlos)
+* minor #4931 DX: add test to ensure each target version in PhpUnitTargetVersion has its set in RuleSet (kubawerlos)
+* minor #4932 DX: Travis CI config - fix warnings and infos (kubawerlos)
+* minor #4940 Reject empty path (julienfalque)
+* minor #4944 Fix grammar (julienfalque)
+* minor #4946 Allow "const" option on PHP <7.1 (julienfalque)
+* minor #4948 Added describe command to readme (david, 8ctopus)
+* minor #4949 Fixed build readme on Windows fails if using Git Bash (Mintty) (8ctopus)
+* minor #4954 Config - Trim path (julienfalque)
+* minor #4957 DX: Check trailing spaces in project files only (ktomk)
+* minor #4961 Assert all project source files are monolithic. (SpacePossum)
+* minor #4964 Fix PHPStan baseline (julienfalque)
+* minor #4965 Fix PHPStan baseline (julienfalque)
+* minor #4973 DX: test "isRisky" method in fixer tests, not as auto review (kubawerlos)
+* minor #4974 Minor: Fix typo (ktomk)
+* minor #4975 Revert PHPStan level to 5 (julienfalque)
+* minor #4976 Add instructions for PHPStan (julienfalque)
+* minor #4980 Introduce new issue templates (julienfalque)
+* minor #4981 Prevent error in CTTest::testConstants (for PHP8) (guilliamxavier)
+* minor #4982 Remove PHIVE (kubawerlos)
+* minor #4985 Fix tests with Symfony 5.1 (julienfalque)
+* minor #4987 PhpdocAnnotationWithoutDotFixer - handle unicode characters using mb_* (SpacePossum)
+* minor #5008 Enhancement: Social justification applied (gbyrka-fingo)
+* minor #5023 Fix issue templates (kubawerlos)
+* minor #5024 DX: add missing non-default code samples (kubawerlos)
+
+Changelog for v2.16.3
+---------------------
+
+* bug #4915 Fix handling property PHPDocs with unsupported type (julienfalque)
+* minor #4916 Fix AppVeyor build (julienfalque)
+* minor #4917 CircleCI - Bump xcode to 11.4 (GrahamCampbell)
+* minor #4918 DX: do not fix ".phpt" files by default (kubawerlos)
+
+Changelog for v2.16.2
+---------------------
+
+* bug #3820 Braces - (re)indenting comment issues (SpacePossum)
+* bug #3911 PhpdocVarWithoutNameFixer - fix for properties only (dmvdbrugge)
+* bug #4601 ClassKeywordRemoveFixer - Fix for namespace (yassine-ah, kubawerlos)
+* bug #4630 FullyQualifiedStrictTypesFixer - Ignore partial class names which look like FQCNs (localheinz, SpacePossum)
+* bug #4661 ExplicitStringVariableFixer - variables pair if one is already explicit (kubawerlos)
+* bug #4675 NonPrintableCharacterFixer - fix for backslash and quotes when changing to escape sequences (kubawerlos)
+* bug #4678 TokensAnalyzer::isConstantInvocation - fix for importing multiple classes with single "use" (kubawerlos)
+* bug #4682 Fix handling array type declaration in properties (julienfalque)
+* bug #4685 Improve Symfony 5 compatibility (keradus)
+* bug #4688 TokensAnalyzer::isConstantInvocation - Fix detection for fully qualified return type (julienfalque)
+* bug #4689 DeclareStrictTypesFixer - fix for "strict_types" set to "0" (kubawerlos)
+* bug #4690 PhpdocVarAnnotationCorrectOrderFixer - fix for multiline `@var` without type (kubawerlos)
+* bug #4710 SingleTraitInsertPerStatement - fix formatting for multiline "use" (kubawerlos)
+* bug #4711 Ensure that files from "tests" directory in release are autoloaded (kubawerlos)
+* bug #4749 TokensAnalyze::isUnaryPredecessorOperator fix for CT::T_ARRAY_INDEX_C… (SpacePossum)
+* bug #4759 Add more priority cases (SpacePossum)
+* bug #4761 NoSuperfluousElseifFixer - handle single line (SpacePossum)
+* bug #4783 NoSuperfluousPhpdocTagsFixer - fix for really big PHPDoc (kubawerlos, mvorisek)
+* bug #4787 NoUnneededFinalMethodFixer - Mark as risky (SpacePossum)
+* bug #4795 OrderedClassElementsFixer - Fix (SpacePossum)
+* bug #4801 GlobalNamespaceImportFixer - fix docblock handling (gharlan)
+* bug #4804 TokensAnalyzer::isUnarySuccessorOperator fix for array curly braces (SpacePossum)
+* bug #4807 IncrementStyleFixer - handle after ")" (SpacePossum)
+* bug #4808 Modernize types casting fixer array curly (SpacePossum)
+* bug #4809 Fix "braces" and "method_argument_space" priority (julienfalque)
+* bug #4813 BracesFixer - fix invalid code generation on alternative syntax (SpacePossum)
+* bug #4822 fix 2 bugs in phpdoc_line_span (lmichelin)
+* bug #4823 ReturnAssignmentFixer - repeat fix (SpacePossum)
+* bug #4824 NoUnusedImportsFixer - SingleLineAfterImportsFixer - fix priority (SpacePossum)
+* bug #4825 GlobalNamespaceImportFixer - do not import global into global (SpacePossum)
+* bug #4829 YodaStyleFixer - fix precedence for T_MOD_EQUAL and T_COALESCE_EQUAL (SpacePossum)
+* bug #4830 TernaryToNullCoalescingFixer - handle yield from (SpacePossum)
+* bug #4835 Remove duplicate "function_to_constant" from RuleSet (SpacePossum)
+* bug #4840 LineEndingFixer - T_CLOSE_TAG support, StringLineEndingFixer - T_INLI… (SpacePossum)
+* bug #4846 FunctionsAnalyzer - better isGlobalFunctionCall detection (SpacePossum)
+* bug #4852 Priority issues (SpacePossum)
+* bug #4870 HeaderCommentFixer - do not remove class docs (gharlan)
+* bug #4871 NoExtraBlankLinesFixer - handle cases on same line (SpacePossum)
+* bug #4895 Fix conflict between header_comment and declare_strict_types (BackEndTea, julienfalque)
+* bug #4911 PhpdocSeparationFixer - fix regression with lack of next line (keradus)
+* feature #4742 FunctionToConstantFixer - get_class($this) support (SpacePossum)
+* minor #4377 CommentsAnalyzer - fix for declare before header comment (kubawerlos)
+* minor #4636 DX: do not check for PHPDBG when collecting coverage (kubawerlos)
+* minor #4644 Docs: add info about "-vv..." (voku)
+* minor #4691 Run Travis CI on stable PHP 7.4 (kubawerlos)
+* minor #4693 Increase Travis CI Git clone depth (julienfalque)
+* minor #4699 LineEndingFixer - handle "\r\r\n" (kubawerlos)
+* minor #4703 NoSuperfluousPhpdocTagsFixer,PhpdocAddMissingParamAnnotationFixer - p… (SpacePossum)
+* minor #4707 Fix typos (TysonAndre)
+* minor #4712 NoBlankLinesAfterPhpdocFixer — Do not strip newline between docblock and use statements (mollierobbert)
+* minor #4715 Enhancement: Install ergebnis/composer-normalize via Phive (localheinz)
+* minor #4722 Fix Circle CI build (julienfalque)
+* minor #4724 DX: Simplify installing PCOV (kubawerlos)
+* minor #4736 NoUnusedImportsFixer - do not match variable name as import (SpacePossum)
+* minor #4746 NoSuperfluousPhpdocTagsFixer - Remove for typed properties (PHP 7.4) (ruudk)
+* minor #4753 Do not apply any text/.git filters to fixtures (mvorisek)
+* minor #4757 Test $expected is used before $input (SpacePossum)
+* minor #4758 Autoreview the PHPDoc of *Fixer::getPriority based on the priority map (SpacePossum)
+* minor #4765 Add test on some return types (SpacePossum)
+* minor #4766 Remove false test skip (SpacePossum)
+* minor #4767 Remove useless priority comments (kubawerlos)
+* minor #4769 DX: add missing priority tests (kubawerlos)
+* minor #4772 NoUnneededFinalMethodFixer - update description (kubawerlos)
+* minor #4774 DX: simplify Utils::camelCaseToUnderscore (kubawerlos)
+* minor #4781 NoUnneededCurlyBracesFixer - handle namespaces (SpacePossum)
+* minor #4784 Travis CI - Use multiple keyservers (ktomk)
+* minor #4785 Improve static analysis (enumag)
+* minor #4788 Configurable fixers code sample (SpacePossum)
+* minor #4791 Increase PHPStan level to 3 (julienfalque)
+* minor #4797 clean ups (SpacePossum)
+* minor #4803 FinalClassFixer - Doctrine\ORM\Mapping as ORM alias should not be required (localheinz)
+* minor #4839 2.15 - clean ups (SpacePossum)
+* minor #4842 ReturnAssignmentFixer - Support more cases (julienfalque)
+* minor #4843 NoSuperfluousPhpdocTagsFixer - fix typo in option description (OndraM)
+* minor #4844 Same requirements for descriptions (SpacePossum)
+* minor #4849 Increase PHPStan level to 5 (julienfalque)
+* minor #4850 Fix phpstan (SpacePossum)
+* minor #4857 Fixed the unit tests (GrahamCampbell)
+* minor #4865 Use latest xcode image (GrahamCampbell)
+* minor #4892 CombineNestedDirnameFixer - Add space after comma (julienfalque)
+* minor #4894 DX: PhpdocToParamTypeFixer - improve typing (keradus)
+* minor #4898 FixerTest - yield the data in AutoReview (Nyholm)
+* minor #4899 Fix exception message format for fabbot.io (SpacePossum)
+* minor #4905 Support composer v2 installed.json files (GrahamCampbell)
+* minor #4906 CI: use Composer stable release for AppVeyor (kubawerlos)
+* minor #4909 DX: HeaderCommentFixer - use non-aliased version of option name in code (keradus)
+* minor #4912 CI: Fix AppVeyor integration (keradus)
+
+Changelog for v2.16.1
+---------------------
+
+* bug #4476 FunctionsAnalyzer - add "isTheSameClassCall" for correct verifying of function calls (kubawerlos)
+* bug #4605 PhpdocToParamTypeFixer - cover more cases (keradus, julienfalque)
+* bug #4626 FinalPublicMethodForAbstractClassFixer - Do not attempt to mark abstract public methods as final (localheinz)
+* bug #4632 NullableTypeDeclarationForDefaultNullValueFixer - fix for not lowercase "null" (kubawerlos)
+* bug #4638 Ensure compatibility with PHP 7.4 (julienfalque)
+* bug #4641 Add typed properties test to VisibilityRequiredFixerTest (GawainLynch, julienfalque)
+* bug #4654 ArrayIndentationFixer - Fix array indentation for multiline values (julienfalque)
+* bug #4660 TokensAnalyzer::isConstantInvocation - fix for extending multiple interfaces (kubawerlos)
+* bug #4668 TokensAnalyzer::isConstantInvocation - fix for interface method return type (kubawerlos)
+* minor #4608 Allow Symfony 5 components (l-vo)
+* minor #4622 Disallow PHP 7.4 failures on Travis CI (julienfalque)
+* minor #4623 README - Mark up as code (localheinz)
+* minor #4637 PHP 7.4 integration test (GawainLynch, julienfalque)
+* minor #4643 DX: Update .gitattributes and move ci-integration.sh to root of the project (kubawerlos, keradus)
+* minor #4645 Check PHP extensions on runtime (kubawerlos)
+* minor #4655 Improve docs - README (mvorisek)
+* minor #4662 DX: generate headers in README.rst (kubawerlos)
+* minor #4669 Enable execution under PHP 7.4 (keradus)
+* minor #4670 TravisTest - rewrite tests to allow last supported by tool PHP version to be snapshot (keradus)
+* minor #4671 TravisTest - rewrite tests to allow last supported by tool PHP version to be snapshot (keradus)
+
+Changelog for v2.16.0
+---------------------
+
+* feature #3810 PhpdocLineSpanFixer - Introduction (BackEndTea)
+* feature #3928 Add FinalPublicMethodForAbstractClassFixer (Slamdunk)
+* feature #4000 FinalStaticAccessFixer - Introduction (ntzm)
+* feature #4275 Issue #4274: Let lowercase_constants directive to be configurable. (drupol)
+* feature #4355 GlobalNamespaceImportFixer - Introduction (gharlan)
+* feature #4358 SelfStaticAccessorFixer - Introduction (SpacePossum)
+* feature #4385 CommentToPhpdocFixer - allow to ignore tags (kubawerlos)
+* feature #4401 Add NullableTypeDeclarationForDefaultNullValueFixer (HypeMC)
+* feature #4452 Add SingleLineThrowFixer (kubawerlos)
+* feature #4500 NoSuperfluousPhpdocTags - Add remove_inheritdoc option (julienfalque)
+* feature #4505 NoSuperfluousPhpdocTagsFixer - allow params that aren't on the signature (azjezz)
+* feature #4531 PhpdocAlignFixer - add "property-read" and "property-write" to allowed tags (kubawerlos)
+* feature #4583 Phpdoc to param type fixer rebase (jg-development)
+* minor #4033 Raise deprecation warnings on usage of deprecated aliases (ntzm)
+* minor #4423 DX: update branch alias (keradus)
+* minor #4537 SelfStaticAccessor - extend itests (keradus)
+* minor #4607 Configure no_superfluous_phpdoc_tags for Symfony (keradus)
+* minor #4618 DX: fix usage of deprecated options (0x450x6c)
+* minor #4619 Fix PHP 7.3 strict mode warnings (keradus)
+* minor #4621 Add single_line_throw to Symfony ruleset (keradus)
+
+Changelog for v2.15.10
+----------------------
+
+* bug #5095 Annotation - fix for Windows line endings (SpacePossum)
+* bug #5221 NoSuperfluousPhpdocTagsFixer - fix for single line PHPDoc (kubawerlos)
+* bug #5225 TernaryOperatorSpacesFixer - fix for alternative control structures (kubawerlos)
+* bug #5235 ArrayIndentationFixer - fix for nested arrays (kubawerlos)
+* bug #5248 NoBreakCommentFixer - fix throw detect (SpacePossum)
+* bug #5250 SwitchAnalyzer - fix for semicolon after case/default (kubawerlos)
+* bug #5253 IO - fix cache info message (SpacePossum)
+* bug #5274 TernaryToNullCoalescingFixer - concat precedence fix (SpacePossum)
+* feature #5216 Add RuleSets to docs (SpacePossum)
+* minor #5226 Applied CS fixes from 2.17-dev (GrahamCampbell)
+* minor #5229 Fixed incorrect phpdoc (GrahamCampbell)
+* minor #5231 CS: unify styling with younger branches (keradus)
+* minor #5232 PHP8 - throw expression support (SpacePossum)
+* minor #5233 DX: simplify check_file_permissions.sh (kubawerlos)
+* minor #5236 Improve handling of unavailable code samples (julienfalque, keradus)
+* minor #5239 PHP8 - Allow trailing comma in parameter list support (SpacePossum)
+* minor #5254 PHP8 - mixed type support (SpacePossum)
+* minor #5255 Tests: do not skip documentation test (keradus)
+* minor #5261 Do not update Composer twice (sanmai)
+* minor #5263 PHP8 support (SpacePossum)
+* minor #5266 PhpUnitTestCaseStaticMethodCallsFixer - PHPUnit 9.x support (sanmai)
+* minor #5267 Improve InstallViaComposerTest (sanmai)
+* minor #5276 PHP8 - add NoUnreachableDefaultArgumentValueFixer to risky set (SpacePossum)
+
+Changelog for v2.15.9
+---------------------
+
+* bug #4378 PhpUnitNoExpectationAnnotationFixer - annotation in single line doc comment (kubawerlos)
+* bug #4936 HeaderCommentFixer - Fix unexpected removal of regular comments (julienfalque)
+* bug #5017 PhpdocTrimConsecutiveBlankLineSeparationFixer - must run after AlignMultilineCommentFixer (kubawerlos)
+* bug #5033 VoidReturnFixer - must run after NoSuperfluousPhpdocTagsFixer (kubawerlos)
+* bug #5038 HelpCommandTest - toString nested array (SpacePossum)
+* bug #5040 LinebreakAfterOpeningTagFixer - do not change code if linebreak already present (kubawerlos)
+* bug #5044 StandardizeIncrementFixer - fix handling static properties (kubawerlos)
+* bug #5045 BacktickToShellExecFixer - add priority relation to NativeFunctionInvocationFixer and SingleQuoteFixer (kubawerlos)
+* bug #5054 PhpdocTypesFixer - fix for multidimensional array (kubawerlos)
+* bug #5065 TernaryOperatorSpacesFixer - fix for discovering ":" correctly (kubawerlos)
+* bug #5068 Fixed php-cs-fixer crashes on input file syntax error (GrahamCampbell)
+* bug #5087 NoAlternativeSyntaxFixer - add support for switch and declare (SpacePossum)
+* bug #5105 ClassKeywordRemoveFixer - fix for fully qualified class (kubawerlos)
+* bug #5113 TernaryOperatorSpacesFixer - handle goto labels (SpacePossum)
+* bug #5124 Fix TernaryToNullCoalescingFixer when dealing with object properties (HypeMC)
+* bug #5137 DoctrineAnnotationSpacesFixer - fix for typed properties (kubawerlos)
+* bug #5180 Always lint test cases with the stricter process linter (GrahamCampbell)
+* bug #5190 PhpUnit*Fixers - Only fix in unit test class scope (SpacePossum)
+* bug #5195 YodaStyle - statements in braces should be treated as variables in strict … (SpacePossum)
+* bug #5220 NoUnneededFinalMethodFixer - do not fix private constructors (SpacePossum)
+* feature #3475 Rework documentation (julienfalque, SpacePossum)
+* feature #5166 PHP8 (SpacePossum)
+* minor #4878 ArrayIndentationFixer - refactor (julienfalque)
+* minor #5031 CI: skip_cleanup: true (keradus)
+* minor #5048 Allow composer/semver ^2.0 and ^3.0 (thomasvargiu)
+* minor #5050 DX: moving integration test for braces, indentation_type and no_break_comment into right place (kubawerlos)
+* minor #5051 DX: move all tests from AutoReview\FixerTest to Test\AbstractFixerTestCase (kubawerlos)
+* minor #5053 DX: cleanup FunctionTypehintSpaceFixer (kubawerlos)
+* minor #5056 DX: add missing priority test for indentation_type and phpdoc_indent (kubawerlos)
+* minor #5077 DX: add missing priority test between NoUnsetCastFixer and BinaryOperatorSpacesFixer (kubawerlos)
+* minor #5083 Update composer.json to prevent issue #5030 (mvorisek)
+* minor #5088 NoBreakCommentFixer - NoUselessElseFixer - priority test (SpacePossum)
+* minor #5100 Fixed invalid PHP 5.6 syntax (GrahamCampbell)
+* minor #5106 Symfony's finder already ignores vcs and dot files by default (GrahamCampbell)
+* minor #5112 DX: check file permissions (kubawerlos, SpacePossum)
+* minor #5122 Show runtime PHP version (kubawerlos)
+* minor #5132 Do not allow assignments in if statements (SpacePossum)
+* minor #5133 RuleSetTest - Early return for boolean and detect more defaults (SpacePossum)
+* minor #5139 revert some unneeded exclusions (SpacePossum)
+* minor #5148 Upgrade Xcode (kubawerlos)
+* minor #5149 NoUnsetOnPropertyFixer - risky description tweaks (SpacePossum)
+* minor #5161 minors (SpacePossum)
+* minor #5172 Remove accidentally inserted newlines (GrahamCampbell)
+* minor #5173 Fix PHP8 RuleSet inherit (SpacePossum)
+* minor #5174 Corrected linting error messages (GrahamCampbell)
+* minor #5177 PHP8 (SpacePossum)
+* minor #5188 DX: Update sibling debs to version supporting PHP8/PHPUnit9 (keradus)
+* minor #5189 Create temporary linting file in system temp dir (keradus)
+* minor #5191 MethodArgumentSpaceFixer - support use/import of anonymous functions. (undefinedor)
+* minor #5193 DX: add AbstractPhpUnitFixer (kubawerlos)
+* minor #5204 DX: cleanup NullableTypeTransformerTest (kubawerlos)
+* minor #5207 Add © for logo (keradus)
+* minor #5208 DX: cleanup php-cs-fixer entry file (keradus)
+* minor #5210 CICD - temporarily disable problematic test (keradus)
+* minor #5211 CICD: fix file permissions (keradus)
+* minor #5213 DX: move report schemas to dedicated dir (keradus)
+* minor #5214 CICD: fix file permissions (keradus)
+* minor #5215 CICD: update checkbashisms (keradus)
+* minor #5217 CICD: use Composer v2 and drop hirak/prestissimo plugin (keradus)
+* minor #5218 DX: .gitignore - add .phpunit.result.cache (keradus)
+* minor #5222 Upgrade Xcode (kubawerlos)
+
+Changelog for v2.15.8
+---------------------
+
+* bug #3893 Fix handling /** and */ on the same line as the first and/or last annotation (dmvdbrugge)
+* bug #4919 PhpUnitTestAnnotationFixer - fix function starting with "test" and having lowercase letter after (kubawerlos)
+* bug #4929 YodaStyleFixer - handling equals empty array (kubawerlos)
+* bug #4934 YodaStyleFixer - fix for conditions weird are (kubawerlos)
+* bug #4958 OrderedImportsFixer - fix for trailing comma in group (kubawerlos)
+* bug #4959 BlankLineBeforeStatementFixer - handle comment case (SpacePossum)
+* bug #4962 MethodArgumentSpaceFixer - must run after MethodChainingIndentationFixer (kubawerlos)
+* bug #4963 PhpdocToReturnTypeFixer - fix for breaking PHP syntax for type having reserved name (kubawerlos, Slamdunk)
+* bug #4978 ArrayIndentationFixer - must run after MethodArgumentSpaceFixer (kubawerlos)
+* bug #4994 FinalInternalClassFixer - must run before ProtectedToPrivateFixer (kubawerlos)
+* bug #4996 NoEmptyCommentFixer - handle multiline comments (kubawerlos)
+* bug #4999 BlankLineBeforeStatementFixer - better comment handling (SpacePossum)
+* bug #5009 NoEmptyCommentFixer - better handle comments sequence (kubawerlos)
+* bug #5010 SimplifiedNullReturnFixer - must run before VoidReturnFixer (kubawerlos)
+* bug #5011 SingleClassElementPerStatementFixer - must run before ClassAttributesSeparationFixer (kubawerlos)
+* bug #5012 StrictParamFixer - must run before NativeFunctionInvocationFixer (kubawerlos)
+* bug #5029 SingleLineAfterImportsFixer - fix for line after import already added using CRLF (kubawerlos)
+* minor #4904 Increase PHPStan level to 8 with strict rules (julienfalque)
+* minor #4930 DX: ensure PhpUnitNamespacedFixer handles all classes (kubawerlos)
+* minor #4931 DX: add test to ensure each target version in PhpUnitTargetVersion has its set in RuleSet (kubawerlos)
+* minor #4932 DX: Travis CI config - fix warnings and infos (kubawerlos)
+* minor #4940 Reject empty path (julienfalque)
+* minor #4944 Fix grammar (julienfalque)
+* minor #4946 Allow "const" option on PHP <7.1 (julienfalque)
+* minor #4948 Added describe command to readme (david, 8ctopus)
+* minor #4949 Fixed build readme on Windows fails if using Git Bash (Mintty) (8ctopus)
+* minor #4954 Config - Trim path (julienfalque)
+* minor #4957 DX: Check trailing spaces in project files only (ktomk)
+* minor #4961 Assert all project source files are monolithic. (SpacePossum)
+* minor #4964 Fix PHPStan baseline (julienfalque)
+* minor #4973 DX: test "isRisky" method in fixer tests, not as auto review (kubawerlos)
+* minor #4974 Minor: Fix typo (ktomk)
+* minor #4975 Revert PHPStan level to 5 (julienfalque)
+* minor #4976 Add instructions for PHPStan (julienfalque)
+* minor #4980 Introduce new issue templates (julienfalque)
+* minor #4981 Prevent error in CTTest::testConstants (for PHP8) (guilliamxavier)
+* minor #4982 Remove PHIVE (kubawerlos)
+* minor #4985 Fix tests with Symfony 5.1 (julienfalque)
+* minor #4987 PhpdocAnnotationWithoutDotFixer - handle unicode characters using mb_* (SpacePossum)
+* minor #5008 Enhancement: Social justification applied (gbyrka-fingo)
+* minor #5023 Fix issue templates (kubawerlos)
+* minor #5024 DX: add missing non-default code samples (kubawerlos)
+
+Changelog for v2.15.7
+---------------------
+
+* bug #4915 Fix handling property PHPDocs with unsupported type (julienfalque)
+* minor #4916 Fix AppVeyor build (julienfalque)
+* minor #4917 CircleCI - Bump xcode to 11.4 (GrahamCampbell)
+* minor #4918 DX: do not fix ".phpt" files by default (kubawerlos)
+
+Changelog for v2.15.6
+---------------------
+
+* bug #3820 Braces - (re)indenting comment issues (SpacePossum)
+* bug #3911 PhpdocVarWithoutNameFixer - fix for properties only (dmvdbrugge)
+* bug #4601 ClassKeywordRemoveFixer - Fix for namespace (yassine-ah, kubawerlos)
+* bug #4630 FullyQualifiedStrictTypesFixer - Ignore partial class names which look like FQCNs (localheinz, SpacePossum)
+* bug #4661 ExplicitStringVariableFixer - variables pair if one is already explicit (kubawerlos)
+* bug #4675 NonPrintableCharacterFixer - fix for backslash and quotes when changing to escape sequences (kubawerlos)
+* bug #4678 TokensAnalyzer::isConstantInvocation - fix for importing multiple classes with single "use" (kubawerlos)
+* bug #4682 Fix handling array type declaration in properties (julienfalque)
+* bug #4685 Improve Symfony 5 compatibility (keradus)
+* bug #4688 TokensAnalyzer::isConstantInvocation - Fix detection for fully qualified return type (julienfalque)
+* bug #4689 DeclareStrictTypesFixer - fix for "strict_types" set to "0" (kubawerlos)
+* bug #4690 PhpdocVarAnnotationCorrectOrderFixer - fix for multiline `@var` without type (kubawerlos)
+* bug #4710 SingleTraitInsertPerStatement - fix formatting for multiline "use" (kubawerlos)
+* bug #4711 Ensure that files from "tests" directory in release are autoloaded (kubawerlos)
+* bug #4749 TokensAnalyze::isUnaryPredecessorOperator fix for CT::T_ARRAY_INDEX_C… (SpacePossum)
+* bug #4759 Add more priority cases (SpacePossum)
+* bug #4761 NoSuperfluousElseifFixer - handle single line (SpacePossum)
+* bug #4783 NoSuperfluousPhpdocTagsFixer - fix for really big PHPDoc (kubawerlos, mvorisek)
+* bug #4787 NoUnneededFinalMethodFixer - Mark as risky (SpacePossum)
+* bug #4795 OrderedClassElementsFixer - Fix (SpacePossum)
+* bug #4804 TokensAnalyzer::isUnarySuccessorOperator fix for array curly braces (SpacePossum)
+* bug #4807 IncrementStyleFixer - handle after ")" (SpacePossum)
+* bug #4808 Modernize types casting fixer array curly (SpacePossum)
+* bug #4809 Fix "braces" and "method_argument_space" priority (julienfalque)
+* bug #4813 BracesFixer - fix invalid code generation on alternative syntax (SpacePossum)
+* bug #4823 ReturnAssignmentFixer - repeat fix (SpacePossum)
+* bug #4824 NoUnusedImportsFixer - SingleLineAfterImportsFixer - fix priority (SpacePossum)
+* bug #4829 YodaStyleFixer - fix precedence for T_MOD_EQUAL and T_COALESCE_EQUAL (SpacePossum)
+* bug #4830 TernaryToNullCoalescingFixer - handle yield from (SpacePossum)
+* bug #4835 Remove duplicate "function_to_constant" from RuleSet (SpacePossum)
+* bug #4840 LineEndingFixer - T_CLOSE_TAG support, StringLineEndingFixer - T_INLI… (SpacePossum)
+* bug #4846 FunctionsAnalyzer - better isGlobalFunctionCall detection (SpacePossum)
+* bug #4852 Priority issues (SpacePossum)
+* bug #4870 HeaderCommentFixer - do not remove class docs (gharlan)
+* bug #4871 NoExtraBlankLinesFixer - handle cases on same line (SpacePossum)
+* bug #4895 Fix conflict between header_comment and declare_strict_types (BackEndTea, julienfalque)
+* bug #4911 PhpdocSeparationFixer - fix regression with lack of next line (keradus)
+* feature #4742 FunctionToConstantFixer - get_class($this) support (SpacePossum)
+* minor #4377 CommentsAnalyzer - fix for declare before header comment (kubawerlos)
+* minor #4636 DX: do not check for PHPDBG when collecting coverage (kubawerlos)
+* minor #4644 Docs: add info about "-vv..." (voku)
+* minor #4691 Run Travis CI on stable PHP 7.4 (kubawerlos)
+* minor #4693 Increase Travis CI Git clone depth (julienfalque)
+* minor #4699 LineEndingFixer - handle "\r\r\n" (kubawerlos)
+* minor #4703 NoSuperfluousPhpdocTagsFixer,PhpdocAddMissingParamAnnotationFixer - p… (SpacePossum)
+* minor #4707 Fix typos (TysonAndre)
+* minor #4712 NoBlankLinesAfterPhpdocFixer — Do not strip newline between docblock and use statements (mollierobbert)
+* minor #4715 Enhancement: Install ergebnis/composer-normalize via Phive (localheinz)
+* minor #4722 Fix Circle CI build (julienfalque)
+* minor #4724 DX: Simplify installing PCOV (kubawerlos)
+* minor #4736 NoUnusedImportsFixer - do not match variable name as import (SpacePossum)
+* minor #4746 NoSuperfluousPhpdocTagsFixer - Remove for typed properties (PHP 7.4) (ruudk)
+* minor #4753 Do not apply any text/.git filters to fixtures (mvorisek)
+* minor #4757 Test $expected is used before $input (SpacePossum)
+* minor #4758 Autoreview the PHPDoc of *Fixer::getPriority based on the priority map (SpacePossum)
+* minor #4765 Add test on some return types (SpacePossum)
+* minor #4766 Remove false test skip (SpacePossum)
+* minor #4767 Remove useless priority comments (kubawerlos)
+* minor #4769 DX: add missing priority tests (kubawerlos)
+* minor #4772 NoUnneededFinalMethodFixer - update description (kubawerlos)
+* minor #4774 DX: simplify Utils::camelCaseToUnderscore (kubawerlos)
+* minor #4781 NoUnneededCurlyBracesFixer - handle namespaces (SpacePossum)
+* minor #4784 Travis CI - Use multiple keyservers (ktomk)
+* minor #4785 Improve static analysis (enumag)
+* minor #4788 Configurable fixers code sample (SpacePossum)
+* minor #4791 Increase PHPStan level to 3 (julienfalque)
+* minor #4797 clean ups (SpacePossum)
+* minor #4803 FinalClassFixer - Doctrine\ORM\Mapping as ORM alias should not be required (localheinz)
+* minor #4839 2.15 - clean ups (SpacePossum)
+* minor #4842 ReturnAssignmentFixer - Support more cases (julienfalque)
+* minor #4844 Same requirements for descriptions (SpacePossum)
+* minor #4849 Increase PHPStan level to 5 (julienfalque)
+* minor #4857 Fixed the unit tests (GrahamCampbell)
+* minor #4865 Use latest xcode image (GrahamCampbell)
+* minor #4892 CombineNestedDirnameFixer - Add space after comma (julienfalque)
+* minor #4898 FixerTest - yield the data in AutoReview (Nyholm)
+* minor #4899 Fix exception message format for fabbot.io (SpacePossum)
+* minor #4905 Support composer v2 installed.json files (GrahamCampbell)
+* minor #4906 CI: use Composer stable release for AppVeyor (kubawerlos)
+* minor #4909 DX: HeaderCommentFixer - use non-aliased version of option name in code (keradus)
+* minor #4912 CI: Fix AppVeyor integration (keradus)
+
+Changelog for v2.15.5
+---------------------
+
+* bug #4476 FunctionsAnalyzer - add "isTheSameClassCall" for correct verifying of function calls (kubawerlos)
+* bug #4641 Add typed properties test to VisibilityRequiredFixerTest (GawainLynch, julienfalque)
+* bug #4654 ArrayIndentationFixer - Fix array indentation for multiline values (julienfalque)
+* bug #4660 TokensAnalyzer::isConstantInvocation - fix for extending multiple interfaces (kubawerlos)
+* bug #4668 TokensAnalyzer::isConstantInvocation - fix for interface method return type (kubawerlos)
+* minor #4608 Allow Symfony 5 components (l-vo)
+* minor #4622 Disallow PHP 7.4 failures on Travis CI (julienfalque)
+* minor #4637 PHP 7.4 integration test (GawainLynch, julienfalque)
+* minor #4643 DX: Update .gitattributes and move ci-integration.sh to root of the project (kubawerlos, keradus)
+* minor #4645 Check PHP extensions on runtime (kubawerlos)
+* minor #4655 Improve docs - README (mvorisek)
+* minor #4662 DX: generate headers in README.rst (kubawerlos)
+* minor #4669 Enable execution under PHP 7.4 (keradus)
+* minor #4671 TravisTest - rewrite tests to allow last supported by tool PHP version to be snapshot (keradus)
+
+Changelog for v2.15.4
+---------------------
+
+* bug #4183 IndentationTypeFixer - fix handling 2 spaces indent (kubawerlos)
+* bug #4406 NoSuperfluousElseifFixer - fix invalid escape sequence in character class (remicollet, SpacePossum)
+* bug #4416 NoUnusedImports - Fix imports detected as used in namespaces (julienfalque, SpacePossum)
+* bug #4518 PhpUnitNoExpectationAnnotationFixer - fix handling expect empty exception message (ktomk)
+* bug #4548 HeredocIndentationFixer - remove whitespace in empty lines (gharlan)
+* bug #4556 ClassKeywordRemoveFixer - fix for self,static and parent keywords (kubawerlos)
+* bug #4572 TokensAnalyzer - handle nested anonymous classes (SpacePossum)
+* bug #4573 CombineConsecutiveIssetsFixer - fix stop based on precedence (SpacePossum)
+* bug #4577 Fix command exit code on lint error after fixing fix. (SpacePossum)
+* bug #4581 FunctionsAnalyzer: fix for comment in type (kubawerlos)
+* bug #4586 BracesFixer - handle dynamic static method call (SpacePossum)
+* bug #4594 Braces - fix both single line comment styles (SpacePossum)
+* bug #4609 PhpdocTypesOrderFixer - Prevent unexpected default value change (laurent35240)
+* minor #4458 Add PHPStan (julienfalque)
+* minor #4479 IncludeFixer - remove braces when the statement is wrapped in block (kubawerlos)
+* minor #4490 Allow running if installed as project specific (ticktackk)
+* minor #4517 Verify PCRE pattern before use (ktomk)
+* minor #4521 Remove superfluous leading backslash, closes 4520 (ktomk)
+* minor #4532 DX: ensure data providers are used (kubawerlos)
+* minor #4534 Redo PHP7.4 - Add "str_split" => "mb_str_split" mapping (keradus, Slamdunk)
+* minor #4536 DX: use PHIVE for dev tools (keradus)
+* minor #4538 Docs: update Cookbook (keradus)
+* minor #4541 Enhancement: Use default name property to configure command names (localheinz)
+* minor #4546 DX: removing unnecessary variable initialization (kubawerlos)
+* minor #4549 DX: use ::class whenever possible (keradus, kubawerlos)
+* minor #4550 DX: travis_retry for dev-tools install (ktomk, keradus)
+* minor #4559 Allow 7.4snapshot to fail due to a bug on it (kubawerlos)
+* minor #4563 GitlabReporter - fix report output (mjanser)
+* minor #4564 Move readme-update command to Section 3 (iwasherefirst2)
+* minor #4566 Update symfony ruleset (gharlan)
+* minor #4570 Command::execute() should always return an integer (derrabus)
+* minor #4580 Add suport for true/false return type hints. (SpacePossum)
+* minor #4584 Increase PHPStan level to 1 (julienfalque)
+* minor #4585 Fix deprecation notices (julienfalque)
+* minor #4587 Output details - Explain why a file was skipped (SpacePossum)
+* minor #4588 Fix STDIN test when path is one level deep (julienfalque)
+* minor #4589 PhpdocToReturnType - Add support for Foo[][] (SpacePossum)
+* minor #4593 Ensure compatibility with PHP 7.4 typed properties (julienfalque)
+* minor #4595 Import cannot be used after `::` so can be removed (SpacePossum)
+* minor #4596 Ensure compatibility with PHP 7.4 numeric literal separator (julienfalque)
+* minor #4597 Fix PHP 7.4 deprecation notices (julienfalque)
+* minor #4600 Ensure compatibility with PHP 7.4 arrow functions (julienfalque)
+* minor #4602 Ensure compatibility with PHP 7.4 spread operator in array expression (julienfalque)
+* minor #4603 Ensure compatibility with PHP 7.4 null coalescing assignment operator (julienfalque)
+* minor #4606 Configure no_superfluous_phpdoc_tags for Symfony (keradus)
+* minor #4610 Travis CI - Update known files list (julienfalque)
+* minor #4615 Remove workaround for dev-tools install reg. Phive (ktomk)
+
+Changelog for v2.15.3
+---------------------
+
+* bug #4533 Revert PHP7.4 - Add "str_split" => "mb_str_split" mapping (keradus)
+* minor #4264 DX: AutoReview - ensure Travis handle all needed PHP versions (keradus)
+* minor #4524 MethodArgumentSpaceFixerTest - make explicit configuration to prevent fail on configuration change (keradus)
+
+Changelog for v2.15.2
+---------------------
+
+* bug #4132 BlankLineAfterNamespaceFixer - do not remove indent, handle comments (kubawerlos)
+* bug #4384 MethodArgumentSpaceFixer - fix for on_multiline:ensure_fully_multiline with trailing comma in function call (kubawerlos)
+* bug #4404 FileLintingIterator - fix current value on end/invalid (SpacePossum)
+* bug #4421 FunctionTypehintSpaceFixer - Ensure single space between type declaration and parameter (localheinz)
+* bug #4436 MethodArgumentSpaceFixer - handle misplaced ) (keradus)
+* bug #4439 NoLeadingImportSlashFixer - Add space if needed (SpacePossum)
+* bug #4440 SimpleToComplexStringVariableFixer - Fix $ bug (dmvdbrugge)
+* bug #4453 Fix preg_match error on 7.4snapshot (kubawerlos)
+* bug #4461 IsNullFixer - fix null coalescing operator handling (linniksa)
+* bug #4467 ToolInfo - fix access to reference without checking existence (black-silence)
+* bug #4472 Fix non-static closure unbinding this on PHP 7.4 (kelunik)
+* minor #3726 Use Box 3 to build the PHAR (theofidry, keradus)
+* minor #4412 PHP 7.4 - Tests for support (SpacePossum)
+* minor #4431 DX: test that default config is not passed in RuleSet (kubawerlos)
+* minor #4433 DX: test to ensure @PHPUnitMigration rule sets are correctly defined (kubawerlos)
+* minor #4445 DX: static call of markTestSkippedOrFail (kubawerlos)
+* minor #4463 Add apostrophe to possessive "team's" (ChandlerSwift)
+* minor #4471 ReadmeCommandTest - use CommandTester (kubawerlos)
+* minor #4477 DX: control names of public methods in test's classes (kubawerlos)
+* minor #4483 NewWithBracesFixer - Fix object operator and curly brace open cases (SpacePossum)
+* minor #4484 fix typos in README (Sven Ludwig)
+* minor #4494 DX: Fix shell script syntax in order to fix Travis builds (drupol)
+* minor #4516 DX: Lock binary SCA tools versions (keradus)
+
+Changelog for v2.15.1
+---------------------
+
+* bug #4418 PhpUnitNamespacedFixer - properly translate classes which do not follow translation pattern (ktomk)
+* bug #4419 PhpUnitTestCaseStaticMethodCallsFixer - skip anonymous classes and lambda (SpacePossum)
+* bug #4420 MethodArgumentSpaceFixer - PHP7.3 trailing commas in function calls (SpacePossum)
+* minor #4345 Travis: PHP 7.4 isn't allowed to fail anymore (Slamdunk)
+* minor #4403 LowercaseStaticReferenceFixer - Fix invalid PHP version in example (HypeMC)
+* minor #4424 DX: cleanup of composer.json - no need for branch-alias (keradus)
+* minor #4425 DX: assertions are static, adjust custom assertions (keradus)
+* minor #4426 DX: handle deprecations of symfony/event-dispatcher:4.3 (keradus)
+* minor #4427 DX: stop using reserved T_FN in code samples (keradus)
+* minor #4428 DX: update dev-tools (keradus)
+* minor #4429 DX: MethodArgumentSpaceFixerTest - fix hidden merge conflict (keradus)
+
+Changelog for v2.15.0
+---------------------
+
+* feature #3927 Add FinalClassFixer (Slamdunk)
+* feature #3939 Add PhpUnitSizeClassFixer (Jefersson Nathan)
+* feature #3942 SimpleToComplexStringVariableFixer - Introduction (dmvdbrugge, SpacePossum)
+* feature #4113 OrderedInterfacesFixer - Introduction (dmvdbrugge)
+* feature #4121 SingleTraitInsertPerStatementFixer - Introduction (SpacePossum)
+* feature #4126 NativeFunctionTypeDeclarationCasingFixer - Introduction (SpacePossum)
+* feature #4167 PhpUnitMockShortWillReturnFixer - Introduction (michadam-pearson)
+* feature #4191 [7.3] NoWhitespaceBeforeCommaInArrayFixer - fix comma after heredoc-end (gharlan)
+* feature #4288 Add Gitlab Reporter (hco)
+* feature #4328 Add PhpUnitDedicateAssertInternalTypeFixer (Slamdunk)
+* feature #4341 [7.3] TrailingCommaInMultilineArrayFixer - fix comma after heredoc-end (gharlan)
+* feature #4342 [7.3] MethodArgumentSpaceFixer - fix comma after heredoc-end (gharlan)
+* minor #4112 NoSuperfluousPhpdocTagsFixer - Add missing code sample, groom tests (keradus, SpacePossum)
+* minor #4360 Add gitlab as output format in the README/help doc. (SpacePossum)
+* minor #4386 Add PhpUnitMockShortWillReturnFixer to @Symfony:risky rule set (kubawerlos)
+* minor #4398 New ruleset "@PHP73Migration" (gharlan)
+* minor #4399 Fix 2.15 line (keradus)
+
+Changelog for v2.14.6
+---------------------
+
+* bug #4533 Revert PHP7.4 - Add "str_split" => "mb_str_split" mapping (keradus)
+* minor #4264 DX: AutoReview - ensure Travis handle all needed PHP versions (keradus)
+* minor #4524 MethodArgumentSpaceFixerTest - make explicit configuration to prevent fail on configuration change (keradus)
+
+Changelog for v2.14.5
+---------------------
+
+* bug #4132 BlankLineAfterNamespaceFixer - do not remove indent, handle comments (kubawerlos)
+* bug #4384 MethodArgumentSpaceFixer - fix for on_multiline:ensure_fully_multiline with trailing comma in function call (kubawerlos)
+* bug #4404 FileLintingIterator - fix current value on end/invalid (SpacePossum)
+* bug #4421 FunctionTypehintSpaceFixer - Ensure single space between type declaration and parameter (localheinz)
+* bug #4436 MethodArgumentSpaceFixer - handle misplaced ) (keradus)
+* bug #4439 NoLeadingImportSlashFixer - Add space if needed (SpacePossum)
+* bug #4453 Fix preg_match error on 7.4snapshot (kubawerlos)
+* bug #4461 IsNullFixer - fix null coalescing operator handling (linniksa)
+* bug #4467 ToolInfo - fix access to reference without checking existence (black-silence)
+* bug #4472 Fix non-static closure unbinding this on PHP 7.4 (kelunik)
+* minor #3726 Use Box 3 to build the PHAR (theofidry, keradus)
+* minor #4412 PHP 7.4 - Tests for support (SpacePossum)
+* minor #4431 DX: test that default config is not passed in RuleSet (kubawerlos)
+* minor #4433 DX: test to ensure @PHPUnitMigration rule sets are correctly defined (kubawerlos)
+* minor #4445 DX: static call of markTestSkippedOrFail (kubawerlos)
+* minor #4463 Add apostrophe to possessive "team's" (ChandlerSwift)
+* minor #4471 ReadmeCommandTest - use CommandTester (kubawerlos)
+* minor #4477 DX: control names of public methods in test's classes (kubawerlos)
+* minor #4483 NewWithBracesFixer - Fix object operator and curly brace open cases (SpacePossum)
+* minor #4484 fix typos in README (Sven Ludwig)
+* minor #4494 DX: Fix shell script syntax in order to fix Travis builds (drupol)
+* minor #4516 DX: Lock binary SCA tools versions (keradus)
+
+Changelog for v2.14.4
+---------------------
+
+* bug #4418 PhpUnitNamespacedFixer - properly translate classes which do not follow translation pattern (ktomk)
+* bug #4419 PhpUnitTestCaseStaticMethodCallsFixer - skip anonymous classes and lambda (SpacePossum)
+* bug #4420 MethodArgumentSpaceFixer - PHP7.3 trailing commas in function calls (SpacePossum)
+* minor #4345 Travis: PHP 7.4 isn't allowed to fail anymore (Slamdunk)
+* minor #4403 LowercaseStaticReferenceFixer - Fix invalid PHP version in example (HypeMC)
+* minor #4425 DX: assertions are static, adjust custom assertions (keradus)
+* minor #4426 DX: handle deprecations of symfony/event-dispatcher:4.3 (keradus)
+* minor #4427 DX: stop using reserved T_FN in code samples (keradus)
+* minor #4428 DX: update dev-tools (keradus)
+
+Changelog for v2.14.3
+---------------------
+
+* bug #4298 NoTrailingWhitespaceInCommentFixer - fix for non-Unix line separators (kubawerlos)
+* bug #4303 FullyQualifiedStrictTypesFixer - Fix the short type detection when a question mark (nullable) is prefixing it. (drupol)
+* bug #4313 SelfAccessorFixer - fix for part qualified class name (kubawerlos, SpacePossum)
+* bug #4314 PhpUnitTestCaseStaticMethodCallsFixer - fix for having property with name as method to update (kubawerlos, SpacePossum)
+* bug #4316 NoUnsetCastFixer - Test for higher-precedence operators (SpacePossum)
+* bug #4327 TokensAnalyzer - add concat operator to list of binary operators (SpacePossum)
+* bug #4335 Cache - add indent and line ending to cache signature (dmvdbrugge)
+* bug #4344 VoidReturnFixer - handle yield from (SpacePossum)
+* bug #4346 BracesFixer - Do not pull close tag onto same line as a comment (SpacePossum)
+* bug #4350 StrictParamFixer - Don't detect functions in use statements (bolmstedt)
+* bug #4357 Fix short list syntax detection. (SpacePossum)
+* bug #4365 Fix output escaping of diff for text format when line is not changed (SpacePossum)
+* bug #4370 PhpUnitConstructFixer - Fix handle different casing (SpacePossum)
+* bug #4379 ExplicitStringVariableFixer - add test case for variable as an array key (kubawerlos, Slamdunk)
+* feature #4337 PhpUnitTestCaseStaticMethodCallsFixer - prepare for PHPUnit 8 (kubawerlos)
+* minor #3799 DX: php_unit_test_case_static_method_calls - use default config (keradus)
+* minor #4103 NoExtraBlankLinesFixer - fix candidate detection (SpacePossum)
+* minor #4245 LineEndingFixer - BracesFixer - Priority (dmvdbrugge)
+* minor #4325 Use lowercase mikey179/vfsStream in composer.json (lolli42)
+* minor #4336 Collect coverage with PCOV (kubawerlos)
+* minor #4338 Fix wording (kmvan, kubawerlos)
+* minor #4339 Change BracesFixer to avoid indenting PHP inline braces (alecgeatches)
+* minor #4340 Travis: build against 7.4snapshot instead of nightly (Slamdunk)
+* minor #4351 code grooming (SpacePossum)
+* minor #4353 Add more priority tests (SpacePossum)
+* minor #4364 DX: MethodChainingIndentationFixer - remove unneccesary loop (Sijun Zhu)
+* minor #4366 Unset the auxillary variable $a (GrahamCampbell)
+* minor #4368 Fixed TypeShortNameResolverTest::testResolver (GrahamCampbell)
+* minor #4380 PHP7.4 - Add "str_split" => "mb_str_split" mapping. (SpacePossum)
+* minor #4381 PHP7.4 - Add support for magic methods (un)serialize. (SpacePossum)
+* minor #4393 DX: add missing explicit return types (kubawerlos)
+
+Changelog for v2.14.2
+---------------------
+
+* minor #4306 DX: Drop HHVM conflict on Composer level to help Composer with HHVM compatibility, we still prevent HHVM on runtime (keradus)
+
+Changelog for v2.14.1
+---------------------
+
+* bug #4240 ModernizeTypesCastingFixer - fix for operators with higher precedence (kubawerlos)
+* bug #4254 PhpUnitDedicateAssertFixer - fix for count with additional operations (kubawerlos)
+* bug #4260 Psr0Fixer and Psr4Fixer - fix for multiple classes in file with anonymous class (kubawerlos)
+* bug #4262 FixCommand - fix help (keradus)
+* bug #4276 MethodChainingIndentationFixer, ArrayIndentationFixer - Fix priority issue (dmvdbrugge)
+* bug #4280 MethodArgumentSpaceFixer - Fix method argument alignment (Billz95)
+* bug #4286 IncrementStyleFixer - fix for static statement (kubawerlos)
+* bug #4291 ArrayIndentationFixer - Fix indentation after trailing spaces (julienfalque, keradus)
+* bug #4292 NoSuperfluousPhpdocTagsFixer - Make null only type not considered superfluous (julienfalque)
+* minor #4204 DX: Tokens - do not unregister/register found tokens when collection is not changing (kubawerlos)
+* minor #4235 DX: more specific @param types (kubawerlos)
+* minor #4263 DX: AppVeyor - bump PHP version (keradus)
+* minor #4293 Add official support for PHP 7.3 (keradus)
+* minor #4295 DX: MethodArgumentSpaceFixerTest - fix edge case for handling different line ending when only expected code is provided (keradus)
+* minor #4296 DX: cleanup testing with fixer config (keradus)
+* minor #4299 NativeFunctionInvocationFixer - add array_key_exists (deguif, keradus)
+* minor #4300 DX: cleanup testing with fixer config (keradus)
+
+Changelog for v2.14.0
+---------------------
+
+* bug #4220 NativeFunctionInvocationFixer - namespaced strict to remove backslash (kubawerlos)
+* feature #3881 Add PhpdocVarAnnotationCorrectOrderFixer (kubawerlos)
+* feature #3915 Add HeredocIndentationFixer (gharlan)
+* feature #4002 NoSuperfluousPhpdocTagsFixer - Allow `mixed` in superfluous PHPDoc by configuration (MortalFlesh)
+* feature #4030 Add get_required_files and user_error aliases (ntzm)
+* feature #4043 NativeFunctionInvocationFixer - add option to remove redundant backslashes (kubawerlos)
+* feature #4102 Add NoUnsetCastFixer (SpacePossum)
+* minor #4025 Add phpdoc_types_order rule to Symfony's ruleset (carusogabriel)
+* minor #4213 [7.3] PHP7.3 integration tests (SpacePossum)
+* minor #4233 Add official support for PHP 7.3 (keradus)
+
+Changelog for v2.13.3
+---------------------
+
+* bug #4216 Psr4Fixer - fix for multiple classy elements in file (keradus, kubawerlos)
+* bug #4217 Psr0Fixer - class with anonymous class (kubawerlos)
+* bug #4219 NativeFunctionCasingFixer - handle T_RETURN_REF (kubawerlos)
+* bug #4224 FunctionToConstantFixer - handle T_RETURN_REF (SpacePossum)
+* bug #4229 IsNullFixer - fix parenthesis not closed (guilliamxavier)
+* minor #4193 [7.3] CombineNestedDirnameFixer - support PHP 7.3 (kubawerlos)
+* minor #4198 [7.3] PowToExponentiationFixer - adding to PHP7.3 integration test (kubawerlos)
+* minor #4199 [7.3] MethodChainingIndentationFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4200 [7.3] ModernizeTypesCastingFixer - support PHP 7.3 (kubawerlos)
+* minor #4201 [7.3] MultilineWhitespaceBeforeSemicolonsFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4202 [7.3] ErrorSuppressionFixer - support PHP 7.3 (kubawerlos)
+* minor #4205 DX: PhpdocAlignFixer - refactor to use DocBlock (kubawerlos)
+* minor #4206 DX: enable multiline_whitespace_before_semicolons (keradus)
+* minor #4207 [7.3] RandomApiMigrationFixerTest - tests for 7.3 (SpacePossum)
+* minor #4208 [7.3] NativeFunctionCasingFixerTest - tests for 7.3 (SpacePossum)
+* minor #4209 [7.3] PhpUnitStrictFixerTest - tests for 7.3 (SpacePossum)
+* minor #4210 [7.3] PhpUnitConstructFixer - add test for PHP 7.3 (kubawerlos)
+* minor #4211 [7.3] PhpUnitDedicateAssertFixer - support PHP 7.3 (kubawerlos)
+* minor #4214 [7.3] NoUnsetOnPropertyFixerTest - tests for 7.3 (SpacePossum)
+* minor #4222 [7.3] PhpUnitExpectationFixer - support PHP 7.3 (kubawerlos)
+* minor #4223 [7.3] PhpUnitMockFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4230 [7.3] IsNullFixer - fix trailing comma (guilliamxavier)
+* minor #4232 DX: remove Utils::splitLines (kubawerlos)
+* minor #4234 [7.3] Test that "LITERAL instanceof X" is valid (guilliamxavier)
+
+Changelog for v2.13.2
+---------------------
+
+* bug #3968 SelfAccessorFixer - support FQCN (kubawerlos)
+* bug #3974 Psr4Fixer - class with anonymous class (kubawerlos)
+* bug #3987 Run HeaderCommentFixer after NoBlankLinesAfterPhpdocFixer (StanAngeloff)
+* bug #4009 TypeAlternationTransformer - Fix pipes in function call with constants being classified incorrectly (ntzm, SpacePossum)
+* bug #4022 NoUnsetOnPropertyFixer - refactor and bugfixes (kubawerlos)
+* bug #4036 ExplicitStringVariableFixer - fixes for backticks and for 2 variables next to each other (kubawerlos, Slamdunk)
+* bug #4038 CommentToPhpdocFixer - handling nested PHPDoc (kubawerlos)
+* bug #4064 Ignore invalid mode strings, add option to remove the "b" flag. (SpacePossum)
+* bug #4071 DX: do not insert Token when calling removeLeadingWhitespace/removeTrailingWhitespace from Tokens (kubawerlos)
+* bug #4073 IsNullFixer - fix function detection (kubawerlos)
+* bug #4074 FileFilterIterator - do not filter out files that need fixing (SpacePossum)
+* bug #4076 EregToPregFixer - fix function detection (kubawerlos)
+* bug #4084 MethodChainingIndentation - fix priority with Braces (dmvdbrugge)
+* bug #4099 HeaderCommentFixer - throw exception on invalid header configuration (SpacePossum)
+* bug #4100 PhpdocAddMissingParamAnnotationFixer - Handle variable number of arguments and pass by reference cases (SpacePossum)
+* bug #4101 ReturnAssignmentFixer - do not touch invalid code (SpacePossum)
+* bug #4104 Change transformers order, fixing untransformed T_USE (dmvdbrugge)
+* bug #4107 Preg::split - fix for non-UTF8 subject (ostrolucky, kubawerlos)
+* bug #4109 NoBlankLines*: fix removing lines consisting only of spaces (kubawerlos, keradus)
+* bug #4114 VisibilityRequiredFixer - don't remove comments (kubawerlos)
+* bug #4116 OrderedImportsFixer - fix sorting without any grouping (SpacePossum)
+* bug #4119 PhpUnitNoExpectationAnnotationFixer - fix extracting content from annotation (kubawerlos)
+* bug #4127 LowercaseConstantsFixer - Fix case with properties using constants as their name (srathbone)
+* bug #4134 [7.3] SquareBraceTransformer - nested array destructuring not handled correctly (SpacePossum)
+* bug #4153 PhpUnitFqcnAnnotationFixer - handle only PhpUnit classes (kubawerlos)
+* bug #4169 DirConstantFixer - Fixes for PHP7.3 syntax (SpacePossum)
+* bug #4181 MultilineCommentOpeningClosingFixer - fix handling empty comment (kubawerlos)
+* bug #4186 Tokens - fix removal of leading/trailing whitespace with empty token in collection (kubawerlos)
+* minor #3436 Add a handful of integration tests (BackEndTea)
+* minor #3774 PhpUnitTestClassRequiresCoversFixer - Remove unneeded loop and use phpunit indicator class (BackEndTea, SpacePossum)
+* minor #3778 DX: Throw an exception if FileReader::read fails (ntzm)
+* minor #3916 New ruleset "@PhpCsFixer" (gharlan)
+* minor #4007 Fixes cookbook for fixers (greeflas)
+* minor #4031 Correct FixerOptionBuilder::getOption return type (ntzm)
+* minor #4046 Token - Added fast isset() path to token->equals() (staabm)
+* minor #4047 Token - inline $other->getPrototype() to speedup equals() (staabm, keradus)
+* minor #4048 Tokens - inlined extractTokenKind() call on the hot path (staabm)
+* minor #4069 DX: Add dev-tools directory to gitattributes as export-ignore (alexmanno)
+* minor #4070 Docs: Add link to a VS Code extension in readme (jakebathman)
+* minor #4077 DX: cleanup - NoAliasFunctionsFixer - use FunctionsAnalyzer (kubawerlos)
+* minor #4088 Add Travis test with strict types (kubawerlos)
+* minor #4091 Adjust misleading sentence in CONTRIBUTING.md (ostrolucky)
+* minor #4092 UseTransformer - simplify/optimize (SpacePossum)
+* minor #4095 DX: Use ::class (keradus)
+* minor #4096 DX: fixing typo (kubawerlos)
+* minor #4097 DX: namespace casing (kubawerlos)
+* minor #4110 Enhancement: Update localheinz/composer-normalize (localheinz)
+* minor #4115 Changes for upcoming Travis' infra migration (sergeyklay)
+* minor #4122 DX: AppVeyor - Update Composer download link (SpacePossum)
+* minor #4128 DX: cleanup - AbstractFunctionReferenceFixer - use FunctionsAnalyzer (SpacePossum, kubawerlos)
+* minor #4129 Fix: Symfony 4.2 deprecations (kubawerlos)
+* minor #4139 DX: Fix CircleCI (kubawerlos)
+* minor #4142 [7.3] NoAliasFunctionsFixer - mbregex_encoding' => 'mb_regex_encoding (SpacePossum)
+* minor #4143 PhpUnitTestCaseStaticMethodCallsFixer - Add PHPUnit 7.5 new assertions (Slamdunk)
+* minor #4149 [7.3] ArgumentsAnalyzer - PHP7.3 support (SpacePossum)
+* minor #4161 DX: CI - show packages installed via Composer (keradus)
+* minor #4162 DX: Drop symfony/lts (keradus)
+* minor #4166 DX: do not use AbstractFunctionReferenceFixer when no need to (kubawerlos)
+* minor #4168 DX: FopenFlagsFixer - remove useless proxy method (SpacePossum)
+* minor #4171 Fix CircleCI cache (kubawerlos)
+* minor #4173 [7.3] PowToExponentiationFixer - add support for PHP7.3 (SpacePossum)
+* minor #4175 Fixing typo (kubawerlos)
+* minor #4177 CI: Check that tag is matching version of PHP CS Fixer during deployment (keradus)
+* minor #4180 Fixing typo (kubawerlos)
+* minor #4182 DX: update php-cs-fixer file style (kubawerlos)
+* minor #4185 [7.3] ImplodeCallFixer - add tests for PHP7.3 (kubawerlos)
+* minor #4187 [7.3] IsNullFixer - support PHP 7.3 (kubawerlos)
+* minor #4188 DX: cleanup (keradus)
+* minor #4189 Travis - add PHP 7.3 job (keradus)
+* minor #4190 Travis CI - fix config (kubawerlos)
+* minor #4192 [7.3] MagicMethodCasingFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4194 [7.3] NativeFunctionInvocationFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4195 [7.3] SetTypeToCastFixer - support PHP 7.3 (kubawerlos)
+* minor #4196 Update website (keradus)
+* minor #4197 [7.3] StrictParamFixer - support PHP 7.3 (kubawerlos)
+
+Changelog for v2.13.1
+---------------------
+
+* bug #3977 NoSuperfluousPhpdocTagsFixer - Fix handling of description with variable (julienfalque)
+* bug #4027 PhpdocAnnotationWithoutDotFixer - add failing cases (keradus)
+* bug #4028 PhpdocNoEmptyReturnFixer - handle single line PHPDoc (kubawerlos)
+* bug #4034 PhpUnitTestCaseIndicator - handle anonymous class (kubawerlos)
+* bug #4037 NativeFunctionInvocationFixer - fix function detection (kubawerlos)
+* feature #4019 PhpdocTypesFixer - allow for configuration (keradus)
+* minor #3980 Clarifies allow-risky usage (josephzidell)
+* minor #4016 Bump console component due to it's bug (keradus)
+* minor #4023 Enhancement: Update localheinz/composer-normalize (localheinz)
+* minor #4049 use parent::offset*() methods when moving items around in insertAt() (staabm)
+
+Changelog for v2.13.0
+---------------------
+
+* feature #3739 Add MagicMethodCasingFixer (SpacePossum)
+* feature #3812 Add FopenFlagOrderFixer & FopenFlagsFixer (SpacePossum)
+* feature #3826 Add CombineNestedDirnameFixer (gharlan)
+* feature #3833 BinaryOperatorSpacesFixer - Add "no space" fix strategy (SpacePossum)
+* feature #3841 NoAliasFunctionsFixer - add opt in option for ext-mbstring aliasses (SpacePossum)
+* feature #3876 NativeConstantInvocationFixer - add the scope option (stof, keradus)
+* feature #3886 Add PhpUnitMethodCasingFixer (Slamdunk)
+* feature #3907 Add ImplodeCallFixer (kubawerlos)
+* feature #3914 NoUnreachableDefaultArgumentValueFixer - remove `null` for nullable typehints (gharlan, keradus)
+* minor #3813 PhpUnitDedicateAssertFixer - fix "sizeOf" same as "count". (SpacePossum)
+* minor #3873 Add the native_function_invocation fixer in the Symfony:risky ruleset (stof)
+* minor #3979 DX: enable php_unit_method_casing (keradus)
+
+Changelog for v2.12.12
+----------------------
+
+* bug #4533 Revert PHP7.4 - Add "str_split" => "mb_str_split" mapping (keradus)
+* minor #4264 DX: AutoReview - ensure Travis handle all needed PHP versions (keradus)
+* minor #4524 MethodArgumentSpaceFixerTest - make explicit configuration to prevent fail on configuration change (keradus)
+
+Changelog for v2.12.11
+----------------------
+
+* bug #4132 BlankLineAfterNamespaceFixer - do not remove indent, handle comments (kubawerlos)
+* bug #4384 MethodArgumentSpaceFixer - fix for on_multiline:ensure_fully_multiline with trailing comma in function call (kubawerlos)
+* bug #4404 FileLintingIterator - fix current value on end/invalid (SpacePossum)
+* bug #4421 FunctionTypehintSpaceFixer - Ensure single space between type declaration and parameter (localheinz)
+* bug #4436 MethodArgumentSpaceFixer - handle misplaced ) (keradus)
+* bug #4439 NoLeadingImportSlashFixer - Add space if needed (SpacePossum)
+* bug #4453 Fix preg_match error on 7.4snapshot (kubawerlos)
+* bug #4461 IsNullFixer - fix null coalescing operator handling (linniksa)
+* bug #4467 ToolInfo - fix access to reference without checking existence (black-silence)
+* bug #4472 Fix non-static closure unbinding this on PHP 7.4 (kelunik)
+* minor #3726 Use Box 3 to build the PHAR (theofidry, keradus)
+* minor #4412 PHP 7.4 - Tests for support (SpacePossum)
+* minor #4431 DX: test that default config is not passed in RuleSet (kubawerlos)
+* minor #4433 DX: test to ensure @PHPUnitMigration rule sets are correctly defined (kubawerlos)
+* minor #4445 DX: static call of markTestSkippedOrFail (kubawerlos)
+* minor #4463 Add apostrophe to possessive "team's" (ChandlerSwift)
+* minor #4471 ReadmeCommandTest - use CommandTester (kubawerlos)
+* minor #4477 DX: control names of public methods in test's classes (kubawerlos)
+* minor #4483 NewWithBracesFixer - Fix object operator and curly brace open cases (SpacePossum)
+* minor #4484 fix typos in README (Sven Ludwig)
+* minor #4494 DX: Fix shell script syntax in order to fix Travis builds (drupol)
+* minor #4516 DX: Lock binary SCA tools versions (keradus)
+
+Changelog for v2.12.10
+----------------------
+
+* bug #4418 PhpUnitNamespacedFixer - properly translate classes which do not follow translation pattern (ktomk)
+* bug #4419 PhpUnitTestCaseStaticMethodCallsFixer - skip anonymous classes and lambda (SpacePossum)
+* bug #4420 MethodArgumentSpaceFixer - PHP7.3 trailing commas in function calls (SpacePossum)
+* minor #4345 Travis: PHP 7.4 isn't allowed to fail anymore (Slamdunk)
+* minor #4403 LowercaseStaticReferenceFixer - Fix invalid PHP version in example (HypeMC)
+* minor #4425 DX: assertions are static, adjust custom assertions (keradus)
+* minor #4426 DX: handle deprecations of symfony/event-dispatcher:4.3 (keradus)
+* minor #4427 DX: stop using reserved T_FN in code samples (keradus)
+
+Changelog for v2.12.9
+---------------------
+
+* bug #4298 NoTrailingWhitespaceInCommentFixer - fix for non-Unix line separators (kubawerlos)
+* bug #4303 FullyQualifiedStrictTypesFixer - Fix the short type detection when a question mark (nullable) is prefixing it. (drupol)
+* bug #4313 SelfAccessorFixer - fix for part qualified class name (kubawerlos, SpacePossum)
+* bug #4314 PhpUnitTestCaseStaticMethodCallsFixer - fix for having property with name as method to update (kubawerlos, SpacePossum)
+* bug #4327 TokensAnalyzer - add concat operator to list of binary operators (SpacePossum)
+* bug #4335 Cache - add indent and line ending to cache signature (dmvdbrugge)
+* bug #4344 VoidReturnFixer - handle yield from (SpacePossum)
+* bug #4346 BracesFixer - Do not pull close tag onto same line as a comment (SpacePossum)
+* bug #4350 StrictParamFixer - Don't detect functions in use statements (bolmstedt)
+* bug #4357 Fix short list syntax detection. (SpacePossum)
+* bug #4365 Fix output escaping of diff for text format when line is not changed (SpacePossum)
+* bug #4370 PhpUnitConstructFixer - Fix handle different casing (SpacePossum)
+* bug #4379 ExplicitStringVariableFixer - add test case for variable as an array key (kubawerlos, Slamdunk)
+* feature #4337 PhpUnitTestCaseStaticMethodCallsFixer - prepare for PHPUnit 8 (kubawerlos)
+* minor #3799 DX: php_unit_test_case_static_method_calls - use default config (keradus)
+* minor #4103 NoExtraBlankLinesFixer - fix candidate detection (SpacePossum)
+* minor #4245 LineEndingFixer - BracesFixer - Priority (dmvdbrugge)
+* minor #4325 Use lowercase mikey179/vfsStream in composer.json (lolli42)
+* minor #4336 Collect coverage with PCOV (kubawerlos)
+* minor #4338 Fix wording (kmvan, kubawerlos)
+* minor #4339 Change BracesFixer to avoid indenting PHP inline braces (alecgeatches)
+* minor #4340 Travis: build against 7.4snapshot instead of nightly (Slamdunk)
+* minor #4351 code grooming (SpacePossum)
+* minor #4353 Add more priority tests (SpacePossum)
+* minor #4364 DX: MethodChainingIndentationFixer - remove unneccesary loop (Sijun Zhu)
+* minor #4366 Unset the auxillary variable $a (GrahamCampbell)
+* minor #4368 Fixed TypeShortNameResolverTest::testResolver (GrahamCampbell)
+* minor #4380 PHP7.4 - Add "str_split" => "mb_str_split" mapping. (SpacePossum)
+* minor #4393 DX: add missing explicit return types (kubawerlos)
+
+Changelog for v2.12.8
+---------------------
+
+* minor #4306 DX: Drop HHVM conflict on Composer level to help Composer with HHVM compatibility, we still prevent HHVM on runtime (keradus)
+
+Changelog for v2.12.7
+---------------------
+
+* bug #4240 ModernizeTypesCastingFixer - fix for operators with higher precedence (kubawerlos)
+* bug #4254 PhpUnitDedicateAssertFixer - fix for count with additional operations (kubawerlos)
+* bug #4260 Psr0Fixer and Psr4Fixer - fix for multiple classes in file with anonymous class (kubawerlos)
+* bug #4262 FixCommand - fix help (keradus)
+* bug #4276 MethodChainingIndentationFixer, ArrayIndentationFixer - Fix priority issue (dmvdbrugge)
+* bug #4280 MethodArgumentSpaceFixer - Fix method argument alignment (Billz95)
+* bug #4286 IncrementStyleFixer - fix for static statement (kubawerlos)
+* bug #4291 ArrayIndentationFixer - Fix indentation after trailing spaces (julienfalque, keradus)
+* bug #4292 NoSuperfluousPhpdocTagsFixer - Make null only type not considered superfluous (julienfalque)
+* minor #4204 DX: Tokens - do not unregister/register found tokens when collection is not changing (kubawerlos)
+* minor #4235 DX: more specific @param types (kubawerlos)
+* minor #4263 DX: AppVeyor - bump PHP version (keradus)
+* minor #4293 Add official support for PHP 7.3 (keradus)
+* minor #4295 DX: MethodArgumentSpaceFixerTest - fix edge case for handling different line ending when only expected code is provided (keradus)
+* minor #4296 DX: cleanup testing with fixer config (keradus)
+* minor #4299 NativeFunctionInvocationFixer - add array_key_exists (deguif, keradus)
+
+Changelog for v2.12.6
+---------------------
+
+* bug #4216 Psr4Fixer - fix for multiple classy elements in file (keradus, kubawerlos)
+* bug #4217 Psr0Fixer - class with anonymous class (kubawerlos)
+* bug #4219 NativeFunctionCasingFixer - handle T_RETURN_REF (kubawerlos)
+* bug #4224 FunctionToConstantFixer - handle T_RETURN_REF (SpacePossum)
+* bug #4229 IsNullFixer - fix parenthesis not closed (guilliamxavier)
+* minor #4198 [7.3] PowToExponentiationFixer - adding to PHP7.3 integration test (kubawerlos)
+* minor #4199 [7.3] MethodChainingIndentationFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4200 [7.3] ModernizeTypesCastingFixer - support PHP 7.3 (kubawerlos)
+* minor #4201 [7.3] MultilineWhitespaceBeforeSemicolonsFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4202 [7.3] ErrorSuppressionFixer - support PHP 7.3 (kubawerlos)
+* minor #4205 DX: PhpdocAlignFixer - refactor to use DocBlock (kubawerlos)
+* minor #4206 DX: enable multiline_whitespace_before_semicolons (keradus)
+* minor #4207 [7.3] RandomApiMigrationFixerTest - tests for 7.3 (SpacePossum)
+* minor #4208 [7.3] NativeFunctionCasingFixerTest - tests for 7.3 (SpacePossum)
+* minor #4209 [7.3] PhpUnitStrictFixerTest - tests for 7.3 (SpacePossum)
+* minor #4210 [7.3] PhpUnitConstructFixer - add test for PHP 7.3 (kubawerlos)
+* minor #4211 [7.3] PhpUnitDedicateAssertFixer - support PHP 7.3 (kubawerlos)
+* minor #4214 [7.3] NoUnsetOnPropertyFixerTest - tests for 7.3 (SpacePossum)
+* minor #4222 [7.3] PhpUnitExpectationFixer - support PHP 7.3 (kubawerlos)
+* minor #4223 [7.3] PhpUnitMockFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4230 [7.3] IsNullFixer - fix trailing comma (guilliamxavier)
+* minor #4232 DX: remove Utils::splitLines (kubawerlos)
+* minor #4234 [7.3] Test that "LITERAL instanceof X" is valid (guilliamxavier)
+
+Changelog for v2.12.5
+---------------------
+
+* bug #3968 SelfAccessorFixer - support FQCN (kubawerlos)
+* bug #3974 Psr4Fixer - class with anonymous class (kubawerlos)
+* bug #3987 Run HeaderCommentFixer after NoBlankLinesAfterPhpdocFixer (StanAngeloff)
+* bug #4009 TypeAlternationTransformer - Fix pipes in function call with constants being classified incorrectly (ntzm, SpacePossum)
+* bug #4022 NoUnsetOnPropertyFixer - refactor and bugfixes (kubawerlos)
+* bug #4036 ExplicitStringVariableFixer - fixes for backticks and for 2 variables next to each other (kubawerlos, Slamdunk)
+* bug #4038 CommentToPhpdocFixer - handling nested PHPDoc (kubawerlos)
+* bug #4071 DX: do not insert Token when calling removeLeadingWhitespace/removeTrailingWhitespace from Tokens (kubawerlos)
+* bug #4073 IsNullFixer - fix function detection (kubawerlos)
+* bug #4074 FileFilterIterator - do not filter out files that need fixing (SpacePossum)
+* bug #4076 EregToPregFixer - fix function detection (kubawerlos)
+* bug #4084 MethodChainingIndentation - fix priority with Braces (dmvdbrugge)
+* bug #4099 HeaderCommentFixer - throw exception on invalid header configuration (SpacePossum)
+* bug #4100 PhpdocAddMissingParamAnnotationFixer - Handle variable number of arguments and pass by reference cases (SpacePossum)
+* bug #4101 ReturnAssignmentFixer - do not touch invalid code (SpacePossum)
+* bug #4104 Change transformers order, fixing untransformed T_USE (dmvdbrugge)
+* bug #4107 Preg::split - fix for non-UTF8 subject (ostrolucky, kubawerlos)
+* bug #4109 NoBlankLines*: fix removing lines consisting only of spaces (kubawerlos, keradus)
+* bug #4114 VisibilityRequiredFixer - don't remove comments (kubawerlos)
+* bug #4116 OrderedImportsFixer - fix sorting without any grouping (SpacePossum)
+* bug #4119 PhpUnitNoExpectationAnnotationFixer - fix extracting content from annotation (kubawerlos)
+* bug #4127 LowercaseConstantsFixer - Fix case with properties using constants as their name (srathbone)
+* bug #4134 [7.3] SquareBraceTransformer - nested array destructuring not handled correctly (SpacePossum)
+* bug #4153 PhpUnitFqcnAnnotationFixer - handle only PhpUnit classes (kubawerlos)
+* bug #4169 DirConstantFixer - Fixes for PHP7.3 syntax (SpacePossum)
+* bug #4181 MultilineCommentOpeningClosingFixer - fix handling empty comment (kubawerlos)
+* bug #4186 Tokens - fix removal of leading/trailing whitespace with empty token in collection (kubawerlos)
+* minor #3436 Add a handful of integration tests (BackEndTea)
+* minor #3774 PhpUnitTestClassRequiresCoversFixer - Remove unneeded loop and use phpunit indicator class (BackEndTea, SpacePossum)
+* minor #3778 DX: Throw an exception if FileReader::read fails (ntzm)
+* minor #3916 New ruleset "@PhpCsFixer" (gharlan)
+* minor #4007 Fixes cookbook for fixers (greeflas)
+* minor #4031 Correct FixerOptionBuilder::getOption return type (ntzm)
+* minor #4046 Token - Added fast isset() path to token->equals() (staabm)
+* minor #4047 Token - inline $other->getPrototype() to speedup equals() (staabm, keradus)
+* minor #4048 Tokens - inlined extractTokenKind() call on the hot path (staabm)
+* minor #4069 DX: Add dev-tools directory to gitattributes as export-ignore (alexmanno)
+* minor #4070 Docs: Add link to a VS Code extension in readme (jakebathman)
+* minor #4077 DX: cleanup - NoAliasFunctionsFixer - use FunctionsAnalyzer (kubawerlos)
+* minor #4088 Add Travis test with strict types (kubawerlos)
+* minor #4091 Adjust misleading sentence in CONTRIBUTING.md (ostrolucky)
+* minor #4092 UseTransformer - simplify/optimize (SpacePossum)
+* minor #4095 DX: Use ::class (keradus)
+* minor #4097 DX: namespace casing (kubawerlos)
+* minor #4110 Enhancement: Update localheinz/composer-normalize (localheinz)
+* minor #4115 Changes for upcoming Travis' infra migration (sergeyklay)
+* minor #4122 DX: AppVeyor - Update Composer download link (SpacePossum)
+* minor #4128 DX: cleanup - AbstractFunctionReferenceFixer - use FunctionsAnalyzer (SpacePossum, kubawerlos)
+* minor #4129 Fix: Symfony 4.2 deprecations (kubawerlos)
+* minor #4139 DX: Fix CircleCI (kubawerlos)
+* minor #4143 PhpUnitTestCaseStaticMethodCallsFixer - Add PHPUnit 7.5 new assertions (Slamdunk)
+* minor #4149 [7.3] ArgumentsAnalyzer - PHP7.3 support (SpacePossum)
+* minor #4161 DX: CI - show packages installed via Composer (keradus)
+* minor #4162 DX: Drop symfony/lts (keradus)
+* minor #4166 DX: do not use AbstractFunctionReferenceFixer when no need to (kubawerlos)
+* minor #4171 Fix CircleCI cache (kubawerlos)
+* minor #4173 [7.3] PowToExponentiationFixer - add support for PHP7.3 (SpacePossum)
+* minor #4175 Fixing typo (kubawerlos)
+* minor #4177 CI: Check that tag is matching version of PHP CS Fixer during deployment (keradus)
+* minor #4182 DX: update php-cs-fixer file style (kubawerlos)
+* minor #4187 [7.3] IsNullFixer - support PHP 7.3 (kubawerlos)
+* minor #4188 DX: cleanup (keradus)
+* minor #4189 Travis - add PHP 7.3 job (keradus)
+* minor #4190 Travis CI - fix config (kubawerlos)
+* minor #4194 [7.3] NativeFunctionInvocationFixer - add tests for PHP 7.3 (kubawerlos)
+* minor #4195 [7.3] SetTypeToCastFixer - support PHP 7.3 (kubawerlos)
+* minor #4196 Update website (keradus)
+* minor #4197 [7.3] StrictParamFixer - support PHP 7.3 (kubawerlos)
+
+Changelog for v2.12.4
+---------------------
+
+* bug #3977 NoSuperfluousPhpdocTagsFixer - Fix handling of description with variable (julienfalque)
+* bug #4027 PhpdocAnnotationWithoutDotFixer - add failing cases (keradus)
+* bug #4028 PhpdocNoEmptyReturnFixer - handle single line PHPDoc (kubawerlos)
+* bug #4034 PhpUnitTestCaseIndicator - handle anonymous class (kubawerlos)
+* bug #4037 NativeFunctionInvocationFixer - fix function detection (kubawerlos)
+* feature #4019 PhpdocTypesFixer - allow for configuration (keradus)
+* minor #3980 Clarifies allow-risky usage (josephzidell)
+* minor #4016 Bump console component due to it's bug (keradus)
+* minor #4023 Enhancement: Update localheinz/composer-normalize (localheinz)
+* minor #4049 use parent::offset*() methods when moving items around in insertAt() (staabm)
+
+Changelog for v2.12.3
+---------------------
+
+* bug #3867 PhpdocAnnotationWithoutDotFixer - Handle trailing whitespaces (kubawerlos)
+* bug #3884 NoSuperfluousPhpdocTagsFixer - handle null in every position (dmvdbrugge, julienfalque)
+* bug #3885 AlignMultilineCommentFixer - ArrayIndentationFixer - Priority (dmvdbrugge)
+* bug #3887 ArrayIndentFixer - Don't indent empty lines (dmvdbrugge)
+* bug #3888 NoExtraBlankLinesFixer - remove blank lines after open tag (kubawerlos)
+* bug #3890 StrictParamFixer - make it case-insensitive (kubawerlos)
+* bug #3895 FunctionsAnalyzer - false positive for constant and function definition (kubawerlos)
+* bug #3908 StrictParamFixer - fix edge case (kubawerlos)
+* bug #3910 FunctionsAnalyzer - fix isGlobalFunctionCall (gharlan)
+* bug #3912 FullyQualifiedStrictTypesFixer - NoSuperfluousPhpdocTagsFixer - adjust priority (dmvdbrugge)
+* bug #3913 TokensAnalyzer - fix isConstantInvocation (gharlan, keradus)
+* bug #3921 TypeAnalysis - Fix iterable not being detected as a reserved type (ntzm)
+* bug #3924 FullyQualifiedStrictTypesFixer - space bug (dmvdbrugge)
+* bug #3937 LowercaseStaticReferenceFixer - Fix "Parent" word in namespace (kubawerlos)
+* bug #3944 ExplicitStringVariableFixer - fix array handling (gharlan)
+* bug #3951 NoSuperfluousPhpdocTagsFixer - do not call strtolower with null (SpacePossum)
+* bug #3954 NoSuperfluousPhpdocTagsFixer - Index invalid or out of range (kubawerlos)
+* bug #3957 NoTrailingWhitespaceFixer - trim space after opening tag (kubawerlos)
+* minor #3798 DX: enable native_function_invocation (keradus)
+* minor #3882 PhpdocAnnotationWithoutDotFixer - Handle empty line in comment (kubawerlos)
+* minor #3889 DX: Cleanup - remove unused variables (kubawerlos, SpacePossum)
+* minor #3891 PhpdocNoEmptyReturnFixer - account for null[] (dmvdbrugge)
+* minor #3892 PhpdocNoEmptyReturnFixer - fix docs (keradus)
+* minor #3897 DX: FunctionsAnalyzer - simplifying return expression (kubawerlos)
+* minor #3903 DX: cleanup - remove special treatment for PHP <5.6 (kubawerlos)
+* minor #3905 DX: Upgrade composer-require-checker to stable version (keradus)
+* minor #3919 Simplify single uses of Token::isGivenKind (ntzm)
+* minor #3920 Docs: Fix typo (ntzm)
+* minor #3940 DX: fix phpdoc parameter type (malukenho)
+* minor #3948 DX: cleanup - remove redundant @param annotations (kubawerlos)
+* minor #3950 Circle CI v2 yml (siad007)
+* minor #3952 DX: AbstractFixerTestCase - drop testing method already provided by trait (keradus)
+* minor #3973 Bump xdebug-handler (keradus)
+
+Changelog for v2.12.2
+---------------------
+
+* bug #3823 NativeConstantInvocationFixer - better constant detection (gharlan, SpacePossum, keradus)
+* bug #3832 "yield from" as keyword (SpacePossum)
+* bug #3835 Fix priority between PHPDoc return type fixers (julienfalque, keradus)
+* bug #3839 MethodArgumentSpaceFixer - add empty line incorrectly (SpacePossum)
+* bug #3866 SpaceAfterSemicolonFixer - loop over all tokens (SpacePossum)
+* minor #3817 Update integrations tests (SpacePossum)
+* minor #3829 Fix typos in changelog (mnabialek)
+* minor #3848 Add install/update instructions for PHIVE to the README (SpacePossum)
+* minor #3877 NamespacesAnalyzer - Optimize performance (stof)
+* minor #3878 NativeFunctionInvocationFixer - use the NamespacesAnalyzer to remove duplicated code (stof)
+
+Changelog for v2.12.1
+---------------------
+
+* bug #3808 LowercaseStaticReferenceFixer - Fix constants handling (kubawerlos, keradus)
+* bug #3815 NoSuperfluousPhpdocTagsFixer - support array/callable type hints (gharlan)
+* minor #3824 DX: Support PHPUnit 7.2 (keradus)
+* minor #3825 UX: Provide full diff for code samples (keradus)
+
+Changelog for v2.12.0
+---------------------
+
+* feature #2577 Add LogicalOperatorsFixer (hkdobrev, keradus)
+* feature #3060 Add ErrorSuppressionFixer (kubawerlos)
+* feature #3127 Add NativeConstantInvocationFixer (Slamdunk, keradus)
+* feature #3223 NativeFunctionInvocationFixer - add namespace scope and include sets (SpacePossum)
+* feature #3453 PhpdocAlignFixer - add align option (robert.ahmerov)
+* feature #3476 Add PhpUnitTestCaseStaticMethodCallsFixer (Slamdunk, keradus)
+* feature #3524 MethodArgumentSpaceFixer - Add ensure_single_line option (julienfalque, keradus)
+* feature #3534 MultilineWhitespaceBeforeSemicolonsFixer - support static calls (ntzm)
+* feature #3585 Add ReturnAssignmentFixer (SpacePossum, keradus)
+* feature #3640 Add PhpdocToReturnTypeFixer (Slamdunk, keradus)
+* feature #3691 Add PhpdocTrimAfterDescriptionFixer (nobuf, keradus)
+* feature #3698 YodaStyleFixer - Add always_move_variable option (julienfalque, SpacePossum)
+* feature #3709 Add SetTypeToCastFixer (SpacePossum)
+* feature #3724 BlankLineBeforeStatementFixer - Add case and default as options (dmvdbrugge)
+* feature #3734 Add NoSuperfluousPhpdocTagsFixer (julienfalque)
+* feature #3735 Add LowercaseStaticReferenceFixer (kubawerlos, SpacePossum)
+* feature #3737 Add NoUnsetOnPropertyFixer (BackEndTea, SpacePossum)
+* feature #3745 Add PhpUnitInternalClassFixer (BackEndTea, SpacePossum, keradus)
+* feature #3766 Add NoBinaryStringFixer (ntzm, SpacePossum, keradus)
+* feature #3780 ShortScalarCastFixer - Change binary cast to string cast as well (ntzm)
+* feature #3785 PhpUnitDedicateAssertFixer - fix to assertCount too (SpacePossum)
+* feature #3802 Convert PhpdocTrimAfterDescriptionFixer into PhpdocTrimConsecutiveBlankLineSeparationFixer (keradus)
+* minor #3738 ReturnAssignmentFixer description update (kubawerlos)
+* minor #3761 Application: when run with FUTURE_MODE, error_reporting(-1) is done in entry file instead (keradus)
+* minor #3772 DX: use PhpUnitTestCaseIndicator->isPhpUnitClass to discover PHPUnit classes (keradus)
+* minor #3783 CI: Split COLLECT_COVERAGE job (keradus)
+* minor #3789 DX: ProjectCodeTest.testThatDataProvidersAreCorrectlyNamed - performance optimization (keradus)
+* minor #3791 DX: Fix collecting code coverage (keradus)
+* minor #3792 DX: Upgrade DX deps (keradus)
+* minor #3797 DX: ProjectCodeTest - shall not depends on xdebug/phpdbg anymore (keradus, SpacePossum)
+* minor #3800 Symfony:risky ruleset: include set_type_to_cast rule (keradus)
+* minor #3801 NativeFunctionInvocationFixer - fix buggy config validation (keradus, SpacePossum)
+
+Changelog for v2.11.2
+---------------------
+
+* bug #3233 PhpdocAlignFixer - Fix linebreak inconsistency (SpacePossum, keradus)
+* bug #3445 Rewrite NoUnusedImportsFixer (kubawerlos, julienfalque)
+* bug #3528 MethodChainingIndentationFixer - nested params bugfix (Slamdunk)
+* bug #3547 MultilineWhitespaceBeforeSemicolonsFixer - chained call for a return fix (egircys, keradus)
+* bug #3597 DeclareStrictTypesFixer - fix bug of removing line (kubawerlos, keradus)
+* bug #3605 DoctrineAnnotationIndentationFixer - Fix indentation with mixed lines (julienfalque)
+* bug #3606 PhpdocToCommentFixer - allow multiple ( (SpacePossum)
+* bug #3614 Refactor PhpdocToCommentFixer - extract checking to CommentsAnalyzer (kubawerlos)
+* bug #3668 Rewrite NoUnusedImportsFixer (kubawerlos, julienfalque)
+* bug #3670 PhpdocTypesOrderFixer - Fix ordering of nested generics (julienfalque)
+* bug #3671 ArrayIndentationFixer - Fix indentation in HTML (julienfalque)
+* bug #3673 PhpdocScalarFixer - Add "types" option (julienfalque, keradus)
+* bug #3674 YodaStyleFixer - Fix variable detection for multidimensional arrays (julienfalque, SpacePossum)
+* bug #3684 PhpUnitStrictFixer - Do not fix if not correct # of arguments are used (SpacePossum)
+* bug #3708 EspaceImplicitBackslashesFixer - Fix escaping multiple backslashes (julienfalque)
+* bug #3715 SingleImportPerStatementFixer - Fix handling whitespace before opening brace (julienfalque)
+* bug #3731 PhpdocIndentFixer - crash fix (SpacePossum)
+* bug #3755 YodaStyleFixer - handle space between var name and index (SpacePossum)
+* bug #3765 Fix binary-prefixed double-quoted strings to single quotes (ntzm)
+* bug #3770 Handle binary flags in heredoc_to_nowdoc (ntzm)
+* bug #3776 ExplicitStringVariableFixer - handle binary strings (ntzm)
+* bug #3777 EscapeImplicitBackslashesFixer - handle binary strings (ntzm)
+* bug #3790 ProcessLinter - don't execute external process without timeout! It can freeze! (keradus)
+* minor #3188 AppVeyor - add PHP 7.x (keradus, julienfalque)
+* minor #3451 Update findPHPUnit functions (BackEndTea, SpacePossum, keradus)
+* minor #3548 Make shell scripts POSIX-compatible (EvgenyOrekhov, keradus)
+* minor #3568 New Autoreview: Correct option casing (ntzm)
+* minor #3578 Add interface for deprecated options (julienfalque, keradus)
+* minor #3590 Use XdebugHandler to avoid perormance penalty (AJenbo, keradus)
+* minor #3607 PhpdocVarWithoutNameFixer - update sample with @ type (SpacePossum)
+* minor #3617 Tests stability patches (Tom Klingenberg, keradus)
+* minor #3622 Docs: Update descriptions (localheinz)
+* minor #3627 Fix tests execution under phpdbg (keradus)
+* minor #3629 ProjectFixerConfigurationTest - test rules are sorted (SpacePossum)
+* minor #3639 DX: use benefits of symfony/force-lowest (keradus)
+* minor #3641 Update check_trailing_spaces script with upstream (keradus)
+* minor #3646 Extract SameStringsConstraint and XmlMatchesXsdConstraint (keradus)
+* minor #3647 DX: Add CachingLinter for tests (keradus)
+* minor #3649 Update check_trailing_spaces script with upstream (keradus)
+* minor #3652 CiIntegrationTest - run tests with POSIX sh, not Bash (keradus)
+* minor #3656 DX: Clean ups (SpacePossum)
+* minor #3657 update phpunitgoodpractices/traits (SpacePossum, keradus)
+* minor #3658 DX: Clean ups (SpacePossum)
+* minor #3660 Fix do not rely on order of fixing in CiIntegrationTest (kubawerlos)
+* minor #3661 Fix: covers annotation for NoAlternativeSyntaxFixerTest (kubawerlos)
+* minor #3662 DX: Add Smoke/InstallViaComposerTest (keradus)
+* minor #3663 DX: During deployment, run all smoke tests and don't allow to skip phar-related ones (keradus)
+* minor #3665 CircleCI fix (kubawerlos)
+* minor #3666 Use "set -eu" in shell scripts (EvgenyOrekhov)
+* minor #3669 Document possible values for subset options (julienfalque, keradus)
+* minor #3672 Remove SameStringsConstraint and XmlMatchesXsdConstraint (keradus)
+* minor #3676 RunnerTest - workaround for failing Symfony v2.8.37 (kubawerlos)
+* minor #3680 DX: Tokens - removeLeadingWhitespace and removeTrailingWhitespace must act in same way (SpacePossum)
+* minor #3686 README.rst - Format all code-like strings in fixer descriptions (ntzm, keradus)
+* minor #3692 DX: Optimize tests (julienfalque)
+* minor #3700 README.rst - Format all code-like strings in fixer description (ntzm)
+* minor #3701 Use correct casing for "PHPDoc" (ntzm)
+* minor #3703 DX: InstallViaComposerTest - groom naming (keradus)
+* minor #3704 DX: Tokens - fix naming (keradus)
+* minor #3706 Update homebrew installation instructions (ntzm)
+* minor #3713 Use HTTPS whenever possible (fabpot)
+* minor #3723 Extend tests coverage (ntzm)
+* minor #3733 Disable Composer optimized autoloader by default (julienfalque)
+* minor #3748 PhpUnitStrictFixer - extend risky note (jnvsor)
+* minor #3749 Make sure PHPUnit is cased correctly in fixers descriptions (kubawerlos)
+* minor #3768 Improve deprecation messages (julienfalque, SpacePossum)
+* minor #3773 AbstractFixerWithAliasedOptionsTestCase - don't export (keradus)
+* minor #3775 Add tests for binary strings in string_line_ending (ntzm)
+* minor #3779 Misc fixes (ntzm, keradus)
+* minor #3796 DX: StdinTest - do not assume name of folder, into which project was cloned (keradus)
+* minor #3803 NoEmptyPhpdocFixer/PhpdocAddMissingParamAnnotationFixer - missing priority test (SpacePossum, keradus)
+* minor #3804 Cleanup: remove useless constructor comment (kubawerlos)
+* minor #3805 Cleanup: add missing @param type (kubawerlos, keradus)
+
+Changelog for v2.11.1
+---------------------
+
+* bug #3626 ArrayIndentationFixer: priority bug with BinaryOperatorSpacesFixer and MethodChainingIndentationFixer (Slamdunk)
+* bug #3632 DateTimeImmutableFixer bug with adding tokens while iterating over them (kubawerlos)
+* minor #3478 PhpUnitDedicateAssertFixer: handle static calls (Slamdunk)
+* minor #3618 DateTimeImmutableFixer - grooming (keradus)
+
+Changelog for v2.11.0
+---------------------
+
+* feature #3135 Add ArrayIndentationFixer (julienfalque)
+* feature #3235 Implement StandardizeIncrementFixer (ntzm, SpacePossum)
+* feature #3260 Add DateTimeImmutableFixer (kubawerlos)
+* feature #3276 Transform Fully Qualified parameters and return types to short version (veewee, keradus)
+* feature #3299 SingleQuoteFixer - fix single quote char (Slamdunk)
+* feature #3340 Verbose LintingException after fixing (Slamdunk)
+* feature #3423 FunctionToConstantFixer - add fix "get_called_class" option (SpacePossum)
+* feature #3434 Add PhpUnitSetUpTearDownVisibilityFixer (BackEndTea, SpacePossum)
+* feature #3442 Add CommentToPhpdocFixer (kubawerlos, keradus)
+* feature #3448 OrderedClassElementsFixer - added sortAlgorithm option (meridius)
+* feature #3454 Add StringLineEndingFixer (iluuu1994, SpacePossum, keradus, julienfalque)
+* feature #3477 PhpUnitStrictFixer: handle static calls (Slamdunk)
+* feature #3479 PhpUnitConstructFixer: handle static calls (Slamdunk)
+* feature #3507 Add PhpUnitOrderedCoversFixer (Slamdunk)
+* feature #3545 Add the 'none' sort algorithm to OrderedImportsFixer (EvgenyOrekhov)
+* feature #3588 Add NoAlternativeSyntaxFixer (eddmash, keradus)
+* minor #3414 DescribeCommand: add fixer class when verbose (Slamdunk)
+* minor #3432 ConfigurationDefinitionFixerInterface - fix deprecation notice (keradus)
+* minor #3527 Deprecate last param of Tokens::findBlockEnd (ntzm, keradus)
+* minor #3539 Update UnifiedDiffOutputBuilder from gecko-packages/gecko-diff-output-builder usage after it was incorporated into sebastian/diff (keradus)
+* minor #3549 DescribeCommand - use our Differ wrapper class, not external one directly (keradus)
+* minor #3592 Support PHPUnit 7 (keradus)
+* minor #3619 Travis - extend additional files list (keradus)
+
+Changelog for v2.10.5
+---------------------
+
+* bug #3344 Fix method chaining indentation in HTML (julienfalque)
+* bug #3594 ElseifFixer - Bug with alternative syntax (kubawerlos)
+* bug #3600 StrictParamFixer - Fix issue when functions are imported (ntzm, keradus)
+* minor #3589 FixerFactoryTest - add missing test (SpacePossum, keradus)
+* minor #3610 make phar extension optional (Tom Klingenberg, keradus)
+* minor #3612 Travis - allow for hhvm failures (keradus)
+* minor #3615 Detect fabbot.io (julienfalque, keradus)
+* minor #3616 FixerFactoryTest - Don't rely on autovivification (keradus)
+* minor #3621 FixerFactoryTest - apply CS (keradus)
+
+Changelog for v2.10.4
+---------------------
+
+* bug #3446 Add PregWrapper (kubawerlos)
+* bug #3464 IncludeFixer - fix incorrect order of fixing (kubawerlos, SpacePossum)
+* bug #3496 Bug in Tokens::removeLeadingWhitespace (kubawerlos, SpacePossum, keradus)
+* bug #3557 AbstractDoctrineAnnotationFixer: edge case bugfix (Slamdunk)
+* bug #3574 GeneralPhpdocAnnotationRemoveFixer - remove PHPDoc if no content is left (SpacePossum)
+* minor #3563 DX add missing covers annotations (keradus)
+* minor #3564 Use ::class keyword when possible (keradus)
+* minor #3565 Use EventDispatcherInterface instead of EventDispatcher when possible (keradus)
+* minor #3566 Update PHPUnitGoodPractices\Traits (keradus)
+* minor #3572 DX: allow for more phpunit-speedtrap versions to support more PHPUnit versions (keradus)
+* minor #3576 Fix Doctrine Annotation test cases merging (julienfalque)
+* minor #3577 DoctrineAnnotationArrayAssignmentFixer - Add test case (julienfalque)
+
+Changelog for v2.10.3
+---------------------
+
+* bug #3504 NoBlankLinesAfterPhpdocFixer - allow blank line before declare statement (julienfalque)
+* bug #3522 Remove LOCK_EX (SpacePossum)
+* bug #3560 SelfAccessorFixer is risky (Slamdunk)
+* minor #3435 Add tests for general_phpdoc_annotation_remove (BackEndTea)
+* minor #3484 Create Tokens::findBlockStart (ntzm)
+* minor #3512 Add missing array typehints (ntzm)
+* minor #3513 Making AppVeyor happy (kubawerlos)
+* minor #3516 Use null|type instead of ?type in PHPDocs (ntzm)
+* minor #3518 FixerFactoryTest - Test each priority test file is listed as test (SpacePossum)
+* minor #3519 Fix typo (SpacePossum)
+* minor #3520 Fix typos: ran vs. run (SpacePossum)
+* minor #3521 Use HTTPS (carusogabriel)
+* minor #3526 Remove gecko dependency (SpacePossum, keradus, julienfalque)
+* minor #3531 Backport PHPMD to LTS version to ease maintainability (keradus)
+* minor #3532 Implement Tokens::findOppositeBlockEdge (ntzm)
+* minor #3533 DX: SCA - drop src/Resources exclusion (keradus)
+* minor #3538 Don't use third parameter of Tokens::findBlockStart (ntzm)
+* minor #3542 Enhancement: Run composer-normalize on Travis CI (localheinz, keradus)
+* minor #3550 AutoReview\FixerFactoryTest - fix missing priority test, mark not fully valid test as incomplete (keradus)
+* minor #3555 DX: composer.json - drop branch-alias, branch is already following the version (keradus)
+* minor #3556 DX: Add AutoReview/ComposerTest (keradus)
+* minor #3559 Don't expose new files under Test namespace (keradus)
+* minor #3561 PHPUnit5 - add in place missing compat layer for PHPUnit6 (keradus)
+
+Changelog for v2.10.2
+---------------------
+
+* bug #3502 Fix missing file in export (keradus)
+
+Changelog for v2.10.1
+---------------------
+
+* bug #3265 YodaFixer - fix problems of block statements followed by ternary statements (weareoutman, keradus, SpacePossum)
+* bug #3367 NoUnusedImportsFixer - fix comment handling (SpacePossum, keradus)
+* bug #3438 PhpUnitTestAnnotationFixer: Do not prepend with test if method is test() (localheinz, SpacePossum)
+* bug #3455 NoEmptyCommentFixer - comment block detection for line ending different than LF (kubawerlos, SpacePossum)
+* bug #3458 SilencedDeprecationErrorFixer - fix edge cases (kubawerlos)
+* bug #3466 no_whitespace_in_blank_line and no_blank_lines_after_phpdoc fixers bug (kubawerlos, keradus)
+* bug #3472 YodaStyleFixer - do not un-Yoda if right side is assignment (SpacePossum, keradus)
+* bug #3492 PhpdocScalarFixer - Add callback pesudo-type to callable type (carusogabriel)
+* minor #3354 Added missing types to the PhpdocTypesFixer (GrahamCampbell)
+* minor #3406 Fix for escaping in README (kubawerlos)
+* minor #3430 Fix integration test (SpacePossum)
+* minor #3431 Add missing tests (SpacePossum)
+* minor #3440 Add a handful of integration tests (BackEndTea)
+* minor #3443 ConfigurableFixerInterface - not deprecated but TODO (SpacePossum)
+* minor #3444 IntegrationTest - ensure tests in priority dir are priority tests indeed (keradus)
+* minor #3494 Add missing PHPDoc param type (ntzm)
+* minor #3495 Swap @var type and element (ntzm)
+* minor #3498 NoUnusedImportsFixer - fix deprecation (keradus)
+
+Changelog for v2.10.0
+---------------------
+
+* feature #3290 Add PhpdocOpeningClosingFixer (Slamdunk, keradus)
+* feature #3327 Add MultilineWhitespaceBeforeSemicolonsFixer (egircys, keradus)
+* feature #3351 PhuUnit: migrate getMock to createPartialMock when arguments count is 2 (Slamdunk)
+* feature #3362 Add BacktickToShellExecFixer (Slamdunk)
+* minor #3285 PHPUnit - use protective traits (keradus)
+* minor #3329 ConfigurationResolver - detect deprecated fixers (keradus, SpacePossum)
+* minor #3343 Tokens - improve block end lookup (keradus)
+* minor #3360 Adjust Symfony ruleset (keradus)
+* minor #3361 no_extra_consecutive_blank_lines - rename to no_extra_blank_lines (with BC layer) (keradus)
+* minor #3363 progress-type - name main option value 'dots' (keradus)
+* minor #3404 Deprecate "use_yoda_style" in IsNullFixer (kubawerlos, keradus)
+* minor #3418 ConfigurableFixerInterface, ConfigurationDefinitionFixerInterface - update deprecations (keradus)
+* minor #3419 Dont use deprecated fixer in itest (keradus)
+
+Changelog for v2.9.3
+--------------------
+
+* bug #3502 Fix missing file in export (keradus)
+
+Changelog for v2.9.2
+--------------------
+
+* bug #3265 YodaFixer - fix problems of block statements followed by ternary statements (weareoutman, keradus, SpacePossum)
+* bug #3367 NoUnusedImportsFixer - fix comment handling (SpacePossum, keradus)
+* bug #3438 PhpUnitTestAnnotationFixer: Do not prepend with test if method is test() (localheinz, SpacePossum)
+* bug #3455 NoEmptyCommentFixer - comment block detection for line ending different than LF (kubawerlos, SpacePossum)
+* bug #3458 SilencedDeprecationErrorFixer - fix edge cases (kubawerlos)
+* bug #3466 no_whitespace_in_blank_line and no_blank_lines_after_phpdoc fixers bug (kubawerlos, keradus)
+* bug #3472 YodaStyleFixer - do not un-Yoda if right side is assignment (SpacePossum, keradus)
+* minor #3354 Added missing types to the PhpdocTypesFixer (GrahamCampbell)
+* minor #3406 Fix for escaping in README (kubawerlos)
+* minor #3430 Fix integration test (SpacePossum)
+* minor #3431 Add missing tests (SpacePossum)
+* minor #3440 Add a handful of integration tests (BackEndTea)
+* minor #3444 IntegrationTest - ensure tests in priority dir are priority tests indeed (keradus)
+* minor #3494 Add missing PHPDoc param type (ntzm)
+* minor #3495 Swap @var type and element (ntzm)
+* minor #3498 NoUnusedImportsFixer - fix deprecation (keradus)
+
+Changelog for v2.9.1
+--------------------
+
+* bug #3298 DiffConsoleFormatter - fix output escaping. (SpacePossum)
+* bug #3312 PhpUnitTestAnnotationFixer: Only remove prefix if it really is a prefix (localheinz)
+* bug #3318 SingleLineCommentStyleFixer - fix closing tag inside comment causes an error (kubawerlos)
+* bug #3334 ExplicitStringVariableFixer: handle parsed array and object (Slamdunk)
+* bug #3337 BracesFixer: nowdoc bug on template files (Slamdunk)
+* bug #3349 Fix stdin handling and add tests for it (keradus)
+* bug #3350 PhpUnitNoExpectationAnnotationFixer - fix handling of multiline expectedExceptionMessage annotation (Slamdunk)
+* bug #3352 FunctionToConstantFixer - bugfix for get_class with leading backslash (kubawerlos)
+* bug #3359 BracesFixer - handle comment for content outside of given block (keradus)
+* bug #3371 IsNullFixer must be run before YodaStyleFixer (kubawerlos)
+* bug #3373 PhpdocAlignFixer - Fix removing of everything after @ when there is a space after the @ (ntzm)
+* bug #3415 FileFilterIterator - input checks and utests (SpacePossum, keradus)
+* bug #3420 SingleLineCommentStyleFixer - fix 'strpos() expects parameter 1 to be string, boolean given' (keradus, SpacePossum)
+* bug #3428 Fix archive analysing (keradus)
+* bug #3429 Fix archive analysing (keradus)
+* minor #3137 PHPUnit - use common base class (keradus)
+* minor #3311 FinalInternalClassFixer - fix typo (localheinz)
+* minor #3328 Remove duplicated space in exceptions (keradus)
+* minor #3342 PhpUnitDedicateAssertFixer - Remove unexistent method is_boolean (carusogabriel)
+* minor #3345 StdinFileInfo - fix __toString (keradus)
+* minor #3346 StdinFileInfo - drop getContents (keradus)
+* minor #3347 DX: reapply newest CS (keradus)
+* minor #3365 COOKBOOK-FIXERS.md - update to provide definition instead of description (keradus)
+* minor #3370 AbstractFixer - FQCN in in exceptions (Slamdunk)
+* minor #3372 ProjectCodeTest - fix comment (keradus)
+* minor #3393 Method call typos (Slamdunk, keradus)
+* minor #3402 Always provide delimiter to `preg_quote` calls (ntzm)
+* minor #3403 Remove unused import (ntzm)
+* minor #3405 Fix `fopen` mode (ntzm)
+* minor #3407 CombineConsecutiveIssetsFixer - Improve description (kubawerlos)
+* minor #3408 Improving fixers descriptions (kubawerlos)
+* minor #3409 move itests from misc to priority (keradus)
+* minor #3411 Better type hinting for AbstractFixerTestCase::$fixer (kubawerlos)
+* minor #3412 Convert `strtolower` inside `strpos` to just `stripos` (ntzm)
+* minor #3421 DX: Use ::class (keradus)
+* minor #3424 AbstractFixerTest: fix expectException arguments (Slamdunk, keradus)
+* minor #3425 FixerFactoryTest - test that priority pair fixers have itest (keradus, SpacePossum)
+* minor #3427 ConfigurationResolver: fix @return annotation (Slamdunk)
+
+Changelog for v2.9.0
+--------------------
+
+* feature #3063 Method chaining indentation fixer (boliev, julienfalque)
+* feature #3076 Add ExplicitStringVariableFixer (Slamdunk, keradus)
+* feature #3098 MethodSeparationFixer - add class elements separation options (SpacePossum, keradus)
+* feature #3155 Add EscapeImplicitBackslashesFixer (Slamdunk)
+* feature #3164 Add ExplicitIndirectVariableFixer (Slamdunk, keradus)
+* feature #3183 FinalInternalClassFixer introduction (keradus, SpacePossum)
+* feature #3187 StaticLambdaFixer - introduction (SpacePossum, keradus)
+* feature #3209 PhpdocAlignFixer - Make @method alignable (ntzm)
+* feature #3275 Add PhpUnitTestAnnotationFixer (BackEndTea, keradus)
+
+Changelog for v2.8.4
+--------------------
+
+* bug #3281 SelfAccessorFixer - stop modifying traits (kubawerlos)
+* minor #3195 Add self-update command test (julienfalque)
+* minor #3287 FileCacheManagerTest - drop duplicated line (keradus)
+* minor #3292 PHPUnit - set memory limit (veewee)
+* minor #3306 Token - better input validation (keradus)
+* minor #3310 Upgrade PHP Coveralls (keradus)
+
+Changelog for v2.8.3
+--------------------
+
+* bug #3173 SimplifiedNullReturnFixer - handle nullable return types (Slamdunk)
+* bug #3268 PhpUnitNoExpectationAnnotationFixer - add case with backslashes (keradus, Slamdunk)
+* bug #3272 PhpdocTrimFixer - unicode support (SpacePossum)
+
+Changelog for v2.8.2
+--------------------
+
+* bug #3225 PhpdocTrimFixer - Fix handling of lines without leading asterisk (julienfalque)
+* bug #3241 NoExtraConsecutiveBlankLinesFixer - do not crash on ^M LF only (SpacePossum)
+* bug #3242 PhpUnitNoExpectationAnnotationFixer - fix ' handling (keradus)
+* bug #3243 PhpUnitExpectationFixer - don't create ->expectExceptionMessage(null) (keradus)
+* bug #3244 PhpUnitNoExpectationAnnotationFixer - expectation extracted from annotation shall be separated from rest of code with one blank line (keradus)
+* bug #3259 PhpUnitNamespacedFixer - fix isCandidate to not rely on class declaration (keradus)
+* bug #3261 PhpUnitNamespacedFixer - properly fix next usage of already fixed class (keradus)
+* bug #3262 ToolInfo - support installation by branch as well (keradus)
+* bug #3263 NoBreakCommentFixer - Fix handling comment text with PCRE characters (julienfalque)
+* bug #3266 PhpUnitConstructFixer - multiple asserts bug (kubawerlos)
+* minor #3239 Improve contributing guide and issue template (julienfalque)
+* minor #3246 Make ToolInfo methods non-static (julienfalque)
+* minor #3249 PhpUnitNoExpectationAnnotationFixerTest - fix hidden conflict (keradus)
+* minor #3250 Travis: fail early, spare resources, save the Earth (Slamdunk, keradus)
+* minor #3251 Create Title for config file docs section (IanEdington)
+* minor #3254 AutoReview/FixerFactoryTest::testFixersPriority: verbose assertion message (Slamdunk)
+* minor #3255 IntegrationTest: output exception stack trace (Slamdunk)
+* minor #3257 README.rst - Fixed bullet list formatting (moebrowne)
+
+Changelog for v2.8.1
+--------------------
+
+* bug #3199 TokensAnalyzer - getClassyElements (SpacePossum)
+* bug #3208 BracesFixer - Fix for instantiation in control structures (julienfalque, SpacePossum)
+* bug #3215 BinaryOperatorSpacesFixer - Fix spaces around multiple exception catching (|) (ntzm)
+* bug #3216 AbstractLinesBeforeNamespaceFixer - add min. and max. option, not only single target count (SpacePossum)
+* bug #3217 TokenizerLinter - fix lack of linting when code is cached (SpacePossum, keradus)
+* minor #3200 Skip slow test when Xdebug is loaded (julienfalque)
+* minor #3211 Use udiff format in CI (julienfalque)
+* minor #3212 Handle rulesets unknown to fabbot.io (julienfalque)
+* minor #3219 Normalise references to GitHub in docs (ntzm)
+* minor #3226 Remove unused imports (ntzm)
+* minor #3231 Fix typos (ntzm)
+* minor #3234 Simplify Cache\Signature::equals (ntzm)
+* minor #3237 UnconfigurableFixer - use only LF (keradus)
+* minor #3238 AbstractFixerTest - fix @cover annotation (keradus)
+
+Changelog for v2.8.0
+--------------------
+
+* feature #3065 Add IncrementStyleFixer (kubawerlos)
+* feature #3119 Feature checkstyle reporter (K-Phoen)
+* feature #3162 Add udiff as diff format (SpacePossum, keradus)
+* feature #3170 Add CompactNullableTypehintFixer (jfcherng)
+* feature #3189 Add PHP_CS_FIXER_FUTURE_MODE env (keradus)
+* feature #3201 Add PHPUnit Migration rulesets and fixers (keradus)
+* minor #3149 AbstractProxyFixer - Support multiple proxied fixers (julienfalque)
+* minor #3160 Add DeprecatedFixerInterface (kubawerlos)
+* minor #3185 IndentationTypeFixerTest - clean up (SpacePossum, keradus)
+* minor #3198 Cleanup: add test that there is no deprecated fixer in rule set (kubawerlos)
+
+Changelog for v2.7.5
+--------------------
+
+* bug #3225 PhpdocTrimFixer - Fix handling of lines without leading asterisk (julienfalque)
+* bug #3241 NoExtraConsecutiveBlankLinesFixer - do not crash on ^M LF only (SpacePossum)
+* bug #3262 ToolInfo - support installation by branch as well (keradus)
+* bug #3263 NoBreakCommentFixer - Fix handling comment text with PCRE characters (julienfalque)
+* bug #3266 PhpUnitConstructFixer - multiple asserts bug (kubawerlos)
+* minor #3239 Improve contributing guide and issue template (julienfalque)
+* minor #3246 Make ToolInfo methods non-static (julienfalque)
+* minor #3250 Travis: fail early, spare resources, save the Earth (Slamdunk, keradus)
+* minor #3251 Create Title for config file docs section (IanEdington)
+* minor #3254 AutoReview/FixerFactoryTest::testFixersPriority: verbose assertion message (Slamdunk)
+* minor #3255 IntegrationTest: output exception stack trace (Slamdunk)
+
+Changelog for v2.7.4
+--------------------
+
+* bug #3199 TokensAnalyzer - getClassyElements (SpacePossum)
+* bug #3208 BracesFixer - Fix for instantiation in control structures (julienfalque, SpacePossum)
+* bug #3215 BinaryOperatorSpacesFixer - Fix spaces around multiple exception catching (|) (ntzm)
+* bug #3216 AbstractLinesBeforeNamespaceFixer - add min. and max. option, not only single target count (SpacePossum)
+* bug #3217 TokenizerLinter - fix lack of linting when code is cached (SpacePossum, keradus)
+* minor #3200 Skip slow test when Xdebug is loaded (julienfalque)
+* minor #3219 Normalise references to GitHub in docs (ntzm)
+* minor #3226 Remove unused imports (ntzm)
+* minor #3231 Fix typos (ntzm)
+* minor #3234 Simplify Cache\Signature::equals (ntzm)
+* minor #3237 UnconfigurableFixer - use only LF (keradus)
+* minor #3238 AbstractFixerTest - fix @cover annotation (keradus)
+
+Changelog for v2.7.3
+--------------------
+
+* bug #3114 SelfAccessorFixer - Fix type declarations replacement (julienfalque)
+
+Changelog for v2.7.2
+--------------------
+
+* bug #3062 BraceClassInstantiationTransformer - Fix instantiation inside method call braces case (julienfalque, keradus)
+* bug #3083 SingleBlankLineBeforeNamespaceFixer - Fix handling namespace right after opening tag (mlocati)
+* bug #3109 SwitchCaseSemicolonToColonFixer - Fix bug with nested constructs (SpacePossum)
+* bug #3117 Multibyte character in array key makes alignment incorect (kubawerlos)
+* bug #3123 Cache - File permissions (SpacePossum)
+* bug #3138 NoHomoglyphNamesFixer - fix crash on non-ascii but not mapped either (SpacePossum)
+* bug #3172 IndentationTypeFixer - do not touch whitespace that is not indentation (SpacePossum)
+* bug #3176 NoMultilineWhitespaceBeforeSemicolonsFixer - SpaceAfterSemicolonFixer - priority fix (SpacePossum)
+* bug #3193 TokensAnalyzer::getClassyElements - sort result before returning (SpacePossum)
+* bug #3196 SelfUpdateCommand - fix exit status when can't determine newest version (julienfalque)
+* minor #3107 ConfigurationResolver - improve error message when rule is not found (SpacePossum)
+* minor #3113 Add WordMatcher (keradus)
+* minor #3128 README: remove deprecated rule from CLI examples (chteuchteu)
+* minor #3133 Unify Reporter tests (keradus)
+* minor #3134 Allow Symfony 4 (keradus, garak)
+* minor #3136 PHPUnit - call hooks from parent class as well (keradus)
+* minor #3141 Unify description of deprecated fixer (kubawerlos)
+* minor #3144 PhpUnitDedicateAssertFixer - Sort map and array by function name (localheinz)
+* minor #3145 misc - Typo (localheinz)
+* minor #3150 Fix CircleCI (julienfalque)
+* minor #3151 Update gitattributes to ignore next file (keradus)
+* minor #3156 Update php-coveralls (keradus)
+* minor #3166 README - add link to new gitter channel. (SpacePossum)
+* minor #3174 Update UPGRADE.md (vitek-rostislav)
+* minor #3180 Fix usage of static variables (kubawerlos)
+* minor #3182 Add support for PHPUnit 6, drop PHPUnit 4 (keradus)
+* minor #3184 Code grooming - sort content of arrays (keradus)
+* minor #3191 Travis - add nightly build to allow_failures due to Travis issues (keradus)
+* minor #3197 DX groom CS (keradus)
+
+Changelog for v2.7.1
+--------------------
+
+* bug #3115 NoUnneededFinalMethodFixer - fix edge case (Slamdunk)
+
+Changelog for v2.7.0
+--------------------
+
+* feature #2573 BinaryOperatorSpaces reworked (SpacePossum, keradus)
+* feature #3073 SpaceAfterSemicolonFixer - Add option to remove space in empty for expressions (julienfalque)
+* feature #3089 NoAliasFunctionsFixer - add imap aliases (Slamdunk)
+* feature #3093 NoUnneededFinalMethodFixer - Remove final keyword from private methods (localheinz, keradus)
+* minor #3068 Symfony:risky ruleset - add no_homoglyph_names (keradus)
+* minor #3074 [IO] Replace Diff with fork version (SpacePossum)
+
+Changelog for v2.6.1
+--------------------
+
+* bug #3052 Fix false positive warning about paths overridden by provided as command arguments (kubawerlos)
+* bug #3053 CombineConsecutiveIssetsFixer - fix priority (SpacePossum)
+* bug #3058 IsNullFixer - fix whitespace handling (roukmoute)
+* bug #3069 MethodArgumentSpaceFixer - new test case (keradus)
+* bug #3072 IsNullFixer - fix non_yoda_style edge case (keradus)
+* bug #3088 Drop dedicated Phar stub (keradus)
+* bug #3100 NativeFunctionInvocationFixer - Fix test if previous token is already namespace separator (SpacePossum)
+* bug #3104 DoctrineAnnotationIndentationFixer - Fix str_repeat() error (julienfalque)
+* minor #3038 Support PHP 7.2 (SpacePossum, keradus)
+* minor #3064 Fix couple of typos (KKSzymanowski)
+* minor #3070 YodaStyleFixer - Clarify configuration parameters (SteveJobzniak)
+* minor #3078 ConfigurationResolver - hide context while including config file (keradus)
+* minor #3080 Direct function call instead of by string (kubawerlos)
+* minor #3085 CiIntegrationTest - skip when no git is available (keradus)
+* minor #3087 phar-stub.php - allow PHP 7.2 (keradus)
+* minor #3092 .travis.yml - fix matrix for PHP 7.1 (keradus)
+* minor #3094 NoUnneededFinalMethodFixer - Add test cases (julienfalque)
+* minor #3111 DoctrineAnnotationIndentationFixer - Restore test case (julienfalque)
+
+Changelog for v2.6.0
+--------------------
+
+* bug #3039 YodaStyleFixer - Fix echo case (SpacePossum, keradus)
+* feature #2446 Add YodaStyleFixer (SpacePossum)
+* feature #2940 Add NoHomoglyphNamesFixer (mcfedr, keradus)
+* feature #3012 Add CombineConsecutiveIssetsFixer (SpacePossum)
+* minor #3037 Update SF rule set (SpacePossum)
+
+Changelog for v2.5.1
+--------------------
+
+* bug #3002 Bugfix braces (mnabialek)
+* bug #3010 Fix handling of Github releases (julienfalque, keradus)
+* bug #3015 Fix exception arguments (julienfalque)
+* bug #3016 Verify phar file (keradus)
+* bug #3021 Risky rules cleanup (kubawerlos)
+* bug #3023 RandomApiMigrationFixer - "rand();" to "random_int(0, getrandmax());" fixing (SpacePossum)
+* bug #3024 ConfigurationResolver - Handle empty "rules" value (SpacePossum, keradus)
+* bug #3031 IndentationTypeFixer - fix handling tabs in indented comments (keradus)
+* minor #2999 Notice when paths from config file are overridden by command arguments (julienfalque, keradus)
+* minor #3007 Add PHP 7.2 to Travis build matrix (Jean85)
+* minor #3009 CiIntegrationTest - run local (SpacePossum)
+* minor #3013 Adjust phpunit configuration (localheinz)
+* minor #3017 Fix: Risky tests (localheinz)
+* minor #3018 Fix: Make sure that data providers are named correctly (localheinz, keradus)
+* minor #3032 .php_cs.dist - handling UnexpectedValueException (keradus)
+* minor #3033 Use ::class (keradus)
+* minor #3034 Follow newest CS (keradus)
+* minor #3036 Drop not existing Standalone group from PHPUnit configuration and duplicated internal tags (keradus)
+* minor #3042 Update gitter address (keradus)
+
+Changelog for v2.5.0
+--------------------
+
+* feature #2770 DoctrineAnnotationSpaces - split assignments options (julienfalque)
+* feature #2843 Add estimating-max progress output type (julienfalque)
+* feature #2885 Add NoSuperfluousElseifFixer (julienfalque)
+* feature #2929 Add NoUnneededCurlyBracesFixer (SpacePossum)
+* feature #2944 FunctionToConstantFixer - handle get_class() -> __CLASS__ as well (SpacePossum)
+* feature #2953 BlankLineBeforeStatementFixer - Add more statements (localheinz, keradus)
+* feature #2972 Add NoUnneededFinalMethodFixer (Slamdunk, keradus)
+* feature #2992 Add Doctrine Annotation ruleset (julienfalque)
+* minor #2926 Token::getNameForId (SpacePossum)
+
+Changelog for v2.4.2
+--------------------
+
+* bug #3002 Bugfix braces (mnabialek)
+* bug #3010 Fix handling of Github releases (julienfalque, keradus)
+* bug #3015 Fix exception arguments (julienfalque)
+* bug #3016 Verify phar file (keradus)
+* bug #3021 Risky rules cleanup (kubawerlos)
+* bug #3023 RandomApiMigrationFixer - "rand();" to "random_int(0, getrandmax());" fixing (SpacePossum)
+* bug #3024 ConfigurationResolver - Handle empty "rules" value (SpacePossum, keradus)
+* bug #3031 IndentationTypeFixer - fix handling tabs in indented comments (keradus)
+* minor #2999 Notice when paths from config file are overridden by command arguments (julienfalque, keradus)
+* minor #3007 Add PHP 7.2 to Travis build matrix (Jean85)
+* minor #3009 CiIntegrationTest - run local (SpacePossum)
+* minor #3013 Adjust phpunit configuration (localheinz)
+* minor #3017 Fix: Risky tests (localheinz)
+* minor #3018 Fix: Make sure that data providers are named correctly (localheinz, keradus)
+* minor #3032 .php_cs.dist - handling UnexpectedValueException (keradus)
+* minor #3033 Use ::class (keradus)
+* minor #3034 Follow newest CS (keradus)
+* minor #3036 Drop not existing Standalone group from PHPUnit configuration and duplicated internal tags (keradus)
+* minor #3042 Update gitter address (keradus)
+
+Changelog for v2.4.1
+--------------------
+
+* bug #2925 Improve CI integration suggestion (julienfalque)
+* bug #2928 TokensAnalyzer::getClassyElements - Anonymous class support (SpacePossum)
+* bug #2931 Psr0Fixer, Psr4Fixer - ignore "new class" syntax (dg, keradus)
+* bug #2934 Config - fix handling rule without value (keradus, SpacePossum)
+* bug #2939 NoUnusedImportsFixer - Fix extra blank line (julienfalque)
+* bug #2941 PHP 7.2 - Group imports with trailing comma support (SpacePossum, julienfalque)
+* bug #2954 NoBreakCommentFixer - Disable case sensitivity (julienfalque)
+* bug #2959 MethodArgumentSpaceFixer - Skip body of fixed function (greg0ire)
+* bug #2984 AlignMultilineCommentFixer - handle uni code (SpacePossum)
+* bug #2987 Fix incorrect indentation of comments in `braces` fixer (rob006)
+* minor #2924 Add missing Token deprecations (julienfalque)
+* minor #2927 WhiteSpaceConfig - update message copy and more strict tests (SpacePossum, keradus)
+* minor #2930 Trigger website build (keradus)
+* minor #2932 Integrate CircleCI (keradus, aidantwoods)
+* minor #2933 ProcessLinterTest - Ensure Windows test only runs on Windows, add a Mac test execution (aidantwoods)
+* minor #2935 special handling of fabbot.io service if it's using too old PHP CS Fixer version (keradus)
+* minor #2937 Travis: execute 5.3 job on precise (keradus)
+* minor #2938 Tests fix configuration of project (SpacePossum, keradus)
+* minor #2943 FunctionToConstantFixer - test with diff. arguments than fixable (SpacePossum)
+* minor #2945 BlankLineBeforeStatementFixerTest - Fix covered class (julienfalque)
+* minor #2946 Detect extra old installations (keradus)
+* minor #2947 Test suggested CI integration (keradus)
+* minor #2951 AccessibleObject - remove most of usage (keradus)
+* minor #2952 BlankLineBeforeStatementFixer - Reference fixer instead of test class (localheinz)
+* minor #2955 Travis - stop using old TASK_SCA residue (keradus)
+* minor #2968 AssertTokensTrait - don't use AccessibleObject (keradus)
+* minor #2969 Shrink down AccessibleObject usage (keradus)
+* minor #2982 TrailingCommaInMultilineArrayFixer - simplify isMultilineArray condition (TomasVotruba)
+* minor #2989 CiIntegrationTest - fix min supported PHP versions (keradus)
+
+Changelog for v2.4.0
+--------------------
+
+* bug #2880 NoBreakCommentFixer - fix edge case (julienfalque)
+* bug #2900 VoidReturnFixer - handle functions containing anonymous functions/classes (bendavies, keradus)
+* bug #2902 Fix test classes constructor (julienfalque)
+* feature #2384 Add BlankLineBeforeStatementFixer (localheinz, keradus, SpacePossum)
+* feature #2440 MethodArgumentSpaceFixer - add ensure_fully_multiline option (greg0ire)
+* feature #2649 PhpdocAlignFixer - make fixer configurable (ntzm)
+* feature #2664 Add DoctrineAnnotationArrayAssignmentFixer (julienfalque)
+* feature #2667 Add NoBreakCommentFixer (julienfalque)
+* feature #2684 BracesFixer - new options for braces position after control structures and anonymous constructs (aidantwoods, keradus)
+* feature #2701 NoExtraConsecutiveBlankLinesFixer - Add more configuration options related to switch statements (SpacePossum)
+* feature #2740 Add VoidReturnFixer (mrmark)
+* feature #2765 DoctrineAnnotationIndentationFixer - add option to indent mixed lines (julienfalque)
+* feature #2815 NonPrintableCharacterFixer - Add option to replace with escape sequences (julienfalque, keradus)
+* feature #2822 Add NoNullPropertyInitializationFixer (ntzm, julienfalque, SpacePossum)
+* feature #2825 Add PhpdocTypesOrderFixer (julienfalque, keradus)
+* feature #2856 CastSpacesFixer - add space option (kubawerlos, keradus)
+* feature #2857 Add AlignMultilineCommentFixer (Slamdunk, keradus)
+* feature #2866 Add SingleLineCommentStyleFixer, deprecate HashToSlashCommentFixer (Slamdunk, keradus)
+* minor #2773 Travis - use stages (keradus)
+* minor #2794 Drop HHVM support (keradus, julienfalque)
+* minor #2801 ProjectCodeTest - Fix typo in deprecation message (SpacePossum)
+* minor #2818 Token become immutable, performance optimizations (keradus)
+* minor #2877 Fix PHPMD report (julienfalque)
+* minor #2894 NonPrintableCharacterFixer - fix handling required PHP version on PHPUnit 4.x (keradus)
+* minor #2921 InvalidForEnvFixerConfigurationException - fix handling in tests on 2.4 line (keradus)
+
+Changelog for v2.3.3
+--------------------
+
+* bug #2807 NoUselessElseFixer - Fix detection of conditional block (SpacePossum)
+* bug #2809 Phar release - fix readme generation (SpacePossum, keradus)
+* bug #2827 MethodArgumentSpaceFixer - Always remove trailing spaces (julienfalque)
+* bug #2835 SelfAcessorFixer - class property fix (mnabialek)
+* bug #2848 PhpdocIndentFixer - fix edge case with inline phpdoc (keradus)
+* bug #2849 BracesFixer - Fix indentation issues with comments (julienfalque)
+* bug #2851 Tokens - ensureWhitespaceAtIndex (GrahamCampbell, SpacePossum)
+* bug #2854 NoLeadingImportSlashFixer - Removing leading slash from import even when in global space (kubawerlos)
+* bug #2858 Support generic types (keradus)
+* bug #2869 Fix handling required configuration (keradus)
+* bug #2881 NoUnusedImportsFixer - Bug when trying to insert empty token (GrahamCampbell, keradus)
+* bug #2882 DocBlock\Annotation - Fix parsing of collections with multiple key types (julienfalque)
+* bug #2886 NoSpacesInsideParenthesisFixer - Do not remove whitespace if next token is comment (SpacePossum)
+* bug #2888 SingleImportPerStatementFixer - Add support for function and const (SpacePossum)
+* bug #2901 Add missing files to archive files (keradus)
+* bug #2914 HeredocToNowdocFixer - works with CRLF line ending (dg)
+* bug #2920 RuleSet - Update deprecated configuration of fixers (SpacePossum, keradus)
+* minor #1531 Update docs for few generic types (keradus)
+* minor #2793 COOKBOOK-FIXERS.md - update to current version, fix links (keradus)
+* minor #2812 ProcessLinter - compatibility with Symfony 3.3 (keradus)
+* minor #2816 Tokenizer - better docs and validation (keradus)
+* minor #2817 Tokenizer - use future-compatible interface (keradus)
+* minor #2819 Fix benchmark (keradus)
+* minor #2820 MagicConstantCasingFixer - Remove defined check (SpacePossum)
+* minor #2823 Tokenizer - use future-compatible interface (keradus)
+* minor #2824 code grooming (keradus)
+* minor #2826 Exceptions - provide utests (localheinz)
+* minor #2828 Enhancement: Reference phpunit.xsd from phpunit.xml.dist (localheinz)
+* minor #2830 Differs - add tests (localheinz)
+* minor #2832 Fix: Use all the columns (localheinz)
+* minor #2833 Doctrine\Annotation\Token - provide utests (localheinz)
+* minor #2839 Use PHP 7.2 polyfill instead of xml one (keradus)
+* minor #2842 Move null to first position in PHPDoc types (julienfalque)
+* minor #2850 ReadmeCommandTest - Prevent diff output (julienfalque)
+* minor #2859 Fixed typo and dead code removal (GrahamCampbell)
+* minor #2863 FileSpecificCodeSample - add tests (localheinz)
+* minor #2864 WhitespacesAwareFixerInterface clean up (Slamdunk)
+* minor #2865 AutoReview\FixerTest - test configuration samples (SpacePossum, keradus)
+* minor #2867 VersionSpecification - Fix copy-paste typo (SpacePossum)
+* minor #2870 Tokens - ensureWhitespaceAtIndex - Clear tokens before compare. (SpacePossum)
+* minor #2874 LineTest - fix typo (keradus)
+* minor #2875 HelpCommand - recursive layout fix (SpacePossum)
+* minor #2883 DescribeCommand - Show which sample uses the default configuration (SpacePossum)
+* minor #2887 Housekeeping - Strict whitespace checks (SpacePossum)
+* minor #2895 ProjectCodeTest - check that classes in no-tests exception exist (keradus)
+* minor #2896 Move testing related classes from src to tests (keradus)
+* minor #2904 Reapply CS (keradus)
+* minor #2910 PhpdocAnnotationWithoutDotFixer - Restrict lowercasing (oschwald)
+* minor #2913 Tests - tweaks (SpacePossum, keradus)
+* minor #2916 FixerFactory - drop return in sortFixers(), never used (TomasVotruba)
+
+Changelog for v2.3.2
+--------------------
+
+* bug #2682 DoctrineAnnotationIndentationFixer - fix handling nested annotations (edhgoose, julienfalque)
+* bug #2700 Fix Doctrine Annotation end detection (julienfalque)
+* bug #2715 OrderedImportsFixer - handle indented groups (pilgerone)
+* bug #2732 HeaderCommentFixer - fix handling blank lines (s7b4)
+* bug #2745 Fix Doctrine Annotation newlines (julienfalque)
+* bug #2752 FixCommand - fix typo in warning message (mnapoli)
+* bug #2757 GeckoPHPUnit is not dev dependency (keradus)
+* bug #2759 Update gitattributes (SpacePossum)
+* bug #2763 Fix describe command with PSR-0 fixer (julienfalque)
+* bug #2768 Tokens::ensureWhitespaceAtIndex - clean up comment check, add check for T_OPEN (SpacePossum)
+* bug #2783 Tokens::ensureWhitespaceAtIndex - Fix handling line endings (SpacePossum)
+* minor #2304 DX: use PHPMD (keradus)
+* minor #2663 Use colors for keywords in commands output (julienfalque, keradus)
+* minor #2706 Update README (SpacePossum)
+* minor #2714 README.rst - fix wrong value in example (mleko)
+* minor #2718 Remove old Symfony exception message expectation (julienfalque)
+* minor #2721 Update phpstorm article link to a fresh blog post (valeryan)
+* minor #2725 Use method chaining for configuration definitions (julienfalque)
+* minor #2727 PHPUnit - use speedtrap (keradus)
+* minor #2728 SelfUpdateCommand - verify that it's possible to replace current file (keradus)
+* minor #2729 DescribeCommand - add decorated output test (julienfalque)
+* minor #2731 BracesFixer - properly pass config in utest dataProvider (keradus)
+* minor #2738 Upgrade tests to use new, namespaced PHPUnit TestCase class (keradus)
+* minor #2742 Code cleanup (GrahamCampbell, keradus)
+* minor #2743 Fixing example and description for GeneralPhpdocAnnotationRemoveFixer (kubawerlos)
+* minor #2744 AbstractDoctrineAnnotationFixerTestCase - split fixers test cases (julienfalque)
+* minor #2755 Fix compatibility with PHPUnit 5.4.x (keradus)
+* minor #2758 Readme - improve CI integration guidelines (keradus)
+* minor #2769 Psr0Fixer - remove duplicated example (julienfalque)
+* minor #2774 AssertTokens Trait (keradus)
+* minor #2775 NoExtraConsecutiveBlankLinesFixer - remove duplicate code sample. (SpacePossum)
+* minor #2778 AutoReview - watch that code samples are unique (keradus)
+* minor #2787 Add warnings about missing dom ext and require json ext (keradus)
+* minor #2792 Use composer-require-checker (keradus)
+* minor #2796 Update .gitattributes (SpacePossum)
+* minor #2797 Update .gitattributes (SpacePossum)
+* minor #2800 PhpdocTypesFixerTest - Fix typo in covers annotation (SpacePossum)
+
+Changelog for v2.3.1
+--------------------
+
+Port of v2.2.3.
+
+* bug #2724 Revert #2554 Add short diff. output format (keradus)
+
+Changelog for v2.3.0
+--------------------
+
+* feature #2450 Add ListSyntaxFixer (SpacePossum)
+* feature #2708 Add PhpUnitTestClassRequiresCoversFixer (keradus)
+* minor #2568 Require PHP 5.6+ (keradus)
+* minor #2672 Bump symfony/* deps (keradus)
+
+Changelog for v2.2.20
+---------------------
+
+* bug #3233 PhpdocAlignFixer - Fix linebreak inconsistency (SpacePossum, keradus)
+* bug #3445 Rewrite NoUnusedImportsFixer (kubawerlos, julienfalque)
+* bug #3597 DeclareStrictTypesFixer - fix bug of removing line (kubawerlos, keradus)
+* bug #3605 DoctrineAnnotationIndentationFixer - Fix indentation with mixed lines (julienfalque)
+* bug #3606 PhpdocToCommentFixer - allow multiple ( (SpacePossum)
+* bug #3684 PhpUnitStrictFixer - Do not fix if not correct # of arguments are used (SpacePossum)
+* bug #3715 SingleImportPerStatementFixer - Fix handling whitespace before opening brace (julienfalque)
+* bug #3731 PhpdocIndentFixer - crash fix (SpacePossum)
+* bug #3765 Fix binary-prefixed double-quoted strings to single quotes (ntzm)
+* bug #3770 Handle binary flags in heredoc_to_nowdoc (ntzm)
+* bug #3790 ProcessLinter - don't execute external process without timeout! It can freeze! (keradus)
+* minor #3548 Make shell scripts POSIX-compatible (EvgenyOrekhov, keradus)
+* minor #3568 New Autoreview: Correct option casing (ntzm)
+* minor #3590 Use XdebugHandler to avoid performance penalty (AJenbo, keradus)
+* minor #3607 PhpdocVarWithoutNameFixer - update sample with @ type (SpacePossum)
+* minor #3617 Tests stability patches (Tom Klingenberg, keradus)
+* minor #3627 Fix tests execution under phpdbg (keradus)
+* minor #3629 ProjectFixerConfigurationTest - test rules are sorted (SpacePossum)
+* minor #3639 DX: use benefits of symfony/force-lowest (keradus)
+* minor #3641 Update check_trailing_spaces script with upstream (keradus)
+* minor #3646 Extract SameStringsConstraint and XmlMatchesXsdConstraint (keradus)
+* minor #3647 DX: Add CachingLinter for tests (keradus)
+* minor #3649 Update check_trailing_spaces script with upstream (keradus)
+* minor #3652 CiIntegrationTest - run tests with POSIX sh, not Bash (keradus)
+* minor #3656 DX: Clean ups (SpacePossum)
+* minor #3660 Fix do not rely on order of fixing in CiIntegrationTest (kubawerlos)
+* minor #3662 DX: Add Smoke/InstallViaComposerTest (keradus)
+* minor #3663 DX: During deployment, run all smoke tests and don't allow to skip phar-related ones (keradus)
+* minor #3665 CircleCI fix (kubawerlos)
+* minor #3666 Use "set -eu" in shell scripts (EvgenyOrekhov)
+* minor #3669 Document possible values for subset options (julienfalque, keradus)
+* minor #3676 RunnerTest - workaround for failing Symfony v2.8.37 (kubawerlos)
+* minor #3680 DX: Tokens - removeLeadingWhitespace and removeTrailingWhitespace must act in same way (SpacePossum)
+* minor #3686 README.rst - Format all code-like strings in fixer descriptions (ntzm, keradus)
+* minor #3692 DX: Optimize tests (julienfalque)
+* minor #3701 Use correct casing for "PHPDoc" (ntzm)
+* minor #3703 DX: InstallViaComposerTets - groom naming (keradus)
+* minor #3704 DX: Tokens - fix naming (keradus)
+* minor #3706 Update homebrew installation instructions (ntzm)
+* minor #3713 Use HTTPS whenever possible (fabpot)
+* minor #3723 Extend tests coverage (ntzm)
+* minor #3733 Disable Composer optimized autoloader by default (julienfalque)
+* minor #3748 PhpUnitStrictFixer - extend risky note (jnvsor)
+* minor #3749 Make sure PHPUnit is cased correctly in fixers descriptions (kubawerlos)
+* minor #3773 AbstractFixerWithAliasedOptionsTestCase - don't export (keradus)
+* minor #3796 DX: StdinTest - do not assume name of folder, into which project was cloned (keradus)
+* minor #3803 NoEmptyPhpdocFixer/PhpdocAddMissingParamAnnotationFixer - missing priority test (SpacePossum, keradus)
+* minor #3804 Cleanup: remove useless constructor comment (kubawerlos)
+
+Changelog for v2.2.19
+---------------------
+
+* bug #3594 ElseifFixer - Bug with alternative syntax (kubawerlos)
+* bug #3600 StrictParamFixer - Fix issue when functions are imported (ntzm, keradus)
+* minor #3589 FixerFactoryTest - add missing test (SpacePossum, keradus)
+* minor #3610 make phar extension optional (Tom Klingenberg, keradus)
+* minor #3612 Travis - allow for hhvm failures (keradus)
+* minor #3615 Detect fabbot.io (julienfalque, keradus)
+* minor #3616 FixerFactoryTest - Don't rely on autovivification (keradus)
+
+Changelog for v2.2.18
+---------------------
+
+* bug #3446 Add PregWrapper (kubawerlos)
+* bug #3464 IncludeFixer - fix incorrect order of fixing (kubawerlos, SpacePossum)
+* bug #3496 Bug in Tokens::removeLeadingWhitespace (kubawerlos, SpacePossum, keradus)
+* bug #3557 AbstractDoctrineAnnotationFixer: edge case bugfix (Slamdunk)
+* bug #3574 GeneralPhpdocAnnotationRemoveFixer - remove PHPDoc if no content is left (SpacePossum)
+* minor #3563 DX add missing covers annotations (keradus)
+* minor #3565 Use EventDispatcherInterface instead of EventDispatcher when possible (keradus)
+* minor #3572 DX: allow for more phpunit-speedtrap versions to support more PHPUnit versions (keradus)
+* minor #3576 Fix Doctrine Annotation test cases merging (julienfalque)
+
+Changelog for v2.2.17
+---------------------
+
+* bug #3504 NoBlankLinesAfterPhpdocFixer - allow blank line before declare statement (julienfalque)
+* bug #3522 Remove LOCK_EX (SpacePossum)
+* bug #3560 SelfAccessorFixer is risky (Slamdunk)
+* minor #3435 Add tests for general_phpdoc_annotation_remove (BackEndTea)
+* minor #3484 Create Tokens::findBlockStart (ntzm)
+* minor #3512 Add missing array typehints (ntzm)
+* minor #3516 Use null|type instead of ?type in PHPDocs (ntzm)
+* minor #3518 FixerFactoryTest - Test each priority test file is listed as test (SpacePossum)
+* minor #3520 Fix typos: ran vs. run (SpacePossum)
+* minor #3521 Use HTTPS (carusogabriel)
+* minor #3526 Remove gecko dependency (SpacePossum, keradus, julienfalque)
+* minor #3531 Backport PHPMD to LTS version to ease maintainability (keradus)
+* minor #3532 Implement Tokens::findOppositeBlockEdge (ntzm)
+* minor #3533 DX: SCA - drop src/Resources exclusion (keradus)
+* minor #3538 Don't use third parameter of Tokens::findBlockStart (ntzm)
+* minor #3542 Enhancement: Run composer-normalize on Travis CI (localheinz, keradus)
+* minor #3555 DX: composer.json - drop branch-alias, branch is already following the version (keradus)
+* minor #3556 DX: Add AutoReview/ComposerTest (keradus)
+* minor #3559 Don't expose new files under Test namespace (keradus)
+
+Changelog for v2.2.16
+---------------------
+
+* bug #3502 Fix missing file in export (keradus)
+
+Changelog for v2.2.15
+---------------------
+
+* bug #3367 NoUnusedImportsFixer - fix comment handling (SpacePossum, keradus)
+* bug #3455 NoEmptyCommentFixer - comment block detection for line ending different than LF (kubawerlos, SpacePossum)
+* bug #3458 SilencedDeprecationErrorFixer - fix edge cases (kubawerlos)
+* bug #3466 no_whitespace_in_blank_line and no_blank_lines_after_phpdoc fixers bug (kubawerlos, keradus)
+* minor #3354 Added missing types to the PhpdocTypesFixer (GrahamCampbell)
+* minor #3406 Fix for escaping in README (kubawerlos)
+* minor #3431 Add missing tests (SpacePossum)
+* minor #3440 Add a handful of integration tests (BackEndTea)
+* minor #3444 IntegrationTest - ensure tests in priority dir are priority tests indeed (keradus)
+* minor #3494 Add missing PHPDoc param type (ntzm)
+* minor #3495 Swap @var type and element (ntzm)
+* minor #3498 NoUnusedImportsFixer - fix deprecation (keradus)
+
+Changelog for v2.2.14
+---------------------
+
+* bug #3298 DiffConsoleFormatter - fix output escaping. (SpacePossum)
+* bug #3337 BracesFixer: nowdoc bug on template files (Slamdunk)
+* bug #3349 Fix stdin handling and add tests for it (keradus)
+* bug #3359 BracesFixer - handle comment for content outside of given block (keradus)
+* bug #3415 FileFilterIterator - input checks and utests (SpacePossum, keradus)
+* bug #3429 Fix archive analysing (keradus)
+* minor #3137 PHPUnit - use common base class (keradus)
+* minor #3342 PhpUnitDedicateAssertFixer - Remove unexistent method is_boolean (carusogabriel)
+* minor #3345 StdinFileInfo - fix `__toString` (keradus)
+* minor #3346 StdinFileInfo - drop getContents (keradus)
+* minor #3347 DX: reapply newest CS (keradus)
+* minor #3365 COOKBOOK-FIXERS.md - update to provide definition instead of description (keradus)
+* minor #3370 AbstractFixer - FQCN in in exceptions (Slamdunk)
+* minor #3372 ProjectCodeTest - fix comment (keradus)
+* minor #3402 Always provide delimiter to `preg_quote` calls (ntzm)
+* minor #3403 Remove unused import (ntzm)
+* minor #3405 Fix `fopen` mode (ntzm)
+* minor #3408 Improving fixers descriptions (kubawerlos)
+* minor #3409 move itests from misc to priority (keradus)
+* minor #3411 Better type hinting for AbstractFixerTestCase::$fixer (kubawerlos)
+* minor #3412 Convert `strtolower` inside `strpos` to just `stripos` (ntzm)
+* minor #3425 FixerFactoryTest - test that priority pair fixers have itest (keradus, SpacePossum)
+* minor #3427 ConfigurationResolver: fix @return annotation (Slamdunk)
+
+Changelog for v2.2.13
+---------------------
+
+* bug #3281 SelfAccessorFixer - stop modifying traits (kubawerlos)
+* minor #3195 Add self-update command test (julienfalque)
+* minor #3292 PHPUnit - set memory limit (veewee)
+* minor #3306 Token - better input validation (keradus)
+
+Changelog for v2.2.12
+---------------------
+
+* bug #3173 SimplifiedNullReturnFixer - handle nullable return types (Slamdunk)
+* bug #3272 PhpdocTrimFixer - unicode support (SpacePossum)
+
+Changelog for v2.2.11
+---------------------
+
+* bug #3225 PhpdocTrimFixer - Fix handling of lines without leading asterisk (julienfalque)
+* bug #3262 ToolInfo - support installation by branch as well (keradus)
+* bug #3266 PhpUnitConstructFixer - multiple asserts bug (kubawerlos)
+* minor #3239 Improve contributing guide and issue template (julienfalque)
+* minor #3246 Make ToolInfo methods non-static (julienfalque)
+* minor #3250 Travis: fail early, spare resources, save the Earth (Slamdunk, keradus)
+* minor #3251 Create Title for config file docs section (IanEdington)
+* minor #3254 AutoReview/FixerFactoryTest::testFixersPriority: verbose assertion message (Slamdunk)
+
+Changelog for v2.2.10
+---------------------
+
+* bug #3199 TokensAnalyzer - getClassyElements (SpacePossum)
+* bug #3208 BracesFixer - Fix for instantiation in control structures (julienfalque, SpacePossum)
+* bug #3215 BinaryOperatorSpacesFixer - Fix spaces around multiple exception catching (|) (ntzm)
+* bug #3216 AbstractLinesBeforeNamespaceFixer - add min. and max. option, not only single target count (SpacePossum)
+* bug #3217 TokenizerLinter - fix lack of linting when code is cached (SpacePossum, keradus)
+* minor #3200 Skip slow test when Xdebug is loaded (julienfalque)
+* minor #3219 Normalise references to GitHub in docs (ntzm)
+* minor #3226 Remove unused imports (ntzm)
+* minor #3231 Fix typos (ntzm)
+* minor #3234 Simplify Cache\Signature::equals (ntzm)
+* minor #3237 UnconfigurableFixer - use only LF (keradus)
+* minor #3238 AbstractFixerTest - fix @cover annotation (keradus)
+
+Changelog for v2.2.9
+--------------------
+
+* bug #3062 BraceClassInstantiationTransformer - Fix instantiation inside method call braces case (julienfalque, keradus)
+* bug #3083 SingleBlankLineBeforeNamespaceFixer - Fix handling namespace right after opening tag (mlocati)
+* bug #3109 SwitchCaseSemicolonToColonFixer - Fix bug with nested constructs (SpacePossum)
+* bug #3123 Cache - File permissions (SpacePossum)
+* bug #3172 IndentationTypeFixer - do not touch whitespace that is not indentation (SpacePossum)
+* bug #3176 NoMultilineWhitespaceBeforeSemicolonsFixer - SpaceAfterSemicolonFixer - priority fix (SpacePossum)
+* bug #3193 TokensAnalyzer::getClassyElements - sort result before returning (SpacePossum)
+* bug #3196 SelfUpdateCommand - fix exit status when can't determine newest version (julienfalque)
+* minor #3107 ConfigurationResolver - improve error message when rule is not found (SpacePossum)
+* minor #3113 Add WordMatcher (keradus)
+* minor #3133 Unify Reporter tests (keradus)
+* minor #3134 Allow Symfony 4 (keradus, garak)
+* minor #3136 PHPUnit - call hooks from parent class as well (keradus)
+* minor #3145 misc - Typo (localheinz)
+* minor #3150 Fix CircleCI (julienfalque)
+* minor #3151 Update gitattributes to ignore next file (keradus)
+* minor #3156 Update php-coveralls (keradus)
+* minor #3166 README - add link to new gitter channel. (SpacePossum)
+* minor #3174 Update UPGRADE.md (vitek-rostislav)
+* minor #3180 Fix usage of static variables (kubawerlos)
+* minor #3184 Code grooming - sort content of arrays (keradus)
+* minor #3191 Travis - add nightly build to allow_failures due to Travis issues (keradus)
+* minor #3197 DX groom CS (keradus)
+
+Changelog for v2.2.8
+--------------------
+
+* bug #3052 Fix false positive warning about paths overridden by provided as command arguments (kubawerlos)
+* bug #3058 IsNullFixer - fix whitespace handling (roukmoute)
+* bug #3072 IsNullFixer - fix non_yoda_style edge case (keradus)
+* bug #3088 Drop dedicated Phar stub (keradus)
+* bug #3100 NativeFunctionInvocationFixer - Fix test if previous token is already namespace separator (SpacePossum)
+* bug #3104 DoctrineAnnotationIndentationFixer - Fix str_repeat() error (julienfalque)
+* minor #3038 Support PHP 7.2 (SpacePossum, keradus)
+* minor #3064 Fix couple of typos (KKSzymanowski)
+* minor #3078 ConfigurationResolver - hide context while including config file (keradus)
+* minor #3080 Direct function call instead of by string (kubawerlos)
+* minor #3085 CiIntegrationTest - skip when no git is available (keradus)
+* minor #3087 phar-stub.php - allow PHP 7.2 (keradus)
+
+Changelog for v2.2.7
+--------------------
+
+* bug #3002 Bugfix braces (mnabialek)
+* bug #3010 Fix handling of Github releases (julienfalque, keradus)
+* bug #3015 Fix exception arguments (julienfalque)
+* bug #3016 Verify phar file (keradus)
+* bug #3021 Risky rules cleanup (kubawerlos)
+* bug #3023 RandomApiMigrationFixer - "rand();" to "random_int(0, getrandmax());" fixing (SpacePossum)
+* bug #3024 ConfigurationResolver - Handle empty "rules" value (SpacePossum, keradus)
+* bug #3031 IndentationTypeFixer - fix handling tabs in indented comments (keradus)
+* minor #2999 Notice when paths from config file are overridden by command arguments (julienfalque, keradus)
+* minor #3007 Add PHP 7.2 to Travis build matrix (Jean85)
+* minor #3009 CiIntegrationTest - run local (SpacePossum)
+* minor #3013 Adjust phpunit configuration (localheinz)
+* minor #3017 Fix: Risky tests (localheinz)
+* minor #3018 Fix: Make sure that data providers are named correctly (localheinz, keradus)
+* minor #3032 .php_cs.dist - handling UnexpectedValueException (keradus)
+* minor #3034 Follow newest CS (keradus)
+* minor #3036 Drop not existing Standalone group from PHPUnit configuration and duplicated internal tags (keradus)
+* minor #3042 Update gitter address (keradus)
+
+Changelog for v2.2.6
+--------------------
+
+* bug #2925 Improve CI integration suggestion (julienfalque)
+* bug #2928 TokensAnalyzer::getClassyElements - Anonymous class support (SpacePossum)
+* bug #2931 Psr0Fixer, Psr4Fixer - ignore "new class" syntax (dg, keradus)
+* bug #2934 Config - fix handling rule without value (keradus, SpacePossum)
+* bug #2939 NoUnusedImportsFixer - Fix extra blank line (julienfalque)
+* bug #2941 PHP 7.2 - Group imports with trailing comma support (SpacePossum, julienfalque)
+* bug #2987 Fix incorrect indentation of comments in `braces` fixer (rob006)
+* minor #2927 WhiteSpaceConfig - update message copy and more strict tests (SpacePossum, keradus)
+* minor #2930 Trigger website build (keradus)
+* minor #2932 Integrate CircleCI (keradus, aidantwoods)
+* minor #2933 ProcessLinterTest - Ensure Windows test only runs on Windows, add a Mac test execution (aidantwoods)
+* minor #2935 special handling of fabbot.io service if it's using too old PHP CS Fixer version (keradus)
+* minor #2937 Travis: execute 5.3 job on precise (keradus)
+* minor #2938 Tests fix configuration of project (SpacePossum, keradus)
+* minor #2943 FunctionToConstantFixer - test with diff. arguments than fixable (SpacePossum)
+* minor #2946 Detect extra old installations (keradus)
+* minor #2947 Test suggested CI integration (keradus)
+* minor #2951 AccessibleObject - remove most of usage (keradus)
+* minor #2969 Shrink down AccessibleObject usage (keradus)
+* minor #2982 TrailingCommaInMultilineArrayFixer - simplify isMultilineArray condition (TomasVotruba)
+
+Changelog for v2.2.5
+--------------------
+
+* bug #2807 NoUselessElseFixer - Fix detection of conditional block (SpacePossum)
+* bug #2809 Phar release - fix readme generation (SpacePossum, keradus)
+* bug #2827 MethodArgumentSpaceFixer - Always remove trailing spaces (julienfalque)
+* bug #2835 SelfAcessorFixer - class property fix (mnabialek)
+* bug #2848 PhpdocIndentFixer - fix edge case with inline phpdoc (keradus)
+* bug #2849 BracesFixer - Fix indentation issues with comments (julienfalque)
+* bug #2851 Tokens - ensureWhitespaceAtIndex (GrahamCampbell, SpacePossum)
+* bug #2854 NoLeadingImportSlashFixer - Removing leading slash from import even when in global space (kubawerlos)
+* bug #2858 Support generic types (keradus)
+* bug #2869 Fix handling required configuration (keradus)
+* bug #2881 NoUnusedImportsFixer - Bug when trying to insert empty token (GrahamCampbell, keradus)
+* bug #2882 DocBlock\Annotation - Fix parsing of collections with multiple key types (julienfalque)
+* bug #2886 NoSpacesInsideParenthesisFixer - Do not remove whitespace if next token is comment (SpacePossum)
+* bug #2888 SingleImportPerStatementFixer - Add support for function and const (SpacePossum)
+* bug #2901 Add missing files to archive files (keradus)
+* bug #2914 HeredocToNowdocFixer - works with CRLF line ending (dg)
+* bug #2920 RuleSet - Update deprecated configuration of fixers (SpacePossum, keradus)
+* minor #1531 Update docs for few generic types (keradus)
+* minor #2793 COOKBOOK-FIXERS.md - update to current version, fix links (keradus)
+* minor #2812 ProcessLinter - compatibility with Symfony 3.3 (keradus)
+* minor #2816 Tokenizer - better docs and validation (keradus)
+* minor #2817 Tokenizer - use future-compatible interface (keradus)
+* minor #2819 Fix benchmark (keradus)
+* minor #2824 code grooming (keradus)
+* minor #2826 Exceptions - provide utests (localheinz)
+* minor #2828 Enhancement: Reference phpunit.xsd from phpunit.xml.dist (localheinz)
+* minor #2830 Differs - add tests (localheinz)
+* minor #2832 Fix: Use all the columns (localheinz)
+* minor #2833 Doctrine\Annotation\Token - provide utests (localheinz)
+* minor #2839 Use PHP 7.2 polyfill instead of xml one (keradus)
+* minor #2842 Move null to first position in PHPDoc types (julienfalque)
+* minor #2850 ReadmeCommandTest - Prevent diff output (julienfalque)
+* minor #2859 Fixed typo and dead code removal (GrahamCampbell)
+* minor #2863 FileSpecificCodeSample - add tests (localheinz)
+* minor #2864 WhitespacesAwareFixerInterface clean up (Slamdunk)
+* minor #2865 AutoReview\FixerTest - test configuration samples (SpacePossum, keradus)
+* minor #2867 VersionSpecification - Fix copy-paste typo (SpacePossum)
+* minor #2874 LineTest - fix typo (keradus)
+* minor #2875 HelpCommand - recursive layout fix (SpacePossum)
+* minor #2883 DescribeCommand - Show which sample uses the default configuration (SpacePossum)
+* minor #2887 Housekeeping - Strict whitespace checks (SpacePossum)
+* minor #2895 ProjectCodeTest - check that classes in no-tests exception exist (keradus)
+* minor #2896 Move testing related classes from src to tests (keradus)
+* minor #2904 Reapply CS (keradus)
+* minor #2910 PhpdocAnnotationWithoutDotFixer - Restrict lowercasing (oschwald)
+* minor #2913 Tests - tweaks (SpacePossum, keradus)
+* minor #2916 FixerFactory - drop return in sortFixers(), never used (TomasVotruba)
+
+Changelog for v2.2.4
+--------------------
+
+* bug #2682 DoctrineAnnotationIndentationFixer - fix handling nested annotations (edhgoose, julienfalque)
+* bug #2700 Fix Doctrine Annotation end detection (julienfalque)
+* bug #2715 OrderedImportsFixer - handle indented groups (pilgerone)
+* bug #2732 HeaderCommentFixer - fix handling blank lines (s7b4)
+* bug #2745 Fix Doctrine Annotation newlines (julienfalque)
+* bug #2752 FixCommand - fix typo in warning message (mnapoli)
+* bug #2757 GeckoPHPUnit is not dev dependency (keradus)
+* bug #2759 Update gitattributes (SpacePossum)
+* bug #2763 Fix describe command with PSR-0 fixer (julienfalque)
+* bug #2768 Tokens::ensureWhitespaceAtIndex - clean up comment check, add check for T_OPEN (SpacePossum)
+* bug #2783 Tokens::ensureWhitespaceAtIndex - Fix handling line endings (SpacePossum)
+* minor #2663 Use colors for keywords in commands output (julienfalque, keradus)
+* minor #2706 Update README (SpacePossum)
+* minor #2714 README.rst - fix wrong value in example (mleko)
+* minor #2721 Update phpstorm article link to a fresh blog post (valeryan)
+* minor #2727 PHPUnit - use speedtrap (keradus)
+* minor #2728 SelfUpdateCommand - verify that it's possible to replace current file (keradus)
+* minor #2729 DescribeCommand - add decorated output test (julienfalque)
+* minor #2731 BracesFixer - properly pass config in utest dataProvider (keradus)
+* minor #2738 Upgrade tests to use new, namespaced PHPUnit TestCase class (keradus)
+* minor #2743 Fixing example and description for GeneralPhpdocAnnotationRemoveFixer (kubawerlos)
+* minor #2744 AbstractDoctrineAnnotationFixerTestCase - split fixers test cases (julienfalque)
+* minor #2755 Fix compatibility with PHPUnit 5.4.x (keradus)
+* minor #2758 Readme - improve CI integration guidelines (keradus)
+* minor #2769 Psr0Fixer - remove duplicated example (julienfalque)
+* minor #2775 NoExtraConsecutiveBlankLinesFixer - remove duplicate code sample. (SpacePossum)
+* minor #2778 AutoReview - watch that code samples are unique (keradus)
+* minor #2787 Add warnings about missing dom ext and require json ext (keradus)
+* minor #2792 Use composer-require-checker (keradus)
+* minor #2796 Update .gitattributes (SpacePossum)
+* minor #2800 PhpdocTypesFixerTest - Fix typo in covers annotation (SpacePossum)
+
+Changelog for v2.2.3
+--------------------
+
+* bug #2724 Revert #2554 Add short diff. output format (keradus)
+
+Changelog for v2.2.2
+--------------------
+
+Warning, this release breaks BC due to introduction of:
+* minor #2554 Add short diff. output format (SpacePossum, keradus)
+That PR was reverted in v2.2.3, which should be used instead of v2.2.2.
+
+* bug #2545 RuleSet - change resolvement (SpacePossum)
+* bug #2686 Commands readme and describe - fix rare casing when not displaying some possible options of configuration (keradus)
+* bug #2711 FixCommand - fix diff optional value handling (keradus)
+* minor #2688 AppVeyor - Remove github oauth (keradus)
+* minor #2703 Clean ups - No mixed annotations (SpacePossum)
+* minor #2704 Create PHP70Migration:risky ruleset (keradus)
+* minor #2707 Deprecate other than "yes" or "no" for input options (SpacePossum)
+* minor #2709 code grooming (keradus)
+* minor #2710 Travis - run more rules on TASK_SCA (keradus)
+
+Changelog for v2.2.1
+--------------------
+
+* bug #2621 Tokenizer - fix edge cases with empty code, registered found tokens and code hash (SpacePossum, keradus)
+* bug #2674 SemicolonAfterInstructionFixer - Fix case where block ends with an opening curly brace (ntzm)
+* bug #2675 ProcessOutputTest - update tests to pass on newest Symfony components under Windows (keradus)
+* minor #2651 Fix UPGRADE.md table syntax so it works in GitHub (ntzm, keradus)
+* minor #2665 Travis - Improve trailing spaces detection (julienfalque)
+* minor #2666 TransformersTest - move test to auto-review group (keradus)
+* minor #2668 add covers annotation (keradus)
+* minor #2669 TokensTest - grooming (SpacePossum)
+* minor #2670 AbstractFixer: use applyFix instead of fix (Slamdunk)
+* minor #2677 README: Correct progressbar option support (Laurens St�tzel)
+
+Changelog for v2.2.0
+--------------------
+
+* bug #2640 NoExtraConsecutiveBlankLinesFixer - Fix single indent characters not working (ntzm)
+* feature #2220 Doctrine annotation fixers (julienfalque)
+* feature #2431 MethodArgumentSpaceFixer: allow to retain multiple spaces after comma (Slamdunk)
+* feature #2459 BracesFixer - Add option for keeping opening brackets on the same line (jtojnar, SpacePossum)
+* feature #2486 Add FunctionToConstantFixer (SpacePossum, keradus)
+* feature #2505 FunctionDeclarationFixer - Make space after anonymous function configurable (jtojnar, keradus)
+* feature #2509 FullOpeningTagFixer - Ensure opening PHP tag is lowercase (jtojnar)
+* feature #2532 FixCommand - add stop-on-violation option (keradus)
+* feature #2591 Improve process output (julienfalque)
+* feature #2603 Add InvisibleSymbols Fixer (ivan1986, keradus)
+* feature #2642 Add MagicConstantCasingFixer (ntzm)
+* feature #2657 PhpdocToCommentFixer - Allow phpdoc for language constructs (ceeram, SpacePossum)
+* minor #2500 Configuration resolver (julienfalque, SpacePossum, keradus)
+* minor #2566 Show more details on errors and exceptions. (SpacePossum, julienfalque)
+* minor #2597 HHVM - bump required version to 3.18 (keradus)
+* minor #2606 FixCommand - fix missing comment close tag (keradus)
+* minor #2623 OrderedClassElementsFixer - remove dead code (SpacePossum)
+* minor #2625 Update Symfony and Symfony:risky rulesets (keradus)
+* minor #2626 TernaryToNullCoalescingFixer - adjust ruleset membership and description (keradus)
+* minor #2635 ProjectCodeTest - watch that all classes have dedicated tests (keradus)
+* minor #2647 DescribeCommandTest - remove deprecated code usage (julienfalque)
+* minor #2648 Move non-code covering tests to AutoReview subnamespace (keradus)
+* minor #2652 NoSpacesAroundOffsetFixerTest - fix deprecation (keradus)
+* minor #2656 Code grooming (keradus)
+* minor #2659 Travis - speed up preparation for phar building (keradus)
+* minor #2660 Fixed typo in suggest for ext-mbstring (pascal-hofmann)
+* minor #2661 NonPrintableCharacterFixer - include into Symfony:risky ruleset (keradus)
+
+Changelog for v2.1.3
+--------------------
+
+* bug #2358 Cache - Deal with signature encoding (keradus, GrahamCampbell)
+* bug #2475 Add shorthand array destructing support (SpacePossum, keradus)
+* bug #2595 NoUnusedImportsFixer - Fix import usage detection with properties (julienfalque)
+* bug #2605 PhpdocAddMissingParamAnnotationFixer, PhpdocOrderFixer - fix priority issue (SpacePossum)
+* bug #2607 Fixers - better comments handling (SpacePossum)
+* bug #2612 BracesFixer - Fix early bracket close for do-while loop inside an if without brackets (felixgomez)
+* bug #2614 Ensure that '*Fixer::fix()' won't crash when running on non-candidate collection (keradus)
+* bug #2630 HeaderCommentFixer - Fix trailing whitespace not removed after <?php (julienfalque)
+* bug #2637 ToolInfo - use static dir check for composer discovery (Slamdunk)
+* bug #2639 SemicolonAfterInstructionFixer - Handle alternative syntax (SpacePossum)
+* bug #2645 HHVM: handle T_HH_ERROR (keradus)
+* bug #2653 IsNullFixer - fix edge case (localheinz, kalessil)
+* bug #2654 PhpdocAddMissingParamAnnotationFixer - handle one-line docblocks (keradus)
+* minor #2594 Travis - generate coverage report at 7.1 and clean up build matrix (keradus)
+* minor #2613 HeaderCommentFixer - add missing case for exception raising (keradus)
+* minor #2615 Add DescribeCommand test (julienfalque)
+* minor #2616 Exclude more tests in phar version (keradus)
+* minor #2618 Update README.rst (mhitza)
+* minor #2620 Finder - Remove `*.twig` as default (SpacePossum)
+* minor #2641 Cookbook - remove information about levels (keradus)
+* minor #2644 DescribeCommandTest - fix test execution on decorated console (keradus)
+* minor #2655 AppVeyor - Cache Composer Installation (julienfalque)
+
+Changelog for v2.1.2
+--------------------
+
+* bug #2580 NoSpacesAfterFunctionNameFixer - Fix after dynamic call (SpacePossum, keradus)
+* bug #2586 NoUnusedImportsFixerTest - handle FQCN import (keradus)
+* bug #2587 NoClosingTagFixerTest - handle file without operations (keradus, SpacePossum)
+* minor #2552 Initial compatibility with PHP 7.2-DEV (keradus)
+* minor #2582 Improve AppVeyor and Travis CI build time (julienfalque)
+* minor #2584 NoUnreachableDefaultArgumentValueFixer - fix typo (chadburrus)
+* minor #2593 PhpUnitFqcnAnnotationFixer - move test to proper namespace (keradus)
+* minor #2596 AppVeyor - update PHP versions (keradus)
+
+Changelog for v2.1.1
+--------------------
+
+* bug #2547 NoUnneededControlParenthesesFixer - Handle T_COALESCE in clone (keksa)
+* bug #2557 BracesFixer - Better comments handling (SpacePossum)
+* bug #2558 require symfony/polyfill-xml (SpacePossum)
+* bug #2560 PhpdocNoAliasTagFixer - Fix circular replacements detection (julienfalque)
+* bug #2567 Filename with spaces usage (jaymecd)
+* bug #2572 NoUnreachableDefaultArgumentValueFixer - Mark as risky (SpacePossum)
+* minor #2533 AppVeyor - adjust phpunit version (keradus)
+* minor #2535 Make .gitignore entries more specific (julienfalque)
+* minor #2541 README.rst - provide download link for latest version (keradus)
+* minor #2562 Add schema.json (keradus)
+* minor #2563 Add deprecation notices tests (julienfalque)
+* minor #2564 Add rules configuration by passing json encode config by CLI (SpacePossum)
+* minor #2569 Make symfony/phpunit-bridge a dev dependency only (julienfalque)
+* minor #2574 Add xml.xsd (keradus)
+
+Changelog for v2.1.0
+--------------------
+
+* feature #2124 Add TernaryToNullCoalescingFixer (Slamdunk, SpacePossum)
+* feature #2280 Configurable OrderedImportsFixer (DarkaOnLine)
+* feature #2351 Enhancement: Allow to configure return_type_declaration rule (localheinz)
+* feature #2359 Add PhpdocNoUselessInheritdocFixer (SpacePossum, keradus)
+* feature #2414 Add PhpdocReturnSelfReferenceFixer (SpacePossum)
+* feature #2415 Add IsNullFixer (kalessil, keradus)
+* feature #2421 BracesFixer - Add allow_single_line_closure configuration (keradus)
+* feature #2461 PhpdocNoUselessInheritdocFixer - support multiline docblock (keradus)
+* feature #2462 Add NativeFunctionInvocationFixer (localheinz, keradus, Slamdunk)
+* feature #2478 DeclareEqualNormalizeFixer - Add config option (SpacePossum)
+* feature #2494 FixCommand - Support rules with params (ptcong, keradus)
+* minor #2452 Provide rules definitions (keradus)
+* minor #2460 RuleSet - extend Symfony (keradus)
+* minor #2483 DX: AbstractIntegrationTestCase does not use IntegrationCase::shouldCheckPriority, logic is now automated and method is now deprecated (keradus)
+* minor #2488 IsNullFixer - Fix bug when calling without params (SpacePossum)
+* minor #2519 remove trailing whitespace (keradus)
+
+Changelog for v2.0.1
+--------------------
+
+* bug #2357 Better handling of file name that is the same in multiple finder paths (keradus)
+* bug #2373 FunctionDeclarationFixer - Fix static anonymous functions (SpacePossum)
+* bug #2377 PhpdocSeparationFixer - Ignore incorrect PHPDoc (SpacePossum, keradus)
+* bug #2388 PhpdocAlignFixer - unicode characters support (SpacePossum)
+* bug #2399 HashToSlashCommentFixer - Fix edge cases (SpacePossum)
+* bug #2403 ClassDefinitionFixer - Anonymous classes format by PSR12 (SpacePossum)
+* bug #2408 SingleClassElementPerStatementFixer, PhpdocSeparationFixer - add missing WhitespacesAwareFixerInterface interface (keradus)
+* bug #2425 ClassKeywordRemoveFixer - Fix handling leading backslash and comments (SpacePossum)
+* bug #2430 PhpdocAlignFixer - Fix alignment of variadic params. (SpacePossum)
+* bug #2437 NoWhitespaceInBlankLineFixer - Fix more cases (SpacePossum)
+* bug #2444 MbStrFunctionsFixer - handle return reference in method declaration (SpacePossum)
+* bug #2449 PhpdocAlignFixer - don't crash poorly formatted phpdoc (GrahamCampbell)
+* bug #2477 BracesFixer - Do not remove white space inside declare statement (SpacePossum)
+* bug #2481 Fix priorities between declare_strict_types and blank_line_after_opening_tag (juliendufresne, keradus)
+* bug #2507 NoClosingTagFixer - Do not insert semicolon in comment (SpacePossum)
+* minor #2347 UPGRADE.md - Fix multi-row description (drAlberT, keradus)
+* minor #2352 Corrected method visibility (GrahamCampbell)
+* minor #2353 Fix: Typos (localheinz)
+* minor #2354 Enhancement: Allow to specify minimum and maximum PHP versions for code samples (localheinz)
+* minor #2356 Fixed spelling on "blank line" (GrahamCampbell)
+* minor #2361 ConfigurationResolver - Reject unknown rules (localheinz)
+* minor #2368 clean ups (SpacePossum, localheinz)
+* minor #2380 DescribeCommand - filter code samples and output note when none can be demonstrated (localheinz)
+* minor #2381 Tests - Do not use annotations for asserting exceptions (localheinz, keradus)
+* minor #2382 Consistently provide a default configuration field (localheinz)
+* minor #2383 update .php_cs.dist configuration (keradus)
+* minor #2386 PHP7.1 Integration test - Add features added in PHP7.1. (SpacePossum)
+* minor #2392 FixCommandHelp - fix typo (keradus)
+* minor #2393 Remove overcomplete tests (SpacePossum)
+* minor #2394 Update .gitattributes (SpacePossum)
+* minor #2395 NoEmptyCommentFixer - Fix typo (fritz-c)
+* minor #2396 MethodArgumentSpaceFixer - scope down endpoint (SpacePossum)
+* minor #2397 RuleSet - Check risky (SpacePossum, keradus)
+* minor #2400 Add Fixer descriptions (SpacePossum)
+* minor #2401 Fix UPGRADE.md (issei-m)
+* minor #2405 Transformers - Must be final (SpacePossum)
+* minor #2406 ProtectedToPrivateFixer - Use backticks for visibility in description (localheinz)
+* minor #2407 Add tests for not abusing interfaces (keradus)
+* minor #2410 DX: Keep packages sorted (localheinz)
+* minor #2412 Enhancement: Add more descriptions (localheinz)
+* minor #2413 Update Symfony ruleset (fabpot)
+* minor #2419 README.rst - use double backticks for code pieces in rule descriptions (keradus)
+* minor #2422 BracesFixer - cleanup code after introducing CT::T_FUNCTION_IMPORT (keradus)
+* minor #2426 .php_cs.dist - update local CS config (keradus)
+* minor #2428 SCA with Php Inspections (EA Extended) (kalessil)
+* minor #2433 AbstractFixerTestCase - give all the details available during catch (Slamdunk)
+* minor #2434 COOKBOOK-FIXERS.md - Replace reference to outdated class with current (greg0ire)
+* minor #2436 MethodArgumentSpaceFixer - Remove duplicate class name (greg0ire)
+* minor #2441 IndentationTypeFixer - Fix description and upgrade guide (SpacePossum)
+* minor #2443 AppVeyor - update configuration (keradus)
+* minor #2447 .php_cs.dist - update local CS config (keradus)
+* minor #2452 Provide rules definitions (keradus)
+* minor #2455 NoMultilineWhitespaceAroundDoubleArrowFixer - Add missing priority test (SpacePossum)
+* minor #2466 Provide rules definitions (keradus)
+* minor #2470 README.rst - explain the usage of "--path-mode" parameter (kalimatas)
+* minor #2474 Housekeeping (SpacePossum)
+* minor #2487 UPGRADE.md - Fix typo (SpacePossum)
+* minor #2493 FixCommand - Output warning message when both config and rules options are passed (SpacePossum)
+* minor #2496 DX: Travis - check for trailing spaces (keradus)
+* minor #2499 FileSpecificCodeSample - Specify class name relative to root namespace (localheinz, keradus)
+* minor #2506 SCA (SpacePossum)
+* minor #2515 Fix code indentation (keradus)
+* minor #2521 SCA trailing spces check - ouput lines with trailing white space (SpacePossum)
+* minor #2522 Fix docs and small code issues (keradus)
+
+Changelog for v2.0.0
+--------------------
+
+* bug #1001 MethodArgumentSpaceFixer - no need for multiple executions (keradus)
+* bug #1006 NewWithBracesFixer - fix by adding BraceClassInstantiationTransformer (sstok)
+* bug #1077 ConfigInterface - add missing methods (localheinz)
+* bug #1103 added missing keyword token (gharlan)
+* bug #1107 Added ImportTransformer (gharlan)
+* bug #1157 Prevent token collection corruption by fixers (keradus, stof)
+* bug #1256 Do not write the fixed output twice (SpacePossum)
+* bug #1405 Linter - fix ignoring input parameter for constructor (keradus)
+* bug #1414 Linter - fix escaping the php binary (GrahamCampbell, keradus)
+* bug #1606 Fixer - remove duplicate file_get_contents call (gharlan)
+* bug #1629 Fix linting test cases (gharlan)
+* bug #1800 ConfigurationResolver - Fix resolving intersection path (keradus)
+* bug #1809 NoMultilineWhitespaceBeforeSemicolonsFixer - Semicolon should not be moved into comment (SpacePossum)
+* bug #1838 BracesFixer - Removes line break (SpacePossum)
+* bug #1847 Runner - always cache files, not only when something is changed (gharlan)
+* bug #1852 ConfigurationResolver - disallow empty rule name (keradus)
+* bug #1855 FixCommand - fix passing NullLinter to Runner (keradus)
+* bug #1926 NoUselessElseFixer - fix wrong if handling (SpacePossum)
+* bug #1946 NoEmptyCommentFixer - Only remove complete empty comment blocks (SpacePossum)
+* bug #1965 AbstractPsrAutoloadingFixer - fix edge case of halting compiler for PHP 5.3 (keradus)
+* bug #1974 composer.json - fix dependencies for PHP 5.3.6 (keradus)
+* bug #2025 NoShortEchoTagFixer - adjust isCandidate check for hhvm (keradus)
+* bug #2039 NoExtraConsecutiveBlankLinesFixer - Fix curly brace open false positive (SpacePossum)
+* bug #2044 SingleClassElementPerStatementFixer - fix array handling (keradus)
+* bug #2063 ConfigurationResolver - passing non-existing path is ignored (keradus)
+* bug #2236 .gitattributes - fix ignoring tests during export (keradus)
+* bug #2241 XmlReporter - fix used getter (keradus)
+* bug #2283 FixCommand - Fix resolving format option (SpacePossum, keradus)
+* bug #2287 NoExtraConsecutiveBlankLinesFixer - fix bug that removes empty line already after scope end (keradus)
+* bug #2290 FixCommand - fix progress (keradus)
+* bug #2292 GeneralPhpdocAnnotation*Fixer::configure - add missing return (keradus)
+* bug #2305 ProcessLinter - fix running under phpdbg (keradus)
+* feature #1076 Enhancement: Allow to specify cache file (localheinz, keradus)
+* feature #1088 JoinFunctionFixer -> AliasFunctionsFixer (kalessil)
+* feature #1275 Added PhpdocInlineTagFixer (SpacePossum, keradus)
+* feature #1292 Added MethodSeparationFixer (SpacePossum)
+* feature #1383 Introduce rules and sets (keradus)
+* feature #1416 Mark fixers as risky (keradus)
+* feature #1440 Made AbstractFixerTestCase and AbstractIntegrationTestCase public (keradus)
+* feature #1489 Added Psr4Fixer (GrahamCampbell)
+* feature #1497 ExtraEmptyLinesFixer - allow to remove empty blank lines after configured tags (SpacePossum)
+* feature #1529 Added PhpdocPropertyFixer, refactored Tag and Annotation (GrahamCampbell)
+* feature #1628 Added OrderedClassElementsFixer (gharlan)
+* feature #1742 path argument is used to create an intersection with existing finder (keradus, gharlan)
+* feature #1779 Added GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocAnnotationRenameFixer (keradus)
+* feature #1811 Added NoSpacesInsideOfssetFixer (phansys)
+* feature #1819 Added DirConstantFixer, ModernizeTypesCastingFixer, RandomApiMigrationFixer (kalessil, SpacePossum, keradus)
+* feature #1825 Added junit format (ekho)
+* feature #1862 FixerFactory - Do not allow conflicting fixers (SpacePossum)
+* feature #1888 Cache refactoring, better cache handling in dry-run mode (localheinz)
+* feature #1889 Added SingleClassElementPerStatementFixer (phansys, SpacePossum)
+* feature #1903 FixCommand - allow to pass multiple path argument (keradus)
+* feature #1913 Introduce path-mode CLI option (keradus)
+* feature #1949 Added DeclareStrictTypesFixer, introduce options for HeaderCommentFixer (Seldaek, SpacePossum, keradus)
+* feature #1955 Introduce CT_ARRAY_INDEX_CURLY_BRACE_OPEN and CT_ARRAY_INDEX_CURLY_BRACE_CLOSE (keradus)
+* feature #1958 Added NormalizeIndexBraceFixer (keradus)
+* feature #2069 Add semicolon after instruction fixer (SpacePossum)
+* feature #2089 Add `no_spaces_around_offset` fixer (phansys)
+* feature #2179 BinaryOperatorSpacesFixer - add (un)align configuration options (SpacePossum)
+* feature #2192 Add PowToExponentiationFixer (SpacePossum, keradus)
+* feature #2207 Added ReturnTypeDeclarationFixer (keradus)
+* feature #2213 VisibilityRequiredFixer - Add support for class const visibility added in PHP7.1. (SpacePossum)
+* feature #2221 Add support for user-defined whitespaces (keradus)
+* feature #2244 Config cleanup (keradus, SpacePossum)
+* feature #2247 PhpdocAnnotationWithoutDotFixer - support more cases (keradus)
+* feature #2289 Add PhpdocAddMissingParamAnnotationFixer (keradus)
+* feature #2331 Add DescribeCommand (keradus, SpacePossum)
+* feature #2332 New colours of diff on console (keradus)
+* feature #829 add support for .php_cs.dist file (keradus)
+* feature #998 MethodArgumentSpaceFixer - enhance, now only one space after comma (trilopin, keradus)
+* minor #1007 Simplify Transformers (keradus)
+* minor #1050 Make Config's setDir() fluent like the rest of methods (gonzaloserrano)
+* minor #1062 Added NamespaceOperatorTransformer (gharlan)
+* minor #1078 Exit status should be 0 if there are no errors (gharlan)
+* minor #1101 CS: fix project itself (localheinz)
+* minor #1102 Enhancement: List errors occurred before, during and after fixing (localheinz)
+* minor #1105 Token::isStructureAlternativeEnd - remove unused method (keradus)
+* minor #1106 readme grooming (SpacePossum, keradus)
+* minor #1115 Fixer - simplify flow (keradus)
+* minor #1118 Process output refactor (SpacePossum)
+* minor #1132 Linter - public methods should be first (keradus)
+* minor #1134 Token::isWhitespace - simplify interface (keradus)
+* minor #1140 FixerInterface - check if fixer should be applied by isCandidate method (keradus)
+* minor #1146 Linter - detect executable (keradus)
+* minor #1156 deleted old ConfigurationResolver class (keradus)
+* minor #1160 Grammar fix to README (Falkirks)
+* minor #1174 DefaultFinder - boost performance by not filtering when files array is empty (keradus)
+* minor #1179 Exit with non-zero if invalid files were detected prior to fixing (localheinz)
+* minor #1186 Finder - do not search for .xml and .yml files (keradus)
+* minor #1206 BracesFixer::getClassyTokens - remove duplicated method (keradus)
+* minor #1222 Made fixers final (GrahamCampbell)
+* minor #1229 Tokens - Fix PHPDoc (SpacePossum)
+* minor #1241 More details on exceptions. (SpacePossum)
+* minor #1263 Made internal classes final (GrahamCampbell)
+* minor #1272 Readme - Add spaces around PHP-CS-Fixer headers (Soullivaneuh)
+* minor #1283 Error - Fixed type phpdoc (GrahamCampbell)
+* minor #1284 Token - Fix PHPDoc (SpacePossum)
+* minor #1314 Added missing internal annotations (keradus)
+* minor #1329 Psr0Fixer - move to contrib level (gharlan)
+* minor #1340 Clean ups (SpacePossum)
+* minor #1341 Linter - throw exception when write fails (SpacePossum)
+* minor #1348 Linter - Prefer error output when throwing a linting exception (GrahamCampbell)
+* minor #1350 Add "phpt" as a valid extension (henriquemoody)
+* minor #1376 Add time and memory to XML report (junichi11)
+* minor #1387 Made all test classes final (keradus)
+* minor #1388 Made all tests internal (keradus)
+* minor #1390 Added ProjectCodeTest that tests if all classes inside tests are internal and final or abstract (keradus)
+* minor #1391 Fixer::getLevelAsString is no longer static (keradus)
+* minor #1392 Add report to XML report as the root node (junichi11)
+* minor #1394 Stop mixing level from config file and fixers from CLI arg when one of fixers has dash (keradus)
+* minor #1426 MethodSeparationFixer - Fix spacing around comments (SpacePossum, keradus)
+* minor #1432 Fixer check on factory (Soullivaneuh)
+* minor #1434 Add Test\AccessibleObject class (keradus)
+* minor #1442 FixerFactory - disallow to register multiple fixers with same name (keradus)
+* minor #1477 rename PhpdocShortDescriptionFixer into PhpdocSummaryFixer (keradus)
+* minor #1481 Fix running the tests (keradus)
+* minor #1482 move AbstractTransformerTestBase class outside Tests dir (keradus)
+* minor #1530 Added missing internal annotation (GrahamCampbell)
+* minor #1534 Clean ups (SpacePossum)
+* minor #1536 Typo fix (fabpot)
+* minor #1555 Fixed indentation in composer.json (GrahamCampbell)
+* minor #1558 [2.0] Cleanup the tags property in the abstract phpdoc types fixer (GrahamCampbell)
+* minor #1567 PrintToEchoFixer - add to symfony rule set (gharlan)
+* minor #1607 performance improvement (gharlan)
+* minor #1621 Switch to PSR-4 (keradus)
+* minor #1631 Configuration exceptions exception cases on master. (SpacePossum)
+* minor #1646 Remove non-default Config/Finder classes (keradus)
+* minor #1648 Fixer - avoid extra calls to getFileRelativePathname (GrahamCampbell)
+* minor #1649 Consider the php version when caching (GrahamCampbell)
+* minor #1652 Rename namespace "Symfony\CS" to "PhpCsFixer" (gharlan)
+* minor #1666 new Runner, ProcessOutputInterface, DifferInterface and ResultInterface (keradus)
+* minor #1674 Config - add addCustomFixers method (PedroTroller)
+* minor #1677 Enhance tests (keradus)
+* minor #1695 Rename Fixers (keradus)
+* minor #1702 Upgrade guide (keradus)
+* minor #1707 ExtraEmptyLinesFixer - fix configure docs (keradus)
+* minor #1712 NoExtraConsecutiveBlankLinesFixer - Remove blankline after curly brace open (SpacePossum)
+* minor #1718 CLI: rename --config-file argument (keradus)
+* minor #1722 Renamed not_operators_with_space to not_operator_with_space (GrahamCampbell)
+* minor #1728 PhpdocNoSimplifiedNullReturnFixer - rename back to PhpdocNoEmptyReturnFixer (keradus)
+* minor #1729 Renamed whitespacy_lines to no_whitespace_in_blank_lines (GrahamCampbell)
+* minor #1731 FixCommand - value for config option is required (keradus)
+* minor #1732 move fixer classes from level subdirs to thematic subdirs (gharlan, keradus)
+* minor #1733 ConfigurationResolver - look for .php_cs file in cwd as well (keradus)
+* minor #1737 RuleSet/FixerFactory - sort arrays content (keradus)
+* minor #1751 FixerInterface::configure - method should always override configuration, not patch it (keradus)
+* minor #1752 Remove unused code (keradus)
+* minor #1756 Finder - clean up code (keradus)
+* minor #1757 Psr0Fixer - change way of configuring the fixer (keradus)
+* minor #1762 Remove ConfigInterface::getDir, ConfigInterface::setDir, Finder::setDir and whole FinderInterface (keradus)
+* minor #1764 Remove ConfigAwareInterface (keradus)
+* minor #1780 AbstractFixer - throw error on configuring non-configurable Fixer (keradus)
+* minor #1782 rename fixers (gharlan)
+* minor #1815 NoSpacesInsideParenthesisFixer - simplify implementation (keradus)
+* minor #1821 Ensure that PhpUnitDedicateAssertFixer runs after NoAliasFunctionsFixer, clean up NoEmptyCommentFixer (SpacePossum)
+* minor #1824 Reporting extracted to separate classes (ekho, keradus, SpacePossum)
+* minor #1826 Fixer - remove measuring fixing time per file (keradus)
+* minor #1843 FileFilterIterator - add missing import (GrahamCampbell)
+* minor #1845 FileCacheManager - Allow linting to determine the cache state too (GrahamCampbell)
+* minor #1846 FileFilterIterator - Corrected an iterator typehint (GrahamCampbell)
+* minor #1848 DocBlock - Remove some old unused phpdoc tags (GrahamCampbell)
+* minor #1856 NoDuplicateSemicolonsFixer - Remove overcomplete fixer (SpacePossum)
+* minor #1861 Fix: Ofsset should be Offset (localheinz)
+* minor #1867 Print non-report output to stdErr (SpacePossum, keradus)
+* minor #1873 Enhancement: Show path to cache file if it exists (localheinz)
+* minor #1875 renamed Composer package (fabpot)
+* minor #1882 Runner - Handle throwables too (GrahamCampbell)
+* minor #1886 PhpdocScalarFixer - Fix lowercase str to string too (GrahamCampbell)
+* minor #1940 README.rst - update CI example (keradus)
+* minor #1947 SCA, CS, add more tests (SpacePossum, keradus)
+* minor #1954 tests - stop using deprecated method (sebastianbergmann)
+* minor #1962 TextDiffTest - tests should not produce cache file (keradus)
+* minor #1973 Introduce fast PHP7 based linter (keradus)
+* minor #1999 Runner - No need to determine relative file name twice (localheinz)
+* minor #2002 FileCacheManagerTest - Adjust name of test and variable (localheinz)
+* minor #2010 NoExtraConsecutiveBlankLinesFixer - SF rule set, add 'extra' (SpacePossum)
+* minor #2013 no_whitespace_in_blank_lines -> no_whitespace_in_blank_line (SpacePossum)
+* minor #2024 AbstractFixerTestCase - check if there is no duplicated Token instance inside Tokens collection (keradus)
+* minor #2031 COOKBOOK-FIXERS.md - update calling doTest method (keradus)
+* minor #2032 code grooming (keradus)
+* minor #2068 Code grooming (keradus)
+* minor #2073 DeclareStrictTypesFixer - Remove fix CS fix logic from fixer. (SpacePossum)
+* minor #2088 TokenizerLintingResult - expose line number of parsing error (keradus)
+* minor #2093 Tokens - add block type BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE (SpacePossum)
+* minor #2095 Transformers - add required PHP version (keradus)
+* minor #2096 Introduce CT for PHP7 (keradus)
+* minor #2119 Create @Symfony:risky ruleset (keradus)
+* minor #2163 ClassKeywordRemoveFixerTest - Fix tests (SpacePossum)
+* minor #2180 FixCommand - don't refer to renamed rules (keradus)
+* minor #2181 Disallow to disable linter (keradus)
+* minor #2194 semicolon_after_instruction,no_unneeded_control_parentheses prio issue (SpacePossum)
+* minor #2199 make fixers less risky (SpacePossum)
+* minor #2206 Add PHP70Migration ruleset (keradus)
+* minor #2217 SelfUpdateCommand - Print version of update fixer (SpacePossum)
+* minor #2223 update integration test format (keradus)
+* minor #2227 Stop polluting global namespace with CT (keradus)
+* minor #2237 DX: extend integration tests for PSR2 and Symfony rulesets (keradus)
+* minor #2240 Make some objects immutable (keradus)
+* minor #2251 ProtectedToPrivateFixer - fix priority, fix comments with new fixer names (SpacePossum)
+* minor #2252 ClassDefinitionFixer - Set configuration of the fixer in the RuleSet of SF. (SpacePossum)
+* minor #2257 extend Symfony_whitespaces itest (keradus)
+* minor #2258 README.rst - indicate configurable rules (keradus)
+* minor #2267 RuleSet - validate set (keradus)
+* minor #2268 Use strict parameters for PHP functions (keradus)
+* minor #2273 fixed typo (fabpot)
+* minor #2274 ShortArraySyntaxFixer/LongArraySyntaxFixer - Merge conflicting fixers (SpacePossum)
+* minor #2275 Clean ups (SpacePossum)
+* minor #2278 Concat*Fixer - unify concat fixers (SpacePossum, keradus)
+* minor #2279 Use Prophecy (keradus)
+* minor #2284 Code grooming (SpacePossum)
+* minor #2285 IntegrationCase is now aware about RuleSet but not Fixers (keradus, SpacePossum)
+* minor #2286 Phpdoc*Fixer - unify rename fixers (SpacePossum, keradus)
+* minor #2288 FixerInterface::configure(null) reset fixer to use default configuration (keradus)
+* minor #2291 Make fixers ready to use directly after creation (keradus)
+* minor #2295 Code grooming (keradus)
+* minor #2296 ProjectCodeTest - make test part of regular testsuite, not standalone one (keradus)
+* minor #2298 ConfigurationResolver - grooming (SpacePossum)
+* minor #2300 Simplify rule set (SpacePossum, keradus)
+* minor #2306 DeclareStrictTypesFixer - do not move tokens (SpacePossum)
+* minor #2312 RuleSet - sort rules (localheinz)
+* minor #2313 DX: provide doctyping for tests (keradus)
+* minor #2317 Add utests (keradus)
+* minor #2318 *TestCase - Reduce visibility of setUp() (localheinz)
+* minor #2319 Code grooming (keradus)
+* minor #2322 DX: use whitemessy aware assertion (keradus)
+* minor #2324 Echo|Print*Fixer - unify printing fixers (SpacePossum, keradus)
+* minor #2337 Normalize rule naming (keradus)
+* minor #2338 Drop hacks for unsupported HHVM (keradus)
+* minor #2339 Add some Fixer descriptions (SpacePossum, keradus)
+* minor #2343 PowToExponentiationFixer - allow to run on 5.6.0 as well (keradus)
+* minor #767 Add @internal tag (keradus)
+* minor #807 Tokens::isMethodNameIsMagic - remove unused method (keradus)
+* minor #809 Split Tokens into Tokens and TokensAnalyzer (keradus)
+* minor #844 Renamed phpdoc_params to phpdoc_align (GrahamCampbell)
+* minor #854 Change default level to PSR2 (keradus)
+* minor #873 Config - using cache by default (keradus)
+* minor #902 change FixerInterface (keradus)
+* minor #911 remove Token::$line (keradus)
+* minor #914 All Transformer classes should be named with Transformer as suffix (keradus)
+* minor #915 add UseTransformer (keradus)
+* minor #916 add ArraySquareBraceTransformer (keradus)
+* minor #917 clean up Transformer tests (keradus)
+* minor #919 CurlyBraceTransformer - one transformer to handle all curly braces transformations (keradus)
+* minor #928 remove Token::getLine (keradus)
+* minor #929 add WhitespacyCommentTransformer (keradus)
+* minor #937 fix docs/typehinting in few classes (keradus)
+* minor #958 FileCacheManager - remove code for BC support (keradus)
+* minor #979 Improve Tokens::clearEmptyTokens performance (keradus)
+* minor #981 Tokens - code grooming (keradus)
+* minor #988 Fixers - no need to search for tokens of given kind in extra loop (keradus)
+* minor #989 No need for loop in Token::equals (keradus)
+
+Changelog for v1.13.3
+---------------------
+
+* minor #3042 Update gitter address (keradus)
+
+Changelog for v1.13.2
+---------------------
+
+* minor #2946 Detect extra old installations (keradus)
+
+Changelog for v1.13.1
+---------------------
+
+* minor #2342 Application - adjust test to not depend on symfony/console version (keradus)
+* minor #2344 AppVeyor: enforce PHP version (keradus)
+
+Changelog for v1.13.0
+---------------------
+
+* bug #2303 ClassDefinitionFixer - Anonymous classes fixing (SpacePossum)
+* feature #2208 Added fixer for PHPUnit's @expectedException annotation (ro0NL)
+* feature #2249 Added ProtectedToPrivateFixer (Slamdunk, SpacePossum)
+* feature #2264 SelfUpdateCommand - Do not update to next major version by default (SpacePossum)
+* feature #2328 ClassDefinitionFixer - Anonymous classes format by PSR12 (SpacePossum)
+* feature #2333 PhpUnitFqcnAnnotationFixer - support more annotations (keradus)
+* minor #2256 EmptyReturnFixer - it's now risky fixer due to null vs void (keradus)
+* minor #2281 Add issue template (SpacePossum)
+* minor #2307 Update .editorconfig (SpacePossum)
+* minor #2310 CI: update AppVeyor to use newest PHP, silence the composer (keradus)
+* minor #2315 Token - Deprecate getLine() (SpacePossum)
+* minor #2320 Clear up status code on 1.x (SpacePossum)
+
+Changelog for v1.12.4
+---------------------
+
+* bug #2235 OrderedImportsFixer - PHP 7 group imports support (SpacePossum)
+* minor #2276 Tokens cleanup (keradus)
+* minor #2277 Remove trailing spaces (keradus)
+* minor #2294 Improve Travis configuration (keradus)
+* minor #2297 Use phpdbg instead of xdebug (keradus)
+* minor #2299 Travis: proper xdebug disabling (keradus)
+* minor #2301 Travis: update platform adjusting (keradus)
+
+Changelog for v1.12.3
+---------------------
+
+* bug #2155 ClassDefinitionFixer - overhaul (SpacePossum)
+* bug #2187 MultipleUseFixer - Fix handling comments (SpacePossum)
+* bug #2209 LinefeedFixer - Fix in a safe way (SpacePossum)
+* bug #2228 NoEmptyLinesAfterPhpdocs, SingleBlankLineBeforeNamespace - Fix priority (SpacePossum)
+* bug #2230 FunctionDeclarationFixer - Fix T_USE case (SpacePossum)
+* bug #2232 Add a test for style of varaible decalration : var (daiglej)
+* bug #2246 Fix itest requirements (keradus)
+* minor #2238 .gitattributes - specified line endings (keradus)
+* minor #2239 IntegrationCase - no longer internal (keradus)
+
+Changelog for v1.12.2
+---------------------
+
+* bug #2191 PhpdocToCommentFixer - fix false positive for docblock of variable (keradus)
+* bug #2193 UnneededControlParenthesesFixer - Fix more return cases. (SpacePossum)
+* bug #2198 FileCacheManager - fix exception message and undefined property (j0k3r)
+* minor #2170 Add dollar sign prefix for consistency (bcremer)
+* minor #2190 .travis.yml - improve Travis speed for tags (keradus)
+* minor #2196 PhpdocTypesFixer - support iterable type (GrahamCampbell)
+* minor #2197 Update cookbook and readme (g105b, SpacePossum)
+* minor #2203 README.rst - change formatting (ro0NL)
+* minor #2204 FixCommand - clean unused var (keradus)
+* minor #2205 Add integration test for iterable type (keradus)
+
+Changelog for v1.12.1
+---------------------
+
+* bug #2144 Remove temporary files not deleted by destructor on failure (adawolfa)
+* bug #2150 SelfUpdateCommand: resolve symlink (julienfalque)
+* bug #2162 Fix issue where an exception is thrown if the cache file exists but is empty. (ikari7789)
+* bug #2164 OperatorsSpacesFixer - Do not unalign double arrow and equals operators (SpacePossum)
+* bug #2167 Rewrite file removal (keradus)
+* minor #2152 Code cleanup (keradus)
+* minor #2154 ShutdownFileRemoval - Fixed file header (GrahamCampbell)
+
+Changelog for v1.12.0
+---------------------
+
+* feature #1493 Added MethodArgumentDefaultValueFixer (lmanzke)
+* feature #1495 BracesFixer - added support for declare (EspadaV8)
+* feature #1518 Added ClassDefinitionFixer (SpacePossum)
+* feature #1543 [PSR-2] Switch case space fixer (Soullivaneuh)
+* feature #1577 Added SpacesAfterSemicolonFixer (SpacePossum)
+* feature #1580 Added HeredocToNowdocFixer (gharlan)
+* feature #1581 UnneededControlParenthesesFixer - add "break" and "continue" support (gharlan)
+* feature #1610 HashToSlashCommentFixer - Add (SpacePossum)
+* feature #1613 ScalarCastFixer - LowerCaseCastFixer - Add (SpacePossum)
+* feature #1659 NativeFunctionCasingFixer - Add (SpacePossum)
+* feature #1661 SwitchCaseSemicolonToColonFixer - Add (SpacePossum)
+* feature #1662 Added CombineConsecutiveUnsetsFixer (SpacePossum)
+* feature #1671 Added NoEmptyStatementFixer (SpacePossum)
+* feature #1705 Added NoUselessReturnFixer (SpacePossum, keradus)
+* feature #1735 Added NoTrailingWhitespaceInCommentFixer (keradus)
+* feature #1750 Add PhpdocSingleLineVarSpacingFixer (SpacePossum)
+* feature #1765 Added NoEmptyPhpdocFixer (SpacePossum)
+* feature #1773 Add NoUselessElseFixer (gharlan, SpacePossum)
+* feature #1786 Added NoEmptyCommentFixer (SpacePossum)
+* feature #1792 Add PhpUnitDedicateAssertFixer. (SpacePossum)
+* feature #1894 BracesFixer - correctly fix indents of anonymous functions/classes (gharlan)
+* feature #1985 Added ClassKeywordRemoveFixer (Soullivaneuh)
+* feature #2020 Added PhpdocAnnotationWithoutDotFixer (keradus)
+* feature #2067 Added DeclareEqualNormalizeFixer (keradus)
+* feature #2078 Added SilencedDeprecationErrorFixer (HeahDude)
+* feature #2082 Added MbStrFunctionsFixer (Slamdunk)
+* bug #1657 SwitchCaseSpaceFixer - Fix spacing between 'case' and semicolon (SpacePossum)
+* bug #1684 SpacesAfterSemicolonFixer - fix loops handling (SpacePossum, keradus)
+* bug #1700 Fixer - resolve import conflict (keradus)
+* bug #1836 NoUselessReturnFixer - Do not remove return if last statement in short if statement (SpacePossum)
+* bug #1879 HeredocToNowdocFixer - Handle space in heredoc token (SpacePossum)
+* bug #1896 FixCommand - Fix escaping of diff output (SpacePossum)
+* bug #2034 IncludeFixer - fix support for close tag (SpacePossum)
+* bug #2040 PhpdocAnnotationWithoutDotFixer - fix crash on odd character (keradus)
+* bug #2041 DefaultFinder should implement FinderInterface (keradus)
+* bug #2050 PhpdocAnnotationWithoutDotFixer - handle ellipsis (keradus)
+* bug #2051 NativeFunctionCasingFixer - call to constructor with default NS of class with name matching native function name fix (SpacePossum)
+* minor #1538 Added possibility to lint tests (gharlan)
+* minor #1569 Add sample to get a specific version of the fixer (Soullivaneuh)
+* minor #1571 Enhance integration tests (keradus)
+* minor #1578 Code grooming (keradus)
+* minor #1583 Travis - update matrix (keradus)
+* minor #1585 Code grooming - Improve utests code coverage (SpacePossum)
+* minor #1586 Add configuration exception classes and exit codes (SpacePossum)
+* minor #1594 Fix invalid PHP code samples in utests (SpacePossum)
+* minor #1597 MethodArgumentDefaultValueFixer - refactoring and fix closures with "use" clause (gharlan)
+* minor #1600 Added more integration tests (SpacePossum, keradus)
+* minor #1605 integration tests - swap EXPECT and INPUT (optional INPUT) (gharlan)
+* minor #1608 Travis - change matrix order for faster results (gharlan)
+* minor #1609 CONTRIBUTING.md - Don't rebase always on master (SpacePossum)
+* minor #1616 IncludeFixer - fix and test more cases (SpacePossum)
+* minor #1622 AbstractIntegratationTest - fix linting test cases (gharlan)
+* minor #1624 fix invalid code in test cases (gharlan)
+* minor #1625 Travis - switch to trusty (keradus)
+* minor #1627 FixCommand - fix output (keradus)
+* minor #1630 Pass along the exception code. (SpacePossum)
+* minor #1632 Php Inspections (EA Extended): SCA for 1.12 (kalessil)
+* minor #1633 Fix CS for project itself (keradus)
+* minor #1634 Backport some minor changes from 2.x line (keradus)
+* minor #1637 update PHP Coveralls (keradus)
+* minor #1639 Revert "Travis - set dist to trusty" (keradus)
+* minor #1641 AppVeyor/Travis - use GITHUB_OAUTH_TOKEN (keradus)
+* minor #1642 AppVeyor - install dev deps as well (keradus)
+* minor #1647 Deprecate non-default Configs and Finders (keradus)
+* minor #1654 Split output to stderr and stdout (SpacePossum)
+* minor #1660 update phpunit version (gharlan)
+* minor #1663 DuplicateSemicolonFixer - Remove duplicate semicolons even if there are comments between those (SpacePossum)
+* minor #1664 IncludeFixer - Add missing test case (SpacePossum)
+* minor #1668 Code grooming (keradus)
+* minor #1669 NativeFunctionCasingFixer - move to Symfony level (keradus)
+* minor #1670 Backport Finder and Config classes from 2.x line (keradus)
+* minor #1682 ElseifFixer - handle comments (SpacePossum)
+* minor #1689 AbstractIntegrationTest - no need for single-char group and docs grooming (keradus)
+* minor #1690 Integration tests - allow to not check priority, introduce IntegrationCase (keradus)
+* minor #1701 Fixer - Renamed import alias (GrahamCampbell)
+* minor #1708 Update composer.json requirements (keradus)
+* minor #1734 Travis: Turn on linting (keradus)
+* minor #1736 Integration tests - don't check priority for tests using short_tag fixer (keradus)
+* minor #1739 NoTrailingWhitespaceInCommentFixer - move to PSR2 level (keradus)
+* minor #1763 Deprecate ConfigInterface::getDir, ConfigInterface::setDir, Finder::setDir (keradus)
+* minor #1777 NoTrailingWhitespaceInCommentFixer - fix parent class (keradus)
+* minor #1816 PhpUnitDedicateAssertFixer - configuration is not required anymore (keradus)
+* minor #1849 DocBlock - The category tag should be together with package (GrahamCampbell)
+* minor #1870 Update README.rst (glensc)
+* minor #1880 FixCommand - fix stdErr detection (SpacePossum)
+* minor #1881 NoEmptyStatementFixer - handle anonymous classes correctly (gharlan)
+* minor #1906 .php_cs - use no_useless_else rule (keradus)
+* minor #1915 NoEmptyComment - move to Symfony level (SpacePossum)
+* minor #1917 BracesFixer - fixed comment handling (gharlan)
+* minor #1919 EmptyReturnFixer - move fixer outside of Symfony level (keradus)
+* minor #2036 OrderedUseFixer - adjust tests (keradus)
+* minor #2056 Travis - run nightly PHP (keradus)
+* minor #2061 UnusedUseFixer and LineAfterNamespace - add new integration test (keradus)
+* minor #2097 Add lambda tests for 7.0 and 7.1 (SpacePossum)
+* minor #2111 .travis.yml - rename PHP 7.1 env (keradus)
+* minor #2112 Fix 1.12 line (keradus)
+* minor #2118 SilencedDeprecationErrorFixer - adjust level (keradus)
+* minor #2132 composer.json - rename package name (keradus)
+* minor #2133 Apply ordered_class_elements rule (keradus)
+* minor #2138 composer.json - disallow to run on PHP 7.2+ (keradus)
+
+Changelog for v1.11.8
+---------------------
+
+* bug #2143 ReadmeCommand - fix running command on phar file (keradus)
+* minor #2129 Add .gitattributes to remove unneeded files (Slamdunk)
+* minor #2141 Move phar building to PHP 5.6 job as newest box.phar is no longer working on 5.3 (keradus)
+
+Changelog for v1.11.7
+---------------------
+
+* bug #2108 ShortArraySyntaxFixer, TernarySpacesFixer, UnalignEqualsFixer - fix priority bug (SpacePossum)
+* bug #2092 ConcatWithoutSpacesFixer, OperatorsSpacesFixer - fix too many spaces, fix incorrect fixing of lines with comments (SpacePossum)
+
+Changelog for v1.11.6
+---------------------
+
+* bug #2086 Braces - fix bug with comment in method prototype (keradus)
+* bug #2077 SingleLineAfterImportsFixer - Do not remove lines between use cases (SpacePossum)
+* bug #2079 TernarySpacesFixer - Remove multiple spaces (SpacePossum)
+* bug #2087 Fixer - handle PHP7 Errors as well (keradus)
+* bug #2072 LowercaseKeywordsFixer - handle CT_CLASS_CONSTANT (tgabi333)
+* bug #2066 LineAfterNamespaceFixer - Handle close tag (SpacePossum)
+* bug #2057 LineAfterNamespaceFixer - adding too much extra lines where namespace is last statement (keradus)
+* bug #2059 OperatorsSpacesFixer - handle declare statement (keradus)
+* bug #2060 UnusedUseFixer - fix handling whitespaces around removed import (keradus)
+* minor #2071 ShortEchoTagFixer - allow to run tests on PHP 5.3 (keradus)
+
+Changelog for v1.11.5
+---------------------
+
+* bug #2012 Properly build phar file for lowest supported PHP version (keradus)
+* bug #2037 BracesFixer - add support for anonymous classes (keradus)
+* bug #1989 Add support for PHP 7 namespaces (SpacePossum)
+* bug #2019 Fixing newlines added after curly brace string index access (jaydiablo)
+* bug #1840 [Bug] BracesFixer - Do add a line before close tag (SpacePossum)
+* bug #1994 EchoToPrintFixer - Fix T_OPEN_TAG_WITH_ECHO on hhvm (keradus)
+* bug #1970 Tokens - handle semi-reserved PHP 7 keywords (keradus)
+* minor #2017 PHP7 integration tests (keradus)
+* minor #1465 Bump supported HHVM version, improve ShortEchoTagFixer on HHVM (keradus)
+* minor #1995 Rely on own phpunit, not one from CI service (keradus)
+
+Changelog for v1.11.4
+---------------------
+
+* bug #1956 SelfUpdateCommand - don't update to non-stable version (keradus)
+* bug #1963 Fix not wanted unneeded_control_parentheses fixer for clone (Soullivaneuh)
+* bug #1960 Fix invalid test cases (keradus)
+* bug #1939 BracesFixer - fix handling comment around control token (keradus)
+* minor #1927 NewWithBracesFixer - remove invalid testcase (keradus)
+
+Changelog for v1.11.3
+---------------------
+
+* bug #1868 NewWithBracesFixer - fix handling more neighbor tokens (keradus)
+* bug #1893 BracesFixer - handle comments inside lambda function prototype (keradus)
+* bug #1806 SelfAccessorFixer - skip anonymous classes (gharlan)
+* bug #1813 BlanklineAfterOpenTagFixer, NoBlankLinesBeforeNamespaceFixer - fix priority (SpacePossum)
+* minor #1807 Tokens - simplify isLambda() (gharlan)
+
+Changelog for v1.11.2
+---------------------
+
+* bug #1776 EofEndingFixer - new line on end line comment is allowed (Slamdunk)
+* bug #1775 FileCacheManager - ignore corrupted serialized data (keradus)
+* bug #1769 FunctionDeclarationFixer - fix more cases (keradus)
+* bug #1747 Fixer - Fix ordering of fixer when both level and custom fixers are used (SpacePossum)
+* bug #1744 Fixer - fix rare situation when file was visited twice (keradus)
+* bug #1710 LowercaseConstantFixer - Fix comment cases. (SpacePossum)
+* bug #1711 FunctioncallSpaceFixer - do not touch function declarations. (SpacePossum)
+* minor #1798 LintManager - meaningful tempnam (Slamdunk)
+* minor #1759 UniqueFileIterator - performance improvement (GrahamCampbell)
+* minor #1745 appveyor - fix build (keradus)
+
+Changelog for v1.11.1
+---------------------
+
+* bug #1680 NewWithBracesFixer - End tags (SpacePossum)
+* bug #1685 EmptyReturnFixer - Make independent of LowercaseConstantsFixer (SpacePossum)
+* bug #1640 IntegrationTest - fix directory separator (keradus)
+* bug #1595 ShortTagFixer - fix priority (keradus)
+* bug #1576 SpacesBeforeSemicolonFixer - do not remove space before semicolon if that space is after a semicolon (SpacePossum)
+* bug #1570 UnneededControlParenthesesFixer - fix test samples (keradus)
+* minor #1653 Update license year (gharlan)
+
+Changelog for v1.11
+-------------------
+
+* feature #1550 Added UnneededControlParenthesesFixer (Soullivaneuh, keradus)
+* feature #1532 Added ShortBoolCastFixer (SpacePossum)
+* feature #1523 Added EchoToPrintFixer and PrintToEchoFixer (Soullivaneuh)
+* feature #1552 Warn when running with xdebug extension (SpacePossum)
+* feature #1484 Added ArrayElementNoSpaceBeforeCommaFixer and ArrayElementWhiteSpaceAfterCommaFixer (amarczuk)
+* feature #1449 PhpUnitConstructFixer - Fix more use cases (SpacePossum)
+* feature #1382 Added PhpdocTypesFixer (GrahamCampbell)
+* feature #1384 Add integration tests (SpacePossum)
+* feature #1349 Added FunctionTypehintSpaceFixer (keradus)
+* minor #1562 Fix invalid PHP code samples in utests (SpacePossum)
+* minor #1560 Fixed project name in xdebug warning (gharlan)
+* minor #1545 Fix invalid PHP code samples in utests (SpacePossum)
+* minor #1554 Alphabetically sort entries in .gitignore (GrahamCampbell)
+* minor #1527 Refactor the way types work on annotations (GrahamCampbell)
+* minor #1546 Update coding guide in cookbook (keradus)
+* minor #1526 Support more annotations when fixing types in phpdoc (GrahamCampbell)
+* minor #1535 clean ups (SpacePossum)
+* minor #1510 Added Symfony 3.0 support (Ener-Getick)
+* minor #1520 Code grooming (keradus)
+* minor #1515 Support property, property-read and property-write tags (GrahamCampbell)
+* minor #1488 Added more inline phpdoc tests (GrahamCampbell)
+* minor #1496 Add docblock to AbstractFixerTestBase::makeTest (lmanzke)
+* minor #1467 PhpdocShortDescriptionFixer - add support for Japanese sentence-ending characters (fritz-c)
+* minor #1453 remove calling array_keys in foreach loops (keradus)
+* minor #1448 Code grooming (keradus)
+* minor #1437 Added import fixers integration test (GrahamCampbell)
+* minor #1433 phpunit.xml.dist - disable gc (keradus)
+* minor #1427 Change arounded to surrounded in README.rst (36degrees)
+* minor #1420 AlignDoubleArrowFixer, AlignEqualsFixer - add integration tests (keradus)
+* minor #1423 appveyor.yml - do not cache C:\tools, its internal forAppVeyor (keradus)
+* minor #1400 appveyor.yml - add file (keradus)
+* minor #1396 AbstractPhpdocTypesFixer - instance method should be called on instance (keradus)
+* minor #1395 code grooming (keradus)
+* minor #1393 boost .travis.yml file (keradus)
+* minor #1372 Don't allow PHP 7 to fail (GrahamCampbell)
+* minor #1332 PhpUnitConstructFixer - fix more functions (keradus)
+* minor #1339 CONTRIBUTING.md - add link to PSR-5 (keradus)
+* minor #1346 Core grooming (SpacePossum)
+* minor #1328 Tokens: added typehint for Iterator elements (gharlan)
+
+Changelog for v1.10.3
+---------------------
+
+* bug #1559 WhitespacyLinesFixer - fix bug cases (SpacePossum, keradus)
+* bug #1541 Psr0Fixer - Ignore filenames that are a reserved keyword or predefined constant (SpacePossum)
+* bug #1537 Psr0Fixer - ignore file without name or with name started by digit (keradus)
+* bug #1516 FixCommand - fix wrong message for dry-run (SpacePossum)
+* bug #1486 ExtraEmptyLinesFixer - Remove extra lines after comment lines too (SpacePossum)
+* bug #1503 Psr0Fixer - fix case with comments lying around (GrahamCampbell)
+* bug #1474 PhpdocToCommentFixer - fix not properly fixing for block right after namespace (GrahamCampbell)
+* bug #1478 BracesFixer - do not remove empty lines after class opening (keradus)
+* bug #1468 Add missing ConfigInterface::getHideProgress() (Eugene Leonovich, rybakit)
+* bug #1466 Fix bad indent on align double arrow fixer (Soullivaneuh, keradus)
+* bug #1479 Tokens - fix detection of short array (keradus)
+
+Changelog for v1.10.2
+---------------------
+
+* bug #1461 PhpUnitConstructFixer - fix case when first argument is an expression (keradus)
+* bug #1460 AlignDoubleArrowFixer - fix handling of nested arrays (Soullivaneuh, keradus)
+
+Changelog for v1.10.1
+---------------------
+
+* bug #1424 Fixed the import fixer priorities (GrahamCampbell)
+* bug #1444 OrderedUseFixer - fix next case (keradus)
+* bug #1441 BracesFixer - fix next case (keradus)
+* bug #1422 AlignDoubleArrowFixer - fix handling of nested array (SpacePossum)
+* bug #1425 PhpdocInlineTagFixerTest - fix case when met inalid PHPDoc (keradus)
+* bug #1419 AlignDoubleArrowFixer, AlignEqualsFixer - fix priorities (keradus)
+* bug #1415 BlanklineAfterOpenTagFixer - Do not add a line break if there is one already. (SpacePossum)
+* bug #1410 PhpdocIndentFixer - Fix for open tag (SpacePossum)
+* bug #1401 PhpdocVarWithoutNameFixer - Fixed the var without name fixer for inline docs (keradus, GrahamCampbell)
+* bug #1369 Fix not well-formed XML output (junichi11)
+* bug #1356 Psr0Fixer - disallow run on StdinFileInfo (keradus)
+
+Changelog for v1.10
+-------------------
+
+* feature #1306 Added LogicalNotOperatorsWithSuccessorSpaceFixer (phansys)
+* feature #1286 Added PhpUnitConstructFixer (keradus)
+* feature #1316 Added PhpdocInlineTagFixer (SpacePossum, keradus)
+* feature #1303 Added LogicalNotOperatorsWithSpacesFixer (phansys)
+* feature #1279 Added PhpUnitStrictFixer (keradus)
+* feature #1267 SingleQuoteFixer fix more use cases (SpacePossum)
+* minor #1319 PhpUnitConstructFixer - fix performance and add to local .php_cs (keradus)
+* minor #1280 Fix non-utf characters in docs (keradus)
+* minor #1274 Cookbook - No change auto-test note (Soullivaneuh)
+
+Changelog for v1.9.3
+--------------------
+
+* bug #1327 DocBlock\Tag - keep the case of tags (GrahamCampbell)
+
+Changelog for v1.9.2
+--------------------
+
+* bug #1313 AlignDoubleArrowFixer - fix aligning after UTF8 chars (keradus)
+* bug #1296 PhpdocScalarFixer - fix property annotation too (GrahamCampbell)
+* bug #1299 WhitespacyLinesFixer - spaces on next valid line must not be fixed (Slamdunk)
+
+Changelog for v1.9.1
+--------------------
+
+* bug #1288 TrimArraySpacesFixer - fix moving first comment (keradus)
+* bug #1287 PhpdocParamsFixer - now works on any indentation level (keradus)
+* bug #1278 Travis - fix PHP7 build (keradus)
+* bug #1277 WhitespacyLinesFixer - stop changing non-whitespacy tokens (SpacePossum, SamBurns-awin, keradus)
+* bug #1224 TrailingSpacesFixer - stop changing non-whitespacy tokens (SpacePossum, SamBurns-awin, keradus)
+* bug #1266 FunctionCallSpaceFixer - better detection of function call (funivan)
+* bug #1255 make sure some phpdoc fixers are run in right order (SpacePossum)
+
+Changelog for v1.9
+------------------
+
+* feature #1097 Added ShortEchoTagFixer (vinkla)
+* minor #1238 Fixed error handler to respect current error_reporting (JanJakes)
+* minor #1234 Add class to exception message, use sprintf for exceptions (SpacePossum)
+* minor #1210 set custom error handler for application run (keradus)
+* minor #1214 Tokens::isMonolithicPhp - enhance performance (keradus)
+* minor #1207 Update code documentation (keradus)
+* minor #1202 Update IDE tool urls (keradus)
+* minor #1195 PreIncrementFixer - move to Symfony level (gharlan)
+
+Changelog for v1.8.1
+--------------------
+
+* bug #1193 EofEndingFixer - do not add an empty line at EOF if the PHP tags have been closed (SpacePossum)
+* bug #1209 PhpdocParamsFixer - fix corrupting following custom annotation (keradus)
+* bug #1205 BracesFixer - fix missing indentation fixes for class level (keradus)
+* bug #1204 Tag - fix treating complex tag as simple PhpDoc tag (keradus)
+* bug #1198 Tokens - fixed unary/binary operator check for type-hinted reference arguments (gharlan)
+* bug #1201 Php4ConstructorFixer - fix invalid handling of subnamespaces (gharlan)
+* minor #1221 Add more tests (SpacePossum)
+* minor #1216 Tokens - Add unit test for array detection (SpacePossum)
+
+Changelog for v1.8
+------------------
+
+* feature #1168 Added UnalignEqualsFixer (keradus)
+* feature #1167 Added UnalignDoubleArrowFixer (keradus)
+* bug #1169 ToolInfo - Fix way to find script dir (sp-ian-monge)
+* minor #1181 composer.json - Update description (SpacePossum)
+* minor #1180 create Tokens::overrideAt method (keradus)
+
+Changelog for v1.7.1
+--------------------
+
+* bug #1165 BracesFixer - fix bug when comment is a first statement in control structure without braces (keradus)
+
+Changelog for v1.7
+------------------
+
+* feature #1113 Added PreIncrementFixer (gharlan)
+* feature #1144 Added PhpdocNoAccessFixer (GrahamCampbell)
+* feature #1116 Added SelfAccessorFixer (gharlan)
+* feature #1064 OperatorsSpacesFixer enhancements (gharlan)
+* bug #1151 Prevent token collection corruption by fixers (stof, keradus)
+* bug #1152 LintManager - fix handling of temporary file (keradus)
+* bug #1139 NamespaceNoLeadingWhitespaceFixer - remove need for ctype extension (keradus)
+* bug #1117 Tokens - fix iterator used with foreach by reference (keradus)
+* minor #1148 code grooming (keradus)
+* minor #1142 We are actually PSR-4, not PSR-0 (GrahamCampbell)
+* minor #1131 Phpdocs and typos (SpacePossum)
+* minor #1069 state min HHVM version (keradus)
+* minor #1129 [DX] Help developers choose the right branch (SpacePossum)
+* minor #1138 PhpClosingTagFixer - simplify flow, no need for loop (keradus)
+* minor #1123 Reference mismatches fixed, SCA (kalessil)
+* minor #1109 SingleQuoteFixer - made fixer more accurate (gharlan)
+* minor #1110 code grooming (kalessil)
+
+Changelog for v1.6.2
+--------------------
+
+* bug #1149 UnusedUseFixer - must be run before LineAfterNamespaceFixer, fix token collection corruption (keradus)
+* minor #1145 AbstractLinesBeforeNamespaceFixer - fix docs for fixLinesBeforeNamespace (GrahamCampbell)
+
+Changelog for v1.6.1
+--------------------
+
+* bug #1108 UnusedUseFixer - fix false positive when name is used as part of another namespace (gharlan)
+* bug #1114 Fixed PhpdocParamsFixer with malformed doc block (gharlan)
+* minor #1135 PhpdocTrimFixer - fix doc typo (localheinz)
+* minor #1093 Travis - test lowest dependencies (boekkooi)
+
+Changelog for v1.6
+------------------
+
+* feature #1089 Added NewlineAfterOpenTagFixer and BlanklineAfterOpenTagFixer (ceeram, keradus)
+* feature #1090 Added TrimArraySpacesFixer (jaredh159, keradus)
+* feature #1058 Added SingleQuoteFixer (gharlan)
+* feature #1059 Added LongArraySyntaxFixer (gharlan)
+* feature #1037 Added PhpdocScalarFixer (GrahamCampbell, keradus)
+* feature #1028 Add ListCommasFixer (keradus)
+* bug #1047 Utils::camelCaseToUnderscore - fix regexp (odin-delrio)
+* minor #1073 ShortTagFixer enhancement (gharlan)
+* minor #1079 Use LongArraySyntaxFixer for this repo (gharlan)
+* minor #1070 Tokens::isMonolithicPhp - remove unused T_CLOSE_TAG search (keradus)
+* minor #1049 OrderedUseFixer - grooming (keradus)
+
+Changelog for v1.5.2
+--------------------
+
+* bug #1025 Fixer - ignore symlinks (kix)
+* bug #1071 Psr0Fixer - fix bug for fixing file with long extension like .class.php (keradus)
+* bug #1080 ShortTagFixer - fix false positive (gharlan)
+* bug #1066 Php4ConstructorFixer - fix causing infinite recursion (mbeccati)
+* bug #1056 VisibilityFixer - fix T_VAR with multiple props (localheinz, keradus)
+* bug #1065 Php4ConstructorFixer - fix detection of a PHP4 parent constructor variant (mbeccati)
+* bug #1060 Tokens::isShortArray: tests and bugfixes (gharlan)
+* bug #1057 unused_use: fix false positive when name is only used as variable name (gharlan)
+
+Changelog for v1.5.1
+--------------------
+
+* bug #1054 VisibilityFixer - fix var with array value assigned (localheinz, keradus)
+* bug #1048 MultilineArrayTrailingCommaFixer, SingleArrayNoTrailingCommaFixer - using heredoc inside array not cousing to treat it as multiline array (keradus)
+* bug #1043 PhpdocToCommentFixer - also check other control structures, besides foreach (ceeram)
+* bug #1045 OrderedUseFixer - fix namespace order for trailing digits (rusitschka)
+* bug #1035 PhpdocToCommentFixer - Add static as valid keyword for structural element (ceeram)
+* bug #1020 BracesFixer - fix missing braces for nested if elseif else (malengrin)
+* minor #1036 Added php7 to travis build (fonsecas72)
+* minor #1026 Fix typo in ShortArraySyntaxFixer (tommygnr)
+* minor #1024 code grooming (keradus)
+
+Changelog for v1.5
+------------------
+
+* feature #887 Added More Phpdoc Fixers (GrahamCampbell, keradus)
+* feature #1002 Add HeaderCommentFixer (ajgarlag)
+* feature #974 Add EregToPregFixer (mbeccati)
+* feature #970 Added Php4ConstructorFixer (mbeccati)
+* feature #997 Add PhpdocToCommentFixer (ceeram, keradus)
+* feature #932 Add NoBlankLinesAfterClassOpeningFixer (ceeram)
+* feature #879 Add SingleBlankLineBeforeNamespaceFixer and NoBlankLinesBeforeNamespaceFixer (GrahamCampbell)
+* feature #860 Add single_line_after_imports fixer (ceeram)
+* minor #1014 Fixed a few file headers (GrahamCampbell)
+* minor #1011 Fix HHVM as it works different than PHP (keradus)
+* minor #1010 Fix invalid UTF-8 char in docs (ajgarlag)
+* minor #1003 Fix header comment in php files (ajgarlag)
+* minor #1005 Add Utils::calculateBitmask method (keradus)
+* minor #973 Add Tokens::findSequence (mbeccati)
+* minor #991 Longer explanation of how to use blacklist (bmitch, networkscraper)
+* minor #972 Add case sensitive option to the tokenizer (mbeccati)
+* minor #986 Add benchmark script (dericofilho)
+* minor #985 Fix typo in COOKBOOK-FIXERS.md (mattleff)
+* minor #978 Token - fix docs (keradus)
+* minor #957 Fix Fixers methods order (GrahamCampbell)
+* minor #944 Enable caching of composer downloads on Travis (stof)
+* minor #941 EncodingFixer - enhance tests (keradus)
+* minor #938 Psr0Fixer - remove unneded assignment (keradus)
+* minor #936 FixerTest - test description consistency (keradus)
+* minor #933 NoEmptyLinesAfterPhpdocsFixer - remove unneeded code, clarify description (ceeram)
+* minor #934 StdinFileInfo::getFilename - Replace phpdoc with normal comment and add back empty line before return (ceeram)
+* minor #927 Exclude the resources folder from coverage reports (GrahamCampbell)
+* minor #926 Update Token::isGivenKind phpdoc (GrahamCampbell)
+* minor #925 Improved AbstractFixerTestBase (GrahamCampbell)
+* minor #922 AbstractFixerTestBase::makeTest - test if input is different than expected (keradus)
+* minor #904 Refactoring Utils (GrahamCampbell)
+* minor #901 Improved Readme Formatting (GrahamCampbell)
+* minor #898 Tokens::getImportUseIndexes - simplify function (keradus)
+* minor #897 phpunit.xml.dist - split testsuite (keradus)
+
+Changelog for v1.4.2
+--------------------
+
+* bug #994 Fix detecting of short arrays (keradus)
+* bug #995 DuplicateSemicolonFixer - ignore duplicated semicolons inside T_FOR (keradus)
+
+Changelog for v1.4.1
+--------------------
+
+* bug #990 MultilineArrayTrailingCommaFixer - fix case with short array on return (keradus)
+* bug #975 NoEmptyLinesAfterPhpdocsFixer - fix only when documentation documents sth (keradus)
+* bug #976 PhpdocIndentFixer - fix error when there is a comment between docblock and next meaningful token (keradus, ceeram)
+
+Changelog for v1.4
+------------------
+
+* feature #841 PhpdocParamsFixer: added aligning var/type annotations (GrahamCampbell)
+* bug #965 Fix detection of lambda function that returns a reference (keradus)
+* bug #962 PhpdocIndentFixer - fix bug when documentation is on the end of braces block (keradus)
+* bug #961 Fixer - fix handling of empty file (keradus)
+* bug #960 IncludeFixer - fix bug when include is part of condition statement (keradus)
+* bug #954 AlignDoubleArrowFixer - fix new buggy case (keradus)
+* bug #955 ParenthesisFixer - fix case with list call with trailing comma (keradus)
+* bug #950 Tokens::isLambda - fix detection near comments (keradus)
+* bug #951 Tokens::getImportUseIndexes - fix detection near comments (keradus)
+* bug #949 Tokens::isShortArray - fix detection near comments (keradus)
+* bug #948 NewWithBracesFixer - fix case with multidimensional array (keradus)
+* bug #945 Skip files containing __halt_compiler() on PHP 5.3 (stof)
+* bug #946 BracesFixer - fix typo in exception name (keradus)
+* bug #940 Tokens::setCode - apply missing transformation (keradus)
+* bug #908 BracesFixer - fix invalide inserting brace for control structure without brace and lambda inside of it (keradus)
+* bug #903 NoEmptyLinesAfterPhpdocsFixer - fix bug with Windows style lines (GrahamCampbell)
+* bug #895 [PSR-2] Preserve blank line after control structure opening brace (marcaube)
+* bug #892 Fixed the double arrow multiline whitespace fixer (GrahamCampbell)
+* bug #874 BracesFixer - fix bug of removing empty lines after class' opening { (ceeram)
+* bug #868 BracesFixer - fix missing braces when statement is not followed by ; (keradus)
+* bug #861 Updated PhpdocParamsFixer not to change line endings (keradus, GrahamCampbell)
+* bug #837 FixCommand - stop corrupting xml/json format (keradus)
+* bug #846 Made phpdoc_params run after phpdoc_indent (GrahamCampbell)
+* bug #834 Correctly handle tab indentation (ceeram)
+* bug #822 PhpdocIndentFixer - Ignore inline docblocks (ceeram)
+* bug #813 MultilineArrayTrailingCommaFixer - do not move array end to new line (keradus)
+* bug #817 LowercaseConstantsFixer - ignore class' constants TRUE/FALSE/NULL (keradus)
+* bug #821 JoinFunctionFixer - stop changing declaration method name (ceeram)
+* minor #963 State the minimum version of PHPUnit in CONTRIBUTING.md (SpacePossum)
+* minor #943 Improve the cookbook to use relative links (stof)
+* minor #921 Add changelog file (keradus)
+* minor #909 BracesFixerTest - no \n line in \r\n test (keradus)
+* minor #864 Added NoEmptyLinesAfterPhpdocsFixer (GrahamCampbell)
+* minor #871 Added missing author (GrahamCampbell)
+* minor #852 Fixed the coveralls version constraint (GrahamCampbell)
+* minor #863 Tweaked testRetainsNewLineCharacters (GrahamCampbell)
+* minor #849 Removed old alias (GrahamCampbell)
+* minor #843 integer should be int (GrahamCampbell)
+* minor #830 Remove whitespace before opening tag (ceeram)
+* minor #835 code grooming (keradus)
+* minor #828 PhpdocIndentFixerTest - code grooming (keradus)
+* minor #827 UnusedUseFixer - code grooming (keradus)
+* minor #825 improve code coverage (keradus)
+* minor #810 improve code coverage (keradus)
+* minor #811 ShortArraySyntaxFixer - remove not needed if statement (keradus)
+
+Changelog for v1.3
+------------------
+
+* feature #790 Add docblock indent fixer (ceeram)
+* feature #771 Add JoinFunctionFixer (keradus)
+* bug #798 Add DynamicVarBrace Transformer for properly handling ${$foo} syntax (keradus)
+* bug #796 LowercaseConstantsFixer - rewrite to handle new test cases (keradus)
+* bug #789 T_CASE is not succeeded by parentheses (dericofilho)
+* minor #814 Minor improvements to the phpdoc_params fixer (GrahamCampbell)
+* minor #815 Minor fixes (GrahamCampbell)
+* minor #782 Cookbook on how to make a new fixer (dericofilho)
+* minor #806 Fix Tokens::detectBlockType call (keradus)
+* minor #758 travis - disable sudo (keradus)
+* minor #808 Tokens - remove commented code (keradus)
+* minor #802 Address Sensiolabs Insight's warning of code cloning. (dericofilho)
+* minor #803 README.rst - fix \` into \`\` (keradus)
+
+Changelog for v1.2
+------------------
+
+* feature #706 Remove lead slash (dericofilho)
+* feature #740 Add EmptyReturnFixer (GrahamCampbell)
+* bug #775 PhpClosingTagFixer - fix case with T_OPEN_TAG_WITH_ECHO (keradus)
+* bug #756 Fix broken cases for AlignDoubleArrowFixer (dericofilho)
+* bug #763 MethodArgumentSpaceFixer - fix receiving data in list context with omitted values (keradus)
+* bug #759 Fix Tokens::isArrayMultiLine (stof, keradus)
+* bug #754 LowercaseKeywordsFixer - __HALT_COMPILER must not be lowercased (keradus)
+* bug #753 Fix for double arrow misalignment in deeply nested arrays. (dericofilho)
+* bug #752 OrderedUseFixer should be case-insensitive (rusitschka)
+* minor #779 Fixed a docblock type (GrahamCampbell)
+* minor #765 Typehinting in FileCacheManager, remove unused variable in Tokens (keradus)
+* minor #764 SelfUpdateCommand - get local version only if remote version was successfully obtained (keradus)
+* minor #761 aling => (keradus)
+* minor #757 Some minor code simplify and extra test (keradus)
+* minor #713 Download php-cs-fixer.phar without sudo (michaelsauter)
+* minor #742 Various Minor Improvements (GrahamCampbell)
+
+Changelog for v1.1
+------------------
+
+* feature #749 remove the --no-progress option (replaced by the standard -v) (fabpot, keradus)
+* feature #728 AlignDoubleArrowFixer - standardize whitespace after => (keradus)
+* feature #647 Add DoubleArrowMultilineWhitespacesFixer (dericofilho, keradus)
+* bug #746 SpacesBeforeSemicolonFixerTest - fix bug with semicolon after comment (keradus)
+* bug #741 Fix caching when composer is installed in custom path (cmodijk)
+* bug #725 DuplicateSemicolonFixer - fix clearing whitespace after duplicated semicolon (keradus)
+* bug #730 Cache busting when fixers list changes (Seldaek)
+* bug #722 Fix lint for STDIN-files (ossinkine)
+* bug #715 TrailingSpacesFixer - fix bug with french UTF-8 chars (keradus)
+* bug #718 Fix package name for composer cache (Seldaek)
+* bug #711 correct vendor name (keradus)
+* minor #745 Show progress by default and allow to disable it (keradus)
+* minor #731 Add a way to disable all default filters and really provide a whitelist (Seldaek)
+* minor #737 Extract tool info into new class, self-update command works now only for PHAR version (keradus)
+* minor #739 fix fabbot issues (keradus)
+* minor #726 update CONTRIBUTING.md for installing dependencies (keradus)
+* minor #736 Fix fabbot issues (GrahamCampbell)
+* minor #727 Fixed typos (pborreli)
+* minor #719 Add update instructions for composer and caching docs (Seldaek)
+
+Changelog for v1.0
+------------------
+
+First stable release.
diff --git a/vendor/friendsofphp/php-cs-fixer/CONTRIBUTING.md b/vendor/friendsofphp/php-cs-fixer/CONTRIBUTING.md
new file mode 100644
index 0000000..a3eb381
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/CONTRIBUTING.md
@@ -0,0 +1,104 @@
+# Contributions Are Welcome!
+
+If you need any help, don't hesitate to ask the community on [Gitter](https://gitter.im/PHP-CS-Fixer/Lobby).
+
+## Quick Guide
+
+### Fixer
+
+A *fixer* is a class that tries to fix one code style issue (a ``Fixer`` class
+must implement ``FixerInterface``).
+
+### Config
+
+A *config* knows about the code style rules and the files and directories that
+must be scanned by the tool when run in the directory of your project. It is
+useful for projects that follow a well-known directory structures (like for
+Symfony projects for instance).
+
+### How-To
+
+* [Fork](https://help.github.com/articles/fork-a-repo/) the repo.
+* [Checkout](https://git-scm.com/docs/git-checkout) the branch you want to make changes on:
+ * If you are fixing a bug or typo, improving tests or for any small tweak: the lowest branch where the changes can be applied. Once your Pull Request is accepted, the changes will get merged up to highest branches.
+ * `master` in other cases (new feature, deprecation, or backwards compatibility breaking changes). Note that most of the time, `master` represents the next minor release of PHP CS Fixer, so Pull Requests that break backwards compatibility might be postponed.
+* Install dependencies: `composer install`.
+* Create a new branch, e.g. `feature-foo` or `bugfix-bar`.
+* Make changes.
+* If you are adding functionality or fixing a bug - add a test! Prefer adding new test cases over modifying existing ones.
+* Make sure there is no wrong file permissions in the repository: `./dev-tools/check_file_permissions.sh`.
+* Make sure there is no trailing spaces in the code: `./dev-tools/check_trailing_spaces.sh`.
+* Update documentation: `php dev-tools/doc.php`. This requires the highest version of PHP supported by PHP CS Fixer. If it is not installed on your system, you can run it in a Docker container instead: `docker run -it --rm --user="$(id -u):$(id -g)" -w="/app" --volume="$(pwd):/app" php:7.4-cli php dev-tools/doc.php`.
+* Install dev tools: `dev-tools/install.sh`
+* Run static analysis using PHPStan: `php -d memory_limit=256M dev-tools/vendor/bin/phpstan analyse`
+* Check if tests pass: `vendor/bin/phpunit`.
+* Fix project itself: `php php-cs-fixer fix`.
+
+## Working With Docker
+
+This project provides a Docker setup that allows working on it using any of the supported PHP versions.
+
+To use it, you first need to install:
+
+ * [Docker](https://docs.docker.com/get-docker/)
+ * [Docker Compose](https://docs.docker.com/compose/install/)
+
+Make sure the versions installed support [Compose file format 3.8](https://docs.docker.com/compose/compose-file/).
+
+Next, copy [`docker-compose.override.yaml.dist`](./docker-compose.override.yaml.dist) to `docker-compose.override.yaml`
+and edit it to your needs. The relevant parameters that might require some tweaking have comments to help you.
+
+You can then build the images:
+
+```console
+$ docker-compose build --parallel
+```
+
+Now you can run commands needed to work on the project. For example, say you want to run PHPUnit tests on PHP 7.4:
+
+```console
+$ docker-compose run php-7.4 vendor/bin/phpunit
+```
+
+Sometimes it can be more convenient to have a shell inside the container:
+
+```console
+$ docker-compose run php-7.4 sh
+/app $ vendor/bin/phpunit
+```
+
+The images come with an [`xdebug` script](github.com/julienfalque/xdebug/) that allows running any PHP command with
+Xdebug enabled to help debug problems.
+
+```console
+docker-compose run php-7.4 xdebug vendor/bin/phpunit
+```
+
+If you're using PhpStorm, you need to create a [server](https://www.jetbrains.com/help/phpstorm/servers.html) with a
+name that matches the `PHP_IDE_CONFIG` environment variable defined in the Docker Compose configuration files, which is
+`php-cs-fixer` by default.
+
+All images use port 9003 for debug connections.
+
+## Opening a [Pull Request](https://help.github.com/articles/about-pull-requests/)
+
+You can do some things to increase the chance that your Pull Request is accepted the first time:
+
+* Submit one Pull Request per fix or feature.
+* If your changes are not up to date, [rebase](https://git-scm.com/docs/git-rebase) your branch onto the parent branch.
+* Follow the conventions used in the project.
+* Remember about tests and documentation.
+* Don't bump version.
+
+## Making New Fixers
+
+There is a [cookbook](doc/cookbook_fixers.rst) with basic instructions on how to build a new fixer. Consider reading it
+before opening a PR.
+
+## Project's Standards
+
+* [PSR-1: Basic Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
+* [PSR-2: Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
+* [PSR-4: Autoloading Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md)
+* [PSR-5: PHPDoc (draft)](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md)
+* [Symfony Coding Standards](https://symfony.com/doc/current/contributing/code/standards.html)
diff --git a/vendor/friendsofphp/php-cs-fixer/LICENSE b/vendor/friendsofphp/php-cs-fixer/LICENSE
new file mode 100644
index 0000000..40c3bc3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2021 Fabien Potencier, Dariusz Rumiński
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/friendsofphp/php-cs-fixer/README.md b/vendor/friendsofphp/php-cs-fixer/README.md
new file mode 100644
index 0000000..20c55af
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/README.md
@@ -0,0 +1,75 @@
+<p align="center">
+ <a href="https://cs.symfony.com">
+ <img src="./logo.png" title="PHP CS Fixer" alt="PHP CS Fixer logo">
+ </a>
+</p>
+
+PHP Coding Standards Fixer
+==========================
+
+The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards;
+whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc.,
+or other community driven ones like the Symfony one.
+You can **also** define your (team's) style through configuration.
+
+It can modernize your code (like converting the ``pow`` function to the ``**`` operator on PHP 5.6)
+and (micro) optimize it.
+
+If you are already using a linter to identify coding standards problems in your
+code, you know that fixing them by hand is tedious, especially on large
+projects. This tool does not only detect them, but also fixes them for you.
+
+## Documentation
+
+### Installation
+
+The recommended way to install PHP CS Fixer is to use [Composer](https://getcomposer.org/download/)
+in a dedicated `composer.json` file in your project, for example in the
+`tools/php-cs-fixer` directory:
+
+```console
+$ mkdir --parents tools/php-cs-fixer
+$ composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer
+```
+
+For more details and other installation methods, see
+[installation instructions](./doc/installation.rst).
+
+### Usage
+
+Assuming you installed PHP CS Fixer as instructed above, you can run the
+following command to fix the files PHP files in the `src` directory:
+
+```console
+$ tools/php-cs-fixer/vendor/bin/php-cs-fixer fix src
+```
+
+See [usage](./doc/usage.rst), list of [built-in rules](./doc/rules/index.rst), list of [rule sets](./doc/ruleSets/index.rst)
+and [configuration file](./doc/config.rst) documentation for more details.
+
+If you need to apply code styles that are not supported by the tool, you can
+[create custom rules](./doc/custom_rules.rst).
+
+## Editor Integration
+
+Dedicated plugins exist for:
+
+* [Atom](https://github.com/Glavin001/atom-beautify)
+* [NetBeans](https://plugins.netbeans.apache.org/catalogue/?id=36)
+* [PhpStorm](https://www.jetbrains.com/help/phpstorm/using-php-cs-fixer.html)
+* [Sublime Text](https://github.com/benmatselby/sublime-phpcs)
+* [Vim](https://github.com/stephpy/vim-php-cs-fixer)
+* [VS Code](https://github.com/junstyle/vscode-php-cs-fixer)
+
+## Community
+
+The PHP CS Fixer is maintained on GitHub at https://github.com/FriendsOfPHP/PHP-CS-Fixer.
+Bug reports and ideas about new features are welcome there.
+
+You can reach us at https://gitter.im/PHP-CS-Fixer/Lobby about the project,
+configuration, possible improvements, ideas and questions, please visit us!
+
+## Contribute
+
+The tool comes with quite a few built-in fixers, but everyone is more than
+welcome to [contribute](CONTRIBUTING.md) more of them.
diff --git a/vendor/friendsofphp/php-cs-fixer/UPGRADE-v3.md b/vendor/friendsofphp/php-cs-fixer/UPGRADE-v3.md
new file mode 100644
index 0000000..dd27c88
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/UPGRADE-v3.md
@@ -0,0 +1,166 @@
+UPGRADE GUIDE FROM 2.x to 3.0
+=============================
+
+This is guide for upgrade from version 2.x to 3.0 for using the CLI tool.
+
+*Before following this guide, install [v2.19](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/tag/v2.19.0) and run in verbose mode (`php-cs-fixer fix -v`) or in future mode (`PHP_CS_FIXER_FUTURE_MODE=1 php-cs-fixer fix`) to identify deprecations and fix them first.*
+
+Rename of files
+---------------
+
+| 2.x | 3.0 | Description |
+| ---------------- | ------------------------ | -------------------------------------- |
+| `.php_cs` | `.php-cs-fixer.php` | Configuration file (local) |
+| `.php_cs.dist` | `.php-cs-fixer.dist.php` | Configuration file (to be distributed) |
+| `.php_cs.cache` | `.php-cs-fixer.cache` | Cache file |
+
+CLI options
+-----------
+
+| 2.x | 3.0 | Description | Note |
+| ---------------- | --------------- | ----------------------------------------------- | -------------------------------------- |
+| --diff-format | | Type of differ | Option was removed, all diffs are now |
+| | | | `udiff` |
+| --show-progress | --show-progress | Type of progress indicator | Allowed values were modified: |
+| | | | `run-in` and `estimating` was removed, |
+| | | | `estimating-max` was renamed to `dots` |
+| --rules | --rules | Default value changed from @PSR2 to @PSR12 | |
+| --config --rules | | | No longer allowed to pass both |
+
+Changes to rules
+----------------
+
+### Renamed rules
+
+Old name | New name | Note
+-------- | -------- | ----
+`blank_line_before_return` | `blank_line_before_statement` | use configuration `['statements' => ['return']]`
+`final_static_access` | `self_static_accessor` |
+`hash_to_slash_comment` | `single_line_comment_style` | use configuration `['comment_types' => ['hash']]`
+`lowercase_constants` | `constant_case` | use configuration `['case' => 'lower']`
+`method_separation` | `class_attributes_separation` | use configuration `['elements' => ['method']]`
+`no_extra_consecutive_blank_lines` | `no_extra_blank_lines` |
+`no_multiline_whitespace_before_semicolons` | `multiline_whitespace_before_semicolons` |
+`no_short_echo_tag` | `echo_tag_syntax` | use configuration `['format' => 'long']`
+`php_unit_ordered_covers` | `phpdoc_order_by_value` | use configuration `['annotations' => [ 'covers' ]]`
+`phpdoc_inline_tag` | `general_phpdoc_tag_rename`, `phpdoc_inline_tag_normalizer` and `phpdoc_tag_type` |
+`pre_increment` | `increment_style` | use configuration `['style' => 'pre']`
+`psr0` | `psr_autoloading` | use configuration `['dir' => x ]`
+`psr4` | `psr_autoloading` |
+`silenced_deprecation_error` | `error_suppression` |
+`trailing_comma_in_multiline_array` | `trailing_comma_in_multiline` | use configuration `['elements' => ['arrays']]`
+
+### Removed rootless configuration
+
+Rule | Root option | Note
+------------------------------------ | -------------- | ----
+`general_phpdoc_annotation_remove` | `annotations`
+`no_extra_consecutive_blank_lines` | `tokens`
+`no_spaces_around_offset` | `positions`
+`no_unneeded_control_parentheses` | `statements`
+`ordered_class_elements` | `order`
+`php_unit_construct` | `assertions`
+`php_unit_dedicate_assert` | `target` | root option works differently than rootless configuration
+`php_unit_strict` | `assertions`
+`phpdoc_no_alias_tag` | `replacements`
+`phpdoc_return_self_reference` | `replacements`
+`random_api_migration` | `replacements`
+`single_class_element_per_statement` | `elements`
+`visibility_required` | `elements`
+
+### Changed options
+
+Rule | Option | Change
+---- | ------ | ------
+`binary_operator_spaces` | `align_double_arrow` | option was removed, use `operators` instead
+`binary_operator_spaces` | `align_equals` | option was removed use `operators` instead
+`blank_line_before_statement` | `statements: die` | option `die` was removed from `statements`, use `exit` instead
+`class_attributes_separation` | `elements` | option does no longer accept flat array as a value, use map instead
+`class_definition` | `multiLineExtendsEachSingleLine` | option was renamed to `multi_line_extends_each_single_line`
+`class_definition` | `singleItemSingleLine` | option was renamed to `single_item_single_line`
+`class_definition` | `singleLine` | option was renamed to `single_line`
+`doctrine_annotation_spaces` | `around_argument_assignments` | option was removed, use `before_argument_assignments` and `after_argument_assignments` instead
+`doctrine_annotation_spaces` | `around_array_assignments` | option was removed, use `after_array_assignments_colon`, `after_array_assignments_equals`, `before_array_assignments_colon` and `before_array_assignments_equals` instead
+`final_internal_class` | `annotation-black-list` | option was renamed, use `annotation_exclude`
+`final_internal_class` | `annotation-white-list` | option was renamed, use `annotation_include`
+`final_internal_class` | `consider-absent-docblock-as-internal-class` | option was renamed, use `consider_absent_docblock_as_internal_class`
+`header_comment` | `commentType` | option was renamed to `comment_type`
+`is_null` | `use_yoda_style` | option was removed, use `yoda_style` rule instead
+`no_extra_consecutive_blank_lines` | `tokens` | one of possible values, `useTrait`, was renamed to `use_trait`
+`ordered_class_elements` | `sortAlgorithm` | option was renamed, use `sort_algorithm` instead
+`ordered_imports` | `importsOrder` | option was renamed, use `imports_order`
+`ordered_imports` | `sortAlgorithm` | option was renamed, use `sort_algorithm`
+`php_unit_dedicate_assert` | `functions` | option was removed, use `target` instead
+
+### Changed default values of options
+
+Rule | Option | Old value | New value
+---- | ---- | ---- | ----
+`array_syntax` | `syntax` | `'long'` | `'short'`
+`function_to_constant` | `functions` | `['get_class', 'php_sapi_name', 'phpversion', 'pi']` | `['get_called_class', 'get_class', 'php_sapi_name', 'phpversion', 'pi']`
+`list_syntax` | `syntax` | `'long'` | `'short'`
+`method_argument_space` | `on_multiline` | `'ignore'` | `'ensure_fully_multiline'`
+`native_constant_invocation` | `strict` | `false` | `true`
+`native_function_casing` | `include` | `'@internal'` | `'@compiler_optimized'`
+`native_function_invocation` | `include` | `'@internal'` | `'@compiler_optimized'`
+`native_function_invocation` | `strict` | `false` | `true`
+`non_printable_character` | `use_escape_sequences_in_strings` | `false` | `true` (when running on PHP 7.0 and up)
+`php_unit_dedicate_assert` | `target` | `'5.0'` | `'newest'`
+`phpdoc_align` | `tags` | `['param', 'return', 'throws', 'type', 'var']` | `['method', 'param', 'property', 'return', 'throws', 'type', 'var']`
+`phpdoc_scalar` | `types` | `['boolean', 'double', 'integer', 'real', 'str']` | `['boolean', 'callback', 'double', 'integer', 'real', 'str']`
+
+### Removed rule sets
+
+Rule set | Note
+-------- | ----
+`@PHP56Migration` | was empty
+
+### Rule behavior changes
+
+- `no_unused_imports` now runs all files defined in the configuration (used to exclude some hardcoded directories)
+
+### Various
+
+- `udiff` output now includes the file name in the output (if applicable)
+
+Code BC changes
+===============
+
+### Removed; various
+
+- class `AbstractAlignFixerHelper` has been removed
+- class `AccessibleObject` has been removed
+- class `AlignDoubleArrowFixerHelper` has been removed
+- class `AlignEqualsFixerHelper` has been removed
+- class `FixerConfigurationResolverRootless` has been removed
+- `HeaderCommentFixer` deprecated properties have been removed
+- `MethodArgumentSpaceFixer` deprecated methods have been removed
+- `NoMixedEchoPrintFixer` the property `$defaultConfig` has been removed
+- class `Tokens`, the following methods has been removed:
+ - `current()`
+ - `key()`
+ - `next()`
+ - `rewind()`
+ - `valid()`
+- namespace `PhpCsFixer\Test\` and each class in it has been removed, as it served pure development purpose and should not be part of production code - reach out to community if you are willing to help building dev package
+
+### Interface changes
+
+- `ConfigurableFixerInterface` has been updated
+- `ConfigurationDefinitionFixerInterface` has been removed in favor of the updated `ConfigurableFixerInterface`
+- `DefinedFixerInterface` has been removed, related methods are now part of the updated `FixerInterface` interface
+- `DifferInterface` has been updated
+- `FixerInterface` interface has been updated
+- `PhpCsFixer\RuleSetInterface` has been removed in favor of `\PhpCsFixer\RuleSet\RuleSetInterface`
+
+### BC breaks; various
+
+- class `Token` is now `final`
+- class `Tokens` is now `final`
+- method `create` of class `Config` has been removed, [use the constructor](./doc/config.rst)
+- method `create` of class `RuleSet` has been removed, [use the constructor](./doc/custom_rules.rst)
+
+### BC breaks; common internal classes
+
+- method `getClassyElements` of class `TokensAnalyzer` parameter `$returnTraitsImports` has been removed; now always returns trait import information
+- method `getSetDefinitionNames` of class `RuleSet` has been removed, use `RuleSets::getSetDefinitionNames()`
diff --git a/vendor/friendsofphp/php-cs-fixer/ci-integration.sh b/vendor/friendsofphp/php-cs-fixer/ci-integration.sh
new file mode 100644
index 0000000..2521e24
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/ci-integration.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -eu
+
+IFS='
+'
+CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${COMMIT_RANGE}")
+if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
+vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
diff --git a/vendor/friendsofphp/php-cs-fixer/composer.json b/vendor/friendsofphp/php-cs-fixer/composer.json
new file mode 100644
index 0000000..cc250f4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/composer.json
@@ -0,0 +1,72 @@
+{
+ "name": "friendsofphp/php-cs-fixer",
+ "type": "application",
+ "description": "A tool to automatically fix PHP code style",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Dariusz Rumiński",
+ "email": "dariusz.ruminski@gmail.com"
+ }
+ ],
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "ext-json": "*",
+ "ext-tokenizer": "*",
+ "composer/semver": "^3.2",
+ "composer/xdebug-handler": "^2.0",
+ "doctrine/annotations": "^1.12",
+ "php-cs-fixer/diff": "^2.0",
+ "symfony/console": "^4.4.20 || ^5.1.3",
+ "symfony/event-dispatcher": "^4.4.20 || ^5.0",
+ "symfony/filesystem": "^4.4.20 || ^5.0",
+ "symfony/finder": "^4.4.20 || ^5.0",
+ "symfony/options-resolver": "^4.4.20 || ^5.0",
+ "symfony/polyfill-php72": "^1.23",
+ "symfony/polyfill-php80": "^1.23",
+ "symfony/polyfill-php81": "^1.23",
+ "symfony/process": "^4.4.20 || ^5.0",
+ "symfony/stopwatch": "^4.4.20 || ^5.0"
+ },
+ "require-dev": {
+ "justinrainbow/json-schema": "^5.2",
+ "keradus/cli-executor": "^1.5",
+ "mikey179/vfsstream": "^1.6.8",
+ "php-coveralls/php-coveralls": "^2.4.3",
+ "php-cs-fixer/accessible-object": "^1.1",
+ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
+ "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
+ "phpspec/prophecy": "^1.10.3",
+ "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5",
+ "phpunitgoodpractices/polyfill": "^1.5",
+ "phpunitgoodpractices/traits": "^1.9.1",
+ "symfony/phpunit-bridge": "^5.2.4",
+ "symfony/yaml": "^4.4.20 || ^5.0"
+ },
+ "suggest": {
+ "ext-dom": "For handling output formats in XML",
+ "ext-mbstring": "For handling non-UTF8 characters.",
+ "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpCsFixer\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "PhpCsFixer\\Tests\\": "tests/"
+ }
+ },
+ "bin": [
+ "php-cs-fixer"
+ ]
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/logo.md b/vendor/friendsofphp/php-cs-fixer/logo.md
new file mode 100644
index 0000000..16fc6d1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/logo.md
@@ -0,0 +1,3 @@
+The logo is © 2010-2021 Sensio Labs.
+
+Original resolution can be found at https://github.com/PHP-CS-Fixer/logo .
diff --git a/vendor/friendsofphp/php-cs-fixer/logo.png b/vendor/friendsofphp/php-cs-fixer/logo.png
new file mode 100644
index 0000000..0ee90a8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/logo.png
Binary files differ
diff --git a/vendor/friendsofphp/php-cs-fixer/php-cs-fixer b/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
new file mode 100755
index 0000000..a1bac4b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
@@ -0,0 +1,115 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
+
+if (defined('HHVM_VERSION_ID')) {
+ fwrite(STDERR, "HHVM is not supported.\n");
+
+ if (getenv('PHP_CS_FIXER_IGNORE_ENV')) {
+ fwrite(STDERR, "Ignoring environment requirements because `PHP_CS_FIXER_IGNORE_ENV` is set. Execution may be unstable.\n");
+ } else {
+ exit(1);
+ }
+} elseif (!defined('PHP_VERSION_ID')) { // PHP_VERSION_ID is available as of PHP 5.2.7
+ fwrite(STDERR, 'PHP version no supported, please update. Current PHP version: '.PHP_VERSION.".\n");
+
+ exit(1);
+} elseif (\PHP_VERSION_ID === 80000) {
+ fwrite(STDERR, "PHP CS Fixer is not able run on PHP 8.0.0 due to bug in PHP tokenizer (https://bugs.php.net/bug.php?id=80462).\n");
+ fwrite(STDERR, "Update PHP version to unblock execution.\n");
+
+ exit(1);
+} elseif (
+ \PHP_VERSION_ID < 70200
+ || \PHP_VERSION_ID >= 80100
+) {
+ fwrite(STDERR, "PHP needs to be a minimum version of PHP 7.2.0 and maximum version of PHP 8.0.*.\n");
+ fwrite(STDERR, 'Current PHP version: '.PHP_VERSION.".\n");
+
+ if (getenv('PHP_CS_FIXER_IGNORE_ENV')) {
+ fwrite(STDERR, "Ignoring environment requirements because `PHP_CS_FIXER_IGNORE_ENV` is set. Execution may be unstable.\n");
+ } else {
+ fwrite(STDERR, "To ignore this requirement please set `PHP_CS_FIXER_IGNORE_ENV`.\n");
+ fwrite(STDERR, "If you use PHP version higher than supported, you may experience code modified in a wrong way.\n");
+ fwrite(STDERR, "Please report such cases at https://github.com/FriendsOfPHP/PHP-CS-Fixer .\n");
+
+ exit(1);
+ }
+}
+
+foreach (['json', 'tokenizer'] as $extension) {
+ if (!extension_loaded($extension)) {
+ fwrite(STDERR, sprintf("PHP extension ext-%s is missing from your system. Install or enable it.\n", $extension));
+
+ if (getenv('PHP_CS_FIXER_IGNORE_ENV')) {
+ fwrite(STDERR, "Ignoring environment requirements because `PHP_CS_FIXER_IGNORE_ENV` is set. Execution may be unstable.\n");
+ } else {
+ exit(1);
+ }
+ }
+}
+unset($extension);
+
+set_error_handler(static function ($severity, $message, $file, $line) {
+ if ($severity & error_reporting()) {
+ throw new ErrorException($message, 0, $severity, $file, $line);
+ }
+});
+
+$require = true;
+if (class_exists('Phar')) {
+ // Maybe this file is used as phar-stub? Let's try!
+ try {
+ Phar::mapPhar('php-cs-fixer.phar');
+
+ require_once 'phar://php-cs-fixer.phar/vendor/autoload.php';
+ $require = false;
+ } catch (PharException $e) {
+ }
+}
+
+if ($require) {
+ // OK, it's not, let give Composer autoloader a try!
+ $possibleFiles = [__DIR__.'/../../autoload.php', __DIR__.'/../autoload.php', __DIR__.'/vendor/autoload.php'];
+ $file = null;
+ foreach ($possibleFiles as $possibleFile) {
+ if (file_exists($possibleFile)) {
+ $file = $possibleFile;
+
+ break;
+ }
+ }
+
+ if (null === $file) {
+ throw new RuntimeException('Unable to locate autoload.php file.');
+ }
+
+ require_once $file;
+
+ unset($possibleFiles, $possibleFile, $file);
+}
+unset($require);
+
+use Composer\XdebugHandler\XdebugHandler;
+use PhpCsFixer\Console\Application;
+
+// Restart if xdebug is loaded, unless the environment variable PHP_CS_FIXER_ALLOW_XDEBUG is set.
+$xdebug = new XdebugHandler('PHP_CS_FIXER', '--ansi');
+$xdebug->check();
+unset($xdebug);
+
+$application = new Application();
+$application->run();
+
+__HALT_COMPILER();
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php
new file mode 100644
index 0000000..857067e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php
@@ -0,0 +1,233 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Doctrine\Annotation\Tokens as DoctrineAnnotationTokens;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @internal
+ */
+abstract class AbstractDoctrineAnnotationFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array
+ */
+ private $classyElements;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // fetch indexes one time, this is safe as we never add or remove a token during fixing
+ $analyzer = new TokensAnalyzer($tokens);
+ $this->classyElements = $analyzer->getClassyElements();
+
+ /** @var Token $docCommentToken */
+ foreach ($tokens->findGivenKind(T_DOC_COMMENT) as $index => $docCommentToken) {
+ if (!$this->nextElementAcceptsDoctrineAnnotations($tokens, $index)) {
+ continue;
+ }
+
+ $doctrineAnnotationTokens = DoctrineAnnotationTokens::createFromDocComment(
+ $docCommentToken,
+ $this->configuration['ignored_tags']
+ );
+ $this->fixAnnotations($doctrineAnnotationTokens);
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doctrineAnnotationTokens->getCode()]);
+ }
+ }
+
+ /**
+ * Fixes Doctrine annotations from the given PHPDoc style comment.
+ */
+ abstract protected function fixAnnotations(DoctrineAnnotationTokens $doctrineAnnotationTokens): void;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('ignored_tags', 'List of tags that must not be treated as Doctrine Annotations.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $values): bool {
+ foreach ($values as $value) {
+ if (!\is_string($value)) {
+ return false;
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([
+ // PHPDocumentor 1
+ 'abstract',
+ 'access',
+ 'code',
+ 'deprec',
+ 'encode',
+ 'exception',
+ 'final',
+ 'ingroup',
+ 'inheritdoc',
+ 'inheritDoc',
+ 'magic',
+ 'name',
+ 'toc',
+ 'tutorial',
+ 'private',
+ 'static',
+ 'staticvar',
+ 'staticVar',
+ 'throw',
+
+ // PHPDocumentor 2
+ 'api',
+ 'author',
+ 'category',
+ 'copyright',
+ 'deprecated',
+ 'example',
+ 'filesource',
+ 'global',
+ 'ignore',
+ 'internal',
+ 'license',
+ 'link',
+ 'method',
+ 'package',
+ 'param',
+ 'property',
+ 'property-read',
+ 'property-write',
+ 'return',
+ 'see',
+ 'since',
+ 'source',
+ 'subpackage',
+ 'throws',
+ 'todo',
+ 'TODO',
+ 'usedBy',
+ 'uses',
+ 'var',
+ 'version',
+
+ // PHPUnit
+ 'after',
+ 'afterClass',
+ 'backupGlobals',
+ 'backupStaticAttributes',
+ 'before',
+ 'beforeClass',
+ 'codeCoverageIgnore',
+ 'codeCoverageIgnoreStart',
+ 'codeCoverageIgnoreEnd',
+ 'covers',
+ 'coversDefaultClass',
+ 'coversNothing',
+ 'dataProvider',
+ 'depends',
+ 'expectedException',
+ 'expectedExceptionCode',
+ 'expectedExceptionMessage',
+ 'expectedExceptionMessageRegExp',
+ 'group',
+ 'large',
+ 'medium',
+ 'preserveGlobalState',
+ 'requires',
+ 'runTestsInSeparateProcesses',
+ 'runInSeparateProcess',
+ 'small',
+ 'test',
+ 'testdox',
+ 'ticket',
+ 'uses',
+
+ // PHPCheckStyle
+ 'SuppressWarnings',
+
+ // PHPStorm
+ 'noinspection',
+
+ // PEAR
+ 'package_version',
+
+ // PlantUML
+ 'enduml',
+ 'startuml',
+
+ // Psalm
+ 'psalm',
+
+ // PHPStan
+ 'phpstan',
+ 'template',
+
+ // other
+ 'fix',
+ 'FIXME',
+ 'fixme',
+ 'override',
+ ])
+ ->getOption(),
+ ]);
+ }
+
+ private function nextElementAcceptsDoctrineAnnotations(Tokens $tokens, int $index): bool
+ {
+ do {
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $index) {
+ return false;
+ }
+ } while ($tokens[$index]->isGivenKind([T_ABSTRACT, T_FINAL]));
+
+ if ($tokens[$index]->isClassy()) {
+ return true;
+ }
+
+ $modifierKinds = [T_PUBLIC, T_PROTECTED, T_PRIVATE, T_FINAL, T_ABSTRACT, T_NS_SEPARATOR, T_STRING, CT::T_NULLABLE_TYPE];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $modifierKinds[] = T_READONLY;
+ }
+
+ while ($tokens[$index]->isGivenKind($modifierKinds)) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return isset($this->classyElements[$index]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php
new file mode 100644
index 0000000..3b29809
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php
@@ -0,0 +1,203 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\ConfigurationException\InvalidForEnvFixerConfigurationException;
+use PhpCsFixer\ConfigurationException\RequiredFixerConfigurationException;
+use PhpCsFixer\Console\Application;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\DeprecatedFixerOption;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\InvalidOptionsForEnvException;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Exception\ExceptionInterface;
+use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+abstract class AbstractFixer implements FixerInterface
+{
+ /**
+ * @var null|array<string, mixed>
+ */
+ protected $configuration;
+
+ /**
+ * @var WhitespacesFixerConfig
+ */
+ protected $whitespacesConfig;
+
+ /**
+ * @var null|FixerConfigurationResolverInterface
+ */
+ private $configurationDefinition;
+
+ public function __construct()
+ {
+ if ($this instanceof ConfigurableFixerInterface) {
+ try {
+ $this->configure([]);
+ } catch (RequiredFixerConfigurationException $e) {
+ // ignore
+ }
+ }
+
+ if ($this instanceof WhitespacesAwareFixerInterface) {
+ $this->whitespacesConfig = $this->getDefaultWhitespacesFixerConfig();
+ }
+ }
+
+ final public function fix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if ($this instanceof ConfigurableFixerInterface && null === $this->configuration) {
+ throw new RequiredFixerConfigurationException($this->getName(), 'Configuration is required.');
+ }
+
+ if (0 < $tokens->count() && $this->isCandidate($tokens) && $this->supports($file)) {
+ $this->applyFix($file, $tokens);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName(): string
+ {
+ $nameParts = explode('\\', static::class);
+ $name = substr(end($nameParts), 0, -\strlen('Fixer'));
+
+ return Utils::camelCaseToUnderscore($name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports(\SplFileInfo $file): bool
+ {
+ return true;
+ }
+
+ public function configure(array $configuration): void
+ {
+ if (!$this instanceof ConfigurableFixerInterface) {
+ throw new \LogicException('Cannot configure using Abstract parent, child not implementing "PhpCsFixer\Fixer\ConfigurableFixerInterface".');
+ }
+
+ foreach ($this->getConfigurationDefinition()->getOptions() as $option) {
+ if (!$option instanceof DeprecatedFixerOption) {
+ continue;
+ }
+
+ $name = $option->getName();
+ if (\array_key_exists($name, $configuration)) {
+ Utils::triggerDeprecation(new \InvalidArgumentException(sprintf(
+ 'Option "%s" for rule "%s" is deprecated and will be removed in version %d.0. %s',
+ $name,
+ $this->getName(),
+ Application::getMajorVersion() + 1,
+ str_replace('`', '"', $option->getDeprecationMessage())
+ )));
+ }
+ }
+
+ try {
+ $this->configuration = $this->getConfigurationDefinition()->resolve($configuration);
+ } catch (MissingOptionsException $exception) {
+ throw new RequiredFixerConfigurationException(
+ $this->getName(),
+ sprintf('Missing required configuration: %s', $exception->getMessage()),
+ $exception
+ );
+ } catch (InvalidOptionsForEnvException $exception) {
+ throw new InvalidForEnvFixerConfigurationException(
+ $this->getName(),
+ sprintf('Invalid configuration for env: %s', $exception->getMessage()),
+ $exception
+ );
+ } catch (ExceptionInterface $exception) {
+ throw new InvalidFixerConfigurationException(
+ $this->getName(),
+ sprintf('Invalid configuration: %s', $exception->getMessage()),
+ $exception
+ );
+ }
+ }
+
+ public function getConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ if (!$this instanceof ConfigurableFixerInterface) {
+ throw new \LogicException(sprintf('Cannot get configuration definition using Abstract parent, child "%s" not implementing "PhpCsFixer\Fixer\ConfigurableFixerInterface".', static::class));
+ }
+
+ if (null === $this->configurationDefinition) {
+ $this->configurationDefinition = $this->createConfigurationDefinition();
+ }
+
+ return $this->configurationDefinition;
+ }
+
+ public function setWhitespacesConfig(WhitespacesFixerConfig $config): void
+ {
+ if (!$this instanceof WhitespacesAwareFixerInterface) {
+ throw new \LogicException('Cannot run method for class not implementing "PhpCsFixer\Fixer\WhitespacesAwareFixerInterface".');
+ }
+
+ $this->whitespacesConfig = $config;
+ }
+
+ abstract protected function applyFix(\SplFileInfo $file, Tokens $tokens): void;
+
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ if (!$this instanceof ConfigurableFixerInterface) {
+ throw new \LogicException('Cannot create configuration definition using Abstract parent, child not implementing "PhpCsFixer\Fixer\ConfigurableFixerInterface".');
+ }
+
+ throw new \LogicException('Not implemented.');
+ }
+
+ private function getDefaultWhitespacesFixerConfig(): WhitespacesFixerConfig
+ {
+ static $defaultWhitespacesFixerConfig = null;
+
+ if (null === $defaultWhitespacesFixerConfig) {
+ $defaultWhitespacesFixerConfig = new WhitespacesFixerConfig(' ', "\n");
+ }
+
+ return $defaultWhitespacesFixerConfig;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractFopenFlagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractFopenFlagFixer.php
new file mode 100644
index 0000000..e9d7a12
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractFopenFlagFixer.php
@@ -0,0 +1,122 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+abstract class AbstractFopenFlagFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_STRING, T_CONSTANT_ENCAPSED_STRING]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ $index = 0;
+ $end = $tokens->count() - 1;
+ while (true) {
+ $candidate = $this->find('fopen', $tokens, $index, $end);
+
+ if (null === $candidate) {
+ break;
+ }
+
+ $index = $candidate[1]; // proceed to '(' of `fopen`
+
+ // fetch arguments
+ $arguments = $argumentsAnalyzer->getArguments(
+ $tokens,
+ $index,
+ $candidate[2]
+ );
+
+ $argumentsCount = \count($arguments); // argument count sanity check
+
+ if ($argumentsCount < 2 || $argumentsCount > 4) {
+ continue;
+ }
+
+ $argumentStartIndex = array_keys($arguments)[1]; // get second argument index
+
+ $this->fixFopenFlagToken(
+ $tokens,
+ $argumentStartIndex,
+ $arguments[$argumentStartIndex]
+ );
+ }
+ }
+
+ abstract protected function fixFopenFlagToken(Tokens $tokens, int $argumentStartIndex, int $argumentEndIndex): void;
+
+ protected function isValidModeString(string $mode): bool
+ {
+ $modeLength = \strlen($mode);
+ if ($modeLength < 1 || $modeLength > 13) { // 13 === length 'r+w+a+x+c+etb'
+ return false;
+ }
+
+ $validFlags = [
+ 'a' => true,
+ 'b' => true,
+ 'c' => true,
+ 'e' => true,
+ 'r' => true,
+ 't' => true,
+ 'w' => true,
+ 'x' => true,
+ ];
+
+ if (!isset($validFlags[$mode[0]])) {
+ return false;
+ }
+
+ unset($validFlags[$mode[0]]);
+
+ for ($i = 1; $i < $modeLength; ++$i) {
+ if (isset($validFlags[$mode[$i]])) {
+ unset($validFlags[$mode[$i]]);
+
+ continue;
+ }
+
+ if ('+' !== $mode[$i]
+ || (
+ 'a' !== $mode[$i - 1] // 'a+','c+','r+','w+','x+'
+ && 'c' !== $mode[$i - 1]
+ && 'r' !== $mode[$i - 1]
+ && 'w' !== $mode[$i - 1]
+ && 'x' !== $mode[$i - 1]
+ )
+ ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractFunctionReferenceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractFunctionReferenceFixer.php
new file mode 100644
index 0000000..1f36fce
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractFunctionReferenceFixer.php
@@ -0,0 +1,80 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ *
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ */
+abstract class AbstractFunctionReferenceFixer extends AbstractFixer
+{
+ /**
+ * @var null|FunctionsAnalyzer
+ */
+ private $functionsAnalyzer;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * Looks up Tokens sequence for suitable candidates and delivers boundaries information,
+ * which can be supplied by other methods in this abstract class.
+ *
+ * @return null|int[] returns $functionName, $openParenthesis, $closeParenthesis packed into array
+ */
+ protected function find(string $functionNameToSearch, Tokens $tokens, int $start = 0, ?int $end = null): ?array
+ {
+ if (null === $this->functionsAnalyzer) {
+ $this->functionsAnalyzer = new FunctionsAnalyzer();
+ }
+
+ // make interface consistent with findSequence
+ $end = $end ?? $tokens->count();
+
+ // find raw sequence which we can analyse for context
+ $candidateSequence = [[T_STRING, $functionNameToSearch], '('];
+ $matches = $tokens->findSequence($candidateSequence, $start, $end, false);
+ if (null === $matches) {
+ // not found, simply return without further attempts
+ return null;
+ }
+
+ // translate results for humans
+ [$functionName, $openParenthesis] = array_keys($matches);
+
+ if (!$this->functionsAnalyzer->isGlobalFunctionCall($tokens, $functionName)) {
+ return $this->find($functionNameToSearch, $tokens, $openParenthesis, $end);
+ }
+
+ return [$functionName, $openParenthesis, $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openParenthesis)];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractLinesBeforeNamespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractLinesBeforeNamespaceFixer.php
new file mode 100644
index 0000000..3fdd94f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractLinesBeforeNamespaceFixer.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * This abstract fixer is responsible for ensuring that a certain number of
+ * lines prefix a namespace declaration.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ *
+ * @internal
+ */
+abstract class AbstractLinesBeforeNamespaceFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * Make sure # of line breaks prefixing namespace is within given range.
+ *
+ * @param int $expectedMin min. # of line breaks
+ * @param int $expectedMax max. # of line breaks
+ */
+ protected function fixLinesBeforeNamespace(Tokens $tokens, int $index, int $expectedMin, int $expectedMax): void
+ {
+ // Let's determine the total numbers of new lines before the namespace
+ // and the opening token
+ $openingTokenIndex = null;
+ $precedingNewlines = 0;
+ $newlineInOpening = false;
+ $openingToken = null;
+ for ($i = 1; $i <= 2; ++$i) {
+ if (isset($tokens[$index - $i])) {
+ $token = $tokens[$index - $i];
+ if ($token->isGivenKind(T_OPEN_TAG)) {
+ $openingToken = $token;
+ $openingTokenIndex = $index - $i;
+ $newlineInOpening = str_contains($token->getContent(), "\n");
+ if ($newlineInOpening) {
+ ++$precedingNewlines;
+ }
+
+ break;
+ }
+ if (false === $token->isGivenKind(T_WHITESPACE)) {
+ break;
+ }
+ $precedingNewlines += substr_count($token->getContent(), "\n");
+ }
+ }
+
+ if ($precedingNewlines >= $expectedMin && $precedingNewlines <= $expectedMax) {
+ return;
+ }
+
+ $previousIndex = $index - 1;
+ $previous = $tokens[$previousIndex];
+
+ if (0 === $expectedMax) {
+ // Remove all the previous new lines
+ if ($previous->isWhitespace()) {
+ $tokens->clearAt($previousIndex);
+ }
+ // Remove new lines in opening token
+ if ($newlineInOpening) {
+ $tokens[$openingTokenIndex] = new Token([T_OPEN_TAG, rtrim($openingToken->getContent()).' ']);
+ }
+
+ return;
+ }
+
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+ $newlinesForWhitespaceToken = $expectedMax;
+ if (null !== $openingToken) {
+ // Use the configured line ending for the PHP opening tag
+ $content = rtrim($openingToken->getContent());
+ $newContent = $content.$lineEnding;
+ $tokens[$openingTokenIndex] = new Token([T_OPEN_TAG, $newContent]);
+ --$newlinesForWhitespaceToken;
+ }
+ if (0 === $newlinesForWhitespaceToken) {
+ // We have all the needed new lines in the opening tag
+ if ($previous->isWhitespace()) {
+ // Let's remove the previous token containing extra new lines
+ $tokens->clearAt($previousIndex);
+ }
+
+ return;
+ }
+ if ($previous->isWhitespace()) {
+ // Fix the previous whitespace token
+ $tokens[$previousIndex] = new Token([T_WHITESPACE, str_repeat($lineEnding, $newlinesForWhitespaceToken).substr($previous->getContent(), strrpos($previous->getContent(), "\n") + 1)]);
+ } else {
+ // Add a new whitespace token
+ $tokens->insertAt($index, new Token([T_WHITESPACE, str_repeat($lineEnding, $newlinesForWhitespaceToken)]));
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractNoUselessElseFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractNoUselessElseFixer.php
new file mode 100644
index 0000000..7aeebb7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractNoUselessElseFixer.php
@@ -0,0 +1,207 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Tokenizer\Tokens;
+
+abstract class AbstractNoUselessElseFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // should be run before NoWhitespaceInBlankLineFixer, NoExtraBlankLinesFixer, BracesFixer and after NoEmptyStatementFixer.
+ return 39;
+ }
+
+ protected function isSuperfluousElse(Tokens $tokens, int $index): bool
+ {
+ $previousBlockStart = $index;
+
+ do {
+ // Check if all 'if', 'else if ' and 'elseif' blocks above this 'else' always end,
+ // if so this 'else' is overcomplete.
+ [$previousBlockStart, $previousBlockEnd] = $this->getPreviousBlock($tokens, $previousBlockStart);
+
+ // short 'if' detection
+ $previous = $previousBlockEnd;
+ if ($tokens[$previous]->equals('}')) {
+ $previous = $tokens->getPrevMeaningfulToken($previous);
+ }
+
+ if (
+ !$tokens[$previous]->equals(';') // 'if' block doesn't end with semicolon, keep 'else'
+ || $tokens[$tokens->getPrevMeaningfulToken($previous)]->equals('{') // empty 'if' block, keep 'else'
+ ) {
+ return false;
+ }
+
+ $candidateIndex = $tokens->getPrevTokenOfKind(
+ $previous,
+ [
+ ';',
+ [T_BREAK],
+ [T_CLOSE_TAG],
+ [T_CONTINUE],
+ [T_EXIT],
+ [T_GOTO],
+ [T_IF],
+ [T_RETURN],
+ [T_THROW],
+ ]
+ );
+
+ if (null === $candidateIndex || $tokens[$candidateIndex]->equalsAny([';', [T_CLOSE_TAG], [T_IF]])) {
+ return false;
+ }
+
+ if ($tokens[$candidateIndex]->equals([T_THROW])) {
+ $previousIndex = $tokens->getPrevMeaningfulToken($candidateIndex);
+
+ if (!$tokens[$previousIndex]->equalsAny([';', '{'])) {
+ return false;
+ }
+ }
+
+ if ($this->isInConditional($tokens, $candidateIndex, $previousBlockStart)
+ || $this->isInConditionWithoutBraces($tokens, $candidateIndex, $previousBlockStart)
+ ) {
+ return false;
+ }
+
+ // implicit continue, i.e. delete candidate
+ } while (!$tokens[$previousBlockStart]->isGivenKind(T_IF));
+
+ return true;
+ }
+
+ /**
+ * Return the first and last token index of the previous block.
+ *
+ * [0] First is either T_IF, T_ELSE or T_ELSEIF
+ * [1] Last is either '}' or ';' / T_CLOSE_TAG for short notation blocks
+ *
+ * @param int $index T_IF, T_ELSE, T_ELSEIF
+ *
+ * @return int[]
+ */
+ private function getPreviousBlock(Tokens $tokens, int $index): array
+ {
+ $close = $previous = $tokens->getPrevMeaningfulToken($index);
+ // short 'if' detection
+ if ($tokens[$close]->equals('}')) {
+ $previous = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $close);
+ }
+
+ $open = $tokens->getPrevTokenOfKind($previous, [[T_IF], [T_ELSE], [T_ELSEIF]]);
+ if ($tokens[$open]->isGivenKind(T_IF)) {
+ $elseCandidate = $tokens->getPrevMeaningfulToken($open);
+ if ($tokens[$elseCandidate]->isGivenKind(T_ELSE)) {
+ $open = $elseCandidate;
+ }
+ }
+
+ return [$open, $close];
+ }
+
+ /**
+ * @param int $index Index of the token to check
+ * @param int $lowerLimitIndex Lower limit index. Since the token to check will always be in a conditional we must stop checking at this index
+ */
+ private function isInConditional(Tokens $tokens, int $index, int $lowerLimitIndex): bool
+ {
+ $candidateIndex = $tokens->getPrevTokenOfKind($index, [')', ';', ':']);
+ if ($tokens[$candidateIndex]->equals(':')) {
+ return true;
+ }
+
+ if (!$tokens[$candidateIndex]->equals(')')) {
+ return false; // token is ';' or close tag
+ }
+
+ // token is always ')' here.
+ // If it is part of the condition the token is always in, return false.
+ // If it is not it is a nested condition so return true
+ $open = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $candidateIndex);
+
+ return $tokens->getPrevMeaningfulToken($open) > $lowerLimitIndex;
+ }
+
+ /**
+ * For internal use only, as it is not perfect.
+ *
+ * Returns if the token at given index is part of a if/elseif/else statement
+ * without {}. Assumes not passing the last `;`/close tag of the statement, not
+ * out of range index, etc.
+ *
+ * @param int $index Index of the token to check
+ */
+ private function isInConditionWithoutBraces(Tokens $tokens, int $index, int $lowerLimitIndex): bool
+ {
+ do {
+ if ($tokens[$index]->isComment() || $tokens[$index]->isWhitespace()) {
+ $index = $tokens->getPrevMeaningfulToken($index);
+ }
+
+ $token = $tokens[$index];
+ if ($token->isGivenKind([T_IF, T_ELSEIF, T_ELSE])) {
+ return true;
+ }
+
+ if ($token->equals(';')) {
+ return false;
+ }
+
+ if ($token->equals('{')) {
+ $index = $tokens->getPrevMeaningfulToken($index);
+
+ // OK if belongs to: for, do, while, foreach
+ // Not OK if belongs to: if, else, elseif
+ if ($tokens[$index]->isGivenKind(T_DO)) {
+ --$index;
+
+ continue;
+ }
+
+ if (!$tokens[$index]->equals(')')) {
+ return false; // like `else {`
+ }
+
+ $index = $tokens->findBlockStart(
+ Tokens::BLOCK_TYPE_PARENTHESIS_BRACE,
+ $index
+ );
+
+ $index = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$index]->isGivenKind([T_IF, T_ELSEIF])) {
+ return false;
+ }
+ } elseif ($token->equals(')')) {
+ $type = Tokens::detectBlockType($token);
+ $index = $tokens->findBlockStart(
+ $type['type'],
+ $index
+ );
+
+ $index = $tokens->getPrevMeaningfulToken($index);
+ } else {
+ --$index;
+ }
+ } while ($index > $lowerLimitIndex);
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php
new file mode 100644
index 0000000..57bb418
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocToTypeDeclarationFixer.php
@@ -0,0 +1,225 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+abstract class AbstractPhpdocToTypeDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var string
+ */
+ private $classRegex = '/^\\\\?[a-zA-Z_\\x7f-\\xff](?:\\\\?[a-zA-Z0-9_\\x7f-\\xff]+)*$/';
+
+ /**
+ * @var array<string, int>
+ */
+ private $versionSpecificTypes = [
+ 'void' => 70100,
+ 'iterable' => 70100,
+ 'object' => 70200,
+ 'mixed' => 80000,
+ ];
+
+ /**
+ * @var array<string, bool>
+ */
+ private $scalarTypes = [
+ 'bool' => true,
+ 'float' => true,
+ 'int' => true,
+ 'string' => true,
+ ];
+
+ /**
+ * @var array<string, bool>
+ */
+ private static $syntaxValidationCache = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ abstract protected function isSkippedType(string $type): bool;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('scalar_types', 'Fix also scalar types; may have unexpected behaviour due to PHP bad type coercion system.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param int $index The index of the function token
+ */
+ protected function findFunctionDocComment(Tokens $tokens, int $index): ?int
+ {
+ do {
+ $index = $tokens->getPrevNonWhitespace($index);
+ } while ($tokens[$index]->isGivenKind([
+ T_COMMENT,
+ T_ABSTRACT,
+ T_FINAL,
+ T_PRIVATE,
+ T_PROTECTED,
+ T_PUBLIC,
+ T_STATIC,
+ ]));
+
+ if ($tokens[$index]->isGivenKind(T_DOC_COMMENT)) {
+ return $index;
+ }
+
+ return null;
+ }
+
+ /**
+ * @return Annotation[]
+ */
+ protected function getAnnotationsFromDocComment(string $name, Tokens $tokens, int $docCommentIndex): array
+ {
+ $namespacesAnalyzer = new NamespacesAnalyzer();
+ $namespace = $namespacesAnalyzer->getNamespaceAt($tokens, $docCommentIndex);
+
+ $namespaceUsesAnalyzer = new NamespaceUsesAnalyzer();
+ $namespaceUses = $namespaceUsesAnalyzer->getDeclarationsInNamespace($tokens, $namespace);
+
+ $doc = new DocBlock(
+ $tokens[$docCommentIndex]->getContent(),
+ $namespace,
+ $namespaceUses
+ );
+
+ return $doc->getAnnotationsOfType($name);
+ }
+
+ /**
+ * @return Token[]
+ */
+ protected function createTypeDeclarationTokens(string $type, bool $isNullable): array
+ {
+ static $specialTypes = [
+ 'array' => [CT::T_ARRAY_TYPEHINT, 'array'],
+ 'callable' => [T_CALLABLE, 'callable'],
+ 'static' => [T_STATIC, 'static'],
+ ];
+
+ $newTokens = [];
+
+ if (true === $isNullable && 'mixed' !== $type) {
+ $newTokens[] = new Token([CT::T_NULLABLE_TYPE, '?']);
+ }
+
+ if (isset($specialTypes[$type])) {
+ $newTokens[] = new Token($specialTypes[$type]);
+ } else {
+ $typeUnqualified = ltrim($type, '\\');
+
+ if (isset($this->scalarTypes[$typeUnqualified]) || isset($this->versionSpecificTypes[$typeUnqualified])) {
+ // 'scalar's, 'void', 'iterable' and 'object' must be unqualified
+ $newTokens[] = new Token([T_STRING, $typeUnqualified]);
+ } else {
+ foreach (explode('\\', $type) as $nsIndex => $value) {
+ if (0 === $nsIndex && '' === $value) {
+ continue;
+ }
+
+ if (0 < $nsIndex) {
+ $newTokens[] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+
+ $newTokens[] = new Token([T_STRING, $value]);
+ }
+ }
+ }
+
+ return $newTokens;
+ }
+
+ protected function getCommonTypeFromAnnotation(Annotation $annotation, bool $isReturnType): ?array
+ {
+ $typesExpression = $annotation->getTypeExpression();
+
+ $commonType = $typesExpression->getCommonType();
+ $isNullable = $typesExpression->allowsNull();
+
+ if (null === $commonType) {
+ return null;
+ }
+
+ if ($isNullable && 'void' === $commonType) {
+ return null;
+ }
+
+ if ('static' === $commonType && (!$isReturnType || \PHP_VERSION_ID < 80000)) {
+ $commonType = 'self';
+ }
+
+ if ($this->isSkippedType($commonType)) {
+ return null;
+ }
+
+ if (isset($this->versionSpecificTypes[$commonType]) && \PHP_VERSION_ID < $this->versionSpecificTypes[$commonType]) {
+ return null;
+ }
+
+ if (isset($this->scalarTypes[$commonType])) {
+ if (false === $this->configuration['scalar_types']) {
+ return null;
+ }
+ } elseif (1 !== Preg::match($this->classRegex, $commonType)) {
+ return null;
+ }
+
+ return [$commonType, $isNullable];
+ }
+
+ final protected function isValidSyntax(string $code): bool
+ {
+ if (!isset(self::$syntaxValidationCache[$code])) {
+ try {
+ Tokens::fromCode($code);
+ self::$syntaxValidationCache[$code] = true;
+ } catch (\ParseError $e) {
+ self::$syntaxValidationCache[$code] = false;
+ }
+ }
+
+ return self::$syntaxValidationCache[$code];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocTypesFixer.php
new file mode 100644
index 0000000..844ef7e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractPhpdocTypesFixer.php
@@ -0,0 +1,128 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * This abstract fixer provides a base for fixers to fix types in PHPDoc.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ *
+ * @internal
+ */
+abstract class AbstractPhpdocTypesFixer extends AbstractFixer
+{
+ /**
+ * The annotation tags search inside.
+ *
+ * @var string[]
+ */
+ protected $tags;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->tags = Annotation::getTagsWithTypes();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $annotations = $doc->getAnnotationsOfType($this->tags);
+
+ if (empty($annotations)) {
+ continue;
+ }
+
+ foreach ($annotations as $annotation) {
+ $this->fixTypes($annotation);
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+
+ /**
+ * Actually normalize the given type.
+ */
+ abstract protected function normalize(string $type): string;
+
+ /**
+ * Fix the types at the given line.
+ *
+ * We must be super careful not to modify parts of words.
+ *
+ * This will be nicely handled behind the scenes for us by the annotation class.
+ */
+ private function fixTypes(Annotation $annotation): void
+ {
+ $types = $annotation->getTypes();
+
+ $new = $this->normalizeTypes($types);
+
+ if ($types !== $new) {
+ $annotation->setTypes($new);
+ }
+ }
+
+ /**
+ * @param string[] $types
+ *
+ * @return string[]
+ */
+ private function normalizeTypes(array $types): array
+ {
+ foreach ($types as $index => $type) {
+ $types[$index] = $this->normalizeType($type);
+ }
+
+ return $types;
+ }
+
+ /**
+ * Prepare the type and normalize it.
+ */
+ private function normalizeType(string $type): string
+ {
+ return str_ends_with($type, '[]')
+ ? $this->normalizeType(substr($type, 0, -2)).'[]'
+ : $this->normalize($type)
+ ;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/AbstractProxyFixer.php b/vendor/friendsofphp/php-cs-fixer/src/AbstractProxyFixer.php
new file mode 100644
index 0000000..cdf5dac
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/AbstractProxyFixer.php
@@ -0,0 +1,124 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+abstract class AbstractProxyFixer extends AbstractFixer
+{
+ /**
+ * @var array<string, FixerInterface>
+ */
+ protected $proxyFixers;
+
+ public function __construct()
+ {
+ foreach (Utils::sortFixers($this->createProxyFixers()) as $proxyFixer) {
+ $this->proxyFixers[$proxyFixer->getName()] = $proxyFixer;
+ }
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ foreach ($this->proxyFixers as $fixer) {
+ if ($fixer->isCandidate($tokens)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ foreach ($this->proxyFixers as $fixer) {
+ if ($fixer->isRisky()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ if (\count($this->proxyFixers) > 1) {
+ throw new \LogicException('You need to override this method to provide the priority of combined fixers.');
+ }
+
+ return reset($this->proxyFixers)->getPriority();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports(\SplFileInfo $file): bool
+ {
+ foreach ($this->proxyFixers as $fixer) {
+ if ($fixer->supports($file)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setWhitespacesConfig(WhitespacesFixerConfig $config): void
+ {
+ parent::setWhitespacesConfig($config);
+
+ foreach ($this->proxyFixers as $fixer) {
+ if ($fixer instanceof WhitespacesAwareFixerInterface) {
+ $fixer->setWhitespacesConfig($config);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($this->proxyFixers as $fixer) {
+ $fixer->fix($file, $tokens);
+ }
+ }
+
+ /**
+ * @return FixerInterface[]
+ */
+ abstract protected function createProxyFixers(): array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php
new file mode 100644
index 0000000..2dea02c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/Cache.php
@@ -0,0 +1,138 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+final class Cache implements CacheInterface
+{
+ /**
+ * @var SignatureInterface
+ */
+ private $signature;
+
+ /**
+ * @var array<string, int>
+ */
+ private $hashes = [];
+
+ public function __construct(SignatureInterface $signature)
+ {
+ $this->signature = $signature;
+ }
+
+ public function getSignature(): SignatureInterface
+ {
+ return $this->signature;
+ }
+
+ public function has(string $file): bool
+ {
+ return \array_key_exists($file, $this->hashes);
+ }
+
+ public function get(string $file): ?int
+ {
+ if (!$this->has($file)) {
+ return null;
+ }
+
+ return $this->hashes[$file];
+ }
+
+ public function set(string $file, int $hash): void
+ {
+ $this->hashes[$file] = $hash;
+ }
+
+ public function clear(string $file): void
+ {
+ unset($this->hashes[$file]);
+ }
+
+ public function toJson(): string
+ {
+ $json = json_encode([
+ 'php' => $this->getSignature()->getPhpVersion(),
+ 'version' => $this->getSignature()->getFixerVersion(),
+ 'indent' => $this->getSignature()->getIndent(),
+ 'lineEnding' => $this->getSignature()->getLineEnding(),
+ 'rules' => $this->getSignature()->getRules(),
+ 'hashes' => $this->hashes,
+ ]);
+
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw new \UnexpectedValueException(sprintf(
+ 'Cannot encode cache signature to JSON, error: "%s". If you have non-UTF8 chars in your signature, like in license for `header_comment`, consider enabling `ext-mbstring` or install `symfony/polyfill-mbstring`.',
+ json_last_error_msg()
+ ));
+ }
+
+ return $json;
+ }
+
+ /**
+ * @throws \InvalidArgumentException
+ *
+ * @return Cache
+ */
+ public static function fromJson(string $json): self
+ {
+ $data = json_decode($json, true);
+
+ if (null === $data && JSON_ERROR_NONE !== json_last_error()) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Value needs to be a valid JSON string, got "%s", error: "%s".',
+ $json,
+ json_last_error_msg()
+ ));
+ }
+
+ $requiredKeys = [
+ 'php',
+ 'version',
+ 'indent',
+ 'lineEnding',
+ 'rules',
+ 'hashes',
+ ];
+
+ $missingKeys = array_diff_key(array_flip($requiredKeys), $data);
+
+ if (\count($missingKeys) > 0) {
+ throw new \InvalidArgumentException(sprintf(
+ 'JSON data is missing keys "%s"',
+ implode('", "', $missingKeys)
+ ));
+ }
+
+ $signature = new Signature(
+ $data['php'],
+ $data['version'],
+ $data['indent'],
+ $data['lineEnding'],
+ $data['rules']
+ );
+
+ $cache = new self($signature);
+
+ $cache->hashes = $data['hashes'];
+
+ return $cache;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/CacheInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/CacheInterface.php
new file mode 100644
index 0000000..6b5f4bd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/CacheInterface.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+interface CacheInterface
+{
+ public function getSignature(): SignatureInterface;
+
+ public function has(string $file): bool;
+
+ public function get(string $file): ?int;
+
+ public function set(string $file, int $hash): void;
+
+ public function clear(string $file): void;
+
+ public function toJson(): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/CacheManagerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/CacheManagerInterface.php
new file mode 100644
index 0000000..4e82d0c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/CacheManagerInterface.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+interface CacheManagerInterface
+{
+ public function needFixing(string $file, string $fileContent): bool;
+
+ public function setFile(string $file, string $fileContent): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/Directory.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/Directory.php
new file mode 100644
index 0000000..cc9423e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/Directory.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class Directory implements DirectoryInterface
+{
+ /**
+ * @var string
+ */
+ private $directoryName;
+
+ public function __construct(string $directoryName)
+ {
+ $this->directoryName = $directoryName;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRelativePathTo(string $file): string
+ {
+ $file = $this->normalizePath($file);
+
+ if (
+ '' === $this->directoryName
+ || 0 !== stripos($file, $this->directoryName.\DIRECTORY_SEPARATOR)
+ ) {
+ return $file;
+ }
+
+ return substr($file, \strlen($this->directoryName) + 1);
+ }
+
+ private function normalizePath(string $path): string
+ {
+ return str_replace(['\\', '/'], \DIRECTORY_SEPARATOR, $path);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/DirectoryInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/DirectoryInterface.php
new file mode 100644
index 0000000..2fdce86
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/DirectoryInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface DirectoryInterface
+{
+ public function getRelativePathTo(string $file): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/FileCacheManager.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileCacheManager.php
new file mode 100644
index 0000000..21c5e49
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileCacheManager.php
@@ -0,0 +1,141 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * Class supports caching information about state of fixing files.
+ *
+ * Cache is supported only for phar version and version installed via composer.
+ *
+ * File will be processed by PHP CS Fixer only if any of the following conditions is fulfilled:
+ * - cache is corrupt
+ * - fixer version changed
+ * - rules changed
+ * - file is new
+ * - file changed
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FileCacheManager implements CacheManagerInterface
+{
+ /**
+ * @var FileHandlerInterface
+ */
+ private $handler;
+
+ /**
+ * @var SignatureInterface
+ */
+ private $signature;
+
+ /**
+ * @var CacheInterface
+ */
+ private $cache;
+
+ /**
+ * @var bool
+ */
+ private $isDryRun;
+
+ /**
+ * @var DirectoryInterface
+ */
+ private $cacheDirectory;
+
+ public function __construct(
+ FileHandlerInterface $handler,
+ SignatureInterface $signature,
+ bool $isDryRun = false,
+ ?DirectoryInterface $cacheDirectory = null
+ ) {
+ $this->handler = $handler;
+ $this->signature = $signature;
+ $this->isDryRun = $isDryRun;
+ $this->cacheDirectory = $cacheDirectory ?: new Directory('');
+
+ $this->readCache();
+ }
+
+ public function __destruct()
+ {
+ $this->writeCache();
+ }
+
+ /**
+ * This class is not intended to be serialized,
+ * and cannot be deserialized (see __wakeup method).
+ */
+ public function __sleep(): array
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ /**
+ * Disable the deserialization of the class to prevent attacker executing
+ * code by leveraging the __destruct method.
+ *
+ * @see https://owasp.org/www-community/vulnerabilities/PHP_Object_Injection
+ */
+ public function __wakeup(): void
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ public function needFixing(string $file, string $fileContent): bool
+ {
+ $file = $this->cacheDirectory->getRelativePathTo($file);
+
+ return !$this->cache->has($file) || $this->cache->get($file) !== $this->calcHash($fileContent);
+ }
+
+ public function setFile(string $file, string $fileContent): void
+ {
+ $file = $this->cacheDirectory->getRelativePathTo($file);
+
+ $hash = $this->calcHash($fileContent);
+
+ if ($this->isDryRun && $this->cache->has($file) && $this->cache->get($file) !== $hash) {
+ $this->cache->clear($file);
+
+ return;
+ }
+
+ $this->cache->set($file, $hash);
+ }
+
+ private function readCache(): void
+ {
+ $cache = $this->handler->read();
+
+ if (null === $cache || !$this->signature->equals($cache->getSignature())) {
+ $cache = new Cache($this->signature);
+ }
+
+ $this->cache = $cache;
+ }
+
+ private function writeCache(): void
+ {
+ $this->handler->write($this->cache);
+ }
+
+ private function calcHash(string $content): int
+ {
+ return crc32($content);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php
new file mode 100644
index 0000000..1a4727e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandler.php
@@ -0,0 +1,109 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+use Symfony\Component\Filesystem\Exception\IOException;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+final class FileHandler implements FileHandlerInterface
+{
+ /**
+ * @var string
+ */
+ private $file;
+
+ public function __construct(string $file)
+ {
+ $this->file = $file;
+ }
+
+ public function getFile(): string
+ {
+ return $this->file;
+ }
+
+ public function read(): ?CacheInterface
+ {
+ if (!file_exists($this->file)) {
+ return null;
+ }
+
+ $content = file_get_contents($this->file);
+
+ try {
+ $cache = Cache::fromJson($content);
+ } catch (\InvalidArgumentException $exception) {
+ return null;
+ }
+
+ return $cache;
+ }
+
+ public function write(CacheInterface $cache): void
+ {
+ $content = $cache->toJson();
+
+ if (file_exists($this->file)) {
+ if (is_dir($this->file)) {
+ throw new IOException(
+ sprintf('Cannot write cache file "%s" as the location exists as directory.', realpath($this->file)),
+ 0,
+ null,
+ $this->file
+ );
+ }
+
+ if (!is_writable($this->file)) {
+ throw new IOException(
+ sprintf('Cannot write to file "%s" as it is not writable.', realpath($this->file)),
+ 0,
+ null,
+ $this->file
+ );
+ }
+ } else {
+ $dir = \dirname($this->file);
+
+ if (!is_dir($dir)) {
+ throw new IOException(
+ sprintf('Directory of cache file "%s" does not exists.', $this->file),
+ 0,
+ null,
+ $this->file
+ );
+ }
+
+ @touch($this->file);
+ @chmod($this->file, 0666);
+ }
+
+ $bytesWritten = @file_put_contents($this->file, $content);
+
+ if (false === $bytesWritten) {
+ $error = error_get_last();
+
+ throw new IOException(
+ sprintf('Failed to write file "%s", "%s".', $this->file, $error['message'] ?? 'no reason available'),
+ 0,
+ null,
+ $this->file
+ );
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandlerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandlerInterface.php
new file mode 100644
index 0000000..464b04c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/FileHandlerInterface.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+interface FileHandlerInterface
+{
+ public function getFile(): string;
+
+ public function read(): ?CacheInterface;
+
+ public function write(CacheInterface $cache): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/NullCacheManager.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/NullCacheManager.php
new file mode 100644
index 0000000..6309480
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/NullCacheManager.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+final class NullCacheManager implements CacheManagerInterface
+{
+ public function needFixing(string $file, string $fileContent): bool
+ {
+ return true;
+ }
+
+ public function setFile(string $file, string $fileContent): void
+ {
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/Signature.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/Signature.php
new file mode 100644
index 0000000..333c4fe
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/Signature.php
@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+final class Signature implements SignatureInterface
+{
+ /**
+ * @var string
+ */
+ private $phpVersion;
+
+ /**
+ * @var string
+ */
+ private $fixerVersion;
+
+ /**
+ * @var string
+ */
+ private $indent;
+
+ /**
+ * @var string
+ */
+ private $lineEnding;
+
+ /**
+ * @var array
+ */
+ private $rules;
+
+ public function __construct(string $phpVersion, string $fixerVersion, string $indent, string $lineEnding, array $rules)
+ {
+ $this->phpVersion = $phpVersion;
+ $this->fixerVersion = $fixerVersion;
+ $this->indent = $indent;
+ $this->lineEnding = $lineEnding;
+ $this->rules = self::utf8Encode($rules);
+ }
+
+ public function getPhpVersion(): string
+ {
+ return $this->phpVersion;
+ }
+
+ public function getFixerVersion(): string
+ {
+ return $this->fixerVersion;
+ }
+
+ public function getIndent(): string
+ {
+ return $this->indent;
+ }
+
+ public function getLineEnding(): string
+ {
+ return $this->lineEnding;
+ }
+
+ public function getRules(): array
+ {
+ return $this->rules;
+ }
+
+ public function equals(SignatureInterface $signature): bool
+ {
+ return $this->phpVersion === $signature->getPhpVersion()
+ && $this->fixerVersion === $signature->getFixerVersion()
+ && $this->indent === $signature->getIndent()
+ && $this->lineEnding === $signature->getLineEnding()
+ && $this->rules === $signature->getRules();
+ }
+
+ private static function utf8Encode(array $data): array
+ {
+ if (!\function_exists('mb_detect_encoding')) {
+ return $data;
+ }
+
+ array_walk_recursive($data, static function (&$item): void {
+ if (\is_string($item) && !mb_detect_encoding($item, 'utf-8', true)) {
+ $item = utf8_encode($item);
+ }
+ });
+
+ return $data;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Cache/SignatureInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Cache/SignatureInterface.php
new file mode 100644
index 0000000..062e96d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Cache/SignatureInterface.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Cache;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+interface SignatureInterface
+{
+ public function getPhpVersion(): string;
+
+ public function getFixerVersion(): string;
+
+ public function getIndent(): string;
+
+ public function getLineEnding(): string;
+
+ public function getRules(): array;
+
+ /**
+ * @param SignatureInterface $signature
+ */
+ public function equals(self $signature): bool;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Config.php b/vendor/friendsofphp/php-cs-fixer/src/Config.php
new file mode 100644
index 0000000..ee59b26
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Config.php
@@ -0,0 +1,307 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Fixer\FixerInterface;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Katsuhiro Ogawa <ko.fivestar@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+class Config implements ConfigInterface
+{
+ /**
+ * @var string
+ */
+ private $cacheFile = '.php-cs-fixer.cache';
+
+ /**
+ * @var FixerInterface[]
+ */
+ private $customFixers = [];
+
+ /**
+ * @var null|iterable
+ */
+ private $finder;
+
+ /**
+ * @var string
+ */
+ private $format = 'txt';
+
+ /**
+ * @var bool
+ */
+ private $hideProgress = false;
+
+ /**
+ * @var string
+ */
+ private $indent = ' ';
+
+ /**
+ * @var bool
+ */
+ private $isRiskyAllowed = false;
+
+ /**
+ * @var string
+ */
+ private $lineEnding = "\n";
+
+ /**
+ * @var string
+ */
+ private $name;
+
+ /**
+ * @var null|string
+ */
+ private $phpExecutable;
+
+ /**
+ * @var array
+ */
+ private $rules = ['@PSR12' => true];
+
+ /**
+ * @var bool
+ */
+ private $usingCache = true;
+
+ public function __construct(string $name = 'default')
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCacheFile(): string
+ {
+ return $this->cacheFile;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomFixers(): array
+ {
+ return $this->customFixers;
+ }
+
+ /**
+ * @return Finder
+ */
+ public function getFinder(): iterable
+ {
+ if (null === $this->finder) {
+ $this->finder = new Finder();
+ }
+
+ return $this->finder;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return $this->format;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getHideProgress(): bool
+ {
+ return $this->hideProgress;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getIndent(): string
+ {
+ return $this->indent;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getLineEnding(): string
+ {
+ return $this->lineEnding;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPhpExecutable(): ?string
+ {
+ return $this->phpExecutable;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRiskyAllowed(): bool
+ {
+ return $this->isRiskyAllowed;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRules(): array
+ {
+ return $this->rules;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getUsingCache(): bool
+ {
+ return $this->usingCache;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function registerCustomFixers(iterable $fixers): ConfigInterface
+ {
+ foreach ($fixers as $fixer) {
+ $this->addCustomFixer($fixer);
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setCacheFile(string $cacheFile): ConfigInterface
+ {
+ $this->cacheFile = $cacheFile;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setFinder(iterable $finder): ConfigInterface
+ {
+ $this->finder = $finder;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setFormat(string $format): ConfigInterface
+ {
+ $this->format = $format;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setHideProgress(bool $hideProgress): ConfigInterface
+ {
+ $this->hideProgress = $hideProgress;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setIndent(string $indent): ConfigInterface
+ {
+ $this->indent = $indent;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setLineEnding(string $lineEnding): ConfigInterface
+ {
+ $this->lineEnding = $lineEnding;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setPhpExecutable(?string $phpExecutable): ConfigInterface
+ {
+ $this->phpExecutable = $phpExecutable;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setRiskyAllowed(bool $isRiskyAllowed): ConfigInterface
+ {
+ $this->isRiskyAllowed = $isRiskyAllowed;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setRules(array $rules): ConfigInterface
+ {
+ $this->rules = $rules;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setUsingCache(bool $usingCache): ConfigInterface
+ {
+ $this->usingCache = $usingCache;
+
+ return $this;
+ }
+
+ private function addCustomFixer(FixerInterface $fixer): void
+ {
+ $this->customFixers[] = $fixer;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ConfigInterface.php b/vendor/friendsofphp/php-cs-fixer/src/ConfigInterface.php
new file mode 100644
index 0000000..bc16c19
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ConfigInterface.php
@@ -0,0 +1,133 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Fixer\FixerInterface;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface ConfigInterface
+{
+ /**
+ * Returns the path to the cache file.
+ *
+ * @return null|string Returns null if not using cache
+ */
+ public function getCacheFile(): ?string;
+
+ /**
+ * Returns the custom fixers to use.
+ *
+ * @return FixerInterface[]
+ */
+ public function getCustomFixers(): array;
+
+ /**
+ * Returns files to scan.
+ *
+ * @return iterable|\Traversable
+ */
+ public function getFinder(): iterable;
+
+ public function getFormat(): string;
+
+ /**
+ * Returns true if progress should be hidden.
+ */
+ public function getHideProgress(): bool;
+
+ public function getIndent(): string;
+
+ public function getLineEnding(): string;
+
+ /**
+ * Returns the name of the configuration.
+ *
+ * The name must be all lowercase and without any spaces.
+ *
+ * @return string The name of the configuration
+ */
+ public function getName(): string;
+
+ /**
+ * Get configured PHP executable, if any.
+ */
+ public function getPhpExecutable(): ?string;
+
+ /**
+ * Check if it is allowed to run risky fixers.
+ */
+ public function getRiskyAllowed(): bool;
+
+ /**
+ * Get rules.
+ *
+ * Keys of array are names of fixers/sets, values are true/false.
+ */
+ public function getRules(): array;
+
+ /**
+ * Returns true if caching should be enabled.
+ */
+ public function getUsingCache(): bool;
+
+ /**
+ * Adds a suite of custom fixers.
+ *
+ * Name of custom fixer should follow `VendorName/rule_name` convention.
+ *
+ * @param FixerInterface[]|iterable|\Traversable $fixers
+ */
+ public function registerCustomFixers(iterable $fixers): self;
+
+ /**
+ * Sets the path to the cache file.
+ */
+ public function setCacheFile(string $cacheFile): self;
+
+ public function setFinder(iterable $finder): self;
+
+ public function setFormat(string $format): self;
+
+ public function setHideProgress(bool $hideProgress): self;
+
+ public function setIndent(string $indent): self;
+
+ public function setLineEnding(string $lineEnding): self;
+
+ /**
+ * Set PHP executable.
+ */
+ public function setPhpExecutable(?string $phpExecutable): self;
+
+ /**
+ * Set if it is allowed to run risky fixers.
+ */
+ public function setRiskyAllowed(bool $isRiskyAllowed): self;
+
+ /**
+ * Set rules.
+ *
+ * Keys of array are names of fixers or sets.
+ * Value for set must be bool (turn it on or off).
+ * Value for fixer may be bool (turn it on or off) or array of configuration
+ * (turn it on and contains configuration for FixerInterface::configure method).
+ */
+ public function setRules(array $rules): self;
+
+ public function setUsingCache(bool $usingCache): self;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidConfigurationException.php b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidConfigurationException.php
new file mode 100644
index 0000000..ab1185f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidConfigurationException.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\ConfigurationException;
+
+use PhpCsFixer\Console\Command\FixCommandExitStatusCalculator;
+
+/**
+ * Exceptions of this type are thrown on misconfiguration of the Fixer.
+ *
+ * @internal
+ * @final Only internal extending this class is supported
+ */
+class InvalidConfigurationException extends \InvalidArgumentException
+{
+ public function __construct(string $message, ?int $code = null, ?\Throwable $previous = null)
+ {
+ parent::__construct(
+ $message,
+ $code ?? FixCommandExitStatusCalculator::EXIT_STATUS_FLAG_HAS_INVALID_CONFIG,
+ $previous
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php
new file mode 100644
index 0000000..0750eee
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidFixerConfigurationException.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\ConfigurationException;
+
+use PhpCsFixer\Console\Command\FixCommandExitStatusCalculator;
+
+/**
+ * Exception thrown by Fixers on misconfiguration.
+ *
+ * @internal
+ * @final Only internal extending this class is supported
+ */
+class InvalidFixerConfigurationException extends InvalidConfigurationException
+{
+ /**
+ * @var string
+ */
+ private $fixerName;
+
+ public function __construct(string $fixerName, string $message, ?\Throwable $previous = null)
+ {
+ parent::__construct(
+ sprintf('[%s] %s', $fixerName, $message),
+ FixCommandExitStatusCalculator::EXIT_STATUS_FLAG_HAS_INVALID_FIXER_CONFIG,
+ $previous
+ );
+ $this->fixerName = $fixerName;
+ }
+
+ public function getFixerName(): string
+ {
+ return $this->fixerName;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php
new file mode 100644
index 0000000..6e4dcd4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/InvalidForEnvFixerConfigurationException.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\ConfigurationException;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class InvalidForEnvFixerConfigurationException extends InvalidFixerConfigurationException
+{
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php
new file mode 100644
index 0000000..d229cda
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ConfigurationException/RequiredFixerConfigurationException.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\ConfigurationException;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class RequiredFixerConfigurationException extends InvalidFixerConfigurationException
+{
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
new file mode 100644
index 0000000..8dcd76a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php
@@ -0,0 +1,144 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console;
+
+use PhpCsFixer\Console\Command\DescribeCommand;
+use PhpCsFixer\Console\Command\FixCommand;
+use PhpCsFixer\Console\Command\HelpCommand;
+use PhpCsFixer\Console\Command\ListFilesCommand;
+use PhpCsFixer\Console\Command\ListSetsCommand;
+use PhpCsFixer\Console\Command\SelfUpdateCommand;
+use PhpCsFixer\Console\SelfUpdate\GithubClient;
+use PhpCsFixer\Console\SelfUpdate\NewVersionChecker;
+use PhpCsFixer\PharChecker;
+use PhpCsFixer\ToolInfo;
+use PhpCsFixer\Utils;
+use Symfony\Component\Console\Application as BaseApplication;
+use Symfony\Component\Console\Command\ListCommand;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class Application extends BaseApplication
+{
+ public const VERSION = '3.2.1';
+ public const VERSION_CODENAME = 'Mountains';
+
+ /**
+ * @var ToolInfo
+ */
+ private $toolInfo;
+
+ public function __construct()
+ {
+ parent::__construct('PHP CS Fixer', self::VERSION);
+
+ $this->toolInfo = new ToolInfo();
+
+ // in alphabetical order
+ $this->add(new DescribeCommand());
+ $this->add(new FixCommand($this->toolInfo));
+ $this->add(new ListFilesCommand($this->toolInfo));
+ $this->add(new ListSetsCommand());
+ $this->add(new SelfUpdateCommand(
+ new NewVersionChecker(new GithubClient()),
+ $this->toolInfo,
+ new PharChecker()
+ ));
+ }
+
+ public static function getMajorVersion(): int
+ {
+ return (int) explode('.', self::VERSION)[0];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function doRun(InputInterface $input, OutputInterface $output): int
+ {
+ $stdErr = $output instanceof ConsoleOutputInterface
+ ? $output->getErrorOutput()
+ : ($input->hasParameterOption('--format', true) && 'txt' !== $input->getParameterOption('--format', null, true) ? null : $output)
+ ;
+
+ if (null !== $stdErr) {
+ $warningsDetector = new WarningsDetector($this->toolInfo);
+ $warningsDetector->detectOldVendor();
+ $warningsDetector->detectOldMajor();
+ $warnings = $warningsDetector->getWarnings();
+
+ if (\count($warnings) > 0) {
+ foreach ($warnings as $warning) {
+ $stdErr->writeln(sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', $warning));
+ }
+ $stdErr->writeln('');
+ }
+ }
+
+ $result = parent::doRun($input, $output);
+
+ if (
+ null !== $stdErr
+ && $output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE
+ ) {
+ $triggeredDeprecations = Utils::getTriggeredDeprecations();
+
+ if (\count($triggeredDeprecations) > 0) {
+ $stdErr->writeln('');
+ $stdErr->writeln($stdErr->isDecorated() ? '<bg=yellow;fg=black;>Detected deprecations in use:</>' : 'Detected deprecations in use:');
+ foreach ($triggeredDeprecations as $deprecation) {
+ $stdErr->writeln(sprintf('- %s', $deprecation));
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getLongVersion(): string
+ {
+ $version = implode('', [
+ parent::getLongVersion(),
+ self::VERSION_CODENAME ? sprintf(' <info>%s</info>', self::VERSION_CODENAME) : '', // @phpstan-ignore-line to avoid `Ternary operator condition is always true|false.`
+ ' by <comment>Fabien Potencier</comment> and <comment>Dariusz Ruminski</comment>',
+ ]);
+
+ $commit = '@git-commit@';
+
+ if ('@'.'git-commit@' !== $commit) { // @phpstan-ignore-line as `$commit` is replaced during phar building
+ $version .= ' ('.substr($commit, 0, 7).')';
+ }
+
+ return $version;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getDefaultCommands(): array
+ {
+ return [new HelpCommand(), new ListCommand()];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
new file mode 100644
index 0000000..23e6c56
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeCommand.php
@@ -0,0 +1,434 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\Differ\DiffConsoleFormatter;
+use PhpCsFixer\Differ\FullDiffer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\DeprecatedFixerInterface;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\FixerConfiguration\AliasedFixerOption;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\DeprecatedFixerOption;
+use PhpCsFixer\FixerDefinition\CodeSampleInterface;
+use PhpCsFixer\FixerDefinition\FileSpecificCodeSampleInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSampleInterface;
+use PhpCsFixer\FixerFactory;
+use PhpCsFixer\Preg;
+use PhpCsFixer\RuleSet\RuleSets;
+use PhpCsFixer\StdinFileInfo;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Utils;
+use PhpCsFixer\WordMatcher;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class DescribeCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'describe';
+
+ /**
+ * @var string[]
+ */
+ private $setNames;
+
+ /**
+ * @var FixerFactory
+ */
+ private $fixerFactory;
+
+ /**
+ * @var array<string, FixerInterface>
+ */
+ private $fixers;
+
+ public function __construct(?FixerFactory $fixerFactory = null)
+ {
+ parent::__construct();
+
+ if (null === $fixerFactory) {
+ $fixerFactory = new FixerFactory();
+ $fixerFactory->registerBuiltInFixers();
+ }
+
+ $this->fixerFactory = $fixerFactory;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure(): void
+ {
+ $this
+ ->setDefinition(
+ [
+ new InputArgument('name', InputArgument::REQUIRED, 'Name of rule / set.'),
+ ]
+ )
+ ->setDescription('Describe rule / ruleset.')
+ ;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity() && $output instanceof ConsoleOutputInterface) {
+ $stdErr = $output->getErrorOutput();
+ $stdErr->writeln($this->getApplication()->getLongVersion());
+ $stdErr->writeln(sprintf('Runtime: <info>PHP %s</info>', PHP_VERSION));
+ }
+
+ $name = $input->getArgument('name');
+
+ try {
+ if (str_starts_with($name, '@')) {
+ $this->describeSet($output, $name);
+
+ return 0;
+ }
+
+ $this->describeRule($output, $name);
+ } catch (DescribeNameNotFoundException $e) {
+ $matcher = new WordMatcher(
+ 'set' === $e->getType() ? $this->getSetNames() : array_keys($this->getFixers())
+ );
+
+ $alternative = $matcher->match($name);
+
+ $this->describeList($output, $e->getType());
+
+ throw new \InvalidArgumentException(sprintf(
+ '%s "%s" not found.%s',
+ ucfirst($e->getType()),
+ $name,
+ null === $alternative ? '' : ' Did you mean "'.$alternative.'"?'
+ ));
+ }
+
+ return 0;
+ }
+
+ private function describeRule(OutputInterface $output, string $name): void
+ {
+ $fixers = $this->getFixers();
+
+ if (!isset($fixers[$name])) {
+ throw new DescribeNameNotFoundException($name, 'rule');
+ }
+
+ /** @var FixerInterface $fixer */
+ $fixer = $fixers[$name];
+
+ $definition = $fixer->getDefinition();
+
+ $summary = $definition->getSummary();
+
+ if ($fixer instanceof DeprecatedFixerInterface) {
+ $successors = $fixer->getSuccessorsNames();
+ $message = [] === $successors
+ ? 'will be removed on next major version'
+ : sprintf('use %s instead', Utils::naturalLanguageJoinWithBackticks($successors));
+ $message = Preg::replace('/(`.+?`)/', '<info>$1</info>', $message);
+ $summary .= sprintf(' <error>DEPRECATED</error>: %s.', $message);
+ }
+
+ $output->writeln(sprintf('<info>Description of</info> %s <info>rule</info>.', $name));
+
+ if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
+ $output->writeln(sprintf('Fixer class: <comment>%s</comment>.', \get_class($fixer)));
+ }
+
+ $output->writeln($summary);
+
+ $description = $definition->getDescription();
+
+ if (null !== $description) {
+ $output->writeln($description);
+ }
+
+ $output->writeln('');
+
+ if ($fixer->isRisky()) {
+ $output->writeln('<error>Fixer applying this rule is risky.</error>');
+
+ $riskyDescription = $definition->getRiskyDescription();
+
+ if (null !== $riskyDescription) {
+ $output->writeln($riskyDescription);
+ }
+
+ $output->writeln('');
+ }
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ $configurationDefinition = $fixer->getConfigurationDefinition();
+ $options = $configurationDefinition->getOptions();
+
+ $output->writeln(sprintf('Fixer is configurable using following option%s:', 1 === \count($options) ? '' : 's'));
+
+ foreach ($options as $option) {
+ $line = '* <info>'.OutputFormatter::escape($option->getName()).'</info>';
+ $allowed = HelpCommand::getDisplayableAllowedValues($option);
+
+ if (null === $allowed) {
+ $allowed = array_map(
+ static function (string $type): string {
+ return '<comment>'.$type.'</comment>';
+ },
+ $option->getAllowedTypes()
+ );
+ } else {
+ foreach ($allowed as &$value) {
+ if ($value instanceof AllowedValueSubset) {
+ $value = 'a subset of <comment>'.HelpCommand::toString($value->getAllowedValues()).'</comment>';
+ } else {
+ $value = '<comment>'.HelpCommand::toString($value).'</comment>';
+ }
+ }
+ }
+
+ $line .= ' ('.implode(', ', $allowed).')';
+
+ $description = Preg::replace('/(`.+?`)/', '<info>$1</info>', OutputFormatter::escape($option->getDescription()));
+ $line .= ': '.lcfirst(Preg::replace('/\.$/', '', $description)).'; ';
+
+ if ($option->hasDefault()) {
+ $line .= sprintf(
+ 'defaults to <comment>%s</comment>',
+ HelpCommand::toString($option->getDefault())
+ );
+ } else {
+ $line .= '<comment>required</comment>';
+ }
+
+ if ($option instanceof DeprecatedFixerOption) {
+ $line .= '. <error>DEPRECATED</error>: '.Preg::replace(
+ '/(`.+?`)/',
+ '<info>$1</info>',
+ OutputFormatter::escape(lcfirst($option->getDeprecationMessage()))
+ );
+ }
+
+ if ($option instanceof AliasedFixerOption) {
+ $line .= '; <error>DEPRECATED</error> alias: <comment>'.$option->getAlias().'</comment>';
+ }
+
+ $output->writeln($line);
+ }
+
+ $output->writeln('');
+ }
+
+ /** @var CodeSampleInterface[] $codeSamples */
+ $codeSamples = array_filter($definition->getCodeSamples(), static function (CodeSampleInterface $codeSample): bool {
+ if ($codeSample instanceof VersionSpecificCodeSampleInterface) {
+ return $codeSample->isSuitableFor(\PHP_VERSION_ID);
+ }
+
+ return true;
+ });
+
+ if (0 === \count($codeSamples)) {
+ $output->writeln([
+ 'Fixing examples cannot be demonstrated on the current PHP version.',
+ '',
+ ]);
+ } else {
+ $output->writeln('Fixing examples:');
+
+ $differ = new FullDiffer();
+ $diffFormatter = new DiffConsoleFormatter(
+ $output->isDecorated(),
+ sprintf(
+ '<comment> ---------- begin diff ----------</comment>%s%%s%s<comment> ----------- end diff -----------</comment>',
+ PHP_EOL,
+ PHP_EOL
+ )
+ );
+
+ foreach ($codeSamples as $index => $codeSample) {
+ $old = $codeSample->getCode();
+ $tokens = Tokens::fromCode($old);
+
+ $configuration = $codeSample->getConfiguration();
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ $fixer->configure($configuration ?? []);
+ }
+
+ $file = $codeSample instanceof FileSpecificCodeSampleInterface
+ ? $codeSample->getSplFileInfo()
+ : new StdinFileInfo();
+
+ $fixer->fix($file, $tokens);
+
+ $diff = $differ->diff($old, $tokens->generateCode());
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ if (null === $configuration) {
+ $output->writeln(sprintf(' * Example #%d. Fixing with the <comment>default</comment> configuration.', $index + 1));
+ } else {
+ $output->writeln(sprintf(' * Example #%d. Fixing with configuration: <comment>%s</comment>.', $index + 1, HelpCommand::toString($codeSample->getConfiguration())));
+ }
+ } else {
+ $output->writeln(sprintf(' * Example #%d.', $index + 1));
+ }
+
+ $output->writeln([$diffFormatter->format($diff, ' %s'), '']);
+ }
+ }
+ }
+
+ private function describeSet(OutputInterface $output, string $name): void
+ {
+ if (!\in_array($name, $this->getSetNames(), true)) {
+ throw new DescribeNameNotFoundException($name, 'set');
+ }
+
+ $ruleSetDefinitions = RuleSets::getSetDefinitions();
+ $fixers = $this->getFixers();
+
+ $output->writeln(sprintf('<info>Description of the</info> %s <info>set.</info>', $ruleSetDefinitions[$name]->getName()));
+ $output->writeln($this->replaceRstLinks($ruleSetDefinitions[$name]->getDescription()));
+
+ if ($ruleSetDefinitions[$name]->isRisky()) {
+ $output->writeln('This set contains <error>risky</error> rules.');
+ }
+
+ $output->writeln('');
+
+ $help = '';
+
+ foreach ($ruleSetDefinitions[$name]->getRules() as $rule => $config) {
+ if (str_starts_with($rule, '@')) {
+ $set = $ruleSetDefinitions[$rule];
+ $help .= sprintf(
+ " * <info>%s</info>%s\n | %s\n\n",
+ $rule,
+ $set->isRisky() ? ' <error>risky</error>' : '',
+ $this->replaceRstLinks($set->getDescription())
+ );
+
+ continue;
+ }
+
+ /** @var FixerInterface $fixer */
+ $fixer = $fixers[$rule];
+
+ $definition = $fixer->getDefinition();
+ $help .= sprintf(
+ " * <info>%s</info>%s\n | %s\n%s\n",
+ $rule,
+ $fixer->isRisky() ? ' <error>risky</error>' : '',
+ $definition->getSummary(),
+ true !== $config ? sprintf(" <comment>| Configuration: %s</comment>\n", HelpCommand::toString($config)) : ''
+ );
+ }
+
+ $output->write($help);
+ }
+
+ /**
+ * @return array<string, FixerInterface>
+ */
+ private function getFixers(): array
+ {
+ if (null !== $this->fixers) {
+ return $this->fixers;
+ }
+
+ $fixers = [];
+
+ foreach ($this->fixerFactory->getFixers() as $fixer) {
+ $fixers[$fixer->getName()] = $fixer;
+ }
+
+ $this->fixers = $fixers;
+ ksort($this->fixers);
+
+ return $this->fixers;
+ }
+
+ /**
+ * @return string[]
+ */
+ private function getSetNames(): array
+ {
+ if (null !== $this->setNames) {
+ return $this->setNames;
+ }
+
+ $this->setNames = RuleSets::getSetDefinitionNames();
+
+ return $this->setNames;
+ }
+
+ /**
+ * @param string $type 'rule'|'set'
+ */
+ private function describeList(OutputInterface $output, string $type): void
+ {
+ if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
+ $describe = [
+ 'sets' => $this->getSetNames(),
+ 'rules' => $this->getFixers(),
+ ];
+ } elseif ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
+ $describe = 'set' === $type ? ['sets' => $this->getSetNames()] : ['rules' => $this->getFixers()];
+ } else {
+ return;
+ }
+
+ /** @var string[] $items */
+ foreach ($describe as $list => $items) {
+ $output->writeln(sprintf('<comment>Defined %s:</comment>', $list));
+
+ foreach ($items as $name => $item) {
+ $output->writeln(sprintf('* <info>%s</info>', \is_string($name) ? $name : $item));
+ }
+ }
+ }
+
+ private function replaceRstLinks(string $content): string
+ {
+ return Preg::replaceCallback(
+ '/(`[^<]+<[^>]+>`_)/',
+ static function (array $matches) {
+ return Preg::replaceCallback(
+ '/`(.*)<(.*)>`_/',
+ static function (array $matches): string {
+ return $matches[1].'('.$matches[2].')';
+ },
+ $matches[1]
+ );
+ },
+ $content
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php
new file mode 100644
index 0000000..8ddab2a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DescribeNameNotFoundException.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+/**
+ * @internal
+ */
+final class DescribeNameNotFoundException extends \InvalidArgumentException
+{
+ /**
+ * @var string
+ */
+ private $name;
+
+ /**
+ * @var string 'rule'|'set'
+ */
+ private $type;
+
+ public function __construct(string $name, string $type)
+ {
+ $this->name = $name;
+ $this->type = $type;
+
+ parent::__construct();
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getType(): string
+ {
+ return $this->type;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php
new file mode 100644
index 0000000..22102c0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/DocumentationCommand.php
@@ -0,0 +1,126 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\Documentation\DocumentationLocator;
+use PhpCsFixer\Documentation\FixerDocumentGenerator;
+use PhpCsFixer\Documentation\ListDocumentGenerator;
+use PhpCsFixer\Documentation\RuleSetDocumentationGenerator;
+use PhpCsFixer\FixerFactory;
+use PhpCsFixer\RuleSet\RuleSets;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Filesystem\Filesystem;
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Finder\SplFileInfo;
+
+/**
+ * @internal
+ */
+final class DocumentationCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'documentation';
+
+ protected function configure(): void
+ {
+ $this
+ ->setAliases(['doc'])
+ ->setDescription('Dumps the documentation of the project into its "/doc" directory.')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ $filesystem = new Filesystem();
+ $locator = new DocumentationLocator();
+
+ $fixerFactory = new FixerFactory();
+ $fixerFactory->registerBuiltInFixers();
+ $fixers = $fixerFactory->getFixers();
+
+ $setDefinitions = RuleSets::getSetDefinitions();
+
+ $fixerDocumentGenerator = new FixerDocumentGenerator($locator);
+ $ruleSetDocumentationGenerator = new RuleSetDocumentationGenerator($locator);
+ $listDocumentGenerator = new ListDocumentGenerator($locator);
+
+ // Array of existing fixer docs.
+ // We first override existing files, and then we will delete files that are no longer needed.
+ // We cannot remove all files first, as generation of docs is re-using existing docs to extract code-samples for
+ // VersionSpecificCodeSample under incompatible PHP version.
+ $docForFixerRelativePaths = [];
+
+ foreach ($fixers as $fixer) {
+ $docForFixerRelativePaths[] = $locator->getFixerDocumentationFileRelativePath($fixer);
+ $filesystem->dumpFile(
+ $locator->getFixerDocumentationFilePath($fixer),
+ $fixerDocumentGenerator->generateFixerDocumentation($fixer)
+ );
+ }
+
+ /** @var SplFileInfo $file */
+ foreach (
+ (new Finder())->files()
+ ->in($locator->getFixersDocumentationDirectoryPath())
+ ->notPath($docForFixerRelativePaths) as $file
+ ) {
+ $filesystem->remove($file->getPathname());
+ }
+
+ // Fixer doc. index
+
+ $filesystem->dumpFile(
+ $locator->getFixersDocumentationIndexFilePath(),
+ $fixerDocumentGenerator->generateFixersDocumentationIndex($fixers)
+ );
+
+ // RuleSet docs.
+
+ /** @var SplFileInfo $file */
+ foreach ((new Finder())->files()->in($locator->getRuleSetsDocumentationDirectoryPath()) as $file) {
+ $filesystem->remove($file->getPathname());
+ }
+
+ $paths = [];
+
+ foreach ($setDefinitions as $name => $definition) {
+ $path = $locator->getRuleSetsDocumentationFilePath($name);
+ $paths[$name] = $path;
+ $filesystem->dumpFile($path, $ruleSetDocumentationGenerator->generateRuleSetsDocumentation($definition, $fixers));
+ }
+
+ // RuleSet doc. index
+
+ $filesystem->dumpFile(
+ $locator->getRuleSetsDocumentationIndexFilePath(),
+ $ruleSetDocumentationGenerator->generateRuleSetsDocumentationIndex($paths)
+ );
+
+ // List file / Appendix
+
+ $filesystem->dumpFile(
+ $locator->getListingFilePath(),
+ $listDocumentGenerator->generateListingDocumentation($fixers)
+ );
+
+ $output->writeln('Docs updated.');
+
+ return 0;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php
new file mode 100644
index 0000000..a2b96cf
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php
@@ -0,0 +1,372 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\Config;
+use PhpCsFixer\ConfigInterface;
+use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
+use PhpCsFixer\Console\ConfigurationResolver;
+use PhpCsFixer\Console\Output\ErrorOutput;
+use PhpCsFixer\Console\Output\NullOutput;
+use PhpCsFixer\Console\Output\ProcessOutput;
+use PhpCsFixer\Console\Report\FixReport\ReportSummary;
+use PhpCsFixer\Error\ErrorsManager;
+use PhpCsFixer\Runner\Runner;
+use PhpCsFixer\ToolInfoInterface;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Terminal;
+use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\Stopwatch\Stopwatch;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FixCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'fix';
+
+ /**
+ * @var EventDispatcherInterface
+ */
+ private $eventDispatcher;
+
+ /**
+ * @var ErrorsManager
+ */
+ private $errorsManager;
+
+ /**
+ * @var Stopwatch
+ */
+ private $stopwatch;
+
+ /**
+ * @var ConfigInterface
+ */
+ private $defaultConfig;
+
+ /**
+ * @var ToolInfoInterface
+ */
+ private $toolInfo;
+
+ public function __construct(ToolInfoInterface $toolInfo)
+ {
+ parent::__construct();
+
+ $this->defaultConfig = new Config();
+ $this->errorsManager = new ErrorsManager();
+ $this->eventDispatcher = new EventDispatcher();
+ $this->stopwatch = new Stopwatch();
+ $this->toolInfo = $toolInfo;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Override here to only generate the help copy when used.
+ */
+ public function getHelp(): string
+ {
+ return <<<'EOF'
+The <info>%command.name%</info> command tries to fix as much coding standards
+problems as possible on a given file or files in a given directory and its subdirectories:
+
+ <info>$ php %command.full_name% /path/to/dir</info>
+ <info>$ php %command.full_name% /path/to/file</info>
+
+By default <comment>--path-mode</comment> is set to `override`, which means, that if you specify the path to a file or a directory via
+command arguments, then the paths provided to a `Finder` in config file will be ignored. You can use <comment>--path-mode=intersection</comment>
+to merge paths from the config file and from the argument:
+
+ <info>$ php %command.full_name% --path-mode=intersection /path/to/dir</info>
+
+The <comment>--format</comment> option for the output format. Supported formats are `txt` (default one), `json`, `xml`, `checkstyle`, `junit` and `gitlab`.
+
+NOTE: the output for the following formats are generated in accordance with schemas
+
+* `checkstyle` follows the common `"checkstyle" XML schema </doc/schemas/fix/checkstyle.xsd>`_
+* `json` follows the `own JSON schema </doc/schemas/fix/schema.json>`_
+* `junit` follows the `JUnit XML schema from Jenkins </doc/schemas/fix/junit-10.xsd>`_
+* `xml` follows the `own XML schema </doc/schemas/fix/xml.xsd>`_
+
+The <comment>--quiet</comment> Do not output any message.
+
+The <comment>--verbose</comment> option will show the applied rules. When using the `txt` format it will also display progress notifications.
+
+NOTE: if there is an error like "errors reported during linting after fixing", you can use this to be even more verbose for debugging purpose
+
+* `-v`: verbose
+* `-vv`: very verbose
+* `-vvv`: debug
+
+The <comment>--rules</comment> option limits the rules to apply to the
+project:
+
+ <info>$ php %command.full_name% /path/to/project --rules=@PSR12</info>
+
+By default the PSR-12 rules are used.
+
+The <comment>--rules</comment> option lets you choose the exact rules to
+apply (the rule names must be separated by a comma):
+
+ <info>$ php %command.full_name% /path/to/dir --rules=line_ending,full_opening_tag,indentation_type</info>
+
+You can also exclude the rules you don't want by placing a dash in front of the rule name, if this is more convenient,
+using <comment>-name_of_fixer</comment>:
+
+ <info>$ php %command.full_name% /path/to/dir --rules=-full_opening_tag,-indentation_type</info>
+
+When using combinations of exact and exclude rules, applying exact rules along with above excluded results:
+
+ <info>$ php %command.full_name% /path/to/project --rules=@Symfony,-@PSR1,-blank_line_before_statement,strict_comparison</info>
+
+Complete configuration for rules can be supplied using a `json` formatted string.
+
+ <info>$ php %command.full_name% /path/to/project --rules='{"concat_space": {"spacing": "none"}}'</info>
+
+The <comment>--dry-run</comment> flag will run the fixer without making changes to your files.
+
+The <comment>--diff</comment> flag can be used to let the fixer output all the changes it makes.
+
+The <comment>--allow-risky</comment> option (pass `yes` or `no`) allows you to set whether risky rules may run. Default value is taken from config file.
+A rule is considered risky if it could change code behaviour. By default no risky rules are run.
+
+The <comment>--stop-on-violation</comment> flag stops the execution upon first file that needs to be fixed.
+
+The <comment>--show-progress</comment> option allows you to choose the way process progress is rendered:
+
+* <comment>none</comment>: disables progress output;
+* <comment>dots</comment>: multiline progress output with number of files and percentage on each line.
+
+If the option is not provided, it defaults to <comment>dots</comment> unless a config file that disables output is used, in which case it defaults to <comment>none</comment>. This option has no effect if the verbosity of the command is less than <comment>verbose</comment>.
+
+ <info>$ php %command.full_name% --verbose --show-progress=dots</info>
+
+By using <command>--using-cache</command> option with `yes` or `no` you can set if the caching
+mechanism should be used.
+
+The command can also read from standard input, in which case it won't
+automatically fix anything:
+
+ <info>$ cat foo.php | php %command.full_name% --diff -</info>
+
+Finally, if you don't need BC kept on CLI level, you might use `PHP_CS_FIXER_FUTURE_MODE` to start using options that
+would be default in next MAJOR release and to forbid using deprecated configuration:
+
+ <info>$ PHP_CS_FIXER_FUTURE_MODE=1 php %command.full_name% -v --diff</info>
+
+Exit code
+---------
+
+Exit code of the fix command is built using following bit flags:
+
+* 0 - OK.
+* 1 - General error (or PHP minimal requirement not matched).
+* 4 - Some files have invalid syntax (only in dry-run mode).
+* 8 - Some files need fixing (only in dry-run mode).
+* 16 - Configuration error of the application.
+* 32 - Configuration error of a Fixer.
+* 64 - Exception raised within the application.
+
+EOF
+ ;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure(): void
+ {
+ $this
+ ->setDefinition(
+ [
+ new InputArgument('path', InputArgument::IS_ARRAY, 'The path.'),
+ new InputOption('path-mode', '', InputOption::VALUE_REQUIRED, 'Specify path mode (can be override or intersection).', ConfigurationResolver::PATH_MODE_OVERRIDE),
+ new InputOption('allow-risky', '', InputOption::VALUE_REQUIRED, 'Are risky fixers allowed (can be yes or no).'),
+ new InputOption('config', '', InputOption::VALUE_REQUIRED, 'The path to a .php-cs-fixer.php file.'),
+ new InputOption('dry-run', '', InputOption::VALUE_NONE, 'Only shows which files would have been modified.'),
+ new InputOption('rules', '', InputOption::VALUE_REQUIRED, 'The rules.'),
+ new InputOption('using-cache', '', InputOption::VALUE_REQUIRED, 'Does cache should be used (can be yes or no).'),
+ new InputOption('cache-file', '', InputOption::VALUE_REQUIRED, 'The path to the cache file.'),
+ new InputOption('diff', '', InputOption::VALUE_NONE, 'Also produce diff for each file.'),
+ new InputOption('format', '', InputOption::VALUE_REQUIRED, 'To output results in other formats.'),
+ new InputOption('stop-on-violation', '', InputOption::VALUE_NONE, 'Stop execution on first violation.'),
+ new InputOption('show-progress', '', InputOption::VALUE_REQUIRED, 'Type of progress indicator (none, dots).'),
+ ]
+ )
+ ->setDescription('Fixes a directory or a file.')
+ ;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ $verbosity = $output->getVerbosity();
+
+ $passedConfig = $input->getOption('config');
+ $passedRules = $input->getOption('rules');
+
+ if (null !== $passedConfig && null !== $passedRules) {
+ throw new InvalidConfigurationException('Passing both `--config` and `--rules` options is not allowed.');
+ }
+
+ $resolver = new ConfigurationResolver(
+ $this->defaultConfig,
+ [
+ 'allow-risky' => $input->getOption('allow-risky'),
+ 'config' => $passedConfig,
+ 'dry-run' => $input->getOption('dry-run'),
+ 'rules' => $passedRules,
+ 'path' => $input->getArgument('path'),
+ 'path-mode' => $input->getOption('path-mode'),
+ 'using-cache' => $input->getOption('using-cache'),
+ 'cache-file' => $input->getOption('cache-file'),
+ 'format' => $input->getOption('format'),
+ 'diff' => $input->getOption('diff'),
+ 'stop-on-violation' => $input->getOption('stop-on-violation'),
+ 'verbosity' => $verbosity,
+ 'show-progress' => $input->getOption('show-progress'),
+ ],
+ getcwd(),
+ $this->toolInfo
+ );
+
+ $reporter = $resolver->getReporter();
+
+ $stdErr = $output instanceof ConsoleOutputInterface
+ ? $output->getErrorOutput()
+ : ('txt' === $reporter->getFormat() ? $output : null)
+ ;
+
+ if (null !== $stdErr) {
+ if (OutputInterface::VERBOSITY_VERBOSE <= $verbosity) {
+ $stdErr->writeln($this->getApplication()->getLongVersion());
+ $stdErr->writeln(sprintf('Runtime: <info>PHP %s</info>', PHP_VERSION));
+ }
+
+ $configFile = $resolver->getConfigFile();
+ $stdErr->writeln(sprintf('Loaded config <comment>%s</comment>%s.', $resolver->getConfig()->getName(), null === $configFile ? '' : ' from "'.$configFile.'"'));
+
+ if ($resolver->getUsingCache()) {
+ $cacheFile = $resolver->getCacheFile();
+
+ if (is_file($cacheFile)) {
+ $stdErr->writeln(sprintf('Using cache file "%s".', $cacheFile));
+ }
+ }
+ }
+
+ $progressType = $resolver->getProgress();
+ $finder = $resolver->getFinder();
+
+ if (null !== $stdErr && $resolver->configFinderIsOverridden()) {
+ $stdErr->writeln(
+ sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', 'Paths from configuration file have been overridden by paths provided as command arguments.')
+ );
+ }
+
+ if ('none' === $progressType || null === $stdErr) {
+ $progressOutput = new NullOutput();
+ } else {
+ $finder = new \ArrayIterator(iterator_to_array($finder));
+ $progressOutput = new ProcessOutput(
+ $stdErr,
+ $this->eventDispatcher,
+ (new Terminal())->getWidth(),
+ \count($finder)
+ );
+ }
+
+ $runner = new Runner(
+ $finder,
+ $resolver->getFixers(),
+ $resolver->getDiffer(),
+ 'none' !== $progressType ? $this->eventDispatcher : null,
+ $this->errorsManager,
+ $resolver->getLinter(),
+ $resolver->isDryRun(),
+ $resolver->getCacheManager(),
+ $resolver->getDirectory(),
+ $resolver->shouldStopOnViolation()
+ );
+
+ $this->stopwatch->start('fixFiles');
+ $changed = $runner->fix();
+ $this->stopwatch->stop('fixFiles');
+
+ $progressOutput->printLegend();
+
+ $fixEvent = $this->stopwatch->getEvent('fixFiles');
+
+ $reportSummary = new ReportSummary(
+ $changed,
+ $fixEvent->getDuration(),
+ $fixEvent->getMemory(),
+ OutputInterface::VERBOSITY_VERBOSE <= $verbosity,
+ $resolver->isDryRun(),
+ $output->isDecorated()
+ );
+
+ $output->isDecorated()
+ ? $output->write($reporter->generate($reportSummary))
+ : $output->write($reporter->generate($reportSummary), false, OutputInterface::OUTPUT_RAW)
+ ;
+
+ $invalidErrors = $this->errorsManager->getInvalidErrors();
+ $exceptionErrors = $this->errorsManager->getExceptionErrors();
+ $lintErrors = $this->errorsManager->getLintErrors();
+
+ if (null !== $stdErr) {
+ $errorOutput = new ErrorOutput($stdErr);
+
+ if (\count($invalidErrors) > 0) {
+ $errorOutput->listErrors('linting before fixing', $invalidErrors);
+ }
+
+ if (\count($exceptionErrors) > 0) {
+ $errorOutput->listErrors('fixing', $exceptionErrors);
+ }
+
+ if (\count($lintErrors) > 0) {
+ $errorOutput->listErrors('linting after fixing', $lintErrors);
+ }
+ }
+
+ $exitStatusCalculator = new FixCommandExitStatusCalculator();
+
+ return $exitStatusCalculator->calculate(
+ $resolver->isDryRun(),
+ \count($changed) > 0,
+ \count($invalidErrors) > 0,
+ \count($exceptionErrors) > 0,
+ \count($lintErrors) > 0
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php
new file mode 100644
index 0000000..727dfff
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommandExitStatusCalculator.php
@@ -0,0 +1,51 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FixCommandExitStatusCalculator
+{
+ // Exit status 1 is reserved for environment constraints not matched.
+ public const EXIT_STATUS_FLAG_HAS_INVALID_FILES = 4;
+ public const EXIT_STATUS_FLAG_HAS_CHANGED_FILES = 8;
+ public const EXIT_STATUS_FLAG_HAS_INVALID_CONFIG = 16;
+ public const EXIT_STATUS_FLAG_HAS_INVALID_FIXER_CONFIG = 32;
+ public const EXIT_STATUS_FLAG_EXCEPTION_IN_APP = 64;
+
+ public function calculate(bool $isDryRun, bool $hasChangedFiles, bool $hasInvalidErrors, bool $hasExceptionErrors, bool $hasLintErrorsAfterFixing): int
+ {
+ $exitStatus = 0;
+
+ if ($isDryRun) {
+ if ($hasChangedFiles) {
+ $exitStatus |= self::EXIT_STATUS_FLAG_HAS_CHANGED_FILES;
+ }
+
+ if ($hasInvalidErrors) {
+ $exitStatus |= self::EXIT_STATUS_FLAG_HAS_INVALID_FILES;
+ }
+ }
+
+ if ($hasExceptionErrors || $hasLintErrorsAfterFixing) {
+ $exitStatus |= self::EXIT_STATUS_FLAG_EXCEPTION_IN_APP;
+ }
+
+ return $exitStatus;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php
new file mode 100644
index 0000000..a5f2204
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/HelpCommand.php
@@ -0,0 +1,124 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerOptionInterface;
+use PhpCsFixer\Preg;
+use Symfony\Component\Console\Command\HelpCommand as BaseHelpCommand;
+use Symfony\Component\Console\Formatter\OutputFormatterStyle;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class HelpCommand extends BaseHelpCommand
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'help';
+
+ /**
+ * @param mixed $value
+ */
+ public static function toString($value): string
+ {
+ return \is_array($value)
+ ? static::arrayToString($value)
+ : static::scalarToString($value)
+ ;
+ }
+
+ /**
+ * Returns the allowed values of the given option that can be converted to a string.
+ */
+ public static function getDisplayableAllowedValues(FixerOptionInterface $option): ?array
+ {
+ $allowed = $option->getAllowedValues();
+
+ if (null !== $allowed) {
+ $allowed = array_filter($allowed, static function ($value): bool {
+ return !($value instanceof \Closure);
+ });
+
+ usort($allowed, static function ($valueA, $valueB): int {
+ if ($valueA instanceof AllowedValueSubset) {
+ return -1;
+ }
+
+ if ($valueB instanceof AllowedValueSubset) {
+ return 1;
+ }
+
+ return strcasecmp(
+ self::toString($valueA),
+ self::toString($valueB)
+ );
+ });
+
+ if (0 === \count($allowed)) {
+ $allowed = null;
+ }
+ }
+
+ return $allowed;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function initialize(InputInterface $input, OutputInterface $output): void
+ {
+ $output->getFormatter()->setStyle('url', new OutputFormatterStyle('blue'));
+ }
+
+ /**
+ * @param mixed $value
+ */
+ private static function scalarToString($value): string
+ {
+ $str = var_export($value, true);
+
+ return Preg::replace('/\bNULL\b/', 'null', $str);
+ }
+
+ private static function arrayToString(array $value): string
+ {
+ if (0 === \count($value)) {
+ return '[]';
+ }
+
+ $isHash = !array_is_list($value);
+ $str = '[';
+
+ foreach ($value as $k => $v) {
+ if ($isHash) {
+ $str .= static::scalarToString($k).' => ';
+ }
+
+ $str .= \is_array($v)
+ ? static::arrayToString($v).', '
+ : static::scalarToString($v).', '
+ ;
+ }
+
+ return substr($str, 0, -2).']';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php
new file mode 100644
index 0000000..f88707c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListFilesCommand.php
@@ -0,0 +1,101 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\Config;
+use PhpCsFixer\ConfigInterface;
+use PhpCsFixer\Console\ConfigurationResolver;
+use PhpCsFixer\ToolInfoInterface;
+use SplFileInfo;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @author Markus Staab <markus.staab@redaxo.org>
+ *
+ * @internal
+ */
+final class ListFilesCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'list-files';
+
+ /**
+ * @var ConfigInterface
+ */
+ private $defaultConfig;
+
+ /**
+ * @var ToolInfoInterface
+ */
+ private $toolInfo;
+
+ public function __construct(ToolInfoInterface $toolInfo)
+ {
+ parent::__construct();
+
+ $this->defaultConfig = new Config();
+ $this->toolInfo = $toolInfo;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure(): void
+ {
+ $this
+ ->setDefinition(
+ [
+ new InputOption('config', '', InputOption::VALUE_REQUIRED, 'The path to a .php-cs-fixer.php file.'),
+ ]
+ )
+ ->setDescription('List all files being fixed by the given config.')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ $passedConfig = $input->getOption('config');
+ $cwd = getcwd();
+
+ $resolver = new ConfigurationResolver(
+ $this->defaultConfig,
+ [
+ 'config' => $passedConfig,
+ ],
+ $cwd,
+ $this->toolInfo
+ );
+
+ $finder = $resolver->getFinder();
+
+ /** @var SplFileInfo $file */
+ foreach ($finder as $file) {
+ if ($file->isFile()) {
+ $relativePath = str_replace($cwd, '.', $file->getRealPath());
+ // unify directory separators across operating system
+ $relativePath = str_replace('/', \DIRECTORY_SEPARATOR, $relativePath);
+
+ $output->writeln(escapeshellarg($relativePath));
+ }
+ }
+
+ return 0;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php
new file mode 100644
index 0000000..ad2a291
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/ListSetsCommand.php
@@ -0,0 +1,91 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
+use PhpCsFixer\Console\Report\ListSetsReport\ReporterFactory;
+use PhpCsFixer\Console\Report\ListSetsReport\ReporterInterface;
+use PhpCsFixer\Console\Report\ListSetsReport\ReportSummary;
+use PhpCsFixer\Console\Report\ListSetsReport\TextReporter;
+use PhpCsFixer\RuleSet\RuleSets;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ListSetsCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'list-sets';
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure(): void
+ {
+ $this
+ ->setDefinition(
+ [
+ new InputOption('format', '', InputOption::VALUE_REQUIRED, 'To output results in other formats.', (new TextReporter())->getFormat()),
+ ]
+ )
+ ->setDescription('List all available RuleSets.')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $reporter = $this->resolveReporterWithFactory(
+ $input->getOption('format'),
+ new ReporterFactory()
+ );
+
+ $reportSummary = new ReportSummary(
+ array_values(RuleSets::getSetDefinitions())
+ );
+
+ $report = $reporter->generate($reportSummary);
+
+ $output->isDecorated()
+ ? $output->write(OutputFormatter::escape($report))
+ : $output->write($report, false, OutputInterface::OUTPUT_RAW)
+ ;
+
+ return 0;
+ }
+
+ private function resolveReporterWithFactory(string $format, ReporterFactory $factory): ReporterInterface
+ {
+ try {
+ $factory->registerBuiltInReporters();
+ $reporter = $factory->getReporter($format);
+ } catch (\UnexpectedValueException $e) {
+ $formats = $factory->getFormats();
+ sort($formats);
+
+ throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are "%s".', $format, implode('", "', $formats)));
+ }
+
+ return $reporter;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php
new file mode 100644
index 0000000..2039b04
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Command/SelfUpdateCommand.php
@@ -0,0 +1,188 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Command;
+
+use PhpCsFixer\Console\SelfUpdate\NewVersionCheckerInterface;
+use PhpCsFixer\PharCheckerInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\ToolInfoInterface;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @author Igor Wiedler <igor@wiedler.ch>
+ * @author Stephane PY <py.stephane1@gmail.com>
+ * @author Grégoire Pineau <lyrixx@lyrixx.info>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class SelfUpdateCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected static $defaultName = 'self-update';
+
+ /**
+ * @var NewVersionCheckerInterface
+ */
+ private $versionChecker;
+
+ /**
+ * @var ToolInfoInterface
+ */
+ private $toolInfo;
+
+ /**
+ * @var PharCheckerInterface
+ */
+ private $pharChecker;
+
+ public function __construct(
+ NewVersionCheckerInterface $versionChecker,
+ ToolInfoInterface $toolInfo,
+ PharCheckerInterface $pharChecker
+ ) {
+ parent::__construct();
+
+ $this->versionChecker = $versionChecker;
+ $this->toolInfo = $toolInfo;
+ $this->pharChecker = $pharChecker;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function configure(): void
+ {
+ $this
+ ->setAliases(['selfupdate'])
+ ->setDefinition(
+ [
+ new InputOption('--force', '-f', InputOption::VALUE_NONE, 'Force update to next major version if available.'),
+ ]
+ )
+ ->setDescription('Update php-cs-fixer.phar to the latest stable version.')
+ ->setHelp(
+ <<<'EOT'
+The <info>%command.name%</info> command replace your php-cs-fixer.phar by the
+latest version released on:
+<comment>https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases</comment>
+
+<info>$ php php-cs-fixer.phar %command.name%</info>
+
+EOT
+ )
+ ;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function execute(InputInterface $input, OutputInterface $output): int
+ {
+ if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity() && $output instanceof ConsoleOutputInterface) {
+ $stdErr = $output->getErrorOutput();
+ $stdErr->writeln($this->getApplication()->getLongVersion());
+ $stdErr->writeln(sprintf('Runtime: <info>PHP %s</info>', PHP_VERSION));
+ }
+
+ if (!$this->toolInfo->isInstalledAsPhar()) {
+ $output->writeln('<error>Self-update is available only for PHAR version.</error>');
+
+ return 1;
+ }
+
+ $currentVersion = $this->getApplication()->getVersion();
+ Preg::match('/^v?(?<major>\d+)\./', $currentVersion, $matches);
+ $currentMajor = (int) $matches['major'];
+
+ try {
+ $latestVersion = $this->versionChecker->getLatestVersion();
+ $latestVersionOfCurrentMajor = $this->versionChecker->getLatestVersionOfMajor($currentMajor);
+ } catch (\Exception $exception) {
+ $output->writeln(sprintf(
+ '<error>Unable to determine newest version: %s</error>',
+ $exception->getMessage()
+ ));
+
+ return 1;
+ }
+
+ if (1 !== $this->versionChecker->compareVersions($latestVersion, $currentVersion)) {
+ $output->writeln('<info>PHP CS Fixer is already up to date.</info>');
+
+ return 0;
+ }
+
+ $remoteTag = $latestVersion;
+
+ if (
+ 0 !== $this->versionChecker->compareVersions($latestVersionOfCurrentMajor, $latestVersion)
+ && true !== $input->getOption('force')
+ ) {
+ $output->writeln(sprintf('<info>A new major version of PHP CS Fixer is available</info> (<comment>%s</comment>)', $latestVersion));
+ $output->writeln(sprintf('<info>Before upgrading please read</info> https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/%s/UPGRADE-v%s.md', $latestVersion, $currentMajor + 1));
+ $output->writeln('<info>If you are ready to upgrade run this command with</info> <comment>-f</comment>');
+ $output->writeln('<info>Checking for new minor/patch version...</info>');
+
+ if (1 !== $this->versionChecker->compareVersions($latestVersionOfCurrentMajor, $currentVersion)) {
+ $output->writeln('<info>No minor update for PHP CS Fixer.</info>');
+
+ return 0;
+ }
+
+ $remoteTag = $latestVersionOfCurrentMajor;
+ }
+
+ $localFilename = realpath($_SERVER['argv'][0]) ?: $_SERVER['argv'][0];
+
+ if (!is_writable($localFilename)) {
+ $output->writeln(sprintf('<error>No permission to update</error> "%s" <error>file.</error>', $localFilename));
+
+ return 1;
+ }
+
+ $tempFilename = \dirname($localFilename).'/'.basename($localFilename, '.phar').'-tmp.phar';
+ $remoteFilename = $this->toolInfo->getPharDownloadUri($remoteTag);
+
+ if (false === @copy($remoteFilename, $tempFilename)) {
+ $output->writeln(sprintf('<error>Unable to download new version</error> %s <error>from the server.</error>', $remoteTag));
+
+ return 1;
+ }
+
+ chmod($tempFilename, 0777 & ~umask());
+
+ $pharInvalidityReason = $this->pharChecker->checkFileValidity($tempFilename);
+ if (null !== $pharInvalidityReason) {
+ unlink($tempFilename);
+ $output->writeln(sprintf('<error>The download of</error> %s <error>is corrupt (%s).</error>', $remoteTag, $pharInvalidityReason));
+ $output->writeln('<error>Please re-run the "self-update" command to try again.</error>');
+
+ return 1;
+ }
+
+ rename($tempFilename, $localFilename);
+
+ $output->writeln(sprintf('<info>PHP CS Fixer updated</info> (<comment>%s</comment> -> <comment>%s</comment>)', $currentVersion, $remoteTag));
+
+ return 0;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php b/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php
new file mode 100644
index 0000000..3fe44f9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/ConfigurationResolver.php
@@ -0,0 +1,955 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console;
+
+use PhpCsFixer\Cache\CacheManagerInterface;
+use PhpCsFixer\Cache\Directory;
+use PhpCsFixer\Cache\DirectoryInterface;
+use PhpCsFixer\Cache\FileCacheManager;
+use PhpCsFixer\Cache\FileHandler;
+use PhpCsFixer\Cache\NullCacheManager;
+use PhpCsFixer\Cache\Signature;
+use PhpCsFixer\ConfigInterface;
+use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
+use PhpCsFixer\Console\Command\HelpCommand;
+use PhpCsFixer\Console\Report\FixReport\ReporterFactory;
+use PhpCsFixer\Console\Report\FixReport\ReporterInterface;
+use PhpCsFixer\Differ\DifferInterface;
+use PhpCsFixer\Differ\NullDiffer;
+use PhpCsFixer\Differ\UnifiedDiffer;
+use PhpCsFixer\Finder;
+use PhpCsFixer\Fixer\DeprecatedFixerInterface;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\FixerFactory;
+use PhpCsFixer\Linter\Linter;
+use PhpCsFixer\Linter\LinterInterface;
+use PhpCsFixer\RuleSet\RuleSet;
+use PhpCsFixer\RuleSet\RuleSetInterface;
+use PhpCsFixer\StdinFileInfo;
+use PhpCsFixer\ToolInfoInterface;
+use PhpCsFixer\Utils;
+use PhpCsFixer\WhitespacesFixerConfig;
+use PhpCsFixer\WordMatcher;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Filesystem\Filesystem;
+use Symfony\Component\Finder\Finder as SymfonyFinder;
+
+/**
+ * The resolver that resolves configuration to use by command line options and config.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Katsuhiro Ogawa <ko.fivestar@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ConfigurationResolver
+{
+ public const PATH_MODE_OVERRIDE = 'override';
+ public const PATH_MODE_INTERSECTION = 'intersection';
+
+ /**
+ * @var null|bool
+ */
+ private $allowRisky;
+
+ /**
+ * @var null|ConfigInterface
+ */
+ private $config;
+
+ /**
+ * @var null|string
+ */
+ private $configFile;
+
+ /**
+ * @var string
+ */
+ private $cwd;
+
+ /**
+ * @var ConfigInterface
+ */
+ private $defaultConfig;
+
+ /**
+ * @var null|ReporterInterface
+ */
+ private $reporter;
+
+ /**
+ * @var null|bool
+ */
+ private $isStdIn;
+
+ /**
+ * @var null|bool
+ */
+ private $isDryRun;
+
+ /**
+ * @var null|FixerInterface[]
+ */
+ private $fixers;
+
+ /**
+ * @var null|bool
+ */
+ private $configFinderIsOverridden;
+
+ /**
+ * @var ToolInfoInterface
+ */
+ private $toolInfo;
+
+ /**
+ * @var array
+ */
+ private $options = [
+ 'allow-risky' => null,
+ 'cache-file' => null,
+ 'config' => null,
+ 'diff' => null,
+ 'dry-run' => null,
+ 'format' => null,
+ 'path' => [],
+ 'path-mode' => self::PATH_MODE_OVERRIDE,
+ 'rules' => null,
+ 'show-progress' => null,
+ 'stop-on-violation' => null,
+ 'using-cache' => null,
+ 'verbosity' => null,
+ ];
+
+ /**
+ * @var null|string
+ */
+ private $cacheFile;
+
+ /**
+ * @var null|CacheManagerInterface
+ */
+ private $cacheManager;
+
+ /**
+ * @var null|DifferInterface
+ */
+ private $differ;
+
+ /**
+ * @var null|Directory
+ */
+ private $directory;
+
+ /**
+ * @var null|iterable
+ */
+ private $finder;
+
+ private $format;
+
+ /**
+ * @var null|Linter
+ */
+ private $linter;
+
+ private $path;
+
+ /**
+ * @var null|string
+ */
+ private $progress;
+
+ /**
+ * @var null|RuleSet
+ */
+ private $ruleSet;
+
+ /**
+ * @var null|bool
+ */
+ private $usingCache;
+
+ /**
+ * @var FixerFactory
+ */
+ private $fixerFactory;
+
+ public function __construct(
+ ConfigInterface $config,
+ array $options,
+ string $cwd,
+ ToolInfoInterface $toolInfo
+ ) {
+ $this->cwd = $cwd;
+ $this->defaultConfig = $config;
+ $this->toolInfo = $toolInfo;
+
+ foreach ($options as $name => $value) {
+ $this->setOption($name, $value);
+ }
+ }
+
+ public function getCacheFile(): ?string
+ {
+ if (!$this->getUsingCache()) {
+ return null;
+ }
+
+ if (null === $this->cacheFile) {
+ if (null === $this->options['cache-file']) {
+ $this->cacheFile = $this->getConfig()->getCacheFile();
+ } else {
+ $this->cacheFile = $this->options['cache-file'];
+ }
+ }
+
+ return $this->cacheFile;
+ }
+
+ public function getCacheManager(): CacheManagerInterface
+ {
+ if (null === $this->cacheManager) {
+ $cacheFile = $this->getCacheFile();
+
+ if (null === $cacheFile) {
+ $this->cacheManager = new NullCacheManager();
+ } else {
+ $this->cacheManager = new FileCacheManager(
+ new FileHandler($cacheFile),
+ new Signature(
+ PHP_VERSION,
+ $this->toolInfo->getVersion(),
+ $this->getConfig()->getIndent(),
+ $this->getConfig()->getLineEnding(),
+ $this->getRules()
+ ),
+ $this->isDryRun(),
+ $this->getDirectory()
+ );
+ }
+ }
+
+ return $this->cacheManager;
+ }
+
+ public function getConfig(): ConfigInterface
+ {
+ if (null === $this->config) {
+ foreach ($this->computeConfigFiles() as $configFile) {
+ if (!file_exists($configFile)) {
+ continue;
+ }
+
+ $configFileBasename = basename($configFile);
+ $deprecatedConfigs = [
+ '.php_cs' => '.php-cs-fixer.php',
+ '.php_cs.dist' => '.php-cs-fixer.dist.php',
+ ];
+
+ if (isset($deprecatedConfigs[$configFileBasename])) {
+ throw new InvalidConfigurationException("Configuration file `{$configFileBasename}` is outdated, rename to `{$deprecatedConfigs[$configFileBasename]}`.");
+ }
+
+ $this->config = self::separatedContextLessInclude($configFile);
+ $this->configFile = $configFile;
+
+ break;
+ }
+
+ if (null === $this->config) {
+ $this->config = $this->defaultConfig;
+ }
+ }
+
+ return $this->config;
+ }
+
+ public function getConfigFile(): ?string
+ {
+ if (null === $this->configFile) {
+ $this->getConfig();
+ }
+
+ return $this->configFile;
+ }
+
+ public function getDiffer(): DifferInterface
+ {
+ if (null === $this->differ) {
+ if ($this->options['diff']) {
+ $this->differ = new UnifiedDiffer();
+ } else {
+ $this->differ = new NullDiffer();
+ }
+ }
+
+ return $this->differ;
+ }
+
+ public function getDirectory(): DirectoryInterface
+ {
+ if (null === $this->directory) {
+ $path = $this->getCacheFile();
+ if (null === $path) {
+ $absolutePath = $this->cwd;
+ } else {
+ $filesystem = new Filesystem();
+
+ $absolutePath = $filesystem->isAbsolutePath($path)
+ ? $path
+ : $this->cwd.\DIRECTORY_SEPARATOR.$path;
+ }
+
+ $this->directory = new Directory(\dirname($absolutePath));
+ }
+
+ return $this->directory;
+ }
+
+ /**
+ * @return FixerInterface[] An array of FixerInterface
+ */
+ public function getFixers(): array
+ {
+ if (null === $this->fixers) {
+ $this->fixers = $this->createFixerFactory()
+ ->useRuleSet($this->getRuleSet())
+ ->setWhitespacesConfig(new WhitespacesFixerConfig($this->config->getIndent(), $this->config->getLineEnding()))
+ ->getFixers()
+ ;
+
+ if (false === $this->getRiskyAllowed()) {
+ $riskyFixers = array_map(
+ static function (FixerInterface $fixer): string {
+ return $fixer->getName();
+ },
+ array_filter(
+ $this->fixers,
+ static function (FixerInterface $fixer): bool {
+ return $fixer->isRisky();
+ }
+ )
+ );
+
+ if (\count($riskyFixers) > 0) {
+ throw new InvalidConfigurationException(sprintf('The rules contain risky fixers ("%s"), but they are not allowed to run. Perhaps you forget to use --allow-risky=yes option?', implode('", "', $riskyFixers)));
+ }
+ }
+ }
+
+ return $this->fixers;
+ }
+
+ public function getLinter(): LinterInterface
+ {
+ if (null === $this->linter) {
+ $this->linter = new Linter($this->getConfig()->getPhpExecutable());
+ }
+
+ return $this->linter;
+ }
+
+ /**
+ * Returns path.
+ *
+ * @return string[]
+ */
+ public function getPath(): array
+ {
+ if (null === $this->path) {
+ $filesystem = new Filesystem();
+ $cwd = $this->cwd;
+
+ if (1 === \count($this->options['path']) && '-' === $this->options['path'][0]) {
+ $this->path = $this->options['path'];
+ } else {
+ $this->path = array_map(
+ static function (string $rawPath) use ($cwd, $filesystem): string {
+ $path = trim($rawPath);
+
+ if ('' === $path) {
+ throw new InvalidConfigurationException("Invalid path: \"{$rawPath}\".");
+ }
+
+ $absolutePath = $filesystem->isAbsolutePath($path)
+ ? $path
+ : $cwd.\DIRECTORY_SEPARATOR.$path;
+
+ if (!file_exists($absolutePath)) {
+ throw new InvalidConfigurationException(sprintf(
+ 'The path "%s" is not readable.',
+ $path
+ ));
+ }
+
+ return $absolutePath;
+ },
+ $this->options['path']
+ );
+ }
+ }
+
+ return $this->path;
+ }
+
+ /**
+ * @throws InvalidConfigurationException
+ */
+ public function getProgress(): string
+ {
+ if (null === $this->progress) {
+ if (OutputInterface::VERBOSITY_VERBOSE <= $this->options['verbosity'] && 'txt' === $this->getFormat()) {
+ $progressType = $this->options['show-progress'];
+ $progressTypes = ['none', 'dots'];
+
+ if (null === $progressType) {
+ $progressType = $this->getConfig()->getHideProgress() ? 'none' : 'dots';
+ } elseif (!\in_array($progressType, $progressTypes, true)) {
+ throw new InvalidConfigurationException(sprintf(
+ 'The progress type "%s" is not defined, supported are "%s".',
+ $progressType,
+ implode('", "', $progressTypes)
+ ));
+ }
+
+ $this->progress = $progressType;
+ } else {
+ $this->progress = 'none';
+ }
+ }
+
+ return $this->progress;
+ }
+
+ public function getReporter(): ReporterInterface
+ {
+ if (null === $this->reporter) {
+ $reporterFactory = new ReporterFactory();
+ $reporterFactory->registerBuiltInReporters();
+
+ $format = $this->getFormat();
+
+ try {
+ $this->reporter = $reporterFactory->getReporter($format);
+ } catch (\UnexpectedValueException $e) {
+ $formats = $reporterFactory->getFormats();
+ sort($formats);
+
+ throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are "%s".', $format, implode('", "', $formats)));
+ }
+ }
+
+ return $this->reporter;
+ }
+
+ public function getRiskyAllowed(): bool
+ {
+ if (null === $this->allowRisky) {
+ if (null === $this->options['allow-risky']) {
+ $this->allowRisky = $this->getConfig()->getRiskyAllowed();
+ } else {
+ $this->allowRisky = $this->resolveOptionBooleanValue('allow-risky');
+ }
+ }
+
+ return $this->allowRisky;
+ }
+
+ /**
+ * Returns rules.
+ */
+ public function getRules(): array
+ {
+ return $this->getRuleSet()->getRules();
+ }
+
+ public function getUsingCache(): bool
+ {
+ if (null === $this->usingCache) {
+ if (null === $this->options['using-cache']) {
+ $this->usingCache = $this->getConfig()->getUsingCache();
+ } else {
+ $this->usingCache = $this->resolveOptionBooleanValue('using-cache');
+ }
+ }
+
+ $this->usingCache = $this->usingCache && ($this->toolInfo->isInstalledAsPhar() || $this->toolInfo->isInstalledByComposer());
+
+ return $this->usingCache;
+ }
+
+ public function getFinder(): iterable
+ {
+ if (null === $this->finder) {
+ $this->finder = $this->resolveFinder();
+ }
+
+ return $this->finder;
+ }
+
+ /**
+ * Returns dry-run flag.
+ */
+ public function isDryRun(): bool
+ {
+ if (null === $this->isDryRun) {
+ if ($this->isStdIn()) {
+ // Can't write to STDIN
+ $this->isDryRun = true;
+ } else {
+ $this->isDryRun = $this->options['dry-run'];
+ }
+ }
+
+ return $this->isDryRun;
+ }
+
+ public function shouldStopOnViolation(): bool
+ {
+ return $this->options['stop-on-violation'];
+ }
+
+ public function configFinderIsOverridden(): bool
+ {
+ if (null === $this->configFinderIsOverridden) {
+ $this->resolveFinder();
+ }
+
+ return $this->configFinderIsOverridden;
+ }
+
+ /**
+ * Compute file candidates for config file.
+ *
+ * @return string[]
+ */
+ private function computeConfigFiles(): array
+ {
+ $configFile = $this->options['config'];
+
+ if (null !== $configFile) {
+ if (false === file_exists($configFile) || false === is_readable($configFile)) {
+ throw new InvalidConfigurationException(sprintf('Cannot read config file "%s".', $configFile));
+ }
+
+ return [$configFile];
+ }
+
+ $path = $this->getPath();
+
+ if ($this->isStdIn() || 0 === \count($path)) {
+ $configDir = $this->cwd;
+ } elseif (1 < \count($path)) {
+ throw new InvalidConfigurationException('For multiple paths config parameter is required.');
+ } elseif (!is_file($path[0])) {
+ $configDir = $path[0];
+ } else {
+ $dirName = pathinfo($path[0], PATHINFO_DIRNAME);
+ $configDir = $dirName ?: $path[0];
+ }
+
+ $candidates = [
+ $configDir.\DIRECTORY_SEPARATOR.'.php-cs-fixer.php',
+ $configDir.\DIRECTORY_SEPARATOR.'.php-cs-fixer.dist.php',
+ $configDir.\DIRECTORY_SEPARATOR.'.php_cs', // old v2 config, present here only to throw nice error message later
+ $configDir.\DIRECTORY_SEPARATOR.'.php_cs.dist', // old v2 config, present here only to throw nice error message later
+ ];
+
+ if ($configDir !== $this->cwd) {
+ $candidates[] = $this->cwd.\DIRECTORY_SEPARATOR.'.php-cs-fixer.php';
+ $candidates[] = $this->cwd.\DIRECTORY_SEPARATOR.'.php-cs-fixer.dist.php';
+ $candidates[] = $this->cwd.\DIRECTORY_SEPARATOR.'.php_cs'; // old v2 config, present here only to throw nice error message later
+ $candidates[] = $this->cwd.\DIRECTORY_SEPARATOR.'.php_cs.dist'; // old v2 config, present here only to throw nice error message later
+ }
+
+ return $candidates;
+ }
+
+ private function createFixerFactory(): FixerFactory
+ {
+ if (null === $this->fixerFactory) {
+ $fixerFactory = new FixerFactory();
+ $fixerFactory->registerBuiltInFixers();
+ $fixerFactory->registerCustomFixers($this->getConfig()->getCustomFixers());
+
+ $this->fixerFactory = $fixerFactory;
+ }
+
+ return $this->fixerFactory;
+ }
+
+ private function getFormat(): string
+ {
+ if (null === $this->format) {
+ $this->format = $this->options['format'] ?? $this->getConfig()->getFormat();
+ }
+
+ return $this->format;
+ }
+
+ private function getRuleSet(): RuleSetInterface
+ {
+ if (null === $this->ruleSet) {
+ $rules = $this->parseRules();
+ $this->validateRules($rules);
+
+ $this->ruleSet = new RuleSet($rules);
+ }
+
+ return $this->ruleSet;
+ }
+
+ private function isStdIn(): bool
+ {
+ if (null === $this->isStdIn) {
+ $this->isStdIn = 1 === \count($this->options['path']) && '-' === $this->options['path'][0];
+ }
+
+ return $this->isStdIn;
+ }
+
+ private function iterableToTraversable(iterable $iterable): \Traversable
+ {
+ return \is_array($iterable) ? new \ArrayIterator($iterable) : $iterable;
+ }
+
+ /**
+ * Compute rules.
+ */
+ private function parseRules(): array
+ {
+ if (null === $this->options['rules']) {
+ return $this->getConfig()->getRules();
+ }
+
+ $rules = trim($this->options['rules']);
+ if ('' === $rules) {
+ throw new InvalidConfigurationException('Empty rules value is not allowed.');
+ }
+
+ if (str_starts_with($rules, '{')) {
+ $rules = json_decode($rules, true);
+
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw new InvalidConfigurationException(sprintf('Invalid JSON rules input: "%s".', json_last_error_msg()));
+ }
+
+ return $rules;
+ }
+
+ $rules = [];
+
+ foreach (explode(',', $this->options['rules']) as $rule) {
+ $rule = trim($rule);
+
+ if ('' === $rule) {
+ throw new InvalidConfigurationException('Empty rule name is not allowed.');
+ }
+
+ if (str_starts_with($rule, '-')) {
+ $rules[substr($rule, 1)] = false;
+ } else {
+ $rules[$rule] = true;
+ }
+ }
+
+ return $rules;
+ }
+
+ /**
+ * @throws InvalidConfigurationException
+ */
+ private function validateRules(array $rules): void
+ {
+ /**
+ * Create a ruleset that contains all configured rules, even when they originally have been disabled.
+ *
+ * @see RuleSet::resolveSet()
+ */
+ $ruleSet = [];
+
+ foreach ($rules as $key => $value) {
+ if (\is_int($key)) {
+ throw new InvalidConfigurationException(sprintf('Missing value for "%s" rule/set.', $value));
+ }
+
+ $ruleSet[$key] = true;
+ }
+
+ $ruleSet = new RuleSet($ruleSet);
+
+ /** @var string[] $configuredFixers */
+ $configuredFixers = array_keys($ruleSet->getRules());
+
+ $fixers = $this->createFixerFactory()->getFixers();
+
+ /** @var string[] $availableFixers */
+ $availableFixers = array_map(static function (FixerInterface $fixer): string {
+ return $fixer->getName();
+ }, $fixers);
+
+ $unknownFixers = array_diff(
+ $configuredFixers,
+ $availableFixers
+ );
+
+ if (\count($unknownFixers) > 0) {
+ $renamedRules = [
+ 'blank_line_before_return' => [
+ 'new_name' => 'blank_line_before_statement',
+ 'config' => ['statements' => ['return']],
+ ],
+ 'final_static_access' => [
+ 'new_name' => 'self_static_accessor',
+ ],
+ 'hash_to_slash_comment' => [
+ 'new_name' => 'single_line_comment_style',
+ 'config' => ['comment_types' => ['hash']],
+ ],
+ 'lowercase_constants' => [
+ 'new_name' => 'constant_case',
+ 'config' => ['case' => 'lower'],
+ ],
+ 'no_extra_consecutive_blank_lines' => [
+ 'new_name' => 'no_extra_blank_lines',
+ ],
+ 'no_multiline_whitespace_before_semicolons' => [
+ 'new_name' => 'multiline_whitespace_before_semicolons',
+ ],
+ 'no_short_echo_tag' => [
+ 'new_name' => 'echo_tag_syntax',
+ 'config' => ['format' => 'long'],
+ ],
+ 'php_unit_ordered_covers' => [
+ 'new_name' => 'phpdoc_order_by_value',
+ 'config' => ['annotations' => ['covers']],
+ ],
+ 'phpdoc_inline_tag' => [
+ 'new_name' => 'general_phpdoc_tag_rename, phpdoc_inline_tag_normalizer and phpdoc_tag_type',
+ ],
+ 'pre_increment' => [
+ 'new_name' => 'increment_style',
+ 'config' => ['style' => 'pre'],
+ ],
+ 'psr0' => [
+ 'new_name' => 'psr_autoloading',
+ 'config' => ['dir' => 'x'],
+ ],
+ 'psr4' => [
+ 'new_name' => 'psr_autoloading',
+ ],
+ 'silenced_deprecation_error' => [
+ 'new_name' => 'error_suppression',
+ ],
+ 'trailing_comma_in_multiline_array' => [
+ 'new_name' => 'trailing_comma_in_multiline',
+ 'config' => ['elements' => ['arrays']],
+ ],
+ ];
+
+ $message = 'The rules contain unknown fixers: ';
+ $hasOldRule = false;
+
+ foreach ($unknownFixers as $unknownFixer) {
+ if (isset($renamedRules[$unknownFixer])) { // Check if present as old renamed rule
+ $hasOldRule = true;
+ $message .= sprintf(
+ '"%s" is renamed (did you mean "%s"?%s), ',
+ $unknownFixer,
+ $renamedRules[$unknownFixer]['new_name'],
+ isset($renamedRules[$unknownFixer]['config']) ? ' (note: use configuration "'.HelpCommand::toString($renamedRules[$unknownFixer]['config']).'")' : ''
+ );
+ } else { // Go to normal matcher if it is not a renamed rule
+ $matcher = new WordMatcher($availableFixers);
+ $alternative = $matcher->match($unknownFixer);
+ $message .= sprintf(
+ '"%s"%s, ',
+ $unknownFixer,
+ null === $alternative ? '' : ' (did you mean "'.$alternative.'"?)'
+ );
+ }
+ }
+
+ $message = substr($message, 0, -2).'.';
+
+ if ($hasOldRule) {
+ $message .= "\nFor more info about updating see: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.0.0/UPGRADE-v3.md#renamed-ruless.";
+ }
+
+ throw new InvalidConfigurationException($message);
+ }
+
+ foreach ($fixers as $fixer) {
+ $fixerName = $fixer->getName();
+ if (isset($rules[$fixerName]) && $fixer instanceof DeprecatedFixerInterface) {
+ $successors = $fixer->getSuccessorsNames();
+ $messageEnd = [] === $successors
+ ? sprintf(' and will be removed in version %d.0.', Application::getMajorVersion() + 1)
+ : sprintf('. Use %s instead.', str_replace('`', '"', Utils::naturalLanguageJoinWithBackticks($successors)));
+
+ Utils::triggerDeprecation(new \RuntimeException("Rule \"{$fixerName}\" is deprecated{$messageEnd}"));
+ }
+ }
+ }
+
+ /**
+ * Apply path on config instance.
+ */
+ private function resolveFinder(): iterable
+ {
+ $this->configFinderIsOverridden = false;
+
+ if ($this->isStdIn()) {
+ return new \ArrayIterator([new StdinFileInfo()]);
+ }
+
+ $modes = [self::PATH_MODE_OVERRIDE, self::PATH_MODE_INTERSECTION];
+
+ if (!\in_array(
+ $this->options['path-mode'],
+ $modes,
+ true
+ )) {
+ throw new InvalidConfigurationException(sprintf(
+ 'The path-mode "%s" is not defined, supported are "%s".',
+ $this->options['path-mode'],
+ implode('", "', $modes)
+ ));
+ }
+
+ $isIntersectionPathMode = self::PATH_MODE_INTERSECTION === $this->options['path-mode'];
+
+ $paths = array_filter(array_map(
+ static function (string $path) {
+ return realpath($path);
+ },
+ $this->getPath()
+ ));
+
+ if (0 === \count($paths)) {
+ if ($isIntersectionPathMode) {
+ return new \ArrayIterator([]);
+ }
+
+ return $this->iterableToTraversable($this->getConfig()->getFinder());
+ }
+
+ $pathsByType = [
+ 'file' => [],
+ 'dir' => [],
+ ];
+
+ foreach ($paths as $path) {
+ if (is_file($path)) {
+ $pathsByType['file'][] = $path;
+ } else {
+ $pathsByType['dir'][] = $path.\DIRECTORY_SEPARATOR;
+ }
+ }
+
+ $nestedFinder = null;
+ $currentFinder = $this->iterableToTraversable($this->getConfig()->getFinder());
+
+ try {
+ $nestedFinder = $currentFinder instanceof \IteratorAggregate ? $currentFinder->getIterator() : $currentFinder;
+ } catch (\Exception $e) {
+ }
+
+ if ($isIntersectionPathMode) {
+ if (null === $nestedFinder) {
+ throw new InvalidConfigurationException(
+ 'Cannot create intersection with not-fully defined Finder in configuration file.'
+ );
+ }
+
+ return new \CallbackFilterIterator(
+ new \IteratorIterator($nestedFinder),
+ static function (\SplFileInfo $current) use ($pathsByType): bool {
+ $currentRealPath = $current->getRealPath();
+
+ if (\in_array($currentRealPath, $pathsByType['file'], true)) {
+ return true;
+ }
+
+ foreach ($pathsByType['dir'] as $path) {
+ if (str_starts_with($currentRealPath, $path)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ );
+ }
+
+ if (null !== $this->getConfigFile() && null !== $nestedFinder) {
+ $this->configFinderIsOverridden = true;
+ }
+
+ if ($currentFinder instanceof SymfonyFinder && null === $nestedFinder) {
+ // finder from configuration Symfony finder and it is not fully defined, we may fulfill it
+ return $currentFinder->in($pathsByType['dir'])->append($pathsByType['file']);
+ }
+
+ return Finder::create()->in($pathsByType['dir'])->append($pathsByType['file']);
+ }
+
+ /**
+ * Set option that will be resolved.
+ *
+ * @param mixed $value
+ */
+ private function setOption(string $name, $value): void
+ {
+ if (!\array_key_exists($name, $this->options)) {
+ throw new InvalidConfigurationException(sprintf('Unknown option name: "%s".', $name));
+ }
+
+ $this->options[$name] = $value;
+ }
+
+ private function resolveOptionBooleanValue(string $optionName): bool
+ {
+ $value = $this->options[$optionName];
+
+ if (!\is_string($value)) {
+ throw new InvalidConfigurationException(sprintf('Expected boolean or string value for option "%s".', $optionName));
+ }
+
+ if ('yes' === $value) {
+ return true;
+ }
+
+ if ('no' === $value) {
+ return false;
+ }
+
+ throw new InvalidConfigurationException(sprintf('Expected "yes" or "no" for option "%s", got "%s".', $optionName, $value));
+ }
+
+ private static function separatedContextLessInclude(string $path): ConfigInterface
+ {
+ $config = include $path;
+
+ // verify that the config has an instance of Config
+ if (!$config instanceof ConfigInterface) {
+ throw new InvalidConfigurationException(sprintf('The config file: "%s" does not return a "PhpCsFixer\ConfigInterface" instance. Got: "%s".', $path, \is_object($config) ? \get_class($config) : \gettype($config)));
+ }
+
+ return $config;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php
new file mode 100644
index 0000000..3d71636
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ErrorOutput.php
@@ -0,0 +1,148 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Output;
+
+use PhpCsFixer\Differ\DiffConsoleFormatter;
+use PhpCsFixer\Error\Error;
+use PhpCsFixer\Linter\LintingException;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * @internal
+ */
+final class ErrorOutput
+{
+ /**
+ * @var OutputInterface
+ */
+ private $output;
+
+ /**
+ * @var bool
+ */
+ private $isDecorated;
+
+ public function __construct(OutputInterface $output)
+ {
+ $this->output = $output;
+ $this->isDecorated = $output->isDecorated();
+ }
+
+ /**
+ * @param Error[] $errors
+ */
+ public function listErrors(string $process, array $errors): void
+ {
+ $this->output->writeln(['', sprintf(
+ 'Files that were not fixed due to errors reported during %s:',
+ $process
+ )]);
+
+ $showDetails = $this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERY_VERBOSE;
+ $showTrace = $this->output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG;
+ foreach ($errors as $i => $error) {
+ $this->output->writeln(sprintf('%4d) %s', $i + 1, $error->getFilePath()));
+ $e = $error->getSource();
+ if (!$showDetails || null === $e) {
+ continue;
+ }
+
+ $class = sprintf('[%s]', \get_class($e));
+ $message = $e->getMessage();
+ $code = $e->getCode();
+ if (0 !== $code) {
+ $message .= " ({$code})";
+ }
+
+ $length = max(\strlen($class), \strlen($message));
+ $lines = [
+ '',
+ $class,
+ $message,
+ '',
+ ];
+
+ $this->output->writeln('');
+
+ foreach ($lines as $line) {
+ if (\strlen($line) < $length) {
+ $line .= str_repeat(' ', $length - \strlen($line));
+ }
+
+ $this->output->writeln(sprintf(' <error> %s </error>', $this->prepareOutput($line)));
+ }
+
+ if ($showTrace && !$e instanceof LintingException) { // stack trace of lint exception is of no interest
+ $this->output->writeln('');
+ $stackTrace = $e->getTrace();
+ foreach ($stackTrace as $trace) {
+ if (isset($trace['class'], $trace['function']) && \Symfony\Component\Console\Command\Command::class === $trace['class'] && 'run' === $trace['function']) {
+ $this->output->writeln(' [ ... ]');
+
+ break;
+ }
+
+ $this->outputTrace($trace);
+ }
+ }
+
+ if (Error::TYPE_LINT === $error->getType() && 0 < \count($error->getAppliedFixers())) {
+ $this->output->writeln('');
+ $this->output->writeln(sprintf(' Applied fixers: <comment>%s</comment>', implode(', ', $error->getAppliedFixers())));
+
+ $diff = $error->getDiff();
+ if (!empty($diff)) {
+ $diffFormatter = new DiffConsoleFormatter(
+ $this->isDecorated,
+ sprintf(
+ '<comment> ---------- begin diff ----------</comment>%s%%s%s<comment> ----------- end diff -----------</comment>',
+ PHP_EOL,
+ PHP_EOL
+ )
+ );
+
+ $this->output->writeln($diffFormatter->format($diff));
+ }
+ }
+ }
+ }
+
+ private function outputTrace(array $trace): void
+ {
+ if (isset($trace['class'], $trace['type'], $trace['function'])) {
+ $this->output->writeln(sprintf(
+ ' <comment>%s</comment>%s<comment>%s()</comment>',
+ $this->prepareOutput($trace['class']),
+ $this->prepareOutput($trace['type']),
+ $this->prepareOutput($trace['function'])
+ ));
+ } elseif (isset($trace['function'])) {
+ $this->output->writeln(sprintf(' <comment>%s()</comment>', $this->prepareOutput($trace['function'])));
+ }
+
+ if (isset($trace['file'])) {
+ $this->output->writeln(sprintf(' in <info>%s</info> at line <info>%d</info>', $this->prepareOutput($trace['file']), $trace['line']));
+ }
+ }
+
+ private function prepareOutput(string $string): string
+ {
+ return $this->isDecorated
+ ? OutputFormatter::escape($string)
+ : $string
+ ;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php
new file mode 100644
index 0000000..38b6999
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Output;
+
+/**
+ * @internal
+ */
+final class NullOutput implements ProcessOutputInterface
+{
+ public function printLegend(): void
+ {
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutput.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutput.php
new file mode 100644
index 0000000..c737c87
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutput.php
@@ -0,0 +1,146 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Output;
+
+use PhpCsFixer\FixerFileProcessedEvent;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+
+/**
+ * Output writer to show the process of a FixCommand.
+ *
+ * @internal
+ */
+final class ProcessOutput implements ProcessOutputInterface
+{
+ /**
+ * File statuses map.
+ *
+ * @var array
+ */
+ private static $eventStatusMap = [
+ FixerFileProcessedEvent::STATUS_UNKNOWN => ['symbol' => '?', 'format' => '%s', 'description' => 'unknown'],
+ FixerFileProcessedEvent::STATUS_INVALID => ['symbol' => 'I', 'format' => '<bg=red>%s</bg=red>', 'description' => 'invalid file syntax (file ignored)'],
+ FixerFileProcessedEvent::STATUS_SKIPPED => ['symbol' => 'S', 'format' => '<fg=cyan>%s</fg=cyan>', 'description' => 'skipped (cached or empty file)'],
+ FixerFileProcessedEvent::STATUS_NO_CHANGES => ['symbol' => '.', 'format' => '%s', 'description' => 'no changes'],
+ FixerFileProcessedEvent::STATUS_FIXED => ['symbol' => 'F', 'format' => '<fg=green>%s</fg=green>', 'description' => 'fixed'],
+ FixerFileProcessedEvent::STATUS_EXCEPTION => ['symbol' => 'E', 'format' => '<bg=red>%s</bg=red>', 'description' => 'error'],
+ FixerFileProcessedEvent::STATUS_LINT => ['symbol' => 'E', 'format' => '<bg=red>%s</bg=red>', 'description' => 'error'],
+ ];
+
+ /**
+ * @var EventDispatcherInterface
+ */
+ private $eventDispatcher;
+
+ /**
+ * @var OutputInterface
+ */
+ private $output;
+
+ /**
+ * @var int
+ */
+ private $files;
+
+ /**
+ * @var int
+ */
+ private $processedFiles = 0;
+
+ /**
+ * @var int
+ */
+ private $symbolsPerLine;
+
+ public function __construct(OutputInterface $output, EventDispatcherInterface $dispatcher, int $width, int $nbFiles)
+ {
+ $this->output = $output;
+ $this->eventDispatcher = $dispatcher;
+ $this->eventDispatcher->addListener(FixerFileProcessedEvent::NAME, [$this, 'onFixerFileProcessed']);
+ $this->files = $nbFiles;
+
+ // max number of characters per line
+ // - total length x 2 (e.g. " 1 / 123" => 6 digits and padding spaces)
+ // - 11 (extra spaces, parentheses and percentage characters, e.g. " x / x (100%)")
+ $this->symbolsPerLine = max(1, $width - \strlen((string) $this->files) * 2 - 11);
+ }
+
+ public function __destruct()
+ {
+ $this->eventDispatcher->removeListener(FixerFileProcessedEvent::NAME, [$this, 'onFixerFileProcessed']);
+ }
+
+ /**
+ * This class is not intended to be serialized,
+ * and cannot be deserialized (see __wakeup method).
+ */
+ public function __sleep(): array
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ /**
+ * Disable the deserialization of the class to prevent attacker executing
+ * code by leveraging the __destruct method.
+ *
+ * @see https://owasp.org/www-community/vulnerabilities/PHP_Object_Injection
+ */
+ public function __wakeup(): void
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ public function onFixerFileProcessed(FixerFileProcessedEvent $event): void
+ {
+ $status = self::$eventStatusMap[$event->getStatus()];
+ $this->output->write($this->output->isDecorated() ? sprintf($status['format'], $status['symbol']) : $status['symbol']);
+
+ ++$this->processedFiles;
+
+ $symbolsOnCurrentLine = $this->processedFiles % $this->symbolsPerLine;
+ $isLast = $this->processedFiles === $this->files;
+
+ if (0 === $symbolsOnCurrentLine || $isLast) {
+ $this->output->write(sprintf(
+ '%s %'.\strlen((string) $this->files).'d / %d (%3d%%)',
+ $isLast && 0 !== $symbolsOnCurrentLine ? str_repeat(' ', $this->symbolsPerLine - $symbolsOnCurrentLine) : '',
+ $this->processedFiles,
+ $this->files,
+ round($this->processedFiles / $this->files * 100)
+ ));
+
+ if (!$isLast) {
+ $this->output->writeln('');
+ }
+ }
+ }
+
+ public function printLegend(): void
+ {
+ $symbols = [];
+
+ foreach (self::$eventStatusMap as $status) {
+ $symbol = $status['symbol'];
+ if ('' === $symbol || isset($symbols[$symbol])) {
+ continue;
+ }
+
+ $symbols[$symbol] = sprintf('%s-%s', $this->output->isDecorated() ? sprintf($status['format'], $symbol) : $symbol, $status['description']);
+ }
+
+ $this->output->write(sprintf("\nLegend: %s\n", implode(', ', $symbols)));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutputInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutputInterface.php
new file mode 100644
index 0000000..80726c3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Output/ProcessOutputInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Output;
+
+/**
+ * @internal
+ */
+interface ProcessOutputInterface
+{
+ public function printLegend(): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php
new file mode 100644
index 0000000..c283b23
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/CheckstyleReporter.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use Symfony\Component\Console\Formatter\OutputFormatter;
+
+/**
+ * @author Kévin Gomez <contact@kevingomez.fr>
+ *
+ * @internal
+ */
+final class CheckstyleReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'checkstyle';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ if (!\extension_loaded('dom')) {
+ throw new \RuntimeException('Cannot generate report! `ext-dom` is not available!');
+ }
+
+ $dom = new \DOMDocument('1.0', 'UTF-8');
+ $checkstyles = $dom->appendChild($dom->createElement('checkstyle'));
+
+ foreach ($reportSummary->getChanged() as $filePath => $fixResult) {
+ /** @var \DOMElement $file */
+ $file = $checkstyles->appendChild($dom->createElement('file'));
+ $file->setAttribute('name', $filePath);
+
+ foreach ($fixResult['appliedFixers'] as $appliedFixer) {
+ $error = $this->createError($dom, $appliedFixer);
+ $file->appendChild($error);
+ }
+ }
+
+ $dom->formatOutput = true;
+
+ return $reportSummary->isDecoratedOutput() ? OutputFormatter::escape($dom->saveXML()) : $dom->saveXML();
+ }
+
+ private function createError(\DOMDocument $dom, string $appliedFixer): \DOMElement
+ {
+ $error = $dom->createElement('error');
+ $error->setAttribute('severity', 'warning');
+ $error->setAttribute('source', 'PHP-CS-Fixer.'.$appliedFixer);
+ $error->setAttribute('message', 'Found violation(s) of type: '.$appliedFixer);
+
+ return $error;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php
new file mode 100644
index 0000000..f78f428
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/GitlabReporter.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use Symfony\Component\Console\Formatter\OutputFormatter;
+
+/**
+ * Generates a report according to gitlabs subset of codeclimate json files.
+ *
+ * @see https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types
+ *
+ * @author Hans-Christian Otto <c.otto@suora.com>
+ *
+ * @internal
+ */
+final class GitlabReporter implements ReporterInterface
+{
+ public function getFormat(): string
+ {
+ return 'gitlab';
+ }
+
+ /**
+ * Process changed files array. Returns generated report.
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ $report = [];
+ foreach ($reportSummary->getChanged() as $fileName => $change) {
+ foreach ($change['appliedFixers'] as $fixerName) {
+ $report[] = [
+ 'description' => $fixerName,
+ 'fingerprint' => md5($fileName.$fixerName),
+ 'location' => [
+ 'path' => $fileName,
+ 'lines' => [
+ 'begin' => 0, // line numbers are required in the format, but not available to reports
+ ],
+ ],
+ ];
+ }
+ }
+
+ $jsonString = json_encode($report);
+
+ return $reportSummary->isDecoratedOutput() ? OutputFormatter::escape($jsonString) : $jsonString;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php
new file mode 100644
index 0000000..d637ee7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JsonReporter.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use Symfony\Component\Console\Formatter\OutputFormatter;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+final class JsonReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'json';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ $jFiles = [];
+
+ foreach ($reportSummary->getChanged() as $file => $fixResult) {
+ $jfile = ['name' => $file];
+
+ if ($reportSummary->shouldAddAppliedFixers()) {
+ $jfile['appliedFixers'] = $fixResult['appliedFixers'];
+ }
+
+ if (!empty($fixResult['diff'])) {
+ $jfile['diff'] = $fixResult['diff'];
+ }
+
+ $jFiles[] = $jfile;
+ }
+
+ $json = [
+ 'files' => $jFiles,
+ 'time' => [
+ 'total' => round($reportSummary->getTime() / 1000, 3),
+ ],
+ 'memory' => round($reportSummary->getMemory() / 1024 / 1024, 3),
+ ];
+
+ $json = json_encode($json);
+
+ return $reportSummary->isDecoratedOutput() ? OutputFormatter::escape($json) : $json;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php
new file mode 100644
index 0000000..114d3df
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/JunitReporter.php
@@ -0,0 +1,137 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use PhpCsFixer\Preg;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+final class JunitReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'junit';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ if (!\extension_loaded('dom')) {
+ throw new \RuntimeException('Cannot generate report! `ext-dom` is not available!');
+ }
+
+ $dom = new \DOMDocument('1.0', 'UTF-8');
+ $testsuites = $dom->appendChild($dom->createElement('testsuites'));
+ /** @var \DomElement $testsuite */
+ $testsuite = $testsuites->appendChild($dom->createElement('testsuite'));
+ $testsuite->setAttribute('name', 'PHP CS Fixer');
+
+ if (\count($reportSummary->getChanged()) > 0) {
+ $this->createFailedTestCases($dom, $testsuite, $reportSummary);
+ } else {
+ $this->createSuccessTestCase($dom, $testsuite);
+ }
+
+ if ($reportSummary->getTime() > 0) {
+ $testsuite->setAttribute(
+ 'time',
+ sprintf(
+ '%.3f',
+ $reportSummary->getTime() / 1000
+ )
+ );
+ }
+
+ $dom->formatOutput = true;
+
+ return $reportSummary->isDecoratedOutput() ? OutputFormatter::escape($dom->saveXML()) : $dom->saveXML();
+ }
+
+ private function createSuccessTestCase(\DOMDocument $dom, \DOMElement $testsuite): void
+ {
+ $testcase = $dom->createElement('testcase');
+ $testcase->setAttribute('name', 'All OK');
+ $testcase->setAttribute('assertions', '1');
+
+ $testsuite->appendChild($testcase);
+ $testsuite->setAttribute('tests', '1');
+ $testsuite->setAttribute('assertions', '1');
+ $testsuite->setAttribute('failures', '0');
+ $testsuite->setAttribute('errors', '0');
+ }
+
+ private function createFailedTestCases(\DOMDocument $dom, \DOMElement $testsuite, ReportSummary $reportSummary): void
+ {
+ $assertionsCount = 0;
+ foreach ($reportSummary->getChanged() as $file => $fixResult) {
+ $testcase = $this->createFailedTestCase(
+ $dom,
+ $file,
+ $fixResult,
+ $reportSummary->shouldAddAppliedFixers()
+ );
+ $testsuite->appendChild($testcase);
+ $assertionsCount += (int) $testcase->getAttribute('assertions');
+ }
+
+ $testsuite->setAttribute('tests', (string) \count($reportSummary->getChanged()));
+ $testsuite->setAttribute('assertions', (string) $assertionsCount);
+ $testsuite->setAttribute('failures', (string) $assertionsCount);
+ $testsuite->setAttribute('errors', '0');
+ }
+
+ private function createFailedTestCase(\DOMDocument $dom, string $file, array $fixResult, bool $shouldAddAppliedFixers): \DOMElement
+ {
+ $appliedFixersCount = \count($fixResult['appliedFixers']);
+
+ $testName = str_replace('.', '_DOT_', Preg::replace('@\.'.pathinfo($file, PATHINFO_EXTENSION).'$@', '', $file));
+
+ $testcase = $dom->createElement('testcase');
+ $testcase->setAttribute('name', $testName);
+ $testcase->setAttribute('file', $file);
+ $testcase->setAttribute('assertions', (string) $appliedFixersCount);
+
+ $failure = $dom->createElement('failure');
+ $failure->setAttribute('type', 'code_style');
+ $testcase->appendChild($failure);
+
+ if ($shouldAddAppliedFixers) {
+ $failureContent = "applied fixers:\n---------------\n";
+
+ foreach ($fixResult['appliedFixers'] as $appliedFixer) {
+ $failureContent .= "* {$appliedFixer}\n";
+ }
+ } else {
+ $failureContent = "Wrong code style\n";
+ }
+
+ if (!empty($fixResult['diff'])) {
+ $failureContent .= "\nDiff:\n---------------\n\n".$fixResult['diff'];
+ }
+
+ $failure->appendChild($dom->createCDATASection(trim($failureContent)));
+
+ return $testcase;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReportSummary.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReportSummary.php
new file mode 100644
index 0000000..d9b1aef
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReportSummary.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ReportSummary
+{
+ /**
+ * @var bool
+ */
+ private $addAppliedFixers;
+
+ /**
+ * @var array
+ */
+ private $changed;
+
+ /**
+ * @var bool
+ */
+ private $isDecoratedOutput;
+
+ /**
+ * @var bool
+ */
+ private $isDryRun;
+
+ /**
+ * @var int
+ */
+ private $memory;
+
+ /**
+ * @var int
+ */
+ private $time;
+
+ /**
+ * @param int $time duration in milliseconds
+ * @param int $memory memory usage in bytes
+ */
+ public function __construct(
+ array $changed,
+ int $time,
+ int $memory,
+ bool $addAppliedFixers,
+ bool $isDryRun,
+ bool $isDecoratedOutput
+ ) {
+ $this->changed = $changed;
+ $this->time = $time;
+ $this->memory = $memory;
+ $this->addAppliedFixers = $addAppliedFixers;
+ $this->isDryRun = $isDryRun;
+ $this->isDecoratedOutput = $isDecoratedOutput;
+ }
+
+ public function isDecoratedOutput(): bool
+ {
+ return $this->isDecoratedOutput;
+ }
+
+ public function isDryRun(): bool
+ {
+ return $this->isDryRun;
+ }
+
+ public function getChanged(): array
+ {
+ return $this->changed;
+ }
+
+ public function getMemory(): int
+ {
+ return $this->memory;
+ }
+
+ public function getTime(): int
+ {
+ return $this->time;
+ }
+
+ public function shouldAddAppliedFixers(): bool
+ {
+ return $this->addAppliedFixers;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php
new file mode 100644
index 0000000..b7ab998
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterFactory.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use Symfony\Component\Finder\Finder as SymfonyFinder;
+use Symfony\Component\Finder\SplFileInfo;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+final class ReporterFactory
+{
+ /** @var ReporterInterface[] */
+ private $reporters = [];
+
+ public function registerBuiltInReporters(): self
+ {
+ /** @var null|string[] $builtInReporters */
+ static $builtInReporters;
+
+ if (null === $builtInReporters) {
+ $builtInReporters = [];
+
+ /** @var SplFileInfo $file */
+ foreach (SymfonyFinder::create()->files()->name('*Reporter.php')->in(__DIR__) as $file) {
+ $relativeNamespace = $file->getRelativePath();
+ $builtInReporters[] = sprintf(
+ '%s\\%s%s',
+ __NAMESPACE__,
+ $relativeNamespace ? $relativeNamespace.'\\' : '',
+ $file->getBasename('.php')
+ );
+ }
+ }
+
+ foreach ($builtInReporters as $reporterClass) {
+ $this->registerReporter(new $reporterClass());
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function registerReporter(ReporterInterface $reporter): self
+ {
+ $format = $reporter->getFormat();
+
+ if (isset($this->reporters[$format])) {
+ throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
+ }
+
+ $this->reporters[$format] = $reporter;
+
+ return $this;
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getFormats(): array
+ {
+ $formats = array_keys($this->reporters);
+ sort($formats);
+
+ return $formats;
+ }
+
+ public function getReporter(string $format): ReporterInterface
+ {
+ if (!isset($this->reporters[$format])) {
+ throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is not registered.', $format));
+ }
+
+ return $this->reporters[$format];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterInterface.php
new file mode 100644
index 0000000..44fab56
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/ReporterInterface.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+interface ReporterInterface
+{
+ public function getFormat(): string;
+
+ /**
+ * Process changed files array. Returns generated report.
+ */
+ public function generate(ReportSummary $reportSummary): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php
new file mode 100644
index 0000000..19525bc
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/TextReporter.php
@@ -0,0 +1,93 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use PhpCsFixer\Differ\DiffConsoleFormatter;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+final class TextReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'txt';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ $output = '';
+
+ $i = 0;
+ foreach ($reportSummary->getChanged() as $file => $fixResult) {
+ ++$i;
+ $output .= sprintf('%4d) %s', $i, $file);
+
+ if ($reportSummary->shouldAddAppliedFixers()) {
+ $output .= $this->getAppliedFixers($reportSummary->isDecoratedOutput(), $fixResult);
+ }
+
+ $output .= $this->getDiff($reportSummary->isDecoratedOutput(), $fixResult);
+ $output .= PHP_EOL;
+ }
+
+ return $output.$this->getFooter($reportSummary->getTime(), $reportSummary->getMemory(), $reportSummary->isDryRun());
+ }
+
+ private function getAppliedFixers(bool $isDecoratedOutput, array $fixResult): string
+ {
+ return sprintf(
+ $isDecoratedOutput ? ' (<comment>%s</comment>)' : ' (%s)',
+ implode(', ', $fixResult['appliedFixers'])
+ );
+ }
+
+ private function getDiff(bool $isDecoratedOutput, array $fixResult): string
+ {
+ if (empty($fixResult['diff'])) {
+ return '';
+ }
+
+ $diffFormatter = new DiffConsoleFormatter($isDecoratedOutput, sprintf(
+ '<comment> ---------- begin diff ----------</comment>%s%%s%s<comment> ----------- end diff -----------</comment>',
+ PHP_EOL,
+ PHP_EOL
+ ));
+
+ return PHP_EOL.$diffFormatter->format($fixResult['diff']).PHP_EOL;
+ }
+
+ private function getFooter(int $time, int $memory, bool $isDryRun): string
+ {
+ if (0 === $time || 0 === $memory) {
+ return '';
+ }
+
+ return PHP_EOL.sprintf(
+ '%s all files in %.3f seconds, %.3f MB memory used'.PHP_EOL,
+ $isDryRun ? 'Checked' : 'Fixed',
+ $time / 1000,
+ $memory / 1024 / 1024
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/XmlReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/XmlReporter.php
new file mode 100644
index 0000000..16edd37
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/FixReport/XmlReporter.php
@@ -0,0 +1,124 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\FixReport;
+
+use Symfony\Component\Console\Formatter\OutputFormatter;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+final class XmlReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'xml';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ if (!\extension_loaded('dom')) {
+ throw new \RuntimeException('Cannot generate report! `ext-dom` is not available!');
+ }
+
+ $dom = new \DOMDocument('1.0', 'UTF-8');
+ // new nodes should be added to this or existing children
+ $root = $dom->createElement('report');
+ $dom->appendChild($root);
+
+ $filesXML = $dom->createElement('files');
+ $root->appendChild($filesXML);
+
+ $i = 1;
+ foreach ($reportSummary->getChanged() as $file => $fixResult) {
+ $fileXML = $dom->createElement('file');
+ $fileXML->setAttribute('id', (string) $i++);
+ $fileXML->setAttribute('name', $file);
+ $filesXML->appendChild($fileXML);
+
+ if ($reportSummary->shouldAddAppliedFixers()) {
+ $fileXML->appendChild($this->createAppliedFixersElement($dom, $fixResult));
+ }
+
+ if (!empty($fixResult['diff'])) {
+ $fileXML->appendChild($this->createDiffElement($dom, $fixResult));
+ }
+ }
+
+ if (0 !== $reportSummary->getTime()) {
+ $root->appendChild($this->createTimeElement($reportSummary->getTime(), $dom));
+ }
+
+ if (0 !== $reportSummary->getMemory()) {
+ $root->appendChild($this->createMemoryElement($reportSummary->getMemory(), $dom));
+ }
+
+ $dom->formatOutput = true;
+
+ return $reportSummary->isDecoratedOutput() ? OutputFormatter::escape($dom->saveXML()) : $dom->saveXML();
+ }
+
+ private function createAppliedFixersElement(\DOMDocument $dom, array $fixResult): \DOMElement
+ {
+ $appliedFixersXML = $dom->createElement('applied_fixers');
+
+ foreach ($fixResult['appliedFixers'] as $appliedFixer) {
+ $appliedFixerXML = $dom->createElement('applied_fixer');
+ $appliedFixerXML->setAttribute('name', $appliedFixer);
+ $appliedFixersXML->appendChild($appliedFixerXML);
+ }
+
+ return $appliedFixersXML;
+ }
+
+ private function createDiffElement(\DOMDocument $dom, array $fixResult): \DOMElement
+ {
+ $diffXML = $dom->createElement('diff');
+ $diffXML->appendChild($dom->createCDATASection($fixResult['diff']));
+
+ return $diffXML;
+ }
+
+ private function createTimeElement(float $time, \DOMDocument $dom): \DOMElement
+ {
+ $time = round($time / 1000, 3);
+
+ $timeXML = $dom->createElement('time');
+ $timeXML->setAttribute('unit', 's');
+ $timeTotalXML = $dom->createElement('total');
+ $timeTotalXML->setAttribute('value', (string) $time);
+ $timeXML->appendChild($timeTotalXML);
+
+ return $timeXML;
+ }
+
+ private function createMemoryElement(float $memory, \DOMDocument $dom): \DOMElement
+ {
+ $memory = round($memory / 1024 / 1024, 3);
+
+ $memoryXML = $dom->createElement('memory');
+ $memoryXML->setAttribute('value', (string) $memory);
+ $memoryXML->setAttribute('unit', 'MB');
+
+ return $memoryXML;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/JsonReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/JsonReporter.php
new file mode 100644
index 0000000..2046939
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/JsonReporter.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\ListSetsReport;
+
+use PhpCsFixer\RuleSet\RuleSetDescriptionInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class JsonReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'json';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ $sets = $reportSummary->getSets();
+
+ usort($sets, static function (RuleSetDescriptionInterface $a, RuleSetDescriptionInterface $b): int {
+ return strcmp($a->getName(), $b->getName());
+ });
+
+ $json = ['sets' => []];
+
+ foreach ($sets as $set) {
+ $setName = $set->getName();
+ $json['sets'][$setName] = [
+ 'description' => $set->getDescription(),
+ 'isRisky' => $set->isRisky(),
+ 'name' => $setName,
+ ];
+ }
+
+ return json_encode($json, JSON_PRETTY_PRINT);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReportSummary.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReportSummary.php
new file mode 100644
index 0000000..351bdd4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReportSummary.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\ListSetsReport;
+
+use PhpCsFixer\RuleSet\RuleSetDescriptionInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ReportSummary
+{
+ /**
+ * @var RuleSetDescriptionInterface[]
+ */
+ private $sets;
+
+ /**
+ * @param RuleSetDescriptionInterface[] $sets
+ */
+ public function __construct(
+ array $sets
+ ) {
+ $this->sets = $sets;
+ }
+
+ /**
+ * @return RuleSetDescriptionInterface[]
+ */
+ public function getSets(): array
+ {
+ return $this->sets;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php
new file mode 100644
index 0000000..5e2f277
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterFactory.php
@@ -0,0 +1,89 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\ListSetsReport;
+
+use Symfony\Component\Finder\Finder as SymfonyFinder;
+use Symfony\Component\Finder\SplFileInfo;
+
+/**
+ * @author Boris Gorbylev <ekho@ekho.name>
+ *
+ * @internal
+ */
+final class ReporterFactory
+{
+ /** @var ReporterInterface[] */
+ private $reporters = [];
+
+ public function registerBuiltInReporters(): self
+ {
+ /** @var null|string[] $builtInReporters */
+ static $builtInReporters;
+
+ if (null === $builtInReporters) {
+ $builtInReporters = [];
+
+ /** @var SplFileInfo $file */
+ foreach (SymfonyFinder::create()->files()->name('*Reporter.php')->in(__DIR__) as $file) {
+ $relativeNamespace = $file->getRelativePath();
+ $builtInReporters[] = sprintf(
+ '%s\\%s%s',
+ __NAMESPACE__,
+ $relativeNamespace ? $relativeNamespace.'\\' : '',
+ $file->getBasename('.php')
+ );
+ }
+ }
+
+ foreach ($builtInReporters as $reporterClass) {
+ $this->registerReporter(new $reporterClass());
+ }
+
+ return $this;
+ }
+
+ public function registerReporter(ReporterInterface $reporter): self
+ {
+ $format = $reporter->getFormat();
+
+ if (isset($this->reporters[$format])) {
+ throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
+ }
+
+ $this->reporters[$format] = $reporter;
+
+ return $this;
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getFormats(): array
+ {
+ $formats = array_keys($this->reporters);
+ sort($formats);
+
+ return $formats;
+ }
+
+ public function getReporter(string $format): ReporterInterface
+ {
+ if (!isset($this->reporters[$format])) {
+ throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is not registered.', $format));
+ }
+
+ return $this->reporters[$format];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterInterface.php
new file mode 100644
index 0000000..4a03f33
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/ReporterInterface.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\ListSetsReport;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+interface ReporterInterface
+{
+ public function getFormat(): string;
+
+ /**
+ * Process changed files array. Returns generated report.
+ */
+ public function generate(ReportSummary $reportSummary): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php
new file mode 100644
index 0000000..0caddef
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/Report/ListSetsReport/TextReporter.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\Report\ListSetsReport;
+
+use PhpCsFixer\RuleSet\RuleSetDescriptionInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class TextReporter implements ReporterInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormat(): string
+ {
+ return 'txt';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function generate(ReportSummary $reportSummary): string
+ {
+ $sets = $reportSummary->getSets();
+
+ usort($sets, static function (RuleSetDescriptionInterface $a, RuleSetDescriptionInterface $b): int {
+ return strcmp($a->getName(), $b->getName());
+ });
+
+ $output = '';
+
+ foreach ($sets as $i => $set) {
+ $output .= sprintf('%2d) %s', $i + 1, $set->getName()).PHP_EOL.' '.$set->getDescription().PHP_EOL;
+
+ if ($set->isRisky()) {
+ $output .= ' Set contains risky rules.'.PHP_EOL;
+ }
+ }
+
+ return $output;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php
new file mode 100644
index 0000000..3da780f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClient.php
@@ -0,0 +1,54 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\SelfUpdate;
+
+/**
+ * @internal
+ */
+final class GithubClient implements GithubClientInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getTags(): array
+ {
+ $url = 'https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/tags';
+
+ $result = @file_get_contents(
+ $url,
+ false,
+ stream_context_create([
+ 'http' => [
+ 'header' => 'User-Agent: FriendsOfPHP/PHP-CS-Fixer',
+ ],
+ ])
+ );
+
+ if (false === $result) {
+ throw new \RuntimeException(sprintf('Failed to load tags at "%s".', $url));
+ }
+
+ $result = json_decode($result, true);
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw new \RuntimeException(sprintf(
+ 'Failed to read response from "%s" as JSON: %s.',
+ $url,
+ json_last_error_msg()
+ ));
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClientInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClientInterface.php
new file mode 100644
index 0000000..25e02a6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/GithubClientInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\SelfUpdate;
+
+/**
+ * @internal
+ */
+interface GithubClientInterface
+{
+ public function getTags(): array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionChecker.php b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionChecker.php
new file mode 100644
index 0000000..510ecb8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionChecker.php
@@ -0,0 +1,116 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\SelfUpdate;
+
+use Composer\Semver\Comparator;
+use Composer\Semver\Semver;
+use Composer\Semver\VersionParser;
+
+/**
+ * @internal
+ */
+final class NewVersionChecker implements NewVersionCheckerInterface
+{
+ /**
+ * @var GithubClientInterface
+ */
+ private $githubClient;
+
+ /**
+ * @var VersionParser
+ */
+ private $versionParser;
+
+ /**
+ * @var null|string[]
+ */
+ private $availableVersions;
+
+ public function __construct(GithubClientInterface $githubClient)
+ {
+ $this->githubClient = $githubClient;
+ $this->versionParser = new VersionParser();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getLatestVersion(): string
+ {
+ $this->retrieveAvailableVersions();
+
+ return $this->availableVersions[0];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getLatestVersionOfMajor(int $majorVersion): ?string
+ {
+ $this->retrieveAvailableVersions();
+
+ $semverConstraint = '^'.$majorVersion;
+
+ foreach ($this->availableVersions as $availableVersion) {
+ if (Semver::satisfies($availableVersion, $semverConstraint)) {
+ return $availableVersion;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function compareVersions(string $versionA, string $versionB): int
+ {
+ $versionA = $this->versionParser->normalize($versionA);
+ $versionB = $this->versionParser->normalize($versionB);
+
+ if (Comparator::lessThan($versionA, $versionB)) {
+ return -1;
+ }
+
+ if (Comparator::greaterThan($versionA, $versionB)) {
+ return 1;
+ }
+
+ return 0;
+ }
+
+ private function retrieveAvailableVersions(): void
+ {
+ if (null !== $this->availableVersions) {
+ return;
+ }
+
+ foreach ($this->githubClient->getTags() as $tag) {
+ $version = $tag['name'];
+
+ try {
+ $this->versionParser->normalize($version);
+
+ if ('stable' === VersionParser::parseStability($version)) {
+ $this->availableVersions[] = $version;
+ }
+ } catch (\UnexpectedValueException $exception) {
+ // not a valid version tag
+ }
+ }
+
+ $this->availableVersions = Semver::rsort($this->availableVersions);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionCheckerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionCheckerInterface.php
new file mode 100644
index 0000000..c63b2a2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/SelfUpdate/NewVersionCheckerInterface.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console\SelfUpdate;
+
+/**
+ * @internal
+ */
+interface NewVersionCheckerInterface
+{
+ /**
+ * Returns the tag of the latest version.
+ */
+ public function getLatestVersion(): string;
+
+ /**
+ * Returns the tag of the latest minor/patch version of the given major version.
+ */
+ public function getLatestVersionOfMajor(int $majorVersion): ?string;
+
+ /**
+ * Returns -1, 0, or 1 if the first version is respectively less than,
+ * equal to, or greater than the second.
+ */
+ public function compareVersions(string $versionA, string $versionB): int;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php b/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php
new file mode 100644
index 0000000..7df24a7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Console/WarningsDetector.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Console;
+
+use PhpCsFixer\ToolInfo;
+use PhpCsFixer\ToolInfoInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class WarningsDetector
+{
+ /**
+ * @var ToolInfoInterface
+ */
+ private $toolInfo;
+
+ /**
+ * @var string[]
+ */
+ private $warnings = [];
+
+ public function __construct(ToolInfoInterface $toolInfo)
+ {
+ $this->toolInfo = $toolInfo;
+ }
+
+ public function detectOldMajor(): void
+ {
+ // @TODO 3.99 to be activated with new MAJOR release 4.0
+ // $currentMajorVersion = \intval(explode('.', Application::VERSION)[0], 10);
+ // $nextMajorVersion = $currentMajorVersion + 1;
+ // $this->warnings[] = "You are running PHP CS Fixer v{$currentMajorVersion}, which is not maintained anymore. Please update to v{$nextMajorVersion}.";
+ }
+
+ public function detectOldVendor(): void
+ {
+ if ($this->toolInfo->isInstalledByComposer()) {
+ $details = $this->toolInfo->getComposerInstallationDetails();
+ if (ToolInfo::COMPOSER_LEGACY_PACKAGE_NAME === $details['name']) {
+ $this->warnings[] = sprintf(
+ 'You are running PHP CS Fixer installed with old vendor `%s`. Please update to `%s`.',
+ ToolInfo::COMPOSER_LEGACY_PACKAGE_NAME,
+ ToolInfo::COMPOSER_PACKAGE_NAME
+ );
+ }
+ }
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getWarnings(): array
+ {
+ if (0 === \count($this->warnings)) {
+ return [];
+ }
+
+ return array_unique(array_merge(
+ $this->warnings,
+ ['If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer, we will help you!']
+ ));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php b/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php
new file mode 100644
index 0000000..887af33
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Differ/DiffConsoleFormatter.php
@@ -0,0 +1,94 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Differ;
+
+use PhpCsFixer\Preg;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class DiffConsoleFormatter
+{
+ /**
+ * @var bool
+ */
+ private $isDecoratedOutput;
+
+ /**
+ * @var string
+ */
+ private $template;
+
+ public function __construct(bool $isDecoratedOutput, string $template = '%s')
+ {
+ $this->isDecoratedOutput = $isDecoratedOutput;
+ $this->template = $template;
+ }
+
+ public function format(string $diff, string $lineTemplate = '%s'): string
+ {
+ $isDecorated = $this->isDecoratedOutput;
+
+ $template = $isDecorated
+ ? $this->template
+ : Preg::replace('/<[^<>]+>/', '', $this->template)
+ ;
+
+ return sprintf(
+ $template,
+ implode(
+ PHP_EOL,
+ array_map(
+ static function (string $line) use ($isDecorated, $lineTemplate): string {
+ if ($isDecorated) {
+ $count = 0;
+ $line = Preg::replaceCallback(
+ [
+ '/^(\+.*)/',
+ '/^(\-.*)/',
+ '/^(@.*)/',
+ ],
+ static function (array $matches): string {
+ if ('+' === $matches[0][0]) {
+ $colour = 'green';
+ } elseif ('-' === $matches[0][0]) {
+ $colour = 'red';
+ } else {
+ $colour = 'cyan';
+ }
+
+ return sprintf('<fg=%s>%s</fg=%s>', $colour, OutputFormatter::escape($matches[0]), $colour);
+ },
+ $line,
+ 1,
+ $count
+ );
+
+ if (0 === $count) {
+ $line = OutputFormatter::escape($line);
+ }
+ }
+
+ return sprintf($lineTemplate, $line);
+ },
+ Preg::split('#\R#u', $diff)
+ )
+ )
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php
new file mode 100644
index 0000000..a66f165
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Differ/DifferInterface.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Differ;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface DifferInterface
+{
+ /**
+ * Create diff.
+ */
+ public function diff(string $old, string $new, ?\SplFileInfo $file = null): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Differ/FullDiffer.php b/vendor/friendsofphp/php-cs-fixer/src/Differ/FullDiffer.php
new file mode 100644
index 0000000..94f71c7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Differ/FullDiffer.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Differ;
+
+use PhpCsFixer\Diff\Differ;
+use PhpCsFixer\Diff\Output\StrictUnifiedDiffOutputBuilder;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FullDiffer implements DifferInterface
+{
+ /**
+ * @var Differ
+ */
+ private $differ;
+
+ public function __construct()
+ {
+ $this->differ = new Differ(new StrictUnifiedDiffOutputBuilder([
+ 'collapseRanges' => false,
+ 'commonLineThreshold' => 100,
+ 'contextLines' => 100,
+ 'fromFile' => 'Original',
+ 'toFile' => 'New',
+ ]));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function diff(string $old, string $new, ?\SplFileInfo $file = null): string
+ {
+ return $this->differ->diff($old, $new);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php b/vendor/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php
new file mode 100644
index 0000000..8ef968e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php
@@ -0,0 +1,29 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Differ;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NullDiffer implements DifferInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function diff(string $old, string $new, ?\SplFileInfo $file = null): string
+ {
+ return '';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php b/vendor/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php
new file mode 100644
index 0000000..fa2233b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Differ/UnifiedDiffer.php
@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Differ;
+
+use PhpCsFixer\Diff\Differ;
+use PhpCsFixer\Diff\Output\StrictUnifiedDiffOutputBuilder;
+use PhpCsFixer\Preg;
+
+final class UnifiedDiffer implements DifferInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function diff(string $old, string $new, ?\SplFileInfo $file = null): string
+ {
+ if (null === $file) {
+ $options = [
+ 'fromFile' => 'Original',
+ 'toFile' => 'New',
+ ];
+ } else {
+ $filePath = $file->getRealPath();
+
+ if (1 === Preg::match('/\s/', $filePath)) {
+ $filePath = '"'.$filePath.'"';
+ }
+
+ $options = [
+ 'fromFile' => $filePath,
+ 'toFile' => $filePath,
+ ];
+ }
+
+ $differ = new Differ(new StrictUnifiedDiffOutputBuilder($options));
+
+ return $differ->diff($old, $new);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
new file mode 100644
index 0000000..c27081b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Annotation.php
@@ -0,0 +1,306 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+
+/**
+ * This represents an entire annotation from a docblock.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class Annotation
+{
+ /**
+ * All the annotation tag names with types.
+ *
+ * @var string[]
+ */
+ private static $tags = [
+ 'method',
+ 'param',
+ 'property',
+ 'property-read',
+ 'property-write',
+ 'return',
+ 'throws',
+ 'type',
+ 'var',
+ ];
+
+ /**
+ * The lines that make up the annotation.
+ *
+ * @var Line[]
+ */
+ private $lines;
+
+ /**
+ * The position of the first line of the annotation in the docblock.
+ *
+ * @var int
+ */
+ private $start;
+
+ /**
+ * The position of the last line of the annotation in the docblock.
+ *
+ * @var int
+ */
+ private $end;
+
+ /**
+ * The associated tag.
+ *
+ * @var null|Tag
+ */
+ private $tag;
+
+ /**
+ * Lazy loaded, cached types content.
+ *
+ * @var null|string
+ */
+ private $typesContent;
+
+ /**
+ * The cached types.
+ *
+ * @var null|string[]
+ */
+ private $types;
+
+ /**
+ * @var null|NamespaceAnalysis
+ */
+ private $namespace;
+
+ /**
+ * @var NamespaceUseAnalysis[]
+ */
+ private $namespaceUses;
+
+ /**
+ * Create a new line instance.
+ *
+ * @param Line[] $lines
+ * @param null|NamespaceAnalysis $namespace
+ * @param NamespaceUseAnalysis[] $namespaceUses
+ */
+ public function __construct(array $lines, $namespace = null, array $namespaceUses = [])
+ {
+ $this->lines = array_values($lines);
+ $this->namespace = $namespace;
+ $this->namespaceUses = $namespaceUses;
+
+ $keys = array_keys($lines);
+
+ $this->start = $keys[0];
+ $this->end = end($keys);
+ }
+
+ /**
+ * Get the string representation of object.
+ */
+ public function __toString(): string
+ {
+ return $this->getContent();
+ }
+
+ /**
+ * Get all the annotation tag names with types.
+ *
+ * @return string[]
+ */
+ public static function getTagsWithTypes(): array
+ {
+ return self::$tags;
+ }
+
+ /**
+ * Get the start position of this annotation.
+ */
+ public function getStart(): int
+ {
+ return $this->start;
+ }
+
+ /**
+ * Get the end position of this annotation.
+ */
+ public function getEnd(): int
+ {
+ return $this->end;
+ }
+
+ /**
+ * Get the associated tag.
+ */
+ public function getTag(): Tag
+ {
+ if (null === $this->tag) {
+ $this->tag = new Tag($this->lines[0]);
+ }
+
+ return $this->tag;
+ }
+
+ /**
+ * @internal
+ */
+ public function getTypeExpression(): TypeExpression
+ {
+ return new TypeExpression($this->getTypesContent(), $this->namespace, $this->namespaceUses);
+ }
+
+ /**
+ * @return null|string
+ *
+ * @internal
+ */
+ public function getVariableName()
+ {
+ $type = preg_quote($this->getTypesContent(), '/');
+ $regex = "/@{$this->tag->getName()}\\s+{$type}\\s+(?<variable>\\$.+?)(?:[\\s*]|$)/";
+
+ if (Preg::match($regex, $this->lines[0]->getContent(), $matches)) {
+ return $matches['variable'];
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the types associated with this annotation.
+ *
+ * @return string[]
+ */
+ public function getTypes(): array
+ {
+ if (null === $this->types) {
+ $this->types = $this->getTypeExpression()->getTypes();
+ }
+
+ return $this->types;
+ }
+
+ /**
+ * Set the types associated with this annotation.
+ *
+ * @param string[] $types
+ */
+ public function setTypes(array $types): void
+ {
+ $pattern = '/'.preg_quote($this->getTypesContent(), '/').'/';
+
+ $this->lines[0]->setContent(Preg::replace($pattern, implode('|', $types), $this->lines[0]->getContent(), 1));
+
+ $this->clearCache();
+ }
+
+ /**
+ * Get the normalized types associated with this annotation, so they can easily be compared.
+ *
+ * @return string[]
+ */
+ public function getNormalizedTypes(): array
+ {
+ $normalized = array_map(static function (string $type): string {
+ return strtolower($type);
+ }, $this->getTypes());
+
+ sort($normalized);
+
+ return $normalized;
+ }
+
+ /**
+ * Remove this annotation by removing all its lines.
+ */
+ public function remove(): void
+ {
+ foreach ($this->lines as $line) {
+ if ($line->isTheStart() && $line->isTheEnd()) {
+ // Single line doc block, remove entirely
+ $line->remove();
+ } elseif ($line->isTheStart()) {
+ // Multi line doc block, but start is on the same line as the first annotation, keep only the start
+ $content = Preg::replace('#(\s*/\*\*).*#', '$1', $line->getContent());
+
+ $line->setContent($content);
+ } elseif ($line->isTheEnd()) {
+ // Multi line doc block, but end is on the same line as the last annotation, keep only the end
+ $content = Preg::replace('#(\s*)\S.*(\*/.*)#', '$1$2', $line->getContent());
+
+ $line->setContent($content);
+ } else {
+ // Multi line doc block, neither start nor end on this line, can be removed safely
+ $line->remove();
+ }
+ }
+
+ $this->clearCache();
+ }
+
+ /**
+ * Get the annotation content.
+ */
+ public function getContent(): string
+ {
+ return implode('', $this->lines);
+ }
+
+ public function supportTypes(): bool
+ {
+ return \in_array($this->getTag()->getName(), self::$tags, true);
+ }
+
+ /**
+ * Get the current types content.
+ *
+ * Be careful modifying the underlying line as that won't flush the cache.
+ */
+ private function getTypesContent(): string
+ {
+ if (null === $this->typesContent) {
+ $name = $this->getTag()->getName();
+
+ if (!$this->supportTypes()) {
+ throw new \RuntimeException('This tag does not support types.');
+ }
+
+ $matchingResult = Preg::match(
+ '{^(?:\s*\*|/\*\*)\s*@'.$name.'\s+'.TypeExpression::REGEX_TYPES.'(?:[*\h\v].*)?\r?$}sx',
+ $this->lines[0]->getContent(),
+ $matches
+ );
+
+ $this->typesContent = 1 === $matchingResult
+ ? $matches['types']
+ : '';
+ }
+
+ return $this->typesContent;
+ }
+
+ private function clearCache(): void
+ {
+ $this->types = null;
+ $this->typesContent = null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/DocBlock.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/DocBlock.php
new file mode 100644
index 0000000..b62c9ca
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/DocBlock.php
@@ -0,0 +1,262 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+
+/**
+ * This class represents a docblock.
+ *
+ * It internally splits it up into "lines" that we can manipulate.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class DocBlock
+{
+ /**
+ * The array of lines.
+ *
+ * @var Line[]
+ */
+ private $lines = [];
+
+ /**
+ * The array of annotations.
+ *
+ * @var null|Annotation[]
+ */
+ private $annotations;
+
+ /**
+ * @var null|NamespaceAnalysis
+ */
+ private $namespace;
+
+ /**
+ * @var NamespaceUseAnalysis[]
+ */
+ private $namespaceUses;
+
+ public function __construct(string $content, ?NamespaceAnalysis $namespace = null, array $namespaceUses = [])
+ {
+ foreach (Preg::split('/([^\n\r]+\R*)/', $content, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $line) {
+ $this->lines[] = new Line($line);
+ }
+
+ $this->namespace = $namespace;
+ $this->namespaceUses = $namespaceUses;
+ }
+
+ /**
+ * Get the string representation of object.
+ */
+ public function __toString(): string
+ {
+ return $this->getContent();
+ }
+
+ /**
+ * Get this docblock's lines.
+ *
+ * @return Line[]
+ */
+ public function getLines(): array
+ {
+ return $this->lines;
+ }
+
+ /**
+ * Get a single line.
+ */
+ public function getLine(int $pos): ?Line
+ {
+ return $this->lines[$pos] ?? null;
+ }
+
+ /**
+ * Get this docblock's annotations.
+ *
+ * @return Annotation[]
+ */
+ public function getAnnotations(): array
+ {
+ if (null !== $this->annotations) {
+ return $this->annotations;
+ }
+
+ $this->annotations = [];
+ $total = \count($this->lines);
+
+ for ($index = 0; $index < $total; ++$index) {
+ if ($this->lines[$index]->containsATag()) {
+ // get all the lines that make up the annotation
+ $lines = \array_slice($this->lines, $index, $this->findAnnotationLength($index), true);
+ $annotation = new Annotation($lines, $this->namespace, $this->namespaceUses);
+ // move the index to the end of the annotation to avoid
+ // checking it again because we know the lines inside the
+ // current annotation cannot be part of another annotation
+ $index = $annotation->getEnd();
+ // add the current annotation to the list of annotations
+ $this->annotations[] = $annotation;
+ }
+ }
+
+ return $this->annotations;
+ }
+
+ public function isMultiLine(): bool
+ {
+ return 1 !== \count($this->lines);
+ }
+
+ /**
+ * Take a one line doc block, and turn it into a multi line doc block.
+ */
+ public function makeMultiLine(string $indent, string $lineEnd): void
+ {
+ if ($this->isMultiLine()) {
+ return;
+ }
+
+ $lineContent = $this->getSingleLineDocBlockEntry($this->lines[0]);
+
+ if ('' === $lineContent) {
+ $this->lines = [
+ new Line('/**'.$lineEnd),
+ new Line($indent.' *'.$lineEnd),
+ new Line($indent.' */'),
+ ];
+
+ return;
+ }
+
+ $this->lines = [
+ new Line('/**'.$lineEnd),
+ new Line($indent.' * '.$lineContent.$lineEnd),
+ new Line($indent.' */'),
+ ];
+ }
+
+ public function makeSingleLine(): void
+ {
+ if (!$this->isMultiLine()) {
+ return;
+ }
+
+ $usefulLines = array_filter(
+ $this->lines,
+ static function (Line $line): bool {
+ return $line->containsUsefulContent();
+ }
+ );
+
+ if (1 < \count($usefulLines)) {
+ return;
+ }
+
+ $lineContent = '';
+ if (\count($usefulLines) > 0) {
+ $lineContent = $this->getSingleLineDocBlockEntry(array_shift($usefulLines));
+ }
+
+ $this->lines = [new Line('/** '.$lineContent.' */')];
+ }
+
+ public function getAnnotation(int $pos): ?Annotation
+ {
+ $annotations = $this->getAnnotations();
+
+ return $annotations[$pos] ?? null;
+ }
+
+ /**
+ * Get specific types of annotations only.
+ *
+ * If none exist, we're returning an empty array.
+ *
+ * @param string|string[] $types
+ *
+ * @return Annotation[]
+ */
+ public function getAnnotationsOfType($types): array
+ {
+ $annotations = [];
+ $types = (array) $types;
+
+ foreach ($this->getAnnotations() as $annotation) {
+ $tag = $annotation->getTag()->getName();
+ foreach ($types as $type) {
+ if ($type === $tag) {
+ $annotations[] = $annotation;
+ }
+ }
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * Get the actual content of this docblock.
+ */
+ public function getContent(): string
+ {
+ return implode('', $this->lines);
+ }
+
+ private function findAnnotationLength(int $start): int
+ {
+ $index = $start;
+
+ while ($line = $this->getLine(++$index)) {
+ if ($line->containsATag()) {
+ // we've 100% reached the end of the description if we get here
+ break;
+ }
+
+ if (!$line->containsUsefulContent()) {
+ // if next line is also non-useful, or contains a tag, then we're done here
+ $next = $this->getLine($index + 1);
+ if (null === $next || !$next->containsUsefulContent() || $next->containsATag()) {
+ break;
+ }
+ // otherwise, continue, the annotation must have contained a blank line in its description
+ }
+ }
+
+ return $index - $start;
+ }
+
+ private function getSingleLineDocBlockEntry(Line $line): string
+ {
+ $lineString = $line->getContent();
+
+ if ('' === $lineString) {
+ return $lineString;
+ }
+
+ $lineString = str_replace('*/', '', $lineString);
+ $lineString = trim($lineString);
+
+ if (str_starts_with($lineString, '/**')) {
+ $lineString = substr($lineString, 3);
+ } elseif (str_starts_with($lineString, '*')) {
+ $lineString = substr($lineString, 1);
+ }
+
+ return trim($lineString);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Line.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Line.php
new file mode 100644
index 0000000..5e757f5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Line.php
@@ -0,0 +1,130 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+use PhpCsFixer\Preg;
+
+/**
+ * This represents a line of a docblock.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class Line
+{
+ /**
+ * The content of this line.
+ *
+ * @var string
+ */
+ private $content;
+
+ /**
+ * Create a new line instance.
+ */
+ public function __construct(string $content)
+ {
+ $this->content = $content;
+ }
+
+ /**
+ * Get the string representation of object.
+ */
+ public function __toString(): string
+ {
+ return $this->content;
+ }
+
+ /**
+ * Get the content of this line.
+ */
+ public function getContent(): string
+ {
+ return $this->content;
+ }
+
+ /**
+ * Does this line contain useful content?
+ *
+ * If the line contains text or tags, then this is true.
+ */
+ public function containsUsefulContent(): bool
+ {
+ return 0 !== Preg::match('/\\*\s*\S+/', $this->content) && '' !== trim(str_replace(['/', '*'], ' ', $this->content));
+ }
+
+ /**
+ * Does the line contain a tag?
+ *
+ * If this is true, then it must be the first line of an annotation.
+ */
+ public function containsATag(): bool
+ {
+ return 0 !== Preg::match('/\\*\s*@/', $this->content);
+ }
+
+ /**
+ * Is the line the start of a docblock?
+ */
+ public function isTheStart(): bool
+ {
+ return str_contains($this->content, '/**');
+ }
+
+ /**
+ * Is the line the end of a docblock?
+ */
+ public function isTheEnd(): bool
+ {
+ return str_contains($this->content, '*/');
+ }
+
+ /**
+ * Set the content of this line.
+ */
+ public function setContent(string $content): void
+ {
+ $this->content = $content;
+ }
+
+ /**
+ * Remove this line by clearing its contents.
+ *
+ * Note that this method technically brakes the internal state of the
+ * docblock, but is useful when we need to retain the indexes of lines
+ * during the execution of an algorithm.
+ */
+ public function remove(): void
+ {
+ $this->content = '';
+ }
+
+ /**
+ * Append a blank docblock line to this line's contents.
+ *
+ * Note that this method technically brakes the internal state of the
+ * docblock, but is useful when we need to retain the indexes of lines
+ * during the execution of an algorithm.
+ */
+ public function addBlank(): void
+ {
+ $matched = Preg::match('/^(\h*\*)[^\r\n]*(\r?\n)$/', $this->content, $matches);
+
+ if (1 !== $matched) {
+ return;
+ }
+
+ $this->content .= $matches[1].$matches[2];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/ShortDescription.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/ShortDescription.php
new file mode 100644
index 0000000..eeb71f3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/ShortDescription.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+/**
+ * This class represents a short description (aka summary) of a docblock.
+ *
+ * @internal
+ */
+final class ShortDescription
+{
+ /**
+ * The docblock containing the short description.
+ *
+ * @var DocBlock
+ */
+ private $doc;
+
+ public function __construct(DocBlock $doc)
+ {
+ $this->doc = $doc;
+ }
+
+ /**
+ * Get the line index of the line containing the end of the short
+ * description, if present.
+ */
+ public function getEnd(): ?int
+ {
+ $reachedContent = false;
+
+ foreach ($this->doc->getLines() as $index => $line) {
+ // we went past a description, then hit a tag or blank line, so
+ // the last line of the description must be the one before this one
+ if ($reachedContent && ($line->containsATag() || !$line->containsUsefulContent())) {
+ return $index - 1;
+ }
+
+ // no short description was found
+ if ($line->containsATag()) {
+ return null;
+ }
+
+ // we've reached content, but need to check the next lines too
+ // in case the short description is multi-line
+ if ($line->containsUsefulContent()) {
+ $reachedContent = true;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php
new file mode 100644
index 0000000..f06522b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/Tag.php
@@ -0,0 +1,107 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+use PhpCsFixer\Preg;
+
+/**
+ * This represents a tag, as defined by the proposed PSR PHPDoc standard.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class Tag
+{
+ /**
+ * All the tags defined by the proposed PSR PHPDoc standard.
+ *
+ * @var string[]
+ */
+ private static $tags = [
+ 'api', 'author', 'category', 'copyright', 'deprecated', 'example',
+ 'global', 'internal', 'license', 'link', 'method', 'package', 'param',
+ 'property', 'property-read', 'property-write', 'return', 'see',
+ 'since', 'subpackage', 'throws', 'todo', 'uses', 'var', 'version',
+ ];
+
+ /**
+ * The line containing the tag.
+ *
+ * @var Line
+ */
+ private $line;
+
+ /**
+ * The cached tag name.
+ *
+ * @var null|string
+ */
+ private $name;
+
+ /**
+ * Create a new tag instance.
+ */
+ public function __construct(Line $line)
+ {
+ $this->line = $line;
+ }
+
+ /**
+ * Get the tag name.
+ *
+ * This may be "param", or "return", etc.
+ */
+ public function getName(): string
+ {
+ if (null === $this->name) {
+ Preg::matchAll('/@[a-zA-Z0-9_-]+(?=\s|$)/', $this->line->getContent(), $matches);
+
+ if (isset($matches[0][0])) {
+ $this->name = ltrim($matches[0][0], '@');
+ } else {
+ $this->name = 'other';
+ }
+ }
+
+ return $this->name;
+ }
+
+ /**
+ * Set the tag name.
+ *
+ * This will also be persisted to the upstream line and annotation.
+ */
+ public function setName(string $name): void
+ {
+ $current = $this->getName();
+
+ if ('other' === $current) {
+ throw new \RuntimeException('Cannot set name on unknown tag.');
+ }
+
+ $this->line->setContent(Preg::replace("/@{$current}/", "@{$name}", $this->line->getContent(), 1));
+
+ $this->name = $name;
+ }
+
+ /**
+ * Is the tag a known tag?
+ *
+ * This is defined by if it exists in the proposed PSR PHPDoc standard.
+ */
+ public function valid(): bool
+ {
+ return \in_array($this->getName(), self::$tags, true);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php
new file mode 100644
index 0000000..d0e7c87
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TagComparator.php
@@ -0,0 +1,57 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+/**
+ * This class is responsible for comparing tags to see if they should be kept
+ * together, or kept apart.
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class TagComparator
+{
+ /**
+ * Groups of tags that should be allowed to immediately follow each other.
+ *
+ * @var array
+ */
+ private static $groups = [
+ ['deprecated', 'link', 'see', 'since'],
+ ['author', 'copyright', 'license'],
+ ['category', 'package', 'subpackage'],
+ ['property', 'property-read', 'property-write'],
+ ];
+
+ /**
+ * Should the given tags be kept together, or kept apart?
+ */
+ public static function shouldBeTogether(Tag $first, Tag $second): bool
+ {
+ $firstName = $first->getName();
+ $secondName = $second->getName();
+
+ if ($firstName === $secondName) {
+ return true;
+ }
+
+ foreach (self::$groups as $group) {
+ if (\in_array($firstName, $group, true) && \in_array($secondName, $group, true)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php
new file mode 100644
index 0000000..2f3cef8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/DocBlock/TypeExpression.php
@@ -0,0 +1,281 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\DocBlock;
+
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+
+/**
+ * @internal
+ */
+final class TypeExpression
+{
+ /**
+ * Regex to match any types, shall be used with `x` modifier.
+ *
+ * @internal
+ */
+ public const REGEX_TYPES = '
+ (?<types> # alternation of several types separated by `|`
+ (?<type> # single type
+ \?? # optionally nullable
+ (?:
+ (?<object_like_array>
+ array\h*\{
+ (?<object_like_array_key>
+ \h*[^?:\h]+\h*\??\h*:\h*(?&types)
+ )
+ (?:\h*,(?&object_like_array_key))*
+ \h*\}
+ )
+ |
+ (?<callable> # callable syntax, e.g. `callable(string): bool`
+ (?:callable|Closure)\h*\(\h*
+ (?&types)
+ (?:
+ \h*,\h*
+ (?&types)
+ )*
+ \h*\)
+ (?:
+ \h*\:\h*
+ (?&types)
+ )?
+ )
+ |
+ (?<generic> # generic syntax, e.g.: `array<int, \Foo\Bar>`
+ (?&name)+
+ \h*<\h*
+ (?&types)
+ (?:
+ \h*,\h*
+ (?&types)
+ )*
+ \h*>
+ )
+ |
+ (?<class_constant> # class constants with optional wildcard, e.g.: `Foo::*`, `Foo::CONST_A`, `FOO::CONST_*`
+ (?&name)::(\*|\w+\*?)
+ )
+ |
+ (?<array> # array expression, e.g.: `string[]`, `string[][]`
+ (?&name)(\[\])+
+ )
+ |
+ (?<constant> # single constant value (case insensitive), e.g.: 1, `\'a\'`
+ (?i)
+ null | true | false
+ | [\d.]+
+ | \'[^\']+?\' | "[^"]+?"
+ | [@$]?(?:this | self | static)
+ (?-i)
+ )
+ |
+ (?<name> # single type, e.g.: `null`, `int`, `\Foo\Bar`
+ [\\\\\w-]++
+ )
+ )
+ (?: # intersection
+ \h*&\h*
+ (?&type)
+ )*
+ )
+ (?:
+ \h*\|\h*
+ (?&type)
+ )*
+ )
+ ';
+
+ /**
+ * @var string[]
+ */
+ private $types = [];
+
+ /**
+ * @var null|NamespaceAnalysis
+ */
+ private $namespace;
+
+ /**
+ * @var NamespaceUseAnalysis[]
+ */
+ private $namespaceUses;
+
+ /**
+ * @param NamespaceUseAnalysis[] $namespaceUses
+ */
+ public function __construct(string $value, ?NamespaceAnalysis $namespace, array $namespaceUses)
+ {
+ while ('' !== $value) {
+ Preg::match(
+ '{^'.self::REGEX_TYPES.'$}x',
+ $value,
+ $matches
+ );
+
+ $this->types[] = $matches['type'];
+ $value = Preg::replace(
+ '/^'.preg_quote($matches['type'], '/').'(\h*\|\h*)?/',
+ '',
+ $value
+ );
+ }
+
+ $this->namespace = $namespace;
+ $this->namespaceUses = $namespaceUses;
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getTypes(): array
+ {
+ return $this->types;
+ }
+
+ public function getCommonType(): ?string
+ {
+ $aliases = $this->getAliases();
+
+ $mainType = null;
+
+ foreach ($this->types as $type) {
+ if ('null' === $type) {
+ continue;
+ }
+
+ if (isset($aliases[$type])) {
+ $type = $aliases[$type];
+ } elseif (1 === Preg::match('/\[\]$/', $type)) {
+ $type = 'array';
+ } elseif (1 === Preg::match('/^(.+?)</', $type, $matches)) {
+ $type = $matches[1];
+ }
+
+ if (null === $mainType || $type === $mainType) {
+ $mainType = $type;
+
+ continue;
+ }
+
+ $mainType = $this->getParentType($type, $mainType);
+
+ if (null === $mainType) {
+ return null;
+ }
+ }
+
+ return $mainType;
+ }
+
+ public function allowsNull(): bool
+ {
+ foreach ($this->types as $type) {
+ if (\in_array($type, ['null', 'mixed'], true)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function getParentType(string $type1, string $type2): ?string
+ {
+ $types = [
+ $this->normalize($type1),
+ $this->normalize($type2),
+ ];
+ natcasesort($types);
+ $types = implode('|', $types);
+
+ $parents = [
+ 'array|Traversable' => 'iterable',
+ 'array|iterable' => 'iterable',
+ 'iterable|Traversable' => 'iterable',
+ 'self|static' => 'self',
+ ];
+
+ return $parents[$types] ?? null;
+ }
+
+ private function normalize(string $type): string
+ {
+ $aliases = $this->getAliases();
+
+ if (isset($aliases[$type])) {
+ return $aliases[$type];
+ }
+
+ if (\in_array($type, [
+ 'array',
+ 'bool',
+ 'callable',
+ 'float',
+ 'int',
+ 'iterable',
+ 'mixed',
+ 'never',
+ 'null',
+ 'object',
+ 'resource',
+ 'string',
+ 'void',
+ ], true)) {
+ return $type;
+ }
+
+ if (1 === Preg::match('/\[\]$/', $type)) {
+ return 'array';
+ }
+
+ if (1 === Preg::match('/^(.+?)</', $type, $matches)) {
+ return $matches[1];
+ }
+
+ if (str_starts_with($type, '\\')) {
+ return substr($type, 1);
+ }
+
+ foreach ($this->namespaceUses as $namespaceUse) {
+ if ($namespaceUse->getShortName() === $type) {
+ return $namespaceUse->getFullName();
+ }
+ }
+
+ if (null === $this->namespace || '' === $this->namespace->getShortName()) {
+ return $type;
+ }
+
+ return "{$this->namespace->getFullName()}\\{$type}";
+ }
+
+ /**
+ * @return array<string,string>
+ */
+ private function getAliases(): array
+ {
+ return [
+ 'boolean' => 'bool',
+ 'callback' => 'callable',
+ 'double' => 'float',
+ 'false' => 'bool',
+ 'integer' => 'int',
+ 'real' => 'float',
+ 'true' => 'bool',
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php
new file mode 100644
index 0000000..9134067
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Token.php
@@ -0,0 +1,87 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Doctrine\Annotation;
+
+use Doctrine\Common\Annotations\DocLexer;
+
+/**
+ * A Doctrine annotation token.
+ *
+ * @internal
+ */
+final class Token
+{
+ /**
+ * @var int
+ */
+ private $type;
+
+ /**
+ * @var string
+ */
+ private $content;
+
+ /**
+ * @param int $type The type
+ * @param string $content The content
+ */
+ public function __construct(int $type = DocLexer::T_NONE, string $content = '')
+ {
+ $this->type = $type;
+ $this->content = $content;
+ }
+
+ public function getType(): int
+ {
+ return $this->type;
+ }
+
+ public function setType(int $type): void
+ {
+ $this->type = $type;
+ }
+
+ public function getContent(): string
+ {
+ return $this->content;
+ }
+
+ public function setContent(string $content): void
+ {
+ $this->content = $content;
+ }
+
+ /**
+ * Returns whether the token type is one of the given types.
+ *
+ * @param int|int[] $types
+ */
+ public function isType($types): bool
+ {
+ if (!\is_array($types)) {
+ $types = [$types];
+ }
+
+ return \in_array($this->getType(), $types, true);
+ }
+
+ /**
+ * Overrides the content with an empty string.
+ */
+ public function clear(): void
+ {
+ $this->setContent('');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php
new file mode 100644
index 0000000..d2c579b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Doctrine/Annotation/Tokens.php
@@ -0,0 +1,342 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Doctrine\Annotation;
+
+use Doctrine\Common\Annotations\DocLexer;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token as PhpToken;
+
+/**
+ * A list of Doctrine annotation tokens.
+ *
+ * @internal
+ */
+final class Tokens extends \SplFixedArray
+{
+ /**
+ * @param string[] $ignoredTags
+ *
+ * @throws \InvalidArgumentException
+ */
+ public static function createFromDocComment(PhpToken $input, array $ignoredTags = []): self
+ {
+ if (!$input->isGivenKind(T_DOC_COMMENT)) {
+ throw new \InvalidArgumentException('Input must be a T_DOC_COMMENT token.');
+ }
+
+ $tokens = new self();
+
+ $content = $input->getContent();
+ $ignoredTextPosition = 0;
+ $currentPosition = 0;
+ $token = null;
+ while (false !== $nextAtPosition = strpos($content, '@', $currentPosition)) {
+ if (0 !== $nextAtPosition && !Preg::match('/\s/', $content[$nextAtPosition - 1])) {
+ $currentPosition = $nextAtPosition + 1;
+
+ continue;
+ }
+
+ $lexer = new DocLexer();
+ $lexer->setInput(substr($content, $nextAtPosition));
+
+ $scannedTokens = [];
+ $index = 0;
+ $nbScannedTokensToUse = 0;
+ $nbScopes = 0;
+ while (null !== $token = $lexer->peek()) {
+ if (0 === $index && DocLexer::T_AT !== $token['type']) {
+ break;
+ }
+
+ if (1 === $index) {
+ if (DocLexer::T_IDENTIFIER !== $token['type'] || \in_array($token['value'], $ignoredTags, true)) {
+ break;
+ }
+
+ $nbScannedTokensToUse = 2;
+ }
+
+ if ($index >= 2 && 0 === $nbScopes && !\in_array($token['type'], [DocLexer::T_NONE, DocLexer::T_OPEN_PARENTHESIS], true)) {
+ break;
+ }
+
+ $scannedTokens[] = $token;
+
+ if (DocLexer::T_OPEN_PARENTHESIS === $token['type']) {
+ ++$nbScopes;
+ } elseif (DocLexer::T_CLOSE_PARENTHESIS === $token['type']) {
+ if (0 === --$nbScopes) {
+ $nbScannedTokensToUse = \count($scannedTokens);
+
+ break;
+ }
+ }
+
+ ++$index;
+ }
+
+ if (0 !== $nbScopes) {
+ break;
+ }
+
+ if (0 !== $nbScannedTokensToUse) {
+ $ignoredTextLength = $nextAtPosition - $ignoredTextPosition;
+ if (0 !== $ignoredTextLength) {
+ $tokens[] = new Token(DocLexer::T_NONE, substr($content, $ignoredTextPosition, $ignoredTextLength));
+ }
+
+ $lastTokenEndIndex = 0;
+ foreach (\array_slice($scannedTokens, 0, $nbScannedTokensToUse) as $token) {
+ if (DocLexer::T_STRING === $token['type']) {
+ $token['value'] = '"'.str_replace('"', '""', $token['value']).'"';
+ }
+
+ $missingTextLength = $token['position'] - $lastTokenEndIndex;
+ if ($missingTextLength > 0) {
+ $tokens[] = new Token(DocLexer::T_NONE, substr(
+ $content,
+ $nextAtPosition + $lastTokenEndIndex,
+ $missingTextLength
+ ));
+ }
+
+ $tokens[] = new Token($token['type'], $token['value']);
+ $lastTokenEndIndex = $token['position'] + \strlen($token['value']);
+ }
+
+ $currentPosition = $ignoredTextPosition = $nextAtPosition + $token['position'] + \strlen($token['value']);
+ } else {
+ $currentPosition = $nextAtPosition + 1;
+ }
+ }
+
+ if ($ignoredTextPosition < \strlen($content)) {
+ $tokens[] = new Token(DocLexer::T_NONE, substr($content, $ignoredTextPosition));
+ }
+
+ return $tokens;
+ }
+
+ /**
+ * Returns the index of the closest next token that is neither a comment nor a whitespace token.
+ */
+ public function getNextMeaningfulToken(int $index): ?int
+ {
+ return $this->getMeaningfulTokenSibling($index, 1);
+ }
+
+ /**
+ * Returns the index of the closest previous token that is neither a comment nor a whitespace token.
+ */
+ public function getPreviousMeaningfulToken(int $index): ?int
+ {
+ return $this->getMeaningfulTokenSibling($index, -1);
+ }
+
+ /**
+ * Returns the index of the closest next token of the given type.
+ *
+ * @param string|string[] $type
+ */
+ public function getNextTokenOfType($type, int $index): ?int
+ {
+ return $this->getTokenOfTypeSibling($index, $type, 1);
+ }
+
+ /**
+ * Returns the index of the closest previous token of the given type.
+ *
+ * @param string|string[] $type
+ */
+ public function getPreviousTokenOfType($type, int $index): ?int
+ {
+ return $this->getTokenOfTypeSibling($index, $type, -1);
+ }
+
+ /**
+ * Returns the index of the last token that is part of the annotation at the given index.
+ */
+ public function getAnnotationEnd(int $index): ?int
+ {
+ $currentIndex = null;
+
+ if (isset($this[$index + 2])) {
+ if ($this[$index + 2]->isType(DocLexer::T_OPEN_PARENTHESIS)) {
+ $currentIndex = $index + 2;
+ } elseif (
+ isset($this[$index + 3])
+ && $this[$index + 2]->isType(DocLexer::T_NONE)
+ && $this[$index + 3]->isType(DocLexer::T_OPEN_PARENTHESIS)
+ && Preg::match('/^(\R\s*\*\s*)*\s*$/', $this[$index + 2]->getContent())
+ ) {
+ $currentIndex = $index + 3;
+ }
+ }
+
+ if (null !== $currentIndex) {
+ $level = 0;
+ for ($max = \count($this); $currentIndex < $max; ++$currentIndex) {
+ if ($this[$currentIndex]->isType(DocLexer::T_OPEN_PARENTHESIS)) {
+ ++$level;
+ } elseif ($this[$currentIndex]->isType(DocLexer::T_CLOSE_PARENTHESIS)) {
+ --$level;
+ }
+
+ if (0 === $level) {
+ return $currentIndex;
+ }
+ }
+
+ return null;
+ }
+
+ return $index + 1;
+ }
+
+ /**
+ * Returns the index of the close brace that matches the open brace at the given index.
+ */
+ public function getArrayEnd(int $index): ?int
+ {
+ $level = 1;
+ for (++$index, $max = \count($this); $index < $max; ++$index) {
+ if ($this[$index]->isType(DocLexer::T_OPEN_CURLY_BRACES)) {
+ ++$level;
+ } elseif ($this[$index]->isType($index, DocLexer::T_CLOSE_CURLY_BRACES)) {
+ --$level;
+ }
+
+ if (0 === $level) {
+ return $index;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the code from the tokens.
+ */
+ public function getCode(): string
+ {
+ $code = '';
+ foreach ($this as $token) {
+ $code .= $token->getContent();
+ }
+
+ return $code;
+ }
+
+ /**
+ * Inserts a token at the given index.
+ */
+ public function insertAt(int $index, Token $token): void
+ {
+ $this->setSize($this->getSize() + 1);
+
+ for ($i = $this->getSize() - 1; $i > $index; --$i) {
+ $this[$i] = $this[$i - 1] ?? new Token();
+ }
+
+ $this[$index] = $token;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function offsetSet($index, $token): void
+ {
+ if (!$token instanceof Token) {
+ $type = \gettype($token);
+ if ('object' === $type) {
+ $type = \get_class($token);
+ }
+
+ throw new \InvalidArgumentException(sprintf(
+ 'Token must be an instance of PhpCsFixer\\Doctrine\\Annotation\\Token, %s given.',
+ $type
+ ));
+ }
+
+ if (null === $index) {
+ $index = \count($this);
+ $this->setSize($this->getSize() + 1);
+ }
+
+ parent::offsetSet($index, $token);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws \OutOfBoundsException
+ */
+ public function offsetUnset($index): void
+ {
+ if (!isset($this[$index])) {
+ throw new \OutOfBoundsException(sprintf('Index "%s" is invalid or does not exist.', $index));
+ }
+
+ $max = \count($this) - 1;
+ while ($index < $max) {
+ $this[$index] = $this[$index + 1];
+ ++$index;
+ }
+
+ parent::offsetUnset($index);
+
+ $this->setSize($max);
+ }
+
+ private function getMeaningfulTokenSibling(int $index, int $direction): ?int
+ {
+ while (true) {
+ $index += $direction;
+
+ if (!$this->offsetExists($index)) {
+ break;
+ }
+
+ if (!$this[$index]->isType(DocLexer::T_NONE)) {
+ return $index;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @param string|string[] $type
+ */
+ private function getTokenOfTypeSibling(int $index, $type, int $direction): ?int
+ {
+ while (true) {
+ $index += $direction;
+
+ if (!$this->offsetExists($index)) {
+ break;
+ }
+
+ if ($this[$index]->isType($type)) {
+ return $index;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php
new file mode 100644
index 0000000..6b9f436
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/DocumentationLocator.php
@@ -0,0 +1,85 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Documentation;
+
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Utils;
+
+/**
+ * @internal
+ */
+final class DocumentationLocator
+{
+ /**
+ * @var string
+ */
+ private $path;
+
+ public function __construct()
+ {
+ $this->path = \dirname(__DIR__, 2).'/doc';
+ }
+
+ public function getFixersDocumentationDirectoryPath(): string
+ {
+ return $this->path.'/rules';
+ }
+
+ public function getFixersDocumentationIndexFilePath(): string
+ {
+ return $this->getFixersDocumentationDirectoryPath().'/index.rst';
+ }
+
+ public function getFixerDocumentationFilePath(FixerInterface $fixer): string
+ {
+ return $this->getFixersDocumentationDirectoryPath().'/'.Preg::replaceCallback(
+ '/^.*\\\\(.+)\\\\(.+)Fixer$/',
+ static function (array $matches): string {
+ return Utils::camelCaseToUnderscore($matches[1]).'/'.Utils::camelCaseToUnderscore($matches[2]);
+ },
+ \get_class($fixer)
+ ).'.rst';
+ }
+
+ public function getFixerDocumentationFileRelativePath(FixerInterface $fixer): string
+ {
+ return Preg::replace(
+ '#^'.preg_quote($this->getFixersDocumentationDirectoryPath(), '#').'/#',
+ '',
+ $this->getFixerDocumentationFilePath($fixer)
+ );
+ }
+
+ public function getRuleSetsDocumentationDirectoryPath(): string
+ {
+ return $this->path.'/ruleSets';
+ }
+
+ public function getRuleSetsDocumentationIndexFilePath(): string
+ {
+ return $this->getRuleSetsDocumentationDirectoryPath().'/index.rst';
+ }
+
+ public function getRuleSetsDocumentationFilePath(string $name): string
+ {
+ return $this->getRuleSetsDocumentationDirectoryPath().'/'.str_replace(':risky', 'Risky', ucfirst(substr($name, 1))).'.rst';
+ }
+
+ public function getListingFilePath(): string
+ {
+ return $this->path.'/list.rst';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
new file mode 100644
index 0000000..bb0c54a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/FixerDocumentGenerator.php
@@ -0,0 +1,354 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Documentation;
+
+use PhpCsFixer\Console\Command\HelpCommand;
+use PhpCsFixer\Differ\FullDiffer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\DeprecatedFixerInterface;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\FixerConfiguration\AliasedFixerOption;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\DeprecatedFixerOptionInterface;
+use PhpCsFixer\FixerDefinition\CodeSampleInterface;
+use PhpCsFixer\FixerDefinition\FileSpecificCodeSampleInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSampleInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\RuleSet\RuleSet;
+use PhpCsFixer\RuleSet\RuleSets;
+use PhpCsFixer\StdinFileInfo;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Utils;
+
+/**
+ * @internal
+ */
+final class FixerDocumentGenerator
+{
+ /**
+ * @var DocumentationLocator
+ */
+ private $locator;
+
+ /**
+ * @var FullDiffer
+ */
+ private $differ;
+
+ public function __construct(DocumentationLocator $locator)
+ {
+ $this->locator = $locator;
+ $this->differ = new FullDiffer();
+ }
+
+ public function generateFixerDocumentation(FixerInterface $fixer): string
+ {
+ $name = $fixer->getName();
+ $title = "Rule ``{$name}``";
+ $titleLine = str_repeat('=', \strlen($title));
+ $doc = "{$titleLine}\n{$title}\n{$titleLine}";
+
+ if ($fixer instanceof DeprecatedFixerInterface) {
+ $doc .= "\n\n.. warning:: This rule is deprecated and will be removed on next major version.";
+ $alternatives = $fixer->getSuccessorsNames();
+
+ if (0 !== \count($alternatives)) {
+ $doc .= RstUtils::toRst(sprintf(
+ "\n\nYou should use %s instead.",
+ Utils::naturalLanguageJoinWithBackticks($alternatives)
+ ), 3);
+ }
+ }
+
+ $definition = $fixer->getDefinition();
+ $doc .= "\n\n".RstUtils::toRst($definition->getSummary());
+
+ $description = $definition->getDescription();
+
+ if (null !== $description) {
+ $description = RstUtils::toRst($description);
+ $doc .= <<<RST
+
+
+Description
+-----------
+
+{$description}
+RST;
+ }
+
+ $riskyDescription = $definition->getRiskyDescription();
+
+ if (null !== $riskyDescription) {
+ $riskyDescription = RstUtils::toRst($riskyDescription, 3);
+
+ $doc .= <<<RST
+
+
+.. warning:: Using this rule is risky.
+
+ {$riskyDescription}
+RST;
+ }
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ $doc .= <<<'RST'
+
+
+Configuration
+-------------
+RST;
+
+ $configurationDefinition = $fixer->getConfigurationDefinition();
+
+ foreach ($configurationDefinition->getOptions() as $option) {
+ $optionInfo = "``{$option->getName()}``";
+ $optionInfo .= "\n".str_repeat('~', \strlen($optionInfo));
+
+ if ($option instanceof DeprecatedFixerOptionInterface) {
+ $deprecationMessage = RstUtils::toRst($option->getDeprecationMessage());
+ $optionInfo .= "\n\n.. warning:: This option is deprecated and will be removed on next major version. {$deprecationMessage}";
+ }
+
+ $optionInfo .= "\n\n".RstUtils::toRst($option->getDescription());
+
+ if ($option instanceof AliasedFixerOption) {
+ $optionInfo .= "\n\n.. note:: The previous name of this option was ``{$option->getAlias()}`` but it is now deprecated and will be removed on next major version.";
+ }
+
+ $allowed = HelpCommand::getDisplayableAllowedValues($option);
+
+ if (null === $allowed) {
+ $allowedKind = 'Allowed types';
+ $allowed = array_map(static function ($value): string {
+ return '``'.$value.'``';
+ }, $option->getAllowedTypes());
+ } else {
+ $allowedKind = 'Allowed values';
+
+ foreach ($allowed as &$value) {
+ if ($value instanceof AllowedValueSubset) {
+ $value = 'a subset of ``'.HelpCommand::toString($value->getAllowedValues()).'``';
+ } else {
+ $value = '``'.HelpCommand::toString($value).'``';
+ }
+ }
+ }
+
+ $allowed = implode(', ', $allowed);
+ $optionInfo .= "\n\n{$allowedKind}: {$allowed}";
+
+ if ($option->hasDefault()) {
+ $default = HelpCommand::toString($option->getDefault());
+ $optionInfo .= "\n\nDefault value: ``{$default}``";
+ } else {
+ $optionInfo .= "\n\nThis option is required.";
+ }
+
+ $doc .= "\n\n{$optionInfo}";
+ }
+ }
+
+ $samples = $definition->getCodeSamples();
+
+ if (0 !== \count($samples)) {
+ $doc .= <<<'RST'
+
+
+Examples
+--------
+RST;
+
+ foreach ($samples as $index => $sample) {
+ $title = sprintf('Example #%d', $index + 1);
+ $titleLine = str_repeat('~', \strlen($title));
+ $doc .= "\n\n{$title}\n{$titleLine}";
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ if (null === $sample->getConfiguration()) {
+ $doc .= "\n\n*Default* configuration.";
+ } else {
+ $doc .= sprintf(
+ "\n\nWith configuration: ``%s``.",
+ HelpCommand::toString($sample->getConfiguration())
+ );
+ }
+ }
+
+ $doc .= "\n".$this->generateSampleDiff($fixer, $sample, $index + 1, $name);
+ }
+ }
+
+ $ruleSetConfigs = [];
+
+ foreach (RuleSets::getSetDefinitionNames() as $set) {
+ $ruleSet = new RuleSet([$set => true]);
+
+ if ($ruleSet->hasRule($name)) {
+ $ruleSetConfigs[$set] = $ruleSet->getRuleConfiguration($name);
+ }
+ }
+
+ if ([] !== $ruleSetConfigs) {
+ $plural = 1 !== \count($ruleSetConfigs) ? 's' : '';
+ $doc .= <<<RST
+
+
+Rule sets
+---------
+
+The rule is part of the following rule set{$plural}:
+RST;
+
+ foreach ($ruleSetConfigs as $set => $config) {
+ $ruleSetPath = $this->locator->getRuleSetsDocumentationFilePath($set);
+ $ruleSetPath = substr($ruleSetPath, strrpos($ruleSetPath, '/'));
+
+ $doc .= <<<RST
+
+
+{$set}
+ Using the `{$set} <./../../ruleSets{$ruleSetPath}>`_ rule set will enable the ``{$name}`` rule
+RST;
+
+ if (null !== $config) {
+ $doc .= " with the config below:\n\n ``".HelpCommand::toString($config).'``';
+ } elseif ($fixer instanceof ConfigurableFixerInterface) {
+ $doc .= ' with the default config.';
+ } else {
+ $doc .= '.';
+ }
+ }
+ }
+
+ return "{$doc}\n";
+ }
+
+ /**
+ * @param FixerInterface[] $fixers
+ */
+ public function generateFixersDocumentationIndex(array $fixers): string
+ {
+ $overrideGroups = [
+ 'PhpUnit' => 'PHPUnit',
+ 'PhpTag' => 'PHP Tag',
+ 'Phpdoc' => 'PHPDoc',
+ ];
+
+ usort($fixers, static function (FixerInterface $a, FixerInterface $b): int {
+ return strcmp(\get_class($a), \get_class($b));
+ });
+
+ $documentation = <<<'RST'
+=======================
+List of Available Rules
+=======================
+RST;
+
+ $currentGroup = null;
+
+ foreach ($fixers as $fixer) {
+ $namespace = Preg::replace('/^.*\\\\(.+)\\\\.+Fixer$/', '$1', \get_class($fixer));
+ $group = $overrideGroups[$namespace] ?? Preg::replace('/(?<=[[:lower:]])(?=[[:upper:]])/', ' ', $namespace);
+
+ if ($group !== $currentGroup) {
+ $underline = str_repeat('-', \strlen($group));
+ $documentation .= "\n\n{$group}\n{$underline}\n";
+
+ $currentGroup = $group;
+ }
+
+ $path = './'.$this->locator->getFixerDocumentationFileRelativePath($fixer);
+
+ $attributes = [];
+
+ if ($fixer instanceof DeprecatedFixerInterface) {
+ $attributes[] = 'deprecated';
+ }
+
+ if ($fixer->isRisky()) {
+ $attributes[] = 'risky';
+ }
+
+ $attributes = 0 === \count($attributes)
+ ? ''
+ : ' *('.implode(', ', $attributes).')*'
+ ;
+
+ $summary = str_replace('`', '``', $fixer->getDefinition()->getSummary());
+
+ $documentation .= <<<RST
+
+- `{$fixer->getName()} <{$path}>`_{$attributes}
+
+ {$summary}
+RST;
+ }
+
+ return "{$documentation}\n";
+ }
+
+ private function generateSampleDiff(FixerInterface $fixer, CodeSampleInterface $sample, int $sampleNumber, string $ruleName): string
+ {
+ if ($sample instanceof VersionSpecificCodeSampleInterface && !$sample->isSuitableFor(\PHP_VERSION_ID)) {
+ $existingFile = @file_get_contents($this->locator->getFixerDocumentationFilePath($fixer));
+
+ if (false !== $existingFile) {
+ Preg::match("/\\RExample #{$sampleNumber}\\R.+?(?<diff>\\R\\.\\. code-block:: diff\\R\\R.*?)\\R(?:\\R\\S|$)/s", $existingFile, $matches);
+
+ if (isset($matches['diff'])) {
+ return $matches['diff'];
+ }
+ }
+
+ $error = <<<RST
+
+.. error::
+ Cannot generate diff for code sample #{$sampleNumber} of rule {$ruleName}:
+ the sample is not suitable for current version of PHP (%s).
+RST;
+
+ return sprintf($error, PHP_VERSION);
+ }
+
+ $old = $sample->getCode();
+
+ $tokens = Tokens::fromCode($old);
+ $file = $sample instanceof FileSpecificCodeSampleInterface
+ ? $sample->getSplFileInfo()
+ : new StdinFileInfo()
+ ;
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ $fixer->configure($sample->getConfiguration() ?? []);
+ }
+
+ $fixer->fix($file, $tokens);
+
+ $diff = $this->differ->diff($old, $tokens->generateCode());
+ $diff = Preg::replace('/@@[ \+\-\d,]+@@\n/', '', $diff);
+ $diff = Preg::replace('/\r/', '^M', $diff);
+ $diff = Preg::replace('/^ $/m', '', $diff);
+ $diff = Preg::replace('/\n$/', '', $diff);
+ $diff = RstUtils::indent($diff, 3);
+
+ return <<<RST
+
+.. code-block:: diff
+
+ {$diff}
+RST;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/ListDocumentGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/ListDocumentGenerator.php
new file mode 100644
index 0000000..b5da8e1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/ListDocumentGenerator.php
@@ -0,0 +1,179 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Documentation;
+
+use PhpCsFixer\Console\Command\HelpCommand;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\DeprecatedFixerInterface;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\FixerConfiguration\AliasedFixerOption;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\DeprecatedFixerOptionInterface;
+use PhpCsFixer\RuleSet\RuleSet;
+use PhpCsFixer\RuleSet\RuleSets;
+use PhpCsFixer\Utils;
+
+/**
+ * @internal
+ */
+final class ListDocumentGenerator
+{
+ /**
+ * @var DocumentationLocator
+ */
+ private $locator;
+
+ public function __construct(DocumentationLocator $locator)
+ {
+ $this->locator = $locator;
+ }
+
+ /**
+ * @param FixerInterface[] $fixers
+ */
+ public function generateListingDocumentation(array $fixers): string
+ {
+ usort(
+ $fixers,
+ static function (FixerInterface $fixer1, FixerInterface $fixer2): int {
+ return strnatcasecmp($fixer1->getName(), $fixer2->getName());
+ }
+ );
+
+ $documentation = <<<'RST'
+=======================
+List of Available Rules
+=======================
+
+RST;
+ foreach ($fixers as $fixer) {
+ $name = $fixer->getName();
+ $definition = $fixer->getDefinition();
+ $path = './rules/'.$this->locator->getFixerDocumentationFileRelativePath($fixer);
+
+ $documentation .= "\n- `{$name} <{$path}>`_\n";
+ $documentation .= "\n ".str_replace('`', '``', $definition->getSummary())."\n";
+
+ $description = $definition->getDescription();
+
+ if (null !== $description) {
+ $documentation .= "\n ".RstUtils::toRst($description, 3)."\n";
+ }
+
+ if ($fixer instanceof DeprecatedFixerInterface) {
+ $documentation .= "\n *warning deprecated*";
+ $alternatives = $fixer->getSuccessorsNames();
+
+ if (0 !== \count($alternatives)) {
+ $documentation .= RstUtils::toRst(sprintf(
+ ' Use %s instead.',
+ Utils::naturalLanguageJoinWithBackticks($alternatives)
+ ), 3);
+ }
+
+ $documentation .= "\n";
+ }
+
+ if ($fixer->isRisky()) {
+ $documentation .= "\n *warning risky* ".RstUtils::toRst($definition->getRiskyDescription(), 3)."\n";
+ }
+
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ $documentation .= "\n Configuration options:\n";
+ $configurationDefinition = $fixer->getConfigurationDefinition();
+
+ foreach ($configurationDefinition->getOptions() as $option) {
+ $documentation .= "\n - | ``{$option->getName()}``";
+ $documentation .= "\n | {$option->getDescription()}";
+
+ if ($option instanceof DeprecatedFixerOptionInterface) {
+ $deprecationMessage = RstUtils::toRst($option->getDeprecationMessage(), 3);
+ $documentation .= "\n | warning:: This option is deprecated and will be removed on next major version. {$deprecationMessage}";
+ }
+
+ if ($option instanceof AliasedFixerOption) {
+ $documentation .= "\n | note:: The previous name of this option was ``{$option->getAlias()}`` but it is now deprecated and will be removed on next major version.";
+ }
+
+ $allowed = HelpCommand::getDisplayableAllowedValues($option);
+
+ if (null === $allowed) {
+ $allowedKind = 'Allowed types';
+ $allowed = array_map(static function ($value): string {
+ return '``'.$value.'``';
+ }, $option->getAllowedTypes());
+ } else {
+ $allowedKind = 'Allowed values';
+
+ foreach ($allowed as &$value) {
+ if ($value instanceof AllowedValueSubset) {
+ $value = 'a subset of ``'.HelpCommand::toString($value->getAllowedValues()).'``';
+ } else {
+ $value = '``'.HelpCommand::toString($value).'``';
+ }
+ }
+ }
+
+ $allowed = implode(', ', $allowed);
+ $documentation .= "\n | {$allowedKind}: {$allowed}";
+
+ if ($option->hasDefault()) {
+ $default = HelpCommand::toString($option->getDefault());
+ $documentation .= "\n | Default value: ``{$default}``";
+ } else {
+ $documentation .= "\n | This option is required.";
+ }
+ }
+
+ $documentation .= "\n\n";
+ }
+
+ $ruleSetConfigs = [];
+
+ foreach (RuleSets::getSetDefinitionNames() as $set) {
+ $ruleSet = new RuleSet([$set => true]);
+
+ if ($ruleSet->hasRule($name)) {
+ $ruleSetConfigs[$set] = $ruleSet->getRuleConfiguration($name);
+ }
+ }
+
+ if ([] !== $ruleSetConfigs) {
+ $plural = 1 !== \count($ruleSetConfigs) ? 's' : '';
+
+ $documentation .= "\n Part of rule set{$plural} ";
+
+ foreach ($ruleSetConfigs as $set => $config) {
+ $ruleSetPath = $this->locator->getRuleSetsDocumentationFilePath($set);
+ $ruleSetPath = substr($ruleSetPath, strrpos($ruleSetPath, '/'));
+
+ $documentation .= "`{$set} <./ruleSets{$ruleSetPath}>`_ ";
+ }
+
+ $documentation = rtrim($documentation)."\n";
+ }
+
+ $reflectionObject = new \ReflectionObject($fixer);
+ $className = str_replace('\\', '\\\\', $reflectionObject->getName());
+ $fileName = $reflectionObject->getFileName();
+ $fileName = str_replace('\\', '/', $fileName);
+ $fileName = substr($fileName, strrpos($fileName, '/src/Fixer/') + 1);
+ $fileName = "`Source {$className} <./../{$fileName}>`_";
+ $documentation .= "\n ".$fileName;
+ }
+
+ return $documentation."\n";
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/RstUtils.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/RstUtils.php
new file mode 100644
index 0000000..b7b5c51
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/RstUtils.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Documentation;
+
+use PhpCsFixer\Preg;
+
+/**
+ * @internal
+ */
+final class RstUtils
+{
+ private function __construct()
+ {
+ // cannot create instance of util. class
+ }
+
+ public static function toRst(string $string, int $indent = 0): string
+ {
+ $string = wordwrap(Preg::replace('/(?<!`)(`.*?`)(?!`)/', '`$1`', $string), 80 - $indent);
+
+ return 0 === $indent ? $string : self::indent($string, $indent);
+ }
+
+ public static function indent(string $string, int $indent): string
+ {
+ return Preg::replace('/(\n)(?!\n|$)/', '$1'.str_repeat(' ', $indent), $string);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php
new file mode 100644
index 0000000..0aed34a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Documentation/RuleSetDocumentationGenerator.php
@@ -0,0 +1,107 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Documentation;
+
+use PhpCsFixer\Console\Command\HelpCommand;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\RuleSet\RuleSetDescriptionInterface;
+
+/**
+ * @internal
+ */
+final class RuleSetDocumentationGenerator
+{
+ /**
+ * @var DocumentationLocator
+ */
+ private $locator;
+
+ public function __construct(DocumentationLocator $locator)
+ {
+ $this->locator = $locator;
+ }
+
+ /**
+ * @param FixerInterface[] $fixers
+ */
+ public function generateRuleSetsDocumentation(RuleSetDescriptionInterface $definition, array $fixers): string
+ {
+ $fixerNames = [];
+
+ foreach ($fixers as $fixer) {
+ $fixerNames[$fixer->getName()] = $fixer;
+ }
+
+ $title = "Rule set ``{$definition->getName()}``";
+ $titleLine = str_repeat('=', \strlen($title));
+ $doc = "{$titleLine}\n{$title}\n{$titleLine}\n\n".$definition->getDescription();
+
+ if ($definition->isRisky()) {
+ $doc .= ' This set contains rules that are risky.';
+ }
+
+ $doc .= "\n\n";
+
+ $rules = $definition->getRules();
+
+ if (\count($rules) < 1) {
+ $doc .= 'This is an empty set.';
+ } else {
+ $doc .= "Rules\n-----\n";
+
+ foreach ($rules as $rule => $config) {
+ if (str_starts_with($rule, '@')) {
+ $ruleSetPath = $this->locator->getRuleSetsDocumentationFilePath($rule);
+ $ruleSetPath = substr($ruleSetPath, strrpos($ruleSetPath, '/'));
+
+ $doc .= "\n- `{$rule} <.{$ruleSetPath}>`_";
+ } else {
+ $path = Preg::replace(
+ '#^'.preg_quote($this->locator->getFixersDocumentationDirectoryPath(), '#').'/#',
+ './../rules/',
+ $this->locator->getFixerDocumentationFilePath($fixerNames[$rule])
+ );
+
+ $doc .= "\n- `{$rule} <{$path}>`_";
+ }
+
+ if (!\is_bool($config)) {
+ $doc .= "\n config:\n ``".HelpCommand::toString($config).'``';
+ }
+ }
+ }
+
+ return $doc."\n";
+ }
+
+ /**
+ * @param array<string, string> $setDefinitions
+ */
+ public function generateRuleSetsDocumentationIndex(array $setDefinitions): string
+ {
+ $documentation = <<<'RST'
+===========================
+List of Available Rule sets
+===========================
+RST;
+ foreach ($setDefinitions as $name => $path) {
+ $path = substr($path, strrpos($path, '/'));
+ $documentation .= "\n- `{$name} <.{$path}>`_";
+ }
+
+ return $documentation."\n";
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Error/Error.php b/vendor/friendsofphp/php-cs-fixer/src/Error/Error.php
new file mode 100644
index 0000000..f4e30a1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Error/Error.php
@@ -0,0 +1,99 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Error;
+
+/**
+ * An abstraction for errors that can occur before and during fixing.
+ *
+ * @author Andreas Möller <am@localheinz.com>
+ *
+ * @internal
+ */
+final class Error
+{
+ /**
+ * Error which has occurred in linting phase, before applying any fixers.
+ */
+ public const TYPE_INVALID = 1;
+
+ /**
+ * Error which has occurred during fixing phase.
+ */
+ public const TYPE_EXCEPTION = 2;
+
+ /**
+ * Error which has occurred in linting phase, after applying any fixers.
+ */
+ public const TYPE_LINT = 3;
+
+ /**
+ * @var int
+ */
+ private $type;
+
+ /**
+ * @var string
+ */
+ private $filePath;
+
+ /**
+ * @var null|\Throwable
+ */
+ private $source;
+
+ /**
+ * @var array
+ */
+ private $appliedFixers;
+
+ /**
+ * @var null|string
+ */
+ private $diff;
+
+ public function __construct(int $type, string $filePath, ?\Throwable $source = null, array $appliedFixers = [], ?string $diff = null)
+ {
+ $this->type = $type;
+ $this->filePath = $filePath;
+ $this->source = $source;
+ $this->appliedFixers = $appliedFixers;
+ $this->diff = $diff;
+ }
+
+ public function getFilePath(): string
+ {
+ return $this->filePath;
+ }
+
+ public function getSource(): ?\Throwable
+ {
+ return $this->source;
+ }
+
+ public function getType(): int
+ {
+ return $this->type;
+ }
+
+ public function getAppliedFixers(): array
+ {
+ return $this->appliedFixers;
+ }
+
+ public function getDiff(): ?string
+ {
+ return $this->diff;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Error/ErrorsManager.php b/vendor/friendsofphp/php-cs-fixer/src/Error/ErrorsManager.php
new file mode 100644
index 0000000..2d70a3e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Error/ErrorsManager.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Error;
+
+/**
+ * Manager of errors that occur during fixing.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ErrorsManager
+{
+ /**
+ * @var Error[]
+ */
+ private $errors = [];
+
+ /**
+ * Returns errors reported during linting before fixing.
+ *
+ * @return Error[]
+ */
+ public function getInvalidErrors(): array
+ {
+ return array_filter($this->errors, static function (Error $error): bool {
+ return Error::TYPE_INVALID === $error->getType();
+ });
+ }
+
+ /**
+ * Returns errors reported during fixing.
+ *
+ * @return Error[]
+ */
+ public function getExceptionErrors(): array
+ {
+ return array_filter($this->errors, static function (Error $error): bool {
+ return Error::TYPE_EXCEPTION === $error->getType();
+ });
+ }
+
+ /**
+ * Returns errors reported during linting after fixing.
+ *
+ * @return Error[]
+ */
+ public function getLintErrors(): array
+ {
+ return array_filter($this->errors, static function (Error $error): bool {
+ return Error::TYPE_LINT === $error->getType();
+ });
+ }
+
+ /**
+ * Returns true if no errors were reported.
+ */
+ public function isEmpty(): bool
+ {
+ return empty($this->errors);
+ }
+
+ public function report(Error $error): void
+ {
+ $this->errors[] = $error;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FileReader.php b/vendor/friendsofphp/php-cs-fixer/src/FileReader.php
new file mode 100644
index 0000000..d71f5f7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FileReader.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * File reader that unify access to regular file and stdin-alike file.
+ *
+ * Regular file could be read multiple times with `file_get_contents`, but file provided on stdin cannot.
+ * Consecutive try will provide empty content for stdin-alike file.
+ * This reader unifies access to them.
+ *
+ * @internal
+ */
+final class FileReader
+{
+ /**
+ * @var null|string
+ */
+ private $stdinContent;
+
+ public static function createSingleton(): self
+ {
+ static $instance = null;
+
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ public function read(string $filePath): string
+ {
+ if ('php://stdin' === $filePath) {
+ if (null === $this->stdinContent) {
+ $this->stdinContent = $this->readRaw($filePath);
+ }
+
+ return $this->stdinContent;
+ }
+
+ return $this->readRaw($filePath);
+ }
+
+ private function readRaw(string $realPath): string
+ {
+ $content = @file_get_contents($realPath);
+
+ if (false === $content) {
+ $error = error_get_last();
+
+ throw new \RuntimeException(sprintf(
+ 'Failed to read content from "%s".%s',
+ $realPath,
+ $error ? ' '.$error['message'] : ''
+ ));
+ }
+
+ return $content;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FileRemoval.php b/vendor/friendsofphp/php-cs-fixer/src/FileRemoval.php
new file mode 100644
index 0000000..6264d3b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FileRemoval.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * Handles files removal with possibility to remove them on shutdown.
+ *
+ * @author Adam Klvač <adam@klva.cz>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FileRemoval
+{
+ /**
+ * List of observed files to be removed.
+ *
+ * @var array
+ */
+ private $files = [];
+
+ public function __construct()
+ {
+ register_shutdown_function([$this, 'clean']);
+ }
+
+ public function __destruct()
+ {
+ $this->clean();
+ }
+
+ /**
+ * This class is not intended to be serialized,
+ * and cannot be deserialized (see __wakeup method).
+ */
+ public function __sleep(): array
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ /**
+ * Disable the deserialization of the class to prevent attacker executing
+ * code by leveraging the __destruct method.
+ *
+ * @see https://owasp.org/www-community/vulnerabilities/PHP_Object_Injection
+ */
+ public function __wakeup(): void
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ /**
+ * Adds a file to be removed.
+ */
+ public function observe(string $path): void
+ {
+ $this->files[$path] = true;
+ }
+
+ /**
+ * Removes a file from shutdown removal.
+ */
+ public function delete(string $path): void
+ {
+ if (isset($this->files[$path])) {
+ unset($this->files[$path]);
+ }
+ $this->unlink($path);
+ }
+
+ /**
+ * Removes attached files.
+ */
+ public function clean(): void
+ {
+ foreach ($this->files as $file => $value) {
+ $this->unlink($file);
+ }
+ $this->files = [];
+ }
+
+ private function unlink(string $path): void
+ {
+ @unlink($path);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Finder.php b/vendor/friendsofphp/php-cs-fixer/src/Finder.php
new file mode 100644
index 0000000..161937e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Finder.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use Symfony\Component\Finder\Finder as BaseFinder;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+class Finder extends BaseFinder
+{
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this
+ ->files()
+ ->name('*.php')
+ ->exclude('vendor')
+ ;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php
new file mode 100644
index 0000000..3a2db98
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractIncrementOperatorFixer.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+abstract class AbstractIncrementOperatorFixer extends AbstractFixer
+{
+ final protected function findStart(Tokens $tokens, int $index): int
+ {
+ do {
+ $index = $tokens->getPrevMeaningfulToken($index);
+ $token = $tokens[$index];
+
+ $blockType = Tokens::detectBlockType($token);
+ if (null !== $blockType && !$blockType['isStart']) {
+ $index = $tokens->findBlockStart($blockType['type'], $index);
+ $token = $tokens[$index];
+ }
+ } while (!$token->equalsAny(['$', [T_VARIABLE]]));
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$prevIndex];
+
+ if ($prevToken->equals('$')) {
+ return $this->findStart($tokens, $index);
+ }
+
+ if ($prevToken->isObjectOperator()) {
+ return $this->findStart($tokens, $prevIndex);
+ }
+
+ if ($prevToken->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM)) {
+ $prevPrevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ if (!$tokens[$prevPrevIndex]->isGivenKind([T_STATIC, T_STRING])) {
+ return $this->findStart($tokens, $prevIndex);
+ }
+
+ $index = $tokens->getTokenNotOfKindsSibling($prevIndex, -1, [T_NS_SEPARATOR, T_STATIC, T_STRING]);
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
new file mode 100644
index 0000000..42a92a7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/AbstractPhpUnitFixer.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Indicator\PhpUnitTestCaseIndicator;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+abstract class AbstractPhpUnitFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ final public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CLASS, T_STRING]);
+ }
+
+ final protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $phpUnitTestCaseIndicator = new PhpUnitTestCaseIndicator();
+
+ foreach ($phpUnitTestCaseIndicator->findPhpUnitClasses($tokens) as $indices) {
+ $this->applyPhpUnitClassFix($tokens, $indices[0], $indices[1]);
+ }
+ }
+
+ abstract protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void;
+
+ final protected function getDocBlockIndex(Tokens $tokens, int $index): int
+ {
+ do {
+ $index = $tokens->getPrevNonWhitespace($index);
+ } while ($tokens[$index]->isGivenKind([T_PUBLIC, T_PROTECTED, T_PRIVATE, T_FINAL, T_ABSTRACT, T_COMMENT]));
+
+ return $index;
+ }
+
+ final protected function isPHPDoc(Tokens $tokens, int $index): bool
+ {
+ return $tokens[$index]->isGivenKind(T_DOC_COMMENT);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php
new file mode 100644
index 0000000..43f4ae4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ArrayPushFixer.php
@@ -0,0 +1,218 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class ArrayPushFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts simple usages of `array_push($x, $y);` to `$x[] = $y;`.',
+ [new CodeSample("<?php\narray_push(\$x, \$y);\n")],
+ null,
+ 'Risky when the function `array_push` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING) && $tokens->count() > 7;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = $tokens->count() - 7; $index > 0; --$index) {
+ if (!$tokens[$index]->equals([T_STRING, 'array_push'], false)) {
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue; // redeclare/override
+ }
+
+ // meaningful before must be `<?php`, `{`, `}` or `;`
+
+ $callIndex = $index;
+ $index = $tokens->getPrevMeaningfulToken($index);
+ $namespaceSeparatorIndex = null;
+
+ if ($tokens[$index]->isGivenKind(T_NS_SEPARATOR)) {
+ $namespaceSeparatorIndex = $index;
+ $index = $tokens->getPrevMeaningfulToken($index);
+ }
+
+ if (!$tokens[$index]->equalsAny([';', '{', '}', ')', [T_OPEN_TAG]])) {
+ continue;
+ }
+
+ // figure out where the arguments list opens
+
+ $openBraceIndex = $tokens->getNextMeaningfulToken($callIndex);
+ $blockType = Tokens::detectBlockType($tokens[$openBraceIndex]);
+
+ if (null === $blockType || Tokens::BLOCK_TYPE_PARENTHESIS_BRACE !== $blockType['type']) {
+ continue;
+ }
+
+ // figure out where the arguments list closes
+
+ $closeBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openBraceIndex);
+
+ // meaningful after `)` must be `;`, `? >` or nothing
+
+ $afterCloseBraceIndex = $tokens->getNextMeaningfulToken($closeBraceIndex);
+
+ if (null !== $afterCloseBraceIndex && !$tokens[$afterCloseBraceIndex]->equalsAny([';', [T_CLOSE_TAG]])) {
+ continue;
+ }
+
+ // must have 2 arguments
+
+ // first argument must be a variable (with possibly array indexing etc.),
+ // after that nothing meaningful should be there till the next `,` or `)`
+ // if `)` than we cannot fix it (it is a single argument call)
+
+ $firstArgumentStop = $this->getFirstArgumentEnd($tokens, $openBraceIndex);
+ $firstArgumentStop = $tokens->getNextMeaningfulToken($firstArgumentStop);
+
+ if (!$tokens[$firstArgumentStop]->equals(',')) {
+ return;
+ }
+
+ // second argument can be about anything but ellipsis, we must make sure there is not
+ // a third argument (or more) passed to `array_push`
+
+ $secondArgumentStart = $tokens->getNextMeaningfulToken($firstArgumentStop);
+ $secondArgumentStop = $this->getSecondArgumentEnd($tokens, $secondArgumentStart, $closeBraceIndex);
+
+ if (null === $secondArgumentStop) {
+ continue;
+ }
+
+ // candidate is valid, replace tokens
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeBraceIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($firstArgumentStop);
+ $tokens->insertAt(
+ $firstArgumentStop,
+ [
+ new Token('['),
+ new Token(']'),
+ new Token([T_WHITESPACE, ' ']),
+ new Token('='),
+ ]
+ );
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openBraceIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($callIndex);
+
+ if (null !== $namespaceSeparatorIndex) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($namespaceSeparatorIndex);
+ }
+ }
+ }
+
+ private function getFirstArgumentEnd(Tokens $tokens, int $index): int
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ $nextToken = $tokens[$nextIndex];
+
+ while ($nextToken->equalsAny([
+ '$',
+ '[',
+ '(',
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN],
+ [CT::T_DYNAMIC_PROP_BRACE_OPEN],
+ [CT::T_DYNAMIC_VAR_BRACE_OPEN],
+ [CT::T_NAMESPACE_OPERATOR],
+ [T_NS_SEPARATOR],
+ [T_STATIC],
+ [T_STRING],
+ [T_VARIABLE],
+ ])) {
+ $blockType = Tokens::detectBlockType($nextToken);
+
+ if (null !== $blockType) {
+ $nextIndex = $tokens->findBlockEnd($blockType['type'], $nextIndex);
+ }
+
+ $index = $nextIndex;
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ $nextToken = $tokens[$nextIndex];
+ }
+
+ if ($nextToken->isGivenKind(T_OBJECT_OPERATOR)) {
+ return $this->getFirstArgumentEnd($tokens, $nextIndex);
+ }
+
+ if ($nextToken->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM)) {
+ return $this->getFirstArgumentEnd($tokens, $tokens->getNextMeaningfulToken($nextIndex));
+ }
+
+ return $index;
+ }
+
+ /**
+ * @param int $endIndex boundary, i.e. tokens index of `)`
+ */
+ private function getSecondArgumentEnd(Tokens $tokens, int $index, int $endIndex): ?int
+ {
+ if ($tokens[$index]->isGivenKind(T_ELLIPSIS)) {
+ return null;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ for (; $index <= $endIndex; ++$index) {
+ $blockType = Tokens::detectBlockType($tokens[$index]);
+
+ while (null !== $blockType && $blockType['isStart']) {
+ $index = $tokens->findBlockEnd($blockType['type'], $index);
+ $index = $tokens->getNextMeaningfulToken($index);
+ $blockType = Tokens::detectBlockType($tokens[$index]);
+ }
+
+ if ($tokens[$index]->equals(',') || $tokens[$index]->isGivenKind([T_YIELD, T_YIELD_FROM, T_LOGICAL_AND, T_LOGICAL_OR, T_LOGICAL_XOR])) {
+ return null;
+ }
+ }
+
+ return $endIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php
new file mode 100644
index 0000000..fb10b50
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/BacktickToShellExecFixer.php
@@ -0,0 +1,150 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class BacktickToShellExecFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('`');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts backtick operators to `shell_exec` calls.',
+ [
+ new CodeSample(
+ <<<'EOT'
+<?php
+$plain = `ls -lah`;
+$withVar = `ls -lah $var1 ${var2} {$var3} {$var4[0]} {$var5->call()}`;
+
+EOT
+ ),
+ ],
+ 'Conversion is done only when it is non risky, so when special chars like single-quotes, double-quotes and backticks are not used inside the command.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before EscapeImplicitBackslashesFixer, ExplicitStringVariableFixer, NativeFunctionInvocationFixer, SingleQuoteFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $backtickStarted = false;
+ $backtickTokens = [];
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ $token = $tokens[$index];
+ if (!$token->equals('`')) {
+ if ($backtickStarted) {
+ $backtickTokens[$index] = $token;
+ }
+
+ continue;
+ }
+
+ $backtickTokens[$index] = $token;
+ if ($backtickStarted) {
+ $this->fixBackticks($tokens, $backtickTokens);
+ $backtickTokens = [];
+ }
+ $backtickStarted = !$backtickStarted;
+ }
+ }
+
+ /**
+ * Override backtick code with corresponding double-quoted string.
+ *
+ * @param array<int, Token> $backtickTokens
+ */
+ private function fixBackticks(Tokens $tokens, array $backtickTokens): void
+ {
+ // Track indexes for final override
+ ksort($backtickTokens);
+ $openingBacktickIndex = key($backtickTokens);
+ end($backtickTokens);
+ $closingBacktickIndex = key($backtickTokens);
+
+ // Strip enclosing backticks
+ array_shift($backtickTokens);
+ array_pop($backtickTokens);
+
+ // Double-quoted strings are parsed differently if they contain
+ // variables or not, so we need to build the new token array accordingly
+ $count = \count($backtickTokens);
+
+ $newTokens = [
+ new Token([T_STRING, 'shell_exec']),
+ new Token('('),
+ ];
+ if (1 !== $count) {
+ $newTokens[] = new Token('"');
+ }
+ foreach ($backtickTokens as $token) {
+ if (!$token->isGivenKind(T_ENCAPSED_AND_WHITESPACE)) {
+ $newTokens[] = $token;
+
+ continue;
+ }
+ $content = $token->getContent();
+ // Escaping special chars depends on the context: too tricky
+ if (Preg::match('/[`"\']/u', $content)) {
+ return;
+ }
+
+ $kind = T_ENCAPSED_AND_WHITESPACE;
+ if (1 === $count) {
+ $content = '"'.$content.'"';
+ $kind = T_CONSTANT_ENCAPSED_STRING;
+ }
+
+ $newTokens[] = new Token([$kind, $content]);
+ }
+ if (1 !== $count) {
+ $newTokens[] = new Token('"');
+ }
+ $newTokens[] = new Token(')');
+
+ $tokens->overrideRange($openingBacktickIndex, $closingBacktickIndex, $newTokens);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php
new file mode 100644
index 0000000..5b592ef
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/EregToPregFixer.php
@@ -0,0 +1,185 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\PregException;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Matteo Beccati <matteo@beccati.com>
+ */
+final class EregToPregFixer extends AbstractFixer
+{
+ /**
+ * @var array the list of the ext/ereg function names, their preg equivalent and the preg modifier(s), if any
+ * all condensed in an array of arrays
+ */
+ private static $functions = [
+ ['ereg', 'preg_match', ''],
+ ['eregi', 'preg_match', 'i'],
+ ['ereg_replace', 'preg_replace', ''],
+ ['eregi_replace', 'preg_replace', 'i'],
+ ['split', 'preg_split', ''],
+ ['spliti', 'preg_split', 'i'],
+ ];
+
+ /**
+ * @var array the list of preg delimiters, in order of preference
+ */
+ private static $delimiters = ['/', '#', '!'];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace deprecated `ereg` regular expression functions with `preg`.',
+ [new CodeSample("<?php \$x = ereg('[A-Z]');\n")],
+ null,
+ 'Risky if the `ereg` function is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $end = $tokens->count() - 1;
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ foreach (self::$functions as $map) {
+ // the sequence is the function name, followed by "(" and a quoted string
+ $seq = [[T_STRING, $map[0]], '(', [T_CONSTANT_ENCAPSED_STRING]];
+ $currIndex = 0;
+
+ while (true) {
+ $match = $tokens->findSequence($seq, $currIndex, $end, false);
+
+ // did we find a match?
+ if (null === $match) {
+ break;
+ }
+
+ // findSequence also returns the tokens, but we're only interested in the indexes, i.e.:
+ // 0 => function name,
+ // 1 => bracket "("
+ // 2 => quoted string passed as 1st parameter
+ $match = array_keys($match);
+
+ // advance tokenizer cursor
+ $currIndex = $match[2];
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $match[0])) {
+ continue;
+ }
+
+ // ensure the first parameter is just a string (e.g. has nothing appended)
+ $next = $tokens->getNextMeaningfulToken($match[2]);
+
+ if (null === $next || !$tokens[$next]->equalsAny([',', ')'])) {
+ continue;
+ }
+
+ // convert to PCRE
+ $regexTokenContent = $tokens[$match[2]]->getContent();
+ $string = substr($regexTokenContent, 1, -1);
+ $quote = $regexTokenContent[0];
+ $delim = $this->getBestDelimiter($string);
+ $preg = $delim.addcslashes($string, $delim).$delim.'D'.$map[2];
+
+ // check if the preg is valid
+ if (!$this->checkPreg($preg)) {
+ continue;
+ }
+
+ // modify function and argument
+ $tokens[$match[0]] = new Token([T_STRING, $map[1]]);
+ $tokens[$match[2]] = new Token([T_CONSTANT_ENCAPSED_STRING, $quote.$preg.$quote]);
+ }
+ }
+ }
+
+ /**
+ * Check the validity of a PCRE.
+ *
+ * @param string $pattern the regular expression
+ */
+ private function checkPreg(string $pattern): bool
+ {
+ try {
+ Preg::match($pattern, '');
+
+ return true;
+ } catch (PregException $e) {
+ return false;
+ }
+ }
+
+ /**
+ * Get the delimiter that would require the least escaping in a regular expression.
+ *
+ * @param string $pattern the regular expression
+ *
+ * @return string the preg delimiter
+ */
+ private function getBestDelimiter(string $pattern): string
+ {
+ // try to find something that's not used
+ $delimiters = [];
+ foreach (self::$delimiters as $k => $d) {
+ if (!str_contains($pattern, $d)) {
+ return $d;
+ }
+
+ $delimiters[$d] = [substr_count($pattern, $d), $k];
+ }
+
+ // return the least used delimiter, using the position in the list as a tie breaker
+ uasort($delimiters, static function (array $a, array $b): int {
+ if ($a[0] === $b[0]) {
+ return $a[1] <=> $b[1];
+ }
+
+ return $a[0] <=> $b[0];
+ });
+
+ return key($delimiters);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/MbStrFunctionsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/MbStrFunctionsFixer.php
new file mode 100644
index 0000000..cfa8c48
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/MbStrFunctionsFixer.php
@@ -0,0 +1,125 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class MbStrFunctionsFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * @var array the list of the string-related function names and their mb_ equivalent
+ */
+ private static $functionsMap = [
+ 'str_split' => ['alternativeName' => 'mb_str_split', 'argumentCount' => [1, 2, 3]],
+ 'stripos' => ['alternativeName' => 'mb_stripos', 'argumentCount' => [2, 3]],
+ 'stristr' => ['alternativeName' => 'mb_stristr', 'argumentCount' => [2, 3]],
+ 'strlen' => ['alternativeName' => 'mb_strlen', 'argumentCount' => [1]],
+ 'strpos' => ['alternativeName' => 'mb_strpos', 'argumentCount' => [2, 3]],
+ 'strrchr' => ['alternativeName' => 'mb_strrchr', 'argumentCount' => [2]],
+ 'strripos' => ['alternativeName' => 'mb_strripos', 'argumentCount' => [2, 3]],
+ 'strrpos' => ['alternativeName' => 'mb_strrpos', 'argumentCount' => [2, 3]],
+ 'strstr' => ['alternativeName' => 'mb_strstr', 'argumentCount' => [2, 3]],
+ 'strtolower' => ['alternativeName' => 'mb_strtolower', 'argumentCount' => [1]],
+ 'strtoupper' => ['alternativeName' => 'mb_strtoupper', 'argumentCount' => [1]],
+ 'substr' => ['alternativeName' => 'mb_substr', 'argumentCount' => [2, 3]],
+ 'substr_count' => ['alternativeName' => 'mb_substr_count', 'argumentCount' => [2, 3, 4]],
+ ];
+
+ /**
+ * @var array<string, array>
+ */
+ private $functions;
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->functions = array_filter(
+ self::$functionsMap,
+ static function (array $mapping): bool {
+ return \function_exists($mapping['alternativeName']) && (new \ReflectionFunction($mapping['alternativeName']))->isInternal();
+ }
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace non multibyte-safe functions with corresponding mb function.',
+ [
+ new CodeSample(
+ '<?php
+$a = strlen($a);
+$a = strpos($a, $b);
+$a = strrpos($a, $b);
+$a = substr($a, $b);
+$a = strtolower($a);
+$a = strtoupper($a);
+$a = stripos($a, $b);
+$a = strripos($a, $b);
+$a = strstr($a, $b);
+$a = stristr($a, $b);
+$a = strrchr($a, $b);
+$a = substr_count($a, $b);
+'
+ ),
+ ],
+ null,
+ 'Risky when any of the functions are overridden, or when relying on the string byte size rather than its length in characters.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+ foreach ($this->functions as $functionIdentity => $functionReplacement) {
+ $currIndex = 0;
+ do {
+ // try getting function reference and translate boundaries for humans
+ $boundaries = $this->find($functionIdentity, $tokens, $currIndex, $tokens->count() - 1);
+ if (null === $boundaries) {
+ // next function search, as current one not found
+ continue 2;
+ }
+
+ [$functionName, $openParenthesis, $closeParenthesis] = $boundaries;
+ $count = $argumentsAnalyzer->countArguments($tokens, $openParenthesis, $closeParenthesis);
+ if (!\in_array($count, $functionReplacement['argumentCount'], true)) {
+ continue 2;
+ }
+
+ // analysing cursor shift, so nested calls could be processed
+ $currIndex = $openParenthesis;
+
+ $tokens[$functionName] = new Token([T_STRING, $functionReplacement['alternativeName']]);
+ } while (null !== $currIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ModernizeStrposFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ModernizeStrposFixer.php
new file mode 100644
index 0000000..1fddad2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/ModernizeStrposFixer.php
@@ -0,0 +1,217 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Alexander M. Turek <me@derrabus.de>
+ */
+final class ModernizeStrposFixer extends AbstractFixer
+{
+ private const REPLACEMENTS = [
+ [
+ 'operator' => [T_IS_IDENTICAL, '==='],
+ 'operand' => [T_LNUMBER, '0'],
+ 'replacement' => [T_STRING, 'str_starts_with'],
+ 'negate' => false,
+ ],
+ [
+ 'operator' => [T_IS_NOT_IDENTICAL, '!=='],
+ 'operand' => [T_LNUMBER, '0'],
+ 'replacement' => [T_STRING, 'str_starts_with'],
+ 'negate' => true,
+ ],
+ [
+ 'operator' => [T_IS_NOT_IDENTICAL, '!=='],
+ 'operand' => [T_STRING, 'false'],
+ 'replacement' => [T_STRING, 'str_contains'],
+ 'negate' => false,
+ ],
+ [
+ 'operator' => [T_IS_IDENTICAL, '==='],
+ 'operand' => [T_STRING, 'false'],
+ 'replacement' => [T_STRING, 'str_contains'],
+ 'negate' => true,
+ ],
+ ];
+
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace `strpos()` calls with `str_starts_with()` or `str_contains()` if possible.',
+ [
+ new CodeSample(
+ '<?php
+if (strpos($haystack, $needle) === 0) {}
+if (strpos($haystack, $needle) !== 0) {}
+if (strpos($haystack, $needle) !== false) {}
+if (strpos($haystack, $needle) === false) {}
+'
+ ),
+ ],
+ null,
+ 'Risky if `strpos`, `str_starts_with` or `str_contains` functions are overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer, NoExtraBlankLinesFixer, NoSpacesInsideParenthesisFixer, NoTrailingWhitespaceFixer, NotOperatorWithSpaceFixer, NotOperatorWithSuccessorSpaceFixer, PhpUnitDedicateAssertFixer, SingleSpaceAfterConstructFixer.
+ */
+ public function getPriority(): int
+ {
+ return 37;
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING) && $tokens->isAnyTokenKindsFound([T_IS_IDENTICAL, T_IS_NOT_IDENTICAL]);
+ }
+
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ for ($index = \count($tokens) - 1; $index > 0; --$index) {
+ // find candidate function call
+ if (!$tokens[$index]->equals([T_STRING, 'strpos'], false) || !$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ // assert called with 2 arguments
+ $openIndex = $tokens->getNextMeaningfulToken($index);
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $openIndex, $closeIndex);
+
+ if (2 !== \count($arguments)) {
+ continue;
+ }
+
+ // check if part condition and fix if needed
+ $compareTokens = $this->getCompareTokens($tokens, $index, -1); // look behind
+
+ if (null === $compareTokens) {
+ $compareTokens = $this->getCompareTokens($tokens, $closeIndex, 1); // look ahead
+ }
+
+ if (null !== $compareTokens) {
+ $this->fixCall($tokens, $index, $compareTokens);
+ }
+ }
+ }
+
+ private function fixCall(Tokens $tokens, int $functionIndex, array $operatorIndexes): void
+ {
+ foreach (self::REPLACEMENTS as $replacement) {
+ if (!$tokens[$operatorIndexes['operator_index']]->equals($replacement['operator'])) {
+ continue;
+ }
+
+ if (!$tokens[$operatorIndexes['operand_index']]->equals($replacement['operand'], false)) {
+ continue;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($operatorIndexes['operator_index']);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($operatorIndexes['operand_index']);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($functionIndex);
+
+ if ($replacement['negate']) {
+ $tokens->insertAt($functionIndex, new Token('!'));
+ ++$functionIndex;
+ }
+
+ $tokens->insertAt($functionIndex, new Token($replacement['replacement']));
+
+ break;
+ }
+ }
+
+ private function getCompareTokens(Tokens $tokens, int $offsetIndex, int $direction): ?array
+ {
+ $operatorIndex = $tokens->getMeaningfulTokenSibling($offsetIndex, $direction);
+
+ if (null === $operatorIndex) {
+ return null;
+ }
+
+ $operandIndex = $tokens->getMeaningfulTokenSibling($operatorIndex, $direction);
+
+ if (null === $operandIndex) {
+ return null;
+ }
+
+ $operand = $tokens[$operandIndex];
+
+ if (!$operand->equals([T_LNUMBER, '0']) && !$operand->equals([T_STRING, 'false'], false)) {
+ return null;
+ }
+
+ if (!$tokens[$operatorIndex]->isGivenKind([T_IS_IDENTICAL, T_IS_NOT_IDENTICAL])) {
+ return null;
+ }
+
+ $precedenceTokenIndex = $tokens->getMeaningfulTokenSibling($operandIndex, $direction);
+
+ if (null !== $precedenceTokenIndex && $this->isOfHigherPrecedence($tokens[$precedenceTokenIndex])) {
+ return null;
+ }
+
+ return ['operator_index' => $operatorIndex, 'operand_index' => $operandIndex];
+ }
+
+ private function isOfHigherPrecedence(Token $token): bool
+ {
+ static $operatorsKinds = [
+ T_DEC, // --
+ T_INC, // ++
+ T_INSTANCEOF, // instanceof
+ T_IS_GREATER_OR_EQUAL, // >=
+ T_IS_SMALLER_OR_EQUAL, // <=
+ T_POW, // **
+ T_SL, // <<
+ T_SR, // >>
+ ];
+
+ static $operatorsPerContent = [
+ '!',
+ '%',
+ '*',
+ '+',
+ '-',
+ '.',
+ '/',
+ '<',
+ '>',
+ '~',
+ ];
+
+ return $token->isGivenKind($operatorsKinds) || $token->equalsAny($operatorsPerContent);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
new file mode 100644
index 0000000..d67e778
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasFunctionsFixer.php
@@ -0,0 +1,333 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoAliasFunctionsFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ private const SETS = [
+ '@internal' => [
+ 'diskfreespace' => 'disk_free_space',
+
+ 'dns_check_record' => 'checkdnsrr',
+ 'dns_get_mx' => 'getmxrr',
+
+ 'session_commit' => 'session_write_close',
+
+ 'stream_register_wrapper' => 'stream_wrapper_register',
+ 'set_file_buffer' => 'stream_set_write_buffer',
+ 'socket_set_blocking' => 'stream_set_blocking',
+ 'socket_get_status' => 'stream_get_meta_data',
+ 'socket_set_timeout' => 'stream_set_timeout',
+ 'socket_getopt' => 'socket_get_option',
+ 'socket_setopt' => 'socket_set_option',
+
+ 'chop' => 'rtrim',
+ 'close' => 'closedir',
+ 'doubleval' => 'floatval',
+ 'fputs' => 'fwrite',
+ 'get_required_files' => 'get_included_files',
+ 'ini_alter' => 'ini_set',
+ 'is_double' => 'is_float',
+ 'is_integer' => 'is_int',
+ 'is_long' => 'is_int',
+ 'is_real' => 'is_float',
+ 'is_writeable' => 'is_writable',
+ 'join' => 'implode',
+ 'key_exists' => 'array_key_exists',
+ 'magic_quotes_runtime' => 'set_magic_quotes_runtime',
+ 'pos' => 'current',
+ 'show_source' => 'highlight_file',
+ 'sizeof' => 'count',
+ 'strchr' => 'strstr',
+ 'user_error' => 'trigger_error',
+ ],
+
+ '@IMAP' => [
+ 'imap_create' => 'imap_createmailbox',
+ 'imap_fetchtext' => 'imap_body',
+ 'imap_header' => 'imap_headerinfo',
+ 'imap_listmailbox' => 'imap_list',
+ 'imap_listsubscribed' => 'imap_lsub',
+ 'imap_rename' => 'imap_renamemailbox',
+ 'imap_scan' => 'imap_listscan',
+ 'imap_scanmailbox' => 'imap_listscan',
+ ],
+
+ '@ldap' => [
+ 'ldap_close' => 'ldap_unbind',
+ 'ldap_modify' => 'ldap_mod_replace',
+ ],
+
+ '@mysqli' => [
+ 'mysqli_execute' => 'mysqli_stmt_execute',
+ 'mysqli_set_opt' => 'mysqli_options',
+ 'mysqli_escape_string' => 'mysqli_real_escape_string',
+ ],
+
+ '@pg' => [
+ 'pg_exec' => 'pg_query',
+ ],
+
+ '@oci' => [
+ 'oci_free_cursor' => 'oci_free_statement',
+ ],
+
+ '@odbc' => [
+ 'odbc_do' => 'odbc_exec',
+ 'odbc_field_precision' => 'odbc_field_len',
+ ],
+
+ '@mbreg' => [
+ 'mbereg' => 'mb_ereg',
+ 'mbereg_match' => 'mb_ereg_match',
+ 'mbereg_replace' => 'mb_ereg_replace',
+ 'mbereg_search' => 'mb_ereg_search',
+ 'mbereg_search_getpos' => 'mb_ereg_search_getpos',
+ 'mbereg_search_getregs' => 'mb_ereg_search_getregs',
+ 'mbereg_search_init' => 'mb_ereg_search_init',
+ 'mbereg_search_pos' => 'mb_ereg_search_pos',
+ 'mbereg_search_regs' => 'mb_ereg_search_regs',
+ 'mbereg_search_setpos' => 'mb_ereg_search_setpos',
+ 'mberegi' => 'mb_eregi',
+ 'mberegi_replace' => 'mb_eregi_replace',
+ 'mbregex_encoding' => 'mb_regex_encoding',
+ 'mbsplit' => 'mb_split',
+ ],
+
+ '@openssl' => [
+ 'openssl_get_publickey' => 'openssl_pkey_get_public',
+ 'openssl_get_privatekey' => 'openssl_pkey_get_private',
+ ],
+
+ '@sodium' => [
+ 'sodium_crypto_scalarmult_base' => 'sodium_crypto_box_publickey_from_secretkey',
+ ],
+
+ '@exif' => [
+ 'read_exif_data' => 'exif_read_data',
+ ],
+
+ '@ftp' => [
+ 'ftp_quit' => 'ftp_close',
+ ],
+
+ '@posix' => [
+ 'posix_errno' => 'posix_get_last_error',
+ ],
+
+ '@pcntl' => [
+ 'pcntl_errno' => 'pcntl_get_last_error',
+ ],
+
+ '@time' => [
+ 'mktime' => ['time', 0],
+ 'gmmktime' => ['time', 0],
+ ],
+ ];
+
+ /** @var array<string, array<int|string>|string> stores alias (key) - master (value) functions mapping */
+ private $aliases = [];
+
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->aliases = [];
+
+ foreach ($this->configuration['sets'] as $set) {
+ if ('@all' === $set) {
+ $this->aliases = array_merge(...array_values(self::SETS));
+
+ break;
+ }
+
+ $this->aliases = array_merge($this->aliases, self::SETS[$set]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Master functions shall be used instead of aliases.',
+ [
+ new CodeSample(
+ '<?php
+$a = chop($b);
+close($b);
+$a = doubleval($b);
+$a = fputs($b, $c);
+$a = get_required_files();
+ini_alter($b, $c);
+$a = is_double($b);
+$a = is_integer($b);
+$a = is_long($b);
+$a = is_real($b);
+$a = is_writeable($b);
+$a = join($glue, $pieces);
+$a = key_exists($key, $array);
+magic_quotes_runtime($new_setting);
+$a = pos($array);
+$a = show_source($filename, true);
+$a = sizeof($b);
+$a = strchr($haystack, $needle);
+$a = imap_header($imap_stream, 1);
+user_error($message);
+mbereg_search_getregs();
+'
+ ),
+ new CodeSample(
+ '<?php
+$a = is_double($b);
+mbereg_search_getregs();
+',
+ ['sets' => ['@mbreg']]
+ ),
+ ],
+ null,
+ 'Risky when any of the alias functions are overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ImplodeCallFixer, PhpUnitDedicateAssertFixer.
+ */
+ public function getPriority(): int
+ {
+ return 40;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ /** @var Token $token */
+ foreach ($tokens->findGivenKind(T_STRING) as $index => $token) {
+ // check mapping hit
+ $tokenContent = strtolower($token->getContent());
+
+ if (!isset($this->aliases[$tokenContent])) {
+ continue;
+ }
+
+ // skip expressions without parameters list
+ $openParenthesis = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$openParenthesis]->equals('(')) {
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ if (\is_array($this->aliases[$tokenContent])) {
+ [$alias, $numberOfArguments] = $this->aliases[$tokenContent];
+
+ $count = $argumentsAnalyzer->countArguments($tokens, $openParenthesis, $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openParenthesis));
+
+ if ($numberOfArguments !== $count) {
+ continue;
+ }
+ } else {
+ $alias = $this->aliases[$tokenContent];
+ }
+
+ $tokens[$index] = new Token([T_STRING, $alias]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $sets = [
+ '@all' => 'all listed sets',
+ '@internal' => 'native functions',
+ '@exif' => 'EXIF functions',
+ '@ftp' => 'FTP functions',
+ '@IMAP' => 'IMAP functions',
+ '@ldap' => 'LDAP functions',
+ '@mbreg' => 'from `ext-mbstring`',
+ '@mysqli' => 'mysqli functions',
+ '@oci' => 'oci functions',
+ '@odbc' => 'odbc functions',
+ '@openssl' => 'openssl functions',
+ '@pcntl' => 'PCNTL functions',
+ '@pg' => 'pg functions',
+ '@posix' => 'POSIX functions',
+ '@snmp' => 'SNMP functions', // @TODO Remove on next major 4.0 as this set is now empty
+ '@sodium' => 'libsodium functions',
+ '@time' => 'time functions',
+ ];
+
+ $list = "List of sets to fix. Defined sets are:\n\n";
+
+ foreach ($sets as $set => $description) {
+ $list .= sprintf("* `%s` (%s)\n", $set, $description);
+ }
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('sets', $list))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(array_keys($sets))])
+ ->setDefault(['@internal', '@IMAP', '@pg'])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasLanguageConstructCallFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasLanguageConstructCallFixer.php
new file mode 100644
index 0000000..357fa22
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoAliasLanguageConstructCallFixer.php
@@ -0,0 +1,68 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoAliasLanguageConstructCallFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Master language constructs shall be used instead of aliases.',
+ [
+ new CodeSample(
+ '<?php
+die;
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_EXIT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_EXIT)) {
+ continue;
+ }
+
+ if ('exit' === strtolower($token->getContent())) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([T_EXIT, 'exit']);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php
new file mode 100644
index 0000000..4678241
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/NoMixedEchoPrintFixer.php
@@ -0,0 +1,154 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Sullivan Senechal <soullivaneuh@gmail.com>
+ */
+final class NoMixedEchoPrintFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var string
+ */
+ private $callBack;
+
+ /**
+ * @var int T_ECHO or T_PRINT
+ */
+ private $candidateTokenType;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if ('echo' === $this->configuration['use']) {
+ $this->candidateTokenType = T_PRINT;
+ $this->callBack = 'fixPrintToEcho';
+ } else {
+ $this->candidateTokenType = T_ECHO;
+ $this->callBack = 'fixEchoToPrint';
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Either language construct `print` or `echo` should be used.',
+ [
+ new CodeSample("<?php print 'example';\n"),
+ new CodeSample("<?php echo('example');\n", ['use' => 'print']),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after EchoTagSyntaxFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound($this->candidateTokenType);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $callBack = $this->callBack;
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind($this->candidateTokenType)) {
+ $this->{$callBack}($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('use', 'The desired language construct.'))
+ ->setAllowedValues(['print', 'echo'])
+ ->setDefault('echo')
+ ->getOption(),
+ ]);
+ }
+
+ private function fixEchoToPrint(Tokens $tokens, int $index): void
+ {
+ $nextTokenIndex = $tokens->getNextMeaningfulToken($index);
+ $endTokenIndex = $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]);
+ $canBeConverted = true;
+
+ for ($i = $nextTokenIndex; $i < $endTokenIndex; ++$i) {
+ if ($tokens[$i]->equalsAny(['(', [CT::T_ARRAY_SQUARE_BRACE_OPEN]])) {
+ $blockType = Tokens::detectBlockType($tokens[$i]);
+ $i = $tokens->findBlockEnd($blockType['type'], $i);
+ }
+
+ if ($tokens[$i]->equals(',')) {
+ $canBeConverted = false;
+
+ break;
+ }
+ }
+
+ if (false === $canBeConverted) {
+ return;
+ }
+
+ $tokens[$index] = new Token([T_PRINT, 'print']);
+ }
+
+ private function fixPrintToEcho(Tokens $tokens, int $index): void
+ {
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+
+ if (!$prevToken->equalsAny([';', '{', '}', ')', [T_OPEN_TAG], [T_ELSE]])) {
+ return;
+ }
+
+ $tokens[$index] = new Token([T_ECHO, 'echo']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/PowToExponentiationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/PowToExponentiationFixer.php
new file mode 100644
index 0000000..44f35a0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/PowToExponentiationFixer.php
@@ -0,0 +1,230 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class PowToExponentiationFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ // minimal candidate to fix is seven tokens: pow(x,y);
+ return $tokens->count() > 7 && $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts `pow` to the `**` operator.',
+ [
+ new CodeSample(
+ "<?php\n pow(\$a, 1);\n"
+ ),
+ ],
+ null,
+ 'Risky when the function `pow` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer, MethodArgumentSpaceFixer, NativeFunctionCasingFixer, NoSpacesAfterFunctionNameFixer, NoSpacesInsideParenthesisFixer.
+ */
+ public function getPriority(): int
+ {
+ return 32;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $candidates = $this->findPowCalls($tokens);
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+ $numberOfTokensAdded = 0;
+ $previousCloseParenthesisIndex = \count($tokens);
+
+ foreach (array_reverse($candidates) as $candidate) {
+ // if in the previous iteration(s) tokens were added to the collection and this is done within the tokens
+ // indexes of the current candidate than the index of the close ')' of the candidate has moved and so
+ // the index needs to be updated
+ if ($previousCloseParenthesisIndex < $candidate[2]) {
+ $previousCloseParenthesisIndex = $candidate[2];
+ $candidate[2] += $numberOfTokensAdded;
+ } else {
+ $previousCloseParenthesisIndex = $candidate[2];
+ $numberOfTokensAdded = 0;
+ }
+
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $candidate[1], $candidate[2]);
+
+ if (2 !== \count($arguments)) {
+ continue;
+ }
+
+ for ($i = $candidate[1]; $i < $candidate[2]; ++$i) {
+ if ($tokens[$i]->isGivenKind(T_ELLIPSIS)) {
+ continue 2;
+ }
+ }
+
+ $numberOfTokensAdded += $this->fixPowToExponentiation(
+ $tokens,
+ $candidate[0], // functionNameIndex,
+ $candidate[1], // openParenthesisIndex,
+ $candidate[2], // closeParenthesisIndex,
+ $arguments
+ );
+ }
+ }
+
+ /**
+ * @return array<int[]>
+ */
+ private function findPowCalls(Tokens $tokens): array
+ {
+ $candidates = [];
+
+ // Minimal candidate to fix is seven tokens: pow(x,y);
+ $end = \count($tokens) - 6;
+
+ // First possible location is after the open token: 1
+ for ($i = 1; $i < $end; ++$i) {
+ $candidate = $this->find('pow', $tokens, $i, $end);
+
+ if (null === $candidate) {
+ break;
+ }
+
+ $i = $candidate[1]; // proceed to openParenthesisIndex
+ $candidates[] = $candidate;
+ }
+
+ return $candidates;
+ }
+
+ /**
+ * @param array<int, int> $arguments
+ *
+ * @return int number of tokens added to the collection
+ */
+ private function fixPowToExponentiation(Tokens $tokens, int $functionNameIndex, int $openParenthesisIndex, int $closeParenthesisIndex, array $arguments): int
+ {
+ // find the argument separator ',' directly after the last token of the first argument;
+ // replace it with T_POW '**'
+ $tokens[$tokens->getNextTokenOfKind(reset($arguments), [','])] = new Token([T_POW, '**']);
+
+ // clean up the function call tokens prt. I
+ $tokens->clearAt($closeParenthesisIndex);
+ $previousIndex = $tokens->getPrevMeaningfulToken($closeParenthesisIndex);
+
+ if ($tokens[$previousIndex]->equals(',')) {
+ $tokens->clearAt($previousIndex); // trailing ',' in function call (PHP 7.3)
+ }
+
+ $added = 0;
+
+ // check if the arguments need to be wrapped in parenthesis
+ foreach (array_reverse($arguments, true) as $argumentStartIndex => $argumentEndIndex) {
+ if ($this->isParenthesisNeeded($tokens, $argumentStartIndex, $argumentEndIndex)) {
+ $tokens->insertAt($argumentEndIndex + 1, new Token(')'));
+ $tokens->insertAt($argumentStartIndex, new Token('('));
+ $added += 2;
+ }
+ }
+
+ // clean up the function call tokens prt. II
+ $tokens->clearAt($openParenthesisIndex);
+ $tokens->clearAt($functionNameIndex);
+
+ $prevMeaningfulTokenIndex = $tokens->getPrevMeaningfulToken($functionNameIndex);
+
+ if ($tokens[$prevMeaningfulTokenIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->clearAt($prevMeaningfulTokenIndex);
+ }
+
+ return $added;
+ }
+
+ private function isParenthesisNeeded(Tokens $tokens, int $argumentStartIndex, int $argumentEndIndex): bool
+ {
+ static $allowedKinds = null;
+
+ if (null === $allowedKinds) {
+ $allowedKinds = $this->getAllowedKinds();
+ }
+
+ for ($i = $argumentStartIndex; $i <= $argumentEndIndex; ++$i) {
+ if ($tokens[$i]->isGivenKind($allowedKinds) || $tokens->isEmptyAt($i)) {
+ continue;
+ }
+
+ $blockType = Tokens::detectBlockType($tokens[$i]);
+
+ if (null !== $blockType) {
+ $i = $tokens->findBlockEnd($blockType['type'], $i);
+
+ continue;
+ }
+
+ if ($tokens[$i]->equals('$')) {
+ $i = $tokens->getNextMeaningfulToken($i);
+ if ($tokens[$i]->isGivenKind(CT::T_DYNAMIC_VAR_BRACE_OPEN)) {
+ $i = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_DYNAMIC_VAR_BRACE, $i);
+
+ continue;
+ }
+ }
+
+ if ($tokens[$i]->equals('+') && $tokens->getPrevMeaningfulToken($i) < $argumentStartIndex) {
+ continue;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @return int[]
+ */
+ private function getAllowedKinds(): array
+ {
+ return array_merge(
+ [
+ T_DNUMBER, T_LNUMBER, T_VARIABLE, T_STRING, T_CONSTANT_ENCAPSED_STRING, T_DOUBLE_CAST,
+ T_INT_CAST, T_INC, T_DEC, T_NS_SEPARATOR, T_WHITESPACE, T_DOUBLE_COLON, T_LINE, T_COMMENT, T_DOC_COMMENT,
+ CT::T_NAMESPACE_OPERATOR,
+ ],
+ Token::getObjectOperatorKinds()
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
new file mode 100644
index 0000000..282d878
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/RandomApiMigrationFixer.php
@@ -0,0 +1,170 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ */
+final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array
+ */
+ private static $argumentCounts = [
+ 'getrandmax' => [0],
+ 'mt_rand' => [1, 2],
+ 'rand' => [0, 2],
+ 'srand' => [0, 1],
+ 'random_int' => [0, 2],
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ foreach ($this->configuration['replacements'] as $functionName => $replacement) {
+ $this->configuration['replacements'][$functionName] = [
+ 'alternativeName' => $replacement,
+ 'argumentCount' => self::$argumentCounts[$functionName],
+ ];
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replaces `rand`, `srand`, `getrandmax` functions calls with their `mt_*` analogs or `random_int`.',
+ [
+ new CodeSample("<?php\n\$a = getrandmax();\n\$a = rand(\$b, \$c);\n\$a = srand();\n"),
+ new CodeSample(
+ "<?php\n\$a = getrandmax();\n\$a = rand(\$b, \$c);\n\$a = srand();\n",
+ ['replacements' => ['getrandmax' => 'mt_getrandmax']]
+ ),
+ new CodeSample(
+ "<?php \$a = rand(\$b, \$c);\n",
+ ['replacements' => ['rand' => 'random_int']]
+ ),
+ ],
+ null,
+ 'Risky when the configured functions are overridden. Or when relying on the seed based generating of the numbers.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ foreach ($this->configuration['replacements'] as $functionIdentity => $functionReplacement) {
+ if ($functionIdentity === $functionReplacement['alternativeName']) {
+ continue;
+ }
+
+ $currIndex = 0;
+
+ do {
+ // try getting function reference and translate boundaries for humans
+ $boundaries = $this->find($functionIdentity, $tokens, $currIndex, $tokens->count() - 1);
+
+ if (null === $boundaries) {
+ // next function search, as current one not found
+ continue 2;
+ }
+
+ [$functionName, $openParenthesis, $closeParenthesis] = $boundaries;
+ $count = $argumentsAnalyzer->countArguments($tokens, $openParenthesis, $closeParenthesis);
+
+ if (!\in_array($count, $functionReplacement['argumentCount'], true)) {
+ continue 2;
+ }
+
+ // analysing cursor shift, so nested calls could be processed
+ $currIndex = $openParenthesis;
+ $tokens[$functionName] = new Token([T_STRING, $functionReplacement['alternativeName']]);
+
+ if (0 === $count && 'random_int' === $functionReplacement['alternativeName']) {
+ $tokens->insertAt($currIndex + 1, [
+ new Token([T_LNUMBER, '0']),
+ new Token(','),
+ new Token([T_WHITESPACE, ' ']),
+ new Token([T_STRING, 'getrandmax']),
+ new Token('('),
+ new Token(')'),
+ ]);
+
+ $currIndex += 6;
+ }
+ } while (null !== $currIndex);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('replacements', 'Mapping between replaced functions with the new ones.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $value): bool {
+ foreach ($value as $functionName => $replacement) {
+ if (!\array_key_exists($functionName, self::$argumentCounts)) {
+ throw new InvalidOptionsException(sprintf(
+ 'Function "%s" is not handled by the fixer.',
+ $functionName
+ ));
+ }
+
+ if (!\is_string($replacement)) {
+ throw new InvalidOptionsException(sprintf(
+ 'Replacement for function "%s" must be a string, "%s" given.',
+ $functionName,
+ \is_object($replacement) ? \get_class($replacement) : \gettype($replacement)
+ ));
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([
+ 'getrandmax' => 'mt_getrandmax',
+ 'rand' => 'mt_rand', // @TODO change to `random_int` as default on 4.0
+ 'srand' => 'mt_srand',
+ ])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php
new file mode 100644
index 0000000..5ecc2bd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Alias/SetTypeToCastFixer.php
@@ -0,0 +1,236 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Alias;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class SetTypeToCastFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Cast shall be used, not `settype`.',
+ [
+ new CodeSample(
+ '<?php
+settype($foo, "integer");
+settype($bar, "string");
+settype($bar, "null");
+'
+ ),
+ ],
+ null,
+ 'Risky when the `settype` function is overridden or when used as the 2nd or 3rd expression in a `for` loop .'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CONSTANT_ENCAPSED_STRING, T_STRING, T_VARIABLE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $map = [
+ 'array' => [T_ARRAY_CAST, '(array)'],
+ 'bool' => [T_BOOL_CAST, '(bool)'],
+ 'boolean' => [T_BOOL_CAST, '(bool)'],
+ 'double' => [T_DOUBLE_CAST, '(float)'],
+ 'float' => [T_DOUBLE_CAST, '(float)'],
+ 'int' => [T_INT_CAST, '(int)'],
+ 'integer' => [T_INT_CAST, '(int)'],
+ 'object' => [T_OBJECT_CAST, '(object)'],
+ 'string' => [T_STRING_CAST, '(string)'],
+ // note: `'null' is dealt with later on
+ ];
+
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ foreach (array_reverse($this->findSettypeCalls($tokens)) as $candidate) {
+ $functionNameIndex = $candidate[0];
+
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $candidate[1], $candidate[2]);
+ if (2 !== \count($arguments)) {
+ continue; // function must be overridden or used incorrectly
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($functionNameIndex);
+
+ if (!$tokens[$prev]->equalsAny([';', '{', '}', [T_OPEN_TAG]])) {
+ continue; // return value of the function is used
+ }
+
+ reset($arguments);
+
+ // --- Test first argument --------------------
+
+ $firstArgumentStart = key($arguments);
+ if ($tokens[$firstArgumentStart]->isComment() || $tokens[$firstArgumentStart]->isWhitespace()) {
+ $firstArgumentStart = $tokens->getNextMeaningfulToken($firstArgumentStart);
+ }
+
+ if (!$tokens[$firstArgumentStart]->isGivenKind(T_VARIABLE)) {
+ continue; // settype only works with variables pass by reference, function must be overridden
+ }
+
+ $commaIndex = $tokens->getNextMeaningfulToken($firstArgumentStart);
+
+ if (null === $commaIndex || !$tokens[$commaIndex]->equals(',')) {
+ continue; // first argument is complex statement; function must be overridden
+ }
+
+ // --- Test second argument -------------------
+
+ next($arguments);
+ $secondArgumentStart = key($arguments);
+ $secondArgumentEnd = $arguments[$secondArgumentStart];
+
+ if ($tokens[$secondArgumentStart]->isComment() || $tokens[$secondArgumentStart]->isWhitespace()) {
+ $secondArgumentStart = $tokens->getNextMeaningfulToken($secondArgumentStart);
+ }
+
+ if (
+ !$tokens[$secondArgumentStart]->isGivenKind(T_CONSTANT_ENCAPSED_STRING)
+ || $tokens->getNextMeaningfulToken($secondArgumentStart) < $secondArgumentEnd
+ ) {
+ continue; // second argument is of the wrong type or is a (complex) statement of some sort (function is overridden)
+ }
+
+ // --- Test type ------------------------------
+
+ $type = strtolower(trim($tokens[$secondArgumentStart]->getContent(), '"\'"'));
+
+ if ('null' !== $type && !isset($map[$type])) {
+ continue; // we don't know how to map
+ }
+
+ // --- Fixing ---------------------------------
+
+ $argumentToken = $tokens[$firstArgumentStart];
+
+ $this->removeSettypeCall(
+ $tokens,
+ $functionNameIndex,
+ $candidate[1],
+ $firstArgumentStart,
+ $commaIndex,
+ $secondArgumentStart,
+ $candidate[2]
+ );
+
+ if ('null' === $type) {
+ $this->findSettypeNullCall($tokens, $functionNameIndex, $argumentToken);
+ } else {
+ $this->fixSettypeCall($tokens, $functionNameIndex, $argumentToken, new Token($map[$type]));
+ }
+ }
+ }
+
+ private function findSettypeCalls(Tokens $tokens): array
+ {
+ $candidates = [];
+
+ $end = \count($tokens);
+ for ($i = 1; $i < $end; ++$i) {
+ $candidate = $this->find('settype', $tokens, $i, $end);
+ if (null === $candidate) {
+ break;
+ }
+
+ $i = $candidate[1]; // proceed to openParenthesisIndex
+ $candidates[] = $candidate;
+ }
+
+ return $candidates;
+ }
+
+ private function removeSettypeCall(
+ Tokens $tokens,
+ int $functionNameIndex,
+ int $openParenthesisIndex,
+ int $firstArgumentStart,
+ int $commaIndex,
+ int $secondArgumentStart,
+ int $closeParenthesisIndex
+ ): void {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeParenthesisIndex);
+ $prevIndex = $tokens->getPrevMeaningfulToken($closeParenthesisIndex);
+ if ($tokens[$prevIndex]->equals(',')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevIndex);
+ }
+ $tokens->clearTokenAndMergeSurroundingWhitespace($secondArgumentStart);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($commaIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($firstArgumentStart);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openParenthesisIndex);
+ $tokens->clearAt($functionNameIndex); // we'll be inserting here so no need to merge the space tokens
+ $tokens->clearEmptyTokens();
+ }
+
+ private function fixSettypeCall(
+ Tokens $tokens,
+ int $functionNameIndex,
+ Token $argumentToken,
+ Token $castToken
+ ): void {
+ $tokens->insertAt(
+ $functionNameIndex,
+ [
+ clone $argumentToken,
+ new Token([T_WHITESPACE, ' ']),
+ new Token('='),
+ new Token([T_WHITESPACE, ' ']),
+ $castToken,
+ new Token([T_WHITESPACE, ' ']),
+ clone $argumentToken,
+ ]
+ );
+
+ $tokens->removeTrailingWhitespace($functionNameIndex + 6); // 6 = number of inserted tokens -1 for offset correction
+ }
+
+ private function findSettypeNullCall(
+ Tokens $tokens,
+ int $functionNameIndex,
+ Token $argumentToken
+ ): void {
+ $tokens->insertAt(
+ $functionNameIndex,
+ [
+ clone $argumentToken,
+ new Token([T_WHITESPACE, ' ']),
+ new Token('='),
+ new Token([T_WHITESPACE, ' ']),
+ new Token([T_STRING, 'null']),
+ ]
+ );
+
+ $tokens->removeTrailingWhitespace($functionNameIndex + 4); // 4 = number of inserted tokens -1 for offset correction
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php
new file mode 100644
index 0000000..c3d070d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/ArraySyntaxFixer.php
@@ -0,0 +1,150 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ * @author Sebastiaan Stok <s.stok@rollerscapes.net>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class ArraySyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var null|int
+ */
+ private $candidateTokenKind;
+
+ /**
+ * @var null|string
+ */
+ private $fixCallback;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->resolveCandidateTokenKind();
+ $this->resolveFixCallback();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHP arrays should be declared using the configured syntax.',
+ [
+ new CodeSample(
+ "<?php\narray(1,2);\n"
+ ),
+ new CodeSample(
+ "<?php\n[1,2];\n",
+ ['syntax' => 'long']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer, TernaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound($this->candidateTokenKind);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $callback = $this->fixCallback;
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ if ($tokens[$index]->isGivenKind($this->candidateTokenKind)) {
+ $this->{$callback}($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('syntax', 'Whether to use the `long` or `short` array syntax.'))
+ ->setAllowedValues(['long', 'short'])
+ ->setDefault('short')
+ ->getOption(),
+ ]);
+ }
+
+ private function fixToLongArraySyntax(Tokens $tokens, int $index): void
+ {
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $index);
+
+ $tokens[$index] = new Token('(');
+ $tokens[$closeIndex] = new Token(')');
+
+ $tokens->insertAt($index, new Token([T_ARRAY, 'array']));
+ }
+
+ private function fixToShortArraySyntax(Tokens $tokens, int $index): void
+ {
+ $openIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+
+ $tokens[$openIndex] = new Token([CT::T_ARRAY_SQUARE_BRACE_OPEN, '[']);
+ $tokens[$closeIndex] = new Token([CT::T_ARRAY_SQUARE_BRACE_CLOSE, ']']);
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+
+ private function resolveFixCallback(): void
+ {
+ $this->fixCallback = sprintf('fixTo%sArraySyntax', ucfirst($this->configuration['syntax']));
+ }
+
+ private function resolveCandidateTokenKind(): void
+ {
+ $this->candidateTokenKind = 'long' === $this->configuration['syntax'] ? CT::T_ARRAY_SQUARE_BRACE_OPEN : T_ARRAY;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php
new file mode 100644
index 0000000..8c56849
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php
@@ -0,0 +1,86 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Carlos Cirello <carlos.cirello.nl@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class NoMultilineWhitespaceAroundDoubleArrowFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Operator `=>` should not be surrounded by multi-line whitespaces.',
+ [new CodeSample("<?php\n\$a = array(1\n\n=> 2);\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer, TrailingCommaInMultilineFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOUBLE_ARROW);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOUBLE_ARROW)) {
+ continue;
+ }
+
+ $this->fixWhitespace($tokens, $index - 1);
+ // do not move anything about if there is a comment following the whitespace
+ if (!$tokens[$index + 2]->isComment()) {
+ $this->fixWhitespace($tokens, $index + 1);
+ }
+ }
+ }
+
+ private function fixWhitespace(Tokens $tokens, int $index): void
+ {
+ $token = $tokens[$index];
+
+ if ($token->isWhitespace() && !$token->isWhitespace(" \t")) {
+ $tokens[$index] = new Token([T_WHITESPACE, rtrim($token->getContent()).' ']);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php
new file mode 100644
index 0000000..3db6264
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoTrailingCommaInSinglelineArrayFixer.php
@@ -0,0 +1,89 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Sebastiaan Stok <s.stok@rollerscapes.net>
+ */
+final class NoTrailingCommaInSinglelineArrayFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHP single-line arrays should not have trailing comma.',
+ [new CodeSample("<?php\n\$a = array('sample', );\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = 0, $c = $tokens->count(); $index < $c; ++$index) {
+ if ($tokensAnalyzer->isArray($index)) {
+ $this->fixArray($tokens, $index);
+ }
+ }
+ }
+
+ private function fixArray(Tokens $tokens, int $index): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ if ($tokensAnalyzer->isArrayMultiLine($index)) {
+ return;
+ }
+
+ $startIndex = $index;
+
+ if ($tokens[$startIndex]->isGivenKind(T_ARRAY)) {
+ $startIndex = $tokens->getNextTokenOfKind($startIndex, ['(']);
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startIndex);
+ } else {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $startIndex);
+ }
+
+ $beforeEndIndex = $tokens->getPrevMeaningfulToken($endIndex);
+ $beforeEndToken = $tokens[$beforeEndIndex];
+
+ if ($beforeEndToken->equals(',')) {
+ $tokens->removeTrailingWhitespace($beforeEndIndex);
+ $tokens->clearAt($beforeEndIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php
new file mode 100644
index 0000000..6d1206b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NoWhitespaceBeforeCommaInArrayFixer.php
@@ -0,0 +1,152 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerConfiguration\InvalidOptionsForEnvException;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * @author Adam Marczuk <adam@marczuk.info>
+ */
+final class NoWhitespaceBeforeCommaInArrayFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'In array declaration, there MUST NOT be a whitespace before each comma.',
+ [
+ new CodeSample("<?php \$x = array(1 , \"2\");\n"),
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+ $x = [<<<EOD
+foo
+EOD
+ , 'bar'
+ ];
+
+SAMPLE
+ ,
+ new VersionSpecification(70300),
+ ['after_heredoc' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if ($tokens[$index]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ $this->fixSpacing($index, $tokens);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('after_heredoc', 'Whether the whitespace between heredoc end and comma should be removed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->setNormalizer(static function (Options $options, $value) {
+ if (\PHP_VERSION_ID < 70300 && $value) {
+ throw new InvalidOptionsForEnvException('"after_heredoc" option can only be enabled with PHP 7.3+.');
+ }
+
+ return $value;
+ })
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * Method to fix spacing in array declaration.
+ */
+ private function fixSpacing(int $index, Tokens $tokens): void
+ {
+ if ($tokens[$index]->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
+ $startIndex = $index;
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $startIndex);
+ } else {
+ $startIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startIndex);
+ }
+
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ $i = $this->skipNonArrayElements($i, $tokens);
+ $currentToken = $tokens[$i];
+ $prevIndex = $tokens->getPrevNonWhitespace($i - 1);
+
+ if (
+ $currentToken->equals(',') && !$tokens[$prevIndex]->isComment()
+ && (true === $this->configuration['after_heredoc'] || !$tokens[$prevIndex]->equals([T_END_HEREDOC]))
+ ) {
+ $tokens->removeLeadingWhitespace($i);
+ }
+ }
+ }
+
+ /**
+ * Method to move index over the non-array elements like function calls or function declarations.
+ *
+ * @return int New index
+ */
+ private function skipNonArrayElements(int $index, Tokens $tokens): int
+ {
+ if ($tokens[$index]->equals('}')) {
+ return $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+ }
+
+ if ($tokens[$index]->equals(')')) {
+ $startIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+ $startIndex = $tokens->getPrevMeaningfulToken($startIndex);
+ if (!$tokens[$startIndex]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ return $startIndex;
+ }
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php
new file mode 100644
index 0000000..f4d7652
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/NormalizeIndexBraceFixer.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NormalizeIndexBraceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Array index should always be written by using square braces.',
+ [new CodeSample("<?php\necho \$sample{\$index};\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind(CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN)) {
+ $tokens[$index] = new Token('[');
+ } elseif ($token->isGivenKind(CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE)) {
+ $tokens[$index] = new Token(']');
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php
new file mode 100644
index 0000000..d2e19bf
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/TrimArraySpacesFixer.php
@@ -0,0 +1,104 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Jared Henderson <jared@netrivet.com>
+ */
+final class TrimArraySpacesFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Arrays should be formatted like function/method arguments, without leading or trailing single line space.',
+ [new CodeSample("<?php\n\$sample = array( );\n\$sample = array( 'a', 'b' );\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = 0, $c = $tokens->count(); $index < $c; ++$index) {
+ if ($tokens[$index]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ self::fixArray($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * Method to trim leading/trailing whitespace within single line arrays.
+ */
+ private static function fixArray(Tokens $tokens, int $index): void
+ {
+ $startIndex = $index;
+
+ if ($tokens[$startIndex]->isGivenKind(T_ARRAY)) {
+ $startIndex = $tokens->getNextMeaningfulToken($startIndex);
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startIndex);
+ } else {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $startIndex);
+ }
+
+ $nextIndex = $startIndex + 1;
+ $nextToken = $tokens[$nextIndex];
+ $nextNonWhitespaceIndex = $tokens->getNextNonWhitespace($startIndex);
+ $nextNonWhitespaceToken = $tokens[$nextNonWhitespaceIndex];
+ $tokenAfterNextNonWhitespaceToken = $tokens[$nextNonWhitespaceIndex + 1];
+
+ $prevIndex = $endIndex - 1;
+ $prevToken = $tokens[$prevIndex];
+ $prevNonWhitespaceIndex = $tokens->getPrevNonWhitespace($endIndex);
+ $prevNonWhitespaceToken = $tokens[$prevNonWhitespaceIndex];
+
+ if (
+ $nextToken->isWhitespace(" \t")
+ && (
+ !$nextNonWhitespaceToken->isComment()
+ || $nextNonWhitespaceIndex === $prevNonWhitespaceIndex
+ || $tokenAfterNextNonWhitespaceToken->isWhitespace(" \t")
+ || str_starts_with($nextNonWhitespaceToken->getContent(), '/*')
+ )
+ ) {
+ $tokens->clearAt($nextIndex);
+ }
+
+ if (
+ $prevToken->isWhitespace(" \t")
+ && !$prevNonWhitespaceToken->equals(',')
+ ) {
+ $tokens->clearAt($prevIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php
new file mode 100644
index 0000000..8fed4a1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ArrayNotation/WhitespaceAfterCommaInArrayFixer.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ArrayNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Adam Marczuk <adam@marczuk.info>
+ */
+final class WhitespaceAfterCommaInArrayFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'In array declaration, there MUST be a whitespace after each comma.',
+ [new CodeSample("<?php\n\$sample = array(1,'a',\$b,);\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensToInsert = [];
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if (!$tokens[$index]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ continue;
+ }
+
+ if ($tokens[$index]->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
+ $startIndex = $index;
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $startIndex);
+ } else {
+ $startIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startIndex);
+ }
+
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ $i = $this->skipNonArrayElements($i, $tokens);
+ if ($tokens[$i]->equals(',') && !$tokens[$i + 1]->isWhitespace()) {
+ $tokensToInsert[$i + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ }
+ }
+
+ if ([] !== $tokensToInsert) {
+ $tokens->insertSlices($tokensToInsert);
+ }
+ }
+
+ /**
+ * Method to move index over the non-array elements like function calls or function declarations.
+ *
+ * @return int New index
+ */
+ private function skipNonArrayElements(int $index, Tokens $tokens): int
+ {
+ if ($tokens[$index]->equals('}')) {
+ return $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+ }
+
+ if ($tokens[$index]->equals(')')) {
+ $startIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+ $startIndex = $tokens->getPrevMeaningfulToken($startIndex);
+ if (!$tokens[$startIndex]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ return $startIndex;
+ }
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php
new file mode 100644
index 0000000..f0dd982
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/BracesFixer.php
@@ -0,0 +1,1006 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Basic;
+
+use PhpCsFixer\AbstractProxyFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\ControlStructure\ControlStructureContinuationPositionFixer;
+use PhpCsFixer\Fixer\LanguageConstruct\DeclareParenthesesFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * Fixer for rules defined in PSR2 ¶4.1, ¶4.4, ¶5.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class BracesFixer extends AbstractProxyFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const LINE_NEXT = 'next';
+
+ /**
+ * @internal
+ */
+ public const LINE_SAME = 'same';
+
+ /**
+ * @var null|ControlStructureContinuationPositionFixer
+ */
+ private $controlStructureContinuationPositionFixer;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The body of each structure MUST be enclosed by braces. Braces should be properly placed. Body of braces should be properly indented.',
+ [
+ new CodeSample(
+ '<?php
+
+class Foo {
+ public function bar($baz) {
+ if ($baz = 900) echo "Hello!";
+
+ if ($baz = 9000)
+ echo "Wait!";
+
+ if ($baz == true)
+ {
+ echo "Why?";
+ }
+ else
+ {
+ echo "Ha?";
+ }
+
+ if (is_array($baz))
+ foreach ($baz as $b)
+ {
+ echo $b;
+ }
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+$positive = function ($item) { return $item >= 0; };
+$negative = function ($item) {
+ return $item < 0; };
+',
+ ['allow_single_line_closure' => true]
+ ),
+ new CodeSample(
+ '<?php
+
+class Foo
+{
+ public function bar($baz)
+ {
+ if ($baz = 900) echo "Hello!";
+
+ if ($baz = 9000)
+ echo "Wait!";
+
+ if ($baz == true)
+ {
+ echo "Why?";
+ }
+ else
+ {
+ echo "Ha?";
+ }
+
+ if (is_array($baz))
+ foreach ($baz as $b)
+ {
+ echo $b;
+ }
+ }
+}
+',
+ ['position_after_functions_and_oop_constructs' => self::LINE_SAME]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ArrayIndentationFixer, MethodArgumentSpaceFixer, MethodChainingIndentationFixer.
+ * Must run after ClassAttributesSeparationFixer, ClassDefinitionFixer, ElseifFixer, EmptyLoopBodyFixer, LineEndingFixer, NoAlternativeSyntaxFixer, NoEmptyStatementFixer, NoUselessElseFixer, SingleLineThrowFixer, SingleSpaceAfterConstructFixer, SingleTraitInsertPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 35;
+ }
+
+ public function configure(array $configuration = null): void
+ {
+ parent::configure($configuration);
+
+ $this->getControlStructureContinuationPositionFixer()->configure([
+ 'position' => self::LINE_NEXT === $this->configuration['position_after_control_structures']
+ ? ControlStructureContinuationPositionFixer::NEXT_LINE
+ : ControlStructureContinuationPositionFixer::SAME_LINE,
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->fixCommentBeforeBrace($tokens);
+ $this->fixMissingControlBraces($tokens);
+ $this->fixIndents($tokens);
+ $this->fixSpaceAroundToken($tokens);
+ $this->fixDoWhile($tokens);
+
+ parent::applyFix($file, $tokens);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('allow_single_line_anonymous_class_with_empty_body', 'Whether single line anonymous class with empty body notation should be allowed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('allow_single_line_closure', 'Whether single line lambda notation should be allowed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('position_after_functions_and_oop_constructs', 'whether the opening brace should be placed on "next" or "same" line after classy constructs (non-anonymous classes, interfaces, traits, methods and non-lambda functions).'))
+ ->setAllowedValues([self::LINE_NEXT, self::LINE_SAME])
+ ->setDefault(self::LINE_NEXT)
+ ->getOption(),
+ (new FixerOptionBuilder('position_after_control_structures', 'whether the opening brace should be placed on "next" or "same" line after control structures.'))
+ ->setAllowedValues([self::LINE_NEXT, self::LINE_SAME])
+ ->setDefault(self::LINE_SAME)
+ ->getOption(),
+ (new FixerOptionBuilder('position_after_anonymous_constructs', 'whether the opening brace should be placed on "next" or "same" line after anonymous constructs (anonymous classes and lambda functions).'))
+ ->setAllowedValues([self::LINE_NEXT, self::LINE_SAME])
+ ->setDefault(self::LINE_SAME)
+ ->getOption(),
+ ]);
+ }
+
+ protected function createProxyFixers(): array
+ {
+ return [
+ $this->getControlStructureContinuationPositionFixer(),
+ new DeclareParenthesesFixer(),
+ ];
+ }
+
+ private function fixCommentBeforeBrace(Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $controlTokens = $this->getControlTokens();
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind($controlTokens)) {
+ $prevIndex = $this->findParenthesisEnd($tokens, $index);
+ } elseif (
+ ($token->isGivenKind(T_FUNCTION) && $tokensAnalyzer->isLambda($index))
+ || ($token->isGivenKind(T_CLASS) && $tokensAnalyzer->isAnonymousClass($index))
+ ) {
+ $prevIndex = $tokens->getNextTokenOfKind($index, ['{']);
+ $prevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ } else {
+ continue;
+ }
+
+ $commentIndex = $tokens->getNextNonWhitespace($prevIndex);
+ $commentToken = $tokens[$commentIndex];
+
+ if (!$commentToken->isGivenKind(T_COMMENT) || str_starts_with($commentToken->getContent(), '/*')) {
+ continue;
+ }
+
+ $braceIndex = $tokens->getNextMeaningfulToken($commentIndex);
+ $braceToken = $tokens[$braceIndex];
+
+ if (!$braceToken->equals('{')) {
+ continue;
+ }
+
+ /** @var Token $tokenTmp */
+ $tokenTmp = $tokens[$braceIndex];
+
+ $newBraceIndex = $prevIndex + 1;
+ for ($i = $braceIndex; $i > $newBraceIndex; --$i) {
+ // we might be moving one white space next to another, these have to be merged
+ /** @var Token $previousToken */
+ $previousToken = $tokens[$i - 1];
+ $tokens[$i] = $previousToken;
+ if ($tokens[$i]->isWhitespace() && $tokens[$i + 1]->isWhitespace()) {
+ $tokens[$i] = new Token([T_WHITESPACE, $tokens[$i]->getContent().$tokens[$i + 1]->getContent()]);
+ $tokens->clearAt($i + 1);
+ }
+ }
+
+ $tokens[$newBraceIndex] = $tokenTmp;
+ $c = $tokens[$braceIndex]->getContent();
+ if (substr_count($c, "\n") > 1) {
+ // left trim till last line break
+ $tokens[$braceIndex] = new Token([T_WHITESPACE, substr($c, strrpos($c, "\n"))]);
+ }
+ }
+ }
+
+ private function fixDoWhile(Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_DO)) {
+ continue;
+ }
+
+ $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $index);
+ $startBraceIndex = $tokens->getNextNonWhitespace($parenthesisEndIndex);
+ $endBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $startBraceIndex);
+ $nextNonWhitespaceIndex = $tokens->getNextNonWhitespace($endBraceIndex);
+ $nextNonWhitespaceToken = $tokens[$nextNonWhitespaceIndex];
+
+ if (!$nextNonWhitespaceToken->isGivenKind(T_WHILE)) {
+ continue;
+ }
+
+ $tokens->ensureWhitespaceAtIndex($nextNonWhitespaceIndex - 1, 1, ' ');
+ }
+ }
+
+ private function fixIndents(Tokens $tokens): void
+ {
+ $classyTokens = Token::getClassyTokenKinds();
+ $classyAndFunctionTokens = array_merge([T_FUNCTION], $classyTokens);
+ $controlTokens = $this->getControlTokens();
+ $indentTokens = array_filter(
+ array_merge($classyAndFunctionTokens, $controlTokens),
+ static function (int $item): bool {
+ return T_SWITCH !== $item;
+ }
+ );
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = 0, $limit = \count($tokens); $index < $limit; ++$index) {
+ $token = $tokens[$index];
+
+ // if token is not a structure element - continue
+ if (!$token->isGivenKind($indentTokens)) {
+ continue;
+ }
+
+ // do not change indent for `while` in `do ... while ...`
+ if (
+ $token->isGivenKind(T_WHILE)
+ && $tokensAnalyzer->isWhilePartOfDoWhile($index)
+ ) {
+ continue;
+ }
+
+ if (
+ $this->configuration['allow_single_line_anonymous_class_with_empty_body']
+ && $token->isGivenKind(T_CLASS)
+ ) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prevIndex]->isGivenKind(T_NEW)) {
+ $braceStartIndex = $tokens->getNextTokenOfKind($index, ['{']);
+ $braceEndIndex = $tokens->getNextMeaningfulToken($braceStartIndex);
+
+ if ('}' === $tokens[$braceEndIndex]->getContent() && !$this->isMultilined($tokens, $index, $braceEndIndex)) {
+ $index = $braceEndIndex;
+
+ continue;
+ }
+ }
+ }
+
+ if (
+ $this->configuration['allow_single_line_closure']
+ && $token->isGivenKind(T_FUNCTION)
+ && $tokensAnalyzer->isLambda($index)
+ ) {
+ $braceEndIndex = $tokens->findBlockEnd(
+ Tokens::BLOCK_TYPE_CURLY_BRACE,
+ $tokens->getNextTokenOfKind($index, ['{'])
+ );
+
+ if (!$this->isMultilined($tokens, $index, $braceEndIndex)) {
+ $index = $braceEndIndex;
+
+ continue;
+ }
+ }
+
+ if ($token->isGivenKind($classyAndFunctionTokens)) {
+ $startBraceIndex = $tokens->getNextTokenOfKind($index, [';', '{']);
+ $startBraceToken = $tokens[$startBraceIndex];
+ } else {
+ $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $index);
+ $startBraceIndex = $tokens->getNextNonWhitespace($parenthesisEndIndex);
+ $startBraceToken = $tokens[$startBraceIndex];
+ }
+
+ // structure without braces block - nothing to do, e.g. do { } while (true);
+ if (!$startBraceToken->equals('{')) {
+ continue;
+ }
+
+ $nextNonWhitespaceIndex = $tokens->getNextNonWhitespace($startBraceIndex, " \t");
+ $nextNonWhitespace = $tokens[$nextNonWhitespaceIndex];
+
+ /* if CLOSE_TAG is after { on the same line, do not indent. e.g. <?php if ($condition) { ?> */
+ if ($nextNonWhitespace->isGivenKind(T_CLOSE_TAG)) {
+ continue;
+ }
+
+ /* if CLOSE_TAG is after { on the next line and a comment on this line, do not indent. e.g. <?php if ($condition) { // \n?> */
+ if ($nextNonWhitespace->isComment() && $tokens[$tokens->getNextMeaningfulToken($nextNonWhitespaceIndex)]->isGivenKind(T_CLOSE_TAG)) {
+ continue;
+ }
+
+ $endBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $startBraceIndex);
+
+ $indent = WhitespacesAnalyzer::detectIndent($tokens, $index);
+
+ // fix indent near closing brace
+ $tokens->ensureWhitespaceAtIndex($endBraceIndex - 1, 1, $this->whitespacesConfig->getLineEnding().$indent);
+
+ // fix indent between braces
+ $lastCommaIndex = $tokens->getPrevTokenOfKind($endBraceIndex - 1, [';', '}']);
+
+ $nestLevel = 1;
+ for ($nestIndex = $lastCommaIndex; $nestIndex >= $startBraceIndex; --$nestIndex) {
+ $nestToken = $tokens[$nestIndex];
+
+ if ($nestToken->equalsAny([')', [CT::T_BRACE_CLASS_INSTANTIATION_CLOSE]])) {
+ $nestIndex = $tokens->findBlockStart(
+ $nestToken->equals(')') ? Tokens::BLOCK_TYPE_PARENTHESIS_BRACE : Tokens::BLOCK_TYPE_BRACE_CLASS_INSTANTIATION,
+ $nestIndex
+ );
+
+ continue;
+ }
+
+ if (1 === $nestLevel) {
+ // Next token is the beginning of a line that can be indented when
+ // the current token is a `;`, a `}` or the opening `{` of current
+ // scope. Current token may also be a comment that follows `;` or
+ // `}`, in which case indentation will only be fixed if this
+ // comment is followed by a newline.
+ $nextLineCanBeIndented = false;
+ if ($nestToken->equalsAny([';', '}'])) {
+ $nextLineCanBeIndented = true;
+ } elseif ($this->isCommentWithFixableIndentation($tokens, $nestIndex)) {
+ for ($i = $nestIndex; $i > $startBraceIndex; --$i) {
+ if ($tokens[$i]->equalsAny([';', '}'])) {
+ $nextLineCanBeIndented = true;
+
+ break;
+ }
+
+ if (!$tokens[$i]->isWhitespace() && !$tokens[$i]->isComment()) {
+ break;
+ }
+ }
+
+ if ($nextLineCanBeIndented || $i === $startBraceIndex) {
+ $nextToken = $tokens[$nestIndex + 1];
+ $nextLineCanBeIndented = $nextToken->isWhitespace() && 1 === Preg::match('/\R/', $nextToken->getContent());
+ }
+ }
+
+ if (!$nextLineCanBeIndented) {
+ continue;
+ }
+
+ $nextNonWhitespaceNestIndex = $tokens->getNextNonWhitespace($nestIndex);
+ $nextNonWhitespaceNestToken = $tokens[$nextNonWhitespaceNestIndex];
+
+ if (
+ // next Token is not a comment on its own line
+ !($nextNonWhitespaceNestToken->isComment() && (
+ !$tokens[$nextNonWhitespaceNestIndex - 1]->isWhitespace()
+ || !Preg::match('/\R/', $tokens[$nextNonWhitespaceNestIndex - 1]->getContent())
+ ))
+ // and it is not a `$foo = function () {};` situation
+ && !($nestToken->equals('}') && $nextNonWhitespaceNestToken->equalsAny([';', ',', ']', [CT::T_ARRAY_SQUARE_BRACE_CLOSE]]))
+ // and it is not a `Foo::{bar}()` situation
+ && !($nestToken->equals('}') && $nextNonWhitespaceNestToken->equals('('))
+ // and it is not a `${"a"}->...` and `${"b{$foo}"}->...` situation
+ && !($nestToken->equals('}') && $tokens[$nestIndex - 1]->equalsAny(['"', "'", [T_CONSTANT_ENCAPSED_STRING], [T_VARIABLE]]))
+ // and next token is not a closing tag that would break heredoc/nowdoc syntax
+ && !($tokens[$nestIndex - 1]->isGivenKind(T_END_HEREDOC) && $nextNonWhitespaceNestToken->isGivenKind(T_CLOSE_TAG))
+ ) {
+ if (
+ (
+ self::LINE_NEXT !== $this->configuration['position_after_control_structures']
+ && $nextNonWhitespaceNestToken->isGivenKind($this->getControlContinuationTokens())
+ && !$tokens[$tokens->getPrevNonWhitespace($nextNonWhitespaceNestIndex)]->isComment()
+ )
+ || $nextNonWhitespaceNestToken->isGivenKind(T_CLOSE_TAG)
+ || (
+ self::LINE_NEXT !== $this->configuration['position_after_control_structures']
+ && $nextNonWhitespaceNestToken->isGivenKind(T_WHILE)
+ && $tokensAnalyzer->isWhilePartOfDoWhile($nextNonWhitespaceNestIndex)
+ )
+ ) {
+ $whitespace = ' ';
+ } else {
+ $nextToken = $tokens[$nestIndex + 1];
+ $nextWhitespace = '';
+
+ if ($nextToken->isWhitespace()) {
+ $nextWhitespace = rtrim($nextToken->getContent(), " \t");
+
+ if ('' !== $nextWhitespace) {
+ $nextWhitespace = Preg::replace(
+ sprintf('/%s$/', $this->whitespacesConfig->getLineEnding()),
+ '',
+ $nextWhitespace,
+ 1
+ );
+ }
+ }
+
+ $whitespace = $nextWhitespace.$this->whitespacesConfig->getLineEnding().$indent;
+
+ if (!$nextNonWhitespaceNestToken->equals('}')) {
+ $determineIsIndentableBlockContent = static function (int $contentIndex) use ($tokens): bool {
+ if (!$tokens[$contentIndex]->isComment()) {
+ return true;
+ }
+
+ if (!$tokens[$tokens->getPrevMeaningfulToken($contentIndex)]->equals(';')) {
+ return true;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($contentIndex);
+
+ if (!$tokens[$nextIndex]->equals('}')) {
+ return true;
+ }
+
+ $nextNextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+
+ if (null === $nextNextIndex) {
+ return true;
+ }
+
+ if ($tokens[$nextNextIndex]->equalsAny([
+ [T_ELSE],
+ [T_ELSEIF],
+ ',',
+ ])) {
+ return false;
+ }
+
+ return true;
+ };
+
+ // add extra indent only if current content is not a comment for content outside of current block
+ if ($determineIsIndentableBlockContent($nestIndex + 2)) {
+ $whitespace .= $this->whitespacesConfig->getIndent();
+ }
+ }
+ }
+
+ $this->ensureWhitespaceAtIndexAndIndentMultilineComment($tokens, $nestIndex + 1, $whitespace);
+ }
+ }
+
+ if ($nestToken->equals('}')) {
+ ++$nestLevel;
+
+ continue;
+ }
+
+ if ($nestToken->equals('{')) {
+ --$nestLevel;
+
+ continue;
+ }
+ }
+
+ // fix indent near opening brace
+ if (isset($tokens[$startBraceIndex + 2]) && $tokens[$startBraceIndex + 2]->equals('}')) {
+ $tokens->ensureWhitespaceAtIndex($startBraceIndex + 1, 0, $this->whitespacesConfig->getLineEnding().$indent);
+ } else {
+ $nextToken = $tokens[$startBraceIndex + 1];
+ $nextNonWhitespaceToken = $tokens[$tokens->getNextNonWhitespace($startBraceIndex)];
+
+ // set indent only if it is not a case, when comment is following { on same line
+ if (
+ !$nextNonWhitespaceToken->isComment()
+ || ($nextToken->isWhitespace() && 1 === substr_count($nextToken->getContent(), "\n")) // preserve blank lines
+ ) {
+ $this->ensureWhitespaceAtIndexAndIndentMultilineComment(
+ $tokens,
+ $startBraceIndex + 1,
+ $this->whitespacesConfig->getLineEnding().$indent.$this->whitespacesConfig->getIndent()
+ );
+ }
+ }
+
+ if ($token->isGivenKind($classyTokens) && !$tokensAnalyzer->isAnonymousClass($index)) {
+ if (self::LINE_SAME === $this->configuration['position_after_functions_and_oop_constructs'] && !$tokens[$tokens->getPrevNonWhitespace($startBraceIndex)]->isComment()) {
+ $ensuredWhitespace = ' ';
+ } else {
+ $ensuredWhitespace = $this->whitespacesConfig->getLineEnding().$indent;
+ }
+
+ $tokens->ensureWhitespaceAtIndex($startBraceIndex - 1, 1, $ensuredWhitespace);
+ } elseif (
+ $token->isGivenKind(T_FUNCTION) && !$tokensAnalyzer->isLambda($index)
+ || (
+ self::LINE_NEXT === $this->configuration['position_after_control_structures'] && $token->isGivenKind($controlTokens)
+ || (
+ self::LINE_NEXT === $this->configuration['position_after_anonymous_constructs']
+ && (
+ $token->isGivenKind(T_FUNCTION) && $tokensAnalyzer->isLambda($index)
+ || $token->isGivenKind(T_CLASS) && $tokensAnalyzer->isAnonymousClass($index)
+ )
+ )
+ )
+ ) {
+ $isAnonymousClass = $token->isGivenKind($classyTokens) && $tokensAnalyzer->isAnonymousClass($index);
+
+ $closingParenthesisIndex = $tokens->getPrevTokenOfKind($startBraceIndex, [')']);
+ if (null === $closingParenthesisIndex && !$isAnonymousClass) {
+ continue;
+ }
+
+ if (
+ !$isAnonymousClass
+ && $tokens[$closingParenthesisIndex - 1]->isWhitespace()
+ && str_contains($tokens[$closingParenthesisIndex - 1]->getContent(), "\n")
+ ) {
+ if (!$tokens[$startBraceIndex - 2]->isComment()) {
+ $tokens->ensureWhitespaceAtIndex($startBraceIndex - 1, 1, ' ');
+ }
+ } else {
+ if (
+ self::LINE_SAME === $this->configuration['position_after_functions_and_oop_constructs']
+ && (
+ $token->isGivenKind(T_FUNCTION) && !$tokensAnalyzer->isLambda($index)
+ || $token->isGivenKind($classyTokens) && !$tokensAnalyzer->isAnonymousClass($index)
+ )
+ && !$tokens[$tokens->getPrevNonWhitespace($startBraceIndex)]->isComment()
+ ) {
+ $ensuredWhitespace = ' ';
+ } else {
+ $ensuredWhitespace = $this->whitespacesConfig->getLineEnding().$indent;
+ }
+
+ $tokens->ensureWhitespaceAtIndex($startBraceIndex - 1, 1, $ensuredWhitespace);
+ }
+ } else {
+ $tokens->ensureWhitespaceAtIndex($startBraceIndex - 1, 1, ' ');
+ }
+
+ // reset loop limit due to collection change
+ $limit = \count($tokens);
+ }
+ }
+
+ private function fixMissingControlBraces(Tokens $tokens): void
+ {
+ $controlTokens = $this->getControlTokens();
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind($controlTokens)) {
+ continue;
+ }
+
+ $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $index);
+ $nextAfterParenthesisEndIndex = $tokens->getNextMeaningfulToken($parenthesisEndIndex);
+ $tokenAfterParenthesis = $tokens[$nextAfterParenthesisEndIndex];
+
+ // if Token after parenthesis is { then we do not need to insert brace, but to fix whitespace before it
+ if ($tokenAfterParenthesis->equals('{') && self::LINE_SAME === $this->configuration['position_after_control_structures']) {
+ $tokens->ensureWhitespaceAtIndex($parenthesisEndIndex + 1, 0, ' ');
+
+ continue;
+ }
+
+ // do not add braces for cases:
+ // - structure without block, e.g. while ($iter->next());
+ // - structure with block, e.g. while ($i) {...}, while ($i) : {...} endwhile;
+ if ($tokenAfterParenthesis->equalsAny([';', '{', ':'])) {
+ continue;
+ }
+
+ // do not add for 'short if' followed by alternative loop, for example: if ($a) while ($b): ? > X < ?php endwhile; ? >
+ // or 'short if' after an alternative loop, for example: foreach ($arr as $index => $item) if ($item):
+ if ($tokenAfterParenthesis->isGivenKind([T_FOR, T_FOREACH, T_SWITCH, T_WHILE, T_IF])) {
+ $tokenAfterParenthesisBlockEnd = $tokens->findBlockEnd( // go to ')'
+ Tokens::BLOCK_TYPE_PARENTHESIS_BRACE,
+ $tokens->getNextMeaningfulToken($nextAfterParenthesisEndIndex)
+ );
+
+ if ($tokens[$tokens->getNextMeaningfulToken($tokenAfterParenthesisBlockEnd)]->equals(':')) {
+ continue;
+ }
+ }
+
+ $statementEndIndex = $this->findStatementEnd($tokens, $parenthesisEndIndex);
+
+ // insert closing brace
+ $tokens->insertAt($statementEndIndex + 1, [new Token([T_WHITESPACE, ' ']), new Token('}')]);
+
+ // insert missing `;` if needed
+ if (!$tokens[$statementEndIndex]->equalsAny([';', '}'])) {
+ $tokens->insertAt($statementEndIndex + 1, new Token(';'));
+ }
+
+ // insert opening brace
+ $tokens->insertAt($parenthesisEndIndex + 1, new Token('{'));
+ $tokens->ensureWhitespaceAtIndex($parenthesisEndIndex + 1, 0, ' ');
+ }
+ }
+
+ private function fixSpaceAroundToken(Tokens $tokens): void
+ {
+ $controlTokens = $this->getControlTokens();
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ // Declare tokens don't follow the same rules are other control statements
+ if ($token->isGivenKind(T_DECLARE)) {
+ continue; // delegated to DeclareParenthesesFixer
+ }
+
+ if ($token->isGivenKind($controlTokens) || $token->isGivenKind(CT::T_USE_LAMBDA)) {
+ $nextNonWhitespaceIndex = $tokens->getNextNonWhitespace($index);
+
+ if (!$tokens[$nextNonWhitespaceIndex]->equals(':')) {
+ $tokens->ensureWhitespaceAtIndex(
+ $index + 1,
+ 0,
+ self::LINE_NEXT === $this->configuration['position_after_control_structures'] && !$tokens[$nextNonWhitespaceIndex]->equals('(') ?
+ $this->whitespacesConfig->getLineEnding().WhitespacesAnalyzer::detectIndent($tokens, $index)
+ : ' '
+ );
+ }
+
+ $prevToken = $tokens[$index - 1];
+
+ if (!$prevToken->isWhitespace() && !$prevToken->isComment() && !$prevToken->isGivenKind(T_OPEN_TAG)) {
+ $tokens->ensureWhitespaceAtIndex($index - 1, 1, ' ');
+ }
+ }
+ }
+ }
+
+ private function findParenthesisEnd(Tokens $tokens, int $structureTokenIndex): int
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($structureTokenIndex);
+ $nextToken = $tokens[$nextIndex];
+
+ // return if next token is not opening parenthesis
+ if (!$nextToken->equals('(')) {
+ return $structureTokenIndex;
+ }
+
+ return $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $nextIndex);
+ }
+
+ private function findStatementEnd(Tokens $tokens, int $parenthesisEndIndex): int
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($parenthesisEndIndex);
+ $nextToken = $tokens[$nextIndex];
+
+ if (!$nextToken) {
+ return $parenthesisEndIndex;
+ }
+
+ if ($nextToken->equals('{')) {
+ return $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $nextIndex);
+ }
+
+ if ($nextToken->isGivenKind($this->getControlTokens())) {
+ $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $nextIndex);
+
+ $endIndex = $this->findStatementEnd($tokens, $parenthesisEndIndex);
+
+ if ($nextToken->isGivenKind([T_IF, T_TRY, T_DO])) {
+ $openingTokenKind = $nextToken->getId();
+
+ while (true) {
+ $nextIndex = $tokens->getNextMeaningfulToken($endIndex);
+ $nextToken = isset($nextIndex) ? $tokens[$nextIndex] : null;
+ if ($nextToken && $nextToken->isGivenKind($this->getControlContinuationTokensForOpeningToken($openingTokenKind))) {
+ $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $nextIndex);
+
+ $endIndex = $this->findStatementEnd($tokens, $parenthesisEndIndex);
+
+ if ($nextToken->isGivenKind($this->getFinalControlContinuationTokensForOpeningToken($openingTokenKind))) {
+ return $endIndex;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+
+ return $endIndex;
+ }
+
+ $index = $parenthesisEndIndex;
+
+ while (true) {
+ $token = $tokens[++$index];
+
+ // if there is some block in statement (eg lambda function) we need to skip it
+ if ($token->equals('{')) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals(';')) {
+ return $index;
+ }
+
+ if ($token->isGivenKind(T_CLOSE_TAG)) {
+ return $tokens->getPrevNonWhitespace($index);
+ }
+ }
+ }
+
+ private function getControlTokens(): array
+ {
+ static $tokens = [
+ T_DECLARE,
+ T_DO,
+ T_ELSE,
+ T_ELSEIF,
+ T_FINALLY,
+ T_FOR,
+ T_FOREACH,
+ T_IF,
+ T_WHILE,
+ T_TRY,
+ T_CATCH,
+ T_SWITCH,
+ ];
+
+ // @TODO: drop condition when PHP 8.0+ is required
+ if (\defined('T_MATCH')) {
+ $tokens['match'] = T_MATCH;
+ }
+
+ return $tokens;
+ }
+
+ private function getControlContinuationTokens(): array
+ {
+ static $tokens = [
+ T_CATCH,
+ T_ELSE,
+ T_ELSEIF,
+ T_FINALLY,
+ ];
+
+ return $tokens;
+ }
+
+ private function getControlContinuationTokensForOpeningToken(int $openingTokenKind): array
+ {
+ if (T_IF === $openingTokenKind) {
+ return [
+ T_ELSE,
+ T_ELSEIF,
+ ];
+ }
+
+ if (T_DO === $openingTokenKind) {
+ return [T_WHILE];
+ }
+
+ if (T_TRY === $openingTokenKind) {
+ return [
+ T_CATCH,
+ T_FINALLY,
+ ];
+ }
+
+ return [];
+ }
+
+ private function getFinalControlContinuationTokensForOpeningToken(int $openingTokenKind): array
+ {
+ if (T_IF === $openingTokenKind) {
+ return [T_ELSE];
+ }
+
+ if (T_TRY === $openingTokenKind) {
+ return [T_FINALLY];
+ }
+
+ return [];
+ }
+
+ private function ensureWhitespaceAtIndexAndIndentMultilineComment(Tokens $tokens, int $index, string $whitespace): void
+ {
+ if ($tokens[$index]->isWhitespace()) {
+ $nextTokenIndex = $tokens->getNextNonWhitespace($index);
+ } else {
+ $nextTokenIndex = $index;
+ }
+
+ $nextToken = $tokens[$nextTokenIndex];
+ if ($nextToken->isComment()) {
+ $previousToken = $tokens[$nextTokenIndex - 1];
+ $nextTokenContent = $nextToken->getContent();
+
+ // do not indent inline comments used to comment out unused code
+ if (
+ $previousToken->isWhitespace()
+ && 1 === Preg::match('/\R$/', $previousToken->getContent())
+ && (
+ (str_starts_with($nextTokenContent, '//'.$this->whitespacesConfig->getIndent()) || '//' === $nextTokenContent)
+ || (str_starts_with($nextTokenContent, '#'.$this->whitespacesConfig->getIndent()) || '#' === $nextTokenContent)
+ )
+ ) {
+ return;
+ }
+
+ $tokens[$nextTokenIndex] = new Token([
+ $nextToken->getId(),
+ Preg::replace(
+ '/(\R)'.WhitespacesAnalyzer::detectIndent($tokens, $nextTokenIndex).'(\h*\S+.*)/',
+ '$1'.Preg::replace('/^.*\R(\h*)$/s', '$1', $whitespace).'$2',
+ $nextToken->getContent()
+ ),
+ ]);
+ }
+
+ $tokens->ensureWhitespaceAtIndex($index, 0, $whitespace);
+ }
+
+ private function isMultilined(Tokens $tokens, int $startParenthesisIndex, int $endParenthesisIndex): bool
+ {
+ for ($i = $startParenthesisIndex; $i < $endParenthesisIndex; ++$i) {
+ if (str_contains($tokens[$i]->getContent(), "\n")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns whether the token at given index is a comment whose indentation
+ * can be fixed.
+ *
+ * Indentation of a comment is not changed when the comment is part of a
+ * multi-line message whose lines are all single-line comments and at least
+ * one line has meaningful content.
+ */
+ private function isCommentWithFixableIndentation(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isComment()) {
+ return false;
+ }
+
+ if (str_starts_with($tokens[$index]->getContent(), '/*')) {
+ return true;
+ }
+
+ $firstCommentIndex = $index;
+ while (true) {
+ $i = $this->getSiblingContinuousSingleLineComment($tokens, $firstCommentIndex, false);
+ if (null === $i) {
+ break;
+ }
+
+ $firstCommentIndex = $i;
+ }
+
+ $lastCommentIndex = $index;
+ while (true) {
+ $i = $this->getSiblingContinuousSingleLineComment($tokens, $lastCommentIndex, true);
+ if (null === $i) {
+ break;
+ }
+
+ $lastCommentIndex = $i;
+ }
+
+ if ($firstCommentIndex === $lastCommentIndex) {
+ return true;
+ }
+
+ for ($i = $firstCommentIndex + 1; $i < $lastCommentIndex; ++$i) {
+ if (!$tokens[$i]->isWhitespace() && !$tokens[$i]->isComment()) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private function getSiblingContinuousSingleLineComment(Tokens $tokens, int $index, bool $after): ?int
+ {
+ $siblingIndex = $index;
+ do {
+ $siblingIndex = $tokens->getTokenOfKindSibling($siblingIndex, $after ? 1 : -1, [[T_COMMENT]]);
+
+ if (null === $siblingIndex) {
+ return null;
+ }
+ } while (str_starts_with($tokens[$siblingIndex]->getContent(), '/*'));
+
+ $newLines = 0;
+ for ($i = min($siblingIndex, $index) + 1, $max = max($siblingIndex, $index); $i < $max; ++$i) {
+ if ($tokens[$i]->isWhitespace() && Preg::match('/\R/', $tokens[$i]->getContent())) {
+ if (1 === $newLines || Preg::match('/\R.*\R/', $tokens[$i]->getContent())) {
+ return null;
+ }
+
+ ++$newLines;
+ }
+ }
+
+ return $siblingIndex;
+ }
+
+ private function getControlStructureContinuationPositionFixer(): ControlStructureContinuationPositionFixer
+ {
+ if (null === $this->controlStructureContinuationPositionFixer) {
+ $this->controlStructureContinuationPositionFixer = new ControlStructureContinuationPositionFixer();
+ }
+
+ return $this->controlStructureContinuationPositionFixer;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php
new file mode 100644
index 0000000..50044e3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/EncodingFixer.php
@@ -0,0 +1,95 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Basic;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR1 ¶2.2.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class EncodingFixer extends AbstractFixer
+{
+ /**
+ * @var string
+ */
+ private $BOM;
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->BOM = pack('CCC', 0xEF, 0xBB, 0xBF);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHP code MUST use only UTF-8 without BOM (remove BOM).',
+ [
+ new CodeSample(
+ $this->BOM.'<?php
+
+echo "Hello!";
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // must run first (at least before Fixers that using Tokens) - for speed reason of whole fixing process
+ return 100;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $content = $tokens[0]->getContent();
+
+ if (0 === strncmp($content, $this->BOM, 3)) {
+ $newContent = substr($content, 3);
+
+ if ('' === $newContent) {
+ $tokens->clearAt(0);
+ } else {
+ $tokens[0] = new Token([$tokens[0]->getId(), $newContent]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php
new file mode 100644
index 0000000..a47707d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/NonPrintableCharacterFixer.php
@@ -0,0 +1,181 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Basic;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Removes Zero-width space (ZWSP), Non-breaking space (NBSP) and other invisible unicode symbols.
+ *
+ * @author Ivan Boprzenkov <ivan.borzenkov@gmail.com>
+ */
+final class NonPrintableCharacterFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string, string[]>
+ */
+ private $symbolsReplace;
+
+ /**
+ * @var int[]
+ */
+ private static $tokens = [
+ T_STRING_VARNAME,
+ T_INLINE_HTML,
+ T_VARIABLE,
+ T_COMMENT,
+ T_ENCAPSED_AND_WHITESPACE,
+ T_CONSTANT_ENCAPSED_STRING,
+ T_DOC_COMMENT,
+ ];
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->symbolsReplace = [
+ pack('H*', 'e2808b') => ['', '200b'], // ZWSP U+200B
+ pack('H*', 'e28087') => [' ', '2007'], // FIGURE SPACE U+2007
+ pack('H*', 'e280af') => [' ', '202f'], // NBSP U+202F
+ pack('H*', 'e281a0') => ['', '2060'], // WORD JOINER U+2060
+ pack('H*', 'c2a0') => [' ', 'a0'], // NO-BREAK SPACE U+A0
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove Zero-width space (ZWSP), Non-breaking space (NBSP) and other invisible unicode symbols.',
+ [
+ new CodeSample(
+ '<?php echo "'.pack('H*', 'e2808b').'Hello'.pack('H*', 'e28087').'World'.pack('H*', 'c2a0')."!\";\n"
+ ),
+ new CodeSample(
+ '<?php echo "'.pack('H*', 'e2808b').'Hello'.pack('H*', 'e28087').'World'.pack('H*', 'c2a0')."!\";\n",
+ ['use_escape_sequences_in_strings' => false]
+ ),
+ ],
+ null,
+ 'Risky when strings contain intended invisible characters.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(self::$tokens);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('use_escape_sequences_in_strings', 'Whether characters should be replaced with escape sequences in strings.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $replacements = [];
+ $escapeSequences = [];
+
+ foreach ($this->symbolsReplace as $character => [$replacement, $codepoint]) {
+ $replacements[$character] = $replacement;
+ $escapeSequences[$character] = '\u{'.$codepoint.'}';
+ }
+
+ foreach ($tokens as $index => $token) {
+ $content = $token->getContent();
+
+ if (
+ $this->configuration['use_escape_sequences_in_strings']
+ && $token->isGivenKind([T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE])
+ ) {
+ if (!Preg::match('/'.implode('|', array_keys($escapeSequences)).'/', $content)) {
+ continue;
+ }
+
+ $previousToken = $tokens[$index - 1];
+ $stringTypeChanged = false;
+ $swapQuotes = false;
+
+ if ($previousToken->isGivenKind(T_START_HEREDOC)) {
+ $previousTokenContent = $previousToken->getContent();
+
+ if (str_contains($previousTokenContent, '\'')) {
+ $tokens[$index - 1] = new Token([T_START_HEREDOC, str_replace('\'', '', $previousTokenContent)]);
+ $stringTypeChanged = true;
+ }
+ } elseif (str_starts_with($content, "'")) {
+ $stringTypeChanged = true;
+ $swapQuotes = true;
+ }
+
+ if ($swapQuotes) {
+ $content = str_replace("\\'", "'", $content);
+ }
+
+ if ($stringTypeChanged) {
+ $content = Preg::replace('/(\\\\{1,2})/', '\\\\\\\\', $content);
+ $content = str_replace('$', '\$', $content);
+ }
+
+ if ($swapQuotes) {
+ $content = str_replace('"', '\"', $content);
+ $content = Preg::replace('/^\'(.*)\'$/', '"$1"', $content);
+ }
+
+ $tokens[$index] = new Token([$token->getId(), strtr($content, $escapeSequences)]);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(self::$tokens)) {
+ $tokens[$index] = new Token([$token->getId(), strtr($content, $replacements)]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php
new file mode 100644
index 0000000..1e6755f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/OctalNotationFixer.php
@@ -0,0 +1,74 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Basic;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class OctalNotationFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Literal octal must be in `0o` notation.',
+ [
+ new VersionSpecificCodeSample(
+ "<?php \$foo = 0123;\n",
+ new VersionSpecification(80100)
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \PHP_VERSION_ID >= 80100 && $tokens->isTokenKindFound(T_LNUMBER);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_LNUMBER)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+
+ if (1 !== Preg::match('#^0\d+$#', $content)) {
+ continue;
+ }
+
+ $tokens[$index] = 1 === Preg::match('#^0+$#', $content)
+ ? new Token([T_LNUMBER, '0'])
+ : new Token([T_LNUMBER, '0o'.substr($content, 1)])
+ ;
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php
new file mode 100644
index 0000000..3d22c4e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Basic/PsrAutoloadingFixer.php
@@ -0,0 +1,292 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Basic;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\FileSpecificCodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\StdinFileInfo;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Bram Gotink <bram@gotink.me>
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class PsrAutoloadingFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Classes must be in a path that matches their namespace, be at least one namespace deep and the class name should match the file name.',
+ [
+ new FileSpecificCodeSample(
+ '<?php
+namespace PhpCsFixer\FIXER\Basic;
+class InvalidName {}
+',
+ new \SplFileInfo(__FILE__)
+ ),
+ new FileSpecificCodeSample(
+ '<?php
+namespace PhpCsFixer\FIXER\Basic;
+class InvalidName {}
+',
+ new \SplFileInfo(__FILE__),
+ ['dir' => './src']
+ ),
+ ],
+ null,
+ 'This fixer may change your class name, which will break the code that depends on the old name.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if (null !== $this->configuration['dir']) {
+ $this->configuration['dir'] = realpath($this->configuration['dir']);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports(\SplFileInfo $file): bool
+ {
+ if ($file instanceof StdinFileInfo) {
+ return false;
+ }
+
+ if (
+ // ignore file with extension other than php
+ ('php' !== $file->getExtension())
+ // ignore file with name that cannot be a class name
+ || 0 === Preg::match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $file->getBasename('.php'))
+ ) {
+ return false;
+ }
+
+ try {
+ $tokens = Tokens::fromCode(sprintf('<?php class %s {}', $file->getBasename('.php')));
+
+ if ($tokens[3]->isKeyword() || $tokens[3]->isMagicConstant()) {
+ // name cannot be a class name - detected by PHP 5.x
+ return false;
+ }
+ } catch (\ParseError $e) {
+ // name cannot be a class name - detected by PHP 7.x
+ return false;
+ }
+
+ // ignore stubs/fixtures, since they typically contain invalid files for various reasons
+ return !Preg::match('{[/\\\\](stub|fixture)s?[/\\\\]}i', $file->getRealPath());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('dir', 'If provided, the directory where the project code is placed.'))
+ ->setAllowedTypes(['null', 'string'])
+ ->setDefault(null)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokenAnalyzer = new TokensAnalyzer($tokens);
+
+ if (null !== $this->configuration['dir'] && !str_starts_with($file->getRealPath(), $this->configuration['dir'])) {
+ return;
+ }
+
+ $namespace = null;
+ $namespaceStartIndex = null;
+ $namespaceEndIndex = null;
+
+ $classyName = null;
+ $classyIndex = null;
+
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind(T_NAMESPACE)) {
+ if (null !== $namespace) {
+ return;
+ }
+
+ $namespaceStartIndex = $tokens->getNextMeaningfulToken($index);
+ $namespaceEndIndex = $tokens->getNextTokenOfKind($namespaceStartIndex, [';']);
+ $namespace = trim($tokens->generatePartialCode($namespaceStartIndex, $namespaceEndIndex - 1));
+ } elseif ($token->isClassy()) {
+ if ($tokenAnalyzer->isAnonymousClass($index)) {
+ continue;
+ }
+
+ if (null !== $classyName) {
+ return;
+ }
+
+ $classyIndex = $tokens->getNextMeaningfulToken($index);
+ $classyName = $tokens[$classyIndex]->getContent();
+ }
+ }
+
+ if (null === $classyName) {
+ return;
+ }
+
+ $expectedClassyName = $this->calculateClassyName($file, $namespace, $classyName);
+
+ if ($classyName !== $expectedClassyName) {
+ $tokens[$classyIndex] = new Token([T_STRING, $expectedClassyName]);
+ }
+
+ if (null === $this->configuration['dir'] || null === $namespace) {
+ return;
+ }
+
+ if (!is_dir($this->configuration['dir'])) {
+ return;
+ }
+
+ $configuredDir = realpath($this->configuration['dir']);
+ $fileDir = \dirname($file->getRealPath());
+
+ if (\strlen($configuredDir) >= \strlen($fileDir)) {
+ return;
+ }
+
+ $newNamespace = substr(str_replace('/', '\\', $fileDir), \strlen($configuredDir) + 1);
+ $originalNamespace = substr($namespace, -\strlen($newNamespace));
+
+ if ($originalNamespace !== $newNamespace && strtolower($originalNamespace) === strtolower($newNamespace)) {
+ $tokens->clearRange($namespaceStartIndex, $namespaceEndIndex);
+ $namespace = substr($namespace, 0, -\strlen($newNamespace)).$newNamespace;
+
+ $newNamespace = Tokens::fromCode('<?php namespace '.$namespace.';');
+ $newNamespace->clearRange(0, 2);
+ $newNamespace->clearEmptyTokens();
+
+ $tokens->insertAt($namespaceStartIndex, $newNamespace);
+ }
+ }
+
+ private function calculateClassyName(\SplFileInfo $file, ?string $namespace, string $currentName): string
+ {
+ $name = $file->getBasename('.php');
+ $maxNamespace = $this->calculateMaxNamespace($file, $namespace);
+
+ if (null !== $this->configuration['dir']) {
+ return ('' !== $maxNamespace ? (str_replace('\\', '_', $maxNamespace).'_') : '').$name;
+ }
+
+ $namespaceParts = array_reverse(explode('\\', $maxNamespace));
+
+ foreach ($namespaceParts as $namespacePart) {
+ $nameCandidate = sprintf('%s_%s', $namespacePart, $name);
+
+ if (strtolower($nameCandidate) !== strtolower(substr($currentName, -\strlen($nameCandidate)))) {
+ break;
+ }
+
+ $name = $nameCandidate;
+ }
+
+ return $name;
+ }
+
+ private function calculateMaxNamespace(\SplFileInfo $file, ?string $namespace): string
+ {
+ if (null === $this->configuration['dir']) {
+ $root = \dirname($file->getRealPath());
+
+ while ($root !== \dirname($root)) {
+ $root = \dirname($root);
+ }
+ } else {
+ $root = realpath($this->configuration['dir']);
+ }
+
+ $namespaceAccordingToFileLocation = trim(str_replace(\DIRECTORY_SEPARATOR, '\\', substr(\dirname($file->getRealPath()), \strlen($root))), '\\');
+
+ if (null === $namespace) {
+ return $namespaceAccordingToFileLocation;
+ }
+
+ $namespaceAccordingToFileLocationPartsReversed = array_reverse(explode('\\', $namespaceAccordingToFileLocation));
+ $namespacePartsReversed = array_reverse(explode('\\', $namespace));
+
+ foreach ($namespacePartsReversed as $key => $namespaceParte) {
+ if (!isset($namespaceAccordingToFileLocationPartsReversed[$key])) {
+ break;
+ }
+
+ if (strtolower($namespaceParte) !== strtolower($namespaceAccordingToFileLocationPartsReversed[$key])) {
+ break;
+ }
+
+ unset($namespaceAccordingToFileLocationPartsReversed[$key]);
+ }
+
+ return implode('\\', array_reverse($namespaceAccordingToFileLocationPartsReversed));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php
new file mode 100644
index 0000000..5b71c64
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/ConstantCaseFixer.php
@@ -0,0 +1,154 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for constants case.
+ *
+ * @author Pol Dellaiera <pol.dellaiera@protonmail.com>
+ */
+final class ConstantCaseFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * Hold the function that will be used to convert the constants.
+ *
+ * @var callable
+ */
+ private $fixFunction;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if ('lower' === $this->configuration['case']) {
+ $this->fixFunction = static function (string $content): string {
+ return strtolower($content);
+ };
+ }
+
+ if ('upper' === $this->configuration['case']) {
+ $this->fixFunction = static function (string $content): string {
+ return strtoupper($content);
+ };
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The PHP constants `true`, `false`, and `null` MUST be written using the correct casing.',
+ [
+ new CodeSample("<?php\n\$a = FALSE;\n\$b = True;\n\$c = nuLL;\n"),
+ new CodeSample("<?php\n\$a = FALSE;\n\$b = True;\n\$c = nuLL;\n", ['case' => 'upper']),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('case', 'Whether to use the `upper` or `lower` case syntax.'))
+ ->setAllowedValues(['upper', 'lower'])
+ ->setDefault('lower')
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $fixFunction = $this->fixFunction;
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isNativeConstant()) {
+ continue;
+ }
+
+ if (
+ $this->isNeighbourAccepted($tokens, $tokens->getPrevMeaningfulToken($index))
+ && $this->isNeighbourAccepted($tokens, $tokens->getNextMeaningfulToken($index))
+ ) {
+ $tokens[$index] = new Token([$token->getId(), $fixFunction($token->getContent())]);
+ }
+ }
+ }
+
+ private function isNeighbourAccepted(Tokens $tokens, int $index): bool
+ {
+ static $forbiddenTokens = null;
+
+ if (null === $forbiddenTokens) {
+ $forbiddenTokens = array_merge(
+ [
+ T_AS,
+ T_CLASS,
+ T_CONST,
+ T_EXTENDS,
+ T_IMPLEMENTS,
+ T_INSTANCEOF,
+ T_INSTEADOF,
+ T_INTERFACE,
+ T_NEW,
+ T_NS_SEPARATOR,
+ T_PAAMAYIM_NEKUDOTAYIM,
+ T_TRAIT,
+ T_USE,
+ CT::T_USE_TRAIT,
+ CT::T_USE_LAMBDA,
+ ],
+ Token::getObjectOperatorKinds()
+ );
+ }
+
+ $token = $tokens[$index];
+
+ if ($token->equalsAny(['{', '}'])) {
+ return false;
+ }
+
+ return !$token->isGivenKind($forbiddenTokens);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php
new file mode 100644
index 0000000..5d262ff
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/IntegerLiteralCaseFixer.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class IntegerLiteralCaseFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Integer literals must be in correct case.',
+ [
+ new CodeSample(
+ "<?php\n\$foo = 0Xff;\n\$bar = 0B11111111;\n"
+ ),
+ ]
+ );
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_LNUMBER);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_LNUMBER)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+
+ if (1 !== Preg::match('#^0[bxoBXO][0-9a-fA-F]+$#', $content)) {
+ continue;
+ }
+
+ $newContent = '0'.strtolower($content[1]).strtoupper(substr($content, 2));
+
+ if ($content === $newContent) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([T_LNUMBER, $newContent]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseKeywordsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseKeywordsFixer.php
new file mode 100644
index 0000000..9edd6d0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseKeywordsFixer.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶2.5.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class LowercaseKeywordsFixer extends AbstractFixer
+{
+ /**
+ * @var int[]
+ */
+ private static $excludedTokens = [T_HALT_COMPILER];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHP keywords MUST be in lower case.',
+ [
+ new CodeSample(
+ '<?php
+ FOREACH($a AS $B) {
+ TRY {
+ NEW $C($a, ISSET($B));
+ WHILE($B) {
+ INCLUDE "test.php";
+ }
+ } CATCH(\Exception $e) {
+ EXIT(1);
+ }
+ }
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getKeywords());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if ($token->isKeyword() && !$token->isGivenKind(self::$excludedTokens)) {
+ $tokens[$index] = new Token([$token->getId(), strtolower($token->getContent())]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseStaticReferenceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseStaticReferenceFixer.php
new file mode 100644
index 0000000..770e66a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/LowercaseStaticReferenceFixer.php
@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class LowercaseStaticReferenceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Class static references `self`, `static` and `parent` MUST be in lower case.',
+ [
+ new CodeSample('<?php
+class Foo extends Bar
+{
+ public function baz1()
+ {
+ return STATIC::baz2();
+ }
+
+ public function baz2($x)
+ {
+ return $x instanceof Self;
+ }
+
+ public function baz3(PaRent $x)
+ {
+ return true;
+ }
+}
+'),
+ new CodeSample(
+ '<?php
+class Foo extends Bar
+{
+ public function baz(?self $x) : SELF
+ {
+ return false;
+ }
+}
+'
+ ),
+ ]
+ );
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_STATIC, T_STRING]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->equalsAny([[T_STRING, 'self'], [T_STATIC, 'static'], [T_STRING, 'parent']], false)) {
+ continue;
+ }
+
+ $newContent = strtolower($token->getContent());
+ if ($token->getContent() === $newContent) {
+ continue; // case is already correct
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prevIndex]->isGivenKind([T_CONST, T_DOUBLE_COLON, T_FUNCTION, T_NAMESPACE, T_NS_SEPARATOR]) || $tokens[$prevIndex]->isObjectOperator()) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ if ($tokens[$nextIndex]->isGivenKind([T_FUNCTION, T_NS_SEPARATOR, T_PRIVATE, T_PROTECTED, T_PUBLIC, T_STRING, CT::T_NULLABLE_TYPE])) {
+ continue;
+ }
+
+ if ('static' === $newContent && $tokens[$nextIndex]->isGivenKind(T_VARIABLE)) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([$token->getId(), $newContent]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicConstantCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicConstantCasingFixer.php
new file mode 100644
index 0000000..3cfae9b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicConstantCasingFixer.php
@@ -0,0 +1,101 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author ntzm
+ */
+final class MagicConstantCasingFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Magic constants should be referred to using the correct casing.',
+ [new CodeSample("<?php\necho __dir__;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound($this->getMagicConstantTokens());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $magicConstants = $this->getMagicConstants();
+ $magicConstantTokens = $this->getMagicConstantTokens();
+
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind($magicConstantTokens)) {
+ $tokens[$index] = new Token([$token->getId(), $magicConstants[$token->getId()]]);
+ }
+ }
+ }
+
+ /**
+ * @return array<int, string>
+ */
+ private function getMagicConstants(): array
+ {
+ static $magicConstants = null;
+
+ if (null === $magicConstants) {
+ $magicConstants = [
+ T_LINE => '__LINE__',
+ T_FILE => '__FILE__',
+ T_DIR => '__DIR__',
+ T_FUNC_C => '__FUNCTION__',
+ T_CLASS_C => '__CLASS__',
+ T_METHOD_C => '__METHOD__',
+ T_NS_C => '__NAMESPACE__',
+ CT::T_CLASS_CONSTANT => 'class',
+ T_TRAIT_C => '__TRAIT__',
+ ];
+ }
+
+ return $magicConstants;
+ }
+
+ /**
+ * @return array<int>
+ */
+ private function getMagicConstantTokens(): array
+ {
+ static $magicConstantTokens = null;
+
+ if (null === $magicConstantTokens) {
+ $magicConstantTokens = array_keys($this->getMagicConstants());
+ }
+
+ return $magicConstantTokens;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php
new file mode 100644
index 0000000..c9d4f91
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/MagicMethodCasingFixer.php
@@ -0,0 +1,206 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class MagicMethodCasingFixer extends AbstractFixer
+{
+ /**
+ * @var array<string,string>
+ */
+ private static $magicNames = [
+ '__call' => '__call',
+ '__callstatic' => '__callStatic',
+ '__clone' => '__clone',
+ '__construct' => '__construct',
+ '__debuginfo' => '__debugInfo',
+ '__destruct' => '__destruct',
+ '__get' => '__get',
+ '__invoke' => '__invoke',
+ '__isset' => '__isset',
+ '__serialize' => '__serialize',
+ '__set' => '__set',
+ '__set_state' => '__set_state',
+ '__sleep' => '__sleep',
+ '__tostring' => '__toString',
+ '__unserialize' => '__unserialize',
+ '__unset' => '__unset',
+ '__wakeup' => '__wakeup',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Magic method definitions and calls must be using the correct casing.',
+ [
+ new CodeSample(
+ '<?php
+class Foo
+{
+ public function __Sleep()
+ {
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+$foo->__INVOKE(1);
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING) && $tokens->isAnyTokenKindsFound(array_merge([T_FUNCTION, T_DOUBLE_COLON], Token::getObjectOperatorKinds()));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $inClass = 0;
+ $tokenCount = \count($tokens);
+
+ for ($index = 1; $index < $tokenCount - 2; ++$index) {
+ if (0 === $inClass && $tokens[$index]->isClassy()) {
+ $inClass = 1;
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+
+ continue;
+ }
+
+ if (0 !== $inClass) {
+ if ($tokens[$index]->equals('{')) {
+ ++$inClass;
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals('}')) {
+ --$inClass;
+
+ continue;
+ }
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ continue; // wrong type
+ }
+
+ $content = $tokens[$index]->getContent();
+
+ if (!str_starts_with($content, '__')) {
+ continue; // cheap look ahead
+ }
+
+ $name = strtolower($content);
+
+ if (!$this->isMagicMethodName($name)) {
+ continue; // method name is not one of the magic ones we can fix
+ }
+
+ $nameInCorrectCasing = $this->getMagicMethodNameInCorrectCasing($name);
+ if ($nameInCorrectCasing === $content) {
+ continue; // method name is already in the correct casing, no fix needed
+ }
+
+ if ($this->isFunctionSignature($tokens, $index)) {
+ if (0 !== $inClass) {
+ // this is a method definition we want to fix
+ $this->setTokenToCorrectCasing($tokens, $index, $nameInCorrectCasing);
+ }
+
+ continue;
+ }
+
+ if ($this->isMethodCall($tokens, $index)) {
+ $this->setTokenToCorrectCasing($tokens, $index, $nameInCorrectCasing);
+
+ continue;
+ }
+
+ if (
+ ('__callstatic' === $name || '__set_state' === $name)
+ && $this->isStaticMethodCall($tokens, $index)
+ ) {
+ $this->setTokenToCorrectCasing($tokens, $index, $nameInCorrectCasing);
+ }
+ }
+ }
+
+ private function isFunctionSignature(Tokens $tokens, int $index): bool
+ {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$prevIndex]->isGivenKind(T_FUNCTION)) {
+ return false; // not a method signature
+ }
+
+ return $tokens[$tokens->getNextMeaningfulToken($index)]->equals('(');
+ }
+
+ private function isMethodCall(Tokens $tokens, int $index): bool
+ {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$prevIndex]->isObjectOperator()) {
+ return false; // not a "simple" method call
+ }
+
+ return $tokens[$tokens->getNextMeaningfulToken($index)]->equals('(');
+ }
+
+ private function isStaticMethodCall(Tokens $tokens, int $index): bool
+ {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$prevIndex]->isGivenKind(T_DOUBLE_COLON)) {
+ return false; // not a "simple" static method call
+ }
+
+ return $tokens[$tokens->getNextMeaningfulToken($index)]->equals('(');
+ }
+
+ private function isMagicMethodName(string $name): bool
+ {
+ return isset(self::$magicNames[$name]);
+ }
+
+ /**
+ * @param string $name name of a magic method
+ */
+ private function getMagicMethodNameInCorrectCasing(string $name): string
+ {
+ return self::$magicNames[$name];
+ }
+
+ private function setTokenToCorrectCasing(Tokens $tokens, int $index, string $nameInCorrectCasing): void
+ {
+ $tokens[$index] = new Token([T_STRING, $nameInCorrectCasing]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php
new file mode 100644
index 0000000..cf0f68d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionCasingFixer.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NativeFunctionCasingFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Function defined by PHP should be called using the correct casing.',
+ [new CodeSample("<?php\nSTRLEN(\$str);\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after FunctionToConstantFixer, NoUselessSprintfFixer, PowToExponentiationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ static $nativeFunctionNames = null;
+
+ if (null === $nativeFunctionNames) {
+ $nativeFunctionNames = $this->getNativeFunctionNames();
+ }
+
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ // test if we are at a function all
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ // test if the function call is to a native PHP function
+ $lower = strtolower($tokens[$index]->getContent());
+ if (!\array_key_exists($lower, $nativeFunctionNames)) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([T_STRING, $nativeFunctionNames[$lower]]);
+ }
+ }
+
+ /**
+ * @return array<string, string>
+ */
+ private function getNativeFunctionNames(): array
+ {
+ $allFunctions = get_defined_functions();
+ $functions = [];
+ foreach ($allFunctions['internal'] as $function) {
+ $functions[strtolower($function)] = $function;
+ }
+
+ return $functions;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php
new file mode 100644
index 0000000..3d2bdde
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Casing/NativeFunctionTypeDeclarationCasingFixer.php
@@ -0,0 +1,176 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Casing;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\TypeAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NativeFunctionTypeDeclarationCasingFixer extends AbstractFixer
+{
+ /**
+ * https://secure.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.
+ *
+ * self PHP 5.0
+ * array PHP 5.1
+ * callable PHP 5.4
+ * bool PHP 7.0
+ * float PHP 7.0
+ * int PHP 7.0
+ * string PHP 7.0
+ * iterable PHP 7.1
+ * void PHP 7.1
+ * object PHP 7.2
+ * static PHP 8.0 (return type only)
+ * mixed PHP 8.0
+ * never PHP 8.1
+ *
+ * @var array<string, true>
+ */
+ private $hints;
+
+ /**
+ * @var FunctionsAnalyzer
+ */
+ private $functionsAnalyzer;
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->hints = [
+ 'array' => true,
+ 'callable' => true,
+ 'self' => true,
+ ];
+
+ $this->hints = array_merge(
+ $this->hints,
+ [
+ 'bool' => true,
+ 'float' => true,
+ 'int' => true,
+ 'string' => true,
+ ]
+ );
+
+ $this->hints = array_merge(
+ $this->hints,
+ [
+ 'iterable' => true,
+ 'void' => true,
+ ]
+ );
+
+ if (\PHP_VERSION_ID >= 70200) {
+ $this->hints = array_merge($this->hints, ['object' => true]);
+ }
+
+ if (\PHP_VERSION_ID >= 80000) {
+ $this->hints = array_merge($this->hints, ['static' => true]);
+ $this->hints = array_merge($this->hints, ['mixed' => true]);
+ }
+
+ if (\PHP_VERSION_ID >= 80100) {
+ $this->hints = array_merge($this->hints, ['never' => true]);
+ }
+
+ $this->functionsAnalyzer = new FunctionsAnalyzer();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Native type hints for functions should use the correct case.',
+ [
+ new CodeSample("<?php\nclass Bar {\n public function Foo(CALLABLE \$bar)\n {\n return 1;\n }\n}\n"),
+ new CodeSample(
+ "<?php\nfunction Foo(INT \$a): Bool\n{\n return true;\n}\n"
+ ),
+ new CodeSample(
+ "<?php\nfunction Foo(Iterable \$a): VOID\n{\n echo 'Hello world';\n}\n"
+ ),
+ new VersionSpecificCodeSample(
+ "<?php\nfunction Foo(Object \$a)\n{\n return 'hi!';\n}\n",
+ new VersionSpecification(70200)
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_FUNCTION, T_STRING]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ $this->fixFunctionReturnType($tokens, $index);
+ $this->fixFunctionArgumentTypes($tokens, $index);
+ }
+ }
+ }
+
+ private function fixFunctionArgumentTypes(Tokens $tokens, int $index): void
+ {
+ foreach ($this->functionsAnalyzer->getFunctionArguments($tokens, $index) as $argument) {
+ $this->fixArgumentType($tokens, $argument->getTypeAnalysis());
+ }
+ }
+
+ private function fixFunctionReturnType(Tokens $tokens, int $index): void
+ {
+ $this->fixArgumentType($tokens, $this->functionsAnalyzer->getFunctionReturnType($tokens, $index));
+ }
+
+ private function fixArgumentType(Tokens $tokens, ?TypeAnalysis $type = null): void
+ {
+ if (null === $type) {
+ return;
+ }
+
+ for ($index = $type->getStartIndex(); $index <= $type->getEndIndex(); ++$index) {
+ if ($tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ $lowerCasedName = strtolower($tokens[$index]->getContent());
+
+ if (!isset($this->hints[$lowerCasedName])) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([$tokens[$index]->getId(), $lowerCasedName]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php
new file mode 100644
index 0000000..5310960
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/CastSpacesFixer.php
@@ -0,0 +1,130 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\CastNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class CastSpacesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ private const INSIDE_CAST_SPACE_REPLACE_MAP = [
+ ' ' => '',
+ "\t" => '',
+ "\n" => '',
+ "\r" => '',
+ "\0" => '',
+ "\x0B" => '',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'A single space or none should be between cast and variable.',
+ [
+ new CodeSample(
+ "<?php\n\$bar = ( string ) \$a;\n\$foo = (int)\$b;\n"
+ ),
+ new CodeSample(
+ "<?php\n\$bar = ( string ) \$a;\n\$foo = (int)\$b;\n",
+ ['space' => 'single']
+ ),
+ new CodeSample(
+ "<?php\n\$bar = ( string ) \$a;\n\$foo = (int) \$b;\n",
+ ['space' => 'none']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoShortBoolCastFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getCastTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isCast()) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([
+ $token->getId(),
+ strtr($token->getContent(), self::INSIDE_CAST_SPACE_REPLACE_MAP),
+ ]);
+
+ if ('single' === $this->configuration['space']) {
+ // force single whitespace after cast token:
+ if ($tokens[$index + 1]->isWhitespace(" \t")) {
+ // - if next token is whitespaces that contains only spaces and tabs - override next token with single space
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ } elseif (!$tokens[$index + 1]->isWhitespace()) {
+ // - if next token is not whitespaces that contains spaces, tabs and new lines - append single space to current token
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ continue;
+ }
+
+ // force no whitespace after cast token:
+ if ($tokens[$index + 1]->isWhitespace()) {
+ $tokens->clearAt($index + 1);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('space', 'spacing to apply between cast and variable.'))
+ ->setAllowedValues(['none', 'single'])
+ ->setDefault('single')
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php
new file mode 100644
index 0000000..f0e30ce
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/LowercaseCastFixer.php
@@ -0,0 +1,95 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\CastNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class LowercaseCastFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Cast should be written in lower case.',
+ [
+ new VersionSpecificCodeSample(
+ '<?php
+ $a = (BOOLEAN) $b;
+ $a = (BOOL) $b;
+ $a = (INTEGER) $b;
+ $a = (INT) $b;
+ $a = (DOUBLE) $b;
+ $a = (FLoaT) $b;
+ $a = (reaL) $b;
+ $a = (flOAT) $b;
+ $a = (sTRING) $b;
+ $a = (ARRAy) $b;
+ $a = (OBJect) $b;
+ $a = (UNset) $b;
+ $a = (Binary) $b;
+',
+ new VersionSpecification(null, 70399)
+ ),
+ new VersionSpecificCodeSample(
+ '<?php
+ $a = (BOOLEAN) $b;
+ $a = (BOOL) $b;
+ $a = (INTEGER) $b;
+ $a = (INT) $b;
+ $a = (DOUBLE) $b;
+ $a = (FLoaT) $b;
+ $a = (flOAT) $b;
+ $a = (sTRING) $b;
+ $a = (ARRAy) $b;
+ $a = (OBJect) $b;
+ $a = (UNset) $b;
+ $a = (Binary) $b;
+',
+ new VersionSpecification(70400)
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getCastTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ if (!$tokens[$index]->isCast()) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([$tokens[$index]->getId(), strtolower($tokens[$index]->getContent())]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php
new file mode 100644
index 0000000..ac7d8b0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ModernizeTypesCastingFixer.php
@@ -0,0 +1,160 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\CastNotation;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ */
+final class ModernizeTypesCastingFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replaces `intval`, `floatval`, `doubleval`, `strval` and `boolval` function calls with according type casting operator.',
+ [
+ new CodeSample(
+ '<?php
+ $a = intval($b);
+ $a = floatval($b);
+ $a = doubleval($b);
+ $a = strval ($b);
+ $a = boolval($b);
+'
+ ),
+ ],
+ null,
+ 'Risky if any of the functions `intval`, `floatval`, `doubleval`, `strval` or `boolval` are overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // replacement patterns
+ static $replacement = [
+ 'intval' => [T_INT_CAST, '(int)'],
+ 'floatval' => [T_DOUBLE_CAST, '(float)'],
+ 'doubleval' => [T_DOUBLE_CAST, '(float)'],
+ 'strval' => [T_STRING_CAST, '(string)'],
+ 'boolval' => [T_BOOL_CAST, '(bool)'],
+ ];
+
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ foreach ($replacement as $functionIdentity => $newToken) {
+ $currIndex = 0;
+
+ do {
+ // try getting function reference and translate boundaries for humans
+ $boundaries = $this->find($functionIdentity, $tokens, $currIndex, $tokens->count() - 1);
+
+ if (null === $boundaries) {
+ // next function search, as current one not found
+ continue 2;
+ }
+
+ [$functionName, $openParenthesis, $closeParenthesis] = $boundaries;
+
+ // analysing cursor shift
+ $currIndex = $openParenthesis;
+
+ // indicator that the function is overridden
+ if (1 !== $argumentsAnalyzer->countArguments($tokens, $openParenthesis, $closeParenthesis)) {
+ continue;
+ }
+
+ $paramContentEnd = $closeParenthesis;
+ $commaCandidate = $tokens->getPrevMeaningfulToken($paramContentEnd);
+
+ if ($tokens[$commaCandidate]->equals(',')) {
+ $tokens->removeTrailingWhitespace($commaCandidate);
+ $tokens->clearAt($commaCandidate);
+ $paramContentEnd = $commaCandidate;
+ }
+
+ // check if something complex passed as an argument and preserve parenthesises then
+ $countParamTokens = 0;
+
+ for ($paramContentIndex = $openParenthesis + 1; $paramContentIndex < $paramContentEnd; ++$paramContentIndex) {
+ //not a space, means some sensible token
+ if (!$tokens[$paramContentIndex]->isGivenKind(T_WHITESPACE)) {
+ ++$countParamTokens;
+ }
+ }
+
+ $preserveParentheses = $countParamTokens > 1;
+
+ $afterCloseParenthesisIndex = $tokens->getNextMeaningfulToken($closeParenthesis);
+ $afterCloseParenthesisToken = $tokens[$afterCloseParenthesisIndex];
+ $wrapInParentheses = $afterCloseParenthesisToken->equalsAny(['[', '{']) || $afterCloseParenthesisToken->isGivenKind(T_POW);
+
+ // analyse namespace specification (root one or none) and decide what to do
+ $prevTokenIndex = $tokens->getPrevMeaningfulToken($functionName);
+
+ if ($tokens[$prevTokenIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ // get rid of root namespace when it used
+ $tokens->removeTrailingWhitespace($prevTokenIndex);
+ $tokens->clearAt($prevTokenIndex);
+ }
+
+ // perform transformation
+ $replacementSequence = [
+ new Token($newToken),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ if ($wrapInParentheses) {
+ array_unshift($replacementSequence, new Token('('));
+ }
+
+ if (!$preserveParentheses) {
+ // closing parenthesis removed with leading spaces
+ $tokens->removeLeadingWhitespace($closeParenthesis);
+ $tokens->clearAt($closeParenthesis);
+
+ // opening parenthesis removed with trailing spaces
+ $tokens->removeLeadingWhitespace($openParenthesis);
+ $tokens->removeTrailingWhitespace($openParenthesis);
+ $tokens->clearAt($openParenthesis);
+ } else {
+ // we'll need to provide a space after a casting operator
+ $tokens->removeTrailingWhitespace($functionName);
+ }
+
+ if ($wrapInParentheses) {
+ $tokens->insertAt($closeParenthesis, new Token(')'));
+ }
+
+ $tokens->overrideRange($functionName, $functionName, $replacementSequence);
+
+ // nested transformations support
+ $currIndex = $functionName;
+ } while (null !== $currIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoShortBoolCastFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoShortBoolCastFixer.php
new file mode 100644
index 0000000..d802d49
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoShortBoolCastFixer.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\CastNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoShortBoolCastFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before CastSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -9;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Short cast `bool` using double exclamation mark should not be used.',
+ [new CodeSample("<?php\n\$a = !!\$b;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('!');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index > 1; --$index) {
+ if ($tokens[$index]->equals('!')) {
+ $index = $this->fixShortCast($tokens, $index);
+ }
+ }
+ }
+
+ private function fixShortCast(Tokens $tokens, int $index): int
+ {
+ for ($i = $index - 1; $i > 1; --$i) {
+ if ($tokens[$i]->equals('!')) {
+ $this->fixShortCastToBoolCast($tokens, $i, $index);
+
+ break;
+ }
+
+ if (!$tokens[$i]->isComment() && !$tokens[$i]->isWhitespace()) {
+ break;
+ }
+ }
+
+ return $i;
+ }
+
+ private function fixShortCastToBoolCast(Tokens $tokens, int $start, int $end): void
+ {
+ for (; $start <= $end; ++$start) {
+ if (
+ !$tokens[$start]->isComment()
+ && !($tokens[$start]->isWhitespace() && $tokens[$start - 1]->isComment())
+ ) {
+ $tokens->clearAt($start);
+ }
+ }
+
+ $tokens->insertAt($start, new Token([T_BOOL_CAST, '(bool)']));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoUnsetCastFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoUnsetCastFixer.php
new file mode 100644
index 0000000..c75f8ba
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/NoUnsetCastFixer.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\CastNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoUnsetCastFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Variables must be set `null` instead of using `(unset)` casting.',
+ [new CodeSample("<?php\n\$a = (unset) \$b;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_UNSET_CAST);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index > 0; --$index) {
+ if ($tokens[$index]->isGivenKind(T_UNSET_CAST)) {
+ $this->fixUnsetCast($tokens, $index);
+ }
+ }
+ }
+
+ private function fixUnsetCast(Tokens $tokens, int $index): void
+ {
+ $assignmentIndex = $tokens->getPrevMeaningfulToken($index);
+ if (null === $assignmentIndex || !$tokens[$assignmentIndex]->equals('=')) {
+ return;
+ }
+
+ $varIndex = $tokens->getNextMeaningfulToken($index);
+ if (null === $varIndex || !$tokens[$varIndex]->isGivenKind(T_VARIABLE)) {
+ return;
+ }
+
+ $afterVar = $tokens->getNextMeaningfulToken($varIndex);
+ if (null === $afterVar || !$tokens[$afterVar]->equalsAny([';', [T_CLOSE_TAG]])) {
+ return;
+ }
+
+ $nextIsWhiteSpace = $tokens[$assignmentIndex + 1]->isWhitespace();
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($varIndex);
+
+ ++$assignmentIndex;
+ if (!$nextIsWhiteSpace) {
+ $tokens->insertAt($assignmentIndex, new Token([T_WHITESPACE, ' ']));
+ }
+
+ ++$assignmentIndex;
+ $tokens->insertAt($assignmentIndex, new Token([T_STRING, 'null']));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ShortScalarCastFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ShortScalarCastFixer.php
new file mode 100644
index 0000000..983effd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/CastNotation/ShortScalarCastFixer.php
@@ -0,0 +1,86 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\CastNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class ShortScalarCastFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Cast `(boolean)` and `(integer)` should be written as `(bool)` and `(int)`, `(double)` and `(real)` as `(float)`, `(binary)` as `(string)`.',
+ [
+ new VersionSpecificCodeSample(
+ "<?php\n\$a = (boolean) \$b;\n\$a = (integer) \$b;\n\$a = (double) \$b;\n\$a = (real) \$b;\n\n\$a = (binary) \$b;\n",
+ new VersionSpecification(null, 70399)
+ ),
+ new VersionSpecificCodeSample(
+ "<?php\n\$a = (boolean) \$b;\n\$a = (integer) \$b;\n\$a = (double) \$b;\n\n\$a = (binary) \$b;\n",
+ new VersionSpecification(70400)
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getCastTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $castMap = [
+ 'boolean' => 'bool',
+ 'integer' => 'int',
+ 'double' => 'float',
+ 'real' => 'float',
+ 'binary' => 'string',
+ ];
+
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ if (!$tokens[$index]->isCast()) {
+ continue;
+ }
+
+ $castFrom = trim(substr($tokens[$index]->getContent(), 1, -1));
+ $castFromLowered = strtolower($castFrom);
+
+ if (!\array_key_exists($castFromLowered, $castMap)) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([
+ $tokens[$index]->getId(),
+ str_replace($castFrom, $castMap[$castFromLowered], $tokens[$index]->getContent()),
+ ]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
new file mode 100644
index 0000000..61a1a42
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php
@@ -0,0 +1,577 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * Make sure there is one blank line above and below class elements.
+ *
+ * The exception is when an element is the first or last item in a 'classy'.
+ */
+final class ClassAttributesSeparationFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const SPACING_NONE = 'none';
+
+ /**
+ * @internal
+ */
+ public const SPACING_ONE = 'one';
+
+ private const SPACING_ONLY_IF_META = 'only_if_meta';
+
+ /**
+ * @var array<string, string>
+ */
+ private $classElementTypes = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->classElementTypes = []; // reset previous configuration
+
+ foreach ($this->configuration['elements'] as $elementType => $spacing) {
+ $this->classElementTypes[$elementType] = $spacing;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Class, trait and interface elements must be separated with one or none blank line.',
+ [
+ new CodeSample(
+ '<?php
+final class Sample
+{
+ protected function foo()
+ {
+ }
+ protected function bar()
+ {
+ }
+
+
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+class Sample
+{private $a; // foo
+ /** second in a hour */
+ private $b;
+}
+',
+ ['elements' => ['property' => self::SPACING_ONE]]
+ ),
+ new CodeSample(
+ '<?php
+class Sample
+{
+ const A = 1;
+ /** seconds in some hours */
+ const B = 3600;
+}
+',
+ ['elements' => ['const' => self::SPACING_ONE]]
+ ),
+ new CodeSample(
+ '<?php
+class Sample
+{
+ /** @var int */
+ const SECOND = 1;
+ /** @var int */
+ const MINUTE = 60;
+
+ const HOUR = 3600;
+
+ const DAY = 86400;
+}
+',
+ ['elements' => ['const' => self::SPACING_ONLY_IF_META]]
+ ),
+ new VersionSpecificCodeSample(
+ '<?php
+class Sample
+{
+ public $a;
+ #[SetUp]
+ public $b;
+ /** @var string */
+ public $c;
+ /** @internal */
+ #[Assert\String()]
+ public $d;
+
+ public $e;
+}
+',
+ new VersionSpecification(80000),
+ ['elements' => ['property' => self::SPACING_ONLY_IF_META]]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, IndentationTypeFixer, NoExtraBlankLinesFixer.
+ * Must run after OrderedClassElementsFixer, SingleClassElementPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 55;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($this->getElementsByClass($tokens) as $class) {
+ $elements = $class['elements'];
+ $elementCount = \count($elements);
+
+ if (0 === $elementCount) {
+ continue;
+ }
+
+ if (isset($this->classElementTypes[$elements[0]['type']])) {
+ $this->fixSpaceBelowClassElement($tokens, $class);
+ $this->fixSpaceAboveClassElement($tokens, $class, 0);
+ }
+
+ for ($index = 1; $index < $elementCount; ++$index) {
+ if (isset($this->classElementTypes[$elements[$index]['type']])) {
+ $this->fixSpaceAboveClassElement($tokens, $class, $index);
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('elements', 'Dictionary of `const|method|property|trait_import` => `none|one|only_if_meta` values.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $option): bool {
+ foreach ($option as $type => $spacing) {
+ $supportedTypes = ['const', 'method', 'property', 'trait_import'];
+
+ if (!\in_array($type, $supportedTypes, true)) {
+ throw new InvalidOptionsException(
+ sprintf(
+ 'Unexpected element type, expected any of "%s", got "%s".',
+ implode('", "', $supportedTypes),
+ \gettype($type).'#'.$type
+ )
+ );
+ }
+
+ $supportedSpacings = [self::SPACING_NONE, self::SPACING_ONE, self::SPACING_ONLY_IF_META];
+
+ if (!\in_array($spacing, $supportedSpacings, true)) {
+ throw new InvalidOptionsException(
+ sprintf(
+ 'Unexpected spacing for element type "%s", expected any of "%s", got "%s".',
+ $spacing,
+ implode('", "', $supportedSpacings),
+ \is_object($spacing) ? \get_class($spacing) : (null === $spacing ? 'null' : \gettype($spacing).'#'.$spacing)
+ )
+ );
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([
+ 'const' => self::SPACING_ONE,
+ 'method' => self::SPACING_ONE,
+ 'property' => self::SPACING_ONE,
+ 'trait_import' => self::SPACING_NONE,
+ ])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * Fix spacing above an element of a class, interface or trait.
+ *
+ * Deals with comments, PHPDocs and spaces above the element with respect to the position of the
+ * element within the class, interface or trait.
+ */
+ private function fixSpaceAboveClassElement(Tokens $tokens, array $class, int $elementIndex): void
+ {
+ $element = $class['elements'][$elementIndex];
+ $elementAboveEnd = isset($class['elements'][$elementIndex + 1]) ? $class['elements'][$elementIndex + 1]['end'] : 0;
+ $nonWhiteAbove = $tokens->getPrevNonWhitespace($element['start']);
+
+ // element is directly after class open brace
+ if ($nonWhiteAbove === $class['open']) {
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], 1);
+
+ return;
+ }
+
+ // deal with comments above an element
+ if ($tokens[$nonWhiteAbove]->isGivenKind(T_COMMENT)) {
+ // check if the comment belongs to the previous element
+ if ($elementAboveEnd === $nonWhiteAbove) {
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], $this->determineRequiredLineCount($tokens, $class, $elementIndex));
+
+ return;
+ }
+
+ // more than one line break, always bring it back to 2 line breaks between the element start and what is above it
+ if ($tokens[$nonWhiteAbove + 1]->isWhitespace() && substr_count($tokens[$nonWhiteAbove + 1]->getContent(), "\n") > 1) {
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], 2);
+
+ return;
+ }
+
+ // there are 2 cases:
+ if (
+ 1 === $element['start'] - $nonWhiteAbove
+ || $tokens[$nonWhiteAbove - 1]->isWhitespace() && substr_count($tokens[$nonWhiteAbove - 1]->getContent(), "\n") > 0
+ || $tokens[$nonWhiteAbove + 1]->isWhitespace() && substr_count($tokens[$nonWhiteAbove + 1]->getContent(), "\n") > 0
+ ) {
+ // 1. The comment is meant for the element (although not a PHPDoc),
+ // make sure there is one line break between the element and the comment...
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], 1);
+ // ... and make sure there is blank line above the comment (with the exception when it is directly after a class opening)
+ $nonWhiteAbove = $this->findCommentBlockStart($tokens, $nonWhiteAbove, $elementAboveEnd);
+ $nonWhiteAboveComment = $tokens->getPrevNonWhitespace($nonWhiteAbove);
+
+ $this->correctLineBreaks($tokens, $nonWhiteAboveComment, $nonWhiteAbove, $nonWhiteAboveComment === $class['open'] ? 1 : 2);
+ } else {
+ // 2. The comment belongs to the code above the element,
+ // make sure there is a blank line above the element (i.e. 2 line breaks)
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], 2);
+ }
+
+ return;
+ }
+
+ // deal with element with a PHPDoc/attribute above it
+ if ($tokens[$nonWhiteAbove]->isGivenKind([T_DOC_COMMENT, CT::T_ATTRIBUTE_CLOSE])) {
+ // there should be one linebreak between the element and the attribute above it
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], 1);
+
+ // make sure there is blank line above the comment (with the exception when it is directly after a class opening)
+ $nonWhiteAbove = $this->findCommentBlockStart($tokens, $nonWhiteAbove, $elementAboveEnd);
+ $nonWhiteAboveComment = $tokens->getPrevNonWhitespace($nonWhiteAbove);
+
+ $this->correctLineBreaks($tokens, $nonWhiteAboveComment, $nonWhiteAbove, $nonWhiteAboveComment === $class['open'] ? 1 : 2);
+
+ return;
+ }
+
+ $this->correctLineBreaks($tokens, $nonWhiteAbove, $element['start'], $this->determineRequiredLineCount($tokens, $class, $elementIndex));
+ }
+
+ private function determineRequiredLineCount(Tokens $tokens, array $class, int $elementIndex): int
+ {
+ $type = $class['elements'][$elementIndex]['type'];
+ $spacing = $this->classElementTypes[$type];
+
+ if (self::SPACING_ONE === $spacing) {
+ return 2;
+ }
+
+ if (self::SPACING_NONE === $spacing) {
+ if (!isset($class['elements'][$elementIndex + 1])) {
+ return 1;
+ }
+
+ $aboveElement = $class['elements'][$elementIndex + 1];
+
+ if ($aboveElement['type'] !== $type) {
+ return 2;
+ }
+
+ $aboveElementDocCandidateIndex = $tokens->getPrevNonWhitespace($aboveElement['start']);
+
+ return $tokens[$aboveElementDocCandidateIndex]->isGivenKind([T_DOC_COMMENT, CT::T_ATTRIBUTE_CLOSE]) ? 2 : 1;
+ }
+
+ if (self::SPACING_ONLY_IF_META === $spacing) {
+ $aboveElementDocCandidateIndex = $tokens->getPrevNonWhitespace($class['elements'][$elementIndex]['start']);
+
+ return $tokens[$aboveElementDocCandidateIndex]->isGivenKind([T_DOC_COMMENT, CT::T_ATTRIBUTE_CLOSE]) ? 2 : 1;
+ }
+
+ throw new \RuntimeException(sprintf('Unknown spacing "%s".', $spacing));
+ }
+
+ private function fixSpaceBelowClassElement(Tokens $tokens, array $class): void
+ {
+ $element = $class['elements'][0];
+
+ // if this is last element fix; fix to the class end `}` here if appropriate
+ if ($class['close'] === $tokens->getNextNonWhitespace($element['end'])) {
+ $this->correctLineBreaks($tokens, $element['end'], $class['close'], 1);
+ }
+ }
+
+ private function correctLineBreaks(Tokens $tokens, int $startIndex, int $endIndex, int $reqLineCount): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ ++$startIndex;
+ $numbOfWhiteTokens = $endIndex - $startIndex;
+
+ if (0 === $numbOfWhiteTokens) {
+ $tokens->insertAt($startIndex, new Token([T_WHITESPACE, str_repeat($lineEnding, $reqLineCount)]));
+
+ return;
+ }
+
+ $lineBreakCount = $this->getLineBreakCount($tokens, $startIndex, $endIndex);
+
+ if ($reqLineCount === $lineBreakCount) {
+ return;
+ }
+
+ if ($lineBreakCount < $reqLineCount) {
+ $tokens[$startIndex] = new Token([
+ T_WHITESPACE,
+ str_repeat($lineEnding, $reqLineCount - $lineBreakCount).$tokens[$startIndex]->getContent(),
+ ]);
+
+ return;
+ }
+
+ // $lineCount = > $reqLineCount : check the one Token case first since this one will be true most of the time
+ if (1 === $numbOfWhiteTokens) {
+ $tokens[$startIndex] = new Token([
+ T_WHITESPACE,
+ Preg::replace('/\r\n|\n/', '', $tokens[$startIndex]->getContent(), $lineBreakCount - $reqLineCount),
+ ]);
+
+ return;
+ }
+
+ // $numbOfWhiteTokens = > 1
+ $toReplaceCount = $lineBreakCount - $reqLineCount;
+
+ for ($i = $startIndex; $i < $endIndex && $toReplaceCount > 0; ++$i) {
+ $tokenLineCount = substr_count($tokens[$i]->getContent(), "\n");
+
+ if ($tokenLineCount > 0) {
+ $tokens[$i] = new Token([
+ T_WHITESPACE,
+ Preg::replace('/\r\n|\n/', '', $tokens[$i]->getContent(), min($toReplaceCount, $tokenLineCount)),
+ ]);
+ $toReplaceCount -= $tokenLineCount;
+ }
+ }
+ }
+
+ private function getLineBreakCount(Tokens $tokens, int $startIndex, int $endIndex): int
+ {
+ $lineCount = 0;
+
+ for ($i = $startIndex; $i < $endIndex; ++$i) {
+ $lineCount += substr_count($tokens[$i]->getContent(), "\n");
+ }
+
+ return $lineCount;
+ }
+
+ private function findCommentBlockStart(Tokens $tokens, int $start, int $elementAboveEnd): int
+ {
+ for ($i = $start; $i > $elementAboveEnd; --$i) {
+ if ($tokens[$i]->isGivenKind(CT::T_ATTRIBUTE_CLOSE)) {
+ $start = $i = $tokens->findBlockStart(Tokens::BLOCK_TYPE_ATTRIBUTE, $i);
+
+ continue;
+ }
+
+ if ($tokens[$i]->isComment()) {
+ $start = $i;
+
+ continue;
+ }
+
+ if (!$tokens[$i]->isWhitespace() || $this->getLineBreakCount($tokens, $i, $i + 1) > 1) {
+ break;
+ }
+ }
+
+ return $start;
+ }
+
+ private function getElementsByClass(Tokens $tokens): \Generator
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $class = $classIndex = false;
+ $elements = $tokensAnalyzer->getClassyElements();
+
+ for (end($elements);; prev($elements)) {
+ $index = key($elements);
+
+ if (null === $index) {
+ break;
+ }
+
+ $element = current($elements);
+ $element['index'] = $index;
+
+ if ($element['classIndex'] !== $classIndex) {
+ if (false !== $class) {
+ yield $class;
+ }
+
+ $classIndex = $element['classIndex'];
+ $classOpen = $tokens->getNextTokenOfKind($classIndex, ['{']);
+ $classEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classOpen);
+ $class = [
+ 'index' => $classIndex,
+ 'open' => $classOpen,
+ 'close' => $classEnd,
+ 'elements' => [],
+ ];
+ }
+
+ unset($element['classIndex']);
+ $element['start'] = $this->getFirstTokenIndexOfClassElement($tokens, $class, $element);
+ $element['end'] = $this->getLastTokenIndexOfClassElement($tokens, $class, $element, $tokensAnalyzer);
+
+ $class['elements'][] = $element; // reset the key by design
+ }
+
+ if (false !== $class) {
+ yield $class;
+ }
+ }
+
+ private function getFirstTokenIndexOfClassElement(Tokens $tokens, array $class, array $element): int
+ {
+ $modifierTypes = [T_PRIVATE, T_PROTECTED, T_PUBLIC, T_ABSTRACT, T_FINAL, T_STATIC, T_STRING, T_NS_SEPARATOR, T_VAR, CT::T_NULLABLE_TYPE, CT::T_ARRAY_TYPEHINT, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $modifierTypes[] = T_READONLY;
+ }
+
+ $firstElementAttributeIndex = $element['index'];
+
+ do {
+ $nonWhiteAbove = $tokens->getPrevMeaningfulToken($firstElementAttributeIndex);
+
+ if (null !== $nonWhiteAbove && $tokens[$nonWhiteAbove]->isGivenKind($modifierTypes)) {
+ $firstElementAttributeIndex = $nonWhiteAbove;
+ } else {
+ break;
+ }
+ } while ($firstElementAttributeIndex > $class['open']);
+
+ return $firstElementAttributeIndex;
+ }
+
+ // including trailing single line comments if belonging to the class element
+ private function getLastTokenIndexOfClassElement(Tokens $tokens, array $class, array $element, TokensAnalyzer $tokensAnalyzer): int
+ {
+ // find last token of the element
+ if ('method' === $element['type'] && !$tokens[$class['index']]->isGivenKind(T_INTERFACE)) {
+ $attributes = $tokensAnalyzer->getMethodAttributes($element['index']);
+
+ if (true === $attributes['abstract']) {
+ $elementEndIndex = $tokens->getNextTokenOfKind($element['index'], [';']);
+ } else {
+ $elementEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $tokens->getNextTokenOfKind($element['index'], ['{']));
+ }
+ } elseif ('trait_import' === $element['type']) {
+ $elementEndIndex = $element['index'];
+
+ do {
+ $elementEndIndex = $tokens->getNextMeaningfulToken($elementEndIndex);
+ } while ($tokens[$elementEndIndex]->isGivenKind([T_STRING, T_NS_SEPARATOR]) || $tokens[$elementEndIndex]->equals(','));
+
+ if (!$tokens[$elementEndIndex]->equals(';')) {
+ $elementEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $tokens->getNextTokenOfKind($element['index'], ['{']));
+ }
+ } else { // const or property
+ $elementEndIndex = $tokens->getNextTokenOfKind($element['index'], [';']);
+ }
+
+ $singleLineElement = true;
+
+ for ($i = $element['index'] + 1; $i < $elementEndIndex; ++$i) {
+ if (str_contains($tokens[$i]->getContent(), "\n")) {
+ $singleLineElement = false;
+
+ break;
+ }
+ }
+
+ if ($singleLineElement) {
+ while (true) {
+ $nextToken = $tokens[$elementEndIndex + 1];
+
+ if (($nextToken->isComment() || $nextToken->isWhitespace()) && !str_contains($nextToken->getContent(), "\n")) {
+ ++$elementEndIndex;
+ } else {
+ break;
+ }
+ }
+
+ if ($tokens[$elementEndIndex]->isWhitespace()) {
+ $elementEndIndex = $tokens->getPrevNonWhitespace($elementEndIndex);
+ }
+ }
+
+ return $elementEndIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php
new file mode 100644
index 0000000..9d4355b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ClassDefinitionFixer.php
@@ -0,0 +1,429 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * Fixer for part of the rules defined in PSR2 ¶4.1 Extends and Implements and PSR12 ¶8. Anonymous Classes.
+ */
+final class ClassDefinitionFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Whitespace around the keywords of a class, trait or interfaces definition should be one space.',
+ [
+ new CodeSample(
+ '<?php
+
+class Foo extends Bar implements Baz, BarBaz
+{
+}
+
+final class Foo extends Bar implements Baz, BarBaz
+{
+}
+
+trait Foo
+{
+}
+
+$foo = new class extends Bar implements Baz, BarBaz {};
+'
+ ),
+ new CodeSample(
+ '<?php
+
+class Foo
+extends Bar
+implements Baz, BarBaz
+{}
+',
+ ['single_line' => true]
+ ),
+ new CodeSample(
+ '<?php
+
+class Foo
+extends Bar
+implements Baz
+{}
+',
+ ['single_item_single_line' => true]
+ ),
+ new CodeSample(
+ '<?php
+
+interface Bar extends
+ Bar, BarBaz, FooBarBaz
+{}
+',
+ ['multi_line_extends_each_single_line' => true]
+ ),
+ new CodeSample(
+ '<?php
+$foo = new class(){};
+',
+ ['space_before_parenthesis' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 36;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // -4, one for count to index, 3 because min. of tokens for a classy location.
+ for ($index = $tokens->getSize() - 4; $index > 0; --$index) {
+ if ($tokens[$index]->isClassy()) {
+ $this->fixClassyDefinition($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('multi_line_extends_each_single_line', 'Whether definitions should be multiline.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('single_item_single_line', 'Whether definitions should be single line when including a single item.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('single_line', 'Whether definitions should be single line.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('space_before_parenthesis', 'Whether there should be a single space after the parenthesis of anonymous class (PSR12) or not.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param int $classyIndex Class definition token start index
+ */
+ private function fixClassyDefinition(Tokens $tokens, int $classyIndex): void
+ {
+ $classDefInfo = $this->getClassyDefinitionInfo($tokens, $classyIndex);
+
+ // PSR2 4.1 Lists of implements MAY be split across multiple lines, where each subsequent line is indented once.
+ // When doing so, the first item in the list MUST be on the next line, and there MUST be only one interface per line.
+
+ if (false !== $classDefInfo['implements']) {
+ $classDefInfo['implements'] = $this->fixClassyDefinitionImplements(
+ $tokens,
+ $classDefInfo['open'],
+ $classDefInfo['implements']
+ );
+ }
+
+ if (false !== $classDefInfo['extends']) {
+ $classDefInfo['extends'] = $this->fixClassyDefinitionExtends(
+ $tokens,
+ false === $classDefInfo['implements'] ? $classDefInfo['open'] : $classDefInfo['implements']['start'],
+ $classDefInfo['extends']
+ );
+ }
+
+ // PSR2: class definition open curly brace must go on a new line.
+ // PSR12: anonymous class curly brace on same line if not multi line implements.
+
+ $classDefInfo['open'] = $this->fixClassyDefinitionOpenSpacing($tokens, $classDefInfo);
+
+ if ($classDefInfo['implements']) {
+ $end = $classDefInfo['implements']['start'];
+ } elseif ($classDefInfo['extends']) {
+ $end = $classDefInfo['extends']['start'];
+ } else {
+ $end = $tokens->getPrevNonWhitespace($classDefInfo['open']);
+ }
+
+ // 4.1 The extends and implements keywords MUST be declared on the same line as the class name.
+ $this->makeClassyDefinitionSingleLine($tokens, $classDefInfo['start'], $end);
+ }
+
+ private function fixClassyDefinitionExtends(Tokens $tokens, int $classOpenIndex, array $classExtendsInfo): array
+ {
+ $endIndex = $tokens->getPrevNonWhitespace($classOpenIndex);
+
+ if (true === $this->configuration['single_line'] || false === $classExtendsInfo['multiLine']) {
+ $this->makeClassyDefinitionSingleLine($tokens, $classExtendsInfo['start'], $endIndex);
+ $classExtendsInfo['multiLine'] = false;
+ } elseif (true === $this->configuration['single_item_single_line'] && 1 === $classExtendsInfo['numberOfExtends']) {
+ $this->makeClassyDefinitionSingleLine($tokens, $classExtendsInfo['start'], $endIndex);
+ $classExtendsInfo['multiLine'] = false;
+ } elseif (true === $this->configuration['multi_line_extends_each_single_line'] && $classExtendsInfo['multiLine']) {
+ $this->makeClassyInheritancePartMultiLine($tokens, $classExtendsInfo['start'], $endIndex);
+ $classExtendsInfo['multiLine'] = true;
+ }
+
+ return $classExtendsInfo;
+ }
+
+ private function fixClassyDefinitionImplements(Tokens $tokens, int $classOpenIndex, array $classImplementsInfo): array
+ {
+ $endIndex = $tokens->getPrevNonWhitespace($classOpenIndex);
+
+ if (true === $this->configuration['single_line'] || false === $classImplementsInfo['multiLine']) {
+ $this->makeClassyDefinitionSingleLine($tokens, $classImplementsInfo['start'], $endIndex);
+ $classImplementsInfo['multiLine'] = false;
+ } elseif (true === $this->configuration['single_item_single_line'] && 1 === $classImplementsInfo['numberOfImplements']) {
+ $this->makeClassyDefinitionSingleLine($tokens, $classImplementsInfo['start'], $endIndex);
+ $classImplementsInfo['multiLine'] = false;
+ } else {
+ $this->makeClassyInheritancePartMultiLine($tokens, $classImplementsInfo['start'], $endIndex);
+ $classImplementsInfo['multiLine'] = true;
+ }
+
+ return $classImplementsInfo;
+ }
+
+ private function fixClassyDefinitionOpenSpacing(Tokens $tokens, array $classDefInfo): int
+ {
+ if ($classDefInfo['anonymousClass']) {
+ if (false !== $classDefInfo['implements']) {
+ $spacing = $classDefInfo['implements']['multiLine'] ? $this->whitespacesConfig->getLineEnding() : ' ';
+ } elseif (false !== $classDefInfo['extends']) {
+ $spacing = $classDefInfo['extends']['multiLine'] ? $this->whitespacesConfig->getLineEnding() : ' ';
+ } else {
+ $spacing = ' ';
+ }
+ } else {
+ $spacing = $this->whitespacesConfig->getLineEnding();
+ }
+
+ $openIndex = $tokens->getNextTokenOfKind($classDefInfo['classy'], ['{']);
+
+ if (' ' !== $spacing && str_contains($tokens[$openIndex - 1]->getContent(), "\n")) {
+ return $openIndex;
+ }
+
+ if ($tokens[$openIndex - 1]->isWhitespace()) {
+ if (' ' !== $spacing || !$tokens[$tokens->getPrevNonWhitespace($openIndex - 1)]->isComment()) {
+ $tokens[$openIndex - 1] = new Token([T_WHITESPACE, $spacing]);
+ }
+
+ return $openIndex;
+ }
+
+ $tokens->insertAt($openIndex, new Token([T_WHITESPACE, $spacing]));
+
+ return $openIndex + 1;
+ }
+
+ private function getClassyDefinitionInfo(Tokens $tokens, int $classyIndex): array
+ {
+ $openIndex = $tokens->getNextTokenOfKind($classyIndex, ['{']);
+ $extends = false;
+ $implements = false;
+ $anonymousClass = false;
+
+ if (!$tokens[$classyIndex]->isGivenKind(T_TRAIT)) {
+ $extends = $tokens->findGivenKind(T_EXTENDS, $classyIndex, $openIndex);
+ $extends = \count($extends) ? $this->getClassyInheritanceInfo($tokens, key($extends), 'numberOfExtends') : false;
+
+ if (!$tokens[$classyIndex]->isGivenKind(T_INTERFACE)) {
+ $implements = $tokens->findGivenKind(T_IMPLEMENTS, $classyIndex, $openIndex);
+ $implements = \count($implements) ? $this->getClassyInheritanceInfo($tokens, key($implements), 'numberOfImplements') : false;
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $anonymousClass = $tokensAnalyzer->isAnonymousClass($classyIndex);
+ }
+ }
+
+ if ($anonymousClass) {
+ $startIndex = $tokens->getPrevMeaningfulToken($classyIndex); // go to "new" for anonymous class
+ } else {
+ $prev = $tokens->getPrevMeaningfulToken($classyIndex);
+ $startIndex = $tokens[$prev]->isGivenKind([T_FINAL, T_ABSTRACT]) ? $prev : $classyIndex;
+ }
+
+ return [
+ 'start' => $startIndex,
+ 'classy' => $classyIndex,
+ 'open' => $openIndex,
+ 'extends' => $extends,
+ 'implements' => $implements,
+ 'anonymousClass' => $anonymousClass,
+ ];
+ }
+
+ private function getClassyInheritanceInfo(Tokens $tokens, int $startIndex, string $label): array
+ {
+ $implementsInfo = ['start' => $startIndex, $label => 1, 'multiLine' => false];
+ ++$startIndex;
+ $endIndex = $tokens->getNextTokenOfKind($startIndex, ['{', [T_IMPLEMENTS], [T_EXTENDS]]);
+ $endIndex = $tokens[$endIndex]->equals('{') ? $tokens->getPrevNonWhitespace($endIndex) : $endIndex;
+
+ for ($i = $startIndex; $i < $endIndex; ++$i) {
+ if ($tokens[$i]->equals(',')) {
+ ++$implementsInfo[$label];
+
+ continue;
+ }
+
+ if (!$implementsInfo['multiLine'] && str_contains($tokens[$i]->getContent(), "\n")) {
+ $implementsInfo['multiLine'] = true;
+ }
+ }
+
+ return $implementsInfo;
+ }
+
+ private function makeClassyDefinitionSingleLine(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($i = $endIndex; $i >= $startIndex; --$i) {
+ if ($tokens[$i]->isWhitespace()) {
+ if ($tokens[$i - 1]->isComment() || $tokens[$i + 1]->isComment()) {
+ $content = $tokens[$i - 1]->getContent();
+
+ if (!('#' === $content || str_starts_with($content, '//'))) {
+ $content = $tokens[$i + 1]->getContent();
+
+ if (!('#' === $content || str_starts_with($content, '//'))) {
+ $tokens[$i] = new Token([T_WHITESPACE, ' ']);
+ }
+ }
+
+ continue;
+ }
+
+ if ($tokens[$i - 1]->isGivenKind(T_CLASS) && $tokens[$i + 1]->equals('(')) {
+ if (true === $this->configuration['space_before_parenthesis']) {
+ $tokens[$i] = new Token([T_WHITESPACE, ' ']);
+ } else {
+ $tokens->clearAt($i);
+ }
+
+ continue;
+ }
+
+ if (!$tokens[$i - 1]->equals(',') && $tokens[$i + 1]->equalsAny([',', ')']) || $tokens[$i - 1]->equals('(')) {
+ $tokens->clearAt($i);
+
+ continue;
+ }
+
+ $tokens[$i] = new Token([T_WHITESPACE, ' ']);
+
+ continue;
+ }
+
+ if ($tokens[$i]->equals(',') && !$tokens[$i + 1]->isWhitespace()) {
+ $tokens->insertAt($i + 1, new Token([T_WHITESPACE, ' ']));
+
+ continue;
+ }
+
+ if (true === $this->configuration['space_before_parenthesis'] && $tokens[$i]->isGivenKind(T_CLASS) && !$tokens[$i + 1]->isWhitespace()) {
+ $tokens->insertAt($i + 1, new Token([T_WHITESPACE, ' ']));
+
+ continue;
+ }
+
+ if (!$tokens[$i]->isComment()) {
+ continue;
+ }
+
+ if (!$tokens[$i + 1]->isWhitespace() && !$tokens[$i + 1]->isComment() && !str_contains($tokens[$i]->getContent(), "\n")) {
+ $tokens->insertAt($i + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ if (!$tokens[$i - 1]->isWhitespace() && !$tokens[$i - 1]->isComment()) {
+ $tokens->insertAt($i, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+ }
+
+ private function makeClassyInheritancePartMultiLine(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($i = $endIndex; $i > $startIndex; --$i) {
+ $previousInterfaceImplementingIndex = $tokens->getPrevTokenOfKind($i, [',', [T_IMPLEMENTS], [T_EXTENDS]]);
+ $breakAtIndex = $tokens->getNextMeaningfulToken($previousInterfaceImplementingIndex);
+
+ // make the part of a ',' or 'implements' single line
+ $this->makeClassyDefinitionSingleLine(
+ $tokens,
+ $breakAtIndex,
+ $i
+ );
+
+ // make sure the part is on its own line
+ $isOnOwnLine = false;
+
+ for ($j = $breakAtIndex; $j > $previousInterfaceImplementingIndex; --$j) {
+ if (str_contains($tokens[$j]->getContent(), "\n")) {
+ $isOnOwnLine = true;
+
+ break;
+ }
+ }
+
+ if (!$isOnOwnLine) {
+ if ($tokens[$breakAtIndex - 1]->isWhitespace()) {
+ $tokens[$breakAtIndex - 1] = new Token([
+ T_WHITESPACE,
+ $this->whitespacesConfig->getLineEnding().$this->whitespacesConfig->getIndent(),
+ ]);
+ } else {
+ $tokens->insertAt($breakAtIndex, new Token([T_WHITESPACE, $this->whitespacesConfig->getLineEnding().$this->whitespacesConfig->getIndent()]));
+ }
+ }
+
+ $i = $previousInterfaceImplementingIndex + 1;
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php
new file mode 100644
index 0000000..5372ca7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalClassFixer.php
@@ -0,0 +1,63 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractProxyFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class FinalClassFixer extends AbstractProxyFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All classes must be final, except abstract ones and Doctrine entities.',
+ [
+ new CodeSample(
+ '<?php
+class MyApp {}
+'
+ ),
+ ],
+ 'No exception and no configuration are intentional. Beside Doctrine entities and of course abstract classes, there is no single reason not to declare all classes final. '
+ .'If you want to subclass a class, mark the parent class as abstract and create two child classes, one empty if necessary: you\'ll gain much more fine grained type-hinting. '
+ .'If you need to mock a standalone class, create an interface, or maybe it\'s a value-object that shouldn\'t be mocked at all. '
+ .'If you need to extend a standalone class, create an interface and use the Composite pattern. '
+ .'If you aren\'t ready yet for serious OOP, go with FinalInternalClassFixer, it\'s fine.',
+ 'Risky when subclassing non-abstract classes.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createProxyFixers(): array
+ {
+ $fixer = new FinalInternalClassFixer();
+ $fixer->configure([
+ 'annotation_include' => [],
+ 'consider_absent_docblock_as_internal_class' => true,
+ ]);
+
+ return [$fixer];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
new file mode 100644
index 0000000..8dfc65e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalInternalClassFixer.php
@@ -0,0 +1,223 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class FinalInternalClassFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $intersect = array_intersect_assoc(
+ $this->configuration['annotation_include'],
+ $this->configuration['annotation_exclude']
+ );
+
+ if (\count($intersect) > 0) {
+ throw new InvalidFixerConfigurationException($this->getName(), sprintf('Annotation cannot be used in both the include and exclude list, got duplicates: "%s".', implode('", "', array_keys($intersect))));
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Internal classes should be `final`.',
+ [
+ new CodeSample("<?php\n/**\n * @internal\n */\nclass Sample\n{\n}\n"),
+ new CodeSample(
+ "<?php\n/**\n * @CUSTOM\n */\nclass A{}\n\n/**\n * @CUSTOM\n * @not-fix\n */\nclass B{}\n",
+ [
+ 'annotation_include' => ['@Custom'],
+ 'annotation_exclude' => ['@not-fix'],
+ ]
+ ),
+ ],
+ null,
+ 'Changing classes to `final` might cause code execution to break.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ProtectedToPrivateFixer, SelfStaticAccessorFixer.
+ * Must run after PhpUnitInternalClassFixer.
+ */
+ public function getPriority(): int
+ {
+ return 67;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_CLASS);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_CLASS) || $tokensAnalyzer->isAnonymousClass($index) || !$this->isClassCandidate($tokens, $index)) {
+ continue;
+ }
+
+ // make class final
+ $tokens->insertAt(
+ $index,
+ [
+ new Token([T_FINAL, 'final']),
+ new Token([T_WHITESPACE, ' ']),
+ ]
+ );
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $annotationsAsserts = [static function (array $values): bool {
+ foreach ($values as $value) {
+ if (!\is_string($value) || '' === $value) {
+ return false;
+ }
+ }
+
+ return true;
+ }];
+
+ $annotationsNormalizer = static function (Options $options, array $value): array {
+ $newValue = [];
+ foreach ($value as $key) {
+ if ('@' === $key[0]) {
+ $key = substr($key, 1);
+ }
+
+ $newValue[strtolower($key)] = true;
+ }
+
+ return $newValue;
+ };
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('annotation_include', 'Class level annotations tags that must be set in order to fix the class. (case insensitive)'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues($annotationsAsserts)
+ ->setDefault(['@internal'])
+ ->setNormalizer($annotationsNormalizer)
+ ->getOption(),
+ (new FixerOptionBuilder('annotation_exclude', 'Class level annotations tags that must be omitted to fix the class, even if all of the white list ones are used as well. (case insensitive)'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues($annotationsAsserts)
+ ->setDefault([
+ '@final',
+ '@Entity',
+ '@ORM\Entity',
+ '@ORM\Mapping\Entity',
+ '@Mapping\Entity',
+ '@Document',
+ '@ODM\Document',
+ ])
+ ->setNormalizer($annotationsNormalizer)
+ ->getOption(),
+ (new FixerOptionBuilder('consider_absent_docblock_as_internal_class', 'Should classes without any DocBlock be fixed to final?'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param int $index T_CLASS index
+ */
+ private function isClassCandidate(Tokens $tokens, int $index): bool
+ {
+ if ($tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind([T_ABSTRACT, T_FINAL])) {
+ return false; // ignore class; it is abstract or already final
+ }
+
+ $docToken = $tokens[$tokens->getPrevNonWhitespace($index)];
+
+ if (!$docToken->isGivenKind(T_DOC_COMMENT)) {
+ return $this->configuration['consider_absent_docblock_as_internal_class'];
+ }
+
+ $doc = new DocBlock($docToken->getContent());
+ $tags = [];
+
+ foreach ($doc->getAnnotations() as $annotation) {
+ if (1 !== Preg::match('/@\S+(?=\s|$)/', $annotation->getContent(), $matches)) {
+ continue;
+ }
+ $tag = strtolower(substr(array_shift($matches), 1));
+ foreach ($this->configuration['annotation_exclude'] as $tagStart => $true) {
+ if (str_starts_with($tag, $tagStart)) {
+ return false; // ignore class: class-level PHPDoc contains tag that has been excluded through configuration
+ }
+ }
+
+ $tags[$tag] = true;
+ }
+
+ foreach ($this->configuration['annotation_include'] as $tag => $true) {
+ if (!isset($tags[$tag])) {
+ return false; // ignore class: class-level PHPDoc does not contain all tags that has been included through configuration
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixer.php
new file mode 100644
index 0000000..e25dd00
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/FinalPublicMethodForAbstractClassFixer.php
@@ -0,0 +1,172 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class FinalPublicMethodForAbstractClassFixer extends AbstractFixer
+{
+ /**
+ * @var array
+ */
+ private $magicMethods = [
+ '__construct' => true,
+ '__destruct' => true,
+ '__call' => true,
+ '__callstatic' => true,
+ '__get' => true,
+ '__set' => true,
+ '__isset' => true,
+ '__unset' => true,
+ '__sleep' => true,
+ '__wakeup' => true,
+ '__tostring' => true,
+ '__invoke' => true,
+ '__set_state' => true,
+ '__clone' => true,
+ '__debuginfo' => true,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All `public` methods of `abstract` classes should be `final`.',
+ [
+ new CodeSample(
+ '<?php
+
+abstract class AbstractMachine
+{
+ public function start()
+ {}
+}
+'
+ ),
+ ],
+ 'Enforce API encapsulation in an inheritance architecture. '
+ .'If you want to override a method, use the Template method pattern.',
+ 'Risky when overriding `public` methods of `abstract` classes.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CLASS, T_ABSTRACT, T_PUBLIC, T_FUNCTION]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $classes = array_keys($tokens->findGivenKind(T_CLASS));
+
+ while ($classIndex = array_pop($classes)) {
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($classIndex)];
+ if (!$prevToken->isGivenKind(T_ABSTRACT)) {
+ continue;
+ }
+
+ $classOpen = $tokens->getNextTokenOfKind($classIndex, ['{']);
+ $classClose = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classOpen);
+
+ $this->fixClass($tokens, $classOpen, $classClose);
+ }
+ }
+
+ private function fixClass(Tokens $tokens, int $classOpenIndex, int $classCloseIndex): void
+ {
+ for ($index = $classCloseIndex - 1; $index > $classOpenIndex; --$index) {
+ // skip method contents
+ if ($tokens[$index]->equals('}')) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+
+ // skip non public methods
+ if (!$tokens[$index]->isGivenKind(T_PUBLIC)) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ $nextToken = $tokens[$nextIndex];
+
+ if ($nextToken->isGivenKind(T_STATIC)) {
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ $nextToken = $tokens[$nextIndex];
+ }
+
+ // skip uses, attributes, constants etc
+ if (!$nextToken->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ $nextToken = $tokens[$nextIndex];
+
+ // skip magic methods
+ if (isset($this->magicMethods[strtolower($nextToken->getContent())])) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$prevIndex];
+
+ if ($prevToken->isGivenKind(T_STATIC)) {
+ $index = $prevIndex;
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$prevIndex];
+ }
+
+ // skip abstract or already final methods
+ if ($prevToken->isGivenKind([T_ABSTRACT, T_FINAL])) {
+ $index = $prevIndex;
+
+ continue;
+ }
+
+ $tokens->insertAt(
+ $index,
+ [
+ new Token([T_FINAL, 'final']),
+ new Token([T_WHITESPACE, ' ']),
+ ]
+ );
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php
new file mode 100644
index 0000000..868cfd6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoBlankLinesAfterClassOpeningFixer.php
@@ -0,0 +1,102 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Ceeram <ceeram@cakephp.org>
+ */
+final class NoBlankLinesAfterClassOpeningFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should be no empty lines after class opening brace.',
+ [
+ new CodeSample(
+ '<?php
+final class Sample
+{
+
+ protected function foo()
+ {
+ }
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after OrderedClassElementsFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isClassy()) {
+ continue;
+ }
+
+ $startBraceIndex = $tokens->getNextTokenOfKind($index, ['{']);
+ if (!$tokens[$startBraceIndex + 1]->isWhitespace()) {
+ continue;
+ }
+
+ $this->fixWhitespace($tokens, $startBraceIndex + 1);
+ }
+ }
+
+ /**
+ * Cleanup a whitespace token.
+ */
+ private function fixWhitespace(Tokens $tokens, int $index): void
+ {
+ $content = $tokens[$index]->getContent();
+ // if there is more than one new line in the whitespace, then we need to fix it
+ if (substr_count($content, "\n") > 1) {
+ // the final bit of the whitespace must be the next statement's indentation
+ $tokens[$index] = new Token([T_WHITESPACE, $this->whitespacesConfig->getLineEnding().substr($content, strrpos($content, "\n") + 1)]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php
new file mode 100644
index 0000000..176a2a6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php
@@ -0,0 +1,150 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author ntzm
+ */
+final class NoNullPropertyInitializationFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Properties MUST not be explicitly initialized with `null` except when they have a type declaration (PHP 7.4).',
+ [
+ new CodeSample(
+ '<?php
+class Foo {
+ public $foo = null;
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+class Foo {
+ public static $foo = null;
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_CLASS, T_TRAIT]) && $tokens->isAnyTokenKindsFound([T_PUBLIC, T_PROTECTED, T_PRIVATE, T_VAR, T_STATIC]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $inClass = [];
+ $classLevel = 0;
+
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ if ($tokens[$index]->isClassy()) {
+ ++$classLevel;
+ $inClass[$classLevel] = 1;
+
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+
+ continue;
+ }
+
+ if (0 === $classLevel) {
+ continue;
+ }
+
+ if ($tokens[$index]->equals('{')) {
+ ++$inClass[$classLevel];
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals('}')) {
+ --$inClass[$classLevel];
+
+ if (0 === $inClass[$classLevel]) {
+ unset($inClass[$classLevel]);
+ --$classLevel;
+ }
+
+ continue;
+ }
+
+ // Ensure we are in a class but not in a method in case there are static variables defined
+ if (1 !== $inClass[$classLevel]) {
+ continue;
+ }
+
+ if (!$tokens[$index]->isGivenKind([T_PUBLIC, T_PROTECTED, T_PRIVATE, T_VAR, T_STATIC])) {
+ continue;
+ }
+
+ while (true) {
+ $varTokenIndex = $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->isGivenKind(T_STATIC)) {
+ $varTokenIndex = $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_VARIABLE)) {
+ break;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->equals('=')) {
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->isGivenKind(T_NS_SEPARATOR)) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ if ($tokens[$index]->equals([T_STRING, 'null'], false)) {
+ for ($i = $varTokenIndex + 1; $i <= $index; ++$i) {
+ if (
+ !($tokens[$i]->isWhitespace() && str_contains($tokens[$i]->getContent(), "\n"))
+ && !$tokens[$i]->isComment()
+ ) {
+ $tokens->clearAt($i);
+ }
+ }
+ }
+
+ ++$index;
+ }
+
+ if (!$tokens[$index]->equals(',')) {
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php
new file mode 100644
index 0000000..433bfa0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoPhp4ConstructorFixer.php
@@ -0,0 +1,413 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Matteo Beccati <matteo@beccati.com>
+ */
+final class NoPhp4ConstructorFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Convert PHP4-style constructors to `__construct`.',
+ [
+ new CodeSample('<?php
+class Foo
+{
+ public function Foo($bar)
+ {
+ }
+}
+'),
+ ],
+ null,
+ 'Risky when old style constructor being fixed is overridden or overrides parent one.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before OrderedClassElementsFixer.
+ */
+ public function getPriority(): int
+ {
+ return 75;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_CLASS);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $classes = array_keys($tokens->findGivenKind(T_CLASS));
+ $numClasses = \count($classes);
+
+ for ($i = 0; $i < $numClasses; ++$i) {
+ $index = $classes[$i];
+
+ // is it an anonymous class definition?
+ if ($tokensAnalyzer->isAnonymousClass($index)) {
+ continue;
+ }
+
+ // is it inside a namespace?
+ $nspIndex = $tokens->getPrevTokenOfKind($index, [[T_NAMESPACE, 'namespace']]);
+ if (null !== $nspIndex) {
+ $nspIndex = $tokens->getNextMeaningfulToken($nspIndex);
+
+ // make sure it's not the global namespace, as PHP4 constructors are allowed in there
+ if (!$tokens[$nspIndex]->equals('{')) {
+ // unless it's the global namespace, the index currently points to the name
+ $nspIndex = $tokens->getNextTokenOfKind($nspIndex, [';', '{']);
+
+ if ($tokens[$nspIndex]->equals(';')) {
+ // the class is inside a (non-block) namespace, no PHP4-code should be in there
+ break;
+ }
+
+ // the index points to the { of a block-namespace
+ $nspEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $nspIndex);
+
+ if ($index < $nspEnd) {
+ // the class is inside a block namespace, skip other classes that might be in it
+ for ($j = $i + 1; $j < $numClasses; ++$j) {
+ if ($classes[$j] < $nspEnd) {
+ ++$i;
+ }
+ }
+ // and continue checking the classes that might follow
+ continue;
+ }
+ }
+ }
+
+ $classNameIndex = $tokens->getNextMeaningfulToken($index);
+ $className = $tokens[$classNameIndex]->getContent();
+ $classStart = $tokens->getNextTokenOfKind($classNameIndex, ['{']);
+ $classEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classStart);
+
+ $this->fixConstructor($tokens, $className, $classStart, $classEnd);
+ $this->fixParent($tokens, $classStart, $classEnd);
+ }
+ }
+
+ /**
+ * Fix constructor within a class, if possible.
+ *
+ * @param Tokens $tokens the Tokens instance
+ * @param string $className the class name
+ * @param int $classStart the class start index
+ * @param int $classEnd the class end index
+ */
+ private function fixConstructor(Tokens $tokens, string $className, int $classStart, int $classEnd): void
+ {
+ $php4 = $this->findFunction($tokens, $className, $classStart, $classEnd);
+
+ if (null === $php4) {
+ // no PHP4-constructor!
+ return;
+ }
+
+ if (!empty($php4['modifiers'][T_ABSTRACT]) || !empty($php4['modifiers'][T_STATIC])) {
+ // PHP4 constructor can't be abstract or static
+ return;
+ }
+
+ $php5 = $this->findFunction($tokens, '__construct', $classStart, $classEnd);
+
+ if (null === $php5) {
+ // no PHP5-constructor, we can rename the old one to __construct
+ $tokens[$php4['nameIndex']] = new Token([T_STRING, '__construct']);
+
+ // in some (rare) cases we might have just created an infinite recursion issue
+ $this->fixInfiniteRecursion($tokens, $php4['bodyIndex'], $php4['endIndex']);
+
+ return;
+ }
+
+ // does the PHP4-constructor only call $this->__construct($args, ...)?
+ [$sequences, $case] = $this->getWrapperMethodSequence($tokens, '__construct', $php4['startIndex'], $php4['bodyIndex']);
+
+ foreach ($sequences as $seq) {
+ if (null !== $tokens->findSequence($seq, $php4['bodyIndex'] - 1, $php4['endIndex'], $case)) {
+ // good, delete it!
+ for ($i = $php4['startIndex']; $i <= $php4['endIndex']; ++$i) {
+ $tokens->clearAt($i);
+ }
+
+ return;
+ }
+ }
+
+ // does __construct only call the PHP4-constructor (with the same args)?
+ [$sequences, $case] = $this->getWrapperMethodSequence($tokens, $className, $php4['startIndex'], $php4['bodyIndex']);
+
+ foreach ($sequences as $seq) {
+ if (null !== $tokens->findSequence($seq, $php5['bodyIndex'] - 1, $php5['endIndex'], $case)) {
+ // that was a weird choice, but we can safely delete it and...
+ for ($i = $php5['startIndex']; $i <= $php5['endIndex']; ++$i) {
+ $tokens->clearAt($i);
+ }
+ // rename the PHP4 one to __construct
+ $tokens[$php4['nameIndex']] = new Token([T_STRING, '__construct']);
+
+ return;
+ }
+ }
+ }
+
+ /**
+ * Fix calls to the parent constructor within a class.
+ *
+ * @param Tokens $tokens the Tokens instance
+ * @param int $classStart the class start index
+ * @param int $classEnd the class end index
+ */
+ private function fixParent(Tokens $tokens, int $classStart, int $classEnd): void
+ {
+ // check calls to the parent constructor
+ foreach ($tokens->findGivenKind(T_EXTENDS) as $index => $token) {
+ $parentIndex = $tokens->getNextMeaningfulToken($index);
+ $parentClass = $tokens[$parentIndex]->getContent();
+
+ // using parent::ParentClassName() or ParentClassName::ParentClassName()
+ $parentSeq = $tokens->findSequence([
+ [T_STRING],
+ [T_DOUBLE_COLON],
+ [T_STRING, $parentClass],
+ '(',
+ ], $classStart, $classEnd, [2 => false]);
+
+ if (null !== $parentSeq) {
+ // we only need indexes
+ $parentSeq = array_keys($parentSeq);
+
+ // match either of the possibilities
+ if ($tokens[$parentSeq[0]]->equalsAny([[T_STRING, 'parent'], [T_STRING, $parentClass]], false)) {
+ // replace with parent::__construct
+ $tokens[$parentSeq[0]] = new Token([T_STRING, 'parent']);
+ $tokens[$parentSeq[2]] = new Token([T_STRING, '__construct']);
+ }
+ }
+
+ foreach (Token::getObjectOperatorKinds() as $objectOperatorKind) {
+ // using $this->ParentClassName()
+ $parentSeq = $tokens->findSequence([
+ [T_VARIABLE, '$this'],
+ [$objectOperatorKind],
+ [T_STRING, $parentClass],
+ '(',
+ ], $classStart, $classEnd, [2 => false]);
+
+ if (null !== $parentSeq) {
+ // we only need indexes
+ $parentSeq = array_keys($parentSeq);
+
+ // replace call with parent::__construct()
+ $tokens[$parentSeq[0]] = new Token([
+ T_STRING,
+ 'parent',
+ ]);
+ $tokens[$parentSeq[1]] = new Token([
+ T_DOUBLE_COLON,
+ '::',
+ ]);
+ $tokens[$parentSeq[2]] = new Token([T_STRING, '__construct']);
+ }
+ }
+ }
+ }
+
+ /**
+ * Fix a particular infinite recursion issue happening when the parent class has __construct and the child has only
+ * a PHP4 constructor that calls the parent constructor as $this->__construct().
+ *
+ * @param Tokens $tokens the Tokens instance
+ * @param int $start the PHP4 constructor body start
+ * @param int $end the PHP4 constructor body end
+ */
+ private function fixInfiniteRecursion(Tokens $tokens, int $start, int $end): void
+ {
+ foreach (Token::getObjectOperatorKinds() as $objectOperatorKind) {
+ $seq = [
+ [T_VARIABLE, '$this'],
+ [$objectOperatorKind],
+ [T_STRING, '__construct'],
+ ];
+
+ while (true) {
+ $callSeq = $tokens->findSequence($seq, $start, $end, [2 => false]);
+
+ if (null === $callSeq) {
+ return;
+ }
+
+ $callSeq = array_keys($callSeq);
+
+ $tokens[$callSeq[0]] = new Token([T_STRING, 'parent']);
+ $tokens[$callSeq[1]] = new Token([T_DOUBLE_COLON, '::']);
+ }
+ }
+ }
+
+ /**
+ * Generate the sequence of tokens necessary for the body of a wrapper method that simply
+ * calls $this->{$method}( [args...] ) with the same arguments as its own signature.
+ *
+ * @param Tokens $tokens the Tokens instance
+ * @param string $method the wrapped method name
+ * @param int $startIndex function/method start index
+ * @param int $bodyIndex function/method body index
+ *
+ * @return array an array containing the sequence and case sensitiveness [ 0 => $seq, 1 => $case ]
+ */
+ private function getWrapperMethodSequence(Tokens $tokens, string $method, int $startIndex, int $bodyIndex): array
+ {
+ $sequences = [];
+
+ foreach (Token::getObjectOperatorKinds() as $objectOperatorKind) {
+ // initialise sequence as { $this->{$method}(
+ $seq = [
+ '{',
+ [T_VARIABLE, '$this'],
+ [$objectOperatorKind],
+ [T_STRING, $method],
+ '(',
+ ];
+
+ // parse method parameters, if any
+ $index = $startIndex;
+
+ while (true) {
+ // find the next variable name
+ $index = $tokens->getNextTokenOfKind($index, [[T_VARIABLE]]);
+
+ if (null === $index || $index >= $bodyIndex) {
+ // we've reached the body already
+ break;
+ }
+
+ // append a comma if it's not the first variable
+ if (\count($seq) > 5) {
+ $seq[] = ',';
+ }
+
+ // append variable name to the sequence
+ $seq[] = [T_VARIABLE, $tokens[$index]->getContent()];
+ }
+
+ // almost done, close the sequence with ); }
+ $seq[] = ')';
+ $seq[] = ';';
+ $seq[] = '}';
+
+ $sequences[] = $seq;
+ }
+
+ return [$sequences, [3 => false]];
+ }
+
+ /**
+ * Find a function or method matching a given name within certain bounds.
+ *
+ * @param Tokens $tokens the Tokens instance
+ * @param string $name the function/Method name
+ * @param int $startIndex the search start index
+ * @param int $endIndex the search end index
+ *
+ * @return null|array An associative array, if a match is found:
+ *
+ * - nameIndex (int): The index of the function/method name.
+ * - startIndex (int): The index of the function/method start.
+ * - endIndex (int): The index of the function/method end.
+ * - bodyIndex (int): The index of the function/method body.
+ * - modifiers (array): The modifiers as array keys and their index as
+ * the values, e.g. array(T_PUBLIC => 10)
+ */
+ private function findFunction(Tokens $tokens, string $name, int $startIndex, int $endIndex): ?array
+ {
+ $function = $tokens->findSequence([
+ [T_FUNCTION],
+ [T_STRING, $name],
+ '(',
+ ], $startIndex, $endIndex, false);
+
+ if (null === $function) {
+ return null;
+ }
+
+ // keep only the indexes
+ $function = array_keys($function);
+
+ // find previous block, saving method modifiers for later use
+ $possibleModifiers = [T_PUBLIC, T_PROTECTED, T_PRIVATE, T_STATIC, T_ABSTRACT, T_FINAL];
+ $modifiers = [];
+
+ $prevBlock = $tokens->getPrevMeaningfulToken($function[0]);
+
+ while (null !== $prevBlock && $tokens[$prevBlock]->isGivenKind($possibleModifiers)) {
+ $modifiers[$tokens[$prevBlock]->getId()] = $prevBlock;
+ $prevBlock = $tokens->getPrevMeaningfulToken($prevBlock);
+ }
+
+ if (isset($modifiers[T_ABSTRACT])) {
+ // abstract methods have no body
+ $bodyStart = null;
+ $funcEnd = $tokens->getNextTokenOfKind($function[2], [';']);
+ } else {
+ // find method body start and the end of the function definition
+ $bodyStart = $tokens->getNextTokenOfKind($function[2], ['{']);
+ $funcEnd = null !== $bodyStart ? $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $bodyStart) : null;
+ }
+
+ return [
+ 'nameIndex' => $function[1],
+ 'startIndex' => $prevBlock + 1,
+ 'endIndex' => $funcEnd,
+ 'bodyIndex' => $bodyStart,
+ 'modifiers' => $modifiers,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php
new file mode 100644
index 0000000..eec3ef5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/NoUnneededFinalMethodFixer.php
@@ -0,0 +1,187 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class NoUnneededFinalMethodFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'A `final` class must not have `final` methods and `private` methods must not be `final`.',
+ [
+ new CodeSample(
+ '<?php
+final class Foo
+{
+ final public function foo1() {}
+ final protected function bar() {}
+ final private function baz() {}
+}
+
+class Bar
+{
+ final private function bar1() {}
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class Foo
+{
+ final private function baz() {}
+}
+
+class Bar
+{
+ final private function bar1() {}
+}
+',
+ ['private_methods' => false]
+ ),
+ ],
+ null,
+ 'Risky when child class overrides a `private` method.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CLASS, T_FINAL]);
+ }
+
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($this->getClassMethods($tokens) as $element) {
+ $index = $element['method_final_index'];
+
+ if ($element['class_is_final']) {
+ $this->clearFinal($tokens, $index);
+
+ continue;
+ }
+
+ if (!$element['method_is_private'] || false === $this->configuration['private_methods'] || $element['method_is_constructor']) {
+ continue;
+ }
+
+ $this->clearFinal($tokens, $index);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('private_methods', 'Private methods of non-`final` classes must not be declared `final`.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ private function getClassMethods(Tokens $tokens): \Generator
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $modifierKinds = [T_PUBLIC, T_PROTECTED, T_PRIVATE, T_FINAL, T_ABSTRACT, T_STATIC];
+
+ $classesAreFinal = [];
+ $elements = $tokensAnalyzer->getClassyElements();
+
+ for (end($elements);; prev($elements)) {
+ $index = key($elements);
+
+ if (null === $index) {
+ break;
+ }
+
+ $element = current($elements);
+
+ if ('method' !== $element['type']) {
+ continue; // not a method
+ }
+
+ $classIndex = $element['classIndex'];
+
+ if (!\array_key_exists($classIndex, $classesAreFinal)) {
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($classIndex)];
+ $classesAreFinal[$classIndex] = $prevToken->isGivenKind(T_FINAL);
+ }
+
+ $element['class_is_final'] = $classesAreFinal[$classIndex];
+ $element['method_is_constructor'] = '__construct' === strtolower($tokens[$tokens->getNextMeaningfulToken($index)]->getContent());
+ $element['method_final_index'] = null;
+ $element['method_is_private'] = false;
+
+ $previous = $index;
+
+ do {
+ $previous = $tokens->getPrevMeaningfulToken($previous);
+
+ if ($tokens[$previous]->isGivenKind(T_PRIVATE)) {
+ $element['method_is_private'] = true;
+ } elseif ($tokens[$previous]->isGivenKind(T_FINAL)) {
+ $element['method_final_index'] = $previous;
+ }
+ } while ($tokens[$previous]->isGivenKind($modifierKinds));
+
+ yield $element;
+ }
+ }
+
+ private function clearFinal(Tokens $tokens, ?int $index): void
+ {
+ if (null === $index) {
+ return;
+ }
+
+ $tokens->clearAt($index);
+
+ ++$index;
+
+ if ($tokens[$index]->isWhitespace()) {
+ $tokens->clearAt($index);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php
new file mode 100644
index 0000000..56ca8b3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedClassElementsFixer.php
@@ -0,0 +1,521 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class OrderedClassElementsFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /** @internal */
+ public const SORT_ALPHA = 'alpha';
+
+ /** @internal */
+ public const SORT_NONE = 'none';
+
+ private const SUPPORTED_SORT_ALGORITHMS = [
+ self::SORT_NONE,
+ self::SORT_ALPHA,
+ ];
+
+ /**
+ * @var array Array containing all class element base types (keys) and their parent types (values)
+ */
+ private static $typeHierarchy = [
+ 'use_trait' => null,
+ 'public' => null,
+ 'protected' => null,
+ 'private' => null,
+ 'constant' => null,
+ 'constant_public' => ['constant', 'public'],
+ 'constant_protected' => ['constant', 'protected'],
+ 'constant_private' => ['constant', 'private'],
+ 'property' => null,
+ 'property_static' => ['property'],
+ 'property_public' => ['property', 'public'],
+ 'property_protected' => ['property', 'protected'],
+ 'property_private' => ['property', 'private'],
+ 'property_public_readonly' => ['property_readonly', 'property_public'],
+ 'property_protected_readonly' => ['property_readonly', 'property_protected'],
+ 'property_private_readonly' => ['property_readonly', 'property_private'],
+ 'property_public_static' => ['property_static', 'property_public'],
+ 'property_protected_static' => ['property_static', 'property_protected'],
+ 'property_private_static' => ['property_static', 'property_private'],
+ 'method' => null,
+ 'method_abstract' => ['method'],
+ 'method_static' => ['method'],
+ 'method_public' => ['method', 'public'],
+ 'method_protected' => ['method', 'protected'],
+ 'method_private' => ['method', 'private'],
+ 'method_public_abstract' => ['method_abstract', 'method_public'],
+ 'method_protected_abstract' => ['method_abstract', 'method_protected'],
+ 'method_public_abstract_static' => ['method_abstract', 'method_static', 'method_public'],
+ 'method_protected_abstract_static' => ['method_abstract', 'method_static', 'method_protected'],
+ 'method_public_static' => ['method_static', 'method_public'],
+ 'method_protected_static' => ['method_static', 'method_protected'],
+ 'method_private_static' => ['method_static', 'method_private'],
+ ];
+
+ /**
+ * @var array Array containing special method types
+ */
+ private static $specialTypes = [
+ 'construct' => null,
+ 'destruct' => null,
+ 'magic' => null,
+ 'phpunit' => null,
+ ];
+
+ /**
+ * @var array Resolved configuration array (type => position)
+ */
+ private $typePosition;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->typePosition = [];
+ $pos = 0;
+ foreach ($this->configuration['order'] as $type) {
+ $this->typePosition[$type] = $pos++;
+ }
+
+ foreach (self::$typeHierarchy as $type => $parents) {
+ if (isset($this->typePosition[$type])) {
+ continue;
+ }
+
+ if (!$parents) {
+ $this->typePosition[$type] = null;
+
+ continue;
+ }
+
+ foreach ($parents as $parent) {
+ if (isset($this->typePosition[$parent])) {
+ $this->typePosition[$type] = $this->typePosition[$parent];
+
+ continue 2;
+ }
+ }
+
+ $this->typePosition[$type] = null;
+ }
+
+ $lastPosition = \count($this->configuration['order']);
+ foreach ($this->typePosition as &$pos) {
+ if (null === $pos) {
+ $pos = $lastPosition;
+ }
+ // last digit is used by phpunit method ordering
+ $pos *= 10;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Orders the elements of classes/interfaces/traits.',
+ [
+ new CodeSample(
+ '<?php
+final class Example
+{
+ use BarTrait;
+ use BazTrait;
+ const C1 = 1;
+ const C2 = 2;
+ protected static $protStatProp;
+ public static $pubStatProp1;
+ public $pubProp1;
+ protected $protProp;
+ var $pubProp2;
+ private static $privStatProp;
+ private $privProp;
+ public static $pubStatProp2;
+ public $pubProp3;
+ protected function __construct() {}
+ private static function privStatFunc() {}
+ public function pubFunc1() {}
+ public function __toString() {}
+ protected function protFunc() {}
+ function pubFunc2() {}
+ public static function pubStatFunc1() {}
+ public function pubFunc3() {}
+ static function pubStatFunc2() {}
+ private function privFunc() {}
+ public static function pubStatFunc3() {}
+ protected static function protStatFunc() {}
+ public function __destruct() {}
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+class Example
+{
+ public function A(){}
+ private function B(){}
+}
+',
+ ['order' => ['method_private', 'method_public']]
+ ),
+ new CodeSample(
+ '<?php
+class Example
+{
+ public function D(){}
+ public function B(){}
+ public function A(){}
+ public function C(){}
+}
+',
+ ['order' => ['method_public'], 'sort_algorithm' => self::SORT_ALPHA]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ClassAttributesSeparationFixer, NoBlankLinesAfterClassOpeningFixer, SpaceAfterSemicolonFixer.
+ * Must run after NoPhp4ConstructorFixer, ProtectedToPrivateFixer.
+ */
+ public function getPriority(): int
+ {
+ return 65;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($i = 1, $count = $tokens->count(); $i < $count; ++$i) {
+ if (!$tokens[$i]->isClassy()) {
+ continue;
+ }
+
+ $i = $tokens->getNextTokenOfKind($i, ['{']);
+ $elements = $this->getElements($tokens, $i);
+
+ if (0 === \count($elements)) {
+ continue;
+ }
+
+ $sorted = $this->sortElements($elements);
+ $endIndex = $elements[\count($elements) - 1]['end'];
+
+ if ($sorted !== $elements) {
+ $this->sortTokens($tokens, $i, $endIndex, $sorted);
+ }
+
+ $i = $endIndex;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('order', 'List of strings defining order of elements.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(array_keys(array_merge(self::$typeHierarchy, self::$specialTypes)))])
+ ->setDefault([
+ 'use_trait',
+ 'constant_public',
+ 'constant_protected',
+ 'constant_private',
+ 'property_public',
+ 'property_protected',
+ 'property_private',
+ 'construct',
+ 'destruct',
+ 'magic',
+ 'phpunit',
+ 'method_public',
+ 'method_protected',
+ 'method_private',
+ ])
+ ->getOption(),
+ (new FixerOptionBuilder('sort_algorithm', 'How multiple occurrences of same type statements should be sorted'))
+ ->setAllowedValues(self::SUPPORTED_SORT_ALGORITHMS)
+ ->setDefault(self::SORT_NONE)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @return array[]
+ */
+ private function getElements(Tokens $tokens, int $startIndex): array
+ {
+ static $elementTokenKinds = [CT::T_USE_TRAIT, T_CONST, T_VARIABLE, T_FUNCTION];
+
+ ++$startIndex;
+ $elements = [];
+
+ while (true) {
+ $element = [
+ 'start' => $startIndex,
+ 'visibility' => 'public',
+ 'abstract' => false,
+ 'static' => false,
+ 'readonly' => false,
+ ];
+
+ for ($i = $startIndex;; ++$i) {
+ $token = $tokens[$i];
+
+ // class end
+ if ($token->equals('}')) {
+ return $elements;
+ }
+
+ if ($token->isGivenKind(T_ABSTRACT)) {
+ $element['abstract'] = true;
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_STATIC)) {
+ $element['static'] = true;
+
+ continue;
+ }
+
+ if (\defined('T_READONLY') && $token->isGivenKind(T_READONLY)) { // @TODO: drop condition when PHP 8.1+ is required
+ $element['readonly'] = true;
+ }
+
+ if ($token->isGivenKind([T_PROTECTED, T_PRIVATE])) {
+ $element['visibility'] = strtolower($token->getContent());
+
+ continue;
+ }
+
+ if (!$token->isGivenKind($elementTokenKinds)) {
+ continue;
+ }
+
+ $type = $this->detectElementType($tokens, $i);
+ if (\is_array($type)) {
+ $element['type'] = $type[0];
+ $element['name'] = $type[1];
+ } else {
+ $element['type'] = $type;
+ }
+
+ if ('property' === $element['type']) {
+ $element['name'] = $tokens[$i]->getContent();
+ } elseif (\in_array($element['type'], ['use_trait', 'constant', 'method', 'magic', 'construct', 'destruct'], true)) {
+ $element['name'] = $tokens[$tokens->getNextMeaningfulToken($i)]->getContent();
+ }
+
+ $element['end'] = $this->findElementEnd($tokens, $i);
+
+ break;
+ }
+
+ $elements[] = $element;
+ $startIndex = $element['end'] + 1;
+ }
+ }
+
+ /**
+ * @return array|string type or array of type and name
+ */
+ private function detectElementType(Tokens $tokens, int $index)
+ {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(CT::T_USE_TRAIT)) {
+ return 'use_trait';
+ }
+
+ if ($token->isGivenKind(T_CONST)) {
+ return 'constant';
+ }
+
+ if ($token->isGivenKind(T_VARIABLE)) {
+ return 'property';
+ }
+
+ $nameToken = $tokens[$tokens->getNextMeaningfulToken($index)];
+
+ if ($nameToken->equals([T_STRING, '__construct'], false)) {
+ return 'construct';
+ }
+
+ if ($nameToken->equals([T_STRING, '__destruct'], false)) {
+ return 'destruct';
+ }
+
+ if (
+ $nameToken->equalsAny([
+ [T_STRING, 'setUpBeforeClass'],
+ [T_STRING, 'doSetUpBeforeClass'],
+ [T_STRING, 'tearDownAfterClass'],
+ [T_STRING, 'doTearDownAfterClass'],
+ [T_STRING, 'setUp'],
+ [T_STRING, 'doSetUp'],
+ [T_STRING, 'tearDown'],
+ [T_STRING, 'doTearDown'],
+ ], false)
+ ) {
+ return ['phpunit', strtolower($nameToken->getContent())];
+ }
+
+ return str_starts_with($nameToken->getContent(), '__')
+ ? 'magic'
+ : 'method'
+ ;
+ }
+
+ private function findElementEnd(Tokens $tokens, int $index): int
+ {
+ $index = $tokens->getNextTokenOfKind($index, ['{', ';']);
+
+ if ($tokens[$index]->equals('{')) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+ }
+
+ for (++$index; $tokens[$index]->isWhitespace(" \t") || $tokens[$index]->isComment(); ++$index);
+
+ --$index;
+
+ return $tokens[$index]->isWhitespace() ? $index - 1 : $index;
+ }
+
+ /**
+ * @param array[] $elements
+ *
+ * @return array[]
+ */
+ private function sortElements(array $elements): array
+ {
+ static $phpunitPositions = [
+ 'setupbeforeclass' => 1,
+ 'dosetupbeforeclass' => 2,
+ 'teardownafterclass' => 3,
+ 'doteardownafterclass' => 4,
+ 'setup' => 5,
+ 'dosetup' => 6,
+ 'teardown' => 7,
+ 'doteardown' => 8,
+ ];
+
+ foreach ($elements as &$element) {
+ $type = $element['type'];
+
+ if (\array_key_exists($type, self::$specialTypes)) {
+ if (isset($this->typePosition[$type])) {
+ $element['position'] = $this->typePosition[$type];
+ if ('phpunit' === $type) {
+ $element['position'] += $phpunitPositions[$element['name']];
+ }
+
+ continue;
+ }
+
+ $type = 'method';
+ }
+
+ if (\in_array($type, ['constant', 'property', 'method'], true)) {
+ $type .= '_'.$element['visibility'];
+ if ($element['abstract']) {
+ $type .= '_abstract';
+ }
+ if ($element['static']) {
+ $type .= '_static';
+ }
+ if ($element['readonly']) {
+ $type .= '_readonly';
+ }
+ }
+
+ $element['position'] = $this->typePosition[$type];
+ }
+ unset($element);
+
+ usort($elements, function (array $a, array $b): int {
+ if ($a['position'] === $b['position']) {
+ return $this->sortGroupElements($a, $b);
+ }
+
+ return $a['position'] <=> $b['position'];
+ });
+
+ return $elements;
+ }
+
+ private function sortGroupElements(array $a, array $b): int
+ {
+ $selectedSortAlgorithm = $this->configuration['sort_algorithm'];
+
+ if (self::SORT_ALPHA === $selectedSortAlgorithm) {
+ return strcasecmp($a['name'], $b['name']);
+ }
+
+ return $a['start'] <=> $b['start'];
+ }
+
+ /**
+ * @param array[] $elements
+ */
+ private function sortTokens(Tokens $tokens, int $startIndex, int $endIndex, array $elements): void
+ {
+ $replaceTokens = [];
+
+ foreach ($elements as $element) {
+ for ($i = $element['start']; $i <= $element['end']; ++$i) {
+ $replaceTokens[] = clone $tokens[$i];
+ }
+ }
+
+ $tokens->overrideRange($startIndex + 1, $endIndex, $replaceTokens);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php
new file mode 100644
index 0000000..2fc1e36
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedInterfacesFixer.php
@@ -0,0 +1,243 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dave van der Brugge <dmvdbrugge@gmail.com>
+ */
+final class OrderedInterfacesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /** @internal */
+ public const OPTION_DIRECTION = 'direction';
+
+ /** @internal */
+ public const OPTION_ORDER = 'order';
+
+ /** @internal */
+ public const DIRECTION_ASCEND = 'ascend';
+
+ /** @internal */
+ public const DIRECTION_DESCEND = 'descend';
+
+ /** @internal */
+ public const ORDER_ALPHA = 'alpha';
+
+ /** @internal */
+ public const ORDER_LENGTH = 'length';
+
+ /**
+ * Array of supported directions in configuration.
+ *
+ * @var string[]
+ */
+ private const SUPPORTED_DIRECTION_OPTIONS = [
+ self::DIRECTION_ASCEND,
+ self::DIRECTION_DESCEND,
+ ];
+
+ /**
+ * Array of supported orders in configuration.
+ *
+ * @var string[]
+ */
+ private const SUPPORTED_ORDER_OPTIONS = [
+ self::ORDER_ALPHA,
+ self::ORDER_LENGTH,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Orders the interfaces in an `implements` or `interface extends` clause.',
+ [
+ new CodeSample(
+ "<?php\n\nfinal class ExampleA implements Gamma, Alpha, Beta {}\n\ninterface ExampleB extends Gamma, Alpha, Beta {}\n"
+ ),
+ new CodeSample(
+ "<?php\n\nfinal class ExampleA implements Gamma, Alpha, Beta {}\n\ninterface ExampleB extends Gamma, Alpha, Beta {}\n",
+ [self::OPTION_DIRECTION => self::DIRECTION_DESCEND]
+ ),
+ new CodeSample(
+ "<?php\n\nfinal class ExampleA implements MuchLonger, Short, Longer {}\n\ninterface ExampleB extends MuchLonger, Short, Longer {}\n",
+ [self::OPTION_ORDER => self::ORDER_LENGTH]
+ ),
+ new CodeSample(
+ "<?php\n\nfinal class ExampleA implements MuchLonger, Short, Longer {}\n\ninterface ExampleB extends MuchLonger, Short, Longer {}\n",
+ [
+ self::OPTION_ORDER => self::ORDER_LENGTH,
+ self::OPTION_DIRECTION => self::DIRECTION_DESCEND,
+ ]
+ ),
+ ],
+ null,
+ "Risky for `implements` when specifying both an interface and its parent interface, because PHP doesn't break on `parent, child` but does on `child, parent`."
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_IMPLEMENTS)
+ || $tokens->isAllTokenKindsFound([T_INTERFACE, T_EXTENDS]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_IMPLEMENTS)) {
+ if (!$token->isGivenKind(T_EXTENDS)) {
+ continue;
+ }
+
+ $nameTokenIndex = $tokens->getPrevMeaningfulToken($index);
+ $interfaceTokenIndex = $tokens->getPrevMeaningfulToken($nameTokenIndex);
+ $interfaceToken = $tokens[$interfaceTokenIndex];
+
+ if (!$interfaceToken->isGivenKind(T_INTERFACE)) {
+ continue;
+ }
+ }
+
+ $implementsStart = $index + 1;
+ $implementsEnd = $tokens->getPrevNonWhitespace($tokens->getNextTokenOfKind($implementsStart, ['{']));
+
+ $interfaces = $this->getInterfaces($tokens, $implementsStart, $implementsEnd);
+
+ if (1 === \count($interfaces)) {
+ continue;
+ }
+
+ foreach ($interfaces as $interfaceIndex => $interface) {
+ $interfaceTokens = Tokens::fromArray($interface, false);
+ $normalized = '';
+ $actualInterfaceIndex = $interfaceTokens->getNextMeaningfulToken(-1);
+
+ while ($interfaceTokens->offsetExists($actualInterfaceIndex)) {
+ $token = $interfaceTokens[$actualInterfaceIndex];
+
+ if (null === $token || $token->isComment() || $token->isWhitespace()) {
+ break;
+ }
+
+ $normalized .= str_replace('\\', ' ', $token->getContent());
+ ++$actualInterfaceIndex;
+ }
+
+ $interfaces[$interfaceIndex] = [
+ 'tokens' => $interface,
+ 'normalized' => $normalized,
+ 'originalIndex' => $interfaceIndex,
+ ];
+ }
+
+ usort($interfaces, function (array $first, array $second): int {
+ $score = self::ORDER_LENGTH === $this->configuration[self::OPTION_ORDER]
+ ? \strlen($first['normalized']) - \strlen($second['normalized'])
+ : strcasecmp($first['normalized'], $second['normalized']);
+
+ if (self::DIRECTION_DESCEND === $this->configuration[self::OPTION_DIRECTION]) {
+ $score *= -1;
+ }
+
+ return $score;
+ });
+
+ $changed = false;
+
+ foreach ($interfaces as $interfaceIndex => $interface) {
+ if ($interface['originalIndex'] !== $interfaceIndex) {
+ $changed = true;
+
+ break;
+ }
+ }
+
+ if (!$changed) {
+ continue;
+ }
+
+ $newTokens = array_shift($interfaces)['tokens'];
+
+ foreach ($interfaces as $interface) {
+ array_push($newTokens, new Token(','), ...$interface['tokens']);
+ }
+
+ $tokens->overrideRange($implementsStart, $implementsEnd, $newTokens);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder(self::OPTION_ORDER, 'How the interfaces should be ordered'))
+ ->setAllowedValues(self::SUPPORTED_ORDER_OPTIONS)
+ ->setDefault(self::ORDER_ALPHA)
+ ->getOption(),
+ (new FixerOptionBuilder(self::OPTION_DIRECTION, 'Which direction the interfaces should be ordered'))
+ ->setAllowedValues(self::SUPPORTED_DIRECTION_OPTIONS)
+ ->setDefault(self::DIRECTION_ASCEND)
+ ->getOption(),
+ ]);
+ }
+
+ private function getInterfaces(Tokens $tokens, int $implementsStart, int $implementsEnd): array
+ {
+ $interfaces = [];
+ $interfaceIndex = 0;
+
+ for ($i = $implementsStart; $i <= $implementsEnd; ++$i) {
+ if ($tokens[$i]->equals(',')) {
+ ++$interfaceIndex;
+ $interfaces[$interfaceIndex] = [];
+
+ continue;
+ }
+
+ $interfaces[$interfaceIndex][] = $tokens[$i];
+ }
+
+ return $interfaces;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php
new file mode 100644
index 0000000..9602ec3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/OrderedTraitsFixer.php
@@ -0,0 +1,194 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class OrderedTraitsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Trait `use` statements must be sorted alphabetically.',
+ [
+ new CodeSample("<?php class Foo { \nuse Z; use A; }\n"),
+ ],
+ null,
+ 'Risky when depending on order of the imports.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(CT::T_USE_TRAIT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($this->findUseStatementsGroups($tokens) as $uses) {
+ $this->sortUseStatements($tokens, $uses);
+ }
+ }
+
+ /**
+ * @return iterable<array<int, Tokens>>
+ */
+ private function findUseStatementsGroups(Tokens $tokens): iterable
+ {
+ $uses = [];
+
+ for ($index = 1, $max = \count($tokens); $index < $max; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isWhitespace() || $token->isComment()) {
+ continue;
+ }
+
+ if (!$token->isGivenKind(CT::T_USE_TRAIT)) {
+ if (\count($uses) > 0) {
+ yield $uses;
+
+ $uses = [];
+ }
+
+ continue;
+ }
+
+ $endIndex = $tokens->getNextTokenOfKind($index, [';', '{']);
+
+ if ($tokens[$endIndex]->equals('{')) {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $endIndex);
+ }
+
+ $use = [];
+
+ for ($i = $index; $i <= $endIndex; ++$i) {
+ $use[] = $tokens[$i];
+ }
+
+ $uses[$index] = Tokens::fromArray($use);
+
+ $index = $endIndex;
+ }
+ }
+
+ /**
+ * @param array<int, Tokens> $uses
+ */
+ private function sortUseStatements(Tokens $tokens, array $uses): void
+ {
+ foreach ($uses as $use) {
+ $this->sortMultipleTraitsInStatement($use);
+ }
+
+ $this->sort($tokens, $uses);
+ }
+
+ private function sortMultipleTraitsInStatement(Tokens $use): void
+ {
+ $traits = [];
+ $indexOfName = null;
+ $name = [];
+
+ for ($index = 0, $max = \count($use); $index < $max; ++$index) {
+ $token = $use[$index];
+
+ if ($token->isGivenKind([T_STRING, T_NS_SEPARATOR])) {
+ $name[] = $token;
+
+ if (null === $indexOfName) {
+ $indexOfName = $index;
+ }
+
+ continue;
+ }
+
+ if ($token->equalsAny([',', ';', '{'])) {
+ $traits[$indexOfName] = Tokens::fromArray($name);
+
+ $name = [];
+ $indexOfName = null;
+ }
+
+ if ($token->equals('{')) {
+ $index = $use->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+ }
+ }
+
+ $this->sort($use, $traits);
+ }
+
+ /**
+ * @param array<int, Tokens> $elements
+ */
+ private function sort(Tokens $tokens, array $elements): void
+ {
+ $toTraitName = static function (Tokens $use): string {
+ $string = '';
+
+ foreach ($use as $token) {
+ if ($token->equalsAny([';', '{'])) {
+ break;
+ }
+
+ if ($token->isGivenKind([T_NS_SEPARATOR, T_STRING])) {
+ $string .= $token->getContent();
+ }
+ }
+
+ return ltrim($string, '\\');
+ };
+
+ $sortedElements = $elements;
+ uasort($sortedElements, static function (Tokens $useA, Tokens $useB) use ($toTraitName): int {
+ return strcasecmp($toTraitName($useA), $toTraitName($useB));
+ });
+
+ $sortedElements = array_combine(
+ array_keys($elements),
+ array_values($sortedElements)
+ );
+
+ foreach (array_reverse($sortedElements, true) as $index => $tokensToInsert) {
+ $tokens->overrideRange(
+ $index,
+ $index + \count($elements[$index]) - 1,
+ $tokensToInsert
+ );
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php
new file mode 100644
index 0000000..36648eb
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php
@@ -0,0 +1,151 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class ProtectedToPrivateFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts `protected` variables and methods to `private` where possible.',
+ [
+ new CodeSample(
+ '<?php
+final class Sample
+{
+ protected $a;
+
+ protected function test()
+ {
+ }
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before OrderedClassElementsFixer.
+ * Must run after FinalInternalClassFixer.
+ */
+ public function getPriority(): int
+ {
+ return 66;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CLASS, T_FINAL, T_PROTECTED]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $modifierKinds = [T_PUBLIC, T_PROTECTED, T_PRIVATE, T_FINAL, T_ABSTRACT, T_NS_SEPARATOR, T_STRING, CT::T_NULLABLE_TYPE, CT::T_ARRAY_TYPEHINT, T_STATIC, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $modifierKinds[] = T_READONLY;
+ }
+
+ $classesCandidate = [];
+
+ foreach ($tokensAnalyzer->getClassyElements() as $index => $element) {
+ $classIndex = $element['classIndex'];
+
+ if (!\array_key_exists($classIndex, $classesCandidate)) {
+ $classesCandidate[$classIndex] = $this->isClassCandidate($tokens, $classIndex);
+ }
+
+ if (false === $classesCandidate[$classIndex]) {
+ continue; // not "final" class, "extends", is "anonymous" or uses trait
+ }
+
+ $previous = $index;
+ $isProtected = false;
+ $isFinal = false;
+
+ do {
+ $previous = $tokens->getPrevMeaningfulToken($previous);
+
+ if ($tokens[$previous]->isGivenKind(T_PROTECTED)) {
+ $isProtected = $previous;
+ } elseif ($tokens[$previous]->isGivenKind(T_FINAL)) {
+ $isFinal = $previous;
+ }
+ } while ($tokens[$previous]->isGivenKind($modifierKinds));
+
+ if (false === $isProtected) {
+ continue;
+ }
+
+ if ($isFinal && 'const' === $element['type']) {
+ continue; // Final constants cannot be private
+ }
+
+ $element['protected_index'] = $isProtected;
+ $tokens[$element['protected_index']] = new Token([T_PRIVATE, 'private']);
+ }
+ }
+
+ private function isClassCandidate(Tokens $tokens, int $classIndex): bool
+ {
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($classIndex)];
+
+ if (!$prevToken->isGivenKind(T_FINAL)) {
+ return false;
+ }
+
+ $classNameIndex = $tokens->getNextMeaningfulToken($classIndex); // move to class name as anonymous class is never "final"
+ $classExtendsIndex = $tokens->getNextMeaningfulToken($classNameIndex); // move to possible "extends"
+
+ if ($tokens[$classExtendsIndex]->isGivenKind(T_EXTENDS)) {
+ return false;
+ }
+
+ if (!$tokens->isTokenKindFound(CT::T_USE_TRAIT)) {
+ return true; // cheap test
+ }
+
+ $classOpenIndex = $tokens->getNextTokenOfKind($classNameIndex, ['{']);
+ $classCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classOpenIndex);
+ $useIndex = $tokens->getNextTokenOfKind($classOpenIndex, [[CT::T_USE_TRAIT]]);
+
+ return null === $useIndex || $useIndex > $classCloseIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php
new file mode 100644
index 0000000..568ab6e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfAccessorFixer.php
@@ -0,0 +1,189 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class SelfAccessorFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Inside class or interface element `self` should be preferred to the class name itself.',
+ [
+ new CodeSample(
+ '<?php
+class Sample
+{
+ const BAZ = 1;
+ const BAR = Sample::BAZ;
+
+ public function getBar()
+ {
+ return Sample::BAR;
+ }
+}
+'
+ ),
+ ],
+ null,
+ 'Risky when using dynamic calls like get_called_class() or late static binding.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_CLASS, T_INTERFACE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ foreach ((new NamespacesAnalyzer())->getDeclarations($tokens) as $namespace) {
+ for ($index = $namespace->getScopeStartIndex(); $index < $namespace->getScopeEndIndex(); ++$index) {
+ if (!$tokens[$index]->isGivenKind([T_CLASS, T_INTERFACE]) || $tokensAnalyzer->isAnonymousClass($index)) {
+ continue;
+ }
+
+ $nameIndex = $tokens->getNextTokenOfKind($index, [[T_STRING]]);
+ $startIndex = $tokens->getNextTokenOfKind($nameIndex, ['{']);
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $startIndex);
+
+ $name = $tokens[$nameIndex]->getContent();
+
+ $this->replaceNameOccurrences($tokens, $namespace->getFullName(), $name, $startIndex, $endIndex);
+
+ $index = $endIndex;
+ }
+ }
+ }
+
+ /**
+ * Replace occurrences of the name of the classy element by "self" (if possible).
+ */
+ private function replaceNameOccurrences(Tokens $tokens, string $namespace, string $name, int $startIndex, int $endIndex): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $insideMethodSignatureUntil = null;
+
+ for ($i = $startIndex; $i < $endIndex; ++$i) {
+ if ($i === $insideMethodSignatureUntil) {
+ $insideMethodSignatureUntil = null;
+ }
+
+ $token = $tokens[$i];
+
+ // skip anonymous classes
+ if ($token->isGivenKind(T_CLASS) && $tokensAnalyzer->isAnonymousClass($i)) {
+ $i = $tokens->getNextTokenOfKind($i, ['{']);
+ $i = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $i);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_FUNCTION)) {
+ $i = $tokens->getNextTokenOfKind($i, ['(']);
+ $insideMethodSignatureUntil = $tokens->getNextTokenOfKind($i, ['{', ';']);
+
+ continue;
+ }
+
+ if (!$token->equals([T_STRING, $name], false)) {
+ continue;
+ }
+
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($i)];
+ if ($nextToken->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ $classStartIndex = $i;
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($i)];
+ if ($prevToken->isGivenKind(T_NS_SEPARATOR)) {
+ $classStartIndex = $this->getClassStart($tokens, $i, $namespace);
+ if (null === $classStartIndex) {
+ continue;
+ }
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($classStartIndex)];
+ }
+ if ($prevToken->isGivenKind(T_STRING) || $prevToken->isObjectOperator()) {
+ continue;
+ }
+
+ if (
+ $prevToken->isGivenKind([T_INSTANCEOF, T_NEW])
+ || $nextToken->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM)
+ || (
+ null !== $insideMethodSignatureUntil
+ && $i < $insideMethodSignatureUntil
+ && $prevToken->equalsAny(['(', ',', [CT::T_TYPE_COLON], [CT::T_NULLABLE_TYPE]])
+ )
+ ) {
+ for ($j = $classStartIndex; $j < $i; ++$j) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($j);
+ }
+ $tokens[$i] = new Token([T_STRING, 'self']);
+ }
+ }
+ }
+
+ private function getClassStart(Tokens $tokens, int $index, string $namespace): ?int
+ {
+ $namespace = ('' !== $namespace ? '\\'.$namespace : '').'\\';
+
+ foreach (array_reverse(Preg::split('/(\\\\)/', $namespace, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE)) as $piece) {
+ $index = $tokens->getPrevMeaningfulToken($index);
+ if ('\\' === $piece) {
+ if (!$tokens[$index]->isGivenKind(T_NS_SEPARATOR)) {
+ return null;
+ }
+ } elseif (!$tokens[$index]->equals([T_STRING, $piece], false)) {
+ return null;
+ }
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php
new file mode 100644
index 0000000..0c66ca6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SelfStaticAccessorFixer.php
@@ -0,0 +1,201 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+final class SelfStaticAccessorFixer extends AbstractFixer
+{
+ /**
+ * @var TokensAnalyzer
+ */
+ private $tokensAnalyzer;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Inside a `final` class or anonymous class `self` should be preferred to `static`.',
+ [
+ new CodeSample(
+ '<?php
+final class Sample
+{
+ private static $A = 1;
+
+ public function getBar()
+ {
+ return static::class.static::test().static::$A;
+ }
+
+ private static function test()
+ {
+ return \'test\';
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class Foo
+{
+ public function bar()
+ {
+ return new static();
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class Foo
+{
+ public function isBar()
+ {
+ return $foo instanceof static;
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+$a = new class() {
+ public function getBar()
+ {
+ return static::class;
+ }
+};
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CLASS, T_STATIC]) && $tokens->isAnyTokenKindsFound([T_DOUBLE_COLON, T_NEW, T_INSTANCEOF]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after FinalInternalClassFixer, FunctionToConstantFixer, PhpUnitTestCaseStaticMethodCallsFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ $classIndex = $tokens->getNextTokenOfKind(0, [[T_CLASS]]);
+
+ while (null !== $classIndex) {
+ if (
+ $this->tokensAnalyzer->isAnonymousClass($classIndex)
+ || $tokens[$tokens->getPrevMeaningfulToken($classIndex)]->isGivenKind(T_FINAL)
+ ) {
+ $classIndex = $this->fixClass($tokens, $classIndex);
+ }
+
+ $classIndex = $tokens->getNextTokenOfKind($classIndex, [[T_CLASS]]);
+ }
+ }
+
+ private function fixClass(Tokens $tokens, int $index): int
+ {
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+ $classOpenCount = 1;
+
+ while ($classOpenCount > 0) {
+ ++$index;
+
+ if ($tokens[$index]->equals('{')) {
+ ++$classOpenCount;
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals('}')) {
+ --$classOpenCount;
+
+ continue;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ // do not fix inside lambda
+ if ($this->tokensAnalyzer->isLambda($index)) {
+ // figure out where the lambda starts
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+ $openCount = 1;
+
+ do {
+ $index = $tokens->getNextTokenOfKind($index, ['}', '{', [T_CLASS]]);
+ if ($tokens[$index]->equals('}')) {
+ --$openCount;
+ } elseif ($tokens[$index]->equals('{')) {
+ ++$openCount;
+ } else {
+ $index = $this->fixClass($tokens, $index);
+ }
+ } while ($openCount > 0);
+ }
+
+ continue;
+ }
+
+ if ($tokens[$index]->isGivenKind([T_NEW, T_INSTANCEOF])) {
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->isGivenKind(T_STATIC)) {
+ $tokens[$index] = new Token([T_STRING, 'self']);
+ }
+
+ continue;
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_STATIC)) {
+ continue;
+ }
+
+ $staticIndex = $index;
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$index]->isGivenKind(T_DOUBLE_COLON)) {
+ continue;
+ }
+
+ $tokens[$staticIndex] = new Token([T_STRING, 'self']);
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php
new file mode 100644
index 0000000..2c8c8dc
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php
@@ -0,0 +1,240 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * Fixer for rules defined in PSR2 ¶4.2.
+ *
+ * @author Javier Spagnoletti <phansys@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class SingleClassElementPerStatementFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ClassAttributesSeparationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 56;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST NOT be more than one property or constant declared per statement.',
+ [
+ new CodeSample(
+ '<?php
+final class Example
+{
+ const FOO_1 = 1, FOO_2 = 2;
+ private static $bar1 = array(1,2,3), $bar2 = [1,2,3];
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class Example
+{
+ const FOO_1 = 1, FOO_2 = 2;
+ private static $bar1 = array(1,2,3), $bar2 = [1,2,3];
+}
+',
+ ['elements' => ['property']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+ $elements = array_reverse($analyzer->getClassyElements(), true);
+
+ foreach ($elements as $index => $element) {
+ if (!\in_array($element['type'], $this->configuration['elements'], true)) {
+ continue; // not in configuration
+ }
+
+ $this->fixElement($tokens, $element['type'], $index);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $values = ['const', 'property'];
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('elements', 'List of strings which element should be modified.'))
+ ->setDefault($values)
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset($values)])
+ ->getOption(),
+ ]);
+ }
+
+ private function fixElement(Tokens $tokens, string $type, int $index): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $repeatIndex = $index;
+
+ while (true) {
+ $repeatIndex = $tokens->getNextMeaningfulToken($repeatIndex);
+ $repeatToken = $tokens[$repeatIndex];
+
+ if ($tokensAnalyzer->isArray($repeatIndex)) {
+ if ($repeatToken->isGivenKind(T_ARRAY)) {
+ $repeatIndex = $tokens->getNextTokenOfKind($repeatIndex, ['(']);
+ $repeatIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $repeatIndex);
+ } else {
+ $repeatIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $repeatIndex);
+ }
+
+ continue;
+ }
+
+ if ($repeatToken->equals(';')) {
+ return; // no repeating found, no fixing needed
+ }
+
+ if ($repeatToken->equals(',')) {
+ break;
+ }
+ }
+
+ $start = $tokens->getPrevTokenOfKind($index, [';', '{', '}']);
+ $this->expandElement(
+ $tokens,
+ $type,
+ $tokens->getNextMeaningfulToken($start),
+ $tokens->getNextTokenOfKind($index, [';'])
+ );
+ }
+
+ private function expandElement(Tokens $tokens, string $type, int $startIndex, int $endIndex): void
+ {
+ $divisionContent = null;
+
+ if ($tokens[$startIndex - 1]->isWhitespace()) {
+ $divisionContent = $tokens[$startIndex - 1]->getContent();
+
+ if (Preg::match('#(\n|\r\n)#', $divisionContent, $matches)) {
+ $divisionContent = $matches[0].trim($divisionContent, "\r\n");
+ }
+ }
+
+ // iterate variables to split up
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ $token = $tokens[$i];
+
+ if ($token->equals(')')) {
+ $i = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $i);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_CLOSE)) {
+ $i = $tokens->findBlockStart(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $i);
+
+ continue;
+ }
+
+ if (!$tokens[$i]->equals(',')) {
+ continue;
+ }
+
+ $tokens[$i] = new Token(';');
+
+ if ($tokens[$i + 1]->isWhitespace()) {
+ $tokens->clearAt($i + 1);
+ }
+
+ if (null !== $divisionContent && '' !== $divisionContent) {
+ $tokens->insertAt($i + 1, new Token([T_WHITESPACE, $divisionContent]));
+ }
+
+ // collect modifiers
+ $sequence = $this->getModifiersSequences($tokens, $type, $startIndex, $endIndex);
+ $tokens->insertAt($i + 2, $sequence);
+ }
+ }
+
+ /**
+ * @return Token[]
+ */
+ private function getModifiersSequences(Tokens $tokens, string $type, int $startIndex, int $endIndex): array
+ {
+ if ('property' === $type) {
+ $tokenKinds = [T_PUBLIC, T_PROTECTED, T_PRIVATE, T_STATIC, T_VAR, T_STRING, T_NS_SEPARATOR, CT::T_NULLABLE_TYPE, CT::T_ARRAY_TYPEHINT, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $tokenKinds[] = T_READONLY;
+ }
+ } else {
+ $tokenKinds = [T_PUBLIC, T_PROTECTED, T_PRIVATE, T_CONST];
+ }
+
+ $sequence = [];
+
+ for ($i = $startIndex; $i < $endIndex - 1; ++$i) {
+ if ($tokens[$i]->isComment()) {
+ continue;
+ }
+
+ if (!$tokens[$i]->isWhitespace() && !$tokens[$i]->isGivenKind($tokenKinds)) {
+ break;
+ }
+
+ $sequence[] = clone $tokens[$i];
+ }
+
+ return $sequence;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleTraitInsertPerStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleTraitInsertPerStatementFixer.php
new file mode 100644
index 0000000..095cf44
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/SingleTraitInsertPerStatementFixer.php
@@ -0,0 +1,116 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class SingleTraitInsertPerStatementFixer extends AbstractFixer
+{
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Each trait `use` must be done as single statement.',
+ [
+ new CodeSample(
+ '<?php
+final class Example
+{
+ use Foo, Bar;
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, SpaceAfterSemicolonFixer.
+ */
+ public function getPriority(): int
+ {
+ return 36;
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(CT::T_USE_TRAIT);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; 1 < $index; --$index) {
+ if ($tokens[$index]->isGivenKind(CT::T_USE_TRAIT)) {
+ $candidates = $this->getCandidates($tokens, $index);
+ if (\count($candidates) > 0) {
+ $this->fixTraitUse($tokens, $index, $candidates);
+ }
+ }
+ }
+ }
+
+ /**
+ * @param int[] $candidates ',' indexes to fix
+ */
+ private function fixTraitUse(Tokens $tokens, int $useTraitIndex, array $candidates): void
+ {
+ foreach ($candidates as $commaIndex) {
+ $inserts = [
+ new Token([CT::T_USE_TRAIT, 'use']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ $nextImportStartIndex = $tokens->getNextMeaningfulToken($commaIndex);
+
+ if ($tokens[$nextImportStartIndex - 1]->isWhitespace()) {
+ if (1 === Preg::match('/\R/', $tokens[$nextImportStartIndex - 1]->getContent())) {
+ array_unshift($inserts, clone $tokens[$useTraitIndex - 1]);
+ }
+ $tokens->clearAt($nextImportStartIndex - 1);
+ }
+
+ $tokens[$commaIndex] = new Token(';');
+ $tokens->insertAt($nextImportStartIndex, $inserts);
+ }
+ }
+
+ /**
+ * @return int[]
+ */
+ private function getCandidates(Tokens $tokens, int $index): array
+ {
+ $indexes = [];
+ $index = $tokens->getNextTokenOfKind($index, [',', ';', '{']);
+
+ while (!$tokens[$index]->equals(';')) {
+ if ($tokens[$index]->equals('{')) {
+ return []; // do not fix use cases with grouping
+ }
+
+ $indexes[] = $index;
+ $index = $tokens->getNextTokenOfKind($index, [',', ';', '{']);
+ }
+
+ return array_reverse($indexes);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php
new file mode 100644
index 0000000..4034f72
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/VisibilityRequiredFixer.php
@@ -0,0 +1,202 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * Fixer for rules defined in PSR2 ¶4.3, ¶4.5.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class VisibilityRequiredFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Visibility MUST be declared on all properties and methods; `abstract` and `final` MUST be declared before the visibility; `static` MUST be declared after the visibility.',
+ [
+ new CodeSample(
+ '<?php
+class Sample
+{
+ var $a;
+ static protected $var_foo2;
+
+ function A()
+ {
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+class Sample
+{
+ const SAMPLE = 1;
+}
+',
+ ['elements' => ['const']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('elements', 'The structural elements to fix (PHP >= 7.1 required for `const`).'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(['property', 'method', 'const'])])
+ ->setDefault(['property', 'method', 'const'])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ $propertyTypeDeclarationKinds = [T_STRING, T_NS_SEPARATOR, CT::T_NULLABLE_TYPE, CT::T_ARRAY_TYPEHINT, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $propertyReadOnlyType = T_READONLY;
+ $propertyTypeDeclarationKinds[] = T_READONLY;
+ } else {
+ $propertyReadOnlyType = -999;
+ }
+
+ $expectedKindsGeneric = [T_ABSTRACT, T_FINAL, T_PRIVATE, T_PROTECTED, T_PUBLIC, T_STATIC, T_VAR];
+ $expectedKindsPropertyKinds = array_merge($expectedKindsGeneric, $propertyTypeDeclarationKinds);
+
+ foreach (array_reverse($tokensAnalyzer->getClassyElements(), true) as $index => $element) {
+ if (!\in_array($element['type'], $this->configuration['elements'], true)) {
+ continue;
+ }
+
+ $abstractFinalIndex = null;
+ $visibilityIndex = null;
+ $staticIndex = null;
+ $typeIndex = null;
+ $readOnlyIndex = null;
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $expectedKinds = 'property' === $element['type']
+ ? $expectedKindsPropertyKinds
+ : $expectedKindsGeneric
+ ;
+
+ while ($tokens[$prevIndex]->isGivenKind($expectedKinds)) {
+ if ($tokens[$prevIndex]->isGivenKind([T_ABSTRACT, T_FINAL])) {
+ $abstractFinalIndex = $prevIndex;
+ } elseif ($tokens[$prevIndex]->isGivenKind(T_STATIC)) {
+ $staticIndex = $prevIndex;
+ } elseif ($tokens[$prevIndex]->isGivenKind($propertyReadOnlyType)) {
+ $readOnlyIndex = $prevIndex;
+ } elseif ($tokens[$prevIndex]->isGivenKind($propertyTypeDeclarationKinds)) {
+ $typeIndex = $prevIndex;
+ } else {
+ $visibilityIndex = $prevIndex;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ }
+
+ if (null !== $typeIndex) {
+ $index = $typeIndex;
+ }
+
+ if ($tokens[$prevIndex]->equals(',')) {
+ continue;
+ }
+
+ $swapIndex = $staticIndex ?? $readOnlyIndex; // "static" property cannot be "readonly", so there can always be at most one swap
+
+ if (null !== $swapIndex) {
+ if ($this->isKeywordPlacedProperly($tokens, $swapIndex, $index)) {
+ $index = $swapIndex;
+ } else {
+ $this->moveTokenAndEnsureSingleSpaceFollows($tokens, $swapIndex, $index);
+ }
+ }
+
+ if (null === $visibilityIndex) {
+ $tokens->insertAt($index, [new Token([T_PUBLIC, 'public']), new Token([T_WHITESPACE, ' '])]);
+ } else {
+ if ($tokens[$visibilityIndex]->isGivenKind(T_VAR)) {
+ $tokens[$visibilityIndex] = new Token([T_PUBLIC, 'public']);
+ }
+ if ($this->isKeywordPlacedProperly($tokens, $visibilityIndex, $index)) {
+ $index = $visibilityIndex;
+ } else {
+ $this->moveTokenAndEnsureSingleSpaceFollows($tokens, $visibilityIndex, $index);
+ }
+ }
+
+ if (null === $abstractFinalIndex) {
+ continue;
+ }
+
+ if ($this->isKeywordPlacedProperly($tokens, $abstractFinalIndex, $index)) {
+ continue;
+ }
+
+ $this->moveTokenAndEnsureSingleSpaceFollows($tokens, $abstractFinalIndex, $index);
+ }
+ }
+
+ private function isKeywordPlacedProperly(Tokens $tokens, int $keywordIndex, int $comparedIndex): bool
+ {
+ return $keywordIndex + 2 === $comparedIndex && ' ' === $tokens[$keywordIndex + 1]->getContent();
+ }
+
+ private function moveTokenAndEnsureSingleSpaceFollows(Tokens $tokens, int $fromIndex, int $toIndex): void
+ {
+ $tokens->insertAt($toIndex, [$tokens[$fromIndex], new Token([T_WHITESPACE, ' '])]);
+ $tokens->clearAt($fromIndex);
+
+ if ($tokens[$fromIndex + 1]->isWhitespace()) {
+ $tokens->clearAt($fromIndex + 1);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassUsage/DateTimeImmutableFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassUsage/DateTimeImmutableFixer.php
new file mode 100644
index 0000000..1d0610e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassUsage/DateTimeImmutableFixer.php
@@ -0,0 +1,158 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ClassUsage;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class DateTimeImmutableFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Class `DateTimeImmutable` should be used instead of `DateTime`.',
+ [new CodeSample("<?php\nnew DateTime();\n")],
+ null,
+ 'Risky when the code relies on modifying `DateTime` objects or if any of the `date_create*` functions are overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+ $functionMap = [
+ 'date_create' => 'date_create_immutable',
+ 'date_create_from_format' => 'date_create_immutable_from_format',
+ ];
+
+ $isInNamespace = false;
+ $isImported = false; // e.g. use DateTime;
+
+ for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_NAMESPACE)) {
+ $isInNamespace = true;
+
+ continue;
+ }
+
+ if ($isInNamespace && $token->isGivenKind(T_USE)) {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ('datetime' !== strtolower($tokens[$nextIndex]->getContent())) {
+ continue;
+ }
+
+ $nextNextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+
+ if ($tokens[$nextNextIndex]->equals(';')) {
+ $isImported = true;
+ }
+
+ $index = $nextNextIndex;
+
+ continue;
+ }
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prevIndex]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $lowercaseContent = strtolower($token->getContent());
+
+ if ('datetime' === $lowercaseContent) {
+ $this->fixClassUsage($tokens, $index, $isInNamespace, $isImported);
+ $limit = $tokens->count(); // update limit, as fixing class usage may insert new token
+
+ continue;
+ }
+
+ if (isset($functionMap[$lowercaseContent]) && $functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ $tokens[$index] = new Token([T_STRING, $functionMap[$lowercaseContent]]);
+ }
+ }
+ }
+
+ private function fixClassUsage(Tokens $tokens, int $index, bool $isInNamespace, bool $isImported): void
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ if ($tokens[$nextIndex]->isGivenKind(T_DOUBLE_COLON)) {
+ $nextNextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ if ($tokens[$nextNextIndex]->isGivenKind(T_STRING)) {
+ $nextNextNextIndex = $tokens->getNextMeaningfulToken($nextNextIndex);
+ if (!$tokens[$nextNextNextIndex]->equals('(')) {
+ return;
+ }
+ }
+ }
+
+ $isUsedAlone = false; // e.g. new DateTime();
+ $isUsedWithLeadingBackslash = false; // e.g. new \DateTime();
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $prevPrevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ if (!$tokens[$prevPrevIndex]->isGivenKind(T_STRING)) {
+ $isUsedWithLeadingBackslash = true;
+ }
+ } elseif (!$tokens[$prevIndex]->isGivenKind(T_DOUBLE_COLON) && !$tokens[$prevIndex]->isObjectOperator()) {
+ $isUsedAlone = true;
+ }
+
+ if ($isUsedWithLeadingBackslash || $isUsedAlone && ($isInNamespace && $isImported || !$isInNamespace)) {
+ $tokens[$index] = new Token([T_STRING, \DateTimeImmutable::class]);
+ if ($isInNamespace && $isUsedAlone) {
+ $tokens->insertAt($index, new Token([T_NS_SEPARATOR, '\\']));
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php
new file mode 100644
index 0000000..b887b18
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/CommentToPhpdocFixer.php
@@ -0,0 +1,239 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Comment;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\CommentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Utils;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class CommentToPhpdocFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @var string[]
+ */
+ private $ignoredTags = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ * Must run after AlignMultilineCommentFixer.
+ */
+ public function getPriority(): int
+ {
+ // Should be run before all other PHPDoc fixers
+ return 26;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Comments with annotation should be docblock when used on structural elements.',
+ [
+ new CodeSample("<?php /* header */ \$x = true; /* @var bool \$isFoo */ \$isFoo = true;\n"),
+ new CodeSample("<?php\n// @todo do something later\n\$foo = 1;\n\n// @var int \$a\n\$a = foo();\n", ['ignored_tags' => ['todo']]),
+ ],
+ null,
+ 'Risky as new docblocks might mean more, e.g. a Doctrine entity might have a new column in database.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->ignoredTags = array_map(
+ static function (string $tag): string {
+ return strtolower($tag);
+ },
+ $this->configuration['ignored_tags']
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('ignored_tags', 'List of ignored tags'))
+ ->setAllowedTypes(['array'])
+ ->setDefault([])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $commentsAnalyzer = new CommentsAnalyzer();
+
+ for ($index = 0, $limit = \count($tokens); $index < $limit; ++$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_COMMENT)) {
+ continue;
+ }
+
+ if ($commentsAnalyzer->isHeaderComment($tokens, $index)) {
+ continue;
+ }
+
+ if (!$commentsAnalyzer->isBeforeStructuralElement($tokens, $index)) {
+ continue;
+ }
+
+ $commentIndices = $commentsAnalyzer->getCommentBlockIndices($tokens, $index);
+
+ if ($this->isCommentCandidate($tokens, $commentIndices)) {
+ $this->fixComment($tokens, $commentIndices);
+ }
+
+ $index = max($commentIndices);
+ }
+ }
+
+ /**
+ * @param int[] $indices
+ */
+ private function isCommentCandidate(Tokens $tokens, array $indices): bool
+ {
+ return array_reduce(
+ $indices,
+ function (bool $carry, int $index) use ($tokens): bool {
+ if ($carry) {
+ return true;
+ }
+ if (1 !== Preg::match('~(?:#|//|/\*+|\R(?:\s*\*)?)\s*\@([a-zA-Z0-9_\\\\-]+)(?=\s|\(|$)~', $tokens[$index]->getContent(), $matches)) {
+ return false;
+ }
+
+ return !\in_array(strtolower($matches[1]), $this->ignoredTags, true);
+ },
+ false
+ );
+ }
+
+ /**
+ * @param int[] $indices
+ */
+ private function fixComment(Tokens $tokens, array $indices): void
+ {
+ if (1 === \count($indices)) {
+ $this->fixCommentSingleLine($tokens, reset($indices));
+ } else {
+ $this->fixCommentMultiLine($tokens, $indices);
+ }
+ }
+
+ private function fixCommentSingleLine(Tokens $tokens, int $index): void
+ {
+ $message = $this->getMessage($tokens[$index]->getContent());
+
+ if ('' !== trim(substr($message, 0, 1))) {
+ $message = ' '.$message;
+ }
+
+ if ('' !== trim(substr($message, -1))) {
+ $message .= ' ';
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, '/**'.$message.'*/']);
+ }
+
+ /**
+ * @param int[] $indices
+ */
+ private function fixCommentMultiLine(Tokens $tokens, array $indices): void
+ {
+ $startIndex = reset($indices);
+ $indent = Utils::calculateTrailingWhitespaceIndent($tokens[$startIndex - 1]);
+
+ $newContent = '/**'.$this->whitespacesConfig->getLineEnding();
+ $count = max($indices);
+
+ for ($index = $startIndex; $index <= $count; ++$index) {
+ if (!$tokens[$index]->isComment()) {
+ continue;
+ }
+ if (str_contains($tokens[$index]->getContent(), '*/')) {
+ return;
+ }
+ $message = $this->getMessage($tokens[$index]->getContent());
+ if ('' !== trim(substr($message, 0, 1))) {
+ $message = ' '.$message;
+ }
+ $newContent .= $indent.' *'.$message.$this->whitespacesConfig->getLineEnding();
+ }
+
+ for ($index = $startIndex; $index <= $count; ++$index) {
+ $tokens->clearAt($index);
+ }
+
+ $newContent .= $indent.' */';
+
+ $tokens->insertAt($startIndex, new Token([T_DOC_COMMENT, $newContent]));
+ }
+
+ private function getMessage(string $content): string
+ {
+ if (str_starts_with($content, '#')) {
+ return substr($content, 1);
+ }
+ if (str_starts_with($content, '//')) {
+ return substr($content, 2);
+ }
+
+ return rtrim(ltrim($content, '/*'), '*/');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php
new file mode 100644
index 0000000..2eadbfe
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/HeaderCommentFixer.php
@@ -0,0 +1,458 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Comment;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * @author Antonio J. García Lagar <aj@garcialagar.es>
+ */
+final class HeaderCommentFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const HEADER_PHPDOC = 'PHPDoc';
+
+ /**
+ * @internal
+ */
+ public const HEADER_COMMENT = 'comment';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Add, replace or remove header comment.',
+ [
+ new CodeSample(
+ '<?php
+declare(strict_types=1);
+
+namespace A\B;
+
+echo 1;
+',
+ [
+ 'header' => 'Made with love.',
+ ]
+ ),
+ new CodeSample(
+ '<?php
+declare(strict_types=1);
+
+namespace A\B;
+
+echo 1;
+',
+ [
+ 'header' => 'Made with love.',
+ 'comment_type' => 'PHPDoc',
+ 'location' => 'after_open',
+ 'separate' => 'bottom',
+ ]
+ ),
+ new CodeSample(
+ '<?php
+declare(strict_types=1);
+
+namespace A\B;
+
+echo 1;
+',
+ [
+ 'header' => 'Made with love.',
+ 'comment_type' => 'comment',
+ 'location' => 'after_declare_strict',
+ ]
+ ),
+ new CodeSample(
+ '<?php
+declare(strict_types=1);
+
+/*
+ * Comment is not wanted here.
+ */
+
+namespace A\B;
+
+echo 1;
+',
+ [
+ 'header' => '',
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return isset($tokens[0]) && $tokens[0]->isGivenKind(T_OPEN_TAG) && $tokens->isMonolithicPhp();
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before SingleLineCommentStyleFixer.
+ * Must run after DeclareStrictTypesFixer, NoBlankLinesAfterPhpdocFixer.
+ */
+ public function getPriority(): int
+ {
+ // When this fixer is configured with ["separate" => "bottom", "comment_type" => "PHPDoc"]
+ // and the target file has no namespace or declare() construct,
+ // the fixed header comment gets trimmed by NoBlankLinesAfterPhpdocFixer if we run before it.
+ return -30;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $location = $this->configuration['location'];
+ $locationIndexes = [];
+
+ foreach (['after_open', 'after_declare_strict'] as $possibleLocation) {
+ $locationIndex = $this->findHeaderCommentInsertionIndex($tokens, $possibleLocation);
+
+ if (!isset($locationIndexes[$locationIndex]) || $possibleLocation === $location) {
+ $locationIndexes[$locationIndex] = $possibleLocation;
+
+ continue;
+ }
+ }
+
+ foreach (array_values($locationIndexes) as $possibleLocation) {
+ // figure out where the comment should be placed
+ $headerNewIndex = $this->findHeaderCommentInsertionIndex($tokens, $possibleLocation);
+
+ // check if there is already a comment
+ $headerCurrentIndex = $this->findHeaderCommentCurrentIndex($tokens, $headerNewIndex - 1);
+
+ if (null === $headerCurrentIndex) {
+ if ('' === $this->configuration['header'] || $possibleLocation !== $location) {
+ continue;
+ }
+
+ $this->insertHeader($tokens, $headerNewIndex);
+
+ continue;
+ }
+
+ $sameComment = $this->getHeaderAsComment() === $tokens[$headerCurrentIndex]->getContent();
+ $expectedLocation = $possibleLocation === $location;
+
+ if (!$sameComment || !$expectedLocation) {
+ if ($expectedLocation ^ $sameComment) {
+ $this->removeHeader($tokens, $headerCurrentIndex);
+ }
+
+ if ('' === $this->configuration['header']) {
+ continue;
+ }
+
+ if ($possibleLocation === $location) {
+ $this->insertHeader($tokens, $headerNewIndex);
+ }
+
+ continue;
+ }
+
+ $this->fixWhiteSpaceAroundHeader($tokens, $headerCurrentIndex);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $fixerName = $this->getName();
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('header', 'Proper header content.'))
+ ->setAllowedTypes(['string'])
+ ->setNormalizer(static function (Options $options, string $value) use ($fixerName): string {
+ if ('' === trim($value)) {
+ return '';
+ }
+
+ if (str_contains($value, '*/')) {
+ throw new InvalidFixerConfigurationException($fixerName, 'Cannot use \'*/\' in header.');
+ }
+
+ return $value;
+ })
+ ->getOption(),
+ (new FixerOptionBuilder('comment_type', 'Comment syntax type.'))
+ ->setAllowedValues([self::HEADER_PHPDOC, self::HEADER_COMMENT])
+ ->setDefault(self::HEADER_COMMENT)
+ ->getOption(),
+ (new FixerOptionBuilder('location', 'The location of the inserted header.'))
+ ->setAllowedValues(['after_open', 'after_declare_strict'])
+ ->setDefault('after_declare_strict')
+ ->getOption(),
+ (new FixerOptionBuilder('separate', 'Whether the header should be separated from the file content with a new line.'))
+ ->setAllowedValues(['both', 'top', 'bottom', 'none'])
+ ->setDefault('both')
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * Enclose the given text in a comment block.
+ */
+ private function getHeaderAsComment(): string
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+ $comment = (self::HEADER_COMMENT === $this->configuration['comment_type'] ? '/*' : '/**').$lineEnding;
+ $lines = explode("\n", str_replace("\r", '', $this->configuration['header']));
+
+ foreach ($lines as $line) {
+ $comment .= rtrim(' * '.$line).$lineEnding;
+ }
+
+ return $comment.' */';
+ }
+
+ private function findHeaderCommentCurrentIndex(Tokens $tokens, int $headerNewIndex): ?int
+ {
+ $index = $tokens->getNextNonWhitespace($headerNewIndex);
+
+ if (null === $index || !$tokens[$index]->isComment()) {
+ return null;
+ }
+
+ $next = $index + 1;
+
+ if (!isset($tokens[$next]) || \in_array($this->configuration['separate'], ['top', 'none'], true) || !$tokens[$index]->isGivenKind(T_DOC_COMMENT)) {
+ return $index;
+ }
+
+ if ($tokens[$next]->isWhitespace()) {
+ if (!Preg::match('/^\h*\R\h*$/D', $tokens[$next]->getContent())) {
+ return $index;
+ }
+
+ ++$next;
+ }
+
+ if (!isset($tokens[$next]) || !$tokens[$next]->isClassy() && !$tokens[$next]->isGivenKind(T_FUNCTION)) {
+ return $index;
+ }
+
+ return $this->getHeaderAsComment() === $tokens[$index]->getContent() ? $index : null;
+ }
+
+ /**
+ * Find the index where the header comment must be inserted.
+ */
+ private function findHeaderCommentInsertionIndex(Tokens $tokens, string $location): int
+ {
+ if ('after_open' === $location) {
+ return 1;
+ }
+
+ $index = $tokens->getNextMeaningfulToken(0);
+
+ if (null === $index) {
+ return 1; // file without meaningful tokens but an open tag, comment should always be placed directly after the open tag
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_DECLARE)) {
+ return 1;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $next || !$tokens[$next]->equals('(')) {
+ return 1;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if (null === $next || !$tokens[$next]->equals([T_STRING, 'strict_types'], false)) {
+ return 1;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if (null === $next || !$tokens[$next]->equals('=')) {
+ return 1;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if (null === $next || !$tokens[$next]->isGivenKind(T_LNUMBER)) {
+ return 1;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if (null === $next || !$tokens[$next]->equals(')')) {
+ return 1;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if (null === $next || !$tokens[$next]->equals(';')) { // don't insert after close tag
+ return 1;
+ }
+
+ return $next + 1;
+ }
+
+ private function fixWhiteSpaceAroundHeader(Tokens $tokens, int $headerIndex): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ // fix lines after header comment
+ if (
+ ('both' === $this->configuration['separate'] || 'bottom' === $this->configuration['separate'])
+ && null !== $tokens->getNextMeaningfulToken($headerIndex)
+ ) {
+ $expectedLineCount = 2;
+ } else {
+ $expectedLineCount = 1;
+ }
+
+ if ($headerIndex === \count($tokens) - 1) {
+ $tokens->insertAt($headerIndex + 1, new Token([T_WHITESPACE, str_repeat($lineEnding, $expectedLineCount)]));
+ } else {
+ $lineBreakCount = $this->getLineBreakCount($tokens, $headerIndex, 1);
+
+ if ($lineBreakCount < $expectedLineCount) {
+ $missing = str_repeat($lineEnding, $expectedLineCount - $lineBreakCount);
+
+ if ($tokens[$headerIndex + 1]->isWhitespace()) {
+ $tokens[$headerIndex + 1] = new Token([T_WHITESPACE, $missing.$tokens[$headerIndex + 1]->getContent()]);
+ } else {
+ $tokens->insertAt($headerIndex + 1, new Token([T_WHITESPACE, $missing]));
+ }
+ } elseif ($lineBreakCount > $expectedLineCount && $tokens[$headerIndex + 1]->isWhitespace()) {
+ $newLinesToRemove = $lineBreakCount - $expectedLineCount;
+ $tokens[$headerIndex + 1] = new Token([
+ T_WHITESPACE,
+ Preg::replace("/^\\R{{$newLinesToRemove}}/", '', $tokens[$headerIndex + 1]->getContent()),
+ ]);
+ }
+ }
+
+ // fix lines before header comment
+ $expectedLineCount = 'both' === $this->configuration['separate'] || 'top' === $this->configuration['separate'] ? 2 : 1;
+ $prev = $tokens->getPrevNonWhitespace($headerIndex);
+
+ $regex = '/\h$/';
+
+ if ($tokens[$prev]->isGivenKind(T_OPEN_TAG) && Preg::match($regex, $tokens[$prev]->getContent())) {
+ $tokens[$prev] = new Token([T_OPEN_TAG, Preg::replace($regex, $lineEnding, $tokens[$prev]->getContent())]);
+ }
+
+ $lineBreakCount = $this->getLineBreakCount($tokens, $headerIndex, -1);
+
+ if ($lineBreakCount < $expectedLineCount) {
+ // because of the way the insert index was determined for header comment there cannot be an empty token here
+ $tokens->insertAt($headerIndex, new Token([T_WHITESPACE, str_repeat($lineEnding, $expectedLineCount - $lineBreakCount)]));
+ }
+ }
+
+ private function getLineBreakCount(Tokens $tokens, int $index, int $direction): int
+ {
+ $whitespace = '';
+
+ for ($index += $direction; isset($tokens[$index]); $index += $direction) {
+ $token = $tokens[$index];
+
+ if ($token->isWhitespace()) {
+ $whitespace .= $token->getContent();
+
+ continue;
+ }
+
+ if (-1 === $direction && $token->isGivenKind(T_OPEN_TAG)) {
+ $whitespace .= $token->getContent();
+ }
+
+ if ('' !== $token->getContent()) {
+ break;
+ }
+ }
+
+ return substr_count($whitespace, "\n");
+ }
+
+ private function removeHeader(Tokens $tokens, int $index): void
+ {
+ $prevIndex = $index - 1;
+ $prevToken = $tokens[$prevIndex];
+ $newlineRemoved = false;
+
+ if ($prevToken->isWhitespace()) {
+ $content = $prevToken->getContent();
+
+ if (Preg::match('/\R/', $content)) {
+ $newlineRemoved = true;
+ }
+
+ $content = Preg::replace('/\R?\h*$/', '', $content);
+
+ if ('' === $content) {
+ $tokens->clearAt($prevIndex);
+ } else {
+ $tokens[$prevIndex] = new Token([T_WHITESPACE, $content]);
+ }
+ }
+
+ $nextIndex = $index + 1;
+ $nextToken = $tokens[$nextIndex] ?? null;
+
+ if (!$newlineRemoved && null !== $nextToken && $nextToken->isWhitespace()) {
+ $content = Preg::replace('/^\R/', '', $nextToken->getContent());
+
+ if ('' === $content) {
+ $tokens->clearAt($nextIndex);
+ } else {
+ $tokens[$nextIndex] = new Token([T_WHITESPACE, $content]);
+ }
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+
+ private function insertHeader(Tokens $tokens, int $index): void
+ {
+ $tokens->insertAt($index, new Token([self::HEADER_COMMENT === $this->configuration['comment_type'] ? T_COMMENT : T_DOC_COMMENT, $this->getHeaderAsComment()]));
+ $this->fixWhiteSpaceAroundHeader($tokens, $index);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php
new file mode 100644
index 0000000..d27585e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Comment;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class MultilineCommentOpeningClosingFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'DocBlocks must start with two asterisks, multiline comments must start with a single asterisk, after the opening slash. Both must end with a single asterisk before the closing slash.',
+ [
+ new CodeSample(
+ <<<'EOT'
+<?php
+
+/******
+ * Multiline comment with arbitrary asterisks count
+ ******/
+
+/**\
+ * Multiline comment that seems a DocBlock
+ */
+
+/**
+ * DocBlock with arbitrary asterisk count at the end
+ **/
+
+EOT
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_COMMENT, T_DOC_COMMENT]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ $originalContent = $token->getContent();
+
+ if (
+ !$token->isGivenKind(T_DOC_COMMENT)
+ && !($token->isGivenKind(T_COMMENT) && str_starts_with($originalContent, '/*'))
+ ) {
+ continue;
+ }
+
+ $newContent = $originalContent;
+
+ // Fix opening
+ if ($token->isGivenKind(T_COMMENT)) {
+ $newContent = Preg::replace('/^\\/\\*{2,}(?!\\/)/', '/*', $newContent);
+ }
+
+ // Fix closing
+ $newContent = Preg::replace('/(?<!\\/)\\*{2,}\\/$/', '*/', $newContent);
+
+ if ($newContent !== $originalContent) {
+ $tokens[$index] = new Token([$token->getId(), $newContent]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoEmptyCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoEmptyCommentFixer.php
new file mode 100644
index 0000000..7d3ca2c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoEmptyCommentFixer.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Comment;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoEmptyCommentFixer extends AbstractFixer
+{
+ private const TYPE_HASH = 1;
+
+ private const TYPE_DOUBLE_SLASH = 2;
+
+ private const TYPE_SLASH_ASTERISK = 3;
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer.
+ * Must run after PhpdocToCommentFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be any empty comments.',
+ [new CodeSample("<?php\n//\n#\n/* */\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = 1, $count = \count($tokens); $index < $count; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_COMMENT)) {
+ continue;
+ }
+
+ [$blockStart, $index, $isEmpty] = $this->getCommentBlock($tokens, $index);
+ if (false === $isEmpty) {
+ continue;
+ }
+
+ for ($i = $blockStart; $i <= $index; ++$i) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ }
+ }
+ }
+
+ /**
+ * Return the start index, end index and a flag stating if the comment block is empty.
+ *
+ * @param int $index T_COMMENT index
+ */
+ private function getCommentBlock(Tokens $tokens, int $index): array
+ {
+ $commentType = $this->getCommentType($tokens[$index]->getContent());
+ $empty = $this->isEmptyComment($tokens[$index]->getContent());
+
+ if (self::TYPE_SLASH_ASTERISK === $commentType) {
+ return [$index, $index, $empty];
+ }
+
+ $start = $index;
+ $count = \count($tokens);
+ ++$index;
+
+ for (; $index < $count; ++$index) {
+ if ($tokens[$index]->isComment()) {
+ if ($commentType !== $this->getCommentType($tokens[$index]->getContent())) {
+ break;
+ }
+
+ if ($empty) { // don't retest if already known the block not being empty
+ $empty = $this->isEmptyComment($tokens[$index]->getContent());
+ }
+
+ continue;
+ }
+
+ if (!$tokens[$index]->isWhitespace() || $this->getLineBreakCount($tokens, $index, $index + 1) > 1) {
+ break;
+ }
+ }
+
+ return [$start, $index - 1, $empty];
+ }
+
+ private function getCommentType(string $content): int
+ {
+ if (str_starts_with($content, '#')) {
+ return self::TYPE_HASH;
+ }
+
+ if ('*' === $content[1]) {
+ return self::TYPE_SLASH_ASTERISK;
+ }
+
+ return self::TYPE_DOUBLE_SLASH;
+ }
+
+ private function getLineBreakCount(Tokens $tokens, int $whiteStart, int $whiteEnd): int
+ {
+ $lineCount = 0;
+ for ($i = $whiteStart; $i < $whiteEnd; ++$i) {
+ $lineCount += Preg::matchAll('/\R/u', $tokens[$i]->getContent(), $matches);
+ }
+
+ return $lineCount;
+ }
+
+ private function isEmptyComment(string $content): bool
+ {
+ static $mapper = [
+ self::TYPE_HASH => '|^#\s*$|', // single line comment starting with '#'
+ self::TYPE_SLASH_ASTERISK => '|^/\*[\s\*]*\*+/$|', // comment starting with '/*' and ending with '*/' (but not a PHPDoc)
+ self::TYPE_DOUBLE_SLASH => '|^//\s*$|', // single line comment starting with '//'
+ ];
+
+ $type = $this->getCommentType($content);
+
+ return 1 === Preg::match($mapper[$type], $content);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoTrailingWhitespaceInCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoTrailingWhitespaceInCommentFixer.php
new file mode 100644
index 0000000..9e893ff
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/NoTrailingWhitespaceInCommentFixer.php
@@ -0,0 +1,88 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Comment;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoTrailingWhitespaceInCommentFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST be no trailing spaces inside comment or PHPDoc.',
+ [new CodeSample('<?php
+// This is '.'
+// a comment. '.'
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after PhpdocNoUselessInheritdocFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_COMMENT, T_DOC_COMMENT]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind(T_DOC_COMMENT)) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, Preg::replace('/(*ANY)[\h]+$/m', '', $token->getContent())]);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_COMMENT)) {
+ if (str_starts_with($token->getContent(), '/*')) {
+ $tokens[$index] = new Token([T_COMMENT, Preg::replace('/(*ANY)[\h]+$/m', '', $token->getContent())]);
+ } elseif (isset($tokens[$index + 1]) && $tokens[$index + 1]->isWhitespace()) {
+ $trimmedContent = ltrim($tokens[$index + 1]->getContent(), " \t");
+ if ('' !== $trimmedContent) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, $trimmedContent]);
+ } else {
+ $tokens->clearAt($index + 1);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php
new file mode 100644
index 0000000..64a1395
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Comment/SingleLineCommentStyleFixer.php
@@ -0,0 +1,186 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Comment;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class SingleLineCommentStyleFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var bool
+ */
+ private $asteriskEnabled;
+
+ /**
+ * @var bool
+ */
+ private $hashEnabled;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->asteriskEnabled = \in_array('asterisk', $this->configuration['comment_types'], true);
+ $this->hashEnabled = \in_array('hash', $this->configuration['comment_types'], true);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Single-line comments and multi-line comments with only one line of actual content should use the `//` syntax.',
+ [
+ new CodeSample(
+ '<?php
+/* asterisk comment */
+$a = 1;
+
+# hash comment
+$b = 2;
+
+/*
+ * multi-line
+ * comment
+ */
+$c = 3;
+'
+ ),
+ new CodeSample(
+ '<?php
+/* first comment */
+$a = 1;
+
+/*
+ * second comment
+ */
+$b = 2;
+
+/*
+ * third
+ * comment
+ */
+$c = 3;
+',
+ ['comment_types' => ['asterisk']]
+ ),
+ new CodeSample(
+ "<?php # comment\n",
+ ['comment_types' => ['hash']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after HeaderCommentFixer, NoUselessReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return -31;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_COMMENT)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+ $commentContent = substr($content, 2, -2) ?: '';
+
+ if ($this->hashEnabled && str_starts_with($content, '#')) {
+ if (isset($content[1]) && '[' === $content[1]) {
+ continue; // This might be an attribute on PHP8, do not change
+ }
+
+ $tokens[$index] = new Token([$token->getId(), '//'.substr($content, 1)]);
+
+ continue;
+ }
+
+ if (
+ !$this->asteriskEnabled
+ || str_contains($commentContent, '?>')
+ || !str_starts_with($content, '/*')
+ || 1 === Preg::match('/[^\s\*].*\R.*[^\s\*]/s', $commentContent)
+ ) {
+ continue;
+ }
+
+ $nextTokenIndex = $index + 1;
+ if (isset($tokens[$nextTokenIndex])) {
+ $nextToken = $tokens[$nextTokenIndex];
+ if (!$nextToken->isWhitespace() || 1 !== Preg::match('/\R/', $nextToken->getContent())) {
+ continue;
+ }
+
+ $tokens[$nextTokenIndex] = new Token([$nextToken->getId(), ltrim($nextToken->getContent(), " \t")]);
+ }
+
+ $content = '//';
+ if (1 === Preg::match('/[^\s\*]/', $commentContent)) {
+ $content = '// '.Preg::replace('/[\s\*]*([^\s\*](?:.+[^\s\*])?)[\s\*]*/', '\1', $commentContent);
+ }
+ $tokens[$index] = new Token([$token->getId(), $content]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('comment_types', 'List of comment types to fix'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(['asterisk', 'hash'])])
+ ->setDefault(['asterisk', 'hash'])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php
new file mode 100644
index 0000000..1cc18ad
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConfigurableFixerInterface.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer;
+
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface ConfigurableFixerInterface extends FixerInterface
+{
+ /**
+ * Set configuration.
+ *
+ * New configuration must override current one, not patch it.
+ * Using empty array makes fixer to use default configuration
+ * (or reset configuration from previously configured back to default one).
+ *
+ * Some fixers may have no configuration, then - simply don't implement this interface.
+ * Other ones may have configuration that will change behavior of fixer,
+ * eg `php_unit_strict` fixer allows to configure which methods should be fixed.
+ * Finally, some fixers need configuration to work, eg `header_comment`.
+ *
+ * @param array $configuration configuration depends on Fixer
+ *
+ * @throws InvalidFixerConfigurationException
+ */
+ public function configure(array $configuration): void;
+
+ /**
+ * Defines the available configuration options of the fixer.
+ */
+ public function getConfigurationDefinition(): FixerConfigurationResolverInterface;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
new file mode 100644
index 0000000..8d43684
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ConstantNotation/NativeConstantInvocationFixer.php
@@ -0,0 +1,302 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ConstantNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class NativeConstantInvocationFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string, true>
+ */
+ private $constantsToEscape = [];
+
+ /**
+ * @var array<string, true>
+ */
+ private $caseInsensitiveConstantsToEscape = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Add leading `\` before constant invocation of internal constant to speed up resolving. Constant name match is case-sensitive, except for `null`, `false` and `true`.',
+ [
+ new CodeSample("<?php var_dump(PHP_VERSION, M_PI, MY_CUSTOM_PI);\n"),
+ new CodeSample(
+ '<?php
+namespace space1 {
+ echo PHP_VERSION;
+}
+namespace {
+ echo M_PI;
+}
+',
+ ['scope' => 'namespaced']
+ ),
+ new CodeSample(
+ "<?php var_dump(PHP_VERSION, M_PI, MY_CUSTOM_PI);\n",
+ [
+ 'include' => [
+ 'MY_CUSTOM_PI',
+ ],
+ ]
+ ),
+ new CodeSample(
+ "<?php var_dump(PHP_VERSION, M_PI, MY_CUSTOM_PI);\n",
+ [
+ 'fix_built_in' => false,
+ 'include' => [
+ 'MY_CUSTOM_PI',
+ ],
+ ]
+ ),
+ new CodeSample(
+ "<?php var_dump(PHP_VERSION, M_PI, MY_CUSTOM_PI);\n",
+ [
+ 'exclude' => [
+ 'M_PI',
+ ],
+ ]
+ ),
+ ],
+ null,
+ 'Risky when any of the constants are namespaced or overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GlobalNamespaceImportFixer.
+ */
+ public function getPriority(): int
+ {
+ return 10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $uniqueConfiguredExclude = array_unique($this->configuration['exclude']);
+
+ // Case sensitive constants handling
+ $constantsToEscape = array_values($this->configuration['include']);
+
+ if (true === $this->configuration['fix_built_in']) {
+ $getDefinedConstants = get_defined_constants(true);
+ unset($getDefinedConstants['user']);
+ foreach ($getDefinedConstants as $constants) {
+ $constantsToEscape = array_merge($constantsToEscape, array_keys($constants));
+ }
+ }
+
+ $constantsToEscape = array_diff(
+ array_unique($constantsToEscape),
+ $uniqueConfiguredExclude
+ );
+
+ // Case insensitive constants handling
+ static $caseInsensitiveConstants = ['null', 'false', 'true'];
+ $caseInsensitiveConstantsToEscape = [];
+
+ foreach ($constantsToEscape as $constantIndex => $constant) {
+ $loweredConstant = strtolower($constant);
+ if (\in_array($loweredConstant, $caseInsensitiveConstants, true)) {
+ $caseInsensitiveConstantsToEscape[] = $loweredConstant;
+ unset($constantsToEscape[$constantIndex]);
+ }
+ }
+
+ $caseInsensitiveConstantsToEscape = array_diff(
+ array_unique($caseInsensitiveConstantsToEscape),
+ array_map(static function (string $function): string { return strtolower($function); }, $uniqueConfiguredExclude)
+ );
+
+ // Store the cache
+ $this->constantsToEscape = array_fill_keys($constantsToEscape, true);
+ ksort($this->constantsToEscape);
+
+ $this->caseInsensitiveConstantsToEscape = array_fill_keys($caseInsensitiveConstantsToEscape, true);
+ ksort($this->caseInsensitiveConstantsToEscape);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if ('all' === $this->configuration['scope']) {
+ $this->fixConstantInvocations($tokens, 0, \count($tokens) - 1);
+
+ return;
+ }
+
+ $namespaces = (new NamespacesAnalyzer())->getDeclarations($tokens);
+
+ // 'scope' is 'namespaced' here
+ /** @var NamespaceAnalysis $namespace */
+ foreach (array_reverse($namespaces) as $namespace) {
+ if ('' === $namespace->getFullName()) {
+ continue;
+ }
+
+ $this->fixConstantInvocations($tokens, $namespace->getScopeStartIndex(), $namespace->getScopeEndIndex());
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $constantChecker = static function (array $value): bool {
+ foreach ($value as $constantName) {
+ if (!\is_string($constantName) || '' === trim($constantName) || trim($constantName) !== $constantName) {
+ throw new InvalidOptionsException(sprintf(
+ 'Each element must be a non-empty, trimmed string, got "%s" instead.',
+ \is_object($constantName) ? \get_class($constantName) : \gettype($constantName)
+ ));
+ }
+ }
+
+ return true;
+ };
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('fix_built_in', 'Whether to fix constants returned by `get_defined_constants`. User constants are not accounted in this list and must be specified in the include one.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('include', 'List of additional constants to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([$constantChecker])
+ ->setDefault([])
+ ->getOption(),
+ (new FixerOptionBuilder('exclude', 'List of constants to ignore.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([$constantChecker])
+ ->setDefault(['null', 'false', 'true'])
+ ->getOption(),
+ (new FixerOptionBuilder('scope', 'Only fix constant invocations that are made within a namespace or fix all.'))
+ ->setAllowedValues(['all', 'namespaced'])
+ ->setDefault('all')
+ ->getOption(),
+ (new FixerOptionBuilder('strict', 'Whether leading `\` of constant invocation not meant to have it should be removed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ private function fixConstantInvocations(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $useDeclarations = (new NamespaceUsesAnalyzer())->getDeclarationsFromTokens($tokens);
+ $useConstantDeclarations = [];
+
+ foreach ($useDeclarations as $use) {
+ if ($use->isConstant()) {
+ $useConstantDeclarations[$use->getShortName()] = true;
+ }
+ }
+
+ $tokenAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $endIndex; $index > $startIndex; --$index) {
+ $token = $tokens[$index];
+
+ // test if we are at a constant call
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ if (!$tokenAnalyzer->isConstantInvocation($index)) {
+ continue;
+ }
+
+ $tokenContent = $token->getContent();
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!isset($this->constantsToEscape[$tokenContent]) && !isset($this->caseInsensitiveConstantsToEscape[strtolower($tokenContent)])) {
+ if (false === $this->configuration['strict']) {
+ continue;
+ }
+
+ if (!$tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ $prevPrevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+
+ if ($tokens[$prevPrevIndex]->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevIndex);
+
+ continue;
+ }
+
+ if (isset($useConstantDeclarations[$tokenContent])) {
+ continue;
+ }
+
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ $tokens->insertAt($index, new Token([T_NS_SEPARATOR, '\\']));
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php
new file mode 100644
index 0000000..dd3088b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ControlStructureContinuationPositionFixer.php
@@ -0,0 +1,144 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class ControlStructureContinuationPositionFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const NEXT_LINE = 'next_line';
+
+ /**
+ * @internal
+ */
+ public const SAME_LINE = 'same_line';
+
+ private const CONTROL_CONTINUATION_TOKENS = [
+ T_CATCH,
+ T_ELSE,
+ T_ELSEIF,
+ T_FINALLY,
+ T_WHILE,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Control structure continuation keyword must be on the configured line.',
+ [
+ new CodeSample(
+ '<?php
+if ($baz == true) {
+ echo "foo";
+}
+else {
+ echo "bar";
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+if ($baz == true) {
+ echo "foo";
+} else {
+ echo "bar";
+}
+',
+ ['position' => self::NEXT_LINE]
+ ),
+ ]
+ );
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(self::CONTROL_CONTINUATION_TOKENS);
+ }
+
+ /**
+ * Must run after ControlStructureBracesFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('position', 'the position of the keyword that continues the control structure.'))
+ ->setAllowedValues([self::NEXT_LINE, self::SAME_LINE])
+ ->setDefault(self::SAME_LINE)
+ ->getOption(),
+ ]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->fixControlContinuationBraces($tokens);
+ }
+
+ private function fixControlContinuationBraces(Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; 0 < $index; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(self::CONTROL_CONTINUATION_TOKENS)) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevNonWhitespace($index);
+ $prevToken = $tokens[$prevIndex];
+
+ if (!$prevToken->equals('}')) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_WHILE)) {
+ $prevIndex = $tokens->getPrevMeaningfulToken(
+ $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $prevIndex)
+ );
+
+ if (!$tokens[$prevIndex]->isGivenKind(T_DO)) {
+ continue;
+ }
+ }
+
+ $tokens->ensureWhitespaceAtIndex(
+ $index - 1,
+ 1,
+ self::NEXT_LINE === $this->configuration['position'] ?
+ $this->whitespacesConfig->getLineEnding().WhitespacesAnalyzer::detectIndent($tokens, $index)
+ : ' '
+ );
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ElseifFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ElseifFixer.php
new file mode 100644
index 0000000..10c2343
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/ElseifFixer.php
@@ -0,0 +1,105 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶5.1.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class ElseifFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.',
+ [new CodeSample("<?php\nif (\$a) {\n} else if (\$b) {\n}\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer.
+ * Must run after NoAlternativeSyntaxFixer.
+ */
+ public function getPriority(): int
+ {
+ return 40;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_IF, T_ELSE]);
+ }
+
+ /**
+ * Replace all `else if` (T_ELSE T_IF) with `elseif` (T_ELSEIF).
+ *
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_ELSE)) {
+ continue;
+ }
+
+ $ifTokenIndex = $tokens->getNextMeaningfulToken($index);
+
+ // if next meaningful token is not T_IF - continue searching, this is not the case for fixing
+ if (!$tokens[$ifTokenIndex]->isGivenKind(T_IF)) {
+ continue;
+ }
+
+ // if next meaningful token is T_IF, but uses an alternative syntax - this is not the case for fixing neither
+ $conditionEndBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $tokens->getNextMeaningfulToken($ifTokenIndex));
+ $afterConditionIndex = $tokens->getNextMeaningfulToken($conditionEndBraceIndex);
+ if ($tokens[$afterConditionIndex]->equals(':')) {
+ continue;
+ }
+
+ // now we have T_ELSE following by T_IF with no alternative syntax so we could fix this
+ // 1. clear whitespaces between T_ELSE and T_IF
+ $tokens->clearAt($index + 1);
+
+ // 2. change token from T_ELSE into T_ELSEIF
+ $tokens[$index] = new Token([T_ELSEIF, 'elseif']);
+
+ // 3. clear succeeding T_IF
+ $tokens->clearAt($ifTokenIndex);
+
+ $beforeIfTokenIndex = $tokens->getPrevNonWhitespace($ifTokenIndex);
+
+ // 4. clear extra whitespace after T_IF in T_COMMENT,T_WHITESPACE?,T_IF,T_WHITESPACE sequence
+ if ($tokens[$beforeIfTokenIndex]->isComment() && $tokens[$ifTokenIndex + 1]->isWhitespace()) {
+ $tokens->clearAt($ifTokenIndex + 1);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php
new file mode 100644
index 0000000..f0898a6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopBodyFixer.php
@@ -0,0 +1,137 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+final class EmptyLoopBodyFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ private const STYLE_BRACES = 'braces';
+
+ private const STYLE_SEMICOLON = 'semicolon';
+
+ private const TOKEN_LOOP_KINDS = [T_FOR, T_FOREACH, T_WHILE];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Empty loop-body must be in configured style.',
+ [
+ new CodeSample("<?php while(foo()){}\n"),
+ new CodeSample(
+ "<?php while(foo());\n",
+ [
+ 'style' => 'braces',
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer.
+ * Must run after NoEmptyStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 39;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(self::TOKEN_LOOP_KINDS);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (self::STYLE_BRACES === $this->configuration['style']) {
+ $analyzer = new TokensAnalyzer($tokens);
+ $fixLoop = static function (int $index, int $endIndex) use ($tokens, $analyzer): void {
+ if ($tokens[$index]->isGivenKind(T_WHILE) && $analyzer->isWhilePartOfDoWhile($index)) {
+ return;
+ }
+
+ $semiColonIndex = $tokens->getNextMeaningfulToken($endIndex);
+
+ if (!$tokens[$semiColonIndex]->equals(';')) {
+ return;
+ }
+
+ $tokens[$semiColonIndex] = new Token('{');
+ $tokens->insertAt($semiColonIndex + 1, new Token('}'));
+ };
+ } else {
+ $fixLoop = static function (int $index, int $endIndex) use ($tokens): void {
+ $braceOpenIndex = $tokens->getNextMeaningfulToken($endIndex);
+
+ if (!$tokens[$braceOpenIndex]->equals('{')) {
+ return;
+ }
+
+ $braceCloseIndex = $tokens->getNextMeaningfulToken($braceOpenIndex);
+
+ if (!$tokens[$braceCloseIndex]->equals('}')) {
+ return;
+ }
+
+ $tokens[$braceOpenIndex] = new Token(';');
+ $tokens->clearTokenAndMergeSurroundingWhitespace($braceCloseIndex);
+ };
+ }
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ if ($tokens[$index]->isGivenKind(self::TOKEN_LOOP_KINDS)) {
+ $endIndex = $tokens->getNextTokenOfKind($index, ['(']); // proceed to open '('
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $endIndex); // proceed to close ')'
+ $fixLoop($index, $endIndex); // fix loop if needs fixing
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('style', 'Style of empty loop-bodies.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([self::STYLE_BRACES, self::STYLE_SEMICOLON])
+ ->setDefault(self::STYLE_SEMICOLON)
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php
new file mode 100644
index 0000000..7f82fc4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/EmptyLoopConditionFixer.php
@@ -0,0 +1,200 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class EmptyLoopConditionFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ private const STYLE_FOR = 'for';
+
+ private const STYLE_WHILE = 'while';
+
+ private const TOKEN_LOOP_KINDS = [T_FOR, T_WHILE];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Empty loop-condition must be in configured style.',
+ [
+ new CodeSample("<?php\nfor(;;) {\n foo();\n}\n\ndo {\n foo();\n} while(true); // do while\n"),
+ new CodeSample("<?php\nwhile(true) {\n foo();\n}\n", ['style' => 'for']),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(self::TOKEN_LOOP_KINDS);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (self::STYLE_WHILE === $this->configuration['style']) {
+ $candidateLoopKinds = [T_FOR, T_WHILE];
+ $replacement = [new Token([T_WHILE, 'while']), new Token([T_WHITESPACE, ' ']), new Token('('), new Token([T_STRING, 'true']), new Token(')')];
+
+ $fixLoop = static function (int $index, int $openIndex, int $endIndex) use ($tokens, $replacement): void {
+ if (self::isForLoopWithEmptyCondition($tokens, $index, $openIndex, $endIndex)) {
+ self::clearNotCommentsInRange($tokens, $index, $endIndex);
+ self::cloneAndInsert($tokens, $index, $replacement);
+ } elseif (self::isWhileLoopWithEmptyCondition($tokens, $index, $openIndex, $endIndex)) {
+ $doIndex = self::getDoIndex($tokens, $index);
+
+ if (null !== $doIndex) {
+ self::clearNotCommentsInRange($tokens, $index, $tokens->getNextMeaningfulToken($endIndex)); // clear including `;`
+ $tokens->clearAt($doIndex);
+ self::cloneAndInsert($tokens, $doIndex, $replacement);
+ }
+ }
+ };
+ } else { // self::STYLE_FOR
+ $candidateLoopKinds = [T_WHILE];
+ $replacement = [new Token([T_FOR, 'for']), new Token('('), new Token(';'), new Token(';'), new Token(')')];
+
+ $fixLoop = static function (int $index, int $openIndex, int $endIndex) use ($tokens, $replacement): void {
+ if (!self::isWhileLoopWithEmptyCondition($tokens, $index, $openIndex, $endIndex)) {
+ return;
+ }
+
+ $doIndex = self::getDoIndex($tokens, $index);
+
+ if (null === $doIndex) {
+ self::clearNotCommentsInRange($tokens, $index, $endIndex);
+ self::cloneAndInsert($tokens, $index, $replacement);
+ } else {
+ self::clearNotCommentsInRange($tokens, $index, $tokens->getNextMeaningfulToken($endIndex)); // clear including `;`
+ $tokens->clearAt($doIndex);
+ self::cloneAndInsert($tokens, $doIndex, $replacement);
+ }
+ };
+ }
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ if ($tokens[$index]->isGivenKind($candidateLoopKinds)) {
+ $openIndex = $tokens->getNextTokenOfKind($index, ['(']); // proceed to open '('
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex); // proceed to close ')'
+ $fixLoop($index, $openIndex, $endIndex); // fix loop if needed
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('style', 'Style of empty loop-condition.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([self::STYLE_WHILE, self::STYLE_FOR])
+ ->setDefault(self::STYLE_WHILE)
+ ->getOption(),
+ ]);
+ }
+
+ private static function clearNotCommentsInRange(Tokens $tokens, int $indexStart, int $indexEnd): void
+ {
+ for ($i = $indexStart; $i <= $indexEnd; ++$i) {
+ if (!$tokens[$i]->isComment()) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ }
+ }
+ }
+
+ /**
+ * @param Token[] $replacement
+ */
+ private static function cloneAndInsert(Tokens $tokens, int $index, array $replacement): void
+ {
+ $replacementClones = [];
+
+ foreach ($replacement as $token) {
+ $replacementClones[] = clone $token;
+ }
+
+ $tokens->insertAt($index, $replacementClones);
+ }
+
+ private static function getDoIndex(Tokens $tokens, int $index): ?int
+ {
+ $endIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$tokens[$endIndex]->equals('}')) {
+ return null;
+ }
+
+ $startIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $endIndex);
+ $index = $tokens->getPrevMeaningfulToken($startIndex);
+
+ return null === $index || !$tokens[$index]->isGivenKind(T_DO) ? null : $index;
+ }
+
+ private static function isForLoopWithEmptyCondition(Tokens $tokens, int $index, int $openIndex, int $endIndex): bool
+ {
+ if (!$tokens[$index]->isGivenKind(T_FOR)) {
+ return false;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($openIndex);
+
+ if (null === $index || !$tokens[$index]->equals(';')) {
+ return false;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ return null !== $index && $tokens[$index]->equals(';') && $endIndex === $tokens->getNextMeaningfulToken($index);
+ }
+
+ private static function isWhileLoopWithEmptyCondition(Tokens $tokens, int $index, int $openIndex, int $endIndex): bool
+ {
+ if (!$tokens[$index]->isGivenKind(T_WHILE)) {
+ return false;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($openIndex);
+
+ return null !== $index && $tokens[$index]->equals([T_STRING, 'true']) && $endIndex === $tokens->getNextMeaningfulToken($index);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/IncludeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/IncludeFixer.php
new file mode 100644
index 0000000..4440114
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/IncludeFixer.php
@@ -0,0 +1,153 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\BlocksAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Sebastiaan Stok <s.stok@rollerscapes.net>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class IncludeFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Include/Require and file path should be divided with a single space. File path should not be placed under brackets.',
+ [
+ new CodeSample(
+ '<?php
+require ("sample1.php");
+require_once "sample2.php";
+include "sample3.php";
+include_once("sample4.php");
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_REQUIRE, T_REQUIRE_ONCE, T_INCLUDE, T_INCLUDE_ONCE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->clearIncludies($tokens, $this->findIncludies($tokens));
+ }
+
+ private function clearIncludies(Tokens $tokens, array $includies): void
+ {
+ $blocksAnalyzer = new BlocksAnalyzer();
+
+ foreach ($includies as $includy) {
+ if ($includy['end'] && !$tokens[$includy['end']]->isGivenKind(T_CLOSE_TAG)) {
+ $afterEndIndex = $tokens->getNextNonWhitespace($includy['end']);
+ if (null === $afterEndIndex || !$tokens[$afterEndIndex]->isComment()) {
+ $tokens->removeLeadingWhitespace($includy['end']);
+ }
+ }
+
+ $braces = $includy['braces'];
+
+ if (null !== $braces) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($includy['begin']);
+ $nextIndex = $tokens->getNextMeaningfulToken($braces['close']);
+
+ // Include is also legal as function parameter or condition statement but requires being wrapped then.
+ if (!$tokens[$nextIndex]->equalsAny([';', [T_CLOSE_TAG]]) && !$blocksAnalyzer->isBlock($tokens, $prevIndex, $nextIndex)) {
+ continue;
+ }
+
+ $this->removeWhitespaceAroundIfPossible($tokens, $braces['open']);
+ $this->removeWhitespaceAroundIfPossible($tokens, $braces['close']);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($braces['open']);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($braces['close']);
+ }
+
+ $nextIndex = $tokens->getNonEmptySibling($includy['begin'], 1);
+
+ if ($tokens[$nextIndex]->isWhitespace()) {
+ $tokens[$nextIndex] = new Token([T_WHITESPACE, ' ']);
+ } elseif (null !== $braces || $tokens[$nextIndex]->isGivenKind([T_VARIABLE, T_CONSTANT_ENCAPSED_STRING, T_COMMENT])) {
+ $tokens->insertAt($includy['begin'] + 1, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+ }
+
+ private function findIncludies(Tokens $tokens): array
+ {
+ static $includyTokenKinds = [T_REQUIRE, T_REQUIRE_ONCE, T_INCLUDE, T_INCLUDE_ONCE];
+
+ $includies = [];
+
+ foreach ($tokens->findGivenKind($includyTokenKinds) as $includyTokens) {
+ foreach ($includyTokens as $index => $token) {
+ $includy = [
+ 'begin' => $index,
+ 'braces' => null,
+ 'end' => $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]),
+ ];
+
+ $braceOpenIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$braceOpenIndex]->equals('(')) {
+ $braceCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $braceOpenIndex);
+
+ $includy['braces'] = [
+ 'open' => $braceOpenIndex,
+ 'close' => $braceCloseIndex,
+ ];
+ }
+
+ $includies[$index] = $includy;
+ }
+ }
+
+ krsort($includies);
+
+ return $includies;
+ }
+
+ private function removeWhitespaceAroundIfPossible(Tokens $tokens, int $index): void
+ {
+ $nextIndex = $tokens->getNextNonWhitespace($index);
+ if (null === $nextIndex || !$tokens[$nextIndex]->isComment()) {
+ $tokens->removeLeadingWhitespace($index);
+ }
+
+ $prevIndex = $tokens->getPrevNonWhitespace($index);
+ if (null === $prevIndex || !$tokens[$prevIndex]->isComment()) {
+ $tokens->removeTrailingWhitespace($index);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php
new file mode 100644
index 0000000..b863638
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoAlternativeSyntaxFixer.php
@@ -0,0 +1,244 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Eddilbert Macharia <edd.cowan@gmail.com>
+ */
+final class NoAlternativeSyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace control structure alternative syntax to use braces.',
+ [
+ new CodeSample(
+ "<?php\nif(true):echo 't';else:echo 'f';endif;\n"
+ ),
+ new CodeSample(
+ "<?php if (\$condition): ?>\nLorem ipsum.\n<?php endif; ?>\n",
+ ['fix_non_monolithic_code' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->hasAlternativeSyntax() && (true === $this->configuration['fix_non_monolithic_code'] || $tokens->isMonolithicPhp());
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, ElseifFixer, NoSuperfluousElseifFixer, NoUselessElseFixer, SwitchContinueToBreakFixer.
+ */
+ public function getPriority(): int
+ {
+ return 42;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('fix_non_monolithic_code', 'Whether to also fix code with inline HTML.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true) // @TODO change to "false" on next major 4.0
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+ $this->fixElseif($index, $token, $tokens);
+ $this->fixElse($index, $token, $tokens);
+ $this->fixOpenCloseControls($index, $token, $tokens);
+ }
+ }
+
+ private function findParenthesisEnd(Tokens $tokens, int $structureTokenIndex): int
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($structureTokenIndex);
+ $nextToken = $tokens[$nextIndex];
+
+ return $nextToken->equals('(')
+ ? $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $nextIndex)
+ : $structureTokenIndex // return if next token is not opening parenthesis
+ ;
+ }
+
+ /**
+ * Handle both extremes of the control structures.
+ * e.g. if(): or endif;.
+ *
+ * @param int $index the index of the token being processed
+ * @param Token $token the token being processed
+ * @param Tokens $tokens the collection of tokens
+ */
+ private function fixOpenCloseControls(int $index, Token $token, Tokens $tokens): void
+ {
+ if ($token->isGivenKind([T_IF, T_FOREACH, T_WHILE, T_FOR, T_SWITCH, T_DECLARE])) {
+ $openIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+ $afterParenthesisIndex = $tokens->getNextMeaningfulToken($closeIndex);
+ $afterParenthesis = $tokens[$afterParenthesisIndex];
+
+ if (!$afterParenthesis->equals(':')) {
+ return;
+ }
+
+ $items = [];
+
+ if (!$tokens[$afterParenthesisIndex - 1]->isWhitespace()) {
+ $items[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $items[] = new Token('{');
+
+ if (!$tokens[$afterParenthesisIndex + 1]->isWhitespace()) {
+ $items[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $tokens->clearAt($afterParenthesisIndex);
+ $tokens->insertAt($afterParenthesisIndex, $items);
+ }
+
+ if (!$token->isGivenKind([T_ENDIF, T_ENDFOREACH, T_ENDWHILE, T_ENDFOR, T_ENDSWITCH, T_ENDDECLARE])) {
+ return;
+ }
+
+ $nextTokenIndex = $tokens->getNextMeaningfulToken($index);
+ $nextToken = $tokens[$nextTokenIndex];
+ $tokens[$index] = new Token('}');
+
+ if ($nextToken->equals(';')) {
+ $tokens->clearAt($nextTokenIndex);
+ }
+ }
+
+ /**
+ * Handle the else: cases.
+ *
+ * @param int $index the index of the token being processed
+ * @param Token $token the token being processed
+ * @param Tokens $tokens the collection of tokens
+ */
+ private function fixElse(int $index, Token $token, Tokens $tokens): void
+ {
+ if (!$token->isGivenKind(T_ELSE)) {
+ return;
+ }
+
+ $tokenAfterElseIndex = $tokens->getNextMeaningfulToken($index);
+ $tokenAfterElse = $tokens[$tokenAfterElseIndex];
+
+ if (!$tokenAfterElse->equals(':')) {
+ return;
+ }
+
+ $this->addBraces($tokens, new Token([T_ELSE, 'else']), $index, $tokenAfterElseIndex);
+ }
+
+ /**
+ * Handle the elsif(): cases.
+ *
+ * @param int $index the index of the token being processed
+ * @param Token $token the token being processed
+ * @param Tokens $tokens the collection of tokens
+ */
+ private function fixElseif(int $index, Token $token, Tokens $tokens): void
+ {
+ if (!$token->isGivenKind(T_ELSEIF)) {
+ return;
+ }
+
+ $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $index);
+ $tokenAfterParenthesisIndex = $tokens->getNextMeaningfulToken($parenthesisEndIndex);
+ $tokenAfterParenthesis = $tokens[$tokenAfterParenthesisIndex];
+
+ if (!$tokenAfterParenthesis->equals(':')) {
+ return;
+ }
+
+ $this->addBraces($tokens, new Token([T_ELSEIF, 'elseif']), $index, $tokenAfterParenthesisIndex);
+ }
+
+ /**
+ * Add opening and closing braces to the else: and elseif: cases.
+ *
+ * @param Tokens $tokens the tokens collection
+ * @param Token $token the current token
+ * @param int $index the current token index
+ * @param int $colonIndex the index of the colon
+ */
+ private function addBraces(Tokens $tokens, Token $token, int $index, int $colonIndex): void
+ {
+ $items = [
+ new Token('}'),
+ new Token([T_WHITESPACE, ' ']),
+ $token,
+ ];
+
+ if (!$tokens[$index + 1]->isWhitespace()) {
+ $items[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $tokens->clearAt($index);
+ $tokens->insertAt(
+ $index,
+ $items
+ );
+
+ // increment the position of the colon by number of items inserted
+ $colonIndex += \count($items);
+
+ $items = [new Token('{')];
+
+ if (!$tokens[$colonIndex + 1]->isWhitespace()) {
+ $items[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $tokens->clearAt($colonIndex);
+ $tokens->insertAt(
+ $colonIndex,
+ $items
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php
new file mode 100644
index 0000000..e1968b1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoBreakCommentFixer.php
@@ -0,0 +1,351 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * Fixer for rule defined in PSR2 ¶5.2.
+ */
+final class NoBreakCommentFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There must be a comment when fall-through is intentional in a non-empty case body.',
+ [
+ new CodeSample(
+ '<?php
+switch ($foo) {
+ case 1:
+ foo();
+ case 2:
+ bar();
+ // no break
+ break;
+ case 3:
+ baz();
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+switch ($foo) {
+ case 1:
+ foo();
+ case 2:
+ foo();
+}
+',
+ ['comment_text' => 'some comment']
+ ),
+ ],
+ 'Adds a "no break" comment before fall-through cases, and removes it if there is no fall-through.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_SWITCH);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoUselessElseFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('comment_text', 'The text to use in the added comment and to detect it.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([
+ static function (string $value): bool {
+ if (Preg::match('/\R/', $value)) {
+ throw new InvalidOptionsException('The comment text must not contain new lines.');
+ }
+
+ return true;
+ },
+ ])
+ ->setNormalizer(static function (Options $options, string $value): string {
+ return rtrim($value);
+ })
+ ->setDefault('no break')
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index >= 0; --$index) {
+ if ($tokens[$index]->isGivenKind(T_DEFAULT)) {
+ if ($tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_DOUBLE_ARROW)) {
+ continue; // this is "default" from "match"
+ }
+ } elseif (!$tokens[$index]->isGivenKind(T_CASE)) {
+ continue;
+ }
+
+ $this->fixCase($tokens, $tokens->getNextTokenOfKind($index, [':', ';']));
+ }
+ }
+
+ private function fixCase(Tokens $tokens, int $casePosition): void
+ {
+ $empty = true;
+ $fallThrough = true;
+ $commentPosition = null;
+
+ for ($i = $casePosition + 1, $max = \count($tokens); $i < $max; ++$i) {
+ if ($tokens[$i]->isGivenKind([T_SWITCH, T_IF, T_ELSE, T_ELSEIF, T_FOR, T_FOREACH, T_WHILE, T_DO, T_FUNCTION, T_CLASS])) {
+ $empty = false;
+ $i = $this->getStructureEnd($tokens, $i);
+
+ continue;
+ }
+
+ if ($tokens[$i]->isGivenKind([T_BREAK, T_CONTINUE, T_RETURN, T_EXIT, T_GOTO])) {
+ $fallThrough = false;
+
+ continue;
+ }
+
+ if ($tokens[$i]->isGivenKind([T_THROW])) {
+ $previousIndex = $tokens->getPrevMeaningfulToken($i);
+
+ if ($previousIndex === $casePosition || $tokens[$previousIndex]->equalsAny(['{', ';', '}', [T_OPEN_TAG]])) {
+ $fallThrough = false;
+ }
+
+ continue;
+ }
+
+ if ($tokens[$i]->equals('}') || $tokens[$i]->isGivenKind(T_ENDSWITCH)) {
+ if (null !== $commentPosition) {
+ $this->removeComment($tokens, $commentPosition);
+ }
+
+ break;
+ }
+
+ if ($this->isNoBreakComment($tokens[$i])) {
+ $commentPosition = $i;
+
+ continue;
+ }
+
+ if ($tokens[$i]->isGivenKind([T_CASE, T_DEFAULT])) {
+ if (!$empty && $fallThrough) {
+ if (null !== $commentPosition && $tokens->getPrevNonWhitespace($i) !== $commentPosition) {
+ $this->removeComment($tokens, $commentPosition);
+ $commentPosition = null;
+ }
+
+ if (null === $commentPosition) {
+ $this->insertCommentAt($tokens, $i);
+ } else {
+ $text = $this->configuration['comment_text'];
+ $tokens[$commentPosition] = new Token([
+ $tokens[$commentPosition]->getId(),
+ str_ireplace($text, $text, $tokens[$commentPosition]->getContent()),
+ ]);
+
+ $this->ensureNewLineAt($tokens, $commentPosition);
+ }
+ } elseif (null !== $commentPosition) {
+ $this->removeComment($tokens, $commentPosition);
+ }
+
+ break;
+ }
+
+ if (!$tokens[$i]->isGivenKind([T_COMMENT, T_WHITESPACE])) {
+ $empty = false;
+ }
+ }
+ }
+
+ private function isNoBreakComment(Token $token): bool
+ {
+ if (!$token->isComment()) {
+ return false;
+ }
+
+ $text = preg_quote($this->configuration['comment_text'], '~');
+
+ return 1 === Preg::match("~^((//|#)\\s*{$text}\\s*)|(/\\*\\*?\\s*{$text}(\\s+.*)*\\*/)$~i", $token->getContent());
+ }
+
+ private function insertCommentAt(Tokens $tokens, int $casePosition): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+ $newlinePosition = $this->ensureNewLineAt($tokens, $casePosition);
+ $newlineToken = $tokens[$newlinePosition];
+ $nbNewlines = substr_count($newlineToken->getContent(), $lineEnding);
+
+ if ($newlineToken->isGivenKind(T_OPEN_TAG) && Preg::match('/\R/', $newlineToken->getContent())) {
+ ++$nbNewlines;
+ } elseif ($tokens[$newlinePosition - 1]->isGivenKind(T_OPEN_TAG) && Preg::match('/\R/', $tokens[$newlinePosition - 1]->getContent())) {
+ ++$nbNewlines;
+
+ if (!Preg::match('/\R/', $newlineToken->getContent())) {
+ $tokens[$newlinePosition] = new Token([$newlineToken->getId(), $lineEnding.$newlineToken->getContent()]);
+ }
+ }
+
+ if ($nbNewlines > 1) {
+ Preg::match('/^(.*?)(\R\h*)$/s', $newlineToken->getContent(), $matches);
+
+ $indent = WhitespacesAnalyzer::detectIndent($tokens, $newlinePosition - 1);
+ $tokens[$newlinePosition] = new Token([$newlineToken->getId(), $matches[1].$lineEnding.$indent]);
+ $tokens->insertAt(++$newlinePosition, new Token([T_WHITESPACE, $matches[2]]));
+ }
+
+ $tokens->insertAt($newlinePosition, new Token([T_COMMENT, '// '.$this->configuration['comment_text']]));
+ $this->ensureNewLineAt($tokens, $newlinePosition);
+ }
+
+ /**
+ * @return int The newline token position
+ */
+ private function ensureNewLineAt(Tokens $tokens, int $position): int
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+ $content = $lineEnding.WhitespacesAnalyzer::detectIndent($tokens, $position);
+ $whitespaceToken = $tokens[$position - 1];
+
+ if (!$whitespaceToken->isGivenKind(T_WHITESPACE)) {
+ if ($whitespaceToken->isGivenKind(T_OPEN_TAG)) {
+ $content = Preg::replace('/\R/', '', $content);
+ if (!Preg::match('/\R/', $whitespaceToken->getContent())) {
+ $tokens[$position - 1] = new Token([T_OPEN_TAG, Preg::replace('/\s+$/', $lineEnding, $whitespaceToken->getContent())]);
+ }
+ }
+
+ if ('' !== $content) {
+ $tokens->insertAt($position, new Token([T_WHITESPACE, $content]));
+
+ return $position;
+ }
+
+ return $position - 1;
+ }
+
+ if ($tokens[$position - 2]->isGivenKind(T_OPEN_TAG) && Preg::match('/\R/', $tokens[$position - 2]->getContent())) {
+ $content = Preg::replace('/^\R/', '', $content);
+ }
+
+ if (!Preg::match('/\R/', $whitespaceToken->getContent())) {
+ $tokens[$position - 1] = new Token([T_WHITESPACE, $content]);
+ }
+
+ return $position - 1;
+ }
+
+ private function removeComment(Tokens $tokens, int $commentPosition): void
+ {
+ if ($tokens[$tokens->getPrevNonWhitespace($commentPosition)]->isGivenKind(T_OPEN_TAG)) {
+ $whitespacePosition = $commentPosition + 1;
+ $regex = '/^\R\h*/';
+ } else {
+ $whitespacePosition = $commentPosition - 1;
+ $regex = '/\R\h*$/';
+ }
+
+ $whitespaceToken = $tokens[$whitespacePosition];
+
+ if ($whitespaceToken->isGivenKind(T_WHITESPACE)) {
+ $content = Preg::replace($regex, '', $whitespaceToken->getContent());
+ if ('' !== $content) {
+ $tokens[$whitespacePosition] = new Token([T_WHITESPACE, $content]);
+ } else {
+ $tokens->clearAt($whitespacePosition);
+ }
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($commentPosition);
+ }
+
+ private function getStructureEnd(Tokens $tokens, int $position): int
+ {
+ $initialToken = $tokens[$position];
+
+ if ($initialToken->isGivenKind([T_FOR, T_FOREACH, T_WHILE, T_IF, T_ELSEIF, T_SWITCH, T_FUNCTION])) {
+ $position = $tokens->findBlockEnd(
+ Tokens::BLOCK_TYPE_PARENTHESIS_BRACE,
+ $tokens->getNextTokenOfKind($position, ['('])
+ );
+ } elseif ($initialToken->isGivenKind(T_CLASS)) {
+ $openParenthesisPosition = $tokens->getNextMeaningfulToken($position);
+ if ('(' === $tokens[$openParenthesisPosition]->getContent()) {
+ $position = $tokens->findBlockEnd(
+ Tokens::BLOCK_TYPE_PARENTHESIS_BRACE,
+ $openParenthesisPosition
+ );
+ }
+ }
+
+ $position = $tokens->getNextMeaningfulToken($position);
+
+ if ('{' !== $tokens[$position]->getContent()) {
+ return $tokens->getNextTokenOfKind($position, [';']);
+ }
+
+ $position = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $position);
+
+ if ($initialToken->isGivenKind(T_DO)) {
+ $position = $tokens->findBlockEnd(
+ Tokens::BLOCK_TYPE_PARENTHESIS_BRACE,
+ $tokens->getNextTokenOfKind($position, ['('])
+ );
+
+ return $tokens->getNextTokenOfKind($position, [';']);
+ }
+
+ return $position;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php
new file mode 100644
index 0000000..a8b6f92
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php
@@ -0,0 +1,110 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractNoUselessElseFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoSuperfluousElseifFixer extends AbstractNoUselessElseFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ELSE, T_ELSEIF]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replaces superfluous `elseif` with `if`.',
+ [
+ new CodeSample("<?php\nif (\$a) {\n return 1;\n} elseif (\$b) {\n return 2;\n}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before SimplifiedIfReturnFixer.
+ * Must run after NoAlternativeSyntaxFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if ($this->isElseif($tokens, $index) && $this->isSuperfluousElse($tokens, $index)) {
+ $this->convertElseifToIf($tokens, $index);
+ }
+ }
+ }
+
+ private function isElseif(Tokens $tokens, int $index): bool
+ {
+ return
+ $tokens[$index]->isGivenKind(T_ELSEIF)
+ || ($tokens[$index]->isGivenKind(T_ELSE) && $tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_IF))
+ ;
+ }
+
+ private function convertElseifToIf(Tokens $tokens, int $index): void
+ {
+ if ($tokens[$index]->isGivenKind(T_ELSE)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ } else {
+ $tokens[$index] = new Token([T_IF, 'if']);
+ }
+
+ $whitespace = '';
+
+ for ($previous = $index - 1; $previous > 0; --$previous) {
+ $token = $tokens[$previous];
+ if ($token->isWhitespace() && Preg::match('/(\R\N*)$/', $token->getContent(), $matches)) {
+ $whitespace = $matches[1];
+
+ break;
+ }
+ }
+
+ if ('' === $whitespace) {
+ return;
+ }
+
+ $previousToken = $tokens[$index - 1];
+
+ if (!$previousToken->isWhitespace()) {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, $whitespace]));
+ } elseif (!Preg::match('/\R/', $previousToken->getContent())) {
+ $tokens[$index - 1] = new Token([T_WHITESPACE, $whitespace]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php
new file mode 100644
index 0000000..0252750
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoTrailingCommaInListCallFixer.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoTrailingCommaInListCallFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove trailing commas in list function calls.',
+ [new CodeSample("<?php\nlist(\$a, \$b,) = foo();\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_LIST);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_LIST)) {
+ continue;
+ }
+
+ $openIndex = $tokens->getNextMeaningfulToken($index);
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+ $markIndex = null;
+ $prevIndex = $tokens->getPrevNonWhitespace($closeIndex);
+
+ while ($tokens[$prevIndex]->equals(',')) {
+ $markIndex = $prevIndex;
+ $prevIndex = $tokens->getPrevNonWhitespace($prevIndex);
+ }
+
+ if (null !== $markIndex) {
+ $tokens->clearRange(
+ $tokens->getPrevNonWhitespace($markIndex) + 1,
+ $closeIndex - 1
+ );
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php
new file mode 100644
index 0000000..800dc7e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php
@@ -0,0 +1,189 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Sullivan Senechal <soullivaneuh@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class NoUnneededControlParenthesesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array
+ */
+ private static $loops = [
+ 'break' => ['lookupTokens' => T_BREAK, 'neededSuccessors' => [';']],
+ 'clone' => ['lookupTokens' => T_CLONE, 'neededSuccessors' => [';', ':', ',', ')'], 'forbiddenContents' => ['?', ':', [T_COALESCE, '??']]],
+ 'continue' => ['lookupTokens' => T_CONTINUE, 'neededSuccessors' => [';']],
+ 'echo_print' => ['lookupTokens' => [T_ECHO, T_PRINT], 'neededSuccessors' => [';', [T_CLOSE_TAG]]],
+ 'return' => ['lookupTokens' => T_RETURN, 'neededSuccessors' => [';', [T_CLOSE_TAG]]],
+ 'switch_case' => ['lookupTokens' => T_CASE, 'neededSuccessors' => [';', ':']],
+ 'yield' => ['lookupTokens' => T_YIELD, 'neededSuccessors' => [';', ')']],
+ 'yield_from' => ['lookupTokens' => T_YIELD_FROM, 'neededSuccessors' => [';', ')']],
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ $types = [];
+
+ foreach (self::$loops as $loop) {
+ $types[] = (array) $loop['lookupTokens'];
+ }
+
+ $types = array_merge(...$types);
+
+ return $tokens->isAnyTokenKindsFound($types);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Removes unneeded parentheses around control statements.',
+ [
+ new CodeSample(
+ '<?php
+while ($x) { while ($y) { break (2); } }
+clone($a);
+while ($y) { continue (2); }
+echo("foo");
+print("foo");
+return (1 + 2);
+switch ($a) { case($x); }
+yield(2);
+'
+ ),
+ new CodeSample(
+ '<?php
+while ($x) { while ($y) { break (2); } }
+clone($a);
+while ($y) { continue (2); }
+echo("foo");
+print("foo");
+return (1 + 2);
+switch ($a) { case($x); }
+yield(2);
+',
+ ['statements' => ['break', 'continue']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoTrailingWhitespaceFixer.
+ */
+ public function getPriority(): int
+ {
+ return 30;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // Checks if specific statements are set and uses them in this case.
+ $loops = array_intersect_key(self::$loops, array_flip($this->configuration['statements']));
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->equalsAny(['(', [CT::T_BRACE_CLASS_INSTANTIATION_OPEN]])) {
+ continue;
+ }
+
+ $blockStartIndex = $index;
+ $index = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$index];
+
+ foreach ($loops as $loop) {
+ if (!$prevToken->isGivenKind($loop['lookupTokens'])) {
+ continue;
+ }
+
+ $blockEndIndex = $tokens->findBlockEnd(
+ $token->equals('(') ? Tokens::BLOCK_TYPE_PARENTHESIS_BRACE : Tokens::BLOCK_TYPE_BRACE_CLASS_INSTANTIATION,
+ $blockStartIndex
+ );
+
+ $blockEndNextIndex = $tokens->getNextMeaningfulToken($blockEndIndex);
+
+ if (!$tokens[$blockEndNextIndex]->equalsAny($loop['neededSuccessors'])) {
+ continue;
+ }
+
+ if (\array_key_exists('forbiddenContents', $loop)) {
+ $forbiddenTokenIndex = $tokens->getNextTokenOfKind($blockStartIndex, $loop['forbiddenContents']);
+
+ // A forbidden token is found and is inside the parenthesis.
+ if (null !== $forbiddenTokenIndex && $forbiddenTokenIndex < $blockEndIndex) {
+ continue;
+ }
+ }
+
+ if ($tokens[$blockStartIndex - 1]->isWhitespace() || $tokens[$blockStartIndex - 1]->isComment()) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($blockStartIndex);
+ } else {
+ // Adds a space to prevent broken code like `return2`.
+ $tokens[$blockStartIndex] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($blockEndIndex);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('statements', 'List of control statements to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(array_keys(self::$loops))])
+ ->setDefault([
+ 'break',
+ 'clone',
+ 'continue',
+ 'echo_print',
+ 'return',
+ 'switch_case',
+ 'yield',
+ ])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php
new file mode 100644
index 0000000..8f260d8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUnneededCurlyBracesFixer.php
@@ -0,0 +1,169 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoUnneededCurlyBracesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Removes unneeded curly braces that are superfluous and aren\'t part of a control structure\'s body.',
+ [
+ new CodeSample(
+ '<?php {
+ echo 1;
+}
+
+switch ($b) {
+ case 1: {
+ break;
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+namespace Foo {
+ function Bar(){}
+}
+',
+ ['namespaces' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUselessElseFixer, NoUselessReturnFixer, ReturnAssignmentFixer, SimplifiedIfReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return 40;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('}');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($this->findCurlyBraceOpen($tokens) as $index) {
+ if ($this->isOverComplete($tokens, $index)) {
+ $this->clearOverCompleteBraces($tokens, $index, $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index));
+ }
+ }
+
+ if (true === $this->configuration['namespaces']) {
+ $this->clearIfIsOverCompleteNamespaceBlock($tokens);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('namespaces', 'Remove unneeded curly braces from bracketed namespaces.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param int $openIndex index of `{` token
+ * @param int $closeIndex index of `}` token
+ */
+ private function clearOverCompleteBraces(Tokens $tokens, int $openIndex, int $closeIndex): void
+ {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openIndex);
+ }
+
+ private function findCurlyBraceOpen(Tokens $tokens): iterable
+ {
+ for ($i = \count($tokens) - 1; $i > 0; --$i) {
+ if ($tokens[$i]->equals('{')) {
+ yield $i;
+ }
+ }
+ }
+
+ /**
+ * @param int $index index of `{` token
+ */
+ private function isOverComplete(Tokens $tokens, int $index): bool
+ {
+ static $include = ['{', '}', [T_OPEN_TAG], ':', ';'];
+
+ return $tokens[$tokens->getPrevMeaningfulToken($index)]->equalsAny($include);
+ }
+
+ private function clearIfIsOverCompleteNamespaceBlock(Tokens $tokens): void
+ {
+ if (1 !== $tokens->countTokenKind(T_NAMESPACE)) {
+ return; // fast check, we never fix if multiple namespaces are defined
+ }
+
+ $index = $tokens->getNextTokenOfKind(0, [[T_NAMESPACE]]);
+
+ do {
+ $index = $tokens->getNextMeaningfulToken($index);
+ } while ($tokens[$index]->isGivenKind([T_STRING, T_NS_SEPARATOR]));
+
+ if (!$tokens[$index]->equals('{')) {
+ return; // `;`
+ }
+
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+ $afterCloseIndex = $tokens->getNextMeaningfulToken($closeIndex);
+
+ if (null !== $afterCloseIndex && (!$tokens[$afterCloseIndex]->isGivenKind(T_CLOSE_TAG) || null !== $tokens->getNextMeaningfulToken($afterCloseIndex))) {
+ return;
+ }
+
+ // clear up
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeIndex);
+ $tokens[$index] = new Token(';');
+
+ if ($tokens[$index - 1]->isWhitespace(" \t") && !$tokens[$index - 2]->isComment()) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index - 1);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php
new file mode 100644
index 0000000..58a9a3c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/NoUselessElseFixer.php
@@ -0,0 +1,129 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractNoUselessElseFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoUselessElseFixer extends AbstractNoUselessElseFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_ELSE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be useless `else` cases.',
+ [
+ new CodeSample("<?php\nif (\$a) {\n return 1;\n} else {\n return 2;\n}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, CombineConsecutiveUnsetsFixer, NoBreakCommentFixer, NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoUselessReturnFixer, NoWhitespaceInBlankLineFixer, SimplifiedIfReturnFixer.
+ * Must run after NoAlternativeSyntaxFixer, NoEmptyStatementFixer, NoUnneededCurlyBracesFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_ELSE)) {
+ continue;
+ }
+
+ // `else if` vs. `else` and alternative syntax `else:` checks
+ if ($tokens[$tokens->getNextMeaningfulToken($index)]->equalsAny([':', [T_IF]])) {
+ continue;
+ }
+
+ // clean up `else` if it is an empty statement
+ $this->fixEmptyElse($tokens, $index);
+ if ($tokens->isEmptyAt($index)) {
+ continue;
+ }
+
+ // clean up `else` if possible
+ if ($this->isSuperfluousElse($tokens, $index)) {
+ $this->clearElse($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * Remove tokens part of an `else` statement if not empty (i.e. no meaningful tokens inside).
+ *
+ * @param int $index T_ELSE index
+ */
+ private function fixEmptyElse(Tokens $tokens, int $index): void
+ {
+ $next = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$next]->equals('{')) {
+ $close = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $next);
+ if (1 === $close - $next) { // '{}'
+ $this->clearElse($tokens, $index);
+ } elseif ($tokens->getNextMeaningfulToken($next) === $close) { // '{/**/}'
+ $this->clearElse($tokens, $index);
+ }
+
+ return;
+ }
+
+ // short `else`
+ $end = $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]);
+ if ($next === $end) {
+ $this->clearElse($tokens, $index);
+ }
+ }
+
+ /**
+ * @param int $index index of T_ELSE
+ */
+ private function clearElse(Tokens $tokens, int $index): void
+ {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ // clear T_ELSE and the '{' '}' if there are any
+ $next = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$next]->equals('{')) {
+ return;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $next));
+ $tokens->clearTokenAndMergeSurroundingWhitespace($next);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SimplifiedIfReturnFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SimplifiedIfReturnFixer.php
new file mode 100644
index 0000000..6831c77
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SimplifiedIfReturnFixer.php
@@ -0,0 +1,145 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class SimplifiedIfReturnFixer extends AbstractFixer
+{
+ /**
+ * @var array[]
+ */
+ private $sequences = [
+ [
+ 'isNegative' => false,
+ 'sequence' => [
+ '{', [T_RETURN], [T_STRING, 'true'], ';', '}',
+ [T_RETURN], [T_STRING, 'false'], ';',
+ ],
+ ],
+ [
+ 'isNegative' => true,
+ 'sequence' => [
+ '{', [T_RETURN], [T_STRING, 'false'], ';', '}',
+ [T_RETURN], [T_STRING, 'true'], ';',
+ ],
+ ],
+ [
+ 'isNegative' => false,
+ 'sequence' => [
+ [T_RETURN], [T_STRING, 'true'], ';',
+ [T_RETURN], [T_STRING, 'false'], ';',
+ ],
+ ],
+ [
+ 'isNegative' => true,
+ 'sequence' => [
+ [T_RETURN], [T_STRING, 'false'], ';',
+ [T_RETURN], [T_STRING, 'true'], ';',
+ ],
+ ],
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Simplify `if` control structures that return the boolean result of their condition.',
+ [new CodeSample("<?php\nif (\$foo) { return true; } return false;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MultilineWhitespaceBeforeSemicolonsFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer.
+ * Must run after NoSuperfluousElseifFixer, NoUnneededCurlyBracesFixer, NoUselessElseFixer, SemicolonAfterInstructionFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_IF, T_RETURN, T_STRING]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($ifIndex = $tokens->count() - 1; 0 <= $ifIndex; --$ifIndex) {
+ $ifToken = $tokens[$ifIndex];
+
+ if (!$ifToken->isGivenKind([T_IF, T_ELSEIF])) {
+ continue;
+ }
+
+ $startParenthesisIndex = $tokens->getNextTokenOfKind($ifIndex, ['(']);
+ $endParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startParenthesisIndex);
+ $firstCandidateIndex = $tokens->getNextMeaningfulToken($endParenthesisIndex);
+
+ foreach ($this->sequences as $sequenceSpec) {
+ $sequenceFound = $tokens->findSequence($sequenceSpec['sequence'], $firstCandidateIndex);
+
+ if (null === $sequenceFound) {
+ continue;
+ }
+
+ $firstSequenceIndex = key($sequenceFound);
+
+ if ($firstSequenceIndex !== $firstCandidateIndex) {
+ continue;
+ }
+
+ $indexesToClear = array_keys($sequenceFound);
+ array_pop($indexesToClear); // Preserve last semicolon
+ rsort($indexesToClear);
+
+ foreach ($indexesToClear as $index) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+
+ $newTokens = [
+ new Token([T_RETURN, 'return']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ if ($sequenceSpec['isNegative']) {
+ $newTokens[] = new Token('!');
+ } else {
+ $newTokens[] = new Token([T_BOOL_CAST, '(bool)']);
+ }
+
+ $tokens->overrideRange($ifIndex, $ifIndex, $newTokens);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSemicolonToColonFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSemicolonToColonFixer.php
new file mode 100644
index 0000000..bbc6516
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSemicolonToColonFixer.php
@@ -0,0 +1,96 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\SwitchAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\ControlCaseStructuresAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶5.2.
+ */
+final class SwitchCaseSemicolonToColonFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'A case should be followed by a colon and not a semicolon.',
+ [
+ new CodeSample(
+ '<?php
+ switch ($a) {
+ case 1;
+ break;
+ default;
+ break;
+ }
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoEmptyStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_SWITCH);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ /** @var SwitchAnalysis $analysis */
+ foreach (ControlCaseStructuresAnalyzer::findControlStructures($tokens, [T_SWITCH]) as $analysis) {
+ $default = $analysis->getDefaultAnalysis();
+
+ if (null !== $default) {
+ $this->fixTokenIfNeeded($tokens, $default->getColonIndex());
+ }
+
+ foreach ($analysis->getCases() as $caseAnalysis) {
+ $this->fixTokenIfNeeded($tokens, $caseAnalysis->getColonIndex());
+ }
+ }
+ }
+
+ private function fixTokenIfNeeded(Tokens $tokens, int $index): void
+ {
+ if ($tokens[$index]->equals(';')) {
+ $tokens[$index] = new Token(':');
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSpaceFixer.php
new file mode 100644
index 0000000..a48a146
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchCaseSpaceFixer.php
@@ -0,0 +1,94 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\SwitchAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\ControlCaseStructuresAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶5.2.
+ *
+ * @author Sullivan Senechal <soullivaneuh@gmail.com>
+ */
+final class SwitchCaseSpaceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Removes extra spaces between colon and case value.',
+ [
+ new CodeSample(
+ '<?php
+ switch($a) {
+ case 1 :
+ break;
+ default :
+ return 2;
+ }
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_SWITCH);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ /** @var SwitchAnalysis $analysis */
+ foreach (ControlCaseStructuresAnalyzer::findControlStructures($tokens, [T_SWITCH]) as $analysis) {
+ $default = $analysis->getDefaultAnalysis();
+
+ if (null !== $default) {
+ $index = $default->getIndex();
+
+ if (!$tokens[$index + 1]->isWhitespace() || !$tokens[$index + 2]->equalsAny([':', ';'])) {
+ continue;
+ }
+
+ $tokens->clearAt($index + 1);
+ }
+
+ foreach ($analysis->getCases() as $caseAnalysis) {
+ $colonIndex = $caseAnalysis->getColonIndex();
+ $valueIndex = $tokens->getPrevNonWhitespace($colonIndex);
+
+ // skip if there is no space between the colon and previous token or is space after comment
+ if ($valueIndex === $colonIndex - 1 || $tokens[$valueIndex]->isComment()) {
+ continue;
+ }
+
+ $tokens->clearAt($valueIndex + 1);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchContinueToBreakFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchContinueToBreakFixer.php
new file mode 100644
index 0000000..4ee7047
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/SwitchContinueToBreakFixer.php
@@ -0,0 +1,249 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class SwitchContinueToBreakFixer extends AbstractFixer
+{
+ /**
+ * @var int[]
+ */
+ private $switchLevels = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Switch case must not be ended with `continue` but with `break`.',
+ [
+ new CodeSample(
+ '<?php
+switch ($foo) {
+ case 1:
+ continue;
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+switch ($foo) {
+ case 1:
+ while($bar) {
+ do {
+ continue 3;
+ } while(false);
+
+ if ($foo + 1 > 3) {
+ continue;
+ }
+
+ continue 2;
+ }
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoAlternativeSyntaxFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_SWITCH, T_CONTINUE]) && !$tokens->hasAlternativeSyntax();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $count = \count($tokens);
+
+ for ($index = 1; $index < $count - 1; ++$index) {
+ $index = $this->doFix($tokens, $index, 0, false);
+ }
+ }
+
+ /**
+ * @param int $depth >= 0
+ */
+ private function doFix(Tokens $tokens, int $index, int $depth, bool $isInSwitch): int
+ {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind([T_FOREACH, T_FOR, T_WHILE])) {
+ // go to first `(`, go to its close ')', go to first of '{', ';', '? >'
+ $index = $tokens->getNextTokenOfKind($index, ['(']);
+ $index = $tokens->getNextTokenOfKind($index, [')']);
+ $index = $tokens->getNextTokenOfKind($index, ['{', ';', [T_CLOSE_TAG]]);
+
+ if (!$tokens[$index]->equals('{')) {
+ return $index;
+ }
+
+ return $this->fixInLoop($tokens, $index, $depth + 1);
+ }
+
+ if ($token->isGivenKind(T_DO)) {
+ return $this->fixInLoop($tokens, $tokens->getNextTokenOfKind($index, ['{']), $depth + 1);
+ }
+
+ if ($token->isGivenKind(T_SWITCH)) {
+ return $this->fixInSwitch($tokens, $index, $depth + 1);
+ }
+
+ if ($token->isGivenKind(T_CONTINUE)) {
+ return $this->fixContinueWhenActsAsBreak($tokens, $index, $isInSwitch, $depth);
+ }
+
+ return $index;
+ }
+
+ private function fixInSwitch(Tokens $tokens, int $switchIndex, int $depth): int
+ {
+ $this->switchLevels[] = $depth;
+
+ // figure out where the switch starts
+ $openIndex = $tokens->getNextTokenOfKind($switchIndex, ['{']);
+
+ // figure out where the switch ends
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $openIndex);
+
+ for ($index = $openIndex + 1; $index < $closeIndex; ++$index) {
+ $index = $this->doFix($tokens, $index, $depth, true);
+ }
+
+ array_pop($this->switchLevels);
+
+ return $closeIndex;
+ }
+
+ private function fixInLoop(Tokens $tokens, int $openIndex, int $depth): int
+ {
+ $openCount = 1;
+
+ while (true) {
+ ++$openIndex;
+ $token = $tokens[$openIndex];
+
+ if ($token->equals('{')) {
+ ++$openCount;
+
+ continue;
+ }
+
+ if ($token->equals('}')) {
+ --$openCount;
+
+ if (0 === $openCount) {
+ break;
+ }
+
+ continue;
+ }
+
+ $openIndex = $this->doFix($tokens, $openIndex, $depth, false);
+ }
+
+ return $openIndex;
+ }
+
+ private function fixContinueWhenActsAsBreak(Tokens $tokens, int $continueIndex, bool $isInSwitch, int $depth): int
+ {
+ $followingContinueIndex = $tokens->getNextMeaningfulToken($continueIndex);
+ $followingContinueToken = $tokens[$followingContinueIndex];
+
+ if ($isInSwitch && $followingContinueToken->equals(';')) {
+ $this->replaceContinueWithBreakToken($tokens, $continueIndex); // short continue 1 notation
+
+ return $followingContinueIndex;
+ }
+
+ if (!$followingContinueToken->isGivenKind(T_LNUMBER)) {
+ return $followingContinueIndex;
+ }
+
+ $afterFollowingContinueIndex = $tokens->getNextMeaningfulToken($followingContinueIndex);
+
+ if (!$tokens[$afterFollowingContinueIndex]->equals(';')) {
+ return $afterFollowingContinueIndex; // if next not is `;` return without fixing, for example `continue 1 ? ><?php + $a;`
+ }
+
+ // check if continue {jump} targets a switch statement and if so fix it
+
+ $jump = $followingContinueToken->getContent();
+ $jump = str_replace('_', '', $jump); // support for numeric_literal_separator
+
+ if (\strlen($jump) > 2 && 'x' === $jump[1]) {
+ $jump = hexdec($jump); // hexadecimal - 0x1
+ } elseif (\strlen($jump) > 2 && 'b' === $jump[1]) {
+ $jump = bindec($jump); // binary - 0b1
+ } elseif (\strlen($jump) > 1 && '0' === $jump[0]) {
+ $jump = octdec($jump); // octal 01
+ } elseif (1 === Preg::match('#^\d+$#', $jump)) { // positive int
+ $jump = (float) $jump; // cast to float, might be a number bigger than PHP max. int value
+ } else {
+ return $afterFollowingContinueIndex; // cannot process value, ignore
+ }
+
+ if ($jump > PHP_INT_MAX) {
+ return $afterFollowingContinueIndex; // cannot process value, ignore
+ }
+
+ $jump = (int) $jump;
+
+ if ($isInSwitch && (1 === $jump || 0 === $jump)) {
+ $this->replaceContinueWithBreakToken($tokens, $continueIndex); // long continue 0/1 notation
+
+ return $afterFollowingContinueIndex;
+ }
+
+ $jumpDestination = $depth - $jump + 1;
+
+ if (\in_array($jumpDestination, $this->switchLevels, true)) {
+ $this->replaceContinueWithBreakToken($tokens, $continueIndex);
+
+ return $afterFollowingContinueIndex;
+ }
+
+ return $afterFollowingContinueIndex;
+ }
+
+ private function replaceContinueWithBreakToken(Tokens $tokens, int $index): void
+ {
+ $tokens[$index] = new Token([T_BREAK, 'break']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
new file mode 100644
index 0000000..9393cff
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php
@@ -0,0 +1,221 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerConfiguration\InvalidOptionsForEnvException;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * @author Sebastiaan Stok <s.stok@rollerscapes.net>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class TrailingCommaInMultilineFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const ELEMENTS_ARRAYS = 'arrays';
+
+ /**
+ * @internal
+ */
+ public const ELEMENTS_ARGUMENTS = 'arguments';
+
+ /**
+ * @internal
+ */
+ public const ELEMENTS_PARAMETERS = 'parameters';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Multi-line arrays, arguments list and parameters list must have a trailing comma.',
+ [
+ new CodeSample("<?php\narray(\n 1,\n 2\n);\n"),
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+ $x = [
+ 'foo',
+ <<<EOD
+ bar
+ EOD
+ ];
+
+SAMPLE
+ ,
+ new VersionSpecification(70300),
+ ['after_heredoc' => true]
+ ),
+ new VersionSpecificCodeSample("<?php\nfoo(\n 1,\n 2\n);\n", new VersionSpecification(70300), ['elements' => [self::ELEMENTS_ARGUMENTS]]),
+ new VersionSpecificCodeSample("<?php\nfunction foo(\n \$x,\n \$y\n)\n{\n}\n", new VersionSpecification(80000), ['elements' => [self::ELEMENTS_PARAMETERS]]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoMultilineWhitespaceAroundDoubleArrowFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN, '(']);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('after_heredoc', 'Whether a trailing comma should also be placed after heredoc end.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->setNormalizer(static function (Options $options, $value) {
+ if (\PHP_VERSION_ID < 70300 && $value) {
+ throw new InvalidOptionsForEnvException('"after_heredoc" option can only be enabled with PHP 7.3+.');
+ }
+
+ return $value;
+ })
+ ->getOption(),
+ (new FixerOptionBuilder('elements', sprintf('Where to fix multiline trailing comma (PHP >= 7.3 required for `%s`, PHP >= 8.0 for `%s`).', self::ELEMENTS_ARGUMENTS, self::ELEMENTS_PARAMETERS)))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset([self::ELEMENTS_ARRAYS, self::ELEMENTS_ARGUMENTS, self::ELEMENTS_PARAMETERS])])
+ ->setDefault([self::ELEMENTS_ARRAYS])
+ ->setNormalizer(static function (Options $options, $value) {
+ if (\PHP_VERSION_ID < 70300 && \in_array(self::ELEMENTS_ARGUMENTS, $value, true)) {
+ throw new InvalidOptionsForEnvException(sprintf('"%s" option can only be enabled with PHP 7.3+.', self::ELEMENTS_ARGUMENTS));
+ }
+
+ if (\PHP_VERSION_ID < 80000 && \in_array(self::ELEMENTS_PARAMETERS, $value, true)) {
+ throw new InvalidOptionsForEnvException(sprintf('"%s" option can only be enabled with PHP 8.0+.', self::ELEMENTS_PARAMETERS));
+ }
+
+ return $value;
+ })
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $fixArrays = \in_array(self::ELEMENTS_ARRAYS, $this->configuration['elements'], true);
+ $fixArguments = \in_array(self::ELEMENTS_ARGUMENTS, $this->configuration['elements'], true);
+ $fixParameters = \in_array(self::ELEMENTS_PARAMETERS, $this->configuration['elements'], true);
+
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (
+ $fixArrays
+ && (
+ $tokens[$index]->equals('(') && $tokens[$prevIndex]->isGivenKind(T_ARRAY) // long syntax
+ || $tokens[$index]->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN) // short syntax
+ )
+ ) {
+ $this->fixBlock($tokens, $index);
+
+ continue;
+ }
+
+ if (!$tokens[$index]->equals('(')) {
+ continue;
+ }
+
+ $prevPrevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+
+ if ($fixArguments
+ && $tokens[$prevIndex]->equalsAny([']', [T_CLASS], [T_STRING], [T_VARIABLE]])
+ && !$tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION)
+ ) {
+ $this->fixBlock($tokens, $index);
+
+ continue;
+ }
+
+ if (
+ $fixParameters
+ && (
+ $tokens[$prevIndex]->isGivenKind(T_STRING) && $tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION)
+ || $tokens[$prevIndex]->isGivenKind([T_FN, T_FUNCTION])
+ )
+ ) {
+ $this->fixBlock($tokens, $index);
+ }
+ }
+ }
+
+ private function fixBlock(Tokens $tokens, int $startIndex): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ if (!$tokensAnalyzer->isBlockMultiline($tokens, $startIndex)) {
+ return;
+ }
+
+ $blockType = Tokens::detectBlockType($tokens[$startIndex]);
+ $endIndex = $tokens->findBlockEnd($blockType['type'], $startIndex);
+
+ $beforeEndIndex = $tokens->getPrevMeaningfulToken($endIndex);
+ $beforeEndToken = $tokens[$beforeEndIndex];
+
+ // if there is some item between braces then add `,` after it
+ if (
+ $startIndex !== $beforeEndIndex && !$beforeEndToken->equals(',')
+ && (true === $this->configuration['after_heredoc'] || !$beforeEndToken->isGivenKind(T_END_HEREDOC))
+ ) {
+ $tokens->insertAt($beforeEndIndex + 1, new Token(','));
+
+ $endToken = $tokens[$endIndex];
+
+ if (!$endToken->isComment() && !$endToken->isWhitespace()) {
+ $tokens->ensureWhitespaceAtIndex($endIndex, 1, ' ');
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
new file mode 100644
index 0000000..8cf4eba
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ControlStructure/YodaStyleFixer.php
@@ -0,0 +1,746 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ControlStructure;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Bram Gotink <bram@gotink.me>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class YodaStyleFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<int|string, Token>
+ */
+ private $candidatesMap;
+
+ /**
+ * @var array<int|string, null|bool>
+ */
+ private $candidateTypesConfiguration;
+
+ /**
+ * @var array<int|string>
+ */
+ private $candidateTypes;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->resolveConfiguration();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Write conditions in Yoda style (`true`), non-Yoda style (`[\'equal\' => false, \'identical\' => false, \'less_and_greater\' => false]`) or ignore those conditions (`null`) based on configuration.',
+ [
+ new CodeSample(
+ '<?php
+ if ($a === null) {
+ echo "null";
+ }
+'
+ ),
+ new CodeSample(
+ '<?php
+ $b = $c != 1; // equal
+ $a = 1 === $b; // identical
+ $c = $c > 3; // less than
+',
+ [
+ 'equal' => true,
+ 'identical' => false,
+ 'less_and_greater' => null,
+ ]
+ ),
+ new CodeSample(
+ '<?php
+return $foo === count($bar);
+',
+ [
+ 'always_move_variable' => true,
+ ]
+ ),
+ new CodeSample(
+ '<?php
+ // Enforce non-Yoda style.
+ if (null === $a) {
+ echo "null";
+ }
+',
+ [
+ 'equal' => false,
+ 'identical' => false,
+ 'less_and_greater' => false,
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after IsNullFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound($this->candidateTypes);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->fixTokens($tokens);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('equal', 'Style for equal (`==`, `!=`) statements.'))
+ ->setAllowedTypes(['bool', 'null'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('identical', 'Style for identical (`===`, `!==`) statements.'))
+ ->setAllowedTypes(['bool', 'null'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('less_and_greater', 'Style for less and greater than (`<`, `<=`, `>`, `>=`) statements.'))
+ ->setAllowedTypes(['bool', 'null'])
+ ->setDefault(null)
+ ->getOption(),
+ (new FixerOptionBuilder('always_move_variable', 'Whether variables should always be on non assignable side when applying Yoda style.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * Finds the end of the right-hand side of the comparison at the given
+ * index.
+ *
+ * The right-hand side ends when an operator with a lower precedence is
+ * encountered or when the block level for `()`, `{}` or `[]` goes below
+ * zero.
+ *
+ * @param Tokens $tokens The token list
+ * @param int $index The index of the comparison
+ *
+ * @return int The last index of the right-hand side of the comparison
+ */
+ private function findComparisonEnd(Tokens $tokens, int $index): int
+ {
+ ++$index;
+ $count = \count($tokens);
+
+ while ($index < $count) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind([T_WHITESPACE, T_COMMENT, T_DOC_COMMENT])) {
+ ++$index;
+
+ continue;
+ }
+
+ if ($this->isOfLowerPrecedence($token)) {
+ break;
+ }
+
+ $block = Tokens::detectBlockType($token);
+
+ if (null === $block) {
+ ++$index;
+
+ continue;
+ }
+
+ if (!$block['isStart']) {
+ break;
+ }
+
+ $index = $tokens->findBlockEnd($block['type'], $index) + 1;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($index);
+
+ return $tokens[$prev]->isGivenKind(T_CLOSE_TAG) ? $tokens->getPrevMeaningfulToken($prev) : $prev;
+ }
+
+ /**
+ * Finds the start of the left-hand side of the comparison at the given
+ * index.
+ *
+ * The left-hand side ends when an operator with a lower precedence is
+ * encountered or when the block level for `()`, `{}` or `[]` goes below
+ * zero.
+ *
+ * @param Tokens $tokens The token list
+ * @param int $index The index of the comparison
+ *
+ * @return int The first index of the left-hand side of the comparison
+ */
+ private function findComparisonStart(Tokens $tokens, int $index): int
+ {
+ --$index;
+ $nonBlockFound = false;
+
+ while (0 <= $index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind([T_WHITESPACE, T_COMMENT, T_DOC_COMMENT])) {
+ --$index;
+
+ continue;
+ }
+
+ if ($token->isGivenKind([CT::T_NAMED_ARGUMENT_COLON])) {
+ break;
+ }
+
+ if ($this->isOfLowerPrecedence($token)) {
+ break;
+ }
+
+ $block = Tokens::detectBlockType($token);
+
+ if (null === $block) {
+ --$index;
+ $nonBlockFound = true;
+
+ continue;
+ }
+
+ if (
+ $block['isStart']
+ || ($nonBlockFound && Tokens::BLOCK_TYPE_CURLY_BRACE === $block['type']) // closing of structure not related to the comparison
+ ) {
+ break;
+ }
+
+ $index = $tokens->findBlockStart($block['type'], $index) - 1;
+ }
+
+ return $tokens->getNextMeaningfulToken($index);
+ }
+
+ private function fixTokens(Tokens $tokens): Tokens
+ {
+ for ($i = \count($tokens) - 1; $i > 1; --$i) {
+ if ($tokens[$i]->isGivenKind($this->candidateTypes)) {
+ $yoda = $this->candidateTypesConfiguration[$tokens[$i]->getId()];
+ } elseif (
+ ($tokens[$i]->equals('<') && \in_array('<', $this->candidateTypes, true))
+ || ($tokens[$i]->equals('>') && \in_array('>', $this->candidateTypes, true))
+ ) {
+ $yoda = $this->candidateTypesConfiguration[$tokens[$i]->getContent()];
+ } else {
+ continue;
+ }
+
+ $fixableCompareInfo = $this->getCompareFixableInfo($tokens, $i, $yoda);
+
+ if (null === $fixableCompareInfo) {
+ continue;
+ }
+
+ $i = $this->fixTokensCompare(
+ $tokens,
+ $fixableCompareInfo['left']['start'],
+ $fixableCompareInfo['left']['end'],
+ $i,
+ $fixableCompareInfo['right']['start'],
+ $fixableCompareInfo['right']['end']
+ );
+ }
+
+ return $tokens;
+ }
+
+ /**
+ * Fixes the comparison at the given index.
+ *
+ * A comparison is considered fixed when
+ * - both sides are a variable (e.g. $a === $b)
+ * - neither side is a variable (e.g. self::CONST === 3)
+ * - only the right-hand side is a variable (e.g. 3 === self::$var)
+ *
+ * If the left-hand side and right-hand side of the given comparison are
+ * swapped, this function runs recursively on the previous left-hand-side.
+ *
+ * @return int an upper bound for all non-fixed comparisons
+ */
+ private function fixTokensCompare(
+ Tokens $tokens,
+ int $startLeft,
+ int $endLeft,
+ int $compareOperatorIndex,
+ int $startRight,
+ int $endRight
+ ): int {
+ $type = $tokens[$compareOperatorIndex]->getId();
+ $content = $tokens[$compareOperatorIndex]->getContent();
+
+ if (\array_key_exists($type, $this->candidatesMap)) {
+ $tokens[$compareOperatorIndex] = clone $this->candidatesMap[$type];
+ } elseif (\array_key_exists($content, $this->candidatesMap)) {
+ $tokens[$compareOperatorIndex] = clone $this->candidatesMap[$content];
+ }
+
+ $right = $this->fixTokensComparePart($tokens, $startRight, $endRight);
+ $left = $this->fixTokensComparePart($tokens, $startLeft, $endLeft);
+
+ for ($i = $startRight; $i <= $endRight; ++$i) {
+ $tokens->clearAt($i);
+ }
+
+ for ($i = $startLeft; $i <= $endLeft; ++$i) {
+ $tokens->clearAt($i);
+ }
+
+ $tokens->insertAt($startRight, $left);
+ $tokens->insertAt($startLeft, $right);
+
+ return $startLeft;
+ }
+
+ private function fixTokensComparePart(Tokens $tokens, int $start, int $end): Tokens
+ {
+ $newTokens = $tokens->generatePartialCode($start, $end);
+ $newTokens = $this->fixTokens(Tokens::fromCode(sprintf('<?php %s;', $newTokens)));
+ $newTokens->clearAt(\count($newTokens) - 1);
+ $newTokens->clearAt(0);
+ $newTokens->clearEmptyTokens();
+
+ return $newTokens;
+ }
+
+ private function getCompareFixableInfo(Tokens $tokens, int $index, bool $yoda): ?array
+ {
+ $left = $this->getLeftSideCompareFixableInfo($tokens, $index);
+ $right = $this->getRightSideCompareFixableInfo($tokens, $index);
+
+ if (!$yoda && $this->isOfLowerPrecedenceAssignment($tokens[$tokens->getNextMeaningfulToken($right['end'])])) {
+ return null;
+ }
+
+ if ($this->isListStatement($tokens, $left['start'], $left['end']) || $this->isListStatement($tokens, $right['start'], $right['end'])) {
+ return null; // do not fix lists assignment inside statements
+ }
+
+ /** @var bool $strict */
+ $strict = $this->configuration['always_move_variable'];
+ $leftSideIsVariable = $this->isVariable($tokens, $left['start'], $left['end'], $strict);
+ $rightSideIsVariable = $this->isVariable($tokens, $right['start'], $right['end'], $strict);
+
+ if (!($leftSideIsVariable ^ $rightSideIsVariable)) {
+ return null; // both are (not) variables, do not touch
+ }
+
+ if (!$strict) { // special handling for braces with not "always_move_variable"
+ $leftSideIsVariable = $leftSideIsVariable && !$tokens[$left['start']]->equals('(');
+ $rightSideIsVariable = $rightSideIsVariable && !$tokens[$right['start']]->equals('(');
+ }
+
+ return ($yoda && !$leftSideIsVariable) || (!$yoda && !$rightSideIsVariable)
+ ? null
+ : ['left' => $left, 'right' => $right]
+ ;
+ }
+
+ private function getLeftSideCompareFixableInfo(Tokens $tokens, int $index): array
+ {
+ return [
+ 'start' => $this->findComparisonStart($tokens, $index),
+ 'end' => $tokens->getPrevMeaningfulToken($index),
+ ];
+ }
+
+ private function getRightSideCompareFixableInfo(Tokens $tokens, int $index): array
+ {
+ return [
+ 'start' => $tokens->getNextMeaningfulToken($index),
+ 'end' => $this->findComparisonEnd($tokens, $index),
+ ];
+ }
+
+ private function isListStatement(Tokens $tokens, int $index, int $end): bool
+ {
+ for ($i = $index; $i <= $end; ++$i) {
+ if ($tokens[$i]->isGivenKind([T_LIST, CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN, CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given token has a lower precedence than `T_IS_EQUAL`
+ * or `T_IS_IDENTICAL`.
+ *
+ * @param Token $token The token to check
+ *
+ * @return bool Whether the token has a lower precedence
+ */
+ private function isOfLowerPrecedence(Token $token): bool
+ {
+ static $tokens;
+
+ if (null === $tokens) {
+ $tokens = [
+ T_BOOLEAN_AND, // &&
+ T_BOOLEAN_OR, // ||
+ T_CASE, // case
+ T_DOUBLE_ARROW, // =>
+ T_ECHO, // echo
+ T_GOTO, // goto
+ T_LOGICAL_AND, // and
+ T_LOGICAL_OR, // or
+ T_LOGICAL_XOR, // xor
+ T_OPEN_TAG, // <?php
+ T_OPEN_TAG_WITH_ECHO,
+ T_PRINT, // print
+ T_RETURN, // return
+ T_THROW, // throw
+ T_COALESCE,
+ T_YIELD, // yield
+ ];
+ }
+
+ static $otherTokens = [
+ // bitwise and, or, xor
+ '&', '|', '^',
+ // ternary operators
+ '?', ':',
+ // end of PHP statement
+ ',', ';',
+ ];
+
+ return $this->isOfLowerPrecedenceAssignment($token) || $token->isGivenKind($tokens) || $token->equalsAny($otherTokens);
+ }
+
+ /**
+ * Checks whether the given assignment token has a lower precedence than `T_IS_EQUAL`
+ * or `T_IS_IDENTICAL`.
+ */
+ private function isOfLowerPrecedenceAssignment(Token $token): bool
+ {
+ static $tokens;
+
+ if (null === $tokens) {
+ $tokens = [
+ T_AND_EQUAL, // &=
+ T_CONCAT_EQUAL, // .=
+ T_DIV_EQUAL, // /=
+ T_MINUS_EQUAL, // -=
+ T_MOD_EQUAL, // %=
+ T_MUL_EQUAL, // *=
+ T_OR_EQUAL, // |=
+ T_PLUS_EQUAL, // +=
+ T_POW_EQUAL, // **=
+ T_SL_EQUAL, // <<=
+ T_SR_EQUAL, // >>=
+ T_XOR_EQUAL, // ^=
+ ];
+
+ // @TODO: drop condition when PHP 7.4+ is required
+ if (\defined('T_COALESCE_EQUAL')) {
+ $tokens[] = T_COALESCE_EQUAL; // ??=
+ }
+ }
+
+ return $token->equals('=') || $token->isGivenKind($tokens);
+ }
+
+ /**
+ * Checks whether the tokens between the given start and end describe a
+ * variable.
+ *
+ * @param Tokens $tokens The token list
+ * @param int $start The first index of the possible variable
+ * @param int $end The last index of the possible variable
+ * @param bool $strict Enable strict variable detection
+ *
+ * @return bool Whether the tokens describe a variable
+ */
+ private function isVariable(Tokens $tokens, int $start, int $end, bool $strict): bool
+ {
+ $tokenAnalyzer = new TokensAnalyzer($tokens);
+
+ if ($start === $end) {
+ return $tokens[$start]->isGivenKind(T_VARIABLE);
+ }
+
+ if ($tokens[$start]->equals('(')) {
+ return true;
+ }
+
+ if ($strict) {
+ for ($index = $start; $index <= $end; ++$index) {
+ if (
+ $tokens[$index]->isCast()
+ || $tokens[$index]->isGivenKind(T_INSTANCEOF)
+ || $tokens[$index]->equals('!')
+ || $tokenAnalyzer->isBinaryOperator($index)
+ ) {
+ return false;
+ }
+ }
+ }
+
+ $index = $start;
+
+ // handle multiple braces around statement ((($a === 1)))
+ while (
+ $tokens[$index]->equals('(')
+ && $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index) === $end
+ ) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ $end = $tokens->getPrevMeaningfulToken($end);
+ }
+
+ $expectString = false;
+
+ while ($index <= $end) {
+ $current = $tokens[$index];
+ if ($current->isComment() || $current->isWhitespace() || $tokens->isEmptyAt($index)) {
+ ++$index;
+
+ continue;
+ }
+
+ // check if this is the last token
+ if ($index === $end) {
+ return $current->isGivenKind($expectString ? T_STRING : T_VARIABLE);
+ }
+
+ if ($current->isGivenKind([T_LIST, CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN, CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE])) {
+ return false;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ $next = $tokens[$nextIndex];
+
+ // self:: or ClassName::
+ if ($current->isGivenKind(T_STRING) && $next->isGivenKind(T_DOUBLE_COLON)) {
+ $index = $tokens->getNextMeaningfulToken($nextIndex);
+
+ continue;
+ }
+
+ // \ClassName
+ if ($current->isGivenKind(T_NS_SEPARATOR) && $next->isGivenKind(T_STRING)) {
+ $index = $nextIndex;
+
+ continue;
+ }
+
+ // ClassName\
+ if ($current->isGivenKind(T_STRING) && $next->isGivenKind(T_NS_SEPARATOR)) {
+ $index = $nextIndex;
+
+ continue;
+ }
+
+ // $a-> or a-> (as in $b->a->c)
+ if ($current->isGivenKind([T_STRING, T_VARIABLE]) && $next->isObjectOperator()) {
+ $index = $tokens->getNextMeaningfulToken($nextIndex);
+ $expectString = true;
+
+ continue;
+ }
+
+ // $a[...], a[...] (as in $c->a[$b]), $a{...} or a{...} (as in $c->a{$b})
+ if (
+ $current->isGivenKind($expectString ? T_STRING : T_VARIABLE)
+ && $next->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN, '{']])
+ ) {
+ $index = $tokens->findBlockEnd(
+ $next->equals('[') ? Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE : Tokens::BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE,
+ $nextIndex
+ );
+
+ if ($index === $end) {
+ return true;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$index]->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN, '{']]) && !$tokens[$index]->isObjectOperator()) {
+ return false;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+ $expectString = true;
+
+ continue;
+ }
+
+ // $a(...) or $a->b(...)
+ if ($strict && $current->isGivenKind([T_STRING, T_VARIABLE]) && $next->equals('(')) {
+ return false;
+ }
+
+ // {...} (as in $a->{$b})
+ if ($expectString && $current->isGivenKind(CT::T_DYNAMIC_PROP_BRACE_OPEN)) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_DYNAMIC_PROP_BRACE, $index);
+ if ($index === $end) {
+ return true;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$index]->isObjectOperator()) {
+ return false;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+ $expectString = true;
+
+ continue;
+ }
+
+ break;
+ }
+
+ return !$this->isConstant($tokens, $start, $end);
+ }
+
+ private function isConstant(Tokens $tokens, int $index, int $end): bool
+ {
+ $expectArrayOnly = false;
+ $expectNumberOnly = false;
+ $expectNothing = false;
+
+ for (; $index <= $end; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isComment() || $token->isWhitespace()) {
+ continue;
+ }
+
+ if ($expectNothing) {
+ return false;
+ }
+
+ if ($expectArrayOnly) {
+ if ($token->equalsAny(['(', ')', [CT::T_ARRAY_SQUARE_BRACE_CLOSE]])) {
+ continue;
+ }
+
+ return false;
+ }
+
+ if ($token->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ $expectArrayOnly = true;
+
+ continue;
+ }
+
+ if ($expectNumberOnly && !$token->isGivenKind([T_LNUMBER, T_DNUMBER])) {
+ return false;
+ }
+
+ if ($token->equals('-')) {
+ $expectNumberOnly = true;
+
+ continue;
+ }
+
+ if (
+ $token->isGivenKind([T_LNUMBER, T_DNUMBER, T_CONSTANT_ENCAPSED_STRING])
+ || $token->equalsAny([[T_STRING, 'true'], [T_STRING, 'false'], [T_STRING, 'null']])
+ ) {
+ $expectNothing = true;
+
+ continue;
+ }
+
+ return false;
+ }
+
+ return true;
+ }
+
+ private function resolveConfiguration(): void
+ {
+ $candidateTypes = [];
+ $this->candidatesMap = [];
+
+ if (null !== $this->configuration['equal']) {
+ // `==`, `!=` and `<>`
+ $candidateTypes[T_IS_EQUAL] = $this->configuration['equal'];
+ $candidateTypes[T_IS_NOT_EQUAL] = $this->configuration['equal'];
+ }
+
+ if (null !== $this->configuration['identical']) {
+ // `===` and `!==`
+ $candidateTypes[T_IS_IDENTICAL] = $this->configuration['identical'];
+ $candidateTypes[T_IS_NOT_IDENTICAL] = $this->configuration['identical'];
+ }
+
+ if (null !== $this->configuration['less_and_greater']) {
+ // `<`, `<=`, `>` and `>=`
+ $candidateTypes[T_IS_SMALLER_OR_EQUAL] = $this->configuration['less_and_greater'];
+ $this->candidatesMap[T_IS_SMALLER_OR_EQUAL] = new Token([T_IS_GREATER_OR_EQUAL, '>=']);
+
+ $candidateTypes[T_IS_GREATER_OR_EQUAL] = $this->configuration['less_and_greater'];
+ $this->candidatesMap[T_IS_GREATER_OR_EQUAL] = new Token([T_IS_SMALLER_OR_EQUAL, '<=']);
+
+ $candidateTypes['<'] = $this->configuration['less_and_greater'];
+ $this->candidatesMap['<'] = new Token('>');
+
+ $candidateTypes['>'] = $this->configuration['less_and_greater'];
+ $this->candidatesMap['>'] = new Token('<');
+ }
+
+ $this->candidateTypesConfiguration = $candidateTypes;
+ $this->candidateTypes = array_keys($candidateTypes);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DeprecatedFixerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DeprecatedFixerInterface.php
new file mode 100644
index 0000000..6d7d7e8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DeprecatedFixerInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+interface DeprecatedFixerInterface extends FixerInterface
+{
+ /**
+ * Returns names of fixers to use instead, if any.
+ *
+ * @return string[]
+ */
+ public function getSuccessorsNames(): array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php
new file mode 100644
index 0000000..f2ead59
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationArrayAssignmentFixer.php
@@ -0,0 +1,108 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\DoctrineAnnotation;
+
+use Doctrine\Common\Annotations\DocLexer;
+use PhpCsFixer\AbstractDoctrineAnnotationFixer;
+use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * Forces the configured operator for assignment in arrays in Doctrine Annotations.
+ */
+final class DoctrineAnnotationArrayAssignmentFixer extends AbstractDoctrineAnnotationFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Doctrine annotations must use configured operator for assignment in arrays.',
+ [
+ new CodeSample(
+ "<?php\n/**\n * @Foo({bar : \"baz\"})\n */\nclass Bar {}\n"
+ ),
+ new CodeSample(
+ "<?php\n/**\n * @Foo({bar = \"baz\"})\n */\nclass Bar {}\n",
+ ['operator' => ':']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before DoctrineAnnotationSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $options = parent::createConfigurationDefinition()->getOptions();
+
+ $operator = new FixerOptionBuilder('operator', 'The operator to use.');
+ $options[] = $operator
+ ->setAllowedValues(['=', ':'])
+ ->setDefault('=')
+ ->getOption()
+ ;
+
+ return new FixerConfigurationResolver($options);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function fixAnnotations(Tokens $doctrineAnnotationTokens): void
+ {
+ $scopes = [];
+ foreach ($doctrineAnnotationTokens as $token) {
+ if ($token->isType(DocLexer::T_OPEN_PARENTHESIS)) {
+ $scopes[] = 'annotation';
+
+ continue;
+ }
+
+ if ($token->isType(DocLexer::T_OPEN_CURLY_BRACES)) {
+ $scopes[] = 'array';
+
+ continue;
+ }
+
+ if ($token->isType([DocLexer::T_CLOSE_PARENTHESIS, DocLexer::T_CLOSE_CURLY_BRACES])) {
+ array_pop($scopes);
+
+ continue;
+ }
+
+ if ('array' === end($scopes) && $token->isType([DocLexer::T_EQUALS, DocLexer::T_COLON])) {
+ $token->setContent($this->configuration['operator']);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php
new file mode 100644
index 0000000..8ecbda4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationBracesFixer.php
@@ -0,0 +1,127 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\DoctrineAnnotation;
+
+use Doctrine\Common\Annotations\DocLexer;
+use PhpCsFixer\AbstractDoctrineAnnotationFixer;
+use PhpCsFixer\Doctrine\Annotation\Token;
+use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * Adds braces to Doctrine annotations when missing.
+ */
+final class DoctrineAnnotationBracesFixer extends AbstractDoctrineAnnotationFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Doctrine annotations without arguments must use the configured syntax.',
+ [
+ new CodeSample(
+ "<?php\n/**\n * @Foo()\n */\nclass Bar {}\n"
+ ),
+ new CodeSample(
+ "<?php\n/**\n * @Foo\n */\nclass Bar {}\n",
+ ['syntax' => 'with_braces']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver(array_merge(
+ parent::createConfigurationDefinition()->getOptions(),
+ [
+ (new FixerOptionBuilder('syntax', 'Whether to add or remove braces.'))
+ ->setAllowedValues(['with_braces', 'without_braces'])
+ ->setDefault('without_braces')
+ ->getOption(),
+ ]
+ ));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function fixAnnotations(Tokens $doctrineAnnotationTokens): void
+ {
+ if ('without_braces' === $this->configuration['syntax']) {
+ $this->removesBracesFromAnnotations($doctrineAnnotationTokens);
+ } else {
+ $this->addBracesToAnnotations($doctrineAnnotationTokens);
+ }
+ }
+
+ private function addBracesToAnnotations(Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$tokens[$index]->isType(DocLexer::T_AT)) {
+ continue;
+ }
+
+ $braceIndex = $tokens->getNextMeaningfulToken($index + 1);
+ if (null !== $braceIndex && $tokens[$braceIndex]->isType(DocLexer::T_OPEN_PARENTHESIS)) {
+ continue;
+ }
+
+ $tokens->insertAt($index + 2, new Token(DocLexer::T_OPEN_PARENTHESIS, '('));
+ $tokens->insertAt($index + 3, new Token(DocLexer::T_CLOSE_PARENTHESIS, ')'));
+ }
+ }
+
+ private function removesBracesFromAnnotations(Tokens $tokens): void
+ {
+ for ($index = 0, $max = \count($tokens); $index < $max; ++$index) {
+ if (!$tokens[$index]->isType(DocLexer::T_AT)) {
+ continue;
+ }
+
+ $openBraceIndex = $tokens->getNextMeaningfulToken($index + 1);
+ if (null === $openBraceIndex) {
+ continue;
+ }
+
+ if (!$tokens[$openBraceIndex]->isType(DocLexer::T_OPEN_PARENTHESIS)) {
+ continue;
+ }
+
+ $closeBraceIndex = $tokens->getNextMeaningfulToken($openBraceIndex);
+ if (null === $closeBraceIndex) {
+ continue;
+ }
+
+ if (!$tokens[$closeBraceIndex]->isType(DocLexer::T_CLOSE_PARENTHESIS)) {
+ continue;
+ }
+
+ for ($currentIndex = $index + 2; $currentIndex <= $closeBraceIndex; ++$currentIndex) {
+ $tokens[$currentIndex]->clear();
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php
new file mode 100644
index 0000000..cc7492f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationIndentationFixer.php
@@ -0,0 +1,193 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\DoctrineAnnotation;
+
+use Doctrine\Common\Annotations\DocLexer;
+use PhpCsFixer\AbstractDoctrineAnnotationFixer;
+use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+
+final class DoctrineAnnotationIndentationFixer extends AbstractDoctrineAnnotationFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Doctrine annotations must be indented with four spaces.',
+ [
+ new CodeSample("<?php\n/**\n * @Foo(\n * foo=\"foo\"\n * )\n */\nclass Bar {}\n"),
+ new CodeSample(
+ "<?php\n/**\n * @Foo({@Bar,\n * @Baz})\n */\nclass Bar {}\n",
+ ['indent_mixed_lines' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver(array_merge(
+ parent::createConfigurationDefinition()->getOptions(),
+ [
+ (new FixerOptionBuilder('indent_mixed_lines', 'Whether to indent lines that have content before closing parenthesis.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]
+ ));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function fixAnnotations(Tokens $doctrineAnnotationTokens): void
+ {
+ $annotationPositions = [];
+ for ($index = 0, $max = \count($doctrineAnnotationTokens); $index < $max; ++$index) {
+ if (!$doctrineAnnotationTokens[$index]->isType(DocLexer::T_AT)) {
+ continue;
+ }
+
+ $annotationEndIndex = $doctrineAnnotationTokens->getAnnotationEnd($index);
+ if (null === $annotationEndIndex) {
+ return;
+ }
+
+ $annotationPositions[] = [$index, $annotationEndIndex];
+ $index = $annotationEndIndex;
+ }
+
+ $indentLevel = 0;
+ foreach ($doctrineAnnotationTokens as $index => $token) {
+ if (!$token->isType(DocLexer::T_NONE) || !str_contains($token->getContent(), "\n")) {
+ continue;
+ }
+
+ if (!$this->indentationCanBeFixed($doctrineAnnotationTokens, $index, $annotationPositions)) {
+ continue;
+ }
+
+ $braces = $this->getLineBracesCount($doctrineAnnotationTokens, $index);
+ $delta = $braces[0] - $braces[1];
+ $mixedBraces = 0 === $delta && $braces[0] > 0;
+ $extraIndentLevel = 0;
+
+ if ($indentLevel > 0 && ($delta < 0 || $mixedBraces)) {
+ --$indentLevel;
+
+ if (true === $this->configuration['indent_mixed_lines'] && $this->isClosingLineWithMeaningfulContent($doctrineAnnotationTokens, $index)) {
+ $extraIndentLevel = 1;
+ }
+ }
+
+ $token->setContent(Preg::replace(
+ '/(\n( +\*)?) *$/',
+ '$1'.str_repeat(' ', 4 * ($indentLevel + $extraIndentLevel) + 1),
+ $token->getContent()
+ ));
+
+ if ($delta > 0 || $mixedBraces) {
+ ++$indentLevel;
+ }
+ }
+ }
+
+ /**
+ * @return int[]
+ */
+ private function getLineBracesCount(Tokens $tokens, int $index): array
+ {
+ $opening = 0;
+ $closing = 0;
+
+ while (isset($tokens[++$index])) {
+ $token = $tokens[$index];
+ if ($token->isType(DocLexer::T_NONE) && str_contains($token->getContent(), "\n")) {
+ break;
+ }
+
+ if ($token->isType([DocLexer::T_OPEN_PARENTHESIS, DocLexer::T_OPEN_CURLY_BRACES])) {
+ ++$opening;
+
+ continue;
+ }
+
+ if (!$token->isType([DocLexer::T_CLOSE_PARENTHESIS, DocLexer::T_CLOSE_CURLY_BRACES])) {
+ continue;
+ }
+
+ if ($opening > 0) {
+ --$opening;
+ } else {
+ ++$closing;
+ }
+ }
+
+ return [$opening, $closing];
+ }
+
+ private function isClosingLineWithMeaningfulContent(Tokens $tokens, int $index): bool
+ {
+ while (isset($tokens[++$index])) {
+ $token = $tokens[$index];
+ if ($token->isType(DocLexer::T_NONE)) {
+ if (str_contains($token->getContent(), "\n")) {
+ return false;
+ }
+
+ continue;
+ }
+
+ return !$token->isType([DocLexer::T_CLOSE_PARENTHESIS, DocLexer::T_CLOSE_CURLY_BRACES]);
+ }
+
+ return false;
+ }
+
+ /**
+ * @param array<array<int>> $annotationPositions Pairs of begin and end indexes of main annotations
+ */
+ private function indentationCanBeFixed(Tokens $tokens, int $newLineTokenIndex, array $annotationPositions): bool
+ {
+ foreach ($annotationPositions as $position) {
+ if ($newLineTokenIndex >= $position[0] && $newLineTokenIndex <= $position[1]) {
+ return true;
+ }
+ }
+
+ for ($index = $newLineTokenIndex + 1, $max = \count($tokens); $index < $max; ++$index) {
+ $token = $tokens[$index];
+
+ if (str_contains($token->getContent(), "\n")) {
+ return false;
+ }
+
+ return $tokens[$index]->isType(DocLexer::T_AT);
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php
new file mode 100644
index 0000000..bc04e75
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/DoctrineAnnotation/DoctrineAnnotationSpacesFixer.php
@@ -0,0 +1,301 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\DoctrineAnnotation;
+
+use Doctrine\Common\Annotations\DocLexer;
+use PhpCsFixer\AbstractDoctrineAnnotationFixer;
+use PhpCsFixer\Doctrine\Annotation\Token;
+use PhpCsFixer\Doctrine\Annotation\Tokens;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+
+/**
+ * Fixes spaces around commas and assignment operators in Doctrine annotations.
+ */
+final class DoctrineAnnotationSpacesFixer extends AbstractDoctrineAnnotationFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Fixes spaces in Doctrine annotations.',
+ [
+ new CodeSample(
+ "<?php\n/**\n * @Foo ( )\n */\nclass Bar {}\n\n/**\n * @Foo(\"bar\" ,\"baz\")\n */\nclass Bar2 {}\n\n/**\n * @Foo(foo = \"foo\", bar = {\"foo\":\"foo\", \"bar\"=\"bar\"})\n */\nclass Bar3 {}\n"
+ ),
+ new CodeSample(
+ "<?php\n/**\n * @Foo(foo = \"foo\", bar = {\"foo\":\"foo\", \"bar\"=\"bar\"})\n */\nclass Bar {}\n",
+ ['after_array_assignments_equals' => false, 'before_array_assignments_equals' => false]
+ ),
+ ],
+ 'There must not be any space around parentheses; commas must be preceded by no space and followed by one space; there must be no space around named arguments assignment operator; there must be one space around array assignment operator.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after DoctrineAnnotationArrayAssignmentFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver(array_merge(
+ parent::createConfigurationDefinition()->getOptions(),
+ [
+ (new FixerOptionBuilder('around_parentheses', 'Whether to fix spaces around parentheses.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('around_commas', 'Whether to fix spaces around commas.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('before_argument_assignments', 'Whether to add, remove or ignore spaces before argument assignment operator.'))
+ ->setAllowedTypes(['null', 'bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('after_argument_assignments', 'Whether to add, remove or ignore spaces after argument assignment operator.'))
+ ->setAllowedTypes(['null', 'bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('before_array_assignments_equals', 'Whether to add, remove or ignore spaces before array `=` assignment operator.'))
+ ->setAllowedTypes(['null', 'bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('after_array_assignments_equals', 'Whether to add, remove or ignore spaces after array assignment `=` operator.'))
+ ->setAllowedTypes(['null', 'bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('before_array_assignments_colon', 'Whether to add, remove or ignore spaces before array `:` assignment operator.'))
+ ->setAllowedTypes(['null', 'bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('after_array_assignments_colon', 'Whether to add, remove or ignore spaces after array assignment `:` operator.'))
+ ->setAllowedTypes(['null', 'bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]
+ ));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function fixAnnotations(Tokens $doctrineAnnotationTokens): void
+ {
+ if (true === $this->configuration['around_parentheses']) {
+ $this->fixSpacesAroundParentheses($doctrineAnnotationTokens);
+ }
+
+ if (true === $this->configuration['around_commas']) {
+ $this->fixSpacesAroundCommas($doctrineAnnotationTokens);
+ }
+
+ if (
+ null !== $this->configuration['before_argument_assignments']
+ || null !== $this->configuration['after_argument_assignments']
+ || null !== $this->configuration['before_array_assignments_equals']
+ || null !== $this->configuration['after_array_assignments_equals']
+ || null !== $this->configuration['before_array_assignments_colon']
+ || null !== $this->configuration['after_array_assignments_colon']
+ ) {
+ $this->fixAroundAssignments($doctrineAnnotationTokens);
+ }
+ }
+
+ private function fixSpacesAroundParentheses(Tokens $tokens): void
+ {
+ $inAnnotationUntilIndex = null;
+
+ foreach ($tokens as $index => $token) {
+ if (null !== $inAnnotationUntilIndex) {
+ if ($index === $inAnnotationUntilIndex) {
+ $inAnnotationUntilIndex = null;
+
+ continue;
+ }
+ } elseif ($tokens[$index]->isType(DocLexer::T_AT)) {
+ $endIndex = $tokens->getAnnotationEnd($index);
+ if (null !== $endIndex) {
+ $inAnnotationUntilIndex = $endIndex + 1;
+ }
+
+ continue;
+ }
+
+ if (null === $inAnnotationUntilIndex) {
+ continue;
+ }
+
+ if (!$token->isType([DocLexer::T_OPEN_PARENTHESIS, DocLexer::T_CLOSE_PARENTHESIS])) {
+ continue;
+ }
+
+ if ($token->isType(DocLexer::T_OPEN_PARENTHESIS)) {
+ $token = $tokens[$index - 1];
+ if ($token->isType(DocLexer::T_NONE)) {
+ $token->clear();
+ }
+
+ $token = $tokens[$index + 1];
+ } else {
+ $token = $tokens[$index - 1];
+ }
+
+ if ($token->isType(DocLexer::T_NONE)) {
+ if (str_contains($token->getContent(), "\n")) {
+ continue;
+ }
+
+ $token->clear();
+ }
+ }
+ }
+
+ private function fixSpacesAroundCommas(Tokens $tokens): void
+ {
+ $inAnnotationUntilIndex = null;
+
+ foreach ($tokens as $index => $token) {
+ if (null !== $inAnnotationUntilIndex) {
+ if ($index === $inAnnotationUntilIndex) {
+ $inAnnotationUntilIndex = null;
+
+ continue;
+ }
+ } elseif ($tokens[$index]->isType(DocLexer::T_AT)) {
+ $endIndex = $tokens->getAnnotationEnd($index);
+ if (null !== $endIndex) {
+ $inAnnotationUntilIndex = $endIndex;
+ }
+
+ continue;
+ }
+
+ if (null === $inAnnotationUntilIndex) {
+ continue;
+ }
+
+ if (!$token->isType(DocLexer::T_COMMA)) {
+ continue;
+ }
+
+ $token = $tokens[$index - 1];
+ if ($token->isType(DocLexer::T_NONE)) {
+ $token->clear();
+ }
+
+ if ($index < \count($tokens) - 1 && !Preg::match('/^\s/', $tokens[$index + 1]->getContent())) {
+ $tokens->insertAt($index + 1, new Token(DocLexer::T_NONE, ' '));
+ }
+ }
+ }
+
+ private function fixAroundAssignments(Tokens $tokens): void
+ {
+ $beforeArguments = $this->configuration['before_argument_assignments'];
+ $afterArguments = $this->configuration['after_argument_assignments'];
+ $beforeArraysEquals = $this->configuration['before_array_assignments_equals'];
+ $afterArraysEquals = $this->configuration['after_array_assignments_equals'];
+ $beforeArraysColon = $this->configuration['before_array_assignments_colon'];
+ $afterArraysColon = $this->configuration['after_array_assignments_colon'];
+
+ $scopes = [];
+ foreach ($tokens as $index => $token) {
+ $endScopeType = end($scopes);
+ if (false !== $endScopeType && $token->isType($endScopeType)) {
+ array_pop($scopes);
+
+ continue;
+ }
+
+ if ($tokens[$index]->isType(DocLexer::T_AT)) {
+ $scopes[] = DocLexer::T_CLOSE_PARENTHESIS;
+
+ continue;
+ }
+
+ if ($tokens[$index]->isType(DocLexer::T_OPEN_CURLY_BRACES)) {
+ $scopes[] = DocLexer::T_CLOSE_CURLY_BRACES;
+
+ continue;
+ }
+
+ if (DocLexer::T_CLOSE_PARENTHESIS === $endScopeType && $token->isType(DocLexer::T_EQUALS)) {
+ $this->updateSpacesAfter($tokens, $index, $afterArguments);
+ $this->updateSpacesBefore($tokens, $index, $beforeArguments);
+
+ continue;
+ }
+
+ if (DocLexer::T_CLOSE_CURLY_BRACES === $endScopeType) {
+ if ($token->isType(DocLexer::T_EQUALS)) {
+ $this->updateSpacesAfter($tokens, $index, $afterArraysEquals);
+ $this->updateSpacesBefore($tokens, $index, $beforeArraysEquals);
+
+ continue;
+ }
+
+ if ($token->isType(DocLexer::T_COLON)) {
+ $this->updateSpacesAfter($tokens, $index, $afterArraysColon);
+ $this->updateSpacesBefore($tokens, $index, $beforeArraysColon);
+ }
+ }
+ }
+ }
+
+ private function updateSpacesAfter(Tokens $tokens, int $index, ?bool $insert): void
+ {
+ $this->updateSpacesAt($tokens, $index + 1, $index + 1, $insert);
+ }
+
+ private function updateSpacesBefore(Tokens $tokens, int $index, ?bool $insert): void
+ {
+ $this->updateSpacesAt($tokens, $index - 1, $index, $insert);
+ }
+
+ private function updateSpacesAt(Tokens $tokens, int $index, int $insertIndex, ?bool $insert): void
+ {
+ if (null === $insert) {
+ return;
+ }
+
+ $token = $tokens[$index];
+ if ($insert) {
+ if (!$token->isType(DocLexer::T_NONE)) {
+ $tokens->insertAt($insertIndex, $token = new Token());
+ }
+
+ $token->setContent(' ');
+ } elseif ($token->isType(DocLexer::T_NONE)) {
+ $token->clear();
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FixerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FixerInterface.php
new file mode 100644
index 0000000..6e79741
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FixerInterface.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer;
+
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+interface FixerInterface
+{
+ /**
+ * Check if the fixer is a candidate for given Tokens collection.
+ *
+ * Fixer is a candidate when the collection contains tokens that may be fixed
+ * during fixer work. This could be considered as some kind of bloom filter.
+ * When this method returns true then to the Tokens collection may or may not
+ * need a fixing, but when this method returns false then the Tokens collection
+ * need no fixing for sure.
+ */
+ public function isCandidate(Tokens $tokens): bool;
+
+ /**
+ * Check if fixer is risky or not.
+ *
+ * Risky fixer could change code behavior!
+ */
+ public function isRisky(): bool;
+
+ /**
+ * Fixes a file.
+ *
+ * @param \SplFileInfo $file A \SplFileInfo instance
+ * @param Tokens $tokens Tokens collection
+ */
+ public function fix(\SplFileInfo $file, Tokens $tokens): void;
+
+ /**
+ * Returns the definition of the fixer.
+ */
+ public function getDefinition(): FixerDefinitionInterface;
+
+ /**
+ * Returns the name of the fixer.
+ *
+ * The name must be all lowercase and without any spaces.
+ *
+ * @return string The name of the fixer
+ */
+ public function getName(): string;
+
+ /**
+ * Returns the priority of the fixer.
+ *
+ * The default priority is 0 and higher priorities are executed first.
+ */
+ public function getPriority(): int;
+
+ /**
+ * Returns true if the file is supported by this fixer.
+ *
+ * @return bool true if the file is supported by this fixer, false otherwise
+ */
+ public function supports(\SplFileInfo $file): bool;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php
new file mode 100644
index 0000000..35e37b0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/CombineNestedDirnameFixer.php
@@ -0,0 +1,235 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan
+ */
+final class CombineNestedDirnameFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace multiple nested calls of `dirname` by only one call with second `$level` parameter. Requires PHP >= 7.0.',
+ [
+ new CodeSample(
+ "<?php\ndirname(dirname(dirname(\$path)));\n"
+ ),
+ ],
+ null,
+ 'Risky when the function `dirname` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MethodArgumentSpaceFixer, NoSpacesInsideParenthesisFixer.
+ * Must run after DirConstantFixer.
+ */
+ public function getPriority(): int
+ {
+ return 35;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $dirnameInfo = $this->getDirnameInfo($tokens, $index);
+
+ if (!$dirnameInfo) {
+ continue;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($dirnameInfo['indexes'][0]);
+
+ if (!$tokens[$prev]->equals('(')) {
+ continue;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($prev);
+
+ $firstArgumentEnd = $dirnameInfo['end'];
+
+ $dirnameInfoArray = [$dirnameInfo];
+
+ while ($dirnameInfo = $this->getDirnameInfo($tokens, $prev, $firstArgumentEnd)) {
+ $dirnameInfoArray[] = $dirnameInfo;
+
+ $prev = $tokens->getPrevMeaningfulToken($dirnameInfo['indexes'][0]);
+
+ if (!$tokens[$prev]->equals('(')) {
+ break;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($prev);
+ $firstArgumentEnd = $dirnameInfo['end'];
+ }
+
+ if (\count($dirnameInfoArray) > 1) {
+ $this->combineDirnames($tokens, $dirnameInfoArray);
+ }
+
+ $index = $prev;
+ }
+ }
+
+ /**
+ * @param int $index Index of `dirname`
+ * @param null|int $firstArgumentEndIndex Index of last token of first argument of `dirname` call
+ *
+ * @return array|bool `false` when it is not a (supported) `dirname` call, an array with info about the dirname call otherwise
+ */
+ private function getDirnameInfo(Tokens $tokens, int $index, ?int $firstArgumentEndIndex = null)
+ {
+ if (!$tokens[$index]->equals([T_STRING, 'dirname'], false)) {
+ return false;
+ }
+
+ if (!(new FunctionsAnalyzer())->isGlobalFunctionCall($tokens, $index)) {
+ return false;
+ }
+
+ $info = ['indexes' => []];
+
+ $prev = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prev]->isGivenKind(T_NS_SEPARATOR)) {
+ $info['indexes'][] = $prev;
+ }
+
+ $info['indexes'][] = $index;
+
+ // opening parenthesis "("
+ $next = $tokens->getNextMeaningfulToken($index);
+ $info['indexes'][] = $next;
+
+ if (null !== $firstArgumentEndIndex) {
+ $next = $tokens->getNextMeaningfulToken($firstArgumentEndIndex);
+ } else {
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if ($tokens[$next]->equals(')')) {
+ return false;
+ }
+
+ while (!$tokens[$next]->equalsAny([',', ')'])) {
+ $blockType = Tokens::detectBlockType($tokens[$next]);
+
+ if (null !== $blockType) {
+ $next = $tokens->findBlockEnd($blockType['type'], $next);
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+ }
+ }
+
+ $info['indexes'][] = $next;
+
+ if ($tokens[$next]->equals(',')) {
+ $next = $tokens->getNextMeaningfulToken($next);
+ $info['indexes'][] = $next;
+ }
+
+ if ($tokens[$next]->equals(')')) {
+ $info['levels'] = 1;
+ $info['end'] = $next;
+
+ return $info;
+ }
+
+ if (!$tokens[$next]->isGivenKind(T_LNUMBER)) {
+ return false;
+ }
+
+ $info['secondArgument'] = $next;
+ $info['levels'] = (int) $tokens[$next]->getContent();
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ if ($tokens[$next]->equals(',')) {
+ $info['indexes'][] = $next;
+ $next = $tokens->getNextMeaningfulToken($next);
+ }
+
+ if (!$tokens[$next]->equals(')')) {
+ return false;
+ }
+
+ $info['indexes'][] = $next;
+ $info['end'] = $next;
+
+ return $info;
+ }
+
+ private function combineDirnames(Tokens $tokens, array $dirnameInfoArray): void
+ {
+ $outerDirnameInfo = array_pop($dirnameInfoArray);
+ $levels = $outerDirnameInfo['levels'];
+
+ foreach ($dirnameInfoArray as $dirnameInfo) {
+ $levels += $dirnameInfo['levels'];
+
+ foreach ($dirnameInfo['indexes'] as $index) {
+ $tokens->removeLeadingWhitespace($index);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+ }
+
+ $levelsToken = new Token([T_LNUMBER, (string) $levels]);
+
+ if (isset($outerDirnameInfo['secondArgument'])) {
+ $tokens[$outerDirnameInfo['secondArgument']] = $levelsToken;
+ } else {
+ $prev = $tokens->getPrevMeaningfulToken($outerDirnameInfo['end']);
+ $items = [];
+ if (!$tokens[$prev]->equals(',')) {
+ $items = [new Token(','), new Token([T_WHITESPACE, ' '])];
+ }
+ $items[] = $levelsToken;
+ $tokens->insertAt($outerDirnameInfo['end'], $items);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagOrderFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagOrderFixer.php
new file mode 100644
index 0000000..15b0174
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagOrderFixer.php
@@ -0,0 +1,126 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFopenFlagFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class FopenFlagOrderFixer extends AbstractFopenFlagFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Order the flags in `fopen` calls, `b` and `t` must be last.',
+ [new CodeSample("<?php\n\$a = fopen(\$foo, 'br+');\n")],
+ null,
+ 'Risky when the function `fopen` is overridden.'
+ );
+ }
+
+ protected function fixFopenFlagToken(Tokens $tokens, int $argumentStartIndex, int $argumentEndIndex): void
+ {
+ $argumentFlagIndex = null;
+
+ for ($i = $argumentStartIndex; $i <= $argumentEndIndex; ++$i) {
+ if ($tokens[$i]->isGivenKind([T_WHITESPACE, T_COMMENT, T_DOC_COMMENT])) {
+ continue;
+ }
+
+ if (null !== $argumentFlagIndex) {
+ return; // multiple meaningful tokens found, no candidate for fixing
+ }
+
+ $argumentFlagIndex = $i;
+ }
+
+ // check if second argument is candidate
+ if (null === $argumentFlagIndex || !$tokens[$argumentFlagIndex]->isGivenKind(T_CONSTANT_ENCAPSED_STRING)) {
+ return;
+ }
+
+ $content = $tokens[$argumentFlagIndex]->getContent();
+ $contentQuote = $content[0]; // `'`, `"`, `b` or `B`
+
+ if ('b' === $contentQuote || 'B' === $contentQuote) {
+ $binPrefix = $contentQuote;
+ $contentQuote = $content[1]; // `'` or `"`
+ $mode = substr($content, 2, -1);
+ } else {
+ $binPrefix = '';
+ $mode = substr($content, 1, -1);
+ }
+
+ $modeLength = \strlen($mode);
+ if ($modeLength < 2) {
+ return; // nothing to sort
+ }
+
+ if (false === $this->isValidModeString($mode)) {
+ return;
+ }
+
+ $split = $this->sortFlags(Preg::split('#([^\+]\+?)#', $mode, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE));
+ $newContent = $binPrefix.$contentQuote.implode('', $split).$contentQuote;
+
+ if ($content !== $newContent) {
+ $tokens[$argumentFlagIndex] = new Token([T_CONSTANT_ENCAPSED_STRING, $newContent]);
+ }
+ }
+
+ /**
+ * @param string[] $flags
+ *
+ * @return string[]
+ */
+ private function sortFlags(array $flags): array
+ {
+ usort(
+ $flags,
+ static function (string $flag1, string $flag2): int {
+ if ($flag1 === $flag2) {
+ return 0;
+ }
+
+ if ('b' === $flag1) {
+ return 1;
+ }
+
+ if ('b' === $flag2) {
+ return -1;
+ }
+
+ if ('t' === $flag1) {
+ return 1;
+ }
+
+ if ('t' === $flag2) {
+ return -1;
+ }
+
+ return $flag1 < $flag2 ? -1 : 1;
+ }
+ );
+
+ return $flags;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php
new file mode 100644
index 0000000..55412a1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FopenFlagsFixer.php
@@ -0,0 +1,112 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFopenFlagFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class FopenFlagsFixer extends AbstractFopenFlagFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The flags in `fopen` calls must omit `t`, and `b` must be omitted or included consistently.',
+ [
+ new CodeSample("<?php\n\$a = fopen(\$foo, 'rwt');\n"),
+ new CodeSample("<?php\n\$a = fopen(\$foo, 'rwt');\n", ['b_mode' => false]),
+ ],
+ null,
+ 'Risky when the function `fopen` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('b_mode', 'The `b` flag must be used (`true`) or omitted (`false`).'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ protected function fixFopenFlagToken(Tokens $tokens, int $argumentStartIndex, int $argumentEndIndex): void
+ {
+ $argumentFlagIndex = null;
+
+ for ($i = $argumentStartIndex; $i <= $argumentEndIndex; ++$i) {
+ if ($tokens[$i]->isGivenKind([T_WHITESPACE, T_COMMENT, T_DOC_COMMENT])) {
+ continue;
+ }
+
+ if (null !== $argumentFlagIndex) {
+ return; // multiple meaningful tokens found, no candidate for fixing
+ }
+
+ $argumentFlagIndex = $i;
+ }
+
+ // check if second argument is candidate
+ if (null === $argumentFlagIndex || !$tokens[$argumentFlagIndex]->isGivenKind(T_CONSTANT_ENCAPSED_STRING)) {
+ return;
+ }
+
+ $content = $tokens[$argumentFlagIndex]->getContent();
+ $contentQuote = $content[0]; // `'`, `"`, `b` or `B`
+
+ if ('b' === $contentQuote || 'B' === $contentQuote) {
+ $binPrefix = $contentQuote;
+ $contentQuote = $content[1]; // `'` or `"`
+ $mode = substr($content, 2, -1);
+ } else {
+ $binPrefix = '';
+ $mode = substr($content, 1, -1);
+ }
+
+ if (false === $this->isValidModeString($mode)) {
+ return;
+ }
+
+ $mode = str_replace('t', '', $mode);
+
+ if (true === $this->configuration['b_mode']) {
+ if (!str_contains($mode, 'b')) {
+ $mode .= 'b';
+ }
+ } else {
+ $mode = str_replace('b', '', $mode);
+ }
+
+ $newContent = $binPrefix.$contentQuote.$mode.$contentQuote;
+
+ if ($content !== $newContent) {
+ $tokens[$argumentFlagIndex] = new Token([T_CONSTANT_ENCAPSED_STRING, $newContent]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php
new file mode 100644
index 0000000..f5008d3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionDeclarationFixer.php
@@ -0,0 +1,231 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * Fixer for rules defined in PSR2 generally (¶1 and ¶6).
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class FunctionDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const SPACING_NONE = 'none';
+
+ /**
+ * @internal
+ */
+ public const SPACING_ONE = 'one';
+
+ private const SUPPORTED_SPACINGS = [self::SPACING_NONE, self::SPACING_ONE];
+
+ /**
+ * @var string
+ */
+ private $singleLineWhitespaceOptions = " \t";
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_FUNCTION) || (\PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_FN));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Spaces should be properly placed in a function declaration.',
+ [
+ new CodeSample(
+ '<?php
+
+class Foo
+{
+ public static function bar ( $baz , $foo )
+ {
+ return false;
+ }
+}
+
+function foo ($bar, $baz)
+{
+ return false;
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+$f = function () {};
+',
+ ['closure_function_spacing' => self::SPACING_NONE]
+ ),
+ new VersionSpecificCodeSample(
+ '<?php
+$f = fn () => null;
+',
+ new VersionSpecification(70400),
+ ['closure_function_spacing' => self::SPACING_NONE]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MethodArgumentSpaceFixer.
+ * Must run after SingleSpaceAfterConstructFixer.
+ */
+ public function getPriority(): int
+ {
+ return 31;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (
+ !$token->isGivenKind(T_FUNCTION)
+ && (\PHP_VERSION_ID < 70400 || !$token->isGivenKind(T_FN))
+ ) {
+ continue;
+ }
+
+ $startParenthesisIndex = $tokens->getNextTokenOfKind($index, ['(', ';', [T_CLOSE_TAG]]);
+ if (!$tokens[$startParenthesisIndex]->equals('(')) {
+ continue;
+ }
+
+ $endParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startParenthesisIndex);
+ $startBraceIndex = $tokens->getNextTokenOfKind($endParenthesisIndex, [';', '{', [T_DOUBLE_ARROW]]);
+
+ // fix single-line whitespace before { or =>
+ // eg: `function foo(){}` => `function foo() {}`
+ // eg: `function foo() {}` => `function foo() {}`
+ // eg: `fn() =>` => `fn() =>`
+ if (
+ $tokens[$startBraceIndex]->equalsAny(['{', [T_DOUBLE_ARROW]])
+ && (
+ !$tokens[$startBraceIndex - 1]->isWhitespace()
+ || $tokens[$startBraceIndex - 1]->isWhitespace($this->singleLineWhitespaceOptions)
+ )
+ ) {
+ $tokens->ensureWhitespaceAtIndex($startBraceIndex - 1, 1, ' ');
+ }
+
+ $afterParenthesisIndex = $tokens->getNextNonWhitespace($endParenthesisIndex);
+ $afterParenthesisToken = $tokens[$afterParenthesisIndex];
+
+ if ($afterParenthesisToken->isGivenKind(CT::T_USE_LAMBDA)) {
+ // fix whitespace after CT:T_USE_LAMBDA (we might add a token, so do this before determining start and end parenthesis)
+ $tokens->ensureWhitespaceAtIndex($afterParenthesisIndex + 1, 0, ' ');
+
+ $useStartParenthesisIndex = $tokens->getNextTokenOfKind($afterParenthesisIndex, ['(']);
+ $useEndParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $useStartParenthesisIndex);
+
+ // remove single-line edge whitespaces inside use parentheses
+ $this->fixParenthesisInnerEdge($tokens, $useStartParenthesisIndex, $useEndParenthesisIndex);
+
+ // fix whitespace before CT::T_USE_LAMBDA
+ $tokens->ensureWhitespaceAtIndex($afterParenthesisIndex - 1, 1, ' ');
+ }
+
+ // remove single-line edge whitespaces inside parameters list parentheses
+ $this->fixParenthesisInnerEdge($tokens, $startParenthesisIndex, $endParenthesisIndex);
+
+ $isLambda = $tokensAnalyzer->isLambda($index);
+
+ // remove whitespace before (
+ // eg: `function foo () {}` => `function foo() {}`
+ if (!$isLambda && $tokens[$startParenthesisIndex - 1]->isWhitespace() && !$tokens[$tokens->getPrevNonWhitespace($startParenthesisIndex - 1)]->isComment()) {
+ $tokens->clearAt($startParenthesisIndex - 1);
+ }
+
+ if ($isLambda && self::SPACING_NONE === $this->configuration['closure_function_spacing']) {
+ // optionally remove whitespace after T_FUNCTION of a closure
+ // eg: `function () {}` => `function() {}`
+ if ($tokens[$index + 1]->isWhitespace()) {
+ $tokens->clearAt($index + 1);
+ }
+ } else {
+ // otherwise, enforce whitespace after T_FUNCTION
+ // eg: `function foo() {}` => `function foo() {}`
+ $tokens->ensureWhitespaceAtIndex($index + 1, 0, ' ');
+ }
+
+ if ($isLambda) {
+ $prev = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prev]->isGivenKind(T_STATIC)) {
+ // fix whitespace after T_STATIC
+ // eg: `$a = static function(){};` => `$a = static function(){};`
+ $tokens->ensureWhitespaceAtIndex($prev + 1, 0, ' ');
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('closure_function_spacing', 'Spacing to use before open parenthesis for closures.'))
+ ->setDefault(self::SPACING_ONE)
+ ->setAllowedValues(self::SUPPORTED_SPACINGS)
+ ->getOption(),
+ ]);
+ }
+
+ private function fixParenthesisInnerEdge(Tokens $tokens, int $start, int $end): void
+ {
+ // remove single-line whitespace before )
+ if ($tokens[$end - 1]->isWhitespace($this->singleLineWhitespaceOptions)) {
+ $tokens->clearAt($end - 1);
+ }
+
+ // remove single-line whitespace after (
+ if ($tokens[$start + 1]->isWhitespace($this->singleLineWhitespaceOptions)) {
+ $tokens->clearAt($start + 1);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionTypehintSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionTypehintSpaceFixer.php
new file mode 100644
index 0000000..53a03eb
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/FunctionTypehintSpaceFixer.php
@@ -0,0 +1,86 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\TypeAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class FunctionTypehintSpaceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Ensure single space between function\'s argument and its typehint.',
+ [
+ new CodeSample("<?php\nfunction sample(array\$a)\n{}\n"),
+ new CodeSample("<?php\nfunction sample(array \$a)\n{}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ if (\PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_FN)) {
+ return true;
+ }
+
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (
+ !$token->isGivenKind(T_FUNCTION)
+ && (\PHP_VERSION_ID < 70400 || !$token->isGivenKind(T_FN))
+ ) {
+ continue;
+ }
+
+ $arguments = $functionsAnalyzer->getFunctionArguments($tokens, $index);
+
+ foreach (array_reverse($arguments) as $argument) {
+ $type = $argument->getTypeAnalysis();
+
+ if (!$type instanceof TypeAnalysis) {
+ continue;
+ }
+
+ $tokens->ensureWhitespaceAtIndex($type->getEndIndex() + 1, 0, ' ');
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ImplodeCallFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ImplodeCallFixer.php
new file mode 100644
index 0000000..166482d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ImplodeCallFixer.php
@@ -0,0 +1,151 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class ImplodeCallFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Function `implode` must be called with 2 arguments in the documented order.',
+ [
+ new CodeSample("<?php\nimplode(\$pieces, '');\n"),
+ new CodeSample("<?php\nimplode(\$pieces);\n"),
+ ],
+ null,
+ 'Risky when the function `implode` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MethodArgumentSpaceFixer.
+ * Must run after NoAliasFunctionsFixer.
+ */
+ public function getPriority(): int
+ {
+ return 37;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = \count($tokens) - 1; $index > 0; --$index) {
+ if (!$tokens[$index]->equals([T_STRING, 'implode'], false)) {
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ $argumentsIndices = $this->getArgumentIndices($tokens, $index);
+
+ if (1 === \count($argumentsIndices)) {
+ $firstArgumentIndex = key($argumentsIndices);
+ $tokens->insertAt($firstArgumentIndex, [
+ new Token([T_CONSTANT_ENCAPSED_STRING, "''"]),
+ new Token(','),
+ new Token([T_WHITESPACE, ' ']),
+ ]);
+
+ continue;
+ }
+
+ if (2 === \count($argumentsIndices)) {
+ [$firstArgumentIndex, $secondArgumentIndex] = array_keys($argumentsIndices);
+
+ // If the first argument is string we have nothing to do
+ if ($tokens[$firstArgumentIndex]->isGivenKind(T_CONSTANT_ENCAPSED_STRING)) {
+ continue;
+ }
+ // If the second argument is not string we cannot make a swap
+ if (!$tokens[$secondArgumentIndex]->isGivenKind(T_CONSTANT_ENCAPSED_STRING)) {
+ continue;
+ }
+
+ // collect tokens from first argument
+ $firstArgumentEndIndex = $argumentsIndices[key($argumentsIndices)];
+ $newSecondArgumentTokens = [];
+ for ($i = key($argumentsIndices); $i <= $firstArgumentEndIndex; ++$i) {
+ $newSecondArgumentTokens[] = clone $tokens[$i];
+ $tokens->clearAt($i);
+ }
+
+ $tokens->insertAt($firstArgumentIndex, clone $tokens[$secondArgumentIndex]);
+
+ // insert above increased the second argument index
+ ++$secondArgumentIndex;
+ $tokens->clearAt($secondArgumentIndex);
+ $tokens->insertAt($secondArgumentIndex, $newSecondArgumentTokens);
+ }
+ }
+ }
+
+ /**
+ * @return array<int, int> In the format: startIndex => endIndex
+ */
+ private function getArgumentIndices(Tokens $tokens, int $functionNameIndex): array
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ $openParenthesis = $tokens->getNextTokenOfKind($functionNameIndex, ['(']);
+ $closeParenthesis = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openParenthesis);
+
+ $indices = [];
+
+ foreach ($argumentsAnalyzer->getArguments($tokens, $openParenthesis, $closeParenthesis) as $startIndexCandidate => $endIndex) {
+ $indices[$tokens->getNextMeaningfulToken($startIndexCandidate - 1)] = $tokens->getPrevMeaningfulToken($endIndex + 1);
+ }
+
+ return $indices;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/LambdaNotUsedImportFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/LambdaNotUsedImportFixer.php
new file mode 100644
index 0000000..d0e73f9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/LambdaNotUsedImportFixer.php
@@ -0,0 +1,346 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+final class LambdaNotUsedImportFixer extends AbstractFixer
+{
+ /**
+ * @var ArgumentsAnalyzer
+ */
+ private $argumentsAnalyzer;
+
+ /**
+ * @var FunctionsAnalyzer
+ */
+ private $functionAnalyzer;
+
+ /**
+ * @var TokensAnalyzer
+ */
+ private $tokensAnalyzer;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Lambda must not import variables it doesn\'t use.',
+ [new CodeSample("<?php\n\$foo = function() use (\$bar) {};\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoSpacesInsideParenthesisFixer.
+ */
+ public function getPriority(): int
+ {
+ return 3;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_FUNCTION, CT::T_USE_LAMBDA]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->argumentsAnalyzer = new ArgumentsAnalyzer();
+ $this->functionAnalyzer = new FunctionsAnalyzer();
+ $this->tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 4; $index > 0; --$index) {
+ $lambdaUseIndex = $this->getLambdaUseIndex($tokens, $index);
+
+ if (false !== $lambdaUseIndex) {
+ $this->fixLambda($tokens, $lambdaUseIndex);
+ }
+ }
+ }
+
+ private function fixLambda(Tokens $tokens, int $lambdaUseIndex): void
+ {
+ $lambdaUseOpenBraceIndex = $tokens->getNextTokenOfKind($lambdaUseIndex, ['(']);
+ $lambdaUseCloseBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $lambdaUseOpenBraceIndex);
+ $arguments = $this->argumentsAnalyzer->getArguments($tokens, $lambdaUseOpenBraceIndex, $lambdaUseCloseBraceIndex);
+
+ $imports = $this->filterArguments($tokens, $arguments);
+
+ if (0 === \count($imports)) {
+ return; // no imports to remove
+ }
+
+ $notUsedImports = $this->findNotUsedLambdaImports($tokens, $imports, $lambdaUseCloseBraceIndex);
+ $notUsedImportsCount = \count($notUsedImports);
+
+ if (0 === $notUsedImportsCount) {
+ return; // no not used imports found
+ }
+
+ if ($notUsedImportsCount === \count($arguments)) {
+ $this->clearImportsAndUse($tokens, $lambdaUseIndex, $lambdaUseCloseBraceIndex); // all imports are not used
+
+ return;
+ }
+
+ $this->clearImports($tokens, array_reverse($notUsedImports));
+ }
+
+ private function findNotUsedLambdaImports(Tokens $tokens, array $imports, int $lambdaUseCloseBraceIndex): array
+ {
+ static $riskyKinds = [
+ CT::T_DYNAMIC_VAR_BRACE_OPEN,
+ T_EVAL,
+ T_INCLUDE,
+ T_INCLUDE_ONCE,
+ T_REQUIRE,
+ T_REQUIRE_ONCE,
+ ];
+
+ // figure out where the lambda starts ...
+ $lambdaOpenIndex = $tokens->getNextTokenOfKind($lambdaUseCloseBraceIndex, ['{']);
+ $curlyBracesLevel = 0;
+
+ for ($index = $lambdaOpenIndex;; ++$index) { // go through the body of the lambda and keep count of the (possible) usages of the imported variables
+ $token = $tokens[$index];
+
+ if ($token->equals('{')) {
+ ++$curlyBracesLevel;
+
+ continue;
+ }
+
+ if ($token->equals('}')) {
+ --$curlyBracesLevel;
+
+ if (0 === $curlyBracesLevel) {
+ break;
+ }
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_STRING) && 'compact' === strtolower($token->getContent()) && $this->functionAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ return []; // wouldn't touch it with a ten-foot pole
+ }
+
+ if ($token->isGivenKind($riskyKinds)) {
+ return [];
+ }
+
+ if ($token->equals('$')) {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$nextIndex]->isGivenKind(T_VARIABLE)) {
+ return []; // "$$a" case
+ }
+ }
+
+ if ($token->isGivenKind(T_VARIABLE)) {
+ $content = $token->getContent();
+
+ if (isset($imports[$content])) {
+ unset($imports[$content]);
+
+ if (0 === \count($imports)) {
+ return $imports;
+ }
+ }
+ }
+
+ if ($token->isGivenKind(T_STRING_VARNAME)) {
+ $content = '$'.$token->getContent();
+
+ if (isset($imports[$content])) {
+ unset($imports[$content]);
+
+ if (0 === \count($imports)) {
+ return $imports;
+ }
+ }
+ }
+
+ if ($token->isClassy()) { // is anonymous class
+ // check if used as argument in the constructor of the anonymous class
+ $index = $tokens->getNextTokenOfKind($index, ['(', '{']);
+
+ if ($tokens[$index]->equals('(')) {
+ $closeBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+ $arguments = $this->argumentsAnalyzer->getArguments($tokens, $index, $closeBraceIndex);
+
+ $imports = $this->countImportsUsedAsArgument($tokens, $imports, $arguments);
+
+ $index = $tokens->getNextTokenOfKind($closeBraceIndex, ['{']);
+ }
+
+ // skip body
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_FUNCTION)) {
+ // check if used as argument
+ $lambdaUseOpenBraceIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $lambdaUseCloseBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $lambdaUseOpenBraceIndex);
+ $arguments = $this->argumentsAnalyzer->getArguments($tokens, $lambdaUseOpenBraceIndex, $lambdaUseCloseBraceIndex);
+
+ $imports = $this->countImportsUsedAsArgument($tokens, $imports, $arguments);
+
+ // check if used as import
+ $index = $tokens->getNextTokenOfKind($index, [[CT::T_USE_LAMBDA], '{']);
+
+ if ($tokens[$index]->isGivenKind(CT::T_USE_LAMBDA)) {
+ $lambdaUseOpenBraceIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $lambdaUseCloseBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $lambdaUseOpenBraceIndex);
+ $arguments = $this->argumentsAnalyzer->getArguments($tokens, $lambdaUseOpenBraceIndex, $lambdaUseCloseBraceIndex);
+
+ $imports = $this->countImportsUsedAsArgument($tokens, $imports, $arguments);
+
+ $index = $tokens->getNextTokenOfKind($lambdaUseCloseBraceIndex, ['{']);
+ }
+
+ // skip body
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+ }
+
+ return $imports;
+ }
+
+ private function countImportsUsedAsArgument(Tokens $tokens, array $imports, array $arguments): array
+ {
+ foreach ($arguments as $start => $end) {
+ $info = $this->argumentsAnalyzer->getArgumentInfo($tokens, $start, $end);
+ $content = $info->getName();
+
+ if (isset($imports[$content])) {
+ unset($imports[$content]);
+
+ if (0 === \count($imports)) {
+ return $imports;
+ }
+ }
+ }
+
+ return $imports;
+ }
+
+ /**
+ * @return false|int
+ */
+ private function getLambdaUseIndex(Tokens $tokens, int $index)
+ {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION) || !$this->tokensAnalyzer->isLambda($index)) {
+ return false;
+ }
+
+ $lambdaUseIndex = $tokens->getNextMeaningfulToken($index); // we are @ '(' or '&' after this
+
+ if ($tokens[$lambdaUseIndex]->isGivenKind(CT::T_RETURN_REF)) {
+ $lambdaUseIndex = $tokens->getNextMeaningfulToken($lambdaUseIndex);
+ }
+
+ $lambdaUseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $lambdaUseIndex); // we are @ ')' after this
+ $lambdaUseIndex = $tokens->getNextMeaningfulToken($lambdaUseIndex);
+
+ if (!$tokens[$lambdaUseIndex]->isGivenKind(CT::T_USE_LAMBDA)) {
+ return false;
+ }
+
+ return $lambdaUseIndex;
+ }
+
+ private function filterArguments(Tokens $tokens, array $arguments): array
+ {
+ $imports = [];
+
+ foreach ($arguments as $start => $end) {
+ $info = $this->argumentsAnalyzer->getArgumentInfo($tokens, $start, $end);
+ $argument = $info->getNameIndex();
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($argument)]->equals('&')) {
+ continue;
+ }
+
+ $argumentCandidate = $tokens[$argument];
+
+ if ('$this' === $argumentCandidate->getContent()) {
+ continue;
+ }
+
+ if ($this->tokensAnalyzer->isSuperGlobal($argument)) {
+ continue;
+ }
+
+ $imports[$argumentCandidate->getContent()] = $argument;
+ }
+
+ return $imports;
+ }
+
+ private function clearImports(Tokens $tokens, array $imports): void
+ {
+ foreach ($imports as $content => $removeIndex) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($removeIndex);
+ $previousRemoveIndex = $tokens->getPrevMeaningfulToken($removeIndex);
+
+ if ($tokens[$previousRemoveIndex]->equals(',')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($previousRemoveIndex);
+ } elseif ($tokens[$previousRemoveIndex]->equals('(')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($tokens->getNextMeaningfulToken($removeIndex)); // next is always ',' here
+ }
+ }
+ }
+
+ /**
+ * Remove `use` and all imported variables.
+ */
+ private function clearImportsAndUse(Tokens $tokens, int $lambdaUseIndex, int $lambdaUseCloseBraceIndex): void
+ {
+ for ($i = $lambdaUseCloseBraceIndex; $i >= $lambdaUseIndex; --$i) {
+ if ($tokens[$i]->isComment()) {
+ continue;
+ }
+
+ if ($tokens[$i]->isWhitespace()) {
+ $previousIndex = $tokens->getPrevNonWhitespace($i);
+
+ if ($tokens[$previousIndex]->isComment()) {
+ continue;
+ }
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php
new file mode 100644
index 0000000..b3216da
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/MethodArgumentSpaceFixer.php
@@ -0,0 +1,487 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerConfiguration\InvalidOptionsForEnvException;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * Fixer for rules defined in PSR2 ¶4.4, ¶4.6.
+ *
+ * @author Kuanhung Chen <ericj.tw@gmail.com>
+ */
+final class MethodArgumentSpaceFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'In method arguments and method call, there MUST NOT be a space before each comma and there MUST be one space after each comma. Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line.',
+ [
+ new CodeSample(
+ "<?php\nfunction sample(\$a=10,\$b=20,\$c=30) {}\nsample(1, 2);\n",
+ null
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(\$a=10,\$b=20,\$c=30) {}\nsample(1, 2);\n",
+ ['keep_multiple_spaces_after_comma' => false]
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(\$a=10,\$b=20,\$c=30) {}\nsample(1, 2);\n",
+ ['keep_multiple_spaces_after_comma' => true]
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(\$a=10,\n \$b=20,\$c=30) {}\nsample(1,\n 2);\n",
+ ['on_multiline' => 'ensure_fully_multiline']
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(\n \$a=10,\n \$b=20,\n \$c=30\n) {}\nsample(\n 1,\n 2\n);\n",
+ ['on_multiline' => 'ensure_single_line']
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(\$a=10,\n \$b=20,\$c=30) {}\nsample(1, \n 2);\nsample('foo', 'foobarbaz', 'baz');\nsample('foobar', 'bar', 'baz');\n",
+ [
+ 'on_multiline' => 'ensure_fully_multiline',
+ 'keep_multiple_spaces_after_comma' => true,
+ ]
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(\$a=10,\n \$b=20,\$c=30) {}\nsample(1, \n 2);\nsample('foo', 'foobarbaz', 'baz');\nsample('foobar', 'bar', 'baz');\n",
+ [
+ 'on_multiline' => 'ensure_fully_multiline',
+ 'keep_multiple_spaces_after_comma' => false,
+ ]
+ ),
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+sample(
+ <<<EOD
+ foo
+ EOD
+ ,
+ 'bar'
+);
+
+SAMPLE
+ ,
+ new VersionSpecification(70300),
+ ['after_heredoc' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('(');
+ }
+
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if (isset($configuration['ensure_fully_multiline'])) {
+ $this->configuration['on_multiline'] = $this->configuration['ensure_fully_multiline']
+ ? 'ensure_fully_multiline'
+ : 'ignore';
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ArrayIndentationFixer.
+ * Must run after BracesFixer, CombineNestedDirnameFixer, FunctionDeclarationFixer, ImplodeCallFixer, MethodChainingIndentationFixer, NoUselessSprintfFixer, PowToExponentiationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 30;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $expectedTokens = [T_LIST, T_FUNCTION, CT::T_USE_LAMBDA];
+
+ if (\PHP_VERSION_ID >= 70400) {
+ $expectedTokens[] = T_FN;
+ }
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->equals('(')) {
+ continue;
+ }
+
+ $meaningfulTokenBeforeParenthesis = $tokens[$tokens->getPrevMeaningfulToken($index)];
+
+ if (
+ $meaningfulTokenBeforeParenthesis->isKeyword()
+ && !$meaningfulTokenBeforeParenthesis->isGivenKind($expectedTokens)
+ ) {
+ continue;
+ }
+
+ $isMultiline = $this->fixFunction($tokens, $index);
+
+ if (
+ $isMultiline
+ && 'ensure_fully_multiline' === $this->configuration['on_multiline']
+ && !$meaningfulTokenBeforeParenthesis->isGivenKind(T_LIST)
+ ) {
+ $this->ensureFunctionFullyMultiline($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('keep_multiple_spaces_after_comma', 'Whether keep multiple spaces after comma.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder(
+ 'on_multiline',
+ 'Defines how to handle function arguments lists that contain newlines.'
+ ))
+ ->setAllowedValues(['ignore', 'ensure_single_line', 'ensure_fully_multiline'])
+ ->setDefault('ensure_fully_multiline')
+ ->getOption(),
+ (new FixerOptionBuilder('after_heredoc', 'Whether the whitespace between heredoc end and comma should be removed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->setNormalizer(static function (Options $options, $value) {
+ if (\PHP_VERSION_ID < 70300 && $value) {
+ throw new InvalidOptionsForEnvException('"after_heredoc" option can only be enabled with PHP 7.3+.');
+ }
+
+ return $value;
+ })
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * Fix arguments spacing for given function.
+ *
+ * @param Tokens $tokens Tokens to handle
+ * @param int $startFunctionIndex Start parenthesis position
+ *
+ * @return bool whether the function is multiline
+ */
+ private function fixFunction(Tokens $tokens, int $startFunctionIndex): bool
+ {
+ $isMultiline = false;
+
+ $endFunctionIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startFunctionIndex);
+ $firstWhitespaceIndex = $this->findWhitespaceIndexAfterParenthesis($tokens, $startFunctionIndex, $endFunctionIndex);
+ $lastWhitespaceIndex = $this->findWhitespaceIndexAfterParenthesis($tokens, $endFunctionIndex, $startFunctionIndex);
+
+ foreach ([$firstWhitespaceIndex, $lastWhitespaceIndex] as $index) {
+ if (null === $index || !Preg::match('/\R/', $tokens[$index]->getContent())) {
+ continue;
+ }
+
+ if ('ensure_single_line' !== $this->configuration['on_multiline']) {
+ $isMultiline = true;
+
+ continue;
+ }
+
+ $newLinesRemoved = $this->ensureSingleLine($tokens, $index);
+
+ if (!$newLinesRemoved) {
+ $isMultiline = true;
+ }
+ }
+
+ for ($index = $endFunctionIndex - 1; $index > $startFunctionIndex; --$index) {
+ $token = $tokens[$index];
+
+ if ($token->equals(')')) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_CLOSE)) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals('}')) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals(',')) {
+ $this->fixSpace($tokens, $index);
+ if (!$isMultiline && $this->isNewline($tokens[$index + 1])) {
+ $isMultiline = true;
+
+ break;
+ }
+ }
+ }
+
+ return $isMultiline;
+ }
+
+ private function findWhitespaceIndexAfterParenthesis(Tokens $tokens, int $startParenthesisIndex, int $endParenthesisIndex): ?int
+ {
+ $direction = $endParenthesisIndex > $startParenthesisIndex ? 1 : -1;
+ $startIndex = $startParenthesisIndex + $direction;
+ $endIndex = $endParenthesisIndex - $direction;
+
+ for ($index = $startIndex; $index !== $endIndex; $index += $direction) {
+ $token = $tokens[$index];
+
+ if ($token->isWhitespace()) {
+ return $index;
+ }
+
+ if (!$token->isComment()) {
+ break;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @return bool Whether newlines were removed from the whitespace token
+ */
+ private function ensureSingleLine(Tokens $tokens, int $index): bool
+ {
+ $previousToken = $tokens[$index - 1];
+
+ if ($previousToken->isComment() && !str_starts_with($previousToken->getContent(), '/*')) {
+ return false;
+ }
+
+ $content = Preg::replace('/\R\h*/', '', $tokens[$index]->getContent());
+
+ if ('' !== $content) {
+ $tokens[$index] = new Token([T_WHITESPACE, $content]);
+ } else {
+ $tokens->clearAt($index);
+ }
+
+ return true;
+ }
+
+ private function ensureFunctionFullyMultiline(Tokens $tokens, int $startFunctionIndex): void
+ {
+ // find out what the indentation is
+ $searchIndex = $startFunctionIndex;
+ do {
+ $prevWhitespaceTokenIndex = $tokens->getPrevTokenOfKind(
+ $searchIndex,
+ [[T_WHITESPACE]]
+ );
+
+ $searchIndex = $prevWhitespaceTokenIndex;
+ } while (null !== $prevWhitespaceTokenIndex
+ && !str_contains($tokens[$prevWhitespaceTokenIndex]->getContent(), "\n")
+ );
+
+ if (null === $prevWhitespaceTokenIndex) {
+ $existingIndentation = '';
+ } else {
+ $existingIndentation = $tokens[$prevWhitespaceTokenIndex]->getContent();
+ $lastLineIndex = strrpos($existingIndentation, "\n");
+ $existingIndentation = false === $lastLineIndex
+ ? $existingIndentation
+ : substr($existingIndentation, $lastLineIndex + 1)
+ ;
+ }
+
+ $indentation = $existingIndentation.$this->whitespacesConfig->getIndent();
+ $endFunctionIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startFunctionIndex);
+
+ $wasWhitespaceBeforeEndFunctionAddedAsNewToken = $tokens->ensureWhitespaceAtIndex(
+ $tokens[$endFunctionIndex - 1]->isWhitespace() ? $endFunctionIndex - 1 : $endFunctionIndex,
+ 0,
+ $this->whitespacesConfig->getLineEnding().$existingIndentation
+ );
+
+ if ($wasWhitespaceBeforeEndFunctionAddedAsNewToken) {
+ ++$endFunctionIndex;
+ }
+
+ for ($index = $endFunctionIndex - 1; $index > $startFunctionIndex; --$index) {
+ $token = $tokens[$index];
+
+ // skip nested method calls and arrays
+ if ($token->equals(')')) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ continue;
+ }
+
+ // skip nested arrays
+ if ($token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_CLOSE)) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals('}')) {
+ $index = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals(',') && !$tokens[$tokens->getNextMeaningfulToken($index)]->equals(')')) {
+ $this->fixNewline($tokens, $index, $indentation);
+ }
+ }
+
+ $this->fixNewline($tokens, $startFunctionIndex, $indentation, false);
+ }
+
+ /**
+ * Method to insert newline after comma or opening parenthesis.
+ *
+ * @param int $index index of a comma
+ * @param string $indentation the indentation that should be used
+ * @param bool $override whether to override the existing character or not
+ */
+ private function fixNewline(Tokens $tokens, int $index, string $indentation, bool $override = true): void
+ {
+ if ($tokens[$index + 1]->isComment()) {
+ return;
+ }
+
+ if ($tokens[$index + 2]->isComment()) {
+ $nextMeaningfulTokenIndex = $tokens->getNextMeaningfulToken($index + 2);
+ if (!$this->isNewline($tokens[$nextMeaningfulTokenIndex - 1])) {
+ $tokens->ensureWhitespaceAtIndex($nextMeaningfulTokenIndex, 0, $this->whitespacesConfig->getLineEnding().$indentation);
+ }
+
+ return;
+ }
+
+ $nextMeaningfulTokenIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$nextMeaningfulTokenIndex]->equals(')')) {
+ return;
+ }
+
+ $tokens->ensureWhitespaceAtIndex($index + 1, 0, $this->whitespacesConfig->getLineEnding().$indentation);
+ }
+
+ /**
+ * Method to insert space after comma and remove space before comma.
+ */
+ private function fixSpace(Tokens $tokens, int $index): void
+ {
+ // remove space before comma if exist
+ if ($tokens[$index - 1]->isWhitespace()) {
+ $prevIndex = $tokens->getPrevNonWhitespace($index - 1);
+
+ if (
+ !$tokens[$prevIndex]->equals(',') && !$tokens[$prevIndex]->isComment()
+ && (true === $this->configuration['after_heredoc'] || !$tokens[$prevIndex]->isGivenKind(T_END_HEREDOC))
+ ) {
+ $tokens->clearAt($index - 1);
+ }
+ }
+
+ $nextIndex = $index + 1;
+ $nextToken = $tokens[$nextIndex];
+
+ // Two cases for fix space after comma (exclude multiline comments)
+ // 1) multiple spaces after comma
+ // 2) no space after comma
+ if ($nextToken->isWhitespace()) {
+ $newContent = $nextToken->getContent();
+
+ if ('ensure_single_line' === $this->configuration['on_multiline']) {
+ $newContent = Preg::replace('/\R/', '', $newContent);
+ }
+
+ if (
+ (false === $this->configuration['keep_multiple_spaces_after_comma'] || Preg::match('/\R/', $newContent))
+ && !$this->isCommentLastLineToken($tokens, $index + 2)
+ ) {
+ $newContent = ltrim($newContent, " \t");
+ }
+
+ $tokens[$nextIndex] = new Token([T_WHITESPACE, '' === $newContent ? ' ' : $newContent]);
+
+ return;
+ }
+
+ if (!$this->isCommentLastLineToken($tokens, $index + 1)) {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+
+ /**
+ * Check if last item of current line is a comment.
+ *
+ * @param Tokens $tokens tokens to handle
+ * @param int $index index of token
+ */
+ private function isCommentLastLineToken(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isComment() || !$tokens[$index + 1]->isWhitespace()) {
+ return false;
+ }
+
+ $content = $tokens[$index + 1]->getContent();
+
+ return $content !== ltrim($content, "\r\n");
+ }
+
+ /**
+ * Checks if token is new line.
+ */
+ private function isNewline(Token $token): bool
+ {
+ return $token->isWhitespace() && str_contains($token->getContent(), "\n");
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
new file mode 100644
index 0000000..0a77897
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php
@@ -0,0 +1,419 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ */
+final class NativeFunctionInvocationFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const SET_ALL = '@all';
+
+ /**
+ * Subset of SET_INTERNAL.
+ *
+ * Change function call to functions known to be optimized by the Zend engine.
+ * For details:
+ * - @see https://github.com/php/php-src/blob/php-7.2.6/Zend/zend_compile.c "zend_try_compile_special_func"
+ * - @see https://github.com/php/php-src/blob/php-7.2.6/ext/opcache/Optimizer/pass1_5.c
+ *
+ * @internal
+ */
+ public const SET_COMPILER_OPTIMIZED = '@compiler_optimized';
+
+ /**
+ * @internal
+ */
+ public const SET_INTERNAL = '@internal';
+
+ /**
+ * @var callable
+ */
+ private $functionFilter;
+
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->functionFilter = $this->getFunctionFilter();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Add leading `\` before function invocation to speed up resolving.',
+ [
+ new CodeSample(
+ '<?php
+
+function baz($options)
+{
+ if (!array_key_exists("foo", $options)) {
+ throw new \InvalidArgumentException();
+ }
+
+ return json_encode($options);
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+
+function baz($options)
+{
+ if (!array_key_exists("foo", $options)) {
+ throw new \InvalidArgumentException();
+ }
+
+ return json_encode($options);
+}
+',
+ [
+ 'exclude' => [
+ 'json_encode',
+ ],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+namespace space1 {
+ echo count([1]);
+}
+namespace {
+ echo count([1]);
+}
+',
+ ['scope' => 'all']
+ ),
+ new CodeSample(
+ '<?php
+namespace space1 {
+ echo count([1]);
+}
+namespace {
+ echo count([1]);
+}
+',
+ ['scope' => 'namespaced']
+ ),
+ new CodeSample(
+ '<?php
+myGlobalFunction();
+count();
+',
+ ['include' => ['myGlobalFunction']]
+ ),
+ new CodeSample(
+ '<?php
+myGlobalFunction();
+count();
+',
+ ['include' => ['@all']]
+ ),
+ new CodeSample(
+ '<?php
+myGlobalFunction();
+count();
+',
+ ['include' => ['@internal']]
+ ),
+ new CodeSample(
+ '<?php
+$a .= str_repeat($a, 4);
+$c = get_class($d);
+',
+ ['include' => ['@compiler_optimized']]
+ ),
+ ],
+ null,
+ 'Risky when any of the functions are overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GlobalNamespaceImportFixer.
+ * Must run after BacktickToShellExecFixer, RegularCallableCallFixer, StrictParamFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if ('all' === $this->configuration['scope']) {
+ $this->fixFunctionCalls($tokens, $this->functionFilter, 0, \count($tokens) - 1, false);
+
+ return;
+ }
+
+ $namespaces = (new NamespacesAnalyzer())->getDeclarations($tokens);
+
+ // 'scope' is 'namespaced' here
+ /** @var NamespaceAnalysis $namespace */
+ foreach (array_reverse($namespaces) as $namespace) {
+ $this->fixFunctionCalls($tokens, $this->functionFilter, $namespace->getScopeStartIndex(), $namespace->getScopeEndIndex(), '' === $namespace->getFullName());
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('exclude', 'List of functions to ignore.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $value): bool {
+ foreach ($value as $functionName) {
+ if (!\is_string($functionName) || '' === trim($functionName) || trim($functionName) !== $functionName) {
+ throw new InvalidOptionsException(sprintf(
+ 'Each element must be a non-empty, trimmed string, got "%s" instead.',
+ \is_object($functionName) ? \get_class($functionName) : \gettype($functionName)
+ ));
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([])
+ ->getOption(),
+ (new FixerOptionBuilder('include', 'List of function names or sets to fix. Defined sets are `@internal` (all native functions), `@all` (all global functions) and `@compiler_optimized` (functions that are specially optimized by Zend).'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $value): bool {
+ foreach ($value as $functionName) {
+ if (!\is_string($functionName) || '' === trim($functionName) || trim($functionName) !== $functionName) {
+ throw new InvalidOptionsException(sprintf(
+ 'Each element must be a non-empty, trimmed string, got "%s" instead.',
+ \is_object($functionName) ? \get_class($functionName) : \gettype($functionName)
+ ));
+ }
+
+ $sets = [
+ self::SET_ALL,
+ self::SET_INTERNAL,
+ self::SET_COMPILER_OPTIMIZED,
+ ];
+
+ if (str_starts_with($functionName, '@') && !\in_array($functionName, $sets, true)) {
+ throw new InvalidOptionsException(sprintf('Unknown set "%s", known sets are "%s".', $functionName, implode('", "', $sets)));
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([self::SET_COMPILER_OPTIMIZED])
+ ->getOption(),
+ (new FixerOptionBuilder('scope', 'Only fix function calls that are made within a namespace or fix all.'))
+ ->setAllowedValues(['all', 'namespaced'])
+ ->setDefault('all')
+ ->getOption(),
+ (new FixerOptionBuilder('strict', 'Whether leading `\` of function call not meant to have it should be removed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ private function fixFunctionCalls(Tokens $tokens, callable $functionFilter, int $start, int $end, bool $tryToRemove): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ $tokensToInsert = [];
+ for ($index = $start; $index < $end; ++$index) {
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$functionFilter($tokens[$index]->getContent()) || $tryToRemove) {
+ if (false === $this->configuration['strict']) {
+ continue;
+ }
+
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevIndex);
+ }
+
+ continue;
+ }
+
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ continue; // do not bother if previous token is already namespace separator
+ }
+
+ $tokensToInsert[$index] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+
+ $tokens->insertSlices($tokensToInsert);
+ }
+
+ private function getFunctionFilter(): callable
+ {
+ $exclude = $this->normalizeFunctionNames($this->configuration['exclude']);
+
+ if (\in_array(self::SET_ALL, $this->configuration['include'], true)) {
+ if (\count($exclude) > 0) {
+ return static function (string $functionName) use ($exclude): bool {
+ return !isset($exclude[strtolower($functionName)]);
+ };
+ }
+
+ return static function (): bool {
+ return true;
+ };
+ }
+
+ $include = [];
+
+ if (\in_array(self::SET_INTERNAL, $this->configuration['include'], true)) {
+ $include = $this->getAllInternalFunctionsNormalized();
+ } elseif (\in_array(self::SET_COMPILER_OPTIMIZED, $this->configuration['include'], true)) {
+ $include = $this->getAllCompilerOptimizedFunctionsNormalized(); // if `@internal` is set all compiler optimized function are already loaded
+ }
+
+ foreach ($this->configuration['include'] as $additional) {
+ if (!str_starts_with($additional, '@')) {
+ $include[strtolower($additional)] = true;
+ }
+ }
+
+ if (\count($exclude) > 0) {
+ return static function (string $functionName) use ($include, $exclude): bool {
+ return isset($include[strtolower($functionName)]) && !isset($exclude[strtolower($functionName)]);
+ };
+ }
+
+ return static function (string $functionName) use ($include): bool {
+ return isset($include[strtolower($functionName)]);
+ };
+ }
+
+ /**
+ * @return array<string, true> normalized function names of which the PHP compiler optimizes
+ */
+ private function getAllCompilerOptimizedFunctionsNormalized(): array
+ {
+ return $this->normalizeFunctionNames([
+ // @see https://github.com/php/php-src/blob/PHP-7.4/Zend/zend_compile.c "zend_try_compile_special_func"
+ 'array_key_exists',
+ 'array_slice',
+ 'assert',
+ 'boolval',
+ 'call_user_func',
+ 'call_user_func_array',
+ 'chr',
+ 'count',
+ 'defined',
+ 'doubleval',
+ 'floatval',
+ 'func_get_args',
+ 'func_num_args',
+ 'get_called_class',
+ 'get_class',
+ 'gettype',
+ 'in_array',
+ 'intval',
+ 'is_array',
+ 'is_bool',
+ 'is_double',
+ 'is_float',
+ 'is_int',
+ 'is_integer',
+ 'is_long',
+ 'is_null',
+ 'is_object',
+ 'is_real',
+ 'is_resource',
+ 'is_string',
+ 'ord',
+ 'strlen',
+ 'strval',
+ // @see https://github.com/php/php-src/blob/php-7.2.6/ext/opcache/Optimizer/pass1_5.c
+ 'constant',
+ 'define',
+ 'dirname',
+ 'extension_loaded',
+ 'function_exists',
+ 'is_callable',
+ ]);
+ }
+
+ /**
+ * @return array<string, true> normalized function names of all internal defined functions
+ */
+ private function getAllInternalFunctionsNormalized(): array
+ {
+ return $this->normalizeFunctionNames(get_defined_functions()['internal']);
+ }
+
+ /**
+ * @param string[] $functionNames
+ *
+ * @return array<string, true> all function names lower cased
+ */
+ private function normalizeFunctionNames(array $functionNames): array
+ {
+ foreach ($functionNames as $index => $functionName) {
+ $functionNames[strtolower($functionName)] = true;
+ unset($functionNames[$index]);
+ }
+
+ return $functionNames;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php
new file mode 100644
index 0000000..621a3b6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoSpacesAfterFunctionNameFixer.php
@@ -0,0 +1,187 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶4.6.
+ *
+ * @author Varga Bence <vbence@czentral.org>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoSpacesAfterFunctionNameFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis.',
+ [new CodeSample("<?php\nrequire ('sample.php');\necho (test (3));\nexit (1);\n\$func ();\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before FunctionToConstantFixer.
+ * Must run after PowToExponentiationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(array_merge($this->getFunctionyTokenKinds(), [T_STRING]));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionyTokens = $this->getFunctionyTokenKinds();
+ $languageConstructionTokens = $this->getLanguageConstructionTokenKinds();
+ $braceTypes = $this->getBraceAfterVariableKinds();
+
+ foreach ($tokens as $index => $token) {
+ // looking for start brace
+ if (!$token->equals('(')) {
+ continue;
+ }
+
+ // last non-whitespace token, can never be `null` always at least PHP open tag before it
+ $lastTokenIndex = $tokens->getPrevNonWhitespace($index);
+
+ // check for ternary operator
+ $endParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+ $nextNonWhiteSpace = $tokens->getNextMeaningfulToken($endParenthesisIndex);
+ if (
+ null !== $nextNonWhiteSpace
+ && $tokens[$nextNonWhiteSpace]->equals('?')
+ && $tokens[$lastTokenIndex]->isGivenKind($languageConstructionTokens)
+ ) {
+ continue;
+ }
+
+ // check if it is a function call
+ if ($tokens[$lastTokenIndex]->isGivenKind($functionyTokens)) {
+ $this->fixFunctionCall($tokens, $index);
+ } elseif ($tokens[$lastTokenIndex]->isGivenKind(T_STRING)) { // for real function calls or definitions
+ $possibleDefinitionIndex = $tokens->getPrevMeaningfulToken($lastTokenIndex);
+ if (!$tokens[$possibleDefinitionIndex]->isGivenKind(T_FUNCTION)) {
+ $this->fixFunctionCall($tokens, $index);
+ }
+ } elseif ($tokens[$lastTokenIndex]->equalsAny($braceTypes)) {
+ $block = Tokens::detectBlockType($tokens[$lastTokenIndex]);
+ if (
+ Tokens::BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE === $block['type']
+ || Tokens::BLOCK_TYPE_DYNAMIC_VAR_BRACE === $block['type']
+ || Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE === $block['type']
+ || Tokens::BLOCK_TYPE_PARENTHESIS_BRACE === $block['type']
+ ) {
+ $this->fixFunctionCall($tokens, $index);
+ }
+ }
+ }
+ }
+
+ /**
+ * Fixes whitespaces around braces of a function(y) call.
+ *
+ * @param Tokens $tokens tokens to handle
+ * @param int $index index of token
+ */
+ private function fixFunctionCall(Tokens $tokens, int $index): void
+ {
+ // remove space before opening brace
+ if ($tokens[$index - 1]->isWhitespace()) {
+ $tokens->clearAt($index - 1);
+ }
+ }
+
+ /**
+ * @return array<array|string>
+ */
+ private function getBraceAfterVariableKinds(): array
+ {
+ static $tokens = [
+ ')',
+ ']',
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ ];
+
+ return $tokens;
+ }
+
+ /**
+ * Gets the token kinds which can work as function calls.
+ *
+ * @return int[] Token names
+ */
+ private function getFunctionyTokenKinds(): array
+ {
+ static $tokens = [
+ T_ARRAY,
+ T_ECHO,
+ T_EMPTY,
+ T_EVAL,
+ T_EXIT,
+ T_INCLUDE,
+ T_INCLUDE_ONCE,
+ T_ISSET,
+ T_LIST,
+ T_PRINT,
+ T_REQUIRE,
+ T_REQUIRE_ONCE,
+ T_UNSET,
+ T_VARIABLE,
+ ];
+
+ return $tokens;
+ }
+
+ /**
+ * Gets the token kinds of actually language construction.
+ *
+ * @return int[]
+ */
+ private function getLanguageConstructionTokenKinds(): array
+ {
+ static $languageConstructionTokens = [
+ T_ECHO,
+ T_PRINT,
+ T_INCLUDE,
+ T_INCLUDE_ONCE,
+ T_REQUIRE,
+ T_REQUIRE_ONCE,
+ ];
+
+ return $languageConstructionTokens;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php
new file mode 100644
index 0000000..b54a907
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUnreachableDefaultArgumentValueFixer.php
@@ -0,0 +1,197 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Mark Scherer
+ * @author Lucas Manzke <lmanzke@outlook.com>
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class NoUnreachableDefaultArgumentValueFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'In function arguments there must not be arguments with default values before non-default ones.',
+ [
+ new CodeSample(
+ '<?php
+function example($foo = "two words", $bar) {}
+'
+ ),
+ ],
+ null,
+ 'Modifies the signature of functions; therefore risky when using systems (such as some Symfony components) that rely on those (for example through reflection).'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NullableTypeDeclarationForDefaultNullValueFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ if (\PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_FN)) {
+ return true;
+ }
+
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($i = 0, $l = $tokens->count(); $i < $l; ++$i) {
+ if (
+ !$tokens[$i]->isGivenKind(T_FUNCTION)
+ && (\PHP_VERSION_ID < 70400 || !$tokens[$i]->isGivenKind(T_FN))
+ ) {
+ continue;
+ }
+
+ $startIndex = $tokens->getNextTokenOfKind($i, ['(']);
+ $i = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startIndex);
+
+ $this->fixFunctionDefinition($tokens, $startIndex, $i);
+ }
+ }
+
+ private function fixFunctionDefinition(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $lastArgumentIndex = $this->getLastNonDefaultArgumentIndex($tokens, $startIndex, $endIndex);
+
+ if (null === $lastArgumentIndex) {
+ return;
+ }
+
+ for ($i = $lastArgumentIndex; $i > $startIndex; --$i) {
+ $token = $tokens[$i];
+
+ if ($token->isGivenKind(T_VARIABLE)) {
+ $lastArgumentIndex = $i;
+
+ continue;
+ }
+
+ if (!$token->equals('=') || $this->isNonNullableTypehintedNullableVariable($tokens, $i)) {
+ continue;
+ }
+
+ $endIndex = $tokens->getPrevTokenOfKind($lastArgumentIndex, [',']);
+ $endIndex = $tokens->getPrevMeaningfulToken($endIndex);
+ $this->removeDefaultArgument($tokens, $i, $endIndex);
+ }
+ }
+
+ private function getLastNonDefaultArgumentIndex(Tokens $tokens, int $startIndex, int $endIndex): ?int
+ {
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ $token = $tokens[$i];
+
+ if ($token->equals('=')) {
+ $i = $tokens->getPrevMeaningfulToken($i);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_VARIABLE) && !$this->isEllipsis($tokens, $i)) {
+ return $i;
+ }
+ }
+
+ return null;
+ }
+
+ private function isEllipsis(Tokens $tokens, int $variableIndex): bool
+ {
+ return $tokens[$tokens->getPrevMeaningfulToken($variableIndex)]->isGivenKind(T_ELLIPSIS);
+ }
+
+ private function removeDefaultArgument(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($i = $startIndex; $i <= $endIndex;) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ $this->clearWhitespacesBeforeIndex($tokens, $i);
+ $i = $tokens->getNextMeaningfulToken($i);
+ }
+ }
+
+ /**
+ * @param int $index Index of "="
+ */
+ private function isNonNullableTypehintedNullableVariable(Tokens $tokens, int $index): bool
+ {
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];
+
+ if (!$nextToken->equals([T_STRING, 'null'], false)) {
+ return false;
+ }
+
+ $variableIndex = $tokens->getPrevMeaningfulToken($index);
+
+ $searchTokens = [',', '(', [T_STRING], [CT::T_ARRAY_TYPEHINT], [T_CALLABLE]];
+ $typehintKinds = [T_STRING, CT::T_ARRAY_TYPEHINT, T_CALLABLE];
+
+ $prevIndex = $tokens->getPrevTokenOfKind($variableIndex, $searchTokens);
+
+ if (!$tokens[$prevIndex]->isGivenKind($typehintKinds)) {
+ return false;
+ }
+
+ return !$tokens[$tokens->getPrevMeaningfulToken($prevIndex)]->isGivenKind(CT::T_NULLABLE_TYPE);
+ }
+
+ private function clearWhitespacesBeforeIndex(Tokens $tokens, int $index): void
+ {
+ $prevIndex = $tokens->getNonEmptySibling($index, -1);
+ if (!$tokens[$prevIndex]->isWhitespace()) {
+ return;
+ }
+
+ $prevNonWhiteIndex = $tokens->getPrevNonWhitespace($prevIndex);
+ if (null === $prevNonWhiteIndex || !$tokens[$prevNonWhiteIndex]->isComment()) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUselessSprintfFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUselessSprintfFixer.php
new file mode 100644
index 0000000..d5af443
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NoUselessSprintfFixer.php
@@ -0,0 +1,121 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoUselessSprintfFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There must be no `sprintf` calls with only the first argument.',
+ [
+ new CodeSample(
+ "<?php\n\$foo = sprintf('bar');\n"
+ ),
+ ],
+ null,
+ 'Risky when if the `sprintf` function is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MethodArgumentSpaceFixer, NativeFunctionCasingFixer, NoEmptyStatementFixer, NoExtraBlankLinesFixer, NoSpacesInsideParenthesisFixer.
+ */
+ public function getPriority(): int
+ {
+ return 42;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionAnalyzer = new FunctionsAnalyzer();
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ for ($index = \count($tokens) - 1; $index > 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ if ('sprintf' !== strtolower($tokens[$index]->getContent())) {
+ continue;
+ }
+
+ if (!$functionAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ $openParenthesisIndex = $tokens->getNextTokenOfKind($index, ['(']);
+
+ if ($tokens[$tokens->getNextMeaningfulToken($openParenthesisIndex)]->isGivenKind(T_ELLIPSIS)) {
+ continue;
+ }
+
+ $closeParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openParenthesisIndex);
+
+ if (1 !== $argumentsAnalyzer->countArguments($tokens, $openParenthesisIndex, $closeParenthesisIndex)) {
+ continue;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeParenthesisIndex);
+
+ $prevMeaningfulTokenIndex = $tokens->getPrevMeaningfulToken($closeParenthesisIndex);
+
+ if ($tokens[$prevMeaningfulTokenIndex]->equals(',')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevMeaningfulTokenIndex);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openParenthesisIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ $prevMeaningfulTokenIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prevMeaningfulTokenIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevMeaningfulTokenIndex);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php
new file mode 100644
index 0000000..8aca802
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/NullableTypeDeclarationForDefaultNullValueFixer.php
@@ -0,0 +1,167 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\ArgumentAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author HypeMC
+ */
+final class NullableTypeDeclarationForDefaultNullValueFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Adds or removes `?` before type declarations for parameters with a default `null` value.',
+ [
+ new CodeSample(
+ "<?php\nfunction sample(string \$str = null)\n{}\n"
+ ),
+ new CodeSample(
+ "<?php\nfunction sample(?string \$str = null)\n{}\n",
+ ['use_nullable_type_declaration' => false]
+ ),
+ ],
+ 'Rule is applied only in a PHP 7.1+ environment.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ if (!$tokens->isTokenKindFound(T_VARIABLE)) {
+ return false;
+ }
+
+ if (\PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_FN)) {
+ return true;
+ }
+
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUnreachableDefaultArgumentValueFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('use_nullable_type_declaration', 'Whether to add or remove `?` before type declarations for parameters with a default `null` value.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ $tokenKinds = [T_FUNCTION];
+ if (\PHP_VERSION_ID >= 70400) {
+ $tokenKinds[] = T_FN;
+ }
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind($tokenKinds)) {
+ continue;
+ }
+
+ $arguments = $functionsAnalyzer->getFunctionArguments($tokens, $index);
+
+ $this->fixFunctionParameters($tokens, $arguments);
+ }
+ }
+
+ /**
+ * @param ArgumentAnalysis[] $arguments
+ */
+ private function fixFunctionParameters(Tokens $tokens, array $arguments): void
+ {
+ foreach (array_reverse($arguments) as $argumentInfo) {
+ if (
+ // Skip, if the parameter
+ // - doesn't have a type declaration
+ !$argumentInfo->hasTypeAnalysis()
+ // type is a union
+ || str_contains($argumentInfo->getTypeAnalysis()->getName(), '|')
+ // - a default value is not null we can continue
+ || !$argumentInfo->hasDefault() || 'null' !== strtolower($argumentInfo->getDefault())
+ ) {
+ continue;
+ }
+
+ $argumentTypeInfo = $argumentInfo->getTypeAnalysis();
+
+ if (
+ \PHP_VERSION_ID >= 80000
+ && false === $this->configuration['use_nullable_type_declaration']
+ ) {
+ $visibility = $tokens[$tokens->getPrevMeaningfulToken($argumentTypeInfo->getStartIndex())];
+
+ if ($visibility->isGivenKind([
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE,
+ ])) {
+ continue;
+ }
+ }
+
+ if (true === $this->configuration['use_nullable_type_declaration']) {
+ if (!$argumentTypeInfo->isNullable() && 'mixed' !== $argumentTypeInfo->getName()) {
+ $tokens->insertAt($argumentTypeInfo->getStartIndex(), new Token([CT::T_NULLABLE_TYPE, '?']));
+ }
+ } else {
+ if ($argumentTypeInfo->isNullable()) {
+ $tokens->removeTrailingWhitespace($argumentTypeInfo->getStartIndex());
+ $tokens->clearTokenAndMergeSurroundingWhitespace($argumentTypeInfo->getStartIndex());
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
new file mode 100644
index 0000000..52a082d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToParamTypeFixer.php
@@ -0,0 +1,194 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractPhpdocToTypeDeclarationFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Jan Gantzert <jan@familie-gantzert.de>
+ */
+final class PhpdocToParamTypeFixer extends AbstractPhpdocToTypeDeclarationFixer
+{
+ /**
+ * @var array{int, string}[]
+ */
+ private const EXCLUDE_FUNC_NAMES = [
+ [T_STRING, '__clone'],
+ [T_STRING, '__destruct'],
+ ];
+
+ /**
+ * @var array<string, true>
+ */
+ private const SKIPPED_TYPES = [
+ 'mixed' => true,
+ 'resource' => true,
+ 'static' => true,
+ 'void' => true,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'EXPERIMENTAL: Takes `@param` annotations of non-mixed types and adjusts accordingly the function signature. Requires PHP >= 7.0.',
+ [
+ new CodeSample(
+ '<?php
+
+/**
+ * @param string $foo
+ * @param string|null $bar
+ */
+function f($foo, $bar)
+{}
+'
+ ),
+ new CodeSample(
+ '<?php
+
+/** @param Foo $foo */
+function foo($foo) {}
+/** @param string $foo */
+function bar($foo) {}
+',
+ ['scalar_types' => false]
+ ),
+ ],
+ null,
+ 'This rule is EXPERIMENTAL and [1] is not covered with backward compatibility promise. [2] `@param` annotation is mandatory for the fixer to make changes, signatures of methods without it (no docblock, inheritdocs) will not be fixed. [3] Manual actions are required if inherited signatures are not properly documented.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 8;
+ }
+
+ protected function isSkippedType(string $type): bool
+ {
+ return isset(self::SKIPPED_TYPES[$type]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; 0 < $index; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $funcName = $tokens->getNextMeaningfulToken($index);
+ if ($tokens[$funcName]->equalsAny(self::EXCLUDE_FUNC_NAMES, false)) {
+ continue;
+ }
+
+ $docCommentIndex = $this->findFunctionDocComment($tokens, $index);
+
+ if (null === $docCommentIndex) {
+ continue;
+ }
+
+ foreach ($this->getAnnotationsFromDocComment('param', $tokens, $docCommentIndex) as $paramTypeAnnotation) {
+ $typeInfo = $this->getCommonTypeFromAnnotation($paramTypeAnnotation, false);
+
+ if (null === $typeInfo) {
+ continue;
+ }
+
+ [$paramType, $isNullable] = $typeInfo;
+
+ $startIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $variableIndex = $this->findCorrectVariable($tokens, $startIndex, $paramTypeAnnotation);
+
+ if (null === $variableIndex) {
+ continue;
+ }
+
+ $byRefIndex = $tokens->getPrevMeaningfulToken($variableIndex);
+ if ($tokens[$byRefIndex]->equals('&')) {
+ $variableIndex = $byRefIndex;
+ }
+
+ if ($this->hasParamTypeHint($tokens, $variableIndex)) {
+ continue;
+ }
+
+ if (!$this->isValidSyntax(sprintf('<?php function f(%s $x) {}', $paramType))) {
+ continue;
+ }
+
+ $tokens->insertAt($variableIndex, array_merge(
+ $this->createTypeDeclarationTokens($paramType, $isNullable),
+ [new Token([T_WHITESPACE, ' '])]
+ ));
+ }
+ }
+ }
+
+ private function findCorrectVariable(Tokens $tokens, int $startIndex, Annotation $paramTypeAnnotation): ?int
+ {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startIndex);
+
+ for ($index = $startIndex + 1; $index < $endIndex; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_VARIABLE)) {
+ continue;
+ }
+
+ $variableName = $tokens[$index]->getContent();
+ if ($paramTypeAnnotation->getVariableName() === $variableName) {
+ return $index;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Determine whether the function already has a param type hint.
+ *
+ * @param int $index The index of the end of the function definition line, EG at { or ;
+ */
+ private function hasParamTypeHint(Tokens $tokens, int $index): bool
+ {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ return !$tokens[$prevIndex]->equalsAny([',', '(']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php
new file mode 100644
index 0000000..bc20074
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToPropertyTypeFixer.php
@@ -0,0 +1,244 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractPhpdocToTypeDeclarationFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class PhpdocToPropertyTypeFixer extends AbstractPhpdocToTypeDeclarationFixer
+{
+ /**
+ * @var array<string, true>
+ */
+ private $skippedTypes = [
+ 'mixed' => true,
+ 'resource' => true,
+ 'null' => true,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'EXPERIMENTAL: Takes `@var` annotation of non-mixed types and adjusts accordingly the property signature. Requires PHP >= 7.4.',
+ [
+ new VersionSpecificCodeSample(
+ '<?php
+class Foo {
+ /** @var int */
+ private $foo;
+ /** @var \Traversable */
+ private $bar;
+}
+',
+ new VersionSpecification(70400)
+ ),
+ new VersionSpecificCodeSample(
+ '<?php
+class Foo {
+ /** @var int */
+ private $foo;
+ /** @var \Traversable */
+ private $bar;
+}
+',
+ new VersionSpecification(70400),
+ ['scalar_types' => false]
+ ),
+ ],
+ null,
+ 'This rule is EXPERIMENTAL and [1] is not covered with backward compatibility promise. [2] `@var` annotation is mandatory for the fixer to make changes, signatures of properties without it (no docblock) will not be fixed. [3] Manual actions might be required for newly typed properties that are read before initialization.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 7;
+ }
+
+ protected function isSkippedType(string $type): bool
+ {
+ return isset($this->skippedTypes[$type]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; 0 < $index; --$index) {
+ if ($tokens[$index]->isGivenKind([T_CLASS, T_TRAIT])) {
+ $this->fixClass($tokens, $index);
+ }
+ }
+ }
+
+ private function fixClass(Tokens $tokens, int $index): void
+ {
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+ $classEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ for (; $index < $classEndIndex; ++$index) {
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ $index = $tokens->getNextTokenOfKind($index, ['{', ';']);
+
+ if ($tokens[$index]->equals('{')) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+ }
+
+ continue;
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $docCommentIndex = $index;
+ $propertyIndexes = $this->findNextUntypedPropertiesDeclaration($tokens, $docCommentIndex);
+
+ if ([] === $propertyIndexes) {
+ continue;
+ }
+
+ $typeInfo = $this->resolveApplicableType(
+ $propertyIndexes,
+ $this->getAnnotationsFromDocComment('var', $tokens, $docCommentIndex)
+ );
+
+ if (null === $typeInfo) {
+ continue;
+ }
+
+ [$propertyType, $isNullable] = $typeInfo;
+
+ if (\in_array($propertyType, ['callable', 'never', 'void'], true)) {
+ continue;
+ }
+
+ $newTokens = array_merge(
+ $this->createTypeDeclarationTokens($propertyType, $isNullable),
+ [new Token([T_WHITESPACE, ' '])]
+ );
+
+ $tokens->insertAt(current($propertyIndexes), $newTokens);
+
+ $index = max($propertyIndexes) + \count($newTokens) + 1;
+ $classEndIndex += \count($newTokens);
+ }
+ }
+
+ /**
+ * @return array<string, int>
+ */
+ private function findNextUntypedPropertiesDeclaration(Tokens $tokens, int $index): array
+ {
+ do {
+ $index = $tokens->getNextMeaningfulToken($index);
+ } while ($tokens[$index]->isGivenKind([
+ T_PRIVATE,
+ T_PROTECTED,
+ T_PUBLIC,
+ T_STATIC,
+ T_VAR,
+ ]));
+
+ if (!$tokens[$index]->isGivenKind(T_VARIABLE)) {
+ return [];
+ }
+
+ $properties = [];
+
+ while (!$tokens[$index]->equals(';')) {
+ if ($tokens[$index]->isGivenKind(T_VARIABLE)) {
+ $properties[$tokens[$index]->getContent()] = $index;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return $properties;
+ }
+
+ /**
+ * @param array<string, int> $propertyIndexes
+ * @param Annotation[] $annotations
+ */
+ private function resolveApplicableType(array $propertyIndexes, array $annotations): ?array
+ {
+ $propertyTypes = [];
+
+ foreach ($annotations as $annotation) {
+ $propertyName = $annotation->getVariableName();
+
+ if (null === $propertyName) {
+ if (1 !== \count($propertyIndexes)) {
+ continue;
+ }
+
+ $propertyName = key($propertyIndexes);
+ }
+
+ if (!isset($propertyIndexes[$propertyName])) {
+ continue;
+ }
+
+ $typeInfo = $this->getCommonTypeFromAnnotation($annotation, false);
+
+ if (!isset($propertyTypes[$propertyName])) {
+ $propertyTypes[$propertyName] = [];
+ } elseif ($typeInfo !== $propertyTypes[$propertyName]) {
+ return null;
+ }
+
+ $propertyTypes[$propertyName] = $typeInfo;
+ }
+
+ if (\count($propertyTypes) !== \count($propertyIndexes)) {
+ return null;
+ }
+
+ $type = array_shift($propertyTypes);
+
+ foreach ($propertyTypes as $propertyType) {
+ if ($propertyType !== $type) {
+ return null;
+ }
+ }
+
+ return $type;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php
new file mode 100644
index 0000000..e31f247
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/PhpdocToReturnTypeFixer.php
@@ -0,0 +1,214 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractPhpdocToTypeDeclarationFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class PhpdocToReturnTypeFixer extends AbstractPhpdocToTypeDeclarationFixer
+{
+ /**
+ * @var array<int, array<int, int|string>>
+ */
+ private $excludeFuncNames = [
+ [T_STRING, '__construct'],
+ [T_STRING, '__destruct'],
+ [T_STRING, '__clone'],
+ ];
+
+ /**
+ * @var array<string, true>
+ */
+ private $skippedTypes = [
+ 'mixed' => true,
+ 'resource' => true,
+ 'null' => true,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'EXPERIMENTAL: Takes `@return` annotation of non-mixed types and adjusts accordingly the function signature. Requires PHP >= 7.0.',
+ [
+ new CodeSample(
+ '<?php
+
+/** @return \My\Bar */
+function f1()
+{}
+
+/** @return void */
+function f2()
+{}
+'
+ ),
+ new VersionSpecificCodeSample(
+ '<?php
+
+/** @return object */
+function my_foo()
+{}
+',
+ new VersionSpecification(70200)
+ ),
+ new CodeSample(
+ '<?php
+
+/** @return Foo */
+function foo() {}
+/** @return string */
+function bar() {}
+',
+ ['scalar_types' => false]
+ ),
+ new VersionSpecificCodeSample(
+ '<?php
+final class Foo {
+ /**
+ * @return static
+ */
+ public function create($prototype) {
+ return new static($prototype);
+ }
+}
+',
+ new VersionSpecification(80000)
+ ),
+ ],
+ null,
+ 'This rule is EXPERIMENTAL and [1] is not covered with backward compatibility promise. [2] `@return` annotation is mandatory for the fixer to make changes, signatures of methods without it (no docblock, inheritdocs) will not be fixed. [3] Manual actions are required if inherited signatures are not properly documented.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ if (\PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_FN)) {
+ return true;
+ }
+
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before FullyQualifiedStrictTypesFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer, ReturnTypeDeclarationFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 13;
+ }
+
+ protected function isSkippedType(string $type): bool
+ {
+ return isset($this->skippedTypes[$type]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (\PHP_VERSION_ID >= 80000) {
+ unset($this->skippedTypes['mixed']);
+ }
+
+ for ($index = $tokens->count() - 1; 0 < $index; --$index) {
+ if (
+ !$tokens[$index]->isGivenKind(T_FUNCTION)
+ && (\PHP_VERSION_ID < 70400 || !$tokens[$index]->isGivenKind(T_FN))
+ ) {
+ continue;
+ }
+
+ $funcName = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$funcName]->equalsAny($this->excludeFuncNames, false)) {
+ continue;
+ }
+
+ $docCommentIndex = $this->findFunctionDocComment($tokens, $index);
+ if (null === $docCommentIndex) {
+ continue;
+ }
+
+ $returnTypeAnnotation = $this->getAnnotationsFromDocComment('return', $tokens, $docCommentIndex);
+ if (1 !== \count($returnTypeAnnotation)) {
+ continue;
+ }
+
+ $typeInfo = $this->getCommonTypeFromAnnotation(current($returnTypeAnnotation), true);
+
+ if (null === $typeInfo) {
+ continue;
+ }
+
+ [$returnType, $isNullable] = $typeInfo;
+
+ $startIndex = $tokens->getNextTokenOfKind($index, ['{', ';']);
+
+ if ($this->hasReturnTypeHint($tokens, $startIndex)) {
+ continue;
+ }
+
+ if (!$this->isValidSyntax(sprintf('<?php function f():%s {}', $returnType))) {
+ continue;
+ }
+
+ $endFuncIndex = $tokens->getPrevTokenOfKind($startIndex, [')']);
+
+ $tokens->insertAt(
+ $endFuncIndex + 1,
+ array_merge(
+ [
+ new Token([CT::T_TYPE_COLON, ':']),
+ new Token([T_WHITESPACE, ' ']),
+ ],
+ $this->createTypeDeclarationTokens($returnType, $isNullable)
+ )
+ );
+ }
+ }
+
+ /**
+ * Determine whether the function already has a return type hint.
+ *
+ * @param int $index The index of the end of the function definition line, EG at { or ;
+ */
+ private function hasReturnTypeHint(Tokens $tokens, int $index): bool
+ {
+ $endFuncIndex = $tokens->getPrevTokenOfKind($index, [')']);
+ $nextIndex = $tokens->getNextMeaningfulToken($endFuncIndex);
+
+ return $tokens[$nextIndex]->isGivenKind(CT::T_TYPE_COLON);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/RegularCallableCallFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/RegularCallableCallFixer.php
new file mode 100644
index 0000000..1e24a68
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/RegularCallableCallFixer.php
@@ -0,0 +1,234 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class RegularCallableCallFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Callables must be called without using `call_user_func*` when possible.',
+ [
+ new CodeSample(
+ '<?php
+ call_user_func("var_dump", 1, 2);
+
+ call_user_func("Bar\Baz::d", 1, 2);
+
+ call_user_func_array($callback, [1, 2]);
+'
+ ),
+ new CodeSample(
+ '<?php
+call_user_func(function ($a, $b) { var_dump($a, $b); }, 1, 2);
+
+call_user_func(static function ($a, $b) { var_dump($a, $b); }, 1, 2);
+'
+ ),
+ ],
+ null,
+ 'Risky when the `call_user_func` or `call_user_func_array` function is overridden or when are used in constructions that should be avoided, like `call_user_func_array(\'foo\', [\'bar\' => \'baz\'])` or `call_user_func($foo, $foo = \'bar\')`.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NativeFunctionInvocationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ if (!$tokens[$index]->equalsAny([[T_STRING, 'call_user_func'], [T_STRING, 'call_user_func_array']], false)) {
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue; // redeclare/override
+ }
+
+ $openParenthesis = $tokens->getNextMeaningfulToken($index);
+ $closeParenthesis = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openParenthesis);
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $openParenthesis, $closeParenthesis);
+
+ if (1 > \count($arguments)) {
+ return; // no arguments!
+ }
+
+ $this->processCall($tokens, $index, $arguments);
+ }
+ }
+
+ private function processCall(Tokens $tokens, int $index, array $arguments): void
+ {
+ $firstArgIndex = $tokens->getNextMeaningfulToken(
+ $tokens->getNextMeaningfulToken($index)
+ );
+
+ /** @var Token $firstArgToken */
+ $firstArgToken = $tokens[$firstArgIndex];
+
+ if ($firstArgToken->isGivenKind(T_CONSTANT_ENCAPSED_STRING)) {
+ $afterFirstArgIndex = $tokens->getNextMeaningfulToken($firstArgIndex);
+ if (!$tokens[$afterFirstArgIndex]->equalsAny([',', ')'])) {
+ return; // first argument is an expression like `call_user_func("foo"."bar", ...)`, not supported!
+ }
+
+ $newCallTokens = Tokens::fromCode('<?php '.substr(str_replace('\\\\', '\\', $firstArgToken->getContent()), 1, -1).'();');
+ $newCallTokensSize = $newCallTokens->count();
+ $newCallTokens->clearAt(0);
+ $newCallTokens->clearRange($newCallTokensSize - 3, $newCallTokensSize - 1);
+ $newCallTokens->clearEmptyTokens();
+
+ $this->replaceCallUserFuncWithCallback($tokens, $index, $newCallTokens, $firstArgIndex, $firstArgIndex);
+ } elseif ($firstArgToken->isGivenKind([T_FUNCTION, T_STATIC])) {
+ $firstArgEndIndex = $tokens->findBlockEnd(
+ Tokens::BLOCK_TYPE_CURLY_BRACE,
+ $tokens->getNextTokenOfKind($firstArgIndex, ['{'])
+ );
+
+ $newCallTokens = $this->getTokensSubcollection($tokens, $firstArgIndex, $firstArgEndIndex);
+ $newCallTokens->insertAt($newCallTokens->count(), new Token(')'));
+ $newCallTokens->insertAt(0, new Token('('));
+ $this->replaceCallUserFuncWithCallback($tokens, $index, $newCallTokens, $firstArgIndex, $firstArgEndIndex);
+ } elseif ($firstArgToken->isGivenKind(T_VARIABLE)) {
+ $firstArgEndIndex = reset($arguments);
+
+ // check if the same variable is used multiple times and if so do not fix
+
+ foreach ($arguments as $argumentStart => $argumentEnd) {
+ if ($firstArgEndIndex === $argumentEnd) {
+ continue;
+ }
+
+ for ($i = $argumentStart; $i <= $argumentEnd; ++$i) {
+ if ($tokens[$i]->equals($firstArgToken)) {
+ return;
+ }
+ }
+ }
+
+ // check if complex statement and if so wrap the call in () if on PHP 7 or up, else do not fix
+
+ $newCallTokens = $this->getTokensSubcollection($tokens, $firstArgIndex, $firstArgEndIndex);
+ $complex = false;
+
+ for ($newCallIndex = \count($newCallTokens) - 1; $newCallIndex >= 0; --$newCallIndex) {
+ if ($newCallTokens[$newCallIndex]->isGivenKind([T_WHITESPACE, T_COMMENT, T_DOC_COMMENT, T_VARIABLE])) {
+ continue;
+ }
+
+ $blockType = Tokens::detectBlockType($newCallTokens[$newCallIndex]);
+
+ if (null !== $blockType && (Tokens::BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE === $blockType['type'] || Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE === $blockType['type'])) {
+ $newCallIndex = $newCallTokens->findBlockStart($blockType['type'], $newCallIndex);
+
+ continue;
+ }
+
+ $complex = true;
+
+ break;
+ }
+
+ if ($complex) {
+ $newCallTokens->insertAt($newCallTokens->count(), new Token(')'));
+ $newCallTokens->insertAt(0, new Token('('));
+ }
+ $this->replaceCallUserFuncWithCallback($tokens, $index, $newCallTokens, $firstArgIndex, $firstArgEndIndex);
+ }
+ }
+
+ private function replaceCallUserFuncWithCallback(Tokens $tokens, int $callIndex, Tokens $newCallTokens, int $firstArgStartIndex, int $firstArgEndIndex): void
+ {
+ $tokens->clearRange($firstArgStartIndex, $firstArgEndIndex);
+
+ $afterFirstArgIndex = $tokens->getNextMeaningfulToken($firstArgEndIndex);
+ $afterFirstArgToken = $tokens[$afterFirstArgIndex];
+
+ if ($afterFirstArgToken->equals(',')) {
+ $useEllipsis = $tokens[$callIndex]->equals([T_STRING, 'call_user_func_array'], false);
+
+ if ($useEllipsis) {
+ $secondArgIndex = $tokens->getNextMeaningfulToken($afterFirstArgIndex);
+ $tokens->insertAt($secondArgIndex, new Token([T_ELLIPSIS, '...']));
+ }
+
+ $tokens->clearAt($afterFirstArgIndex);
+ $tokens->removeTrailingWhitespace($afterFirstArgIndex);
+ }
+
+ $tokens->overrideRange($callIndex, $callIndex, $newCallTokens);
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($callIndex);
+
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevIndex);
+ }
+ }
+
+ private function getTokensSubcollection(Tokens $tokens, int $indexStart, int $indexEnd): Tokens
+ {
+ $size = $indexEnd - $indexStart + 1;
+ $subcollection = new Tokens($size);
+
+ for ($i = 0; $i < $size; ++$i) {
+ /** @var Token $toClone */
+ $toClone = $tokens[$i + $indexStart];
+ $subcollection[$i] = clone $toClone;
+ }
+
+ return $subcollection;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ReturnTypeDeclarationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ReturnTypeDeclarationFixer.php
new file mode 100644
index 0000000..fe30159
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/ReturnTypeDeclarationFixer.php
@@ -0,0 +1,131 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class ReturnTypeDeclarationFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should be one or no space before colon, and one space after it in return type declarations, according to configuration.',
+ [
+ new CodeSample(
+ "<?php\nfunction foo(int \$a):string {};\n"
+ ),
+ new CodeSample(
+ "<?php\nfunction foo(int \$a):string {};\n",
+ ['space_before' => 'none']
+ ),
+ new CodeSample(
+ "<?php\nfunction foo(int \$a):string {};\n",
+ ['space_before' => 'one']
+ ),
+ ],
+ 'Rule is applied only in a PHP 7+ environment.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after PhpdocToReturnTypeFixer, VoidReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return -17;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(CT::T_TYPE_COLON);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $oneSpaceBefore = 'one' === $this->configuration['space_before'];
+
+ for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) {
+ if (!$tokens[$index]->isGivenKind(CT::T_TYPE_COLON)) {
+ continue;
+ }
+
+ $previousIndex = $index - 1;
+ $previousToken = $tokens[$previousIndex];
+
+ if ($previousToken->isWhitespace()) {
+ if (!$tokens[$tokens->getPrevNonWhitespace($index - 1)]->isComment()) {
+ if ($oneSpaceBefore) {
+ $tokens[$previousIndex] = new Token([T_WHITESPACE, ' ']);
+ } else {
+ $tokens->clearAt($previousIndex);
+ }
+ }
+ } elseif ($oneSpaceBefore) {
+ $tokenWasAdded = $tokens->ensureWhitespaceAtIndex($index, 0, ' ');
+
+ if ($tokenWasAdded) {
+ ++$limit;
+ }
+
+ ++$index;
+ }
+
+ ++$index;
+
+ $tokenWasAdded = $tokens->ensureWhitespaceAtIndex($index, 0, ' ');
+
+ if ($tokenWasAdded) {
+ ++$limit;
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('space_before', 'Spacing to apply before colon.'))
+ ->setAllowedValues(['one', 'none'])
+ ->setDefault('none')
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/SingleLineThrowFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/SingleLineThrowFixer.php
new file mode 100644
index 0000000..c5dec82
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/SingleLineThrowFixer.php
@@ -0,0 +1,165 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class SingleLineThrowFixer extends AbstractFixer
+{
+ private const REMOVE_WHITESPACE_AFTER_TOKENS = ['['];
+ private const REMOVE_WHITESPACE_AROUND_TOKENS = ['(', [T_DOUBLE_COLON]];
+ private const REMOVE_WHITESPACE_BEFORE_TOKENS = [')', ']', ',', ';'];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Throwing exception must be done in single line.',
+ [
+ new CodeSample("<?php\nthrow new Exception(\n 'Error.',\n 500\n);\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_THROW);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, ConcatSpaceFixer.
+ */
+ public function getPriority(): int
+ {
+ return 36;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_THROW)) {
+ continue;
+ }
+
+ $endCandidateIndex = $tokens->getNextMeaningfulToken($index);
+
+ while (!$tokens[$endCandidateIndex]->equalsAny([')', ']', ',', ';'])) {
+ $blockType = Tokens::detectBlockType($tokens[$endCandidateIndex]);
+ if (null !== $blockType) {
+ if (Tokens::BLOCK_TYPE_CURLY_BRACE === $blockType['type']) {
+ break;
+ }
+ $endCandidateIndex = $tokens->findBlockEnd($blockType['type'], $endCandidateIndex);
+ }
+ $endCandidateIndex = $tokens->getNextMeaningfulToken($endCandidateIndex);
+ }
+
+ $this->trimNewLines($tokens, $index, $tokens->getPrevMeaningfulToken($endCandidateIndex));
+ }
+ }
+
+ private function trimNewLines(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ $content = $tokens[$index]->getContent();
+
+ if ($tokens[$index]->isGivenKind(T_COMMENT)) {
+ if (str_starts_with($content, '//')) {
+ $content = '/*'.substr($content, 2).' */';
+ $tokens->clearAt($index + 1);
+ } elseif (str_starts_with($content, '#')) {
+ $content = '/*'.substr($content, 1).' */';
+ $tokens->clearAt($index + 1);
+ } elseif (0 !== Preg::match('/\R/', $content)) {
+ $content = Preg::replace('/\R/', ' ', $content);
+ }
+
+ $tokens[$index] = new Token([T_COMMENT, $content]);
+
+ continue;
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_WHITESPACE)) {
+ continue;
+ }
+
+ if (0 === Preg::match('/\R/', $content)) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getNonEmptySibling($index, -1);
+
+ if ($this->isPreviousTokenToClear($tokens[$prevIndex])) {
+ $tokens->clearAt($index);
+
+ continue;
+ }
+
+ $nextIndex = $tokens->getNonEmptySibling($index, 1);
+
+ if (
+ $this->isNextTokenToClear($tokens[$nextIndex])
+ && !$tokens[$prevIndex]->isGivenKind(T_FUNCTION)
+ ) {
+ $tokens->clearAt($index);
+
+ continue;
+ }
+
+ $tokens[$index] = new Token([T_WHITESPACE, ' ']);
+ }
+ }
+
+ private function isPreviousTokenToClear(Token $token): bool
+ {
+ static $tokens = null;
+
+ if (null === $tokens) {
+ $tokens = array_merge(self::REMOVE_WHITESPACE_AFTER_TOKENS, self::REMOVE_WHITESPACE_AROUND_TOKENS);
+ }
+
+ return $token->equalsAny($tokens) || $token->isObjectOperator();
+ }
+
+ private function isNextTokenToClear(Token $token): bool
+ {
+ static $tokens = null;
+
+ if (null === $tokens) {
+ $tokens = array_merge(self::REMOVE_WHITESPACE_AROUND_TOKENS, self::REMOVE_WHITESPACE_BEFORE_TOKENS);
+ }
+
+ return $token->equalsAny($tokens) || $token->isObjectOperator();
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/StaticLambdaFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/StaticLambdaFixer.php
new file mode 100644
index 0000000..1220bb4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/StaticLambdaFixer.php
@@ -0,0 +1,176 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+final class StaticLambdaFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Lambdas not (indirect) referencing `$this` must be declared `static`.',
+ [new CodeSample("<?php\n\$a = function () use (\$b)\n{ echo \$b;\n};\n")],
+ null,
+ 'Risky when using `->bindTo` on lambdas without referencing to `$this`.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ if (\PHP_VERSION_ID >= 70400 && $tokens->isTokenKindFound(T_FN)) {
+ return true;
+ }
+
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+ $expectedFunctionKinds = [T_FUNCTION];
+
+ if (\PHP_VERSION_ID >= 70400) {
+ $expectedFunctionKinds[] = T_FN;
+ }
+
+ for ($index = $tokens->count() - 4; $index > 0; --$index) {
+ if (!$tokens[$index]->isGivenKind($expectedFunctionKinds) || !$analyzer->isLambda($index)) {
+ continue;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prev]->isGivenKind(T_STATIC)) {
+ continue; // lambda is already 'static'
+ }
+
+ $argumentsStartIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $argumentsEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $argumentsStartIndex);
+
+ // figure out where the lambda starts and ends
+
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ $lambdaOpenIndex = $tokens->getNextTokenOfKind($argumentsEndIndex, ['{']);
+ $lambdaEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $lambdaOpenIndex);
+ } else { // T_FN
+ $lambdaOpenIndex = $tokens->getNextTokenOfKind($argumentsEndIndex, [[T_DOUBLE_ARROW]]);
+ $lambdaEndIndex = $this->findExpressionEnd($tokens, $lambdaOpenIndex);
+ }
+
+ if ($this->hasPossibleReferenceToThis($tokens, $lambdaOpenIndex, $lambdaEndIndex)) {
+ continue;
+ }
+
+ // make the lambda static
+ $tokens->insertAt(
+ $index,
+ [
+ new Token([T_STATIC, 'static']),
+ new Token([T_WHITESPACE, ' ']),
+ ]
+ );
+
+ $index -= 4; // fixed after a lambda, closes candidate is at least 4 tokens before that
+ }
+ }
+
+ private function findExpressionEnd(Tokens $tokens, int $index): int
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ while (null !== $nextIndex) {
+ /** @var Token $nextToken */
+ $nextToken = $tokens[$nextIndex];
+
+ if ($nextToken->equalsAny([',', ';', [T_CLOSE_TAG]])) {
+ break;
+ }
+
+ /** @var null|array{isStart: bool, type: int} $blockType */
+ $blockType = Tokens::detectBlockType($nextToken);
+
+ if (null !== $blockType && $blockType['isStart']) {
+ $nextIndex = $tokens->findBlockEnd($blockType['type'], $nextIndex);
+ }
+
+ $index = $nextIndex;
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return $index;
+ }
+
+ /**
+ * Returns 'true' if there is a possible reference to '$this' within the given tokens index range.
+ */
+ private function hasPossibleReferenceToThis(Tokens $tokens, int $startIndex, int $endIndex): bool
+ {
+ for ($i = $startIndex; $i < $endIndex; ++$i) {
+ if ($tokens[$i]->isGivenKind(T_VARIABLE) && '$this' === strtolower($tokens[$i]->getContent())) {
+ return true; // directly accessing '$this'
+ }
+
+ if ($tokens[$i]->isGivenKind([
+ T_INCLUDE, // loading additional symbols we cannot analyze here
+ T_INCLUDE_ONCE, // "
+ T_REQUIRE, // "
+ T_REQUIRE_ONCE, // "
+ CT::T_DYNAMIC_VAR_BRACE_OPEN, // "$h = ${$g};" case
+ T_EVAL, // "$c = eval('return $this;');" case
+ ])) {
+ return true;
+ }
+
+ if ($tokens[$i]->equals('$')) {
+ $nextIndex = $tokens->getNextMeaningfulToken($i);
+
+ if ($tokens[$nextIndex]->isGivenKind(T_VARIABLE)) {
+ return true; // "$$a" case
+ }
+ }
+
+ if ($tokens[$i]->equals([T_STRING, 'parent'], false)) {
+ return true; // parent:: case
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/UseArrowFunctionsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/UseArrowFunctionsFixer.php
new file mode 100644
index 0000000..8a57337
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/UseArrowFunctionsFixer.php
@@ -0,0 +1,207 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gregor Harlan
+ */
+final class UseArrowFunctionsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Anonymous functions with one-liner return statement must use arrow functions.',
+ [
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+foo(function ($a) use ($b) {
+ return $a + $b;
+});
+
+SAMPLE
+ ,
+ new VersionSpecification(70400)
+ ),
+ ],
+ null,
+ 'Risky when using `isset()` on outside variables that are not imported with `use ()`.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \PHP_VERSION_ID >= 70400 && $tokens->isAllTokenKindsFound([T_FUNCTION, T_RETURN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION) || !$analyzer->isLambda($index)) {
+ continue;
+ }
+
+ // Find parameters end
+ // Abort if they are multilined
+
+ $parametersStart = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$parametersStart]->isGivenKind(CT::T_RETURN_REF)) {
+ $parametersStart = $tokens->getNextMeaningfulToken($parametersStart);
+ }
+
+ $parametersEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $parametersStart);
+
+ if ($this->isMultilined($tokens, $parametersStart, $parametersEnd)) {
+ continue;
+ }
+
+ // Find `use ()` start and end
+ // Abort if it contains reference variables
+
+ $next = $tokens->getNextMeaningfulToken($parametersEnd);
+
+ $useStart = null;
+ $useEnd = null;
+
+ if ($tokens[$next]->isGivenKind(CT::T_USE_LAMBDA)) {
+ $useStart = $next;
+
+ if ($tokens[$useStart - 1]->isGivenKind(T_WHITESPACE)) {
+ --$useStart;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+
+ while (!$tokens[$next]->equals(')')) {
+ if ($tokens[$next]->equals('&')) {
+ // variables used by reference are not supported by arrow functions
+ continue 2;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($next);
+ }
+
+ $useEnd = $next;
+ $next = $tokens->getNextMeaningfulToken($next);
+ }
+
+ // Find opening brace and following `return`
+ // Abort if there is more than whitespace between them (like comments)
+
+ $braceOpen = $tokens[$next]->equals('{') ? $next : $tokens->getNextTokenOfKind($next, ['{']);
+ $return = $braceOpen + 1;
+
+ if ($tokens[$return]->isGivenKind(T_WHITESPACE)) {
+ ++$return;
+ }
+
+ if (!$tokens[$return]->isGivenKind(T_RETURN)) {
+ continue;
+ }
+
+ // Find semicolon of `return` statement
+
+ $semicolon = $tokens->getNextTokenOfKind($return, ['{', ';']);
+
+ if (!$tokens[$semicolon]->equals(';')) {
+ continue;
+ }
+
+ // Find closing brace
+ // Abort if there is more than whitespace between semicolon and closing brace
+
+ $braceClose = $semicolon + 1;
+
+ if ($tokens[$braceClose]->isGivenKind(T_WHITESPACE)) {
+ ++$braceClose;
+ }
+
+ if (!$tokens[$braceClose]->equals('}')) {
+ continue;
+ }
+
+ // Abort if the `return` statement is multilined
+
+ if ($this->isMultilined($tokens, $return, $semicolon)) {
+ continue;
+ }
+
+ // Transform the function to an arrow function
+
+ $this->transform($tokens, $index, $useStart, $useEnd, $braceOpen, $return, $semicolon, $braceClose);
+ }
+ }
+
+ private function isMultilined(Tokens $tokens, int $start, int $end): bool
+ {
+ for ($i = $start; $i < $end; ++$i) {
+ if (str_contains($tokens[$i]->getContent(), "\n")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function transform(Tokens $tokens, int $index, ?int $useStart, ?int $useEnd, int $braceOpen, int $return, int $semicolon, int $braceClose): void
+ {
+ $tokensToInsert = [new Token([T_DOUBLE_ARROW, '=>'])];
+
+ if ($tokens->getNextMeaningfulToken($return) === $semicolon) {
+ $tokensToInsert[] = new Token([T_WHITESPACE, ' ']);
+ $tokensToInsert[] = new Token([T_STRING, 'null']);
+ }
+
+ $tokens->clearRange($semicolon, $braceClose);
+ $tokens->clearRange($braceOpen + 1, $return);
+ $tokens->overrideRange($braceOpen, $braceOpen, $tokensToInsert);
+
+ if (null !== $useStart) {
+ $tokens->clearRange($useStart, $useEnd);
+ }
+
+ $tokens[$index] = new Token([T_FN, 'fn']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/VoidReturnFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/VoidReturnFixer.php
new file mode 100644
index 0000000..47fb011
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/FunctionNotation/VoidReturnFixer.php
@@ -0,0 +1,257 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\FunctionNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Mark Nielsen
+ */
+final class VoidReturnFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Add `void` return type to functions with missing or empty return statements, but priority is given to `@return` annotations. Requires PHP >= 7.1.',
+ [
+ new CodeSample(
+ "<?php\nfunction foo(\$a) {};\n"
+ ),
+ ],
+ null,
+ 'Modifies the signature of functions.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocNoEmptyReturnFixer, ReturnTypeDeclarationFixer.
+ * Must run after NoSuperfluousPhpdocTagsFixer, SimplifiedNullReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return 5;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_FUNCTION);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // These cause syntax errors.
+ static $excludedFunctions = [
+ [T_STRING, '__construct'],
+ [T_STRING, '__destruct'],
+ [T_STRING, '__clone'],
+ [T_STRING, '__isset'],
+ [T_STRING, '__sleep'],
+ [T_STRING, '__serialize'],
+ [T_STRING, '__set_state'],
+ [T_STRING, '__debugInfo'],
+ ];
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $functionName = $tokens->getNextMeaningfulToken($index);
+ if ($tokens[$functionName]->equalsAny($excludedFunctions, false)) {
+ continue;
+ }
+
+ $startIndex = $tokens->getNextTokenOfKind($index, ['{', ';']);
+
+ if ($this->hasReturnTypeHint($tokens, $startIndex)) {
+ continue;
+ }
+
+ if ($tokens[$startIndex]->equals(';')) {
+ // No function body defined, fallback to PHPDoc.
+ if ($this->hasVoidReturnAnnotation($tokens, $index)) {
+ $this->fixFunctionDefinition($tokens, $startIndex);
+ }
+
+ continue;
+ }
+
+ if ($this->hasReturnAnnotation($tokens, $index)) {
+ continue;
+ }
+
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $startIndex);
+
+ if ($this->hasVoidReturn($tokens, $startIndex, $endIndex)) {
+ $this->fixFunctionDefinition($tokens, $startIndex);
+ }
+ }
+ }
+
+ /**
+ * Determine whether there is a non-void return annotation in the function's PHPDoc comment.
+ *
+ * @param int $index The index of the function token
+ */
+ private function hasReturnAnnotation(Tokens $tokens, int $index): bool
+ {
+ foreach ($this->findReturnAnnotations($tokens, $index) as $return) {
+ if (['void'] !== $return->getTypes()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Determine whether there is a void return annotation in the function's PHPDoc comment.
+ *
+ * @param int $index The index of the function token
+ */
+ private function hasVoidReturnAnnotation(Tokens $tokens, int $index): bool
+ {
+ foreach ($this->findReturnAnnotations($tokens, $index) as $return) {
+ if (['void'] === $return->getTypes()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Determine whether the function already has a return type hint.
+ *
+ * @param int $index The index of the end of the function definition line, EG at { or ;
+ */
+ private function hasReturnTypeHint(Tokens $tokens, int $index): bool
+ {
+ $endFuncIndex = $tokens->getPrevTokenOfKind($index, [')']);
+ $nextIndex = $tokens->getNextMeaningfulToken($endFuncIndex);
+
+ return $tokens[$nextIndex]->isGivenKind(CT::T_TYPE_COLON);
+ }
+
+ /**
+ * Determine whether the function has a void return.
+ *
+ * @param int $startIndex Start of function body
+ * @param int $endIndex End of function body
+ */
+ private function hasVoidReturn(Tokens $tokens, int $startIndex, int $endIndex): bool
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($i = $startIndex; $i < $endIndex; ++$i) {
+ if (
+ // skip anonymous classes
+ ($tokens[$i]->isGivenKind(T_CLASS) && $tokensAnalyzer->isAnonymousClass($i))
+ // skip lambda functions
+ || ($tokens[$i]->isGivenKind(T_FUNCTION) && $tokensAnalyzer->isLambda($i))
+ ) {
+ $i = $tokens->getNextTokenOfKind($i, ['{']);
+ $i = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $i);
+
+ continue;
+ }
+
+ if ($tokens[$i]->isGivenKind([T_YIELD, T_YIELD_FROM])) {
+ return false; // Generators cannot return void.
+ }
+
+ if (!$tokens[$i]->isGivenKind(T_RETURN)) {
+ continue;
+ }
+
+ $i = $tokens->getNextMeaningfulToken($i);
+ if (!$tokens[$i]->equals(';')) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * @param int $index The index of the end of the function definition line, EG at { or ;
+ */
+ private function fixFunctionDefinition(Tokens $tokens, int $index): void
+ {
+ $endFuncIndex = $tokens->getPrevTokenOfKind($index, [')']);
+ $tokens->insertAt($endFuncIndex + 1, [
+ new Token([CT::T_TYPE_COLON, ':']),
+ new Token([T_WHITESPACE, ' ']),
+ new Token([T_STRING, 'void']),
+ ]);
+ }
+
+ /**
+ * Find all the return annotations in the function's PHPDoc comment.
+ *
+ * @param int $index The index of the function token
+ *
+ * @return Annotation[]
+ */
+ private function findReturnAnnotations(Tokens $tokens, int $index): array
+ {
+ do {
+ $index = $tokens->getPrevNonWhitespace($index);
+ } while ($tokens[$index]->isGivenKind([
+ T_ABSTRACT,
+ T_FINAL,
+ T_PRIVATE,
+ T_PROTECTED,
+ T_PUBLIC,
+ T_STATIC,
+ ]));
+
+ if (!$tokens[$index]->isGivenKind(T_DOC_COMMENT)) {
+ return [];
+ }
+
+ $doc = new DocBlock($tokens[$index]->getContent());
+
+ return $doc->getAnnotationsOfType('return');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
new file mode 100644
index 0000000..436951e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
@@ -0,0 +1,200 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\TypeAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Generator\NamespacedStringTokenGenerator;
+use PhpCsFixer\Tokenizer\Resolver\TypeShortNameResolver;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author VeeWee <toonverwerft@gmail.com>
+ */
+final class FullyQualifiedStrictTypesFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Transforms imported FQCN parameters and return types in function arguments to short version.',
+ [
+ new CodeSample(
+ '<?php
+
+use Foo\Bar;
+
+class SomeClass
+{
+ public function doSomething(\Foo\Bar $foo)
+ {
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+
+use Foo\Bar;
+use Foo\Bar\Baz;
+
+class SomeClass
+{
+ public function doSomething(\Foo\Bar $foo): \Foo\Bar\Baz
+ {
+ }
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoSuperfluousPhpdocTagsFixer.
+ * Must run after PhpdocToReturnTypeFixer.
+ */
+ public function getPriority(): int
+ {
+ return 7;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_FUNCTION) && (
+ \count((new NamespacesAnalyzer())->getDeclarations($tokens)) > 0
+ || \count((new NamespaceUsesAnalyzer())->getDeclarationsFromTokens($tokens)) > 0
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $lastIndex = $tokens->count() - 1;
+
+ for ($index = $lastIndex; $index >= 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ // Return types are only available since PHP 7.0
+ $this->fixFunctionReturnType($tokens, $index);
+ $this->fixFunctionArguments($tokens, $index);
+ }
+ }
+
+ private function fixFunctionArguments(Tokens $tokens, int $index): void
+ {
+ $arguments = (new FunctionsAnalyzer())->getFunctionArguments($tokens, $index);
+
+ foreach ($arguments as $argument) {
+ if (!$argument->hasTypeAnalysis()) {
+ continue;
+ }
+
+ $this->detectAndReplaceTypeWithShortType($tokens, $argument->getTypeAnalysis());
+ }
+ }
+
+ private function fixFunctionReturnType(Tokens $tokens, int $index): void
+ {
+ $returnType = (new FunctionsAnalyzer())->getFunctionReturnType($tokens, $index);
+
+ if (null === $returnType) {
+ return;
+ }
+
+ $this->detectAndReplaceTypeWithShortType($tokens, $returnType);
+ }
+
+ private function detectAndReplaceTypeWithShortType(
+ Tokens $tokens,
+ TypeAnalysis $type
+ ): void {
+ if ($type->isReservedType()) {
+ return;
+ }
+
+ $typeStartIndex = $type->getStartIndex();
+ if ($tokens[$typeStartIndex]->isGivenKind(CT::T_NULLABLE_TYPE)) {
+ $typeStartIndex = $tokens->getNextMeaningfulToken($typeStartIndex);
+ }
+
+ foreach ($this->getSimpleTypes($tokens, $typeStartIndex, $type->getEndIndex()) as $simpleType) {
+ $typeName = $tokens->generatePartialCode($simpleType['start'], $simpleType['end']);
+
+ if (!str_starts_with($typeName, '\\')) {
+ continue;
+ }
+
+ $shortType = (new TypeShortNameResolver())->resolve($tokens, $typeName);
+ if ($shortType === $typeName) {
+ continue;
+ }
+
+ $shortType = (new NamespacedStringTokenGenerator())->generate($shortType);
+
+ $tokens->overrideRange(
+ $simpleType['start'],
+ $simpleType['end'],
+ $shortType
+ );
+ }
+ }
+
+ /**
+ * @return \Generator<array<int>>
+ */
+ private function getSimpleTypes(Tokens $tokens, int $startIndex, int $endIndex): iterable
+ {
+ $index = $startIndex;
+
+ while (true) {
+ $prevIndex = $index;
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $startIndex) {
+ $startIndex = $index;
+ }
+
+ if ($index >= $endIndex) {
+ yield ['start' => $startIndex, 'end' => $index];
+
+ break;
+ }
+
+ if ($tokens[$index]->isGivenKind([CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION])) {
+ yield ['start' => $startIndex, 'end' => $prevIndex];
+ $startIndex = null;
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php
new file mode 100644
index 0000000..2c80175
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GlobalNamespaceImportFixer.php
@@ -0,0 +1,745 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\ClassyAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class GlobalNamespaceImportFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Imports or fully qualifies global classes/functions/constants.',
+ [
+ new CodeSample(
+ '<?php
+
+namespace Foo;
+
+$d = new \DateTimeImmutable();
+'
+ ),
+ new CodeSample(
+ '<?php
+
+namespace Foo;
+
+if (\count($x)) {
+ /** @var \DateTimeImmutable $d */
+ $d = new \DateTimeImmutable();
+ $p = \M_PI;
+}
+',
+ ['import_classes' => true, 'import_constants' => true, 'import_functions' => true]
+ ),
+ new CodeSample(
+ '<?php
+
+namespace Foo;
+
+use DateTimeImmutable;
+use function count;
+use const M_PI;
+
+if (count($x)) {
+ /** @var DateTimeImmutable $d */
+ $d = new DateTimeImmutable();
+ $p = M_PI;
+}
+',
+ ['import_classes' => false, 'import_constants' => false, 'import_functions' => false]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUnusedImportsFixer, OrderedImportsFixer.
+ * Must run after NativeConstantInvocationFixer, NativeFunctionInvocationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_DOC_COMMENT, T_NS_SEPARATOR, T_USE])
+ && $tokens->isTokenKindFound(T_NAMESPACE)
+ && 1 === $tokens->countTokenKind(T_NAMESPACE)
+ && $tokens->isMonolithicPhp();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $namespaceAnalyses = (new NamespacesAnalyzer())->getDeclarations($tokens);
+
+ if (1 !== \count($namespaceAnalyses) || '' === $namespaceAnalyses[0]->getFullName()) {
+ return;
+ }
+
+ $useDeclarations = (new NamespaceUsesAnalyzer())->getDeclarationsFromTokens($tokens);
+
+ $newImports = [];
+
+ if (true === $this->configuration['import_constants']) {
+ $newImports['const'] = $this->importConstants($tokens, $useDeclarations);
+ } elseif (false === $this->configuration['import_constants']) {
+ $this->fullyQualifyConstants($tokens, $useDeclarations);
+ }
+
+ if (true === $this->configuration['import_functions']) {
+ $newImports['function'] = $this->importFunctions($tokens, $useDeclarations);
+ } elseif (false === $this->configuration['import_functions']) {
+ $this->fullyQualifyFunctions($tokens, $useDeclarations);
+ }
+
+ if (true === $this->configuration['import_classes']) {
+ $newImports['class'] = $this->importClasses($tokens, $useDeclarations);
+ } elseif (false === $this->configuration['import_classes']) {
+ $this->fullyQualifyClasses($tokens, $useDeclarations);
+ }
+
+ $newImports = array_filter($newImports);
+
+ if (\count($newImports) > 0) {
+ $this->insertImports($tokens, $newImports, $useDeclarations);
+ }
+ }
+
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('import_constants', 'Whether to import, not import or ignore global constants.'))
+ ->setDefault(null)
+ ->setAllowedValues([true, false, null])
+ ->getOption(),
+ (new FixerOptionBuilder('import_functions', 'Whether to import, not import or ignore global functions.'))
+ ->setDefault(null)
+ ->setAllowedValues([true, false, null])
+ ->getOption(),
+ (new FixerOptionBuilder('import_classes', 'Whether to import, not import or ignore global classes.'))
+ ->setDefault(true)
+ ->setAllowedValues([true, false, null])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function importConstants(Tokens $tokens, array $useDeclarations): array
+ {
+ [$global, $other] = $this->filterUseDeclarations($useDeclarations, static function (NamespaceUseAnalysis $declaration): bool {
+ return $declaration->isConstant();
+ }, true);
+
+ // find namespaced const declarations (`const FOO = 1`)
+ // and add them to the not importable names (already used)
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isClassy()) {
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ continue;
+ }
+
+ if (!$token->isGivenKind(T_CONST)) {
+ continue;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+ $other[$tokens[$index]->getContent()] = true;
+ }
+
+ $analyzer = new TokensAnalyzer($tokens);
+
+ $indexes = [];
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $name = $token->getContent();
+
+ if (isset($other[$name])) {
+ continue;
+ }
+
+ if (!$analyzer->isConstantInvocation($index)) {
+ continue;
+ }
+
+ $nsSeparatorIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$nsSeparatorIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ if (!isset($global[$name])) {
+ // found an unqualified constant invocation
+ // add it to the not importable names (already used)
+ $other[$name] = true;
+ }
+
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($nsSeparatorIndex);
+ if ($tokens[$prevIndex]->isGivenKind([CT::T_NAMESPACE_OPERATOR, T_STRING])) {
+ continue;
+ }
+
+ $indexes[] = $index;
+ }
+
+ return $this->prepareImports($tokens, $indexes, $global, $other, true);
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function importFunctions(Tokens $tokens, array $useDeclarations): array
+ {
+ [$global, $other] = $this->filterUseDeclarations($useDeclarations, static function (NamespaceUseAnalysis $declaration): bool {
+ return $declaration->isFunction();
+ }, false);
+
+ // find function declarations
+ // and add them to the not importable names (already used)
+ foreach ($this->findFunctionDeclarations($tokens, 0, $tokens->count() - 1) as $name) {
+ $other[strtolower($name)] = true;
+ }
+
+ $analyzer = new FunctionsAnalyzer();
+
+ $indexes = [];
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $name = strtolower($token->getContent());
+
+ if (isset($other[$name])) {
+ continue;
+ }
+
+ if (!$analyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ $nsSeparatorIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$nsSeparatorIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ if (!isset($global[$name])) {
+ $other[$name] = true;
+ }
+
+ continue;
+ }
+
+ $indexes[] = $index;
+ }
+
+ return $this->prepareImports($tokens, $indexes, $global, $other, false);
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function importClasses(Tokens $tokens, array $useDeclarations): array
+ {
+ [$global, $other] = $this->filterUseDeclarations($useDeclarations, static function (NamespaceUseAnalysis $declaration): bool {
+ return $declaration->isClass();
+ }, false);
+
+ /** @var DocBlock[] $docBlocks */
+ $docBlocks = [];
+
+ // find class declarations and class usages in docblocks
+ // and add them to the not importable names (already used)
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_DOC_COMMENT)) {
+ $docBlocks[$index] = new DocBlock($token->getContent());
+
+ $this->traverseDocBlockTypes($docBlocks[$index], static function (string $type) use ($global, &$other): void {
+ if (str_contains($type, '\\')) {
+ return;
+ }
+
+ $name = strtolower($type);
+
+ if (!isset($global[$name])) {
+ $other[$name] = true;
+ }
+ });
+ }
+
+ if (!$token->isClassy()) {
+ continue;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->isGivenKind(T_STRING)) {
+ $other[strtolower($tokens[$index]->getContent())] = true;
+ }
+ }
+
+ $analyzer = new ClassyAnalyzer();
+
+ $indexes = [];
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $name = strtolower($token->getContent());
+
+ if (isset($other[$name])) {
+ continue;
+ }
+
+ if (!$analyzer->isClassyInvocation($tokens, $index)) {
+ continue;
+ }
+
+ $nsSeparatorIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$nsSeparatorIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ if (!isset($global[$name])) {
+ $other[$name] = true;
+ }
+
+ continue;
+ }
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($nsSeparatorIndex)]->isGivenKind([CT::T_NAMESPACE_OPERATOR, T_STRING])) {
+ continue;
+ }
+
+ $indexes[] = $index;
+ }
+
+ $imports = [];
+
+ foreach ($docBlocks as $index => $docBlock) {
+ $changed = $this->traverseDocBlockTypes($docBlock, static function (string $type) use ($global, $other, &$imports): string {
+ if ('\\' !== $type[0]) {
+ return $type;
+ }
+
+ $name = substr($type, 1);
+ $checkName = strtolower($name);
+
+ if (str_contains($checkName, '\\') || isset($other[$checkName])) {
+ return $type;
+ }
+
+ if (isset($global[$checkName])) {
+ return \is_string($global[$checkName]) ? $global[$checkName] : $name;
+ }
+
+ $imports[$checkName] = $name;
+
+ return $name;
+ });
+
+ if ($changed) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $docBlock->getContent()]);
+ }
+ }
+
+ return $imports + $this->prepareImports($tokens, $indexes, $global, $other, false);
+ }
+
+ /**
+ * Removes the leading slash at the given indexes (when the name is not already used).
+ *
+ * @param int[] $indexes
+ *
+ * @return array array keys contain the names that must be imported
+ */
+ private function prepareImports(Tokens $tokens, array $indexes, array $global, array $other, bool $caseSensitive): array
+ {
+ $imports = [];
+
+ foreach ($indexes as $index) {
+ $name = $tokens[$index]->getContent();
+ $checkName = $caseSensitive ? $name : strtolower($name);
+
+ if (isset($other[$checkName])) {
+ continue;
+ }
+
+ if (!isset($global[$checkName])) {
+ $imports[$checkName] = $name;
+ } elseif (\is_string($global[$checkName])) {
+ $tokens[$index] = new Token([T_STRING, $global[$checkName]]);
+ }
+
+ $tokens->clearAt($tokens->getPrevMeaningfulToken($index));
+ }
+
+ return $imports;
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function insertImports(Tokens $tokens, array $imports, array $useDeclarations): void
+ {
+ if (\count($useDeclarations) > 0) {
+ $useDeclaration = end($useDeclarations);
+ $index = $useDeclaration->getEndIndex() + 1;
+ } else {
+ $namespace = (new NamespacesAnalyzer())->getDeclarations($tokens)[0];
+ $index = $namespace->getEndIndex() + 1;
+ }
+
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ if (!$tokens[$index]->isWhitespace() || !str_contains($tokens[$index]->getContent(), "\n")) {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, $lineEnding]));
+ }
+
+ foreach ($imports as $type => $typeImports) {
+ foreach ($typeImports as $name) {
+ $items = [
+ new Token([T_WHITESPACE, $lineEnding]),
+ new Token([T_USE, 'use']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ if ('const' === $type) {
+ $items[] = new Token([CT::T_CONST_IMPORT, 'const']);
+ $items[] = new Token([T_WHITESPACE, ' ']);
+ } elseif ('function' === $type) {
+ $items[] = new Token([CT::T_FUNCTION_IMPORT, 'function']);
+ $items[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $items[] = new Token([T_STRING, $name]);
+ $items[] = new Token(';');
+
+ $tokens->insertAt($index, $items);
+ }
+ }
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function fullyQualifyConstants(Tokens $tokens, array $useDeclarations): void
+ {
+ if (!$tokens->isTokenKindFound(CT::T_CONST_IMPORT)) {
+ return;
+ }
+
+ [$global] = $this->filterUseDeclarations($useDeclarations, static function (NamespaceUseAnalysis $declaration): bool {
+ return $declaration->isConstant() && !$declaration->isAliased();
+ }, true);
+
+ if (!$global) {
+ return;
+ }
+
+ $analyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ if (!isset($global[$token->getContent()])) {
+ continue;
+ }
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ if (!$analyzer->isConstantInvocation($index)) {
+ continue;
+ }
+
+ $tokens->insertAt($index, new Token([T_NS_SEPARATOR, '\\']));
+ }
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function fullyQualifyFunctions(Tokens $tokens, array $useDeclarations): void
+ {
+ if (!$tokens->isTokenKindFound(CT::T_FUNCTION_IMPORT)) {
+ return;
+ }
+
+ [$global] = $this->filterUseDeclarations($useDeclarations, static function (NamespaceUseAnalysis $declaration): bool {
+ return $declaration->isFunction() && !$declaration->isAliased();
+ }, false);
+
+ if (!$global) {
+ return;
+ }
+
+ $analyzer = new FunctionsAnalyzer();
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ if (!isset($global[strtolower($token->getContent())])) {
+ continue;
+ }
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ if (!$analyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ $tokens->insertAt($index, new Token([T_NS_SEPARATOR, '\\']));
+ }
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $useDeclarations
+ */
+ private function fullyQualifyClasses(Tokens $tokens, array $useDeclarations): void
+ {
+ if (!$tokens->isTokenKindFound(T_USE)) {
+ return;
+ }
+
+ [$global] = $this->filterUseDeclarations($useDeclarations, static function (NamespaceUseAnalysis $declaration): bool {
+ return $declaration->isClass() && !$declaration->isAliased();
+ }, false);
+
+ if (!$global) {
+ return;
+ }
+
+ $analyzer = new ClassyAnalyzer();
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_DOC_COMMENT)) {
+ $doc = new DocBlock($token->getContent());
+
+ $changed = $this->traverseDocBlockTypes($doc, static function (string $type) use ($global): string {
+ if (!isset($global[strtolower($type)])) {
+ return $type;
+ }
+
+ return '\\'.$type;
+ });
+
+ if ($changed) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+
+ continue;
+ }
+
+ if (!$token->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ if (!isset($global[strtolower($token->getContent())])) {
+ continue;
+ }
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_NS_SEPARATOR)) {
+ continue;
+ }
+
+ if (!$analyzer->isClassyInvocation($tokens, $index)) {
+ continue;
+ }
+
+ $tokens->insertAt($index, new Token([T_NS_SEPARATOR, '\\']));
+ }
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $declarations
+ */
+ private function filterUseDeclarations(array $declarations, callable $callback, bool $caseSensitive): array
+ {
+ $global = [];
+ $other = [];
+
+ foreach ($declarations as $declaration) {
+ if (!$callback($declaration)) {
+ continue;
+ }
+
+ $fullName = ltrim($declaration->getFullName(), '\\');
+
+ if (str_contains($fullName, '\\')) {
+ $name = $caseSensitive ? $declaration->getShortName() : strtolower($declaration->getShortName());
+ $other[$name] = true;
+
+ continue;
+ }
+
+ $checkName = $caseSensitive ? $fullName : strtolower($fullName);
+ $alias = $declaration->getShortName();
+ $global[$checkName] = $alias === $fullName ? true : $alias;
+ }
+
+ return [$global, $other];
+ }
+
+ private function findFunctionDeclarations(Tokens $tokens, int $start, int $end): iterable
+ {
+ for ($index = $start; $index <= $end; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isClassy()) {
+ $classStart = $tokens->getNextTokenOfKind($index, ['{']);
+ $classEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classStart);
+
+ for ($index = $classStart; $index <= $classEnd; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $methodStart = $tokens->getNextTokenOfKind($index, ['{', ';']);
+
+ if ($tokens[$methodStart]->equals(';')) {
+ $index = $methodStart;
+
+ continue;
+ }
+
+ $methodEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $methodStart);
+
+ foreach ($this->findFunctionDeclarations($tokens, $methodStart, $methodEnd) as $function) {
+ yield $function;
+ }
+
+ $index = $methodEnd;
+ }
+
+ continue;
+ }
+
+ if (!$token->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->isGivenKind(CT::T_RETURN_REF)) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ if ($tokens[$index]->isGivenKind(T_STRING)) {
+ yield $tokens[$index]->getContent();
+ }
+ }
+ }
+
+ private function traverseDocBlockTypes(DocBlock $doc, callable $callback): bool
+ {
+ $annotations = $doc->getAnnotationsOfType(Annotation::getTagsWithTypes());
+
+ if (0 === \count($annotations)) {
+ return false;
+ }
+
+ $changed = false;
+
+ foreach ($annotations as $annotation) {
+ $types = $new = $annotation->getTypes();
+
+ foreach ($types as $i => $fullType) {
+ $newFullType = $fullType;
+
+ Preg::matchAll('/[\\\\\w]+/', $fullType, $matches, PREG_OFFSET_CAPTURE);
+
+ foreach (array_reverse($matches[0]) as [$type, $offset]) {
+ $newType = $callback($type);
+
+ if (null !== $newType && $type !== $newType) {
+ $newFullType = substr_replace($newFullType, $newType, $offset, \strlen($type));
+ }
+ }
+
+ $new[$i] = $newFullType;
+ }
+
+ if ($types !== $new) {
+ $annotation->setTypes($new);
+ $changed = true;
+ }
+ }
+
+ return $changed;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
new file mode 100644
index 0000000..d6e4351
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/GroupImportFixer.php
@@ -0,0 +1,280 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Volodymyr Kupriienko <vldmr.kuprienko@gmail.com>
+ */
+final class GroupImportFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST be group use for the same namespaces.',
+ [
+ new CodeSample(
+ "<?php\nuse Foo\\Bar;\nuse Foo\\Baz;\n"
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_USE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $useWithSameNamespaces = $this->getSameNamespaces($tokens);
+
+ if ([] === $useWithSameNamespaces) {
+ return;
+ }
+
+ $this->removeSingleUseStatements($useWithSameNamespaces, $tokens);
+ $this->addGroupUseStatements($useWithSameNamespaces, $tokens);
+ }
+
+ /**
+ * Gets namespace use analyzers with same namespaces.
+ *
+ * @return NamespaceUseAnalysis[]
+ */
+ private function getSameNamespaces(Tokens $tokens): array
+ {
+ $useDeclarations = (new NamespaceUsesAnalyzer())->getDeclarationsFromTokens($tokens);
+
+ if (0 === \count($useDeclarations)) {
+ return [];
+ }
+
+ $allNamespaceAndType = array_map(
+ function (NamespaceUseAnalysis $useDeclaration): string {
+ return $this->getNamespaceNameWithSlash($useDeclaration).$useDeclaration->getType();
+ },
+ $useDeclarations
+ );
+
+ $sameNamespaces = array_filter(array_count_values($allNamespaceAndType), static function (int $count): bool {
+ return $count > 1;
+ });
+ $sameNamespaces = array_keys($sameNamespaces);
+
+ $sameNamespaceAnalysis = array_filter($useDeclarations, function (NamespaceUseAnalysis $useDeclaration) use ($sameNamespaces): bool {
+ $namespaceNameAndType = $this->getNamespaceNameWithSlash($useDeclaration).$useDeclaration->getType();
+
+ return \in_array($namespaceNameAndType, $sameNamespaces, true);
+ });
+
+ usort($sameNamespaceAnalysis, function (NamespaceUseAnalysis $a, NamespaceUseAnalysis $b): int {
+ $namespaceA = $this->getNamespaceNameWithSlash($a);
+ $namespaceB = $this->getNamespaceNameWithSlash($b);
+
+ return \strlen($namespaceA) - \strlen($namespaceB) ?: strcmp($a->getFullName(), $b->getFullName());
+ });
+
+ return $sameNamespaceAnalysis;
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $statements
+ */
+ private function removeSingleUseStatements(array $statements, Tokens $tokens): void
+ {
+ foreach ($statements as $useDeclaration) {
+ $index = $useDeclaration->getStartIndex();
+ $endIndex = $useDeclaration->getEndIndex();
+
+ $useStatementTokens = [T_USE, T_WHITESPACE, T_STRING, T_NS_SEPARATOR, T_AS, CT::T_CONST_IMPORT, CT::T_FUNCTION_IMPORT];
+
+ while ($index !== $endIndex) {
+ if ($tokens[$index]->isGivenKind($useStatementTokens)) {
+ $tokens->clearAt($index);
+ }
+
+ ++$index;
+ }
+
+ if (isset($tokens[$index]) && $tokens[$index]->equals(';')) {
+ $tokens->clearAt($index);
+ }
+
+ ++$index;
+
+ if (isset($tokens[$index]) && $tokens[$index]->isGivenKind(T_WHITESPACE)) {
+ $tokens->clearAt($index);
+ }
+ }
+ }
+
+ /**
+ * @param NamespaceUseAnalysis[] $statements
+ */
+ private function addGroupUseStatements(array $statements, Tokens $tokens): void
+ {
+ $currentUseDeclaration = null;
+ $insertIndex = \array_slice($statements, -1)[0]->getEndIndex() + 1;
+
+ foreach ($statements as $index => $useDeclaration) {
+ if ($this->areDeclarationsDifferent($currentUseDeclaration, $useDeclaration)) {
+ $currentUseDeclaration = $useDeclaration;
+ $insertIndex += $this->createNewGroup(
+ $tokens,
+ $insertIndex,
+ $useDeclaration,
+ $this->getNamespaceNameWithSlash($currentUseDeclaration)
+ );
+ } else {
+ $newTokens = [
+ new Token(','),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ if ($useDeclaration->isAliased()) {
+ $tokens->insertAt($insertIndex, $newTokens);
+ $insertIndex += \count($newTokens);
+ $newTokens = [];
+
+ $insertIndex += $this->insertToGroupUseWithAlias($tokens, $insertIndex, $useDeclaration);
+ }
+
+ $newTokens[] = new Token([T_STRING, $useDeclaration->getShortName()]);
+
+ if (!isset($statements[$index + 1]) || $this->areDeclarationsDifferent($currentUseDeclaration, $statements[$index + 1])) {
+ $newTokens[] = new Token([CT::T_GROUP_IMPORT_BRACE_CLOSE, '}']);
+ $newTokens[] = new Token(';');
+ $newTokens[] = new Token([T_WHITESPACE, "\n"]);
+ }
+
+ $tokens->insertAt($insertIndex, $newTokens);
+ $insertIndex += \count($newTokens);
+ }
+ }
+ }
+
+ private function getNamespaceNameWithSlash(NamespaceUseAnalysis $useDeclaration): string
+ {
+ $position = strrpos($useDeclaration->getFullName(), '\\');
+ if (false === $position || 0 === $position) {
+ return $useDeclaration->getFullName();
+ }
+
+ return substr($useDeclaration->getFullName(), 0, $position + 1);
+ }
+
+ /**
+ * Insert use with alias to the group.
+ */
+ private function insertToGroupUseWithAlias(Tokens $tokens, int $insertIndex, NamespaceUseAnalysis $useDeclaration): int
+ {
+ $newTokens = [
+ new Token([T_STRING, substr($useDeclaration->getFullName(), strripos($useDeclaration->getFullName(), '\\') + 1)]),
+ new Token([T_WHITESPACE, ' ']),
+ new Token([T_AS, 'as']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ $tokens->insertAt($insertIndex, $newTokens);
+
+ return \count($newTokens) + 1;
+ }
+
+ /**
+ * Creates new use statement group.
+ */
+ private function createNewGroup(Tokens $tokens, int $insertIndex, NamespaceUseAnalysis $useDeclaration, string $currentNamespace): int
+ {
+ $insertedTokens = 0;
+
+ if (\count($tokens) === $insertIndex) {
+ $tokens->setSize($insertIndex + 1);
+ }
+
+ $newTokens = [
+ new Token([T_USE, 'use']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ if ($useDeclaration->isFunction() || $useDeclaration->isConstant()) {
+ $importStatementParams = $useDeclaration->isFunction()
+ ? [CT::T_FUNCTION_IMPORT, 'function']
+ : [CT::T_CONST_IMPORT, 'const'];
+
+ $newTokens[] = new Token($importStatementParams);
+ $newTokens[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $namespaceParts = array_filter(explode('\\', $currentNamespace));
+
+ foreach ($namespaceParts as $part) {
+ $newTokens[] = new Token([T_STRING, $part]);
+ $newTokens[] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+
+ $newTokens[] = new Token([CT::T_GROUP_IMPORT_BRACE_OPEN, '{']);
+
+ $newTokensCount = \count($newTokens);
+ $tokens->insertAt($insertIndex, $newTokens);
+ $insertedTokens += $newTokensCount;
+
+ $insertIndex += $newTokensCount;
+
+ if ($useDeclaration->isAliased()) {
+ $inserted = $this->insertToGroupUseWithAlias($tokens, $insertIndex + 1, $useDeclaration);
+ $insertedTokens += $inserted;
+ $insertIndex += $inserted;
+ }
+
+ $tokens->insertAt($insertIndex, new Token([T_STRING, $useDeclaration->getShortName()]));
+ ++$insertedTokens;
+
+ return $insertedTokens;
+ }
+
+ /**
+ * Check if namespace use analyses are different.
+ */
+ private function areDeclarationsDifferent(?NamespaceUseAnalysis $analysis1, ?NamespaceUseAnalysis $analysis2): bool
+ {
+ if (null === $analysis1 || null === $analysis2) {
+ return true;
+ }
+
+ $namespaceName1 = $this->getNamespaceNameWithSlash($analysis1);
+ $namespaceName2 = $this->getNamespaceNameWithSlash($analysis2);
+
+ return $namespaceName1 !== $namespaceName2 || $analysis1->getType() !== $analysis2->getType();
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoLeadingImportSlashFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoLeadingImportSlashFixer.php
new file mode 100644
index 0000000..86f5c67
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoLeadingImportSlashFixer.php
@@ -0,0 +1,99 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Carlos Cirello <carlos.cirello.nl@gmail.com>
+ */
+final class NoLeadingImportSlashFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove leading slashes in `use` clauses.',
+ [new CodeSample("<?php\nnamespace Foo;\nuse \\Bar;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before OrderedImportsFixer.
+ * Must run after NoUnusedImportsFixer, SingleImportPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return -20;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_USE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $usesIndexes = $tokensAnalyzer->getImportUseIndexes();
+
+ foreach ($usesIndexes as $idx) {
+ $nextTokenIdx = $tokens->getNextMeaningfulToken($idx);
+ $nextToken = $tokens[$nextTokenIdx];
+
+ if ($nextToken->isGivenKind(T_NS_SEPARATOR)) {
+ $this->removeLeadingImportSlash($tokens, $nextTokenIdx);
+ } elseif ($nextToken->isGivenKind([CT::T_FUNCTION_IMPORT, CT::T_CONST_IMPORT])) {
+ $nextTokenIdx = $tokens->getNextMeaningfulToken($nextTokenIdx);
+ if ($tokens[$nextTokenIdx]->isGivenKind(T_NS_SEPARATOR)) {
+ $this->removeLeadingImportSlash($tokens, $nextTokenIdx);
+ }
+ }
+ }
+ }
+
+ private function removeLeadingImportSlash(Tokens $tokens, int $index): void
+ {
+ $previousIndex = $tokens->getPrevNonWhitespace($index);
+
+ if (
+ $previousIndex < $index - 1
+ || $tokens[$previousIndex]->isComment()
+ ) {
+ $tokens->clearAt($index);
+
+ return;
+ }
+
+ $tokens[$index] = new Token([T_WHITESPACE, ' ']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php
new file mode 100644
index 0000000..2f8f5ce
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php
@@ -0,0 +1,309 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\GotoLabelAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoUnusedImportsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Unused `use` statements must be removed.',
+ [new CodeSample("<?php\nuse \\DateTime;\nuse \\Exception;\n\nnew DateTime();\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BlankLineAfterNamespaceFixer, NoExtraBlankLinesFixer, NoLeadingImportSlashFixer, SingleLineAfterImportsFixer.
+ * Must run after ClassKeywordRemoveFixer, GlobalNamespaceImportFixer, PhpUnitFqcnAnnotationFixer, SingleImportPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_USE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $useDeclarations = (new NamespaceUsesAnalyzer())->getDeclarationsFromTokens($tokens);
+
+ if (0 === \count($useDeclarations)) {
+ return;
+ }
+
+ foreach ((new NamespacesAnalyzer())->getDeclarations($tokens) as $namespace) {
+ $currentNamespaceUseDeclarations = [];
+ $currentNamespaceUseDeclarationIndexes = [];
+
+ foreach ($useDeclarations as $useDeclaration) {
+ if ($useDeclaration->getStartIndex() >= $namespace->getScopeStartIndex() && $useDeclaration->getEndIndex() <= $namespace->getScopeEndIndex()) {
+ $currentNamespaceUseDeclarations[] = $useDeclaration;
+ $currentNamespaceUseDeclarationIndexes[$useDeclaration->getStartIndex()] = $useDeclaration->getEndIndex();
+ }
+ }
+
+ foreach ($currentNamespaceUseDeclarations as $useDeclaration) {
+ if (!$this->isImportUsed($tokens, $namespace, $useDeclaration, $currentNamespaceUseDeclarationIndexes)) {
+ $this->removeUseDeclaration($tokens, $useDeclaration);
+ }
+ }
+
+ $this->removeUsesInSameNamespace($tokens, $currentNamespaceUseDeclarations, $namespace);
+ }
+ }
+
+ /**
+ * @param array<int, int> $ignoredIndexes indexes of the use statements themselves that should not be checked as being "used"
+ */
+ private function isImportUsed(Tokens $tokens, NamespaceAnalysis $namespace, NamespaceUseAnalysis $import, array $ignoredIndexes): bool
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+ $gotoLabelAnalyzer = new GotoLabelAnalyzer();
+
+ $tokensNotBeforeFunctionCall = [T_NEW];
+
+ $attributeIsDefined = \defined('T_ATTRIBUTE');
+
+ if ($attributeIsDefined) { // @TODO: drop condition when PHP 8.0+ is required
+ $tokensNotBeforeFunctionCall[] = T_ATTRIBUTE;
+ }
+
+ $namespaceEndIndex = $namespace->getScopeEndIndex();
+ $inAttribute = false;
+
+ for ($index = $namespace->getScopeStartIndex(); $index <= $namespaceEndIndex; ++$index) {
+ $token = $tokens[$index];
+
+ if ($attributeIsDefined && $token->isGivenKind(T_ATTRIBUTE)) {
+ $inAttribute = true;
+
+ continue;
+ }
+
+ if ($attributeIsDefined && $token->isGivenKind(CT::T_ATTRIBUTE_CLOSE)) {
+ $inAttribute = false;
+
+ continue;
+ }
+
+ if (isset($ignoredIndexes[$index])) {
+ $index = $ignoredIndexes[$index];
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_STRING)) {
+ if (0 !== strcasecmp($import->getShortName(), $token->getContent())) {
+ continue;
+ }
+
+ if ($inAttribute) {
+ return true;
+ }
+
+ $prevMeaningfulToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+
+ if ($prevMeaningfulToken->isGivenKind(T_NAMESPACE)) {
+ $index = $tokens->getNextTokenOfKind($index, [';', '{', [T_CLOSE_TAG]]);
+
+ continue;
+ }
+
+ if (
+ $prevMeaningfulToken->isGivenKind([T_NS_SEPARATOR, T_FUNCTION, T_CONST, T_DOUBLE_COLON])
+ || $prevMeaningfulToken->isObjectOperator()
+ ) {
+ continue;
+ }
+
+ $nextMeaningfulIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($gotoLabelAnalyzer->belongsToGoToLabel($tokens, $nextMeaningfulIndex)) {
+ continue;
+ }
+
+ $nextMeaningfulToken = $tokens[$nextMeaningfulIndex];
+
+ if ($analyzer->isConstantInvocation($index)) {
+ $type = NamespaceUseAnalysis::TYPE_CONSTANT;
+ } elseif ($nextMeaningfulToken->equals('(') && !$prevMeaningfulToken->isGivenKind($tokensNotBeforeFunctionCall)) {
+ $type = NamespaceUseAnalysis::TYPE_FUNCTION;
+ } else {
+ $type = NamespaceUseAnalysis::TYPE_CLASS;
+ }
+
+ if ($import->getType() === $type) {
+ return true;
+ }
+
+ continue;
+ }
+
+ if ($token->isComment()
+ && Preg::match(
+ '/(?<![[:alnum:]\$])(?<!\\\\)'.$import->getShortName().'(?![[:alnum:]])/i',
+ $token->getContent()
+ )
+ ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function removeUseDeclaration(Tokens $tokens, NamespaceUseAnalysis $useDeclaration): void
+ {
+ for ($index = $useDeclaration->getEndIndex() - 1; $index >= $useDeclaration->getStartIndex(); --$index) {
+ if ($tokens[$index]->isComment()) {
+ continue;
+ }
+
+ if (!$tokens[$index]->isWhitespace() || !str_contains($tokens[$index]->getContent(), "\n")) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ continue;
+ }
+
+ // when multi line white space keep the line feed if the previous token is a comment
+ $prevIndex = $tokens->getPrevNonWhitespace($index);
+
+ if ($tokens[$prevIndex]->isComment()) {
+ $content = $tokens[$index]->getContent();
+ $tokens[$index] = new Token([T_WHITESPACE, substr($content, strrpos($content, "\n"))]); // preserve indent only
+ } else {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+ }
+
+ if ($tokens[$useDeclaration->getEndIndex()]->equals(';')) { // do not remove `? >`
+ $tokens->clearAt($useDeclaration->getEndIndex());
+ }
+
+ // remove white space above and below where the `use` statement was
+
+ $prevIndex = $useDeclaration->getStartIndex() - 1;
+ $prevToken = $tokens[$prevIndex];
+
+ if ($prevToken->isWhitespace()) {
+ $content = rtrim($prevToken->getContent(), " \t");
+
+ if ('' === $content) {
+ $tokens->clearAt($prevIndex);
+ } else {
+ $tokens[$prevIndex] = new Token([T_WHITESPACE, $content]);
+ }
+
+ $prevToken = $tokens[$prevIndex];
+ }
+
+ if (!isset($tokens[$useDeclaration->getEndIndex() + 1])) {
+ return;
+ }
+
+ $nextIndex = $tokens->getNonEmptySibling($useDeclaration->getEndIndex(), 1);
+
+ if (null === $nextIndex) {
+ return;
+ }
+
+ $nextToken = $tokens[$nextIndex];
+
+ if ($nextToken->isWhitespace()) {
+ $content = Preg::replace(
+ "#^\r\n|^\n#",
+ '',
+ ltrim($nextToken->getContent(), " \t"),
+ 1
+ );
+
+ if ('' !== $content) {
+ $tokens[$nextIndex] = new Token([T_WHITESPACE, $content]);
+ } else {
+ $tokens->clearAt($nextIndex);
+ }
+
+ $nextToken = $tokens[$nextIndex];
+ }
+
+ if ($prevToken->isWhitespace() && $nextToken->isWhitespace()) {
+ $content = $prevToken->getContent().$nextToken->getContent();
+
+ if ('' !== $content) {
+ $tokens[$nextIndex] = new Token([T_WHITESPACE, $content]);
+ } else {
+ $tokens->clearAt($nextIndex);
+ }
+
+ $tokens->clearAt($prevIndex);
+ }
+ }
+
+ private function removeUsesInSameNamespace(Tokens $tokens, array $useDeclarations, NamespaceAnalysis $namespaceDeclaration): void
+ {
+ $namespace = $namespaceDeclaration->getFullName();
+ $nsLength = \strlen($namespace.'\\');
+
+ foreach ($useDeclarations as $useDeclaration) {
+ if ($useDeclaration->isAliased()) {
+ continue;
+ }
+
+ $useDeclarationFullName = ltrim($useDeclaration->getFullName(), '\\');
+
+ if (!str_starts_with($useDeclarationFullName, $namespace.'\\')) {
+ continue;
+ }
+
+ $partName = substr($useDeclarationFullName, $nsLength);
+
+ if (!str_contains($partName, '\\')) {
+ $this->removeUseDeclaration($tokens, $useDeclaration);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
new file mode 100644
index 0000000..c8211fb
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/OrderedImportsFixer.php
@@ -0,0 +1,528 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Sebastiaan Stok <s.stok@rollerscapes.net>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Darius Matulionis <darius@matulionis.lt>
+ * @author Adriano Pilger <adriano.pilger@gmail.com>
+ */
+final class OrderedImportsFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const IMPORT_TYPE_CLASS = 'class';
+
+ /**
+ * @internal
+ */
+ public const IMPORT_TYPE_CONST = 'const';
+
+ /**
+ * @internal
+ */
+ public const IMPORT_TYPE_FUNCTION = 'function';
+
+ /**
+ * @internal
+ */
+ public const SORT_ALPHA = 'alpha';
+
+ /**
+ * @internal
+ */
+ public const SORT_LENGTH = 'length';
+
+ /**
+ * @internal
+ */
+ public const SORT_NONE = 'none';
+
+ /**
+ * Array of supported sort types in configuration.
+ *
+ * @var string[]
+ */
+ private const SUPPORTED_SORT_TYPES = [self::IMPORT_TYPE_CLASS, self::IMPORT_TYPE_CONST, self::IMPORT_TYPE_FUNCTION];
+
+ /**
+ * Array of supported sort algorithms in configuration.
+ *
+ * @var string[]
+ */
+ private const SUPPORTED_SORT_ALGORITHMS = [self::SORT_ALPHA, self::SORT_LENGTH, self::SORT_NONE];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Ordering `use` statements.',
+ [
+ new CodeSample(
+ "<?php\nuse function AAC;\nuse const AAB;\nuse AAA;\n"
+ ),
+ new CodeSample(
+ '<?php
+use Acme\Bar;
+use Bar1;
+use Acme;
+use Bar;
+',
+ ['sort_algorithm' => self::SORT_LENGTH]
+ ),
+ new CodeSample(
+ '<?php
+use const AAAA;
+use const BBB;
+
+use Bar;
+use AAC;
+use Acme;
+
+use function CCC\AA;
+use function DDD;
+',
+ [
+ 'sort_algorithm' => self::SORT_LENGTH,
+ 'imports_order' => [
+ self::IMPORT_TYPE_CONST,
+ self::IMPORT_TYPE_CLASS,
+ self::IMPORT_TYPE_FUNCTION,
+ ],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+use const BBB;
+use const AAAA;
+
+use Acme;
+use AAC;
+use Bar;
+
+use function DDD;
+use function CCC\AA;
+',
+ [
+ 'sort_algorithm' => self::SORT_ALPHA,
+ 'imports_order' => [
+ self::IMPORT_TYPE_CONST,
+ self::IMPORT_TYPE_CLASS,
+ self::IMPORT_TYPE_FUNCTION,
+ ],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+use const BBB;
+use const AAAA;
+
+use function DDD;
+use function CCC\AA;
+
+use Acme;
+use AAC;
+use Bar;
+',
+ [
+ 'sort_algorithm' => self::SORT_NONE,
+ 'imports_order' => [
+ self::IMPORT_TYPE_CONST,
+ self::IMPORT_TYPE_CLASS,
+ self::IMPORT_TYPE_FUNCTION,
+ ],
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after GlobalNamespaceImportFixer, NoLeadingImportSlashFixer.
+ */
+ public function getPriority(): int
+ {
+ return -30;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_USE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $namespacesImports = $tokensAnalyzer->getImportUseIndexes(true);
+
+ if (0 === \count($namespacesImports)) {
+ return;
+ }
+
+ $usesOrder = [];
+ foreach ($namespacesImports as $uses) {
+ $usesOrder[] = $this->getNewOrder(array_reverse($uses), $tokens);
+ }
+ $usesOrder = array_replace(...$usesOrder);
+
+ $usesOrder = array_reverse($usesOrder, true);
+ $mapStartToEnd = [];
+
+ foreach ($usesOrder as $use) {
+ $mapStartToEnd[$use['startIndex']] = $use['endIndex'];
+ }
+
+ // Now insert the new tokens, starting from the end
+ foreach ($usesOrder as $index => $use) {
+ $declarationTokens = Tokens::fromCode(
+ sprintf(
+ '<?php use %s%s;',
+ self::IMPORT_TYPE_CLASS === $use['importType'] ? '' : ' '.$use['importType'].' ',
+ $use['namespace']
+ )
+ );
+
+ $declarationTokens->clearRange(0, 2); // clear `<?php use `
+ $declarationTokens->clearAt(\count($declarationTokens) - 1); // clear `;`
+ $declarationTokens->clearEmptyTokens();
+
+ $tokens->overrideRange($index, $mapStartToEnd[$index], $declarationTokens);
+ if ($use['group']) {
+ // a group import must start with `use` and cannot be part of comma separated import list
+ $prev = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prev]->equals(',')) {
+ $tokens[$prev] = new Token(';');
+ $tokens->insertAt($prev + 1, new Token([T_USE, 'use']));
+
+ if (!$tokens[$prev + 2]->isWhitespace()) {
+ $tokens->insertAt($prev + 2, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $supportedSortTypes = self::SUPPORTED_SORT_TYPES;
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('sort_algorithm', 'whether the statements should be sorted alphabetically or by length, or not sorted'))
+ ->setAllowedValues(self::SUPPORTED_SORT_ALGORITHMS)
+ ->setDefault(self::SORT_ALPHA)
+ ->getOption(),
+ (new FixerOptionBuilder('imports_order', 'Defines the order of import types.'))
+ ->setAllowedTypes(['array', 'null'])
+ ->setAllowedValues([static function (?array $value) use ($supportedSortTypes): bool {
+ if (null !== $value) {
+ $missing = array_diff($supportedSortTypes, $value);
+ if (\count($missing) > 0) {
+ throw new InvalidOptionsException(sprintf(
+ 'Missing sort %s "%s".',
+ 1 === \count($missing) ? 'type' : 'types',
+ implode('", "', $missing)
+ ));
+ }
+
+ $unknown = array_diff($value, $supportedSortTypes);
+ if (\count($unknown) > 0) {
+ throw new InvalidOptionsException(sprintf(
+ 'Unknown sort %s "%s".',
+ 1 === \count($unknown) ? 'type' : 'types',
+ implode('", "', $unknown)
+ ));
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault(null)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * This method is used for sorting the uses in a namespace.
+ *
+ * @param array<string, bool|int|string> $first
+ * @param array<string, bool|int|string> $second
+ *
+ * @internal
+ */
+ private function sortAlphabetically(array $first, array $second): int
+ {
+ // Replace backslashes by spaces before sorting for correct sort order
+ $firstNamespace = str_replace('\\', ' ', $this->prepareNamespace($first['namespace']));
+ $secondNamespace = str_replace('\\', ' ', $this->prepareNamespace($second['namespace']));
+
+ return strcasecmp($firstNamespace, $secondNamespace);
+ }
+
+ /**
+ * This method is used for sorting the uses statements in a namespace by length.
+ *
+ * @param array<string, bool|int|string> $first
+ * @param array<string, bool|int|string> $second
+ *
+ * @internal
+ */
+ private function sortByLength(array $first, array $second): int
+ {
+ $firstNamespace = (self::IMPORT_TYPE_CLASS === $first['importType'] ? '' : $first['importType'].' ').$this->prepareNamespace($first['namespace']);
+ $secondNamespace = (self::IMPORT_TYPE_CLASS === $second['importType'] ? '' : $second['importType'].' ').$this->prepareNamespace($second['namespace']);
+
+ $firstNamespaceLength = \strlen($firstNamespace);
+ $secondNamespaceLength = \strlen($secondNamespace);
+
+ if ($firstNamespaceLength === $secondNamespaceLength) {
+ $sortResult = strcasecmp($firstNamespace, $secondNamespace);
+ } else {
+ $sortResult = $firstNamespaceLength > $secondNamespaceLength ? 1 : -1;
+ }
+
+ return $sortResult;
+ }
+
+ private function prepareNamespace(string $namespace): string
+ {
+ return trim(Preg::replace('%/\*(.*)\*/%s', '', $namespace));
+ }
+
+ /**
+ * @param int[] $uses
+ */
+ private function getNewOrder(array $uses, Tokens $tokens): array
+ {
+ $indexes = [];
+ $originalIndexes = [];
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ for ($i = \count($uses) - 1; $i >= 0; --$i) {
+ $index = $uses[$i];
+
+ $startIndex = $tokens->getTokenNotOfKindsSibling($index + 1, 1, [T_WHITESPACE]);
+ $endIndex = $tokens->getNextTokenOfKind($startIndex, [';', [T_CLOSE_TAG]]);
+ $previous = $tokens->getPrevMeaningfulToken($endIndex);
+
+ $group = $tokens[$previous]->isGivenKind(CT::T_GROUP_IMPORT_BRACE_CLOSE);
+ if ($tokens[$startIndex]->isGivenKind(CT::T_CONST_IMPORT)) {
+ $type = self::IMPORT_TYPE_CONST;
+ $index = $tokens->getNextNonWhitespace($startIndex);
+ } elseif ($tokens[$startIndex]->isGivenKind(CT::T_FUNCTION_IMPORT)) {
+ $type = self::IMPORT_TYPE_FUNCTION;
+ $index = $tokens->getNextNonWhitespace($startIndex);
+ } else {
+ $type = self::IMPORT_TYPE_CLASS;
+ $index = $startIndex;
+ }
+
+ $namespaceTokens = [];
+
+ while ($index <= $endIndex) {
+ $token = $tokens[$index];
+
+ if ($index === $endIndex || (!$group && $token->equals(','))) {
+ if ($group && self::SORT_NONE !== $this->configuration['sort_algorithm']) {
+ // if group import, sort the items within the group definition
+
+ // figure out where the list of namespace parts within the group def. starts
+ $namespaceTokensCount = \count($namespaceTokens) - 1;
+ $namespace = '';
+ for ($k = 0; $k < $namespaceTokensCount; ++$k) {
+ if ($namespaceTokens[$k]->isGivenKind(CT::T_GROUP_IMPORT_BRACE_OPEN)) {
+ $namespace .= '{';
+
+ break;
+ }
+
+ $namespace .= $namespaceTokens[$k]->getContent();
+ }
+
+ // fetch all parts, split up in an array of strings, move comments to the end
+ $parts = [];
+ $firstIndent = '';
+ $separator = ', ';
+ $lastIndent = '';
+ $hasGroupTrailingComma = false;
+
+ for ($k1 = $k + 1; $k1 < $namespaceTokensCount; ++$k1) {
+ $comment = '';
+ $namespacePart = '';
+ for ($k2 = $k1;; ++$k2) {
+ if ($namespaceTokens[$k2]->equalsAny([',', [CT::T_GROUP_IMPORT_BRACE_CLOSE]])) {
+ break;
+ }
+
+ if ($namespaceTokens[$k2]->isComment()) {
+ $comment .= $namespaceTokens[$k2]->getContent();
+
+ continue;
+ }
+
+ // if there is any line ending inside the group import, it should be indented properly
+ if (
+ '' === $firstIndent
+ && $namespaceTokens[$k2]->isWhitespace()
+ && str_contains($namespaceTokens[$k2]->getContent(), $lineEnding)
+ ) {
+ $lastIndent = $lineEnding;
+ $firstIndent = $lineEnding.$this->whitespacesConfig->getIndent();
+ $separator = ','.$firstIndent;
+ }
+
+ $namespacePart .= $namespaceTokens[$k2]->getContent();
+ }
+
+ $namespacePart = trim($namespacePart);
+ if ('' === $namespacePart) {
+ $hasGroupTrailingComma = true;
+
+ continue;
+ }
+
+ $comment = trim($comment);
+ if ('' !== $comment) {
+ $namespacePart .= ' '.$comment;
+ }
+
+ $parts[] = $namespacePart;
+
+ $k1 = $k2;
+ }
+
+ $sortedParts = $parts;
+ sort($parts);
+
+ // check if the order needs to be updated, otherwise don't touch as we might change valid CS (to other valid CS).
+ if ($sortedParts === $parts) {
+ $namespace = Tokens::fromArray($namespaceTokens)->generateCode();
+ } else {
+ $namespace .= $firstIndent.implode($separator, $parts).($hasGroupTrailingComma ? ',' : '').$lastIndent.'}';
+ }
+ } else {
+ $namespace = Tokens::fromArray($namespaceTokens)->generateCode();
+ }
+
+ $indexes[$startIndex] = [
+ 'namespace' => $namespace,
+ 'startIndex' => $startIndex,
+ 'endIndex' => $index - 1,
+ 'importType' => $type,
+ 'group' => $group,
+ ];
+
+ $originalIndexes[] = $startIndex;
+
+ if ($index === $endIndex) {
+ break;
+ }
+
+ $namespaceTokens = [];
+ $nextPartIndex = $tokens->getTokenNotOfKindSibling($index, 1, [[','], [T_WHITESPACE]]);
+ $startIndex = $nextPartIndex;
+ $index = $nextPartIndex;
+
+ continue;
+ }
+
+ $namespaceTokens[] = $token;
+ ++$index;
+ }
+ }
+
+ // Is sort types provided, sorting by groups and each group by algorithm
+ if (null !== $this->configuration['imports_order']) {
+ // Grouping indexes by import type.
+ $groupedByTypes = [];
+ foreach ($indexes as $startIndex => $item) {
+ $groupedByTypes[$item['importType']][$startIndex] = $item;
+ }
+
+ // Sorting each group by algorithm.
+ foreach ($groupedByTypes as $type => $groupIndexes) {
+ $groupedByTypes[$type] = $this->sortByAlgorithm($groupIndexes);
+ }
+
+ // Ordering groups
+ $sortedGroups = [];
+ foreach ($this->configuration['imports_order'] as $type) {
+ if (isset($groupedByTypes[$type]) && !empty($groupedByTypes[$type])) {
+ foreach ($groupedByTypes[$type] as $startIndex => $item) {
+ $sortedGroups[$startIndex] = $item;
+ }
+ }
+ }
+ $indexes = $sortedGroups;
+ } else {
+ // Sorting only by algorithm
+ $indexes = $this->sortByAlgorithm($indexes);
+ }
+
+ $index = -1;
+ $usesOrder = [];
+
+ // Loop trough the index but use original index order
+ foreach ($indexes as $v) {
+ $usesOrder[$originalIndexes[++$index]] = $v;
+ }
+
+ return $usesOrder;
+ }
+
+ /**
+ * @param array[] $indexes
+ */
+ private function sortByAlgorithm(array $indexes): array
+ {
+ if (self::SORT_ALPHA === $this->configuration['sort_algorithm']) {
+ uasort($indexes, [$this, 'sortAlphabetically']);
+ } elseif (self::SORT_LENGTH === $this->configuration['sort_algorithm']) {
+ uasort($indexes, [$this, 'sortByLength']);
+ }
+
+ return $indexes;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php
new file mode 100644
index 0000000..0a48baa
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleImportPerStatementFixer.php
@@ -0,0 +1,239 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * Fixer for rules defined in PSR2 ¶3.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class SingleImportPerStatementFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST be one use keyword per declaration.',
+ [new CodeSample("<?php\nuse Foo, Sample, Sample\\Sample as Sample2;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MultilineWhitespaceBeforeSemicolonsFixer, NoLeadingImportSlashFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoUnusedImportsFixer, SpaceAfterSemicolonFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_USE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ foreach (array_reverse($tokensAnalyzer->getImportUseIndexes()) as $index) {
+ $endIndex = $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]);
+ $groupClose = $tokens->getPrevMeaningfulToken($endIndex);
+
+ if ($tokens[$groupClose]->isGivenKind(CT::T_GROUP_IMPORT_BRACE_CLOSE)) {
+ $this->fixGroupUse($tokens, $index, $endIndex);
+ } else {
+ $this->fixMultipleUse($tokens, $index, $endIndex);
+ }
+ }
+ }
+
+ private function getGroupDeclaration(Tokens $tokens, int $index): array
+ {
+ $groupPrefix = '';
+ $comment = '';
+ $groupOpenIndex = null;
+
+ for ($i = $index + 1;; ++$i) {
+ if ($tokens[$i]->isGivenKind(CT::T_GROUP_IMPORT_BRACE_OPEN)) {
+ $groupOpenIndex = $i;
+
+ break;
+ }
+
+ if ($tokens[$i]->isComment()) {
+ $comment .= $tokens[$i]->getContent();
+ if (!$tokens[$i - 1]->isWhitespace() && !$tokens[$i + 1]->isWhitespace()) {
+ $groupPrefix .= ' ';
+ }
+
+ continue;
+ }
+
+ if ($tokens[$i]->isWhitespace()) {
+ $groupPrefix .= ' ';
+
+ continue;
+ }
+
+ $groupPrefix .= $tokens[$i]->getContent();
+ }
+
+ return [
+ rtrim($groupPrefix),
+ $groupOpenIndex,
+ $tokens->findBlockEnd(Tokens::BLOCK_TYPE_GROUP_IMPORT_BRACE, $groupOpenIndex),
+ $comment,
+ ];
+ }
+
+ /**
+ * @return string[]
+ */
+ private function getGroupStatements(Tokens $tokens, string $groupPrefix, int $groupOpenIndex, int $groupCloseIndex, string $comment): array
+ {
+ $statements = [];
+ $statement = $groupPrefix;
+
+ for ($i = $groupOpenIndex + 1; $i <= $groupCloseIndex; ++$i) {
+ $token = $tokens[$i];
+
+ if ($token->equals(',') && $tokens[$tokens->getNextMeaningfulToken($i)]->equals([CT::T_GROUP_IMPORT_BRACE_CLOSE])) {
+ continue;
+ }
+
+ if ($token->equalsAny([',', [CT::T_GROUP_IMPORT_BRACE_CLOSE]])) {
+ $statements[] = 'use'.$statement.';';
+ $statement = $groupPrefix;
+
+ continue;
+ }
+
+ if ($token->isWhitespace()) {
+ $j = $tokens->getNextMeaningfulToken($i);
+
+ if ($tokens[$j]->equals([T_AS])) {
+ $statement .= ' as ';
+ $i += 2;
+ } elseif ($tokens[$j]->equals([T_FUNCTION])) {
+ $statement = ' function'.$statement;
+ $i += 2;
+ } elseif ($tokens[$j]->equals([T_CONST])) {
+ $statement = ' const'.$statement;
+ $i += 2;
+ }
+
+ if ($token->isWhitespace(" \t") || !str_starts_with($tokens[$i - 1]->getContent(), '//')) {
+ continue;
+ }
+ }
+
+ $statement .= $token->getContent();
+ }
+
+ if ('' !== $comment) {
+ $statements[0] .= ' '.$comment;
+ }
+
+ return $statements;
+ }
+
+ private function fixGroupUse(Tokens $tokens, int $index, int $endIndex): void
+ {
+ [$groupPrefix, $groupOpenIndex, $groupCloseIndex, $comment] = $this->getGroupDeclaration($tokens, $index);
+ $statements = $this->getGroupStatements($tokens, $groupPrefix, $groupOpenIndex, $groupCloseIndex, $comment);
+
+ if (\count($statements) < 2) {
+ return;
+ }
+
+ $tokens->clearRange($index, $groupCloseIndex);
+ if ($tokens[$endIndex]->equals(';')) {
+ $tokens->clearAt($endIndex);
+ }
+
+ $ending = $this->whitespacesConfig->getLineEnding();
+ $importTokens = Tokens::fromCode('<?php '.implode($ending, $statements));
+ $importTokens->clearAt(0);
+ $importTokens->clearEmptyTokens();
+
+ $tokens->insertAt($index, $importTokens);
+ }
+
+ private function fixMultipleUse(Tokens $tokens, int $index, int $endIndex): void
+ {
+ $nextTokenIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$nextTokenIndex]->isGivenKind(CT::T_FUNCTION_IMPORT)) {
+ $leadingTokens = [
+ new Token([CT::T_FUNCTION_IMPORT, 'function']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+ } elseif ($tokens[$nextTokenIndex]->isGivenKind(CT::T_CONST_IMPORT)) {
+ $leadingTokens = [
+ new Token([CT::T_CONST_IMPORT, 'const']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+ } else {
+ $leadingTokens = [];
+ }
+
+ $ending = $this->whitespacesConfig->getLineEnding();
+
+ for ($i = $endIndex - 1; $i > $index; --$i) {
+ if (!$tokens[$i]->equals(',')) {
+ continue;
+ }
+
+ $tokens[$i] = new Token(';');
+ $i = $tokens->getNextMeaningfulToken($i);
+
+ $tokens->insertAt($i, new Token([T_USE, 'use']));
+ $tokens->insertAt($i + 1, new Token([T_WHITESPACE, ' ']));
+
+ foreach ($leadingTokens as $offset => $leadingToken) {
+ $tokens->insertAt($i + 2 + $offset, clone $leadingTokens[$offset]);
+ }
+
+ $indent = WhitespacesAnalyzer::detectIndent($tokens, $index);
+
+ if ($tokens[$i - 1]->isWhitespace()) {
+ $tokens[$i - 1] = new Token([T_WHITESPACE, $ending.$indent]);
+ } elseif (!str_contains($tokens[$i - 1]->getContent(), "\n")) {
+ $tokens->insertAt($i, new Token([T_WHITESPACE, $ending.$indent]));
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleLineAfterImportsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleLineAfterImportsFixer.php
new file mode 100644
index 0000000..773f25b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/SingleLineAfterImportsFixer.php
@@ -0,0 +1,161 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Import;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use PhpCsFixer\Utils;
+
+/**
+ * Fixer for rules defined in PSR2 ¶3.
+ *
+ * @author Ceeram <ceeram@cakephp.org>
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class SingleLineAfterImportsFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_USE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block.',
+ [
+ new CodeSample(
+ '<?php
+namespace Foo;
+
+use Bar;
+use Baz;
+final class Example
+{
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+namespace Foo;
+
+use Bar;
+use Baz;
+
+
+final class Example
+{
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoUnusedImportsFixer.
+ */
+ public function getPriority(): int
+ {
+ return -11;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $ending = $this->whitespacesConfig->getLineEnding();
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ $added = 0;
+ foreach ($tokensAnalyzer->getImportUseIndexes() as $index) {
+ $index += $added;
+ $indent = '';
+
+ // if previous line ends with comment and current line starts with whitespace, use current indent
+ if ($tokens[$index - 1]->isWhitespace(" \t") && $tokens[$index - 2]->isGivenKind(T_COMMENT)) {
+ $indent = $tokens[$index - 1]->getContent();
+ } elseif ($tokens[$index - 1]->isWhitespace()) {
+ $indent = Utils::calculateTrailingWhitespaceIndent($tokens[$index - 1]);
+ }
+
+ $semicolonIndex = $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]); // Handle insert index for inline T_COMMENT with whitespace after semicolon
+ $insertIndex = $semicolonIndex;
+
+ if ($tokens[$semicolonIndex]->isGivenKind(T_CLOSE_TAG)) {
+ if ($tokens[$insertIndex - 1]->isWhitespace()) {
+ --$insertIndex;
+ }
+
+ $tokens->insertAt($insertIndex, new Token(';'));
+ ++$added;
+ }
+
+ if ($semicolonIndex === \count($tokens) - 1) {
+ $tokens->insertAt($insertIndex + 1, new Token([T_WHITESPACE, $ending.$ending.$indent]));
+ ++$added;
+ } else {
+ $newline = $ending;
+ $tokens[$semicolonIndex]->isGivenKind(T_CLOSE_TAG) ? --$insertIndex : ++$insertIndex;
+ if ($tokens[$insertIndex]->isWhitespace(" \t") && $tokens[$insertIndex + 1]->isComment()) {
+ ++$insertIndex;
+ }
+
+ // Increment insert index for inline T_COMMENT or T_DOC_COMMENT
+ if ($tokens[$insertIndex]->isComment()) {
+ ++$insertIndex;
+ }
+
+ $afterSemicolon = $tokens->getNextMeaningfulToken($semicolonIndex);
+ if (null === $afterSemicolon || !$tokens[$afterSemicolon]->isGivenKind(T_USE)) {
+ $newline .= $ending;
+ }
+
+ if ($tokens[$insertIndex]->isWhitespace()) {
+ $nextToken = $tokens[$insertIndex];
+ if (2 === substr_count($nextToken->getContent(), "\n")) {
+ continue;
+ }
+ $nextMeaningfulAfterUseIndex = $tokens->getNextMeaningfulToken($insertIndex);
+ if (null !== $nextMeaningfulAfterUseIndex && $tokens[$nextMeaningfulAfterUseIndex]->isGivenKind(T_USE)) {
+ if (substr_count($nextToken->getContent(), "\n") < 1) {
+ $tokens[$insertIndex] = new Token([T_WHITESPACE, $newline.$indent.ltrim($nextToken->getContent())]);
+ }
+ } else {
+ $tokens[$insertIndex] = new Token([T_WHITESPACE, $newline.$indent.ltrim($nextToken->getContent())]);
+ }
+ } else {
+ $tokens->insertAt($insertIndex, new Token([T_WHITESPACE, $newline.$indent]));
+ ++$added;
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ClassKeywordRemoveFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ClassKeywordRemoveFixer.php
new file mode 100644
index 0000000..23b2b48
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ClassKeywordRemoveFixer.php
@@ -0,0 +1,253 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\DeprecatedFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @deprecated
+ *
+ * @author Sullivan Senechal <soullivaneuh@gmail.com>
+ */
+final class ClassKeywordRemoveFixer extends AbstractFixer implements DeprecatedFixerInterface
+{
+ /**
+ * @var string[]
+ */
+ private $imports = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts `::class` keywords to FQCN strings.',
+ [
+ new CodeSample(
+ '<?php
+
+use Foo\Bar\Baz;
+
+$className = Baz::class;
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getSuccessorsNames(): array
+ {
+ return [];
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUnusedImportsFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(CT::T_CLASS_CONSTANT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $namespacesAnalyzer = new NamespacesAnalyzer();
+
+ $previousNamespaceScopeEndIndex = 0;
+ foreach ($namespacesAnalyzer->getDeclarations($tokens) as $declaration) {
+ $this->replaceClassKeywordsSection($tokens, '', $previousNamespaceScopeEndIndex, $declaration->getStartIndex());
+ $this->replaceClassKeywordsSection($tokens, $declaration->getFullName(), $declaration->getStartIndex(), $declaration->getScopeEndIndex());
+ $previousNamespaceScopeEndIndex = $declaration->getScopeEndIndex();
+ }
+
+ $this->replaceClassKeywordsSection($tokens, '', $previousNamespaceScopeEndIndex, $tokens->count() - 1);
+ }
+
+ private function storeImports(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+ $this->imports = [];
+
+ /** @var int $index */
+ foreach ($tokensAnalyzer->getImportUseIndexes() as $index) {
+ if ($index < $startIndex || $index > $endIndex) {
+ continue;
+ }
+
+ $import = '';
+ while ($index = $tokens->getNextMeaningfulToken($index)) {
+ if ($tokens[$index]->equalsAny([';', [CT::T_GROUP_IMPORT_BRACE_OPEN]]) || $tokens[$index]->isGivenKind(T_AS)) {
+ break;
+ }
+
+ $import .= $tokens[$index]->getContent();
+ }
+
+ // Imports group (PHP 7 spec)
+ if ($tokens[$index]->isGivenKind(CT::T_GROUP_IMPORT_BRACE_OPEN)) {
+ $groupEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_GROUP_IMPORT_BRACE, $index);
+ $groupImports = array_map(
+ static function (string $import): string {
+ return trim($import);
+ },
+ explode(',', $tokens->generatePartialCode($index + 1, $groupEndIndex - 1))
+ );
+ foreach ($groupImports as $groupImport) {
+ $groupImportParts = array_map(static function (string $import): string {
+ return trim($import);
+ }, explode(' as ', $groupImport));
+ if (2 === \count($groupImportParts)) {
+ $this->imports[$groupImportParts[1]] = $import.$groupImportParts[0];
+ } else {
+ $this->imports[] = $import.$groupImport;
+ }
+ }
+ } elseif ($tokens[$index]->isGivenKind(T_AS)) {
+ $aliasIndex = $tokens->getNextMeaningfulToken($index);
+ $alias = $tokens[$aliasIndex]->getContent();
+ $this->imports[$alias] = $import;
+ } else {
+ $this->imports[] = $import;
+ }
+ }
+ }
+
+ private function replaceClassKeywordsSection(Tokens $tokens, string $namespace, int $startIndex, int $endIndex): void
+ {
+ if ($endIndex - $startIndex < 3) {
+ return;
+ }
+
+ $this->storeImports($tokens, $startIndex, $endIndex);
+
+ $ctClassTokens = $tokens->findGivenKind(CT::T_CLASS_CONSTANT, $startIndex, $endIndex);
+ foreach (array_reverse(array_keys($ctClassTokens)) as $classIndex) {
+ $this->replaceClassKeyword($tokens, $namespace, $classIndex);
+ }
+ }
+
+ private function replaceClassKeyword(Tokens $tokens, string $namespacePrefix, int $classIndex): void
+ {
+ $classEndIndex = $tokens->getPrevMeaningfulToken($classIndex);
+ $classEndIndex = $tokens->getPrevMeaningfulToken($classEndIndex);
+
+ if (!$tokens[$classEndIndex]->isGivenKind(T_STRING)) {
+ return;
+ }
+
+ if ($tokens[$classEndIndex]->equalsAny([[T_STRING, 'self'], [T_STATIC, 'static'], [T_STRING, 'parent']], false)) {
+ return;
+ }
+
+ $classBeginIndex = $classEndIndex;
+ while (true) {
+ $prev = $tokens->getPrevMeaningfulToken($classBeginIndex);
+ if (!$tokens[$prev]->isGivenKind([T_NS_SEPARATOR, T_STRING])) {
+ break;
+ }
+
+ $classBeginIndex = $prev;
+ }
+
+ $classString = $tokens->generatePartialCode(
+ $tokens[$classBeginIndex]->isGivenKind(T_NS_SEPARATOR)
+ ? $tokens->getNextMeaningfulToken($classBeginIndex)
+ : $classBeginIndex,
+ $classEndIndex
+ );
+
+ $classImport = false;
+ if ($tokens[$classBeginIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $namespacePrefix = '';
+ } else {
+ foreach ($this->imports as $alias => $import) {
+ if ($classString === $alias) {
+ $classImport = $import;
+
+ break;
+ }
+
+ $classStringArray = explode('\\', $classString);
+ $namespaceToTest = $classStringArray[0];
+
+ if (0 === strcmp($namespaceToTest, substr($import, -\strlen($namespaceToTest)))) {
+ $classImport = $import;
+
+ break;
+ }
+ }
+ }
+
+ for ($i = $classBeginIndex; $i <= $classIndex; ++$i) {
+ if (!$tokens[$i]->isComment() && !($tokens[$i]->isWhitespace() && str_contains($tokens[$i]->getContent(), "\n"))) {
+ $tokens->clearAt($i);
+ }
+ }
+
+ $tokens->insertAt($classBeginIndex, new Token([
+ T_CONSTANT_ENCAPSED_STRING,
+ "'".$this->makeClassFQN($namespacePrefix, $classImport, $classString)."'",
+ ]));
+ }
+
+ /**
+ * @param false|string $classImport
+ */
+ private function makeClassFQN(string $namespacePrefix, $classImport, string $classString): string
+ {
+ if (false === $classImport) {
+ return ('' !== $namespacePrefix ? ($namespacePrefix.'\\') : '').$classString;
+ }
+
+ $classStringArray = explode('\\', $classString);
+ $classStringLength = \count($classStringArray);
+ $classImportArray = explode('\\', $classImport);
+ $classImportLength = \count($classImportArray);
+
+ if (1 === $classStringLength) {
+ return $classImport;
+ }
+
+ return implode('\\', array_merge(
+ \array_slice($classImportArray, 0, $classImportLength - $classStringLength + 1),
+ $classStringArray
+ ));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php
new file mode 100644
index 0000000..cc53bfd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveIssetsFixer.php
@@ -0,0 +1,172 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class CombineConsecutiveIssetsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Using `isset($var) &&` multiple times should be done in one call.',
+ [new CodeSample("<?php\n\$a = isset(\$a) && isset(\$b);\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before MultilineWhitespaceBeforeSemicolonsFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoSpacesInsideParenthesisFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer.
+ */
+ public function getPriority(): int
+ {
+ return 3;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_ISSET, T_BOOLEAN_AND]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokenCount = $tokens->count();
+
+ for ($index = 1; $index < $tokenCount; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_ISSET)
+ || !$tokens[$tokens->getPrevMeaningfulToken($index)]->equalsAny(['(', '{', ';', '=', [T_OPEN_TAG], [T_BOOLEAN_AND], [T_BOOLEAN_OR]])) {
+ continue;
+ }
+
+ $issetInfo = $this->getIssetInfo($tokens, $index);
+ $issetCloseBraceIndex = end($issetInfo); // ')' token
+ $insertLocation = prev($issetInfo) + 1; // one index after the previous meaningful of ')'
+
+ $booleanAndTokenIndex = $tokens->getNextMeaningfulToken($issetCloseBraceIndex);
+
+ while ($tokens[$booleanAndTokenIndex]->isGivenKind(T_BOOLEAN_AND)) {
+ $issetIndex = $tokens->getNextMeaningfulToken($booleanAndTokenIndex);
+ if (!$tokens[$issetIndex]->isGivenKind(T_ISSET)) {
+ $index = $issetIndex;
+
+ break;
+ }
+
+ // fetch info about the 'isset' statement that we're merging
+ $nextIssetInfo = $this->getIssetInfo($tokens, $issetIndex);
+
+ $nextMeaningfulTokenIndex = $tokens->getNextMeaningfulToken(end($nextIssetInfo));
+ $nextMeaningfulToken = $tokens[$nextMeaningfulTokenIndex];
+
+ if (!$nextMeaningfulToken->equalsAny([')', '}', ';', [T_CLOSE_TAG], [T_BOOLEAN_AND], [T_BOOLEAN_OR]])) {
+ $index = $nextMeaningfulTokenIndex;
+
+ break;
+ }
+
+ // clone what we want to move, do not clone '(' and ')' of the 'isset' statement we're merging
+ $clones = $this->getTokenClones($tokens, \array_slice($nextIssetInfo, 1, -1));
+
+ // clean up now the tokens of the 'isset' statement we're merging
+ $this->clearTokens($tokens, array_merge($nextIssetInfo, [$issetIndex, $booleanAndTokenIndex]));
+
+ // insert the tokens to create the new statement
+ array_unshift($clones, new Token(','), new Token([T_WHITESPACE, ' ']));
+ $tokens->insertAt($insertLocation, $clones);
+
+ // correct some counts and offset based on # of tokens inserted
+ $numberOfTokensInserted = \count($clones);
+ $tokenCount += $numberOfTokensInserted;
+ $issetCloseBraceIndex += $numberOfTokensInserted;
+ $insertLocation += $numberOfTokensInserted;
+
+ $booleanAndTokenIndex = $tokens->getNextMeaningfulToken($issetCloseBraceIndex);
+ }
+ }
+ }
+
+ /**
+ * @param int[] $indexes
+ */
+ private function clearTokens(Tokens $tokens, array $indexes): void
+ {
+ foreach ($indexes as $index) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+ }
+
+ /**
+ * @param int $index of T_ISSET
+ *
+ * @return int[] indexes of meaningful tokens belonging to the isset statement
+ */
+ private function getIssetInfo(Tokens $tokens, int $index): array
+ {
+ $openIndex = $tokens->getNextMeaningfulToken($index);
+
+ $braceOpenCount = 1;
+ $meaningfulTokenIndexes = [$openIndex];
+
+ for ($i = $openIndex + 1;; ++$i) {
+ if ($tokens[$i]->isWhitespace() || $tokens[$i]->isComment()) {
+ continue;
+ }
+
+ $meaningfulTokenIndexes[] = $i;
+
+ if ($tokens[$i]->equals(')')) {
+ --$braceOpenCount;
+ if (0 === $braceOpenCount) {
+ break;
+ }
+ } elseif ($tokens[$i]->equals('(')) {
+ ++$braceOpenCount;
+ }
+ }
+
+ return $meaningfulTokenIndexes;
+ }
+
+ /**
+ * @param int[] $indexes
+ *
+ * @return Token[]
+ */
+ private function getTokenClones(Tokens $tokens, array $indexes): array
+ {
+ $clones = [];
+
+ foreach ($indexes as $i) {
+ $clones[] = clone $tokens[$i];
+ }
+
+ return $clones;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixer.php
new file mode 100644
index 0000000..6a595b6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/CombineConsecutiveUnsetsFixer.php
@@ -0,0 +1,188 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class CombineConsecutiveUnsetsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Calling `unset` on multiple items should be done in one call.',
+ [new CodeSample("<?php\nunset(\$a); unset(\$b);\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer, SpaceAfterSemicolonFixer.
+ * Must run after NoEmptyStatementFixer, NoUnsetOnPropertyFixer, NoUselessElseFixer.
+ */
+ public function getPriority(): int
+ {
+ return 24;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_UNSET);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_UNSET)) {
+ continue;
+ }
+
+ $previousUnsetCall = $this->getPreviousUnsetCall($tokens, $index);
+ if (\is_int($previousUnsetCall)) {
+ $index = $previousUnsetCall;
+
+ continue;
+ }
+
+ [$previousUnset, , $previousUnsetBraceEnd] = $previousUnsetCall;
+
+ // Merge the tokens inside the 'unset' call into the previous one 'unset' call.
+ $tokensAddCount = $this->moveTokens(
+ $tokens,
+ $nextUnsetContentStart = $tokens->getNextTokenOfKind($index, ['(']),
+ $nextUnsetContentEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $nextUnsetContentStart),
+ $previousUnsetBraceEnd - 1
+ );
+
+ if (!$tokens[$previousUnsetBraceEnd]->isWhitespace()) {
+ $tokens->insertAt($previousUnsetBraceEnd, new Token([T_WHITESPACE, ' ']));
+ ++$tokensAddCount;
+ }
+
+ $tokens->insertAt($previousUnsetBraceEnd, new Token(','));
+ ++$tokensAddCount;
+
+ // Remove 'unset', '(', ')' and (possibly) ';' from the merged 'unset' call.
+ $this->clearOffsetTokens($tokens, $tokensAddCount, [$index, $nextUnsetContentStart, $nextUnsetContentEnd]);
+
+ $nextUnsetSemicolon = $tokens->getNextMeaningfulToken($nextUnsetContentEnd);
+ if (null !== $nextUnsetSemicolon && $tokens[$nextUnsetSemicolon]->equals(';')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($nextUnsetSemicolon);
+ }
+
+ $index = $previousUnset + 1;
+ }
+ }
+
+ /**
+ * @param int[] $indices
+ */
+ private function clearOffsetTokens(Tokens $tokens, int $offset, array $indices): void
+ {
+ foreach ($indices as $index) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index + $offset);
+ }
+ }
+
+ /**
+ * Find a previous call to unset directly before the index.
+ *
+ * Returns an array with
+ * * unset index
+ * * opening brace index
+ * * closing brace index
+ * * end semicolon index
+ *
+ * Or the index to where the method looked for a call.
+ *
+ * @return int|int[]
+ */
+ private function getPreviousUnsetCall(Tokens $tokens, int $index)
+ {
+ $previousUnsetSemicolon = $tokens->getPrevMeaningfulToken($index);
+ if (null === $previousUnsetSemicolon) {
+ return $index;
+ }
+
+ if (!$tokens[$previousUnsetSemicolon]->equals(';')) {
+ return $previousUnsetSemicolon;
+ }
+
+ $previousUnsetBraceEnd = $tokens->getPrevMeaningfulToken($previousUnsetSemicolon);
+ if (null === $previousUnsetBraceEnd) {
+ return $index;
+ }
+
+ if (!$tokens[$previousUnsetBraceEnd]->equals(')')) {
+ return $previousUnsetBraceEnd;
+ }
+
+ $previousUnsetBraceStart = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $previousUnsetBraceEnd);
+ $previousUnset = $tokens->getPrevMeaningfulToken($previousUnsetBraceStart);
+ if (null === $previousUnset) {
+ return $index;
+ }
+
+ if (!$tokens[$previousUnset]->isGivenKind(T_UNSET)) {
+ return $previousUnset;
+ }
+
+ return [
+ $previousUnset,
+ $previousUnsetBraceStart,
+ $previousUnsetBraceEnd,
+ $previousUnsetSemicolon,
+ ];
+ }
+
+ /**
+ * @param int $start Index previous of the first token to move
+ * @param int $end Index of the last token to move
+ * @param int $to Upper boundary index
+ *
+ * @return int Number of tokens inserted
+ */
+ private function moveTokens(Tokens $tokens, int $start, int $end, int $to): int
+ {
+ $added = 0;
+ for ($i = $start + 1; $i < $end; $i += 2) {
+ if ($tokens[$i]->isWhitespace() && $tokens[$to + 1]->isWhitespace()) {
+ $tokens[$to + 1] = new Token([T_WHITESPACE, $tokens[$to + 1]->getContent().$tokens[$i]->getContent()]);
+ } else {
+ $tokens->insertAt(++$to, clone $tokens[$i]);
+ ++$end;
+ ++$added;
+ }
+
+ $tokens->clearAt($i + 1);
+ }
+
+ return $added;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php
new file mode 100644
index 0000000..c132034
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareEqualNormalizeFixer.php
@@ -0,0 +1,143 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class DeclareEqualNormalizeFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var string
+ */
+ private $callback;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->callback = 'none' === $this->configuration['space'] ? 'removeWhitespaceAroundToken' : 'ensureWhitespaceAroundToken';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Equal sign in declare statement should be surrounded by spaces or not following configuration.',
+ [
+ new CodeSample("<?php\ndeclare(ticks = 1);\n"),
+ new CodeSample("<?php\ndeclare(ticks=1);\n", ['space' => 'single']),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after DeclareStrictTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DECLARE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $callback = $this->callback;
+ for ($index = 0, $count = $tokens->count(); $index < $count - 6; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_DECLARE)) {
+ continue;
+ }
+
+ while (!$tokens[++$index]->equals('='));
+
+ $this->{$callback}($tokens, $index);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('space', 'Spacing to apply around the equal sign.'))
+ ->setAllowedValues(['single', 'none'])
+ ->setDefault('none')
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param int $index of `=` token
+ */
+ private function ensureWhitespaceAroundToken(Tokens $tokens, int $index): void
+ {
+ if ($tokens[$index + 1]->isWhitespace()) {
+ if (' ' !== $tokens[$index + 1]->getContent()) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ } else {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ if ($tokens[$index - 1]->isWhitespace()) {
+ if (' ' !== $tokens[$index - 1]->getContent() && !$tokens[$tokens->getPrevNonWhitespace($index - 1)]->isComment()) {
+ $tokens[$index - 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ } else {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+
+ /**
+ * @param int $index of `=` token
+ */
+ private function removeWhitespaceAroundToken(Tokens $tokens, int $index): void
+ {
+ if (!$tokens[$tokens->getPrevNonWhitespace($index)]->isComment()) {
+ $tokens->removeLeadingWhitespace($index);
+ }
+
+ $tokens->removeTrailingWhitespace($index);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareParenthesesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareParenthesesFixer.php
new file mode 100644
index 0000000..e387973
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DeclareParenthesesFixer.php
@@ -0,0 +1,56 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class DeclareParenthesesFixer extends AbstractFixer
+{
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There must not be spaces around `declare` statement parentheses.',
+ [new CodeSample("<?php declare ( strict_types=1 );\n")]
+ );
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DECLARE);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_DECLARE)) {
+ continue;
+ }
+
+ $tokens->removeTrailingWhitespace($index);
+
+ $startParenthesisIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $tokens->removeTrailingWhitespace($startParenthesisIndex);
+
+ $endParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startParenthesisIndex);
+ $tokens->removeLeadingWhitespace($endParenthesisIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DirConstantFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DirConstantFixer.php
new file mode 100644
index 0000000..112101a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/DirConstantFixer.php
@@ -0,0 +1,138 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ */
+final class DirConstantFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replaces `dirname(__FILE__)` expression with equivalent `__DIR__` constant.',
+ [new CodeSample("<?php\n\$a = dirname(__FILE__);\n")],
+ null,
+ 'Risky when the function `dirname` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_STRING, T_FILE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before CombineNestedDirnameFixer.
+ */
+ public function getPriority(): int
+ {
+ return 40;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $currIndex = 0;
+
+ do {
+ $boundaries = $this->find('dirname', $tokens, $currIndex, $tokens->count() - 1);
+ if (null === $boundaries) {
+ return;
+ }
+
+ [$functionNameIndex, $openParenthesis, $closeParenthesis] = $boundaries;
+
+ // analysing cursor shift, so nested expressions kept processed
+ $currIndex = $openParenthesis;
+
+ // ensure __FILE__ is in between (...)
+
+ $fileCandidateRightIndex = $tokens->getPrevMeaningfulToken($closeParenthesis);
+ $trailingCommaIndex = null;
+
+ if ($tokens[$fileCandidateRightIndex]->equals(',')) {
+ $trailingCommaIndex = $fileCandidateRightIndex;
+ $fileCandidateRightIndex = $tokens->getPrevMeaningfulToken($fileCandidateRightIndex);
+ }
+
+ $fileCandidateRight = $tokens[$fileCandidateRightIndex];
+
+ if (!$fileCandidateRight->isGivenKind(T_FILE)) {
+ continue;
+ }
+
+ $fileCandidateLeftIndex = $tokens->getNextMeaningfulToken($openParenthesis);
+ $fileCandidateLeft = $tokens[$fileCandidateLeftIndex];
+
+ if (!$fileCandidateLeft->isGivenKind(T_FILE)) {
+ continue;
+ }
+
+ // get rid of root namespace when it used
+ $namespaceCandidateIndex = $tokens->getPrevMeaningfulToken($functionNameIndex);
+ $namespaceCandidate = $tokens[$namespaceCandidateIndex];
+
+ if ($namespaceCandidate->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->removeTrailingWhitespace($namespaceCandidateIndex);
+ $tokens->clearAt($namespaceCandidateIndex);
+ }
+
+ if (null !== $trailingCommaIndex) {
+ if (!$tokens[$tokens->getNextNonWhitespace($trailingCommaIndex)]->isComment()) {
+ $tokens->removeTrailingWhitespace($trailingCommaIndex);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($trailingCommaIndex);
+ }
+
+ // closing parenthesis removed with leading spaces
+ if (!$tokens[$tokens->getNextNonWhitespace($closeParenthesis)]->isComment()) {
+ $tokens->removeLeadingWhitespace($closeParenthesis);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeParenthesis);
+
+ // opening parenthesis removed with trailing and leading spaces
+ if (!$tokens[$tokens->getNextNonWhitespace($openParenthesis)]->isComment()) {
+ $tokens->removeLeadingWhitespace($openParenthesis);
+ }
+
+ $tokens->removeTrailingWhitespace($openParenthesis);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openParenthesis);
+
+ // replace constant and remove function name
+ $tokens[$fileCandidateLeftIndex] = new Token([T_DIR, '__DIR__']);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($functionNameIndex);
+ } while (null !== $currIndex);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php
new file mode 100644
index 0000000..24b607f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ErrorSuppressionFixer.php
@@ -0,0 +1,186 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Jules Pietri <jules@heahprod.com>
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class ErrorSuppressionFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const OPTION_MUTE_DEPRECATION_ERROR = 'mute_deprecation_error';
+
+ /**
+ * @internal
+ */
+ public const OPTION_NOISE_REMAINING_USAGES = 'noise_remaining_usages';
+
+ /**
+ * @internal
+ */
+ public const OPTION_NOISE_REMAINING_USAGES_EXCLUDE = 'noise_remaining_usages_exclude';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Error control operator should be added to deprecation notices and/or removed from other cases.',
+ [
+ new CodeSample("<?php\ntrigger_error('Warning.', E_USER_DEPRECATED);\n"),
+ new CodeSample(
+ "<?php\n@mkdir(\$dir);\n@unlink(\$path);\n",
+ [self::OPTION_NOISE_REMAINING_USAGES => true]
+ ),
+ new CodeSample(
+ "<?php\n@mkdir(\$dir);\n@unlink(\$path);\n",
+ [
+ self::OPTION_NOISE_REMAINING_USAGES => true,
+ self::OPTION_NOISE_REMAINING_USAGES_EXCLUDE => ['unlink'],
+ ]
+ ),
+ ],
+ null,
+ 'Risky because adding/removing `@` might cause changes to code behaviour or if `trigger_error` function is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder(self::OPTION_MUTE_DEPRECATION_ERROR, 'Whether to add `@` in deprecation notices.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder(self::OPTION_NOISE_REMAINING_USAGES, 'Whether to remove `@` in remaining usages.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder(self::OPTION_NOISE_REMAINING_USAGES_EXCLUDE, 'List of global functions to exclude from removing `@`'))
+ ->setAllowedTypes(['array'])
+ ->setDefault([])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+ $excludedFunctions = array_map(static function (string $function): string {
+ return strtolower($function);
+ }, $this->configuration[self::OPTION_NOISE_REMAINING_USAGES_EXCLUDE]);
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (true === $this->configuration[self::OPTION_NOISE_REMAINING_USAGES] && $token->equals('@')) {
+ $tokens->clearAt($index);
+
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ continue;
+ }
+
+ $functionIndex = $index;
+ $startIndex = $index;
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $startIndex = $prevIndex;
+ $prevIndex = $tokens->getPrevMeaningfulToken($startIndex);
+ }
+
+ $index = $prevIndex;
+
+ if ($this->isDeprecationErrorCall($tokens, $functionIndex)) {
+ if (false === $this->configuration[self::OPTION_MUTE_DEPRECATION_ERROR]) {
+ continue;
+ }
+
+ if ($tokens[$prevIndex]->equals('@')) {
+ continue;
+ }
+
+ $tokens->insertAt($startIndex, new Token('@'));
+
+ continue;
+ }
+
+ if (!$tokens[$prevIndex]->equals('@')) {
+ continue;
+ }
+
+ if (true === $this->configuration[self::OPTION_NOISE_REMAINING_USAGES] && !\in_array($tokens[$functionIndex]->getContent(), $excludedFunctions, true)) {
+ $tokens->clearAt($index);
+ }
+ }
+ }
+
+ private function isDeprecationErrorCall(Tokens $tokens, int $index): bool
+ {
+ if ('trigger_error' !== strtolower($tokens[$index]->getContent())) {
+ return false;
+ }
+
+ $endBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $tokens->getNextTokenOfKind($index, [T_STRING, '(']));
+ $prevIndex = $tokens->getPrevMeaningfulToken($endBraceIndex);
+
+ if ($tokens[$prevIndex]->equals(',')) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ }
+
+ return $tokens[$prevIndex]->equals([T_STRING, 'E_USER_DEPRECATED']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ExplicitIndirectVariableFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ExplicitIndirectVariableFixer.php
new file mode 100644
index 0000000..25925fe
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/ExplicitIndirectVariableFixer.php
@@ -0,0 +1,91 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class ExplicitIndirectVariableFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Add curly braces to indirect variables to make them clear to understand. Requires PHP >= 7.0.',
+ [
+ new CodeSample(
+ <<<'EOT'
+<?php
+echo $$foo;
+echo $$foo['bar'];
+echo $foo->$bar['baz'];
+echo $foo->$callback($baz);
+
+EOT
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_VARIABLE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index > 1; --$index) {
+ $token = $tokens[$index];
+ if (!$token->isGivenKind(T_VARIABLE)) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$prevIndex];
+ if (!$prevToken->equals('$') && !$prevToken->isObjectOperator()) {
+ continue;
+ }
+
+ $openingBrace = CT::T_DYNAMIC_VAR_BRACE_OPEN;
+ $closingBrace = CT::T_DYNAMIC_VAR_BRACE_CLOSE;
+ if ($prevToken->isObjectOperator()) {
+ $openingBrace = CT::T_DYNAMIC_PROP_BRACE_OPEN;
+ $closingBrace = CT::T_DYNAMIC_PROP_BRACE_CLOSE;
+ }
+
+ $tokens->overrideRange($index, $index, [
+ new Token([$openingBrace, '{']),
+ new Token([T_VARIABLE, $token->getContent()]),
+ new Token([$closingBrace, '}']),
+ ]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php
new file mode 100644
index 0000000..40ce735
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php
@@ -0,0 +1,300 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class FunctionToConstantFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string, Token[]>
+ */
+ private static $availableFunctions;
+
+ /**
+ * @var array<string, Token[]>
+ */
+ private $functionsFixMap;
+
+ public function __construct()
+ {
+ if (null === self::$availableFunctions) {
+ self::$availableFunctions = [
+ 'get_called_class' => [
+ new Token([T_STATIC, 'static']),
+ new Token([T_DOUBLE_COLON, '::']),
+ new Token([CT::T_CLASS_CONSTANT, 'class']),
+ ],
+ 'get_class' => [new Token([T_CLASS_C, '__CLASS__'])],
+ 'get_class_this' => [
+ new Token([T_STATIC, 'static']),
+ new Token([T_DOUBLE_COLON, '::']),
+ new Token([CT::T_CLASS_CONSTANT, 'class']),
+ ],
+ 'php_sapi_name' => [new Token([T_STRING, 'PHP_SAPI'])],
+ 'phpversion' => [new Token([T_STRING, 'PHP_VERSION'])],
+ 'pi' => [new Token([T_STRING, 'M_PI'])],
+ ];
+ }
+
+ parent::__construct();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->functionsFixMap = [];
+ foreach ($this->configuration['functions'] as $key) {
+ $this->functionsFixMap[$key] = self::$availableFunctions[$key];
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace core functions calls returning constants with the constants.',
+ [
+ new CodeSample(
+ "<?php\necho phpversion();\necho pi();\necho php_sapi_name();\nclass Foo\n{\n public function Bar()\n {\n echo get_class();\n echo get_called_class();\n }\n}\n"
+ ),
+ new CodeSample(
+ "<?php\necho phpversion();\necho pi();\nclass Foo\n{\n public function Bar()\n {\n echo get_class();\n get_class(\$this);\n echo get_called_class();\n }\n}\n",
+ ['functions' => ['get_called_class', 'get_class_this', 'phpversion']]
+ ),
+ ],
+ null,
+ 'Risky when any of the configured functions to replace are overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NativeFunctionCasingFixer, NoExtraBlankLinesFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer, SelfStaticAccessorFixer.
+ * Must run after NoSpacesAfterFunctionNameFixer, NoSpacesInsideParenthesisFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = $tokens->count() - 4; $index > 0; --$index) {
+ $candidate = $this->getReplaceCandidate($tokens, $functionAnalyzer, $index);
+ if (null === $candidate) {
+ continue;
+ }
+
+ $this->fixFunctionCallToConstant(
+ $tokens,
+ $index,
+ $candidate[0], // brace open
+ $candidate[1], // brace close
+ $candidate[2] // replacement
+ );
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $functionNames = array_keys(self::$availableFunctions);
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('functions', 'List of function names to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset($functionNames)])
+ ->setDefault([
+ 'get_called_class',
+ 'get_class',
+ 'get_class_this',
+ 'php_sapi_name',
+ 'phpversion',
+ 'pi',
+ ])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param Token[] $replacements
+ */
+ private function fixFunctionCallToConstant(Tokens $tokens, int $index, int $braceOpenIndex, int $braceCloseIndex, array $replacements): void
+ {
+ for ($i = $braceCloseIndex; $i >= $braceOpenIndex; --$i) {
+ if ($tokens[$i]->isGivenKind([T_WHITESPACE, T_COMMENT, T_DOC_COMMENT])) {
+ continue;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ }
+
+ if ($replacements[0]->isGivenKind([T_CLASS_C, T_STATIC])) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$prevIndex];
+ if ($prevToken->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->clearAt($prevIndex);
+ }
+ }
+
+ $tokens->clearAt($index);
+ $tokens->insertAt($index, $replacements);
+ }
+
+ private function getReplaceCandidate(
+ Tokens $tokens,
+ FunctionsAnalyzer $functionAnalyzer,
+ int $index
+ ): ?array {
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ return null;
+ }
+
+ $lowerContent = strtolower($tokens[$index]->getContent());
+
+ if ('get_class' === $lowerContent) {
+ return $this->fixGetClassCall($tokens, $functionAnalyzer, $index);
+ }
+
+ if (!isset($this->functionsFixMap[$lowerContent])) {
+ return null;
+ }
+
+ if (!$functionAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ return null;
+ }
+
+ // test if function call without parameters
+ $braceOpenIndex = $tokens->getNextMeaningfulToken($index);
+ if (!$tokens[$braceOpenIndex]->equals('(')) {
+ return null;
+ }
+
+ $braceCloseIndex = $tokens->getNextMeaningfulToken($braceOpenIndex);
+ if (!$tokens[$braceCloseIndex]->equals(')')) {
+ return null;
+ }
+
+ return $this->getReplacementTokenClones($lowerContent, $braceOpenIndex, $braceCloseIndex);
+ }
+
+ private function fixGetClassCall(
+ Tokens $tokens,
+ FunctionsAnalyzer $functionAnalyzer,
+ int $index
+ ): ?array {
+ if (!isset($this->functionsFixMap['get_class']) && !isset($this->functionsFixMap['get_class_this'])) {
+ return null;
+ }
+
+ if (!$functionAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ return null;
+ }
+
+ $braceOpenIndex = $tokens->getNextMeaningfulToken($index);
+ $braceCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $braceOpenIndex);
+
+ if ($braceCloseIndex === $tokens->getNextMeaningfulToken($braceOpenIndex)) { // no arguments passed
+ if (isset($this->functionsFixMap['get_class'])) {
+ return $this->getReplacementTokenClones('get_class', $braceOpenIndex, $braceCloseIndex);
+ }
+ } elseif (isset($this->functionsFixMap['get_class_this'])) {
+ $isThis = false;
+
+ for ($i = $braceOpenIndex + 1; $i < $braceCloseIndex; ++$i) {
+ if ($tokens[$i]->equalsAny([[T_WHITESPACE], [T_COMMENT], [T_DOC_COMMENT], ')'])) {
+ continue;
+ }
+
+ if ($tokens[$i]->isGivenKind(T_VARIABLE) && '$this' === strtolower($tokens[$i]->getContent())) {
+ $isThis = true;
+
+ continue;
+ }
+
+ if (false === $isThis && $tokens[$i]->equals('(')) {
+ continue;
+ }
+
+ $isThis = false;
+
+ break;
+ }
+
+ if ($isThis) {
+ return $this->getReplacementTokenClones('get_class_this', $braceOpenIndex, $braceCloseIndex);
+ }
+ }
+
+ return null;
+ }
+
+ private function getReplacementTokenClones(string $lowerContent, int $braceOpenIndex, int $braceCloseIndex): array
+ {
+ $clones = [];
+ foreach ($this->functionsFixMap[$lowerContent] as $token) {
+ $clones[] = clone $token;
+ }
+
+ return [
+ $braceOpenIndex,
+ $braceCloseIndex,
+ $clones,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php
new file mode 100644
index 0000000..9068abf
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/IsNullFixer.php
@@ -0,0 +1,181 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ */
+final class IsNullFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replaces `is_null($var)` expression with `null === $var`.',
+ [
+ new CodeSample("<?php\n\$a = is_null(\$b);\n"),
+ ],
+ null,
+ 'Risky when the function `is_null` is overridden.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before YodaStyleFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $sequenceNeeded = [[T_STRING, 'is_null'], '('];
+ $functionsAnalyzer = new FunctionsAnalyzer();
+ $currIndex = 0;
+
+ while (true) {
+ // recalculate "end" because we might have added tokens in previous iteration
+ $matches = $tokens->findSequence($sequenceNeeded, $currIndex, $tokens->count() - 1, false);
+
+ // stop looping if didn't find any new matches
+ if (null === $matches) {
+ break;
+ }
+
+ // 0 and 1 accordingly are "is_null", "(" tokens
+ $matches = array_keys($matches);
+
+ // move the cursor just after the sequence
+ [$isNullIndex, $currIndex] = $matches;
+
+ if (!$functionsAnalyzer->isGlobalFunctionCall($tokens, $matches[0])) {
+ continue;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($currIndex);
+
+ if ($tokens[$next]->equals(')')) {
+ continue;
+ }
+
+ $prevTokenIndex = $tokens->getPrevMeaningfulToken($matches[0]);
+
+ // handle function references with namespaces
+ if ($tokens[$prevTokenIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens->removeTrailingWhitespace($prevTokenIndex);
+ $tokens->clearAt($prevTokenIndex);
+
+ $prevTokenIndex = $tokens->getPrevMeaningfulToken($prevTokenIndex);
+ }
+
+ // check if inversion being used, text comparison is due to not existing constant
+ $isInvertedNullCheck = false;
+
+ if ($tokens[$prevTokenIndex]->equals('!')) {
+ $isInvertedNullCheck = true;
+
+ // get rid of inverting for proper transformations
+ $tokens->removeTrailingWhitespace($prevTokenIndex);
+ $tokens->clearAt($prevTokenIndex);
+ }
+
+ // before getting rind of `()` around a parameter, ensure it's not assignment/ternary invariant
+ $referenceEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $matches[1]);
+ $isContainingDangerousConstructs = false;
+
+ for ($paramTokenIndex = $matches[1]; $paramTokenIndex <= $referenceEnd; ++$paramTokenIndex) {
+ if (\in_array($tokens[$paramTokenIndex]->getContent(), ['?', '?:', '=', '??'], true)) {
+ $isContainingDangerousConstructs = true;
+
+ break;
+ }
+ }
+
+ // edge cases: is_null() followed/preceded by ==, ===, !=, !==, <>
+ $parentLeftToken = $tokens[$tokens->getPrevMeaningfulToken($isNullIndex)];
+ $parentRightToken = $tokens[$tokens->getNextMeaningfulToken($referenceEnd)];
+ $parentOperations = [T_IS_EQUAL, T_IS_NOT_EQUAL, T_IS_IDENTICAL, T_IS_NOT_IDENTICAL];
+ $wrapIntoParentheses = $parentLeftToken->isGivenKind($parentOperations) || $parentRightToken->isGivenKind($parentOperations);
+
+ // possible trailing comma removed
+ $prevIndex = $tokens->getPrevMeaningfulToken($referenceEnd);
+
+ if ($tokens[$prevIndex]->equals(',')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($prevIndex);
+ }
+
+ if (!$isContainingDangerousConstructs) {
+ // closing parenthesis removed with leading spaces
+ $tokens->removeLeadingWhitespace($referenceEnd);
+ $tokens->clearAt($referenceEnd);
+
+ // opening parenthesis removed with trailing spaces
+ $tokens->removeLeadingWhitespace($matches[1]);
+ $tokens->removeTrailingWhitespace($matches[1]);
+ $tokens->clearAt($matches[1]);
+ }
+
+ // sequence which we'll use as a replacement
+ $replacement = [
+ new Token([T_STRING, 'null']),
+ new Token([T_WHITESPACE, ' ']),
+ new Token($isInvertedNullCheck ? [T_IS_NOT_IDENTICAL, '!=='] : [T_IS_IDENTICAL, '===']),
+ new Token([T_WHITESPACE, ' ']),
+ ];
+
+ if ($wrapIntoParentheses) {
+ array_unshift($replacement, new Token('('));
+ $tokens->insertAt($referenceEnd + 1, new Token(')'));
+ }
+
+ $tokens->overrideRange($isNullIndex, $isNullIndex, $replacement);
+
+ // nested is_null calls support
+ $currIndex = $isNullIndex;
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php
new file mode 100644
index 0000000..af7f65d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/NoUnsetOnPropertyFixer.php
@@ -0,0 +1,229 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gert de Pagter <BackEndTea@gmail.com>
+ */
+final class NoUnsetOnPropertyFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Properties should be set to `null` instead of using `unset`.',
+ [new CodeSample("<?php\nunset(\$this->a);\n")],
+ null,
+ 'Risky when relying on attributes to be removed using `unset` rather than be set to `null`.'.
+ ' Changing variables to `null` instead of unsetting means these still show up when looping over class variables'.
+ ' and reference properties remain unbroken.'.
+ ' With PHP 7.4, this rule might introduce `null` assignments to properties whose type declaration does not allow it.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_UNSET)
+ && $tokens->isAnyTokenKindsFound([T_OBJECT_OPERATOR, T_PAAMAYIM_NEKUDOTAYIM]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before CombineConsecutiveUnsetsFixer.
+ */
+ public function getPriority(): int
+ {
+ return 25;
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_UNSET)) {
+ continue;
+ }
+
+ $unsetsInfo = $this->getUnsetsInfo($tokens, $index);
+
+ if (!$this->isAnyUnsetToTransform($unsetsInfo)) {
+ continue;
+ }
+
+ $isLastUnset = true; // "last" as we reverse the array below
+
+ foreach (array_reverse($unsetsInfo) as $unsetInfo) {
+ $this->updateTokens($tokens, $unsetInfo, $isLastUnset);
+ $isLastUnset = false;
+ }
+ }
+ }
+
+ /**
+ * @return array<array<string, bool|int>>
+ */
+ private function getUnsetsInfo(Tokens $tokens, int $index): array
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ $unsetStart = $tokens->getNextTokenOfKind($index, ['(']);
+ $unsetEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $unsetStart);
+ $isFirst = true;
+ $unsets = [];
+
+ foreach ($argumentsAnalyzer->getArguments($tokens, $unsetStart, $unsetEnd) as $startIndex => $endIndex) {
+ $startIndex = $tokens->getNextMeaningfulToken($startIndex - 1);
+ $endIndex = $tokens->getPrevMeaningfulToken($endIndex + 1);
+ $unsets[] = [
+ 'startIndex' => $startIndex,
+ 'endIndex' => $endIndex,
+ 'isToTransform' => $this->isProperty($tokens, $startIndex, $endIndex),
+ 'isFirst' => $isFirst,
+ ];
+ $isFirst = false;
+ }
+
+ return $unsets;
+ }
+
+ private function isProperty(Tokens $tokens, int $index, int $endIndex): bool
+ {
+ if ($tokens[$index]->isGivenKind(T_VARIABLE)) {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $nextIndex || !$tokens[$nextIndex]->isGivenKind(T_OBJECT_OPERATOR)) {
+ return false;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ $nextNextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+
+ if (null !== $nextNextIndex && $nextNextIndex < $endIndex) {
+ return false;
+ }
+
+ return null !== $nextIndex && $tokens[$nextIndex]->isGivenKind(T_STRING);
+ }
+
+ if ($tokens[$index]->isGivenKind([T_NS_SEPARATOR, T_STRING])) {
+ $nextIndex = $tokens->getTokenNotOfKindsSibling($index, 1, [T_DOUBLE_COLON, T_NS_SEPARATOR, T_STRING]);
+ $nextNextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+
+ if (null !== $nextNextIndex && $nextNextIndex < $endIndex) {
+ return false;
+ }
+
+ return null !== $nextIndex && $tokens[$nextIndex]->isGivenKind(T_VARIABLE);
+ }
+
+ return false;
+ }
+
+ /**
+ * @param array<array<string, bool|int>> $unsetsInfo
+ */
+ private function isAnyUnsetToTransform(array $unsetsInfo): bool
+ {
+ foreach ($unsetsInfo as $unsetInfo) {
+ if ($unsetInfo['isToTransform']) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @param array<string, bool|int> $unsetInfo
+ */
+ private function updateTokens(Tokens $tokens, array $unsetInfo, bool $isLastUnset): void
+ {
+ // if entry is first and to be transformed we remove leading "unset("
+ if ($unsetInfo['isFirst'] && $unsetInfo['isToTransform']) {
+ $braceIndex = $tokens->getPrevTokenOfKind($unsetInfo['startIndex'], ['(']);
+ $unsetIndex = $tokens->getPrevTokenOfKind($braceIndex, [[T_UNSET]]);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($braceIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($unsetIndex);
+ }
+
+ // if entry is last and to be transformed we remove trailing ")"
+ if ($isLastUnset && $unsetInfo['isToTransform']) {
+ $braceIndex = $tokens->getNextTokenOfKind($unsetInfo['endIndex'], [')']);
+ $previousIndex = $tokens->getPrevMeaningfulToken($braceIndex);
+ if ($tokens[$previousIndex]->equals(',')) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($previousIndex); // trailing ',' in function call (PHP 7.3)
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($braceIndex);
+ }
+
+ // if entry is not last we replace comma with semicolon (last entry already has semicolon - from original unset)
+ if (!$isLastUnset) {
+ $commaIndex = $tokens->getNextTokenOfKind($unsetInfo['endIndex'], [',']);
+ $tokens[$commaIndex] = new Token(';');
+ }
+
+ // if entry is to be unset and is not last we add trailing ")"
+ if (!$unsetInfo['isToTransform'] && !$isLastUnset) {
+ $tokens->insertAt($unsetInfo['endIndex'] + 1, new Token(')'));
+ }
+
+ // if entry is to be unset and is not first we add leading "unset("
+ if (!$unsetInfo['isToTransform'] && !$unsetInfo['isFirst']) {
+ $tokens->insertAt(
+ $unsetInfo['startIndex'],
+ [
+ new Token([T_UNSET, 'unset']),
+ new Token('('),
+ ]
+ );
+ }
+
+ // and finally
+ // if entry is to be transformed we add trailing " = null"
+ if ($unsetInfo['isToTransform']) {
+ $tokens->insertAt(
+ $unsetInfo['endIndex'] + 1,
+ [
+ new Token([T_WHITESPACE, ' ']),
+ new Token('='),
+ new Token([T_WHITESPACE, ' ']),
+ new Token([T_STRING, 'null']),
+ ]
+ );
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
new file mode 100644
index 0000000..f9ab014
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/SingleSpaceAfterConstructFixer.php
@@ -0,0 +1,346 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\LanguageConstruct;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ */
+final class SingleSpaceAfterConstructFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string, null|int>
+ */
+ private static $tokenMap = [
+ 'abstract' => T_ABSTRACT,
+ 'as' => T_AS,
+ 'attribute' => CT::T_ATTRIBUTE_CLOSE,
+ 'break' => T_BREAK,
+ 'case' => T_CASE,
+ 'catch' => T_CATCH,
+ 'class' => T_CLASS,
+ 'clone' => T_CLONE,
+ 'comment' => T_COMMENT,
+ 'const' => T_CONST,
+ 'const_import' => CT::T_CONST_IMPORT,
+ 'continue' => T_CONTINUE,
+ 'do' => T_DO,
+ 'echo' => T_ECHO,
+ 'else' => T_ELSE,
+ 'elseif' => T_ELSEIF,
+ 'enum' => null,
+ 'extends' => T_EXTENDS,
+ 'final' => T_FINAL,
+ 'finally' => T_FINALLY,
+ 'for' => T_FOR,
+ 'foreach' => T_FOREACH,
+ 'function' => T_FUNCTION,
+ 'function_import' => CT::T_FUNCTION_IMPORT,
+ 'global' => T_GLOBAL,
+ 'goto' => T_GOTO,
+ 'if' => T_IF,
+ 'implements' => T_IMPLEMENTS,
+ 'include' => T_INCLUDE,
+ 'include_once' => T_INCLUDE_ONCE,
+ 'instanceof' => T_INSTANCEOF,
+ 'insteadof' => T_INSTEADOF,
+ 'interface' => T_INTERFACE,
+ 'match' => null,
+ 'named_argument' => CT::T_NAMED_ARGUMENT_COLON,
+ 'namespace' => T_NAMESPACE,
+ 'new' => T_NEW,
+ 'open_tag_with_echo' => T_OPEN_TAG_WITH_ECHO,
+ 'php_doc' => T_DOC_COMMENT,
+ 'php_open' => T_OPEN_TAG,
+ 'print' => T_PRINT,
+ 'private' => T_PRIVATE,
+ 'protected' => T_PROTECTED,
+ 'public' => T_PUBLIC,
+ 'readonly' => null,
+ 'require' => T_REQUIRE,
+ 'require_once' => T_REQUIRE_ONCE,
+ 'return' => T_RETURN,
+ 'static' => T_STATIC,
+ 'switch' => T_SWITCH,
+ 'throw' => T_THROW,
+ 'trait' => T_TRAIT,
+ 'try' => T_TRY,
+ 'use' => T_USE,
+ 'use_lambda' => CT::T_USE_LAMBDA,
+ 'use_trait' => CT::T_USE_TRAIT,
+ 'var' => T_VAR,
+ 'while' => T_WHILE,
+ 'yield' => T_YIELD,
+ 'yield_from' => T_YIELD_FROM,
+ ];
+
+ /**
+ * @var array<string, int>
+ */
+ private $fixTokenMap = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if (\defined('T_MATCH')) { // @TODO: drop condition when PHP 8.0+ is required
+ self::$tokenMap['match'] = T_MATCH;
+ }
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ self::$tokenMap['readonly'] = T_READONLY;
+ }
+
+ if (\defined('T_ENUM')) { // @TODO: drop condition when PHP 8.1+ is required
+ self::$tokenMap['enum'] = T_ENUM;
+ }
+
+ $this->fixTokenMap = [];
+
+ foreach ($this->configuration['constructs'] as $key) {
+ if (null !== self::$tokenMap[$key]) {
+ $this->fixTokenMap[$key] = self::$tokenMap[$key];
+ }
+ }
+
+ if (isset($this->fixTokenMap['public'])) {
+ $this->fixTokenMap['constructor_public'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC;
+ }
+
+ if (isset($this->fixTokenMap['protected'])) {
+ $this->fixTokenMap['constructor_protected'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED;
+ }
+
+ if (isset($this->fixTokenMap['private'])) {
+ $this->fixTokenMap['constructor_private'] = CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Ensures a single space after language constructs.',
+ [
+ new CodeSample(
+ '<?php
+
+throw new \Exception();
+'
+ ),
+ new CodeSample(
+ '<?php
+
+echo "Hello!";
+',
+ [
+ 'constructs' => [
+ 'echo',
+ ],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+
+yield from baz();
+',
+ [
+ 'constructs' => [
+ 'yield_from',
+ ],
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, FunctionDeclarationFixer.
+ * Must run after ModernizeStrposFixer.
+ */
+ public function getPriority(): int
+ {
+ return 36;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(array_values($this->fixTokenMap)) && !$tokens->hasAlternativeSyntax();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokenKinds = array_values($this->fixTokenMap);
+
+ for ($index = $tokens->count() - 2; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind($tokenKinds)) {
+ continue;
+ }
+
+ $whitespaceTokenIndex = $index + 1;
+
+ if ($tokens[$whitespaceTokenIndex]->equalsAny([',', ';', ')', [CT::T_ARRAY_SQUARE_BRACE_CLOSE]])) {
+ continue;
+ }
+
+ if (
+ $token->isGivenKind(T_STATIC)
+ && !$tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind([T_FUNCTION, T_VARIABLE])
+ ) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_OPEN_TAG)) {
+ if ($tokens[$whitespaceTokenIndex]->equals([T_WHITESPACE]) && !str_contains($token->getContent(), "\n")) {
+ $tokens->clearAt($whitespaceTokenIndex);
+ }
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_CLASS) && $tokens[$tokens->getNextMeaningfulToken($index)]->equals('(')) {
+ continue;
+ }
+
+ if ($token->isGivenKind([T_EXTENDS, T_IMPLEMENTS]) && $this->isMultilineExtendsOrImplementsWithMoreThanOneAncestor($tokens, $index)) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_RETURN) && $this->isMultiLineReturn($tokens, $index)) {
+ continue;
+ }
+
+ if ($token->isComment() || $token->isGivenKind(CT::T_ATTRIBUTE_CLOSE)) {
+ if ($tokens[$whitespaceTokenIndex]->equals([T_WHITESPACE]) && str_contains($tokens[$whitespaceTokenIndex]->getContent(), "\n")) {
+ continue;
+ }
+ }
+
+ if ($tokens[$whitespaceTokenIndex]->equals([T_WHITESPACE])) {
+ $tokens[$whitespaceTokenIndex] = new Token([T_WHITESPACE, ' ']);
+ } else {
+ $tokens->insertAt($whitespaceTokenIndex, new Token([T_WHITESPACE, ' ']));
+ }
+
+ if (
+ $token->isGivenKind(T_YIELD_FROM)
+ && 'yield from' !== strtolower($token->getContent())
+ ) {
+ $tokens[$index] = new Token([T_YIELD_FROM, Preg::replace(
+ '/\s+/',
+ ' ',
+ $token->getContent()
+ )]);
+ }
+ }
+ }
+
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $tokens = array_keys(self::$tokenMap);
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('constructs', 'List of constructs which must be followed by a single space.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset($tokens)])
+ ->setDefault($tokens)
+ ->getOption(),
+ ]);
+ }
+
+ private function isMultiLineReturn(Tokens $tokens, int $index): bool
+ {
+ ++$index;
+ $tokenFollowingReturn = $tokens[$index];
+
+ if (
+ !$tokenFollowingReturn->isGivenKind(T_WHITESPACE)
+ || !str_contains($tokenFollowingReturn->getContent(), "\n")
+ ) {
+ return false;
+ }
+
+ $nestedCount = 0;
+
+ for ($indexEnd = \count($tokens) - 1, ++$index; $index < $indexEnd; ++$index) {
+ if (str_contains($tokens[$index]->getContent(), "\n")) {
+ return true;
+ }
+
+ if ($tokens[$index]->equals('{')) {
+ ++$nestedCount;
+ } elseif ($tokens[$index]->equals('}')) {
+ --$nestedCount;
+ } elseif (0 === $nestedCount && $tokens[$index]->equalsAny([';', [T_CLOSE_TAG]])) {
+ break;
+ }
+ }
+
+ return false;
+ }
+
+ private function isMultilineExtendsOrImplementsWithMoreThanOneAncestor(Tokens $tokens, int $index): bool
+ {
+ $hasMoreThanOneAncestor = false;
+
+ while (++$index) {
+ $token = $tokens[$index];
+
+ if ($token->equals(',')) {
+ $hasMoreThanOneAncestor = true;
+
+ continue;
+ }
+
+ if ($token->equals('{')) {
+ return false;
+ }
+
+ if ($hasMoreThanOneAncestor && str_contains($token->getContent(), "\n")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php
new file mode 100644
index 0000000..bdd35d7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ListNotation/ListSyntaxFixer.php
@@ -0,0 +1,144 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ListNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class ListSyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var null|int
+ */
+ private $candidateTokenKind;
+
+ /**
+ * Use 'syntax' => 'long'|'short'.
+ *
+ * @param array<string, string> $configuration
+ *
+ * @throws InvalidFixerConfigurationException
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->candidateTokenKind = 'long' === $this->configuration['syntax'] ? CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN : T_LIST;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'List (`array` destructuring) assignment should be declared using the configured syntax. Requires PHP >= 7.1.',
+ [
+ new CodeSample(
+ "<?php\nlist(\$sample) = \$array;\n"
+ ),
+ new CodeSample(
+ "<?php\n[\$sample] = \$array;\n",
+ ['syntax' => 'long']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer, TernaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound($this->candidateTokenKind);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ if ($tokens[$index]->isGivenKind($this->candidateTokenKind)) {
+ if (T_LIST === $this->candidateTokenKind) {
+ $this->fixToShortSyntax($tokens, $index);
+ } else {
+ $this->fixToLongSyntax($tokens, $index);
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('syntax', 'Whether to use the `long` or `short` `list` syntax.'))
+ ->setAllowedValues(['long', 'short'])
+ ->setDefault('short')
+ ->getOption(),
+ ]);
+ }
+
+ private function fixToLongSyntax(Tokens $tokens, int $index): void
+ {
+ static $typesOfInterest = [
+ [CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE],
+ '[', // [CT::T_ARRAY_SQUARE_BRACE_OPEN],
+ ];
+
+ $closeIndex = $tokens->getNextTokenOfKind($index, $typesOfInterest);
+ if (!$tokens[$closeIndex]->isGivenKind(CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE)) {
+ return;
+ }
+
+ $tokens[$index] = new Token('(');
+ $tokens[$closeIndex] = new Token(')');
+ $tokens->insertAt($index, new Token([T_LIST, 'list']));
+ }
+
+ private function fixToShortSyntax(Tokens $tokens, int $index): void
+ {
+ $openIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+
+ $tokens[$openIndex] = new Token([CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN, '[']);
+ $tokens[$closeIndex] = new Token([CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE, ']']);
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php
new file mode 100644
index 0000000..3ef3651
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/BlankLineAfterNamespaceFixer.php
@@ -0,0 +1,136 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\NamespaceNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶3.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class BlankLineAfterNamespaceFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST be one blank line after the namespace declaration.',
+ [
+ new CodeSample("<?php\nnamespace Sample\\Sample;\n\n\n\$a;\n"),
+ new CodeSample("<?php\nnamespace Sample\\Sample;\nClass Test{}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoUnusedImportsFixer.
+ */
+ public function getPriority(): int
+ {
+ return -20;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_NAMESPACE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $lastIndex = $tokens->count() - 1;
+
+ for ($index = $lastIndex; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_NAMESPACE)) {
+ continue;
+ }
+
+ $semicolonIndex = $tokens->getNextTokenOfKind($index, [';', '{', [T_CLOSE_TAG]]);
+ $semicolonToken = $tokens[$semicolonIndex];
+
+ if (!$semicolonToken->equals(';')) {
+ continue;
+ }
+
+ $indexToEnsureBlankLineAfter = $this->getIndexToEnsureBlankLineAfter($tokens, $semicolonIndex);
+ $indexToEnsureBlankLine = $tokens->getNonEmptySibling($indexToEnsureBlankLineAfter, 1);
+
+ if (null !== $indexToEnsureBlankLine && $tokens[$indexToEnsureBlankLine]->isWhitespace()) {
+ $tokens[$indexToEnsureBlankLine] = $this->getTokenToInsert($tokens[$indexToEnsureBlankLine]->getContent(), $indexToEnsureBlankLine === $lastIndex);
+ } else {
+ $tokens->insertAt($indexToEnsureBlankLineAfter + 1, $this->getTokenToInsert('', $indexToEnsureBlankLineAfter === $lastIndex));
+ }
+ }
+ }
+
+ private function getIndexToEnsureBlankLineAfter(Tokens $tokens, int $index): int
+ {
+ $indexToEnsureBlankLine = $index;
+ $nextIndex = $tokens->getNonEmptySibling($indexToEnsureBlankLine, 1);
+
+ while (null !== $nextIndex) {
+ $token = $tokens[$nextIndex];
+
+ if ($token->isWhitespace()) {
+ if (1 === Preg::match('/\R/', $token->getContent())) {
+ break;
+ }
+ $nextNextIndex = $tokens->getNonEmptySibling($nextIndex, 1);
+
+ if (!$tokens[$nextNextIndex]->isComment()) {
+ break;
+ }
+ }
+
+ if (!$token->isWhitespace() && !$token->isComment()) {
+ break;
+ }
+
+ $indexToEnsureBlankLine = $nextIndex;
+ $nextIndex = $tokens->getNonEmptySibling($indexToEnsureBlankLine, 1);
+ }
+
+ return $indexToEnsureBlankLine;
+ }
+
+ private function getTokenToInsert(string $currentContent, bool $isLastIndex): Token
+ {
+ $ending = $this->whitespacesConfig->getLineEnding();
+
+ $emptyLines = $isLastIndex ? $ending : $ending.$ending;
+ $indent = 1 === Preg::match('/^.*\R( *)$/s', $currentContent, $matches) ? $matches[1] : '';
+
+ return new Token([T_WHITESPACE, $emptyLines.$indent]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php
new file mode 100644
index 0000000..c4795f5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/CleanNamespaceFixer.php
@@ -0,0 +1,107 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\NamespaceNotation;
+
+use PhpCsFixer\AbstractLinesBeforeNamespaceFixer;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class CleanNamespaceFixer extends AbstractLinesBeforeNamespaceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $samples = [];
+
+ foreach (['namespace Foo \\ Bar;', 'echo foo /* comment */ \\ bar();'] as $sample) {
+ $samples[] = new VersionSpecificCodeSample(
+ "<?php\n".$sample."\n",
+ new VersionSpecification(null, 80000 - 1)
+ );
+ }
+
+ return new FixerDefinition(
+ 'Namespace must not contain spacing, comments or PHPDoc.',
+ $samples
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \PHP_VERSION_ID < 80000 && $tokens->isTokenKindFound(T_NS_SEPARATOR);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $count = $tokens->count();
+
+ for ($index = 0; $index < $count; ++$index) {
+ if ($tokens[$index]->isGivenKind(T_NS_SEPARATOR)) {
+ $previousIndex = $tokens->getPrevMeaningfulToken($index);
+
+ $index = $this->fixNamespace(
+ $tokens,
+ $tokens[$previousIndex]->isGivenKind(T_STRING) ? $previousIndex : $index
+ );
+ }
+ }
+ }
+
+ /**
+ * @param int $index start of namespace
+ */
+ private function fixNamespace(Tokens $tokens, int $index): int
+ {
+ $tillIndex = $index;
+
+ // go to the end of the namespace
+ while ($tokens[$tillIndex]->isGivenKind([T_NS_SEPARATOR, T_STRING])) {
+ $tillIndex = $tokens->getNextMeaningfulToken($tillIndex);
+ }
+
+ $tillIndex = $tokens->getPrevMeaningfulToken($tillIndex);
+
+ $spaceIndexes = [];
+
+ for (; $index <= $tillIndex; ++$index) {
+ if ($tokens[$index]->isGivenKind(T_WHITESPACE)) {
+ $spaceIndexes[] = $index;
+ } elseif ($tokens[$index]->isComment()) {
+ $tokens->clearAt($index);
+ }
+ }
+
+ if ($tokens[$index - 1]->isWhitespace()) {
+ array_pop($spaceIndexes);
+ }
+
+ foreach ($spaceIndexes as $i) {
+ $tokens->clearAt($i);
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php
new file mode 100644
index 0000000..96bc14b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoBlankLinesBeforeNamespaceFixer.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\NamespaceNotation;
+
+use PhpCsFixer\AbstractLinesBeforeNamespaceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class NoBlankLinesBeforeNamespaceFixer extends AbstractLinesBeforeNamespaceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_NAMESPACE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should be no blank lines before a namespace declaration.',
+ [
+ new CodeSample(
+ "<?php\n\n\n\nnamespace Example;\n"
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after BlankLineAfterOpeningTagFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_NAMESPACE)) {
+ continue;
+ }
+
+ $this->fixLinesBeforeNamespace($tokens, $index, 0, 1);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php
new file mode 100644
index 0000000..6a038c8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/NoLeadingNamespaceWhitespaceFixer.php
@@ -0,0 +1,104 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\NamespaceNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Bram Gotink <bram@gotink.me>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoLeadingNamespaceWhitespaceFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_NAMESPACE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The namespace declaration line shouldn\'t contain leading whitespace.',
+ [
+ new CodeSample(
+ '<?php
+ namespace Test8a;
+ namespace Test8b;
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_NAMESPACE)) {
+ continue;
+ }
+
+ $beforeNamespaceIndex = $index - 1;
+ $beforeNamespace = $tokens[$beforeNamespaceIndex];
+
+ if (!$beforeNamespace->isWhitespace()) {
+ if (!self::endsWithWhitespace($beforeNamespace->getContent())) {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, $this->whitespacesConfig->getLineEnding()]));
+ }
+
+ continue;
+ }
+
+ $lastNewline = strrpos($beforeNamespace->getContent(), "\n");
+
+ if (false === $lastNewline) {
+ $beforeBeforeNamespace = $tokens[$index - 2];
+
+ if (self::endsWithWhitespace($beforeBeforeNamespace->getContent())) {
+ $tokens->clearAt($beforeNamespaceIndex);
+ } else {
+ $tokens[$beforeNamespaceIndex] = new Token([T_WHITESPACE, ' ']);
+ }
+ } else {
+ $tokens[$beforeNamespaceIndex] = new Token([T_WHITESPACE, substr($beforeNamespace->getContent(), 0, $lastNewline + 1)]);
+ }
+ }
+ }
+
+ private static function endsWithWhitespace(string $str): bool
+ {
+ if ('' === $str) {
+ return false;
+ }
+
+ return '' === trim(substr($str, -1));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/SingleBlankLineBeforeNamespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/SingleBlankLineBeforeNamespaceFixer.php
new file mode 100644
index 0000000..667b1da
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/NamespaceNotation/SingleBlankLineBeforeNamespaceFixer.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\NamespaceNotation;
+
+use PhpCsFixer\AbstractLinesBeforeNamespaceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class SingleBlankLineBeforeNamespaceFixer extends AbstractLinesBeforeNamespaceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should be exactly one blank line before a namespace declaration.',
+ [
+ new CodeSample("<?php namespace A {}\n"),
+ new CodeSample("<?php\n\n\nnamespace A{}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_NAMESPACE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ return -21;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_NAMESPACE)) {
+ $this->fixLinesBeforeNamespace($tokens, $index, 2, 2);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php
new file mode 100644
index 0000000..40a40aa
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php
@@ -0,0 +1,244 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Naming;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Fred Cox <mcfedr@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoHomoglyphNamesFixer extends AbstractFixer
+{
+ /**
+ * Used the program https://github.com/mcfedr/homoglyph-download
+ * to generate this list from
+ * http://homoglyphs.net/?text=abcdefghijklmnopqrstuvwxyz&lang=en&exc7=1&exc8=1&exc13=1&exc14=1.
+ *
+ * Symbols replaced include
+ * - Latin homoglyphs
+ * - IPA extensions
+ * - Greek and Coptic
+ * - Cyrillic
+ * - Cyrillic Supplement
+ * - Letterlike Symbols
+ * - Latin Numbers
+ * - Fullwidth Latin
+ *
+ * This is not the complete list of unicode homographs, but limited
+ * to those you are more likely to have typed/copied by accident
+ *
+ * @var array
+ */
+ private static $replacements = [
+ 'O' => '0',
+ '0' => '0',
+ 'I' => '1',
+ '1' => '1',
+ '2' => '2',
+ '3' => '3',
+ '4' => '4',
+ '5' => '5',
+ '6' => '6',
+ '7' => '7',
+ '8' => '8',
+ '9' => '9',
+ 'Α' => 'A',
+ 'А' => 'A',
+ 'A' => 'A',
+ 'ʙ' => 'B',
+ 'Β' => 'B',
+ 'В' => 'B',
+ 'B' => 'B',
+ 'Ϲ' => 'C',
+ 'С' => 'C',
+ 'Ⅽ' => 'C',
+ 'C' => 'C',
+ 'Ⅾ' => 'D',
+ 'D' => 'D',
+ 'Ε' => 'E',
+ 'Е' => 'E',
+ 'E' => 'E',
+ 'Ϝ' => 'F',
+ 'F' => 'F',
+ 'ɢ' => 'G',
+ 'Ԍ' => 'G',
+ 'G' => 'G',
+ 'ʜ' => 'H',
+ 'Η' => 'H',
+ 'Н' => 'H',
+ 'H' => 'H',
+ 'l' => 'I',
+ 'Ι' => 'I',
+ 'І' => 'I',
+ 'Ⅰ' => 'I',
+ 'I' => 'I',
+ 'Ј' => 'J',
+ 'J' => 'J',
+ 'Κ' => 'K',
+ 'К' => 'K',
+ 'K' => 'K',
+ 'K' => 'K',
+ 'ʟ' => 'L',
+ 'Ⅼ' => 'L',
+ 'L' => 'L',
+ 'Μ' => 'M',
+ 'М' => 'M',
+ 'Ⅿ' => 'M',
+ 'M' => 'M',
+ 'ɴ' => 'N',
+ 'Ν' => 'N',
+ 'N' => 'N',
+ 'Ο' => 'O',
+ 'О' => 'O',
+ 'O' => 'O',
+ 'Ρ' => 'P',
+ 'Р' => 'P',
+ 'P' => 'P',
+ 'Q' => 'Q',
+ 'ʀ' => 'R',
+ 'R' => 'R',
+ 'Ѕ' => 'S',
+ 'S' => 'S',
+ 'Τ' => 'T',
+ 'Т' => 'T',
+ 'T' => 'T',
+ 'U' => 'U',
+ 'Ѵ' => 'V',
+ 'Ⅴ' => 'V',
+ 'V' => 'V',
+ 'W' => 'W',
+ 'Χ' => 'X',
+ 'Х' => 'X',
+ 'Ⅹ' => 'X',
+ 'X' => 'X',
+ 'ʏ' => 'Y',
+ 'Υ' => 'Y',
+ 'Ү' => 'Y',
+ 'Y' => 'Y',
+ 'Ζ' => 'Z',
+ 'Z' => 'Z',
+ '_' => '_',
+ 'ɑ' => 'a',
+ 'а' => 'a',
+ 'a' => 'a',
+ 'Ь' => 'b',
+ 'b' => 'b',
+ 'ϲ' => 'c',
+ 'с' => 'c',
+ 'ⅽ' => 'c',
+ 'c' => 'c',
+ 'ԁ' => 'd',
+ 'ⅾ' => 'd',
+ 'd' => 'd',
+ 'е' => 'e',
+ 'e' => 'e',
+ 'f' => 'f',
+ 'ɡ' => 'g',
+ 'g' => 'g',
+ 'һ' => 'h',
+ 'h' => 'h',
+ 'ɩ' => 'i',
+ 'і' => 'i',
+ 'ⅰ' => 'i',
+ 'i' => 'i',
+ 'ј' => 'j',
+ 'j' => 'j',
+ 'k' => 'k',
+ 'ⅼ' => 'l',
+ 'l' => 'l',
+ 'ⅿ' => 'm',
+ 'm' => 'm',
+ 'n' => 'n',
+ 'ο' => 'o',
+ 'о' => 'o',
+ 'o' => 'o',
+ 'р' => 'p',
+ 'p' => 'p',
+ 'q' => 'q',
+ 'r' => 'r',
+ 'ѕ' => 's',
+ 's' => 's',
+ 't' => 't',
+ 'u' => 'u',
+ 'ν' => 'v',
+ 'ѵ' => 'v',
+ 'ⅴ' => 'v',
+ 'v' => 'v',
+ 'ѡ' => 'w',
+ 'w' => 'w',
+ 'х' => 'x',
+ 'ⅹ' => 'x',
+ 'x' => 'x',
+ 'у' => 'y',
+ 'y' => 'y',
+ 'z' => 'z',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace accidental usage of homoglyphs (non ascii characters) in names.',
+ [new CodeSample("<?php \$nаmе = 'wrong \"a\" character';\n")],
+ null,
+ 'Renames classes and cannot rename the files. You might have string references to renamed code (`$$name`).'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_VARIABLE, T_STRING]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind([T_VARIABLE, T_STRING])) {
+ continue;
+ }
+
+ $replaced = Preg::replaceCallback('/[^[:ascii:]]/u', static function (array $matches): string {
+ return self::$replacements[$matches[0]] ?? $matches[0];
+ }, $token->getContent(), -1, $count);
+
+ if ($count) {
+ $tokens->offsetSet($index, new Token([$token->getId(), $replaced]));
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/AssignNullCoalescingToCoalesceEqualFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/AssignNullCoalescingToCoalesceEqualFixer.php
new file mode 100644
index 0000000..9e15d70
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/AssignNullCoalescingToCoalesceEqualFixer.php
@@ -0,0 +1,221 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class AssignNullCoalescingToCoalesceEqualFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Use the null coalescing assignment operator `??=` where possible.',
+ [
+ new VersionSpecificCodeSample(
+ "<?php\n\$foo = \$foo ?? 1;\n",
+ new VersionSpecification(70400)
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer, NoWhitespaceInBlankLineFixer.
+ * Must run after TernaryToNullCoalescingFixer.
+ */
+ public function getPriority(): int
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \defined('T_COALESCE_EQUAL') && $tokens->isTokenKindFound(T_COALESCE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index > 3; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_COALESCE)) {
+ continue;
+ }
+
+ // make sure after '??' does not contain '? :'
+
+ $nextIndex = $tokens->getNextTokenOfKind($index, ['?', ';', [T_CLOSE_TAG]]);
+
+ if ($tokens[$nextIndex]->equals('?')) {
+ continue;
+ }
+
+ // get what is before '??'
+
+ $beforeRange = $this->getBeforeOperator($tokens, $index);
+ $equalsIndex = $tokens->getPrevMeaningfulToken($beforeRange['start']);
+
+ // make sure that before that is '='
+
+ if (!$tokens[$equalsIndex]->equals('=')) {
+ continue;
+ }
+
+ // get what is before '='
+
+ $assignRange = $this->getBeforeOperator($tokens, $equalsIndex);
+ $beforeAssignmentIndex = $tokens->getPrevMeaningfulToken($assignRange['start']);
+
+ // make sure that before that is ';', '{', '}', '(', ')' or '<php'
+
+ if (!$tokens[$beforeAssignmentIndex]->equalsAny([';', '{', '}', ')', '(', [T_OPEN_TAG]])) {
+ continue;
+ }
+
+ // make sure before and after are the same
+
+ if (!$this->rangeEqualsRange($tokens, $assignRange, $beforeRange)) {
+ continue;
+ }
+
+ $tokens[$equalsIndex] = new Token([T_COALESCE_EQUAL, '??=']);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ $this->clearMeaningfulFromRange($tokens, $beforeRange);
+
+ foreach ([$equalsIndex, $assignRange['end']] as $i) {
+ $i = $tokens->getNonEmptySibling($i, 1);
+
+ if ($tokens[$i]->isWhitespace(" \t")) {
+ $tokens[$i] = new Token([T_WHITESPACE, ' ']);
+ } elseif (!$tokens[$i]->isWhitespace()) {
+ $tokens->insertAt($i, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+ }
+ }
+
+ private function getBeforeOperator(Tokens $tokens, int $index): array
+ {
+ $controlStructureWithoutBracesTypes = [T_IF, T_ELSE, T_ELSEIF, T_FOR, T_FOREACH, T_WHILE];
+
+ $index = $tokens->getPrevMeaningfulToken($index);
+ $range = [
+ 'start' => $index,
+ 'end' => $index,
+ ];
+
+ $previousIndex = $index;
+ $previousToken = $tokens[$previousIndex];
+
+ while ($previousToken->equalsAny([
+ '$',
+ ']',
+ ')',
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ [CT::T_DYNAMIC_PROP_BRACE_CLOSE],
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ [T_NS_SEPARATOR],
+ [T_STRING],
+ [T_VARIABLE],
+ ])) {
+ $blockType = Tokens::detectBlockType($previousToken);
+
+ if (null !== $blockType) {
+ $blockStart = $tokens->findBlockStart($blockType['type'], $previousIndex);
+
+ if ($tokens[$previousIndex]->equals(')') && $tokens[$tokens->getPrevMeaningfulToken($blockStart)]->isGivenKind($controlStructureWithoutBracesTypes)) {
+ break; // we went too far back
+ }
+
+ $previousIndex = $blockStart;
+ }
+
+ $index = $previousIndex;
+ $previousIndex = $tokens->getPrevMeaningfulToken($previousIndex);
+ $previousToken = $tokens[$previousIndex];
+ }
+
+ if ($previousToken->isGivenKind(T_OBJECT_OPERATOR)) {
+ $index = $this->getBeforeOperator($tokens, $previousIndex)['start'];
+ } elseif ($previousToken->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM)) {
+ $index = $this->getBeforeOperator($tokens, $tokens->getPrevMeaningfulToken($previousIndex))['start'];
+ }
+
+ $range['start'] = $index;
+
+ return $range;
+ }
+
+ /**
+ * Meaningful compare of tokens within ranges.
+ */
+ private function rangeEqualsRange(Tokens $tokens, array $range1, array $range2): bool
+ {
+ $leftStart = $range1['start'];
+ $leftEnd = $range1['end'];
+
+ while ($tokens[$leftStart]->equals('(') && $tokens[$leftEnd]->equals(')')) {
+ $leftStart = $tokens->getNextMeaningfulToken($leftStart);
+ $leftEnd = $tokens->getPrevMeaningfulToken($leftEnd);
+ }
+
+ $rightStart = $range2['start'];
+ $rightEnd = $range2['end'];
+
+ while ($tokens[$rightStart]->equals('(') && $tokens[$rightEnd]->equals(')')) {
+ $rightStart = $tokens->getNextMeaningfulToken($rightStart);
+ $rightEnd = $tokens->getPrevMeaningfulToken($rightEnd);
+ }
+
+ while ($leftStart <= $leftEnd && $rightStart <= $rightEnd) {
+ if (
+ !$tokens[$leftStart]->equals($tokens[$rightStart])
+ && !($tokens[$leftStart]->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN]]) && $tokens[$rightStart]->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN]]))
+ && !($tokens[$leftStart]->equalsAny([']', [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE]]) && $tokens[$rightStart]->equalsAny([']', [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE]]))
+ ) {
+ return false;
+ }
+
+ $leftStart = $tokens->getNextMeaningfulToken($leftStart);
+ $rightStart = $tokens->getNextMeaningfulToken($rightStart);
+ }
+
+ return $leftStart > $leftEnd && $rightStart > $rightEnd;
+ }
+
+ private function clearMeaningfulFromRange(Tokens $tokens, array $range): void
+ {
+ // $range['end'] must be meaningful!
+ for ($i = $range['end']; $i >= $range['start']; $i = $tokens->getPrevMeaningfulToken($i)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
new file mode 100644
index 0000000..a88d2b4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/BinaryOperatorSpacesFixer.php
@@ -0,0 +1,758 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class BinaryOperatorSpacesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const SINGLE_SPACE = 'single_space';
+
+ /**
+ * @internal
+ */
+ public const NO_SPACE = 'no_space';
+
+ /**
+ * @internal
+ */
+ public const ALIGN = 'align';
+
+ /**
+ * @internal
+ */
+ public const ALIGN_SINGLE_SPACE = 'align_single_space';
+
+ /**
+ * @internal
+ */
+ public const ALIGN_SINGLE_SPACE_MINIMAL = 'align_single_space_minimal';
+
+ /**
+ * @internal
+ * @const Placeholder used as anchor for right alignment.
+ */
+ public const ALIGN_PLACEHOLDER = "\x2 ALIGNABLE%d \x3";
+
+ /**
+ * @var string[]
+ */
+ private const SUPPORTED_OPERATORS = [
+ '=',
+ '*',
+ '/',
+ '%',
+ '<',
+ '>',
+ '|',
+ '^',
+ '+',
+ '-',
+ '&',
+ '&=',
+ '&&',
+ '||',
+ '.=',
+ '/=',
+ '=>',
+ '==',
+ '>=',
+ '===',
+ '!=',
+ '<>',
+ '!==',
+ '<=',
+ 'and',
+ 'or',
+ 'xor',
+ '-=',
+ '%=',
+ '*=',
+ '|=',
+ '+=',
+ '<<',
+ '<<=',
+ '>>',
+ '>>=',
+ '^=',
+ '**',
+ '**=',
+ '<=>',
+ '??',
+ '??=',
+ ];
+
+ /**
+ * Keep track of the deepest level ever achieved while
+ * parsing the code. Used later to replace alignment
+ * placeholders with spaces.
+ *
+ * @var int
+ */
+ private $deepestLevel;
+
+ /**
+ * Level counter of the current nest level.
+ * So one level alignments are not mixed with
+ * other level ones.
+ *
+ * @var int
+ */
+ private $currentLevel;
+
+ /**
+ * @var array<null|string>
+ */
+ private static $allowedValues = [
+ self::ALIGN,
+ self::ALIGN_SINGLE_SPACE,
+ self::ALIGN_SINGLE_SPACE_MINIMAL,
+ self::SINGLE_SPACE,
+ self::NO_SPACE,
+ null,
+ ];
+
+ /**
+ * @var TokensAnalyzer
+ */
+ private $tokensAnalyzer;
+
+ /**
+ * @var array<string, string>
+ */
+ private $alignOperatorTokens = [];
+
+ /**
+ * @var array<string, string>
+ */
+ private $operators = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->operators = $this->resolveOperatorsFromConfig();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Binary operators should be surrounded by space as configured.',
+ [
+ new CodeSample(
+ "<?php\n\$a= 1 + \$b^ \$d !== \$e or \$f;\n"
+ ),
+ new CodeSample(
+ '<?php
+$aa= 1;
+$b=2;
+
+$c = $d xor $e;
+$f -= 1;
+',
+ ['operators' => ['=' => 'align', 'xor' => null]]
+ ),
+ new CodeSample(
+ '<?php
+$a = $b +=$c;
+$d = $ee+=$f;
+
+$g = $b +=$c;
+$h = $ee+=$f;
+',
+ ['operators' => ['+=' => 'align_single_space']]
+ ),
+ new CodeSample(
+ '<?php
+$a = $b===$c;
+$d = $f === $g;
+$h = $i=== $j;
+',
+ ['operators' => ['===' => 'align_single_space_minimal']]
+ ),
+ new CodeSample(
+ '<?php
+$foo = \json_encode($bar, JSON_PRESERVE_ZERO_FRACTION | JSON_PRETTY_PRINT);
+',
+ ['operators' => ['|' => 'no_space']]
+ ),
+ new CodeSample(
+ '<?php
+$array = [
+ "foo" => 1,
+ "baaaaaaaaaaar" => 11,
+];
+',
+ ['operators' => ['=>' => 'single_space']]
+ ),
+ new CodeSample(
+ '<?php
+$array = [
+ "foo" => 12,
+ "baaaaaaaaaaar" => 13,
+];
+',
+ ['operators' => ['=>' => 'align']]
+ ),
+ new CodeSample(
+ '<?php
+$array = [
+ "foo" => 12,
+ "baaaaaaaaaaar" => 13,
+];
+',
+ ['operators' => ['=>' => 'align_single_space']]
+ ),
+ new CodeSample(
+ '<?php
+$array = [
+ "foo" => 12,
+ "baaaaaaaaaaar" => 13,
+];
+',
+ ['operators' => ['=>' => 'align_single_space_minimal']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after ArrayIndentationFixer, ArraySyntaxFixer, AssignNullCoalescingToCoalesceEqualFixer, ListSyntaxFixer, ModernizeStrposFixer, NoMultilineWhitespaceAroundDoubleArrowFixer, NoUnsetCastFixer, PowToExponentiationFixer, StandardizeNotEqualsFixer, StrictComparisonFixer.
+ */
+ public function getPriority(): int
+ {
+ return -32;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ // last and first tokens cannot be an operator
+ for ($index = $tokens->count() - 2; $index > 0; --$index) {
+ if (!$this->tokensAnalyzer->isBinaryOperator($index)) {
+ continue;
+ }
+
+ if ('=' === $tokens[$index]->getContent()) {
+ $isDeclare = $this->isEqualPartOfDeclareStatement($tokens, $index);
+ if (false === $isDeclare) {
+ $this->fixWhiteSpaceAroundOperator($tokens, $index);
+ } else {
+ $index = $isDeclare; // skip `declare(foo ==bar)`, see `declare_equal_normalize`
+ }
+ } else {
+ $this->fixWhiteSpaceAroundOperator($tokens, $index);
+ }
+
+ // previous of binary operator is now never an operator / previous of declare statement cannot be an operator
+ --$index;
+ }
+
+ if (\count($this->alignOperatorTokens) > 0) {
+ $this->fixAlignment($tokens, $this->alignOperatorTokens);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('default', 'Default fix strategy.'))
+ ->setDefault(self::SINGLE_SPACE)
+ ->setAllowedValues(self::$allowedValues)
+ ->getOption(),
+ (new FixerOptionBuilder('operators', 'Dictionary of `binary operator` => `fix strategy` values that differ from the default strategy. Supported are: `'.implode('`, `', self::SUPPORTED_OPERATORS).'`'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $option): bool {
+ foreach ($option as $operator => $value) {
+ if (!\in_array($operator, self::SUPPORTED_OPERATORS, true)) {
+ throw new InvalidOptionsException(
+ sprintf(
+ 'Unexpected "operators" key, expected any of "%s", got "%s".',
+ implode('", "', self::SUPPORTED_OPERATORS),
+ \gettype($operator).'#'.$operator
+ )
+ );
+ }
+
+ if (!\in_array($value, self::$allowedValues, true)) {
+ throw new InvalidOptionsException(
+ sprintf(
+ 'Unexpected value for operator "%s", expected any of "%s", got "%s".',
+ $operator,
+ implode('", "', self::$allowedValues),
+ \is_object($value) ? \get_class($value) : (null === $value ? 'null' : \gettype($value).'#'.$value)
+ )
+ );
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([])
+ ->getOption(),
+ ]);
+ }
+
+ private function fixWhiteSpaceAroundOperator(Tokens $tokens, int $index): void
+ {
+ $tokenContent = strtolower($tokens[$index]->getContent());
+
+ if (!\array_key_exists($tokenContent, $this->operators)) {
+ return; // not configured to be changed
+ }
+
+ if (self::SINGLE_SPACE === $this->operators[$tokenContent]) {
+ $this->fixWhiteSpaceAroundOperatorToSingleSpace($tokens, $index);
+
+ return;
+ }
+
+ if (self::NO_SPACE === $this->operators[$tokenContent]) {
+ $this->fixWhiteSpaceAroundOperatorToNoSpace($tokens, $index);
+
+ return;
+ }
+
+ // schedule for alignment
+ $this->alignOperatorTokens[$tokenContent] = $this->operators[$tokenContent];
+
+ if (self::ALIGN === $this->operators[$tokenContent]) {
+ return;
+ }
+
+ // fix white space after operator
+ if ($tokens[$index + 1]->isWhitespace()) {
+ if (self::ALIGN_SINGLE_SPACE_MINIMAL === $this->operators[$tokenContent]) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ return;
+ }
+
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ private function fixWhiteSpaceAroundOperatorToSingleSpace(Tokens $tokens, int $index): void
+ {
+ // fix white space after operator
+ if ($tokens[$index + 1]->isWhitespace()) {
+ $content = $tokens[$index + 1]->getContent();
+ if (' ' !== $content && !str_contains($content, "\n") && !$tokens[$tokens->getNextNonWhitespace($index + 1)]->isComment()) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ } else {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ // fix white space before operator
+ if ($tokens[$index - 1]->isWhitespace()) {
+ $content = $tokens[$index - 1]->getContent();
+ if (' ' !== $content && !str_contains($content, "\n") && !$tokens[$tokens->getPrevNonWhitespace($index - 1)]->isComment()) {
+ $tokens[$index - 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ } else {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+
+ private function fixWhiteSpaceAroundOperatorToNoSpace(Tokens $tokens, int $index): void
+ {
+ // fix white space after operator
+ if ($tokens[$index + 1]->isWhitespace()) {
+ $content = $tokens[$index + 1]->getContent();
+ if (!str_contains($content, "\n") && !$tokens[$tokens->getNextNonWhitespace($index + 1)]->isComment()) {
+ $tokens->clearAt($index + 1);
+ }
+ }
+
+ // fix white space before operator
+ if ($tokens[$index - 1]->isWhitespace()) {
+ $content = $tokens[$index - 1]->getContent();
+ if (!str_contains($content, "\n") && !$tokens[$tokens->getPrevNonWhitespace($index - 1)]->isComment()) {
+ $tokens->clearAt($index - 1);
+ }
+ }
+ }
+
+ /**
+ * @return false|int index of T_DECLARE where the `=` belongs to or `false`
+ */
+ private function isEqualPartOfDeclareStatement(Tokens $tokens, int $index)
+ {
+ $prevMeaningfulIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prevMeaningfulIndex]->isGivenKind(T_STRING)) {
+ $prevMeaningfulIndex = $tokens->getPrevMeaningfulToken($prevMeaningfulIndex);
+ if ($tokens[$prevMeaningfulIndex]->equals('(')) {
+ $prevMeaningfulIndex = $tokens->getPrevMeaningfulToken($prevMeaningfulIndex);
+ if ($tokens[$prevMeaningfulIndex]->isGivenKind(T_DECLARE)) {
+ return $prevMeaningfulIndex;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @return array<string, string>
+ */
+ private function resolveOperatorsFromConfig(): array
+ {
+ $operators = [];
+
+ if (null !== $this->configuration['default']) {
+ foreach (self::SUPPORTED_OPERATORS as $operator) {
+ $operators[$operator] = $this->configuration['default'];
+ }
+ }
+
+ foreach ($this->configuration['operators'] as $operator => $value) {
+ if (null === $value) {
+ unset($operators[$operator]);
+ } else {
+ $operators[$operator] = $value;
+ }
+ }
+
+ // @TODO: drop condition when PHP 7.4+ is required
+ if (!\defined('T_COALESCE_EQUAL')) {
+ unset($operators['??=']);
+ }
+
+ return $operators;
+ }
+
+ // Alignment logic related methods
+
+ /**
+ * @param array<string, string> $toAlign
+ */
+ private function fixAlignment(Tokens $tokens, array $toAlign): void
+ {
+ $this->deepestLevel = 0;
+ $this->currentLevel = 0;
+
+ foreach ($toAlign as $tokenContent => $alignStrategy) {
+ // This fixer works partially on Tokens and partially on string representation of code.
+ // During the process of fixing internal state of single Token may be affected by injecting ALIGN_PLACEHOLDER to its content.
+ // The placeholder will be resolved by `replacePlaceholders` method by removing placeholder or changing it into spaces.
+ // That way of fixing the code causes disturbances in marking Token as changed - if code is perfectly valid then placeholder
+ // still be injected and removed, which will cause the `changed` flag to be set.
+ // To handle that unwanted behavior we work on clone of Tokens collection and then override original collection with fixed collection.
+ $tokensClone = clone $tokens;
+
+ if ('=>' === $tokenContent) {
+ $this->injectAlignmentPlaceholdersForArrow($tokensClone, 0, \count($tokens));
+ } else {
+ $this->injectAlignmentPlaceholders($tokensClone, 0, \count($tokens), $tokenContent);
+ }
+
+ // for all tokens that should be aligned but do not have anything to align with, fix spacing if needed
+ if (self::ALIGN_SINGLE_SPACE === $alignStrategy || self::ALIGN_SINGLE_SPACE_MINIMAL === $alignStrategy) {
+ if ('=>' === $tokenContent) {
+ for ($index = $tokens->count() - 2; $index > 0; --$index) {
+ if ($tokens[$index]->isGivenKind(T_DOUBLE_ARROW)) { // always binary operator, never part of declare statement
+ $this->fixWhiteSpaceBeforeOperator($tokensClone, $index, $alignStrategy);
+ }
+ }
+ } elseif ('=' === $tokenContent) {
+ for ($index = $tokens->count() - 2; $index > 0; --$index) {
+ if ('=' === $tokens[$index]->getContent() && !$this->isEqualPartOfDeclareStatement($tokens, $index) && $this->tokensAnalyzer->isBinaryOperator($index)) {
+ $this->fixWhiteSpaceBeforeOperator($tokensClone, $index, $alignStrategy);
+ }
+ }
+ } else {
+ for ($index = $tokens->count() - 2; $index > 0; --$index) {
+ $content = $tokens[$index]->getContent();
+ if (strtolower($content) === $tokenContent && $this->tokensAnalyzer->isBinaryOperator($index)) { // never part of declare statement
+ $this->fixWhiteSpaceBeforeOperator($tokensClone, $index, $alignStrategy);
+ }
+ }
+ }
+ }
+
+ $tokens->setCode($this->replacePlaceholders($tokensClone, $alignStrategy));
+ }
+ }
+
+ private function injectAlignmentPlaceholders(Tokens $tokens, int $startAt, int $endAt, string $tokenContent): void
+ {
+ for ($index = $startAt; $index < $endAt; ++$index) {
+ $token = $tokens[$index];
+
+ $content = $token->getContent();
+ if (
+ strtolower($content) === $tokenContent
+ && $this->tokensAnalyzer->isBinaryOperator($index)
+ && ('=' !== $content || !$this->isEqualPartOfDeclareStatement($tokens, $index))
+ ) {
+ $tokens[$index] = new Token(sprintf(self::ALIGN_PLACEHOLDER, $this->deepestLevel).$content);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_FUNCTION)) {
+ ++$this->deepestLevel;
+
+ continue;
+ }
+
+ if ($token->equals('(')) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals('[')) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $index);
+
+ continue;
+ }
+ }
+ }
+
+ private function injectAlignmentPlaceholdersForArrow(Tokens $tokens, int $startAt, int $endAt): void
+ {
+ for ($index = $startAt; $index < $endAt; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind([T_FOREACH, T_FOR, T_WHILE, T_IF, T_SWITCH])) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_ARRAY)) { // don't use "$tokens->isArray()" here, short arrays are handled in the next case
+ $from = $tokens->getNextMeaningfulToken($index);
+ $until = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $from);
+ $index = $until;
+
+ $this->injectArrayAlignmentPlaceholders($tokens, $from + 1, $until - 1);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
+ $from = $index;
+ $until = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $from);
+ $index = $until;
+
+ $this->injectArrayAlignmentPlaceholders($tokens, $from + 1, $until - 1);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_DOUBLE_ARROW)) { // no need to analyze for `isBinaryOperator` (always true), nor if part of declare statement (not valid PHP)
+ $tokenContent = sprintf(self::ALIGN_PLACEHOLDER, $this->currentLevel).$token->getContent();
+
+ $nextToken = $tokens[$index + 1];
+ if (!$nextToken->isWhitespace()) {
+ $tokenContent .= ' ';
+ } elseif ($nextToken->isWhitespace(" \t")) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $tokens[$index] = new Token([T_DOUBLE_ARROW, $tokenContent]);
+
+ continue;
+ }
+
+ if ($token->equals(';')) {
+ ++$this->deepestLevel;
+ ++$this->currentLevel;
+
+ continue;
+ }
+
+ if ($token->equals(',')) {
+ for ($i = $index; $i < $endAt - 1; ++$i) {
+ if (str_contains($tokens[$i - 1]->getContent(), "\n")) {
+ break;
+ }
+
+ if ($tokens[$i + 1]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
+ $arrayStartIndex = $tokens[$i + 1]->isGivenKind(T_ARRAY)
+ ? $tokens->getNextMeaningfulToken($i + 1)
+ : $i + 1
+ ;
+ $blockType = Tokens::detectBlockType($tokens[$arrayStartIndex]);
+ $arrayEndIndex = $tokens->findBlockEnd($blockType['type'], $arrayStartIndex);
+
+ if ($tokens->isPartialCodeMultiline($arrayStartIndex, $arrayEndIndex)) {
+ break;
+ }
+ }
+
+ ++$index;
+ }
+ }
+ }
+ }
+
+ private function injectArrayAlignmentPlaceholders(Tokens $tokens, int $from, int $until): void
+ {
+ // Only inject placeholders for multi-line arrays
+ if ($tokens->isPartialCodeMultiline($from, $until)) {
+ ++$this->deepestLevel;
+ ++$this->currentLevel;
+ $this->injectAlignmentPlaceholdersForArrow($tokens, $from, $until);
+ --$this->currentLevel;
+ }
+ }
+
+ private function fixWhiteSpaceBeforeOperator(Tokens $tokens, int $index, string $alignStrategy): void
+ {
+ // fix white space after operator is not needed as BinaryOperatorSpacesFixer took care of this (if strategy is _not_ ALIGN)
+ if (!$tokens[$index - 1]->isWhitespace()) {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, ' ']));
+
+ return;
+ }
+
+ if (self::ALIGN_SINGLE_SPACE_MINIMAL !== $alignStrategy || $tokens[$tokens->getPrevNonWhitespace($index - 1)]->isComment()) {
+ return;
+ }
+
+ $content = $tokens[$index - 1]->getContent();
+ if (' ' !== $content && !str_contains($content, "\n")) {
+ $tokens[$index - 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ }
+
+ /**
+ * Look for group of placeholders and provide vertical alignment.
+ */
+ private function replacePlaceholders(Tokens $tokens, string $alignStrategy): string
+ {
+ $tmpCode = $tokens->generateCode();
+
+ for ($j = 0; $j <= $this->deepestLevel; ++$j) {
+ $placeholder = sprintf(self::ALIGN_PLACEHOLDER, $j);
+
+ if (!str_contains($tmpCode, $placeholder)) {
+ continue;
+ }
+
+ $lines = explode("\n", $tmpCode);
+ $groups = [];
+ $groupIndex = 0;
+ $groups[$groupIndex] = [];
+
+ foreach ($lines as $index => $line) {
+ if (substr_count($line, $placeholder) > 0) {
+ $groups[$groupIndex][] = $index;
+ } else {
+ ++$groupIndex;
+ $groups[$groupIndex] = [];
+ }
+ }
+
+ foreach ($groups as $group) {
+ if (\count($group) < 1) {
+ continue;
+ }
+
+ if (self::ALIGN !== $alignStrategy) {
+ // move place holders to match strategy
+ foreach ($group as $index) {
+ $currentPosition = strpos($lines[$index], $placeholder);
+ $before = substr($lines[$index], 0, $currentPosition);
+
+ if (self::ALIGN_SINGLE_SPACE === $alignStrategy) {
+ if (!str_ends_with($before, ' ')) { // if last char of before-content is not ' '; add it
+ $before .= ' ';
+ }
+ } elseif (self::ALIGN_SINGLE_SPACE_MINIMAL === $alignStrategy) {
+ if (1 !== Preg::match('/^\h+$/', $before)) { // if indent; do not move, leave to other fixer
+ $before = rtrim($before).' ';
+ }
+ }
+
+ $lines[$index] = $before.substr($lines[$index], $currentPosition);
+ }
+ }
+
+ $rightmostSymbol = 0;
+ foreach ($group as $index) {
+ $rightmostSymbol = max($rightmostSymbol, strpos(utf8_decode($lines[$index]), $placeholder));
+ }
+
+ foreach ($group as $index) {
+ $line = $lines[$index];
+ $currentSymbol = strpos(utf8_decode($line), $placeholder);
+ $delta = abs($rightmostSymbol - $currentSymbol);
+
+ if ($delta > 0) {
+ $line = str_replace($placeholder, str_repeat(' ', $delta).$placeholder, $line);
+ $lines[$index] = $line;
+ }
+ }
+ }
+
+ $tmpCode = str_replace($placeholder, '', implode("\n", $lines));
+ }
+
+ return $tmpCode;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
new file mode 100644
index 0000000..c0b87eb
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ConcatSpaceFixer.php
@@ -0,0 +1,168 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class ConcatSpaceFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var null|string
+ */
+ private $fixCallback;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if ('one' === $this->configuration['spacing']) {
+ $this->fixCallback = 'fixConcatenationToSingleSpace';
+ } else {
+ $this->fixCallback = 'fixConcatenationToNoSpace';
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Concatenation should be spaced according configuration.',
+ [
+ new CodeSample(
+ "<?php\n\$foo = 'bar' . 3 . 'baz'.'qux';\n"
+ ),
+ new CodeSample(
+ "<?php\n\$foo = 'bar' . 3 . 'baz'.'qux';\n",
+ ['spacing' => 'none']
+ ),
+ new CodeSample(
+ "<?php\n\$foo = 'bar' . 3 . 'baz'.'qux';\n",
+ ['spacing' => 'one']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after SingleLineThrowFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('.');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $callBack = $this->fixCallback;
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if ($tokens[$index]->equals('.')) {
+ $this->{$callBack}($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('spacing', 'Spacing to apply around concatenation operator.'))
+ ->setAllowedValues(['one', 'none'])
+ ->setDefault('none')
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * @param int $index index of concatenation '.' token
+ */
+ private function fixConcatenationToNoSpace(Tokens $tokens, int $index): void
+ {
+ $prevNonWhitespaceToken = $tokens[$tokens->getPrevNonWhitespace($index)];
+
+ if (!$prevNonWhitespaceToken->isGivenKind([T_LNUMBER, T_COMMENT, T_DOC_COMMENT]) || str_starts_with($prevNonWhitespaceToken->getContent(), '/*')) {
+ $tokens->removeLeadingWhitespace($index, " \t");
+ }
+
+ if (!$tokens[$tokens->getNextNonWhitespace($index)]->isGivenKind([T_LNUMBER, T_COMMENT, T_DOC_COMMENT])) {
+ $tokens->removeTrailingWhitespace($index, " \t");
+ }
+ }
+
+ /**
+ * @param int $index index of concatenation '.' token
+ */
+ private function fixConcatenationToSingleSpace(Tokens $tokens, int $index): void
+ {
+ $this->fixWhiteSpaceAroundConcatToken($tokens, $index, 1);
+ $this->fixWhiteSpaceAroundConcatToken($tokens, $index, -1);
+ }
+
+ /**
+ * @param int $index index of concatenation '.' token
+ * @param int $offset 1 or -1
+ */
+ private function fixWhiteSpaceAroundConcatToken(Tokens $tokens, int $index, int $offset): void
+ {
+ $offsetIndex = $index + $offset;
+
+ if (!$tokens[$offsetIndex]->isWhitespace()) {
+ $tokens->insertAt($index + (1 === $offset ?: 0), new Token([T_WHITESPACE, ' ']));
+
+ return;
+ }
+
+ if (str_contains($tokens[$offsetIndex]->getContent(), "\n")) {
+ return;
+ }
+
+ if ($tokens[$index + $offset * 2]->isComment()) {
+ return;
+ }
+
+ $tokens[$offsetIndex] = new Token([T_WHITESPACE, ' ']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php
new file mode 100644
index 0000000..a74db84
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/IncrementStyleFixer.php
@@ -0,0 +1,173 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\Fixer\AbstractIncrementOperatorFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class IncrementStyleFixer extends AbstractIncrementOperatorFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const STYLE_PRE = 'pre';
+
+ /**
+ * @internal
+ */
+ public const STYLE_POST = 'post';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Pre- or post-increment and decrement operators should be used if possible.',
+ [
+ new CodeSample("<?php\n\$a++;\n\$b--;\n"),
+ new CodeSample(
+ "<?php\n++\$a;\n--\$b;\n",
+ ['style' => self::STYLE_POST]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after StandardizeIncrementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_INC, T_DEC]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('style', 'Whether to use pre- or post-increment and decrement operators.'))
+ ->setAllowedValues([self::STYLE_PRE, self::STYLE_POST])
+ ->setDefault(self::STYLE_PRE)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind([T_INC, T_DEC])) {
+ continue;
+ }
+
+ if (self::STYLE_PRE === $this->configuration['style'] && $tokensAnalyzer->isUnarySuccessorOperator($index)) {
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];
+ if (!$nextToken->equalsAny([';', ')'])) {
+ continue;
+ }
+
+ $startIndex = $this->findStart($tokens, $index);
+
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($startIndex)];
+ if ($prevToken->equalsAny([';', '{', '}', [T_OPEN_TAG], ')'])) {
+ $tokens->clearAt($index);
+ $tokens->insertAt($startIndex, clone $token);
+ }
+ } elseif (self::STYLE_POST === $this->configuration['style'] && $tokensAnalyzer->isUnaryPredecessorOperator($index)) {
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+ if (!$prevToken->equalsAny([';', '{', '}', [T_OPEN_TAG], ')'])) {
+ continue;
+ }
+
+ $endIndex = $this->findEnd($tokens, $index);
+
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($endIndex)];
+ if ($nextToken->equalsAny([';', ')'])) {
+ $tokens->clearAt($index);
+ $tokens->insertAt($tokens->getNextNonWhitespace($endIndex), clone $token);
+ }
+ }
+ }
+ }
+
+ private function findEnd(Tokens $tokens, int $index): int
+ {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ $nextToken = $tokens[$nextIndex];
+
+ while ($nextToken->equalsAny([
+ '$',
+ '(',
+ '[',
+ [CT::T_DYNAMIC_PROP_BRACE_OPEN],
+ [CT::T_DYNAMIC_VAR_BRACE_OPEN],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN],
+ [T_NS_SEPARATOR],
+ [T_STATIC],
+ [T_STRING],
+ [T_VARIABLE],
+ ])) {
+ $blockType = Tokens::detectBlockType($nextToken);
+ if (null !== $blockType) {
+ $nextIndex = $tokens->findBlockEnd($blockType['type'], $nextIndex);
+ }
+ $index = $nextIndex;
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ $nextToken = $tokens[$nextIndex];
+ }
+
+ if ($nextToken->isObjectOperator()) {
+ return $this->findEnd($tokens, $nextIndex);
+ }
+
+ if ($nextToken->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM)) {
+ return $this->findEnd($tokens, $tokens->getNextMeaningfulToken($nextIndex));
+ }
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php
new file mode 100644
index 0000000..583e2a9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/LogicalOperatorsFixer.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Haralan Dobrev <hkdobrev@gmail.com>
+ */
+final class LogicalOperatorsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Use `&&` and `||` logical operators instead of `and` and `or`.',
+ [
+ new CodeSample(
+ '<?php
+
+if ($a == "foo" and ($b == "bar" or $c == "baz")) {
+}
+'
+ ),
+ ],
+ null,
+ 'Risky, because you must double-check if using and/or with lower precedence was intentional.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_LOGICAL_AND, T_LOGICAL_OR]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind(T_LOGICAL_AND)) {
+ $tokens[$index] = new Token([T_BOOLEAN_AND, '&&']);
+ } elseif ($token->isGivenKind(T_LOGICAL_OR)) {
+ $tokens[$index] = new Token([T_BOOLEAN_OR, '||']);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php
new file mode 100644
index 0000000..7b31a75
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NewWithBracesFixer.php
@@ -0,0 +1,145 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NewWithBracesFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All instances created with new keyword must be followed by braces.',
+ [new CodeSample("<?php \$x = new X;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_NEW);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $nextTokenKinds = null;
+
+ if (null === $nextTokenKinds) {
+ $nextTokenKinds = [
+ '?',
+ ';',
+ ',',
+ '(',
+ ')',
+ '[',
+ ']',
+ ':',
+ '<',
+ '>',
+ '+',
+ '-',
+ '*',
+ '/',
+ '%',
+ '&',
+ '^',
+ '|',
+ [T_CLASS],
+ [T_IS_SMALLER_OR_EQUAL],
+ [T_IS_GREATER_OR_EQUAL],
+ [T_IS_EQUAL],
+ [T_IS_NOT_EQUAL],
+ [T_IS_IDENTICAL],
+ [T_IS_NOT_IDENTICAL],
+ [T_CLOSE_TAG],
+ [T_LOGICAL_AND],
+ [T_LOGICAL_OR],
+ [T_LOGICAL_XOR],
+ [T_BOOLEAN_AND],
+ [T_BOOLEAN_OR],
+ [T_SL],
+ [T_SR],
+ [T_INSTANCEOF],
+ [T_AS],
+ [T_DOUBLE_ARROW],
+ [T_POW],
+ [T_SPACESHIP],
+ [CT::T_ARRAY_SQUARE_BRACE_OPEN],
+ [CT::T_ARRAY_SQUARE_BRACE_CLOSE],
+ [CT::T_BRACE_CLASS_INSTANTIATION_OPEN],
+ [CT::T_BRACE_CLASS_INSTANTIATION_CLOSE],
+ ];
+ }
+
+ for ($index = $tokens->count() - 3; $index > 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_NEW)) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextTokenOfKind($index, $nextTokenKinds);
+ $nextToken = $tokens[$nextIndex];
+
+ // new anonymous class definition
+ if ($nextToken->isGivenKind(T_CLASS)) {
+ if (!$tokens[$tokens->getNextMeaningfulToken($nextIndex)]->equals('(')) {
+ $this->insertBracesAfter($tokens, $nextIndex);
+ }
+
+ continue;
+ }
+
+ // entrance into array index syntax - need to look for exit
+ while ($nextToken->equals('[') || $nextToken->isGivenKind(CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN)) {
+ $nextIndex = $tokens->findBlockEnd(Tokens::detectBlockType($nextToken)['type'], $nextIndex) + 1;
+ $nextToken = $tokens[$nextIndex];
+ }
+
+ // new statement has a gap in it - advance to the next token
+ if ($nextToken->isWhitespace()) {
+ $nextIndex = $tokens->getNextNonWhitespace($nextIndex);
+ $nextToken = $tokens[$nextIndex];
+ }
+
+ // new statement with () - nothing to do
+ if ($nextToken->equals('(') || $nextToken->isObjectOperator()) {
+ continue;
+ }
+
+ $this->insertBracesAfter($tokens, $tokens->getPrevMeaningfulToken($nextIndex));
+ }
+ }
+
+ private function insertBracesAfter(Tokens $tokens, int $index): void
+ {
+ $tokens->insertAt(++$index, [new Token('('), new Token(')')]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php
new file mode 100644
index 0000000..8d0bec3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NoSpaceAroundDoubleColonFixer.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoSpaceAroundDoubleColonFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There must be no space around double colons (also called Scope Resolution Operator or Paamayim Nekudotayim).',
+ [new CodeSample("\n<?php echo Foo\\Bar :: class;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOUBLE_COLON);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 2; $index > 1; --$index) {
+ if ($tokens[$index]->isGivenKind(T_DOUBLE_COLON)) {
+ $this->removeSpace($tokens, $index, 1);
+ $this->removeSpace($tokens, $index, -1);
+ }
+ }
+ }
+
+ private function removeSpace(Tokens $tokens, int $index, int $direction): void
+ {
+ if (!$tokens[$index + $direction]->isWhitespace()) {
+ return;
+ }
+
+ if ($tokens[$tokens->getNonWhitespaceSibling($index, $direction)]->isComment()) {
+ return;
+ }
+
+ $tokens->clearAt($index + $direction);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSpaceFixer.php
new file mode 100644
index 0000000..83c5cf5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSpaceFixer.php
@@ -0,0 +1,84 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Javier Spagnoletti <phansys@gmail.com>
+ */
+final class NotOperatorWithSpaceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Logical NOT operators (`!`) should have leading and trailing whitespaces.',
+ [new CodeSample(
+ '<?php
+
+if (!$bar) {
+ echo "Help!";
+}
+'
+ )]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after ModernizeStrposFixer, UnaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('!');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if ($token->equals('!')) {
+ if (!$tokens[$index + 1]->isWhitespace()) {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ if (!$tokens[$index - 1]->isWhitespace()) {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, ' ']));
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSuccessorSpaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSuccessorSpaceFixer.php
new file mode 100644
index 0000000..acdf0b3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/NotOperatorWithSuccessorSpaceFixer.php
@@ -0,0 +1,82 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Javier Spagnoletti <phansys@gmail.com>
+ */
+final class NotOperatorWithSuccessorSpaceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Logical NOT operators (`!`) should have one trailing whitespace.',
+ [new CodeSample(
+ '<?php
+
+if (!$bar) {
+ echo "Help!";
+}
+'
+ )]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after ModernizeStrposFixer, UnaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('!');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+
+ if ($token->equals('!')) {
+ if (!$tokens[$index + 1]->isWhitespace()) {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ } else {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ObjectOperatorWithoutWhitespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ObjectOperatorWithoutWhitespaceFixer.php
new file mode 100644
index 0000000..71e4cd6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/ObjectOperatorWithoutWhitespaceFixer.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class ObjectOperatorWithoutWhitespaceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be space before or after object operators `->` and `?->`.',
+ [new CodeSample("<?php \$a -> b;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getObjectOperatorKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // [Structure] there should not be space before or after "->" or "?->"
+ foreach ($tokens as $index => $token) {
+ if (!$token->isObjectOperator()) {
+ continue;
+ }
+
+ // clear whitespace before ->
+ if ($tokens[$index - 1]->isWhitespace(" \t") && !$tokens[$index - 2]->isComment()) {
+ $tokens->clearAt($index - 1);
+ }
+
+ // clear whitespace after ->
+ if ($tokens[$index + 1]->isWhitespace(" \t") && !$tokens[$index + 2]->isComment()) {
+ $tokens->clearAt($index + 1);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php
new file mode 100644
index 0000000..58ed9c8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/OperatorLinebreakFixer.php
@@ -0,0 +1,317 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\SwitchAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\ControlCaseStructuresAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\GotoLabelAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\ReferenceAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class OperatorLinebreakFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ private const BOOLEAN_OPERATORS = [[T_BOOLEAN_AND], [T_BOOLEAN_OR], [T_LOGICAL_AND], [T_LOGICAL_OR], [T_LOGICAL_XOR]];
+
+ /**
+ * @var string
+ */
+ private $position = 'beginning';
+
+ /**
+ * @var array<array<int|string>|string>
+ */
+ private $operators = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Operators - when multiline - must always be at the beginning or at the end of the line.',
+ [
+ new CodeSample('<?php
+function foo() {
+ return $bar ||
+ $baz;
+}
+'),
+ new CodeSample(
+ '<?php
+function foo() {
+ return $bar
+ || $baz;
+}
+',
+ ['position' => 'end']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->position = $this->configuration['position'];
+ $this->operators = self::BOOLEAN_OPERATORS;
+
+ if (false === $this->configuration['only_booleans']) {
+ $this->operators = array_merge($this->operators, self::getNonBooleanOperators());
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('only_booleans', 'whether to limit operators to only boolean ones'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('position', 'whether to place operators at the beginning or at the end of the line'))
+ ->setAllowedValues(['beginning', 'end'])
+ ->setDefault($this->position)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $referenceAnalyzer = new ReferenceAnalyzer();
+ $gotoLabelAnalyzer = new GotoLabelAnalyzer();
+
+ $excludedIndices = $this->getExcludedIndices($tokens);
+
+ $index = $tokens->count();
+ while ($index > 1) {
+ --$index;
+
+ if (!$tokens[$index]->equalsAny($this->operators, false)) {
+ continue;
+ }
+
+ if ($gotoLabelAnalyzer->belongsToGoToLabel($tokens, $index)) {
+ continue;
+ }
+
+ if ($referenceAnalyzer->isReference($tokens, $index)) {
+ continue;
+ }
+
+ if (\in_array($index, $excludedIndices, true)) {
+ continue;
+ }
+
+ $operatorIndices = [$index];
+ if ($tokens[$index]->equals(':')) {
+ /** @var int $prevIndex */
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prevIndex]->equals('?')) {
+ $operatorIndices = [$prevIndex, $index];
+ $index = $prevIndex;
+ }
+ }
+
+ $this->fixOperatorLinebreak($tokens, $operatorIndices);
+ }
+ }
+
+ /**
+ * Currently only colons from "switch".
+ *
+ * @return int[]
+ */
+ private function getExcludedIndices(Tokens $tokens): array
+ {
+ $colonIndexes = [];
+
+ foreach (ControlCaseStructuresAnalyzer::findControlStructures($tokens, [T_SWITCH]) as $analysis) {
+ foreach ($analysis->getCases() as $case) {
+ $colonIndexes[] = $case->getColonIndex();
+ }
+
+ if ($analysis instanceof SwitchAnalysis) {
+ $defaultAnalysis = $analysis->getDefaultAnalysis();
+
+ if (null !== $defaultAnalysis) {
+ $colonIndexes[] = $defaultAnalysis->getColonIndex();
+ }
+ }
+ }
+
+ return $colonIndexes;
+ }
+
+ /**
+ * @param int[] $operatorIndices
+ */
+ private function fixOperatorLinebreak(Tokens $tokens, array $operatorIndices): void
+ {
+ /** @var int $prevIndex */
+ $prevIndex = $tokens->getPrevMeaningfulToken(min($operatorIndices));
+ $indexStart = $prevIndex + 1;
+
+ /** @var int $nextIndex */
+ $nextIndex = $tokens->getNextMeaningfulToken(max($operatorIndices));
+ $indexEnd = $nextIndex - 1;
+
+ if (!$this->isMultiline($tokens, $indexStart, $indexEnd)) {
+ return; // operator is not surrounded by multiline whitespaces, do not touch it
+ }
+
+ if ('beginning' === $this->position) {
+ if (!$this->isMultiline($tokens, max($operatorIndices), $indexEnd)) {
+ return; // operator already is placed correctly
+ }
+ $this->fixMoveToTheBeginning($tokens, $operatorIndices);
+
+ return;
+ }
+
+ if (!$this->isMultiline($tokens, $indexStart, min($operatorIndices))) {
+ return; // operator already is placed correctly
+ }
+ $this->fixMoveToTheEnd($tokens, $operatorIndices);
+ }
+
+ /**
+ * @param int[] $operatorIndices
+ */
+ private function fixMoveToTheBeginning(Tokens $tokens, array $operatorIndices): void
+ {
+ /** @var int $prevIndex */
+ $prevIndex = $tokens->getNonEmptySibling(min($operatorIndices), -1);
+
+ /** @var int $nextIndex */
+ $nextIndex = $tokens->getNextMeaningfulToken(max($operatorIndices));
+
+ for ($i = $nextIndex - 1; $i > max($operatorIndices); --$i) {
+ if ($tokens[$i]->isWhitespace() && 1 === Preg::match('/\R/u', $tokens[$i]->getContent())) {
+ $isWhitespaceBefore = $tokens[$prevIndex]->isWhitespace();
+ $inserts = $this->getReplacementsAndClear($tokens, $operatorIndices, -1);
+ if ($isWhitespaceBefore) {
+ $inserts[] = new Token([T_WHITESPACE, ' ']);
+ }
+ $tokens->insertAt($nextIndex, $inserts);
+
+ break;
+ }
+ }
+ }
+
+ /**
+ * @param int[] $operatorIndices
+ */
+ private function fixMoveToTheEnd(Tokens $tokens, array $operatorIndices): void
+ {
+ /** @var int $prevIndex */
+ $prevIndex = $tokens->getPrevMeaningfulToken(min($operatorIndices));
+
+ /** @var int $nextIndex */
+ $nextIndex = $tokens->getNonEmptySibling(max($operatorIndices), 1);
+
+ for ($i = $prevIndex + 1; $i < max($operatorIndices); ++$i) {
+ if ($tokens[$i]->isWhitespace() && 1 === Preg::match('/\R/u', $tokens[$i]->getContent())) {
+ $isWhitespaceAfter = $tokens[$nextIndex]->isWhitespace();
+ $inserts = $this->getReplacementsAndClear($tokens, $operatorIndices, 1);
+ if ($isWhitespaceAfter) {
+ array_unshift($inserts, new Token([T_WHITESPACE, ' ']));
+ }
+ $tokens->insertAt($prevIndex + 1, $inserts);
+
+ break;
+ }
+ }
+ }
+
+ /**
+ * @param int[] $indices
+ *
+ * @return Token[]
+ */
+ private function getReplacementsAndClear(Tokens $tokens, array $indices, int $direction): array
+ {
+ return array_map(
+ static function (int $index) use ($tokens, $direction): Token {
+ $clone = $tokens[$index];
+
+ if ($tokens[$index + $direction]->isWhitespace()) {
+ $tokens->clearAt($index + $direction);
+ }
+
+ $tokens->clearAt($index);
+
+ return $clone;
+ },
+ $indices
+ );
+ }
+
+ private function isMultiline(Tokens $tokens, int $indexStart, int $indexEnd): bool
+ {
+ for ($index = $indexStart; $index <= $indexEnd; ++$index) {
+ if (str_contains($tokens[$index]->getContent(), "\n")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static function getNonBooleanOperators(): array
+ {
+ return array_merge(
+ [
+ '%', '&', '*', '+', '-', '.', '/', ':', '<', '=', '>', '?', '^', '|',
+ [T_AND_EQUAL], [T_CONCAT_EQUAL], [T_DIV_EQUAL], [T_DOUBLE_ARROW], [T_IS_EQUAL], [T_IS_GREATER_OR_EQUAL],
+ [T_IS_IDENTICAL], [T_IS_NOT_EQUAL], [T_IS_NOT_IDENTICAL], [T_IS_SMALLER_OR_EQUAL], [T_MINUS_EQUAL],
+ [T_MOD_EQUAL], [T_MUL_EQUAL], [T_OR_EQUAL], [T_PAAMAYIM_NEKUDOTAYIM], [T_PLUS_EQUAL], [T_POW],
+ [T_POW_EQUAL], [T_SL], [T_SL_EQUAL], [T_SR], [T_SR_EQUAL], [T_XOR_EQUAL],
+ [T_COALESCE], [T_SPACESHIP],
+ ],
+ array_map(static function ($id): array { return [$id]; }, Token::getObjectOperatorKinds())
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeIncrementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeIncrementFixer.php
new file mode 100644
index 0000000..3142b8e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeIncrementFixer.php
@@ -0,0 +1,130 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\Fixer\AbstractIncrementOperatorFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author ntzm
+ */
+final class StandardizeIncrementFixer extends AbstractIncrementOperatorFixer
+{
+ private const EXPRESSION_END_TOKENS = [
+ ';',
+ ')',
+ ']',
+ ',',
+ ':',
+ [CT::T_DYNAMIC_PROP_BRACE_CLOSE],
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ [T_CLOSE_TAG],
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Increment and decrement operators should be used if possible.',
+ [
+ new CodeSample("<?php\n\$i += 1;\n"),
+ new CodeSample("<?php\n\$i -= 1;\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before IncrementStyleFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_PLUS_EQUAL, T_MINUS_EQUAL]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ $expressionEnd = $tokens[$index];
+ if (!$expressionEnd->equalsAny(self::EXPRESSION_END_TOKENS)) {
+ continue;
+ }
+
+ $numberIndex = $tokens->getPrevMeaningfulToken($index);
+ $number = $tokens[$numberIndex];
+ if (!$number->isGivenKind(T_LNUMBER) || '1' !== $number->getContent()) {
+ continue;
+ }
+
+ $operatorIndex = $tokens->getPrevMeaningfulToken($numberIndex);
+ $operator = $tokens[$operatorIndex];
+ if (!$operator->isGivenKind([T_PLUS_EQUAL, T_MINUS_EQUAL])) {
+ continue;
+ }
+
+ $startIndex = $this->findStart($tokens, $operatorIndex);
+
+ $this->clearRangeLeaveComments(
+ $tokens,
+ $tokens->getPrevMeaningfulToken($operatorIndex) + 1,
+ $numberIndex
+ );
+
+ $tokens->insertAt(
+ $startIndex,
+ new Token($operator->isGivenKind(T_PLUS_EQUAL) ? [T_INC, '++'] : [T_DEC, '--'])
+ );
+ }
+ }
+
+ /**
+ * Clear tokens in the given range unless they are comments.
+ */
+ private function clearRangeLeaveComments(Tokens $tokens, int $indexStart, int $indexEnd): void
+ {
+ for ($i = $indexStart; $i <= $indexEnd; ++$i) {
+ $token = $tokens[$i];
+
+ if ($token->isComment()) {
+ continue;
+ }
+
+ if ($token->isWhitespace("\n\r")) {
+ continue;
+ }
+
+ $tokens->clearAt($i);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php
new file mode 100644
index 0000000..fe5a73e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class StandardizeNotEqualsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Replace all `<>` with `!=`.',
+ [new CodeSample("<?php\n\$a = \$b <> \$c;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_IS_NOT_EQUAL);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind(T_IS_NOT_EQUAL)) {
+ $tokens[$index] = new Token([T_IS_NOT_EQUAL, '!=']);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryOperatorSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryOperatorSpacesFixer.php
new file mode 100644
index 0000000..9414341
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryOperatorSpacesFixer.php
@@ -0,0 +1,185 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\SwitchAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\ControlCaseStructuresAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\GotoLabelAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class TernaryOperatorSpacesFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Standardize spaces around ternary operator.',
+ [new CodeSample("<?php \$a = \$a ?1 :0;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after ArraySyntaxFixer, ListSyntaxFixer, TernaryToElvisOperatorFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound(['?', ':']);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $gotoLabelAnalyzer = new GotoLabelAnalyzer();
+ $ternaryOperatorIndices = [];
+ $excludedIndices = $this->getColonIndicesForSwitch($tokens);
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->equalsAny(['?', ':'])) {
+ continue;
+ }
+
+ if (\in_array($index, $excludedIndices, true)) {
+ continue;
+ }
+
+ if ($this->belongsToAlternativeSyntax($tokens, $index)) {
+ continue;
+ }
+
+ if ($gotoLabelAnalyzer->belongsToGoToLabel($tokens, $index)) {
+ continue;
+ }
+
+ $ternaryOperatorIndices[] = $index;
+ }
+
+ foreach (array_reverse($ternaryOperatorIndices) as $index) {
+ $token = $tokens[$index];
+
+ if ($token->equals('?')) {
+ $nextNonWhitespaceIndex = $tokens->getNextNonWhitespace($index);
+
+ if ($tokens[$nextNonWhitespaceIndex]->equals(':')) {
+ // for `$a ?: $b` remove spaces between `?` and `:`
+ $tokens->ensureWhitespaceAtIndex($index + 1, 0, '');
+ } else {
+ // for `$a ? $b : $c` ensure space after `?`
+ $this->ensureWhitespaceExistence($tokens, $index + 1, true);
+ }
+
+ // for `$a ? $b : $c` ensure space before `?`
+ $this->ensureWhitespaceExistence($tokens, $index - 1, false);
+
+ continue;
+ }
+
+ if ($token->equals(':')) {
+ // for `$a ? $b : $c` ensure space after `:`
+ $this->ensureWhitespaceExistence($tokens, $index + 1, true);
+
+ $prevNonWhitespaceToken = $tokens[$tokens->getPrevNonWhitespace($index)];
+
+ if (!$prevNonWhitespaceToken->equals('?')) {
+ // for `$a ? $b : $c` ensure space before `:`
+ $this->ensureWhitespaceExistence($tokens, $index - 1, false);
+ }
+ }
+ }
+ }
+
+ private function belongsToAlternativeSyntax(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->equals(':')) {
+ return false;
+ }
+
+ $closeParenthesisIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$closeParenthesisIndex]->isGivenKind(T_ELSE)) {
+ return true;
+ }
+ if (!$tokens[$closeParenthesisIndex]->equals(')')) {
+ return false;
+ }
+
+ $openParenthesisIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $closeParenthesisIndex);
+
+ $alternativeControlStructureIndex = $tokens->getPrevMeaningfulToken($openParenthesisIndex);
+
+ return $tokens[$alternativeControlStructureIndex]->isGivenKind([T_DECLARE, T_ELSEIF, T_FOR, T_FOREACH, T_IF, T_SWITCH, T_WHILE]);
+ }
+
+ /**
+ * @return int[]
+ */
+ private function getColonIndicesForSwitch(Tokens $tokens): array
+ {
+ $colonIndexes = [];
+
+ foreach (ControlCaseStructuresAnalyzer::findControlStructures($tokens, [T_SWITCH]) as $analysis) {
+ foreach ($analysis->getCases() as $case) {
+ $colonIndexes[] = $case->getColonIndex();
+ }
+
+ if ($analysis instanceof SwitchAnalysis) {
+ $defaultAnalysis = $analysis->getDefaultAnalysis();
+
+ if (null !== $defaultAnalysis) {
+ $colonIndexes[] = $defaultAnalysis->getColonIndex();
+ }
+ }
+ }
+
+ return $colonIndexes;
+ }
+
+ private function ensureWhitespaceExistence(Tokens $tokens, int $index, bool $after): void
+ {
+ if ($tokens[$index]->isWhitespace()) {
+ if (
+ !str_contains($tokens[$index]->getContent(), "\n")
+ && !$tokens[$index - 1]->isComment()
+ ) {
+ $tokens[$index] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ return;
+ }
+
+ $index += $after ? 0 : 1;
+ $tokens->insertAt($index, new Token([T_WHITESPACE, ' ']));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToElvisOperatorFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToElvisOperatorFixer.php
new file mode 100644
index 0000000..9a643f6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToElvisOperatorFixer.php
@@ -0,0 +1,259 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class TernaryToElvisOperatorFixer extends AbstractFixer
+{
+ /**
+ * Lower precedence and other valid preceding tokens.
+ *
+ * Ordered by most common types first.
+ *
+ * @var array
+ */
+ private const VALID_BEFORE_ENDTYPES = [
+ '=',
+ [T_OPEN_TAG],
+ [T_OPEN_TAG_WITH_ECHO],
+ '(',
+ ',',
+ ';',
+ '[',
+ '{',
+ '}',
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN],
+ [T_AND_EQUAL], // &=
+ [T_CONCAT_EQUAL], // .=
+ [T_DIV_EQUAL], // /=
+ [T_MINUS_EQUAL], // -=
+ [T_MOD_EQUAL], // %=
+ [T_MUL_EQUAL], // *=
+ [T_OR_EQUAL], // |=
+ [T_PLUS_EQUAL], // +=
+ [T_POW_EQUAL], // **=
+ [T_SL_EQUAL], // <<=
+ [T_SR_EQUAL], // >>=
+ [T_XOR_EQUAL], // ^=
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Use the Elvis operator `?:` where possible.',
+ [
+ new CodeSample(
+ "<?php\n\$foo = \$foo ? \$foo : 1;\n"
+ ),
+ new CodeSample(
+ "<?php \$foo = \$bar[a()] ? \$bar[a()] : 1; # \"risky\" sample, \"a()\" only gets called once after fixing\n"
+ ),
+ ],
+ null,
+ 'Risky when relying on functions called on both sides of the `?` operator.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoTrailingWhitespaceFixer, TernaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('?');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $blockEdgeDefinitions = Tokens::getBlockEdgeDefinitions();
+
+ for ($index = \count($tokens) - 5; $index > 1; --$index) {
+ if (!$tokens[$index]->equals('?')) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$nextIndex]->equals(':')) {
+ continue; // Elvis is alive!
+ }
+
+ // get and check what is before the `?` operator
+
+ $beforeOperator = $this->getBeforeOperator($tokens, $index, $blockEdgeDefinitions);
+
+ if (null === $beforeOperator) {
+ continue; // contains something we cannot fix because of priorities
+ }
+
+ // get what is after the `?` token
+
+ $afterOperator = $this->getAfterOperator($tokens, $index);
+
+ // if before and after the `?` operator are the same (in meaningful matter), clear after
+
+ if ($this->rangeEqualsRange($tokens, $beforeOperator, $afterOperator)) {
+ $this->clearMeaningfulFromRange($tokens, $afterOperator);
+ }
+ }
+ }
+
+ /**
+ * @return null|array null if contains ++/-- operator
+ */
+ private function getBeforeOperator(Tokens $tokens, int $index, array $blockEdgeDefinitions): ?array
+ {
+ $index = $tokens->getPrevMeaningfulToken($index);
+ $before = ['end' => $index];
+
+ while (!$tokens[$index]->equalsAny(self::VALID_BEFORE_ENDTYPES)) {
+ if ($tokens[$index]->isGivenKind([T_INC, T_DEC])) {
+ return null;
+ }
+
+ $blockType = Tokens::detectBlockType($tokens[$index]);
+
+ if (null === $blockType || $blockType['isStart']) {
+ $before['start'] = $index;
+ $index = $tokens->getPrevMeaningfulToken($index);
+
+ continue;
+ }
+
+ $blockType = $blockEdgeDefinitions[$blockType['type']];
+ $openCount = 1;
+
+ do {
+ $index = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$index]->isGivenKind([T_INC, T_DEC])) {
+ return null;
+ }
+
+ if ($tokens[$index]->equals($blockType['start'])) {
+ ++$openCount;
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals($blockType['end'])) {
+ --$openCount;
+ }
+ } while (1 >= $openCount);
+
+ $before['start'] = $index;
+ $index = $tokens->getPrevMeaningfulToken($index);
+ }
+
+ if (!isset($before['start'])) {
+ return null;
+ }
+
+ return $before;
+ }
+
+ private function getAfterOperator(Tokens $tokens, int $index): array
+ {
+ $index = $tokens->getNextMeaningfulToken($index);
+ $after = ['start' => $index];
+
+ while (!$tokens[$index]->equals(':')) {
+ $blockType = Tokens::detectBlockType($tokens[$index]);
+
+ if (null !== $blockType) {
+ $index = $tokens->findBlockEnd($blockType['type'], $index);
+ }
+
+ $after['end'] = $index;
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return $after;
+ }
+
+ /**
+ * Meaningful compare of tokens within ranges.
+ */
+ private function rangeEqualsRange(Tokens $tokens, array $range1, array $range2): bool
+ {
+ $leftStart = $range1['start'];
+ $leftEnd = $range1['end'];
+
+ while ($tokens[$leftStart]->equals('(') && $tokens[$leftEnd]->equals(')')) {
+ $leftStart = $tokens->getNextMeaningfulToken($leftStart);
+ $leftEnd = $tokens->getPrevMeaningfulToken($leftEnd);
+ }
+
+ $rightStart = $range2['start'];
+ $rightEnd = $range2['end'];
+
+ while ($tokens[$rightStart]->equals('(') && $tokens[$rightEnd]->equals(')')) {
+ $rightStart = $tokens->getNextMeaningfulToken($rightStart);
+ $rightEnd = $tokens->getPrevMeaningfulToken($rightEnd);
+ }
+
+ while ($leftStart <= $leftEnd && $rightStart <= $rightEnd) {
+ if (
+ !$tokens[$leftStart]->equals($tokens[$rightStart])
+ && !($tokens[$leftStart]->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN]]) && $tokens[$rightStart]->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN]]))
+ && !($tokens[$leftStart]->equalsAny([']', [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE]]) && $tokens[$rightStart]->equalsAny([']', [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE]]))
+ ) {
+ return false;
+ }
+
+ $leftStart = $tokens->getNextMeaningfulToken($leftStart);
+ $rightStart = $tokens->getNextMeaningfulToken($rightStart);
+ }
+
+ return $leftStart > $leftEnd && $rightStart > $rightEnd;
+ }
+
+ private function clearMeaningfulFromRange(Tokens $tokens, array $range): void
+ {
+ // $range['end'] must be meaningful!
+ for ($i = $range['end']; $i >= $range['start']; $i = $tokens->getPrevMeaningfulToken($i)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($i);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToNullCoalescingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToNullCoalescingFixer.php
new file mode 100644
index 0000000..de2be79
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/TernaryToNullCoalescingFixer.php
@@ -0,0 +1,220 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class TernaryToNullCoalescingFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Use `null` coalescing operator `??` where possible. Requires PHP >= 7.0.',
+ [
+ new CodeSample(
+ "<?php\n\$sample = isset(\$a) ? \$a : \$b;\n"
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before AssignNullCoalescingToCoalesceEqualFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_ISSET);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $issetIndexes = array_keys($tokens->findGivenKind(T_ISSET));
+ while ($issetIndex = array_pop($issetIndexes)) {
+ $this->fixIsset($tokens, $issetIndex);
+ }
+ }
+
+ /**
+ * @param int $index of `T_ISSET` token
+ */
+ private function fixIsset(Tokens $tokens, int $index): void
+ {
+ $prevTokenIndex = $tokens->getPrevMeaningfulToken($index);
+ if ($this->isHigherPrecedenceAssociativityOperator($tokens[$prevTokenIndex])) {
+ return;
+ }
+
+ $startBraceIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $endBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startBraceIndex);
+
+ $ternaryQuestionMarkIndex = $tokens->getNextMeaningfulToken($endBraceIndex);
+ if (!$tokens[$ternaryQuestionMarkIndex]->equals('?')) {
+ return; // we are not in a ternary operator
+ }
+
+ // search what is inside the isset()
+ $issetTokens = $this->getMeaningfulSequence($tokens, $startBraceIndex, $endBraceIndex);
+ if ($this->hasChangingContent($issetTokens)) {
+ return; // some weird stuff inside the isset
+ }
+
+ // search what is inside the middle argument of ternary operator
+ $ternaryColonIndex = $tokens->getNextTokenOfKind($ternaryQuestionMarkIndex, [':']);
+ $ternaryFirstOperandTokens = $this->getMeaningfulSequence($tokens, $ternaryQuestionMarkIndex, $ternaryColonIndex);
+
+ if ($issetTokens->generateCode() !== $ternaryFirstOperandTokens->generateCode()) {
+ return; // regardless of non-meaningful tokens, the operands are different
+ }
+
+ $ternaryFirstOperandIndex = $tokens->getNextMeaningfulToken($ternaryQuestionMarkIndex);
+
+ // preserve comments and spaces
+ $comments = [];
+ $commentStarted = false;
+ for ($loopIndex = $index; $loopIndex < $ternaryFirstOperandIndex; ++$loopIndex) {
+ if ($tokens[$loopIndex]->isComment()) {
+ $comments[] = $tokens[$loopIndex];
+ $commentStarted = true;
+ } elseif ($commentStarted) {
+ if ($tokens[$loopIndex]->isWhitespace()) {
+ $comments[] = $tokens[$loopIndex];
+ }
+
+ $commentStarted = false;
+ }
+ }
+
+ $tokens[$ternaryColonIndex] = new Token([T_COALESCE, '??']);
+ $tokens->overrideRange($index, $ternaryFirstOperandIndex - 1, $comments);
+ }
+
+ /**
+ * Get the sequence of meaningful tokens and returns a new Tokens instance.
+ *
+ * @param int $start start index
+ * @param int $end end index
+ */
+ private function getMeaningfulSequence(Tokens $tokens, int $start, int $end): Tokens
+ {
+ $sequence = [];
+ $index = $start;
+ while ($index < $end) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ if ($index >= $end || null === $index) {
+ break;
+ }
+
+ $sequence[] = $tokens[$index];
+ }
+
+ return Tokens::fromArray($sequence);
+ }
+
+ /**
+ * Check if the requested token is an operator computed
+ * before the ternary operator along with the `isset()`.
+ */
+ private function isHigherPrecedenceAssociativityOperator(Token $token): bool
+ {
+ static $operatorsPerId = [
+ T_ARRAY_CAST => true,
+ T_BOOLEAN_AND => true,
+ T_BOOLEAN_OR => true,
+ T_BOOL_CAST => true,
+ T_COALESCE => true,
+ T_DEC => true,
+ T_DOUBLE_CAST => true,
+ T_INC => true,
+ T_INT_CAST => true,
+ T_IS_EQUAL => true,
+ T_IS_GREATER_OR_EQUAL => true,
+ T_IS_IDENTICAL => true,
+ T_IS_NOT_EQUAL => true,
+ T_IS_NOT_IDENTICAL => true,
+ T_IS_SMALLER_OR_EQUAL => true,
+ T_OBJECT_CAST => true,
+ T_POW => true,
+ T_SL => true,
+ T_SPACESHIP => true,
+ T_SR => true,
+ T_STRING_CAST => true,
+ T_UNSET_CAST => true,
+ ];
+
+ static $operatorsPerContent = [
+ '!',
+ '%',
+ '&',
+ '*',
+ '+',
+ '-',
+ '/',
+ ':',
+ '^',
+ '|',
+ '~',
+ '.',
+ ];
+
+ return isset($operatorsPerId[$token->getId()]) || $token->equalsAny($operatorsPerContent);
+ }
+
+ /**
+ * Check if the `isset()` content may change if called multiple times.
+ *
+ * @param Tokens $tokens The original token list
+ */
+ private function hasChangingContent(Tokens $tokens): bool
+ {
+ static $operatorsPerId = [
+ T_DEC,
+ T_INC,
+ T_YIELD,
+ T_YIELD_FROM,
+ ];
+
+ foreach ($tokens as $token) {
+ if ($token->isGivenKind($operatorsPerId) || $token->equals('(')) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php
new file mode 100644
index 0000000..c1558d7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/UnaryOperatorSpacesFixer.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Operator;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class UnaryOperatorSpacesFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Unary operators should be placed adjacent to their operands.',
+ [new CodeSample("<?php\n\$sample ++;\n-- \$sample;\n\$sample = ! ! \$a;\n\$sample = ~ \$c;\nfunction & foo(){}\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NotOperatorWithSpaceFixer, NotOperatorWithSuccessorSpaceFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if ($tokensAnalyzer->isUnarySuccessorOperator($index)) {
+ if (!$tokens[$tokens->getPrevNonWhitespace($index)]->isComment()) {
+ $tokens->removeLeadingWhitespace($index);
+ }
+
+ continue;
+ }
+
+ if ($tokensAnalyzer->isUnaryPredecessorOperator($index)) {
+ $tokens->removeTrailingWhitespace($index);
+
+ continue;
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php
new file mode 100644
index 0000000..897bd1f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/BlankLineAfterOpeningTagFixer.php
@@ -0,0 +1,101 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpTag;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Ceeram <ceeram@cakephp.org>
+ */
+final class BlankLineAfterOpeningTagFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line.',
+ [new CodeSample("<?php \$a = 1;\n\$b = 1;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoBlankLinesBeforeNamespaceFixer.
+ * Must run after DeclareStrictTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_OPEN_TAG);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ // ignore files with short open tag and ignore non-monolithic files
+ if (!$tokens[0]->isGivenKind(T_OPEN_TAG) || !$tokens->isMonolithicPhp()) {
+ return;
+ }
+
+ $newlineFound = false;
+ /** @var Token $token */
+ foreach ($tokens as $token) {
+ if ($token->isWhitespace() && str_contains($token->getContent(), "\n")) {
+ $newlineFound = true;
+
+ break;
+ }
+ }
+
+ // ignore one-line files
+ if (!$newlineFound) {
+ return;
+ }
+
+ $token = $tokens[0];
+
+ if (!str_contains($token->getContent(), "\n")) {
+ $tokens[0] = new Token([$token->getId(), rtrim($token->getContent()).$lineEnding]);
+ }
+
+ if (!str_contains($tokens[1]->getContent(), "\n")) {
+ if ($tokens[1]->isWhitespace()) {
+ $tokens[1] = new Token([T_WHITESPACE, $lineEnding.$tokens[1]->getContent()]);
+ } else {
+ $tokens->insertAt(1, new Token([T_WHITESPACE, $lineEnding]));
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php
new file mode 100644
index 0000000..e11cb6a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/EchoTagSyntaxFixer.php
@@ -0,0 +1,269 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpTag;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Michele Locati <michele@locati.it>
+ */
+final class EchoTagSyntaxFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /** @internal */
+ public const OPTION_FORMAT = 'format';
+
+ /** @internal */
+ public const OPTION_SHORTEN_SIMPLE_STATEMENTS_ONLY = 'shorten_simple_statements_only';
+
+ /** @internal */
+ public const OPTION_LONG_FUNCTION = 'long_function';
+
+ /** @internal */
+ public const FORMAT_SHORT = 'short';
+
+ /** @internal */
+ public const FORMAT_LONG = 'long';
+
+ /** @internal */
+ public const LONG_FUNCTION_ECHO = 'echo';
+
+ /** @internal */
+ public const LONG_FUNCTION_PRINT = 'print';
+
+ private const SUPPORTED_FORMAT_OPTIONS = [
+ self::FORMAT_LONG,
+ self::FORMAT_SHORT,
+ ];
+
+ private const SUPPORTED_LONGFUNCTION_OPTIONS = [
+ self::LONG_FUNCTION_ECHO,
+ self::LONG_FUNCTION_PRINT,
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $sample = <<<'EOT'
+<?=1?>
+<?php print '2' . '3'; ?>
+<?php /* comment */ echo '2' . '3'; ?>
+<?php print '2' . '3'; someFunction(); ?>
+
+EOT
+ ;
+
+ return new FixerDefinition(
+ 'Replaces short-echo `<?=` with long format `<?php echo`/`<?php print` syntax, or vice-versa.',
+ [
+ new CodeSample($sample),
+ new CodeSample($sample, [self::OPTION_FORMAT => self::FORMAT_LONG]),
+ new CodeSample($sample, [self::OPTION_FORMAT => self::FORMAT_LONG, self::OPTION_LONG_FUNCTION => self::LONG_FUNCTION_PRINT]),
+ new CodeSample($sample, [self::OPTION_FORMAT => self::FORMAT_SHORT]),
+ new CodeSample($sample, [self::OPTION_FORMAT => self::FORMAT_SHORT, self::OPTION_SHORTEN_SIMPLE_STATEMENTS_ONLY => false]),
+ ],
+ null
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoMixedEchoPrintFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ if (self::FORMAT_SHORT === $this->configuration[self::OPTION_FORMAT]) {
+ return $tokens->isAnyTokenKindsFound([T_ECHO, T_PRINT]);
+ }
+
+ return $tokens->isTokenKindFound(T_OPEN_TAG_WITH_ECHO);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder(self::OPTION_FORMAT, 'The desired language construct.'))
+ ->setAllowedValues(self::SUPPORTED_FORMAT_OPTIONS)
+ ->setDefault(self::FORMAT_LONG)
+ ->getOption(),
+ (new FixerOptionBuilder(self::OPTION_LONG_FUNCTION, 'The function to be used to expand the short echo tags'))
+ ->setAllowedValues(self::SUPPORTED_LONGFUNCTION_OPTIONS)
+ ->setDefault(self::LONG_FUNCTION_ECHO)
+ ->getOption(),
+ (new FixerOptionBuilder(self::OPTION_SHORTEN_SIMPLE_STATEMENTS_ONLY, 'Render short-echo tags only in case of simple code'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (self::FORMAT_SHORT === $this->configuration[self::OPTION_FORMAT]) {
+ $this->longToShort($tokens);
+ } else {
+ $this->shortToLong($tokens);
+ }
+ }
+
+ private function longToShort(Tokens $tokens): void
+ {
+ $count = $tokens->count();
+
+ for ($index = 0; $index < $count; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_OPEN_TAG)) {
+ continue;
+ }
+
+ $nextMeaningful = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $nextMeaningful) {
+ return;
+ }
+
+ if (!$tokens[$nextMeaningful]->isGivenKind([T_ECHO, T_PRINT])) {
+ $index = $nextMeaningful;
+
+ continue;
+ }
+
+ if (true === $this->configuration[self::OPTION_SHORTEN_SIMPLE_STATEMENTS_ONLY] && $this->isComplexCode($tokens, $nextMeaningful + 1)) {
+ $index = $nextMeaningful;
+
+ continue;
+ }
+
+ $newTokens = $this->buildLongToShortTokens($tokens, $index, $nextMeaningful);
+ $tokens->overrideRange($index, $nextMeaningful, $newTokens);
+ $count = $tokens->count();
+ }
+ }
+
+ private function shortToLong(Tokens $tokens): void
+ {
+ if (self::LONG_FUNCTION_PRINT === $this->configuration[self::OPTION_LONG_FUNCTION]) {
+ $echoToken = [T_PRINT, 'print'];
+ } else {
+ $echoToken = [T_ECHO, 'echo'];
+ }
+
+ $index = -1;
+
+ while (true) {
+ $index = $tokens->getNextTokenOfKind($index, [[T_OPEN_TAG_WITH_ECHO]]);
+
+ if (null === $index) {
+ return;
+ }
+
+ $replace = [new Token([T_OPEN_TAG, '<?php ']), new Token($echoToken)];
+
+ if (!$tokens[$index + 1]->isWhitespace()) {
+ $replace[] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ $tokens->overrideRange($index, $index, $replace);
+ ++$index;
+ }
+ }
+
+ /**
+ * Check if $tokens, starting at $index, contains "complex code", that is, the content
+ * of the echo tag contains more than a simple "echo something".
+ *
+ * This is done by a very quick test: if the tag contains non-whitespace tokens after
+ * a semicolon, we consider it as "complex".
+ *
+ * @example `<?php echo 1 ?>` is false (not complex)
+ * @example `<?php echo 'hello' . 'world'; ?>` is false (not "complex")
+ * @example `<?php echo 2; $set = 3 ?>` is true ("complex")
+ */
+ private function isComplexCode(Tokens $tokens, int $index): bool
+ {
+ $semicolonFound = false;
+
+ for ($count = $tokens->count(); $index < $count; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_CLOSE_TAG)) {
+ return false;
+ }
+
+ if (';' === $token->getContent()) {
+ $semicolonFound = true;
+ } elseif ($semicolonFound && !$token->isWhitespace()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Builds the list of tokens that replace a long echo sequence.
+ *
+ * @return Token[]
+ */
+ private function buildLongToShortTokens(Tokens $tokens, int $openTagIndex, int $echoTagIndex): array
+ {
+ $result = [new Token([T_OPEN_TAG_WITH_ECHO, '<?='])];
+
+ $start = $tokens->getNextNonWhitespace($openTagIndex);
+
+ if ($start === $echoTagIndex) {
+ // No non-whitespace tokens between $openTagIndex and $echoTagIndex
+ return $result;
+ }
+
+ // Find the last non-whitespace index before $echoTagIndex
+ $end = $echoTagIndex - 1;
+
+ while ($tokens[$end]->isWhitespace()) {
+ --$end;
+ }
+
+ // Copy the non-whitespace tokens between $openTagIndex and $echoTagIndex
+ for ($index = $start; $index <= $end; ++$index) {
+ $result[] = clone $tokens[$index];
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php
new file mode 100644
index 0000000..c1e60f0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/FullOpeningTagFixer.php
@@ -0,0 +1,134 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpTag;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR1 ¶2.1.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class FullOpeningTagFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHP code must use the long `<?php` tags or short-echo `<?=` tags and not other tag variations.',
+ [
+ new CodeSample(
+ '<?
+
+echo "Hello!";
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // must run before all Token-based fixers
+ return 98;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $content = $tokens->generateCode();
+
+ // replace all <? with <?php to replace all short open tags even without short_open_tag option enabled
+ $newContent = Preg::replace('/<\?(?:phP|pHp|pHP|Php|PhP|PHp|PHP)?(\s|$)/', '<?php$1', $content, -1, $count);
+
+ if (!$count) {
+ return;
+ }
+
+ /* the following code is magic to revert previous replacements which should NOT be replaced, for example incorrectly replacing
+ * > echo '<? ';
+ * with
+ * > echo '<?php ';
+ */
+ $newTokens = Tokens::fromCode($newContent);
+
+ $tokensOldContentLength = 0;
+
+ foreach ($newTokens as $index => $token) {
+ if ($token->isGivenKind(T_OPEN_TAG)) {
+ $tokenContent = $token->getContent();
+
+ if ('<?php' !== strtolower(substr($content, $tokensOldContentLength, 5))) {
+ $tokenContent = '<? ';
+ }
+
+ $tokensOldContentLength += \strlen($tokenContent);
+
+ continue;
+ }
+
+ if ($token->isGivenKind([T_COMMENT, T_DOC_COMMENT, T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE, T_STRING])) {
+ $tokenContent = '';
+ $tokenContentLength = 0;
+ $parts = explode('<?php', $token->getContent());
+ $iLast = \count($parts) - 1;
+
+ foreach ($parts as $i => $part) {
+ $tokenContent .= $part;
+ $tokenContentLength += \strlen($part);
+
+ if ($i !== $iLast) {
+ $originalTokenContent = substr($content, $tokensOldContentLength + $tokenContentLength, 5);
+ if ('<?php' === strtolower($originalTokenContent)) {
+ $tokenContent .= $originalTokenContent;
+ $tokenContentLength += 5;
+ } else {
+ $tokenContent .= '<?';
+ $tokenContentLength += 2;
+ }
+ }
+ }
+
+ $newTokens[$index] = new Token([$token->getId(), $tokenContent]);
+ $token = $newTokens[$index];
+ }
+
+ $tokensOldContentLength += \strlen($token->getContent());
+ }
+
+ $tokens->overrideRange(0, $tokens->count() - 1, $newTokens);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php
new file mode 100644
index 0000000..74727d1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/LinebreakAfterOpeningTagFixer.php
@@ -0,0 +1,80 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpTag;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Ceeram <ceeram@cakephp.org>
+ */
+final class LinebreakAfterOpeningTagFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Ensure there is no code on the same line as the PHP open tag.',
+ [new CodeSample("<?php \$a = 1;\n\$b = 3;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_OPEN_TAG);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // ignore files with short open tag and ignore non-monolithic files
+ if (!$tokens[0]->isGivenKind(T_OPEN_TAG) || !$tokens->isMonolithicPhp()) {
+ return;
+ }
+
+ // ignore if linebreak already present
+ if (str_contains($tokens[0]->getContent(), "\n")) {
+ return;
+ }
+
+ $newlineFound = false;
+ foreach ($tokens as $token) {
+ if ($token->isWhitespace() && str_contains($token->getContent(), "\n")) {
+ $newlineFound = true;
+
+ break;
+ }
+ }
+
+ // ignore one-line files
+ if (!$newlineFound) {
+ return;
+ }
+
+ $tokens[0] = new Token([T_OPEN_TAG, rtrim($tokens[0]->getContent()).$this->whitespacesConfig->getLineEnding()]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php
new file mode 100644
index 0000000..ff1e00b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpTag/NoClosingTagFixer.php
@@ -0,0 +1,72 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpTag;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶2.2.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoClosingTagFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The closing `?>` tag MUST be omitted from files containing only PHP.',
+ [new CodeSample("<?php\nclass Sample\n{\n}\n?>\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_CLOSE_TAG);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (\count($tokens) < 2 || !$tokens->isMonolithicPhp() || !$tokens->isTokenKindFound(T_CLOSE_TAG)) {
+ return;
+ }
+
+ $closeTags = $tokens->findGivenKind(T_CLOSE_TAG);
+ $index = key($closeTags);
+
+ if (isset($tokens[$index - 1]) && $tokens[$index - 1]->isWhitespace()) {
+ $tokens->clearAt($index - 1);
+ }
+ $tokens->clearAt($index);
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$prevIndex]->equalsAny([';', '}', [T_OPEN_TAG]])) {
+ $tokens->insertAt($prevIndex + 1, new Token(';'));
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php
new file mode 100644
index 0000000..3c289c2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitConstructFixer.php
@@ -0,0 +1,209 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitConstructFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string,string>
+ */
+ private static $assertionFixers = [
+ 'assertSame' => 'fixAssertPositive',
+ 'assertEquals' => 'fixAssertPositive',
+ 'assertNotEquals' => 'fixAssertNegative',
+ 'assertNotSame' => 'fixAssertNegative',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPUnit assertion method calls like `->assertSame(true, $foo)` should be written with dedicated method like `->assertTrue($foo)`.',
+ [
+ new CodeSample(
+ '<?php
+final class FooTest extends \PHPUnit_Framework_TestCase {
+ public function testSomething() {
+ $this->assertEquals(false, $b);
+ $this->assertSame(true, $a);
+ $this->assertNotEquals(null, $c);
+ $this->assertNotSame(null, $d);
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class FooTest extends \PHPUnit_Framework_TestCase {
+ public function testSomething() {
+ $this->assertEquals(false, $b);
+ $this->assertSame(true, $a);
+ $this->assertNotEquals(null, $c);
+ $this->assertNotSame(null, $d);
+ }
+}
+',
+ ['assertions' => ['assertSame', 'assertNotSame']]
+ ),
+ ],
+ null,
+ 'Fixer could be risky if one is overriding PHPUnit\'s native methods.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpUnitDedicateAssertFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ // no assertions to be fixed - fast return
+ if (empty($this->configuration['assertions'])) {
+ return;
+ }
+
+ foreach ($this->configuration['assertions'] as $assertionMethod) {
+ $assertionFixer = self::$assertionFixers[$assertionMethod];
+
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ $index = $this->{$assertionFixer}($tokens, $index, $assertionMethod);
+
+ if (null === $index) {
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('assertions', 'List of assertion methods to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(array_keys(self::$assertionFixers))])
+ ->setDefault([
+ 'assertEquals',
+ 'assertSame',
+ 'assertNotEquals',
+ 'assertNotSame',
+ ])
+ ->getOption(),
+ ]);
+ }
+
+ private function fixAssertNegative(Tokens $tokens, int $index, string $method): ?int
+ {
+ static $map = [
+ 'false' => 'assertNotFalse',
+ 'null' => 'assertNotNull',
+ 'true' => 'assertNotTrue',
+ ];
+
+ return $this->fixAssert($map, $tokens, $index, $method);
+ }
+
+ private function fixAssertPositive(Tokens $tokens, int $index, string $method): ?int
+ {
+ static $map = [
+ 'false' => 'assertFalse',
+ 'null' => 'assertNull',
+ 'true' => 'assertTrue',
+ ];
+
+ return $this->fixAssert($map, $tokens, $index, $method);
+ }
+
+ /**
+ * @param array<string, string> $map
+ */
+ private function fixAssert(array $map, Tokens $tokens, int $index, string $method): ?int
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ $sequence = $tokens->findSequence(
+ [
+ [T_STRING, $method],
+ '(',
+ ],
+ $index
+ );
+
+ if (null === $sequence) {
+ return null;
+ }
+
+ $sequenceIndexes = array_keys($sequence);
+ if (!$functionsAnalyzer->isTheSameClassCall($tokens, $sequenceIndexes[0])) {
+ return null;
+ }
+
+ $sequenceIndexes[2] = $tokens->getNextMeaningfulToken($sequenceIndexes[1]);
+ $firstParameterToken = $tokens[$sequenceIndexes[2]];
+
+ if (!$firstParameterToken->isNativeConstant()) {
+ return $sequenceIndexes[2];
+ }
+
+ $sequenceIndexes[3] = $tokens->getNextMeaningfulToken($sequenceIndexes[2]);
+
+ // return if first method argument is an expression, not value
+ if (!$tokens[$sequenceIndexes[3]]->equals(',')) {
+ return $sequenceIndexes[3];
+ }
+
+ $tokens[$sequenceIndexes[0]] = new Token([T_STRING, $map[strtolower($firstParameterToken->getContent())]]);
+ $tokens->clearRange($sequenceIndexes[2], $tokens->getNextNonWhitespace($sequenceIndexes[3]) - 1);
+
+ return $sequenceIndexes[3];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
new file mode 100644
index 0000000..45e5b84
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php
@@ -0,0 +1,537 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitDedicateAssertFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string,array|true>
+ */
+ private static $fixMap = [
+ 'array_key_exists' => [
+ 'positive' => 'assertArrayHasKey',
+ 'negative' => 'assertArrayNotHasKey',
+ 'argument_count' => 2,
+ ],
+ 'empty' => [
+ 'positive' => 'assertEmpty',
+ 'negative' => 'assertNotEmpty',
+ ],
+ 'file_exists' => [
+ 'positive' => 'assertFileExists',
+ 'negative' => 'assertFileNotExists',
+ ],
+ 'is_array' => true,
+ 'is_bool' => true,
+ 'is_callable' => true,
+ 'is_dir' => [
+ 'positive' => 'assertDirectoryExists',
+ 'negative' => 'assertDirectoryNotExists',
+ ],
+ 'is_double' => true,
+ 'is_float' => true,
+ 'is_infinite' => [
+ 'positive' => 'assertInfinite',
+ 'negative' => 'assertFinite',
+ ],
+ 'is_int' => true,
+ 'is_integer' => true,
+ 'is_long' => true,
+ 'is_nan' => [
+ 'positive' => 'assertNan',
+ 'negative' => false,
+ ],
+ 'is_null' => [
+ 'positive' => 'assertNull',
+ 'negative' => 'assertNotNull',
+ ],
+ 'is_numeric' => true,
+ 'is_object' => true,
+ 'is_readable' => [
+ 'positive' => 'assertIsReadable',
+ 'negative' => 'assertNotIsReadable',
+ ],
+ 'is_real' => true,
+ 'is_resource' => true,
+ 'is_scalar' => true,
+ 'is_string' => true,
+ 'is_writable' => [
+ 'positive' => 'assertIsWritable',
+ 'negative' => 'assertNotIsWritable',
+ ],
+ 'str_contains' => [ // since 7.5
+ 'positive' => 'assertStringContainsString',
+ 'negative' => 'assertStringNotContainsString',
+ 'argument_count' => 2,
+ 'swap_arguments' => true,
+ ],
+ 'str_ends_with' => [ // since 3.4
+ 'positive' => 'assertStringEndsWith',
+ 'negative' => 'assertStringEndsNotWith',
+ 'argument_count' => 2,
+ 'swap_arguments' => true,
+ ],
+ 'str_starts_with' => [ // since 3.4
+ 'positive' => 'assertStringStartsWith',
+ 'negative' => 'assertStringStartsNotWith',
+ 'argument_count' => 2,
+ 'swap_arguments' => true,
+ ],
+ ];
+
+ /**
+ * @var string[]
+ */
+ private $functions = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ // assertions added in 3.0: assertArrayNotHasKey assertArrayHasKey assertFileNotExists assertFileExists assertNotNull, assertNull
+ $this->functions = [
+ 'array_key_exists',
+ 'file_exists',
+ 'is_null',
+ 'str_ends_with',
+ 'str_starts_with',
+ ];
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_3_5)) {
+ // assertions added in 3.5: assertInternalType assertNotEmpty assertEmpty
+ $this->functions = array_merge($this->functions, [
+ 'empty',
+ 'is_array',
+ 'is_bool',
+ 'is_boolean',
+ 'is_callable',
+ 'is_double',
+ 'is_float',
+ 'is_int',
+ 'is_integer',
+ 'is_long',
+ 'is_numeric',
+ 'is_object',
+ 'is_real',
+ 'is_resource',
+ 'is_scalar',
+ 'is_string',
+ ]);
+ }
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_0)) {
+ // assertions added in 5.0: assertFinite assertInfinite assertNan
+ $this->functions = array_merge($this->functions, [
+ 'is_infinite',
+ 'is_nan',
+ ]);
+ }
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_6)) {
+ // assertions added in 5.6: assertDirectoryExists assertDirectoryNotExists assertIsReadable assertNotIsReadable assertIsWritable assertNotIsWritable
+ $this->functions = array_merge($this->functions, [
+ 'is_dir',
+ 'is_readable',
+ 'is_writable',
+ ]);
+ }
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_7_5)) {
+ $this->functions = array_merge($this->functions, [
+ 'str_contains',
+ ]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPUnit assertions like `assertInternalType`, `assertFileExists`, should be used over `assertTrue`.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomeTest()
+ {
+ $this->assertTrue(is_float( $a), "my message");
+ $this->assertTrue(is_nan($a));
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomeTest()
+ {
+ $this->assertTrue(is_dir($a));
+ $this->assertTrue(is_writable($a));
+ $this->assertTrue(is_readable($a));
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_5_6]
+ ),
+ ],
+ null,
+ 'Fixer could be risky if one is overriding PHPUnit\'s native methods.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpUnitDedicateAssertInternalTypeFixer.
+ * Must run after ModernizeStrposFixer, NoAliasFunctionsFixer, PhpUnitConstructFixer.
+ */
+ public function getPriority(): int
+ {
+ return -15;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ foreach ($this->getPreviousAssertCall($tokens, $startIndex, $endIndex) as $assertCall) {
+ // test and fix for assertTrue/False to dedicated asserts
+ if ('asserttrue' === $assertCall['loweredName'] || 'assertfalse' === $assertCall['loweredName']) {
+ $this->fixAssertTrueFalse($tokens, $argumentsAnalyzer, $assertCall);
+
+ continue;
+ }
+
+ if (
+ 'assertsame' === $assertCall['loweredName']
+ || 'assertnotsame' === $assertCall['loweredName']
+ || 'assertequals' === $assertCall['loweredName']
+ || 'assertnotequals' === $assertCall['loweredName']
+ ) {
+ $this->fixAssertSameEquals($tokens, $assertCall);
+
+ continue;
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('target', 'Target version of PHPUnit.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([
+ PhpUnitTargetVersion::VERSION_3_0,
+ PhpUnitTargetVersion::VERSION_3_5,
+ PhpUnitTargetVersion::VERSION_5_0,
+ PhpUnitTargetVersion::VERSION_5_6,
+ PhpUnitTargetVersion::VERSION_NEWEST,
+ ])
+ ->setDefault(PhpUnitTargetVersion::VERSION_NEWEST)
+ ->getOption(),
+ ]);
+ }
+
+ private function fixAssertTrueFalse(Tokens $tokens, ArgumentsAnalyzer $argumentsAnalyzer, array $assertCall): void
+ {
+ $testDefaultNamespaceTokenIndex = null;
+ $testIndex = $tokens->getNextMeaningfulToken($assertCall['openBraceIndex']);
+
+ if (!$tokens[$testIndex]->isGivenKind([T_EMPTY, T_STRING])) {
+ if (!$tokens[$testIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ return;
+ }
+
+ $testDefaultNamespaceTokenIndex = $testIndex;
+ $testIndex = $tokens->getNextMeaningfulToken($testIndex);
+ }
+
+ $testOpenIndex = $tokens->getNextMeaningfulToken($testIndex);
+
+ if (!$tokens[$testOpenIndex]->equals('(')) {
+ return;
+ }
+
+ $testCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $testOpenIndex);
+ $assertCallCloseIndex = $tokens->getNextMeaningfulToken($testCloseIndex);
+
+ if (!$tokens[$assertCallCloseIndex]->equalsAny([')', ','])) {
+ return;
+ }
+
+ $content = strtolower($tokens[$testIndex]->getContent());
+
+ if (!\in_array($content, $this->functions, true)) {
+ return;
+ }
+
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $testOpenIndex, $testCloseIndex);
+ $isPositive = 'asserttrue' === $assertCall['loweredName'];
+
+ if (\is_array(self::$fixMap[$content])) {
+ $expectedCount = self::$fixMap[$content]['argument_count'] ?? 1;
+
+ if ($expectedCount !== \count($arguments)) {
+ return;
+ }
+
+ $isPositive = $isPositive ? 'positive' : 'negative';
+
+ if (false === self::$fixMap[$content][$isPositive]) {
+ return;
+ }
+
+ $tokens[$assertCall['index']] = new Token([T_STRING, self::$fixMap[$content][$isPositive]]);
+ $this->removeFunctionCall($tokens, $testDefaultNamespaceTokenIndex, $testIndex, $testOpenIndex, $testCloseIndex);
+
+ if (self::$fixMap[$content]['swap_arguments'] ?? false) {
+ if (2 !== $expectedCount) {
+ throw new \RuntimeException('Can only swap two arguments, please update map or logic.');
+ }
+
+ $this->swapArguments($tokens, $arguments);
+ }
+
+ return;
+ }
+
+ if (1 !== \count($arguments)) {
+ return;
+ }
+
+ $type = substr($content, 3);
+
+ $tokens[$assertCall['index']] = new Token([T_STRING, $isPositive ? 'assertInternalType' : 'assertNotInternalType']);
+ $tokens[$testIndex] = new Token([T_CONSTANT_ENCAPSED_STRING, "'".$type."'"]);
+ $tokens[$testOpenIndex] = new Token(',');
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($testCloseIndex);
+ $commaIndex = $tokens->getPrevMeaningfulToken($testCloseIndex);
+
+ if ($tokens[$commaIndex]->equals(',')) {
+ $tokens->removeTrailingWhitespace($commaIndex);
+ $tokens->clearAt($commaIndex);
+ }
+
+ if (!$tokens[$testOpenIndex + 1]->isWhitespace()) {
+ $tokens->insertAt($testOpenIndex + 1, new Token([T_WHITESPACE, ' ']));
+ }
+
+ if (null !== $testDefaultNamespaceTokenIndex) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($testDefaultNamespaceTokenIndex);
+ }
+ }
+
+ private function fixAssertSameEquals(Tokens $tokens, array $assertCall): void
+ {
+ // @ $this->/self::assertEquals/Same([$nextIndex])
+ $expectedIndex = $tokens->getNextMeaningfulToken($assertCall['openBraceIndex']);
+
+ // do not fix
+ // let $a = [1,2]; $b = "2";
+ // "$this->assertEquals("2", count($a)); $this->assertEquals($b, count($a)); $this->assertEquals(2.1, count($a));"
+
+ if (!$tokens[$expectedIndex]->isGivenKind(T_LNUMBER)) {
+ return;
+ }
+
+ // @ $this->/self::assertEquals/Same([$nextIndex,$commaIndex])
+ $commaIndex = $tokens->getNextMeaningfulToken($expectedIndex);
+
+ if (!$tokens[$commaIndex]->equals(',')) {
+ return;
+ }
+
+ // @ $this->/self::assertEquals/Same([$nextIndex,$commaIndex,$countCallIndex])
+ $countCallIndex = $tokens->getNextMeaningfulToken($commaIndex);
+
+ if ($tokens[$countCallIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $defaultNamespaceTokenIndex = $countCallIndex;
+ $countCallIndex = $tokens->getNextMeaningfulToken($countCallIndex);
+ } else {
+ $defaultNamespaceTokenIndex = null;
+ }
+
+ if (!$tokens[$countCallIndex]->isGivenKind(T_STRING)) {
+ return;
+ }
+
+ $lowerContent = strtolower($tokens[$countCallIndex]->getContent());
+
+ if ('count' !== $lowerContent && 'sizeof' !== $lowerContent) {
+ return; // not a call to "count" or "sizeOf"
+ }
+
+ // @ $this->/self::assertEquals/Same([$nextIndex,$commaIndex,[$defaultNamespaceTokenIndex,]$countCallIndex,$countCallOpenBraceIndex])
+ $countCallOpenBraceIndex = $tokens->getNextMeaningfulToken($countCallIndex);
+
+ if (!$tokens[$countCallOpenBraceIndex]->equals('(')) {
+ return;
+ }
+
+ $countCallCloseBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $countCallOpenBraceIndex);
+ $afterCountCallCloseBraceIndex = $tokens->getNextMeaningfulToken($countCallCloseBraceIndex);
+
+ if (!$tokens[$afterCountCallCloseBraceIndex]->equalsAny([')', ','])) {
+ return;
+ }
+
+ $this->removeFunctionCall(
+ $tokens,
+ $defaultNamespaceTokenIndex,
+ $countCallIndex,
+ $countCallOpenBraceIndex,
+ $countCallCloseBraceIndex
+ );
+
+ $tokens[$assertCall['index']] = new Token([
+ T_STRING,
+ false === strpos($assertCall['loweredName'], 'not', 6) ? 'assertCount' : 'assertNotCount',
+ ]);
+ }
+
+ private function getPreviousAssertCall(Tokens $tokens, int $startIndex, int $endIndex): iterable
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = $endIndex; $index > $startIndex; --$index) {
+ $index = $tokens->getPrevTokenOfKind($index, [[T_STRING]]);
+
+ if (null === $index) {
+ return;
+ }
+
+ // test if "assert" something call
+ $loweredContent = strtolower($tokens[$index]->getContent());
+
+ if (!str_starts_with($loweredContent, 'assert')) {
+ continue;
+ }
+
+ // test candidate for simple calls like: ([\]+'some fixable call'(...))
+ $openBraceIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$openBraceIndex]->equals('(')) {
+ continue;
+ }
+
+ if (!$functionsAnalyzer->isTheSameClassCall($tokens, $index)) {
+ continue;
+ }
+
+ yield [
+ 'index' => $index,
+ 'loweredName' => $loweredContent,
+ 'openBraceIndex' => $openBraceIndex,
+ 'closeBraceIndex' => $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openBraceIndex),
+ ];
+ }
+ }
+
+ private function removeFunctionCall(Tokens $tokens, ?int $callNSIndex, int $callIndex, int $openIndex, int $closeIndex): void
+ {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($callIndex);
+
+ if (null !== $callNSIndex) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($callNSIndex);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openIndex);
+ $commaIndex = $tokens->getPrevMeaningfulToken($closeIndex);
+
+ if ($tokens[$commaIndex]->equals(',')) {
+ $tokens->removeTrailingWhitespace($commaIndex);
+ $tokens->clearAt($commaIndex);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeIndex);
+ }
+
+ private function swapArguments(Tokens $tokens, array $argumentsIndices): void
+ {
+ [$firstArgumentIndex, $secondArgumentIndex] = array_keys($argumentsIndices);
+
+ $firstArgumentEndIndex = $argumentsIndices[$firstArgumentIndex];
+ $secondArgumentEndIndex = $argumentsIndices[$secondArgumentIndex];
+
+ $firstClone = $this->cloneAndClearTokens($tokens, $firstArgumentIndex, $firstArgumentEndIndex);
+ $secondClone = $this->cloneAndClearTokens($tokens, $secondArgumentIndex, $secondArgumentEndIndex);
+
+ if (!$firstClone[0]->isWhitespace()) {
+ array_unshift($firstClone, new Token([T_WHITESPACE, ' ']));
+ }
+
+ $tokens->insertAt($secondArgumentIndex, $firstClone);
+
+ if ($secondClone[0]->isWhitespace()) {
+ array_shift($secondClone);
+ }
+
+ $tokens->insertAt($firstArgumentIndex, $secondClone);
+ }
+
+ private function cloneAndClearTokens(Tokens $tokens, int $start, int $end): array
+ {
+ $clone = [];
+
+ for ($i = $start; $i <= $end; ++$i) {
+ if ('' === $tokens[$i]->getContent()) {
+ continue;
+ }
+
+ $clone[] = clone $tokens[$i];
+ $tokens->clearAt($i);
+ }
+
+ return $clone;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php
new file mode 100644
index 0000000..39d6db8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitDedicateAssertInternalTypeFixer.php
@@ -0,0 +1,202 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class PhpUnitDedicateAssertInternalTypeFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array
+ */
+ private $typeToDedicatedAssertMap = [
+ 'array' => 'assertIsArray',
+ 'boolean' => 'assertIsBool',
+ 'bool' => 'assertIsBool',
+ 'double' => 'assertIsFloat',
+ 'float' => 'assertIsFloat',
+ 'integer' => 'assertIsInt',
+ 'int' => 'assertIsInt',
+ 'null' => 'assertNull',
+ 'numeric' => 'assertIsNumeric',
+ 'object' => 'assertIsObject',
+ 'real' => 'assertIsFloat',
+ 'resource' => 'assertIsResource',
+ 'string' => 'assertIsString',
+ 'scalar' => 'assertIsScalar',
+ 'callable' => 'assertIsCallable',
+ 'iterable' => 'assertIsIterable',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPUnit assertions like `assertIsArray` should be used over `assertInternalType`.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit\Framework\TestCase
+{
+ public function testMe()
+ {
+ $this->assertInternalType("array", $var);
+ $this->assertInternalType("boolean", $var);
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit\Framework\TestCase
+{
+ public function testMe()
+ {
+ $this->assertInternalType("array", $var);
+ $this->assertInternalType("boolean", $var);
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_7_5]
+ ),
+ ],
+ null,
+ 'Risky when PHPUnit methods are overridden or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after PhpUnitDedicateAssertFixer.
+ */
+ public function getPriority(): int
+ {
+ return -16;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('target', 'Target version of PHPUnit.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([PhpUnitTargetVersion::VERSION_7_5, PhpUnitTargetVersion::VERSION_NEWEST])
+ ->setDefault(PhpUnitTargetVersion::VERSION_NEWEST)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $anonymousClassIndexes = [];
+ $tokenAnalyzer = new TokensAnalyzer($tokens);
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ if (!$tokens[$index]->isClassy() || !$tokenAnalyzer->isAnonymousClass($index)) {
+ continue;
+ }
+
+ $openingBraceIndex = $tokens->getNextTokenOfKind($index, ['{']);
+ $closingBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $openingBraceIndex);
+
+ $anonymousClassIndexes[$closingBraceIndex] = $openingBraceIndex;
+ }
+
+ for ($index = $endIndex - 1; $index > $startIndex; --$index) {
+ if (isset($anonymousClassIndexes[$index])) {
+ $index = $anonymousClassIndexes[$index];
+
+ continue;
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $functionName = strtolower($tokens[$index]->getContent());
+
+ if ('assertinternaltype' !== $functionName && 'assertnotinternaltype' !== $functionName) {
+ continue;
+ }
+
+ $bracketTokenIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$bracketTokenIndex]->equals('(')) {
+ continue;
+ }
+
+ $expectedTypeTokenIndex = $tokens->getNextMeaningfulToken($bracketTokenIndex);
+ $expectedTypeToken = $tokens[$expectedTypeTokenIndex];
+
+ if (!$expectedTypeToken->equals([T_CONSTANT_ENCAPSED_STRING])) {
+ continue;
+ }
+
+ $expectedType = trim($expectedTypeToken->getContent(), '\'"');
+
+ if (!isset($this->typeToDedicatedAssertMap[$expectedType])) {
+ continue;
+ }
+
+ $commaTokenIndex = $tokens->getNextMeaningfulToken($expectedTypeTokenIndex);
+
+ if (!$tokens[$commaTokenIndex]->equals(',')) {
+ continue;
+ }
+
+ $newAssertion = $this->typeToDedicatedAssertMap[$expectedType];
+
+ if ('assertnotinternaltype' === $functionName) {
+ $newAssertion = str_replace('Is', 'IsNot', $newAssertion);
+ $newAssertion = str_replace('Null', 'NotNull', $newAssertion);
+ }
+
+ $nextMeaningfulTokenIndex = $tokens->getNextMeaningfulToken($commaTokenIndex);
+
+ $tokens->overrideRange($index, $nextMeaningfulTokenIndex - 1, [
+ new Token([T_STRING, $newAssertion]),
+ new Token('('),
+ ]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
new file mode 100644
index 0000000..4bb8001
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitExpectationFixer.php
@@ -0,0 +1,289 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitExpectationFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @var array<string, string>
+ */
+ private $methodMap = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->methodMap = [
+ 'setExpectedException' => 'expectExceptionMessage',
+ ];
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_6)) {
+ $this->methodMap['setExpectedExceptionRegExp'] = 'expectExceptionMessageRegExp';
+ }
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_8_4)) {
+ $this->methodMap['setExpectedExceptionRegExp'] = 'expectExceptionMessageMatches';
+ $this->methodMap['expectExceptionMessageRegExp'] = 'expectExceptionMessageMatches';
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Usages of `->setExpectedException*` methods MUST be replaced by `->expectException*` methods.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testFoo()
+ {
+ $this->setExpectedException("RuntimeException", "Msg", 123);
+ foo();
+ }
+
+ public function testBar()
+ {
+ $this->setExpectedExceptionRegExp("RuntimeException", "/Msg.*/", 123);
+ bar();
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testFoo()
+ {
+ $this->setExpectedException("RuntimeException", null, 123);
+ foo();
+ }
+
+ public function testBar()
+ {
+ $this->setExpectedExceptionRegExp("RuntimeException", "/Msg.*/", 123);
+ bar();
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_8_4]
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testFoo()
+ {
+ $this->setExpectedException("RuntimeException", null, 123);
+ foo();
+ }
+
+ public function testBar()
+ {
+ $this->setExpectedExceptionRegExp("RuntimeException", "/Msg.*/", 123);
+ bar();
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_5_6]
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testFoo()
+ {
+ $this->setExpectedException("RuntimeException", "Msg", 123);
+ foo();
+ }
+
+ public function testBar()
+ {
+ $this->setExpectedExceptionRegExp("RuntimeException", "/Msg.*/", 123);
+ bar();
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_5_2]
+ ),
+ ],
+ null,
+ 'Risky when PHPUnit classes are overridden or not accessible, or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after PhpUnitNoExpectationAnnotationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('target', 'Target version of PHPUnit.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([PhpUnitTargetVersion::VERSION_5_2, PhpUnitTargetVersion::VERSION_5_6, PhpUnitTargetVersion::VERSION_8_4, PhpUnitTargetVersion::VERSION_NEWEST])
+ ->setDefault(PhpUnitTargetVersion::VERSION_NEWEST)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ foreach (Token::getObjectOperatorKinds() as $objectOperator) {
+ $this->applyPhpUnitClassFixWithObjectOperator($tokens, $startIndex, $endIndex, $objectOperator);
+ }
+ }
+
+ private function applyPhpUnitClassFixWithObjectOperator(Tokens $tokens, int $startIndex, int $endIndex, int $objectOperator): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ $oldMethodSequence = [
+ [T_VARIABLE, '$this'],
+ [$objectOperator],
+ [T_STRING],
+ ];
+
+ for ($index = $startIndex; $startIndex < $endIndex; ++$index) {
+ $match = $tokens->findSequence($oldMethodSequence, $index);
+
+ if (null === $match) {
+ return;
+ }
+
+ [$thisIndex, , $index] = array_keys($match);
+
+ if (!isset($this->methodMap[$tokens[$index]->getContent()])) {
+ continue;
+ }
+
+ $openIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+ $commaIndex = $tokens->getPrevMeaningfulToken($closeIndex);
+ if ($tokens[$commaIndex]->equals(',')) {
+ $tokens->removeTrailingWhitespace($commaIndex);
+ $tokens->clearAt($commaIndex);
+ }
+
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $openIndex, $closeIndex);
+ $argumentsCnt = \count($arguments);
+
+ $argumentsReplacements = ['expectException', $this->methodMap[$tokens[$index]->getContent()], 'expectExceptionCode'];
+
+ $indent = $this->whitespacesConfig->getLineEnding().WhitespacesAnalyzer::detectIndent($tokens, $thisIndex);
+
+ $isMultilineWhitespace = false;
+
+ for ($cnt = $argumentsCnt - 1; $cnt >= 1; --$cnt) {
+ $argStart = array_keys($arguments)[$cnt];
+ $argBefore = $tokens->getPrevMeaningfulToken($argStart);
+
+ if ('expectExceptionMessage' === $argumentsReplacements[$cnt]) {
+ $paramIndicatorIndex = $tokens->getNextMeaningfulToken($argBefore);
+ $afterParamIndicatorIndex = $tokens->getNextMeaningfulToken($paramIndicatorIndex);
+
+ if (
+ $tokens[$paramIndicatorIndex]->equals([T_STRING, 'null'], false)
+ && $tokens[$afterParamIndicatorIndex]->equals(')')
+ ) {
+ if ($tokens[$argBefore + 1]->isWhitespace()) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($argBefore + 1);
+ }
+ $tokens->clearTokenAndMergeSurroundingWhitespace($argBefore);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($paramIndicatorIndex);
+
+ continue;
+ }
+ }
+
+ $isMultilineWhitespace = $isMultilineWhitespace || ($tokens[$argStart]->isWhitespace() && !$tokens[$argStart]->isWhitespace(" \t"));
+ $tokensOverrideArgStart = [
+ new Token([T_WHITESPACE, $indent]),
+ new Token([T_VARIABLE, '$this']),
+ new Token([T_OBJECT_OPERATOR, '->']),
+ new Token([T_STRING, $argumentsReplacements[$cnt]]),
+ new Token('('),
+ ];
+ $tokensOverrideArgBefore = [
+ new Token(')'),
+ new Token(';'),
+ ];
+
+ if ($isMultilineWhitespace) {
+ $tokensOverrideArgStart[] = new Token([T_WHITESPACE, $indent.$this->whitespacesConfig->getIndent()]);
+ array_unshift($tokensOverrideArgBefore, new Token([T_WHITESPACE, $indent]));
+ }
+
+ if ($tokens[$argStart]->isWhitespace()) {
+ $tokens->overrideRange($argStart, $argStart, $tokensOverrideArgStart);
+ } else {
+ $tokens->insertAt($argStart, $tokensOverrideArgStart);
+ }
+
+ $tokens->overrideRange($argBefore, $argBefore, $tokensOverrideArgBefore);
+ }
+
+ $methodName = 'expectException';
+ if ('expectExceptionMessageRegExp' === $tokens[$index]->getContent()) {
+ $methodName = $this->methodMap[$tokens[$index]->getContent()];
+ }
+ $tokens[$index] = new Token([T_STRING, $methodName]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitFqcnAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitFqcnAnnotationFixer.php
new file mode 100644
index 0000000..dd440ec
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitFqcnAnnotationFixer.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Roland Franssen <franssen.roland@gmail.com>
+ */
+final class PhpUnitFqcnAnnotationFixer extends AbstractPhpUnitFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPUnit annotations should be a FQCNs including a root namespace.',
+ [new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @expectedException InvalidArgumentException
+ * @covers Project\NameSpace\Something
+ * @coversDefaultClass Project\Default
+ * @uses Project\Test\Util
+ */
+ public function testSomeTest()
+ {
+ }
+}
+'
+ )]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUnusedImportsFixer, PhpdocOrderByValueFixer.
+ */
+ public function getPriority(): int
+ {
+ return -9;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $prevDocCommentIndex = $tokens->getPrevTokenOfKind($startIndex, [[T_DOC_COMMENT]]);
+
+ if (null !== $prevDocCommentIndex) {
+ $startIndex = $prevDocCommentIndex;
+ }
+
+ $this->fixPhpUnitClass($tokens, $startIndex, $endIndex);
+ }
+
+ private function fixPhpUnitClass(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ if ($tokens[$index]->isGivenKind(T_DOC_COMMENT)) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, Preg::replace(
+ '~^(\s*\*\s*@(?:expectedException|covers|coversDefaultClass|uses)\h+)(?!(?:self|static)::)(\w.*)$~m',
+ '$1\\\\$2',
+ $tokens[$index]->getContent()
+ )]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php
new file mode 100644
index 0000000..b05f052
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitInternalClassFixer.php
@@ -0,0 +1,165 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gert de Pagter <BackEndTea@gmail.com>
+ */
+final class PhpUnitInternalClassFixer extends AbstractPhpUnitFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All PHPUnit test classes should be marked as internal.',
+ [
+ new CodeSample("<?php\nclass MyTest extends TestCase {}\n"),
+ new CodeSample(
+ "<?php\nclass MyTest extends TestCase {}\nfinal class FinalTest extends TestCase {}\nabstract class AbstractTest extends TestCase {}\n",
+ ['types' => ['final']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before FinalInternalClassFixer.
+ */
+ public function getPriority(): int
+ {
+ return 68;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $types = ['normal', 'final', 'abstract'];
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('types', 'What types of classes to mark as internal'))
+ ->setAllowedValues([(new AllowedValueSubset($types))])
+ ->setAllowedTypes(['array'])
+ ->setDefault(['normal', 'final'])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $classIndex = $tokens->getPrevTokenOfKind($startIndex, [[T_CLASS]]);
+
+ if (!$this->isAllowedByConfiguration($tokens, $classIndex)) {
+ return;
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $classIndex);
+
+ if ($this->isPHPDoc($tokens, $docBlockIndex)) {
+ $this->updateDocBlockIfNeeded($tokens, $docBlockIndex);
+ } else {
+ $this->createDocBlock($tokens, $docBlockIndex);
+ }
+ }
+
+ private function isAllowedByConfiguration(Tokens $tokens, int $i): bool
+ {
+ $typeIndex = $tokens->getPrevMeaningfulToken($i);
+ if ($tokens[$typeIndex]->isGivenKind(T_FINAL)) {
+ return \in_array('final', $this->configuration['types'], true);
+ }
+
+ if ($tokens[$typeIndex]->isGivenKind(T_ABSTRACT)) {
+ return \in_array('abstract', $this->configuration['types'], true);
+ }
+
+ return \in_array('normal', $this->configuration['types'], true);
+ }
+
+ private function createDocBlock(Tokens $tokens, int $docBlockIndex): void
+ {
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
+ $toInsert = [
+ new Token([T_DOC_COMMENT, '/**'.$lineEnd."{$originalIndent} * @internal".$lineEnd."{$originalIndent} */"]),
+ new Token([T_WHITESPACE, $lineEnd.$originalIndent]),
+ ];
+ $index = $tokens->getNextMeaningfulToken($docBlockIndex);
+ $tokens->insertAt($index, $toInsert);
+ }
+
+ private function updateDocBlockIfNeeded(Tokens $tokens, int $docBlockIndex): void
+ {
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+ if (!empty($doc->getAnnotationsOfType('internal'))) {
+ return;
+ }
+ $doc = $this->makeDocBlockMultiLineIfNeeded($doc, $tokens, $docBlockIndex);
+ $lines = $this->addInternalAnnotation($doc, $tokens, $docBlockIndex);
+ $lines = implode('', $lines);
+
+ $tokens[$docBlockIndex] = new Token([T_DOC_COMMENT, $lines]);
+ }
+
+ /**
+ * @return Line[]
+ */
+ private function addInternalAnnotation(DocBlock $docBlock, Tokens $tokens, int $docBlockIndex): array
+ {
+ $lines = $docBlock->getLines();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $docBlockIndex);
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ array_splice($lines, -1, 0, $originalIndent.' *'.$lineEnd.$originalIndent.' * @internal'.$lineEnd);
+
+ return $lines;
+ }
+
+ private function makeDocBlockMultiLineIfNeeded(DocBlock $doc, Tokens $tokens, int $docBlockIndex): DocBlock
+ {
+ $lines = $doc->getLines();
+ if (1 === \count($lines) && empty($doc->getAnnotationsOfType('internal'))) {
+ $indent = WhitespacesAnalyzer::detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
+ $doc->makeMultiLine($indent, $this->whitespacesConfig->getLineEnding());
+
+ return $doc;
+ }
+
+ return $doc;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
new file mode 100644
index 0000000..5764d42
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMethodCasingFixer.php
@@ -0,0 +1,213 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use PhpCsFixer\Utils;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class PhpUnitMethodCasingFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const CAMEL_CASE = 'camel_case';
+
+ /**
+ * @internal
+ */
+ public const SNAKE_CASE = 'snake_case';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Enforce camel (or snake) case for PHPUnit test methods, following configuration.',
+ [
+ new CodeSample(
+ '<?php
+class MyTest extends \\PhpUnit\\FrameWork\\TestCase
+{
+ public function test_my_code() {}
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+class MyTest extends \\PhpUnit\\FrameWork\\TestCase
+{
+ public function testMyCode() {}
+}
+',
+ ['case' => self::SNAKE_CASE]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after PhpUnitTestAnnotationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('case', 'Apply camel or snake case to test methods'))
+ ->setAllowedValues([self::CAMEL_CASE, self::SNAKE_CASE])
+ ->setDefault(self::CAMEL_CASE)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($index = $endIndex - 1; $index > $startIndex; --$index) {
+ if (!$this->isTestMethod($tokens, $index)) {
+ continue;
+ }
+
+ $functionNameIndex = $tokens->getNextMeaningfulToken($index);
+ $functionName = $tokens[$functionNameIndex]->getContent();
+ $newFunctionName = $this->updateMethodCasing($functionName);
+
+ if ($newFunctionName !== $functionName) {
+ $tokens[$functionNameIndex] = new Token([T_STRING, $newFunctionName]);
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $index);
+
+ if ($this->isPHPDoc($tokens, $docBlockIndex)) {
+ $this->updateDocBlock($tokens, $docBlockIndex);
+ }
+ }
+ }
+
+ private function updateMethodCasing(string $functionName): string
+ {
+ $parts = explode('::', $functionName);
+
+ $functionNamePart = array_pop($parts);
+
+ if (self::CAMEL_CASE === $this->configuration['case']) {
+ $newFunctionNamePart = $functionNamePart;
+ $newFunctionNamePart = ucwords($newFunctionNamePart, '_');
+ $newFunctionNamePart = str_replace('_', '', $newFunctionNamePart);
+ $newFunctionNamePart = lcfirst($newFunctionNamePart);
+ } else {
+ $newFunctionNamePart = Utils::camelCaseToUnderscore($functionNamePart);
+ }
+
+ $parts[] = $newFunctionNamePart;
+
+ return implode('::', $parts);
+ }
+
+ private function isTestMethod(Tokens $tokens, int $index): bool
+ {
+ // Check if we are dealing with a (non abstract, non lambda) function
+ if (!$this->isMethod($tokens, $index)) {
+ return false;
+ }
+
+ // if the function name starts with test it's a test
+ $functionNameIndex = $tokens->getNextMeaningfulToken($index);
+ $functionName = $tokens[$functionNameIndex]->getContent();
+
+ if ($this->startsWith('test', $functionName)) {
+ return true;
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $index);
+
+ return
+ $this->isPHPDoc($tokens, $docBlockIndex) // If the function doesn't have test in its name, and no doc block, it's not a test
+ && str_contains($tokens[$docBlockIndex]->getContent(), '@test')
+ ;
+ }
+
+ private function isMethod(Tokens $tokens, int $index): bool
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ return $tokens[$index]->isGivenKind(T_FUNCTION) && !$tokensAnalyzer->isLambda($index);
+ }
+
+ private function startsWith(string $needle, string $haystack): bool
+ {
+ return substr($haystack, 0, \strlen($needle)) === $needle;
+ }
+
+ private function updateDocBlock(Tokens $tokens, int $docBlockIndex): void
+ {
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+ $lines = $doc->getLines();
+
+ $docBlockNeedsUpdate = false;
+ for ($inc = 0; $inc < \count($lines); ++$inc) {
+ $lineContent = $lines[$inc]->getContent();
+ if (!str_contains($lineContent, '@depends')) {
+ continue;
+ }
+
+ $newLineContent = Preg::replaceCallback('/(@depends\s+)(.+)(\b)/', function (array $matches): string {
+ return sprintf(
+ '%s%s%s',
+ $matches[1],
+ $this->updateMethodCasing($matches[2]),
+ $matches[3]
+ );
+ }, $lineContent);
+
+ if ($newLineContent !== $lineContent) {
+ $lines[$inc] = new Line($newLineContent);
+ $docBlockNeedsUpdate = true;
+ }
+ }
+
+ if ($docBlockNeedsUpdate) {
+ $lines = implode('', $lines);
+ $tokens[$docBlockIndex] = new Token([T_DOC_COMMENT, $lines]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php
new file mode 100644
index 0000000..8c5794e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockFixer.php
@@ -0,0 +1,142 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitMockFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var bool
+ */
+ private $fixCreatePartialMock;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Usages of `->getMock` and `->getMockWithoutInvokingTheOriginalConstructor` methods MUST be replaced by `->createMock` or `->createPartialMock` methods.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testFoo()
+ {
+ $mock = $this->getMockWithoutInvokingTheOriginalConstructor("Foo");
+ $mock1 = $this->getMock("Foo");
+ $mock1 = $this->getMock("Bar", ["aaa"]);
+ $mock1 = $this->getMock("Baz", ["aaa"], ["argument"]); // version with more than 2 params is not supported
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testFoo()
+ {
+ $mock1 = $this->getMock("Foo");
+ $mock1 = $this->getMock("Bar", ["aaa"]); // version with multiple params is not supported
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_5_4]
+ ),
+ ],
+ null,
+ 'Risky when PHPUnit classes are overridden or not accessible, or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->fixCreatePartialMock = PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_5);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ if (!$tokens[$index]->isObjectOperator()) {
+ continue;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->equals([T_STRING, 'getMockWithoutInvokingTheOriginalConstructor'], false)) {
+ $tokens[$index] = new Token([T_STRING, 'createMock']);
+ } elseif ($tokens[$index]->equals([T_STRING, 'getMock'], false)) {
+ $openingParenthesis = $tokens->getNextMeaningfulToken($index);
+ $closingParenthesis = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openingParenthesis);
+
+ $argumentsCount = $argumentsAnalyzer->countArguments($tokens, $openingParenthesis, $closingParenthesis);
+
+ if (1 === $argumentsCount) {
+ $tokens[$index] = new Token([T_STRING, 'createMock']);
+ } elseif (2 === $argumentsCount && true === $this->fixCreatePartialMock) {
+ $tokens[$index] = new Token([T_STRING, 'createPartialMock']);
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('target', 'Target version of PHPUnit.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([PhpUnitTargetVersion::VERSION_5_4, PhpUnitTargetVersion::VERSION_5_5, PhpUnitTargetVersion::VERSION_NEWEST])
+ ->setDefault(PhpUnitTargetVersion::VERSION_NEWEST)
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockShortWillReturnFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockShortWillReturnFixer.php
new file mode 100644
index 0000000..4e3ea63
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitMockShortWillReturnFixer.php
@@ -0,0 +1,129 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Michał Adamski <michal.adamski@gmail.com>
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class PhpUnitMockShortWillReturnFixer extends AbstractPhpUnitFixer
+{
+ private const RETURN_METHODS_MAP = [
+ 'returnargument' => 'willReturnArgument',
+ 'returncallback' => 'willReturnCallback',
+ 'returnself' => 'willReturnSelf',
+ 'returnvalue' => 'willReturn',
+ 'returnvaluemap' => 'willReturnMap',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Usage of PHPUnit\'s mock e.g. `->will($this->returnValue(..))` must be replaced by its shorter equivalent such as `->willReturn(...)`.',
+ [
+ new CodeSample('<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomeTest()
+ {
+ $someMock = $this->createMock(Some::class);
+ $someMock->method("some")->will($this->returnSelf());
+ $someMock->method("some")->will($this->returnValue("example"));
+ $someMock->method("some")->will($this->returnArgument(2));
+ $someMock->method("some")->will($this->returnCallback("str_rot13"));
+ $someMock->method("some")->will($this->returnValueMap(["a","b","c"]));
+ }
+}
+'),
+ ],
+ null,
+ 'Risky when PHPUnit classes are overridden or not accessible, or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ if (!$tokens[$index]->isObjectOperator()) {
+ continue;
+ }
+
+ $functionToReplaceIndex = $tokens->getNextMeaningfulToken($index);
+ if (!$tokens[$functionToReplaceIndex]->equals([T_STRING, 'will'], false)) {
+ continue;
+ }
+
+ $functionToReplaceOpeningBraceIndex = $tokens->getNextMeaningfulToken($functionToReplaceIndex);
+ if (!$tokens[$functionToReplaceOpeningBraceIndex]->equals('(')) {
+ continue;
+ }
+
+ $classReferenceIndex = $tokens->getNextMeaningfulToken($functionToReplaceOpeningBraceIndex);
+ $objectOperatorIndex = $tokens->getNextMeaningfulToken($classReferenceIndex);
+ $functionToRemoveIndex = $tokens->getNextMeaningfulToken($objectOperatorIndex);
+
+ if (!$functionsAnalyzer->isTheSameClassCall($tokens, $functionToRemoveIndex)) {
+ continue;
+ }
+
+ if (!\array_key_exists(strtolower($tokens[$functionToRemoveIndex]->getContent()), self::RETURN_METHODS_MAP)) {
+ continue;
+ }
+
+ $openingBraceIndex = $tokens->getNextMeaningfulToken($functionToRemoveIndex);
+ if (!$tokens[$openingBraceIndex]->equals('(')) {
+ continue;
+ }
+
+ if ($tokens[$tokens->getNextMeaningfulToken($openingBraceIndex)]->isGivenKind(CT::T_FIRST_CLASS_CALLABLE)) {
+ continue;
+ }
+
+ $closingBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openingBraceIndex);
+
+ $tokens[$functionToReplaceIndex] = new Token([T_STRING, self::RETURN_METHODS_MAP[strtolower($tokens[$functionToRemoveIndex]->getContent())]]);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($classReferenceIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($objectOperatorIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($functionToRemoveIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openingBraceIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closingBraceIndex);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php
new file mode 100644
index 0000000..2c171a3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNamespacedFixer.php
@@ -0,0 +1,230 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitNamespacedFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var string
+ */
+ private $originalClassRegEx;
+
+ /**
+ * Class Mappings.
+ *
+ * * [original classname => new classname] Some classes which match the
+ * original class regular expression do not have a same-compound name-
+ * space class and need a dedicated translation table. This trans-
+ * lation table is defined in @see configure.
+ *
+ * @var array|string[] Class Mappings
+ */
+ private $classMap;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $codeSample = '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomething()
+ {
+ PHPUnit_Framework_Assert::assertTrue(true);
+ }
+}
+';
+
+ return new FixerDefinition(
+ 'PHPUnit classes MUST be used in namespaced version, e.g. `\PHPUnit\Framework\TestCase` instead of `\PHPUnit_Framework_TestCase`.',
+ [
+ new CodeSample($codeSample),
+ new CodeSample($codeSample, ['target' => PhpUnitTargetVersion::VERSION_4_8]),
+ ],
+ "PHPUnit v6 has finally fully switched to namespaces.\n"
+ ."You could start preparing the upgrade by switching from non-namespaced TestCase to namespaced one.\n"
+ .'Forward compatibility layer (`\PHPUnit\Framework\TestCase` class) was backported to PHPUnit v4.8.35 and PHPUnit v5.4.0.'."\n"
+ .'Extended forward compatibility layer (`PHPUnit\Framework\Assert`, `PHPUnit\Framework\BaseTestListener`, `PHPUnit\Framework\TestListener` classes) was introduced in v5.7.0.'."\n",
+ 'Risky when PHPUnit classes are overridden or not accessible, or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ if (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_6_0)) {
+ $this->originalClassRegEx = '/^PHPUnit_\w+$/i';
+ // @noinspection ClassConstantCanBeUsedInspection
+ $this->classMap = [
+ 'PHPUnit_Extensions_PhptTestCase' => 'PHPUnit\Runner\PhptTestCase',
+ 'PHPUnit_Framework_Constraint' => 'PHPUnit\Framework\Constraint\Constraint',
+ 'PHPUnit_Framework_Constraint_StringMatches' => 'PHPUnit\Framework\Constraint\StringMatchesFormatDescription',
+ 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => 'PHPUnit\Framework\Constraint\JsonMatchesErrorMessageProvider',
+ 'PHPUnit_Framework_Constraint_PCREMatch' => 'PHPUnit\Framework\Constraint\RegularExpression',
+ 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => 'PHPUnit\Framework\Constraint\ExceptionMessageRegularExpression',
+ 'PHPUnit_Framework_Constraint_And' => 'PHPUnit\Framework\Constraint\LogicalAnd',
+ 'PHPUnit_Framework_Constraint_Or' => 'PHPUnit\Framework\Constraint\LogicalOr',
+ 'PHPUnit_Framework_Constraint_Not' => 'PHPUnit\Framework\Constraint\LogicalNot',
+ 'PHPUnit_Framework_Constraint_Xor' => 'PHPUnit\Framework\Constraint\LogicalXor',
+ 'PHPUnit_Framework_Error' => 'PHPUnit\Framework\Error\Error',
+ 'PHPUnit_Framework_TestSuite_DataProvider' => 'PHPUnit\Framework\DataProviderTestSuite',
+ 'PHPUnit_Framework_MockObject_Invocation_Static' => 'PHPUnit\Framework\MockObject\Invocation\StaticInvocation',
+ 'PHPUnit_Framework_MockObject_Invocation_Object' => 'PHPUnit\Framework\MockObject\Invocation\ObjectInvocation',
+ 'PHPUnit_Framework_MockObject_Stub_Return' => 'PHPUnit\Framework\MockObject\Stub\ReturnStub',
+ 'PHPUnit_Runner_Filter_Group_Exclude' => 'PHPUnit\Runner\Filter\ExcludeGroupFilterIterator',
+ 'PHPUnit_Runner_Filter_Group_Include' => 'PHPUnit\Runner\Filter\IncludeGroupFilterIterator',
+ 'PHPUnit_Runner_Filter_Test' => 'PHPUnit\Runner\Filter\NameFilterIterator',
+ 'PHPUnit_Util_PHP' => 'PHPUnit\Util\PHP\AbstractPhpProcess',
+ 'PHPUnit_Util_PHP_Default' => 'PHPUnit\Util\PHP\DefaultPhpProcess',
+ 'PHPUnit_Util_PHP_Windows' => 'PHPUnit\Util\PHP\WindowsPhpProcess',
+ 'PHPUnit_Util_Regex' => 'PHPUnit\Util\RegularExpression',
+ 'PHPUnit_Util_TestDox_ResultPrinter_XML' => 'PHPUnit\Util\TestDox\XmlResultPrinter',
+ 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => 'PHPUnit\Util\TestDox\HtmlResultPrinter',
+ 'PHPUnit_Util_TestDox_ResultPrinter_Text' => 'PHPUnit\Util\TestDox\TextResultPrinter',
+ 'PHPUnit_Util_TestSuiteIterator' => 'PHPUnit\Framework\TestSuiteIterator',
+ 'PHPUnit_Util_XML' => 'PHPUnit\Util\Xml',
+ ];
+ } elseif (PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_5_7)) {
+ $this->originalClassRegEx = '/^PHPUnit_Framework_TestCase|PHPUnit_Framework_Assert|PHPUnit_Framework_BaseTestListener|PHPUnit_Framework_TestListener$/i';
+ $this->classMap = [];
+ } else {
+ $this->originalClassRegEx = '/^PHPUnit_Framework_TestCase$/i';
+ $this->classMap = [];
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $importedOriginalClassesMap = [];
+ $currIndex = 0;
+
+ while (true) {
+ $currIndex = $tokens->getNextTokenOfKind($currIndex, [[T_STRING]]);
+
+ if (null === $currIndex) {
+ break;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($currIndex);
+
+ if ($tokens[$prevIndex]->isGivenKind([T_CONST, T_DOUBLE_COLON])) {
+ continue;
+ }
+
+ $originalClass = $tokens[$currIndex]->getContent();
+
+ if (1 !== Preg::match($this->originalClassRegEx, $originalClass)) {
+ ++$currIndex;
+
+ continue;
+ }
+
+ $substituteTokens = $this->generateReplacement($originalClass);
+
+ $tokens->clearAt($currIndex);
+ $tokens->insertAt(
+ $currIndex,
+ isset($importedOriginalClassesMap[$originalClass]) ? $substituteTokens[$substituteTokens->getSize() - 1] : $substituteTokens
+ );
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($currIndex);
+ if ($tokens[$prevIndex]->isGivenKind(T_USE)) {
+ $importedOriginalClassesMap[$originalClass] = true;
+ } elseif ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+
+ if ($tokens[$prevIndex]->isGivenKind(T_USE)) {
+ $importedOriginalClassesMap[$originalClass] = true;
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('target', 'Target version of PHPUnit.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([PhpUnitTargetVersion::VERSION_4_8, PhpUnitTargetVersion::VERSION_5_7, PhpUnitTargetVersion::VERSION_6_0, PhpUnitTargetVersion::VERSION_NEWEST])
+ ->setDefault(PhpUnitTargetVersion::VERSION_NEWEST)
+ ->getOption(),
+ ]);
+ }
+
+ private function generateReplacement(string $originalClassName): Tokens
+ {
+ $delimiter = '_';
+ $string = $originalClassName;
+
+ if (isset($this->classMap[$originalClassName])) {
+ $delimiter = '\\';
+ $string = $this->classMap[$originalClassName];
+ }
+
+ $parts = explode($delimiter, $string);
+
+ $tokensArray = [];
+ while (!empty($parts)) {
+ $tokensArray[] = new Token([T_STRING, array_shift($parts)]);
+ if (!empty($parts)) {
+ $tokensArray[] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+ }
+
+ return Tokens::fromArray($tokensArray);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php
new file mode 100644
index 0000000..fc729f3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitNoExpectationAnnotationFixer.php
@@ -0,0 +1,275 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitNoExpectationAnnotationFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @var bool
+ */
+ private $fixMessageRegExp;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->fixMessageRegExp = PhpUnitTargetVersion::fulfills($this->configuration['target'], PhpUnitTargetVersion::VERSION_4_3);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Usages of `@expectedException*` annotations MUST be replaced by `->setExpectedException*` methods.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @expectedException FooException
+ * @expectedExceptionMessageRegExp /foo.*$/
+ * @expectedExceptionCode 123
+ */
+ function testAaa()
+ {
+ aaa();
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @expectedException FooException
+ * @expectedExceptionCode 123
+ */
+ function testBbb()
+ {
+ bbb();
+ }
+
+ /**
+ * @expectedException FooException
+ * @expectedExceptionMessageRegExp /foo.*$/
+ */
+ function testCcc()
+ {
+ ccc();
+ }
+}
+',
+ ['target' => PhpUnitTargetVersion::VERSION_3_2]
+ ),
+ ],
+ null,
+ 'Risky when PHPUnit classes are overridden or not accessible, or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpUnitExpectationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('target', 'Target version of PHPUnit.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([PhpUnitTargetVersion::VERSION_3_2, PhpUnitTargetVersion::VERSION_4_3, PhpUnitTargetVersion::VERSION_NEWEST])
+ ->setDefault(PhpUnitTargetVersion::VERSION_NEWEST)
+ ->getOption(),
+ (new FixerOptionBuilder('use_class_const', 'Use ::class notation.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ if (!$tokens[$i]->isGivenKind(T_FUNCTION) || $tokensAnalyzer->isLambda($i)) {
+ continue;
+ }
+
+ $functionIndex = $i;
+ $docBlockIndex = $i;
+
+ // ignore abstract functions
+ $braceIndex = $tokens->getNextTokenOfKind($functionIndex, [';', '{']);
+ if (!$tokens[$braceIndex]->equals('{')) {
+ continue;
+ }
+
+ do {
+ $docBlockIndex = $tokens->getPrevNonWhitespace($docBlockIndex);
+ } while ($tokens[$docBlockIndex]->isGivenKind([T_PUBLIC, T_PROTECTED, T_PRIVATE, T_FINAL, T_ABSTRACT, T_COMMENT]));
+
+ if (!$tokens[$docBlockIndex]->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+ $annotations = [];
+
+ foreach ($doc->getAnnotationsOfType([
+ 'expectedException',
+ 'expectedExceptionCode',
+ 'expectedExceptionMessage',
+ 'expectedExceptionMessageRegExp',
+ ]) as $annotation) {
+ $tag = $annotation->getTag()->getName();
+ $content = $this->extractContentFromAnnotation($annotation);
+ $annotations[$tag] = $content;
+ $annotation->remove();
+ }
+
+ if (!isset($annotations['expectedException'])) {
+ continue;
+ }
+ if (!$this->fixMessageRegExp && isset($annotations['expectedExceptionMessageRegExp'])) {
+ continue;
+ }
+
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $docBlockIndex);
+
+ $paramList = $this->annotationsToParamList($annotations);
+
+ $newMethodsCode = '<?php $this->'
+ .(isset($annotations['expectedExceptionMessageRegExp']) ? 'setExpectedExceptionRegExp' : 'setExpectedException')
+ .'('
+ .implode(', ', $paramList)
+ .');';
+ $newMethods = Tokens::fromCode($newMethodsCode);
+ $newMethods[0] = new Token([
+ T_WHITESPACE,
+ $this->whitespacesConfig->getLineEnding().$originalIndent.$this->whitespacesConfig->getIndent(),
+ ]);
+
+ // apply changes
+ $docContent = $doc->getContent();
+ if ('' === $docContent) {
+ $docContent = '/** */';
+ }
+ $tokens[$docBlockIndex] = new Token([T_DOC_COMMENT, $docContent]);
+ $tokens->insertAt($braceIndex + 1, $newMethods);
+
+ $whitespaceIndex = $braceIndex + $newMethods->getSize() + 1;
+ $tokens[$whitespaceIndex] = new Token([
+ T_WHITESPACE,
+ $this->whitespacesConfig->getLineEnding().$tokens[$whitespaceIndex]->getContent(),
+ ]);
+
+ $i = $docBlockIndex;
+ }
+ }
+
+ private function extractContentFromAnnotation(Annotation $annotation): string
+ {
+ $tag = $annotation->getTag()->getName();
+
+ if (1 !== Preg::match('/@'.$tag.'\s+(.+)$/s', $annotation->getContent(), $matches)) {
+ return '';
+ }
+
+ $content = Preg::replace('/\*+\/$/', '', $matches[1]);
+
+ if (Preg::match('/\R/u', $content)) {
+ $content = Preg::replace('/\s*\R+\s*\*\s*/u', ' ', $content);
+ }
+
+ return rtrim($content);
+ }
+
+ private function annotationsToParamList(array $annotations): array
+ {
+ $params = [];
+ $exceptionClass = ltrim($annotations['expectedException'], '\\');
+ if (str_contains($exceptionClass, '*')) {
+ $exceptionClass = substr($exceptionClass, 0, strpos($exceptionClass, '*'));
+ }
+ $exceptionClass = trim($exceptionClass);
+
+ if (true === $this->configuration['use_class_const']) {
+ $params[] = "\\{$exceptionClass}::class";
+ } else {
+ $params[] = "'{$exceptionClass}'";
+ }
+
+ if (isset($annotations['expectedExceptionMessage'])) {
+ $params[] = var_export($annotations['expectedExceptionMessage'], true);
+ } elseif (isset($annotations['expectedExceptionMessageRegExp'])) {
+ $params[] = var_export($annotations['expectedExceptionMessageRegExp'], true);
+ } elseif (isset($annotations['expectedExceptionCode'])) {
+ $params[] = 'null';
+ }
+
+ if (isset($annotations['expectedExceptionCode'])) {
+ $params[] = $annotations['expectedExceptionCode'];
+ }
+
+ return $params;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSetUpTearDownVisibilityFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSetUpTearDownVisibilityFixer.php
new file mode 100644
index 0000000..3db4a3e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSetUpTearDownVisibilityFixer.php
@@ -0,0 +1,117 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gert de Pagter
+ */
+final class PhpUnitSetUpTearDownVisibilityFixer extends AbstractPhpUnitFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Changes the visibility of the `setUp()` and `tearDown()` functions of PHPUnit to `protected`, to match the PHPUnit TestCase.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ private $hello;
+ public function setUp()
+ {
+ $this->hello = "hello";
+ }
+
+ public function tearDown()
+ {
+ $this->hello = null;
+ }
+}
+'
+ ),
+ ],
+ null,
+ 'This fixer may change functions named `setUp()` or `tearDown()` outside of PHPUnit tests, '.
+ 'when a class is wrongly seen as a PHPUnit test.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $counter = 0;
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ if (2 === $counter) {
+ break; // we've seen both method we are interested in, so stop analyzing this class
+ }
+
+ if (!$this->isSetupOrTearDownMethod($tokens, $i)) {
+ continue;
+ }
+
+ ++$counter;
+ $visibility = $tokensAnalyzer->getMethodAttributes($i)['visibility'];
+
+ if (T_PUBLIC === $visibility) {
+ $index = $tokens->getPrevTokenOfKind($i, [[T_PUBLIC]]);
+ $tokens[$index] = new Token([T_PROTECTED, 'protected']);
+
+ continue;
+ }
+
+ if (null === $visibility) {
+ $tokens->insertAt($i, [new Token([T_PROTECTED, 'protected']), new Token([T_WHITESPACE, ' '])]);
+ }
+ }
+ }
+
+ private function isSetupOrTearDownMethod(Tokens $tokens, int $index): bool
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ $isMethod = $tokens[$index]->isGivenKind(T_FUNCTION) && !$tokensAnalyzer->isLambda($index);
+ if (!$isMethod) {
+ return false;
+ }
+
+ $functionNameIndex = $tokens->getNextMeaningfulToken($index);
+ $functionName = strtolower($tokens[$functionNameIndex]->getContent());
+
+ return 'setup' === $functionName || 'teardown' === $functionName;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php
new file mode 100644
index 0000000..04bf421
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php
@@ -0,0 +1,197 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Jefersson Nathan <malukenho.dev@gmail.com>
+ */
+final class PhpUnitSizeClassFixer extends AbstractPhpUnitFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All PHPUnit test cases should have `@small`, `@medium` or `@large` annotation to enable run time limits.',
+ [
+ new CodeSample("<?php\nclass MyTest extends TestCase {}\n"),
+ new CodeSample("<?php\nclass MyTest extends TestCase {}\n", ['group' => 'medium']),
+ ],
+ 'The special groups [small, medium, large] provides a way to identify tests that are taking long to be executed.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('group', 'Define a specific group to be used in case no group is already in use'))
+ ->setAllowedValues(['small', 'medium', 'large'])
+ ->setDefault('small')
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $classIndex = $tokens->getPrevTokenOfKind($startIndex, [[T_CLASS]]);
+
+ if ($this->isAbstractClass($tokens, $classIndex)) {
+ return;
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $classIndex);
+
+ if ($this->isPHPDoc($tokens, $docBlockIndex)) {
+ $this->updateDocBlockIfNeeded($tokens, $docBlockIndex);
+ } else {
+ $this->createDocBlock($tokens, $docBlockIndex);
+ }
+ }
+
+ private function isAbstractClass(Tokens $tokens, int $i): bool
+ {
+ $typeIndex = $tokens->getPrevMeaningfulToken($i);
+
+ return $tokens[$typeIndex]->isGivenKind(T_ABSTRACT);
+ }
+
+ private function createDocBlock(Tokens $tokens, int $docBlockIndex): void
+ {
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
+ $group = $this->configuration['group'];
+ $toInsert = [
+ new Token([T_DOC_COMMENT, '/**'.$lineEnd."{$originalIndent} * @".$group.$lineEnd."{$originalIndent} */"]),
+ new Token([T_WHITESPACE, $lineEnd.$originalIndent]),
+ ];
+ $index = $tokens->getNextMeaningfulToken($docBlockIndex);
+ $tokens->insertAt($index, $toInsert);
+ }
+
+ private function updateDocBlockIfNeeded(Tokens $tokens, int $docBlockIndex): void
+ {
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+ if (!empty($this->filterDocBlock($doc))) {
+ return;
+ }
+ $doc = $this->makeDocBlockMultiLineIfNeeded($doc, $tokens, $docBlockIndex);
+ $lines = $this->addSizeAnnotation($doc, $tokens, $docBlockIndex);
+ $lines = implode('', $lines);
+
+ $tokens[$docBlockIndex] = new Token([T_DOC_COMMENT, $lines]);
+ }
+
+ /**
+ * @return Line[]
+ */
+ private function addSizeAnnotation(DocBlock $docBlock, Tokens $tokens, int $docBlockIndex): array
+ {
+ $lines = $docBlock->getLines();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $docBlockIndex);
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ $group = $this->configuration['group'];
+ array_splice($lines, -1, 0, $originalIndent.' *'.$lineEnd.$originalIndent.' * @'.$group.$lineEnd);
+
+ return $lines;
+ }
+
+ private function makeDocBlockMultiLineIfNeeded(DocBlock $doc, Tokens $tokens, int $docBlockIndex): DocBlock
+ {
+ $lines = $doc->getLines();
+ if (1 === \count($lines) && empty($this->filterDocBlock($doc))) {
+ $lines = $this->splitUpDocBlock($lines, $tokens, $docBlockIndex);
+
+ return new DocBlock(implode('', $lines));
+ }
+
+ return $doc;
+ }
+
+ /**
+ * Take a one line doc block, and turn it into a multi line doc block.
+ *
+ * @param Line[] $lines
+ *
+ * @return Line[]
+ */
+ private function splitUpDocBlock(array $lines, Tokens $tokens, int $docBlockIndex): array
+ {
+ $lineContent = $this->getSingleLineDocBlockEntry($lines[0]);
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
+
+ return [
+ new Line('/**'.$lineEnd),
+ new Line($originalIndent.' * '.$lineContent.$lineEnd),
+ new Line($originalIndent.' */'),
+ ];
+ }
+
+ /**
+ * @todo check whether it's doable to use \PhpCsFixer\DocBlock\DocBlock::getSingleLineDocBlockEntry instead
+ */
+ private function getSingleLineDocBlockEntry(Line $line): string
+ {
+ $line = $line->getContent();
+ $line = str_replace('*/', '', $line);
+ $line = trim($line);
+ $line = str_split($line);
+ $i = \count($line);
+ do {
+ --$i;
+ } while ('*' !== $line[$i] && '*' !== $line[$i - 1] && '/' !== $line[$i - 2]);
+ if (' ' === $line[$i]) {
+ ++$i;
+ }
+ $line = \array_slice($line, $i);
+
+ return implode('', $line);
+ }
+
+ /**
+ * @return Annotation[][]
+ */
+ private function filterDocBlock(DocBlock $doc): array
+ {
+ return array_filter([
+ $doc->getAnnotationsOfType('small'),
+ $doc->getAnnotationsOfType('large'),
+ $doc->getAnnotationsOfType('medium'),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php
new file mode 100644
index 0000000..8f23634
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitStrictFixer.php
@@ -0,0 +1,153 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitStrictFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var array<string,string>
+ */
+ private static $assertionMap = [
+ 'assertAttributeEquals' => 'assertAttributeSame',
+ 'assertAttributeNotEquals' => 'assertAttributeNotSame',
+ 'assertEquals' => 'assertSame',
+ 'assertNotEquals' => 'assertNotSame',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPUnit methods like `assertSame` should be used instead of `assertEquals`.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomeTest()
+ {
+ $this->assertAttributeEquals(a(), b());
+ $this->assertAttributeNotEquals(a(), b());
+ $this->assertEquals(a(), b());
+ $this->assertNotEquals(a(), b());
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomeTest()
+ {
+ $this->assertAttributeEquals(a(), b());
+ $this->assertAttributeNotEquals(a(), b());
+ $this->assertEquals(a(), b());
+ $this->assertNotEquals(a(), b());
+ }
+}
+',
+ ['assertions' => ['assertEquals']]
+ ),
+ ],
+ null,
+ 'Risky when any of the functions are overridden or when testing object equality.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ foreach ($this->configuration['assertions'] as $methodBefore) {
+ $methodAfter = self::$assertionMap[$methodBefore];
+
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ $methodIndex = $tokens->getNextTokenOfKind($index, [[T_STRING, $methodBefore]]);
+
+ if (null === $methodIndex) {
+ break;
+ }
+
+ if (!$functionsAnalyzer->isTheSameClassCall($tokens, $methodIndex)) {
+ continue;
+ }
+
+ $openingParenthesisIndex = $tokens->getNextMeaningfulToken($methodIndex);
+ $argumentsCount = $argumentsAnalyzer->countArguments(
+ $tokens,
+ $openingParenthesisIndex,
+ $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openingParenthesisIndex)
+ );
+
+ if (2 === $argumentsCount || 3 === $argumentsCount) {
+ $tokens[$methodIndex] = new Token([T_STRING, $methodAfter]);
+ }
+
+ $index = $methodIndex;
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('assertions', 'List of assertion methods to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(array_keys(self::$assertionMap))])
+ ->setDefault([
+ 'assertAttributeEquals',
+ 'assertAttributeNotEquals',
+ 'assertEquals',
+ 'assertNotEquals',
+ ])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php
new file mode 100644
index 0000000..c8122c6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTargetVersion.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use Composer\Semver\Comparator;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class PhpUnitTargetVersion
+{
+ public const VERSION_3_0 = '3.0';
+ public const VERSION_3_2 = '3.2';
+ public const VERSION_3_5 = '3.5';
+ public const VERSION_4_3 = '4.3';
+ public const VERSION_4_8 = '4.8';
+ public const VERSION_5_0 = '5.0';
+ public const VERSION_5_2 = '5.2';
+ public const VERSION_5_4 = '5.4';
+ public const VERSION_5_5 = '5.5';
+ public const VERSION_5_6 = '5.6';
+ public const VERSION_5_7 = '5.7';
+ public const VERSION_6_0 = '6.0';
+ public const VERSION_7_5 = '7.5';
+ public const VERSION_8_4 = '8.4';
+ public const VERSION_NEWEST = 'newest';
+
+ private function __construct()
+ {
+ }
+
+ public static function fulfills(string $candidate, string $target): bool
+ {
+ if (self::VERSION_NEWEST === $target) {
+ throw new \LogicException(sprintf('Parameter `target` shall not be provided as "%s", determine proper target for tested PHPUnit feature instead.', self::VERSION_NEWEST));
+ }
+
+ if (self::VERSION_NEWEST === $candidate) {
+ return true;
+ }
+
+ return Comparator::greaterThanOrEqualTo($candidate, $target);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php
new file mode 100644
index 0000000..4e059d0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestAnnotationFixer.php
@@ -0,0 +1,413 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gert de Pagter
+ */
+final class PhpUnitTestAnnotationFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Adds or removes @test annotations from tests, following configuration.',
+ [
+ new CodeSample('<?php
+class Test extends \\PhpUnit\\FrameWork\\TestCase
+{
+ /**
+ * @test
+ */
+ public function itDoesSomething() {} }'.$this->whitespacesConfig->getLineEnding()),
+ new CodeSample('<?php
+class Test extends \\PhpUnit\\FrameWork\\TestCase
+{
+public function testItDoesSomething() {}}'.$this->whitespacesConfig->getLineEnding(), ['style' => 'annotation']),
+ ],
+ null,
+ 'This fixer may change the name of your tests, and could cause incompatibility with'.
+ ' abstract classes or interfaces.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpUnitMethodCasingFixer, PhpdocTrimFixer.
+ */
+ public function getPriority(): int
+ {
+ return 10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ if ('annotation' === $this->configuration['style']) {
+ $this->applyTestAnnotation($tokens, $startIndex, $endIndex);
+ } else {
+ $this->applyTestPrefix($tokens, $startIndex, $endIndex);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('style', 'Whether to use the @test annotation or not.'))
+ ->setAllowedValues(['prefix', 'annotation'])
+ ->setDefault('prefix')
+ ->getOption(),
+ ]);
+ }
+
+ private function applyTestAnnotation(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ if (!$this->isTestMethod($tokens, $i)) {
+ continue;
+ }
+
+ $functionNameIndex = $tokens->getNextMeaningfulToken($i);
+ $functionName = $tokens[$functionNameIndex]->getContent();
+
+ if ($this->hasTestPrefix($functionName) && !$this->hasProperTestAnnotation($tokens, $i)) {
+ $newFunctionName = $this->removeTestPrefix($functionName);
+ $tokens[$functionNameIndex] = new Token([T_STRING, $newFunctionName]);
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $i);
+
+ if ($this->isPHPDoc($tokens, $docBlockIndex)) {
+ $lines = $this->updateDocBlock($tokens, $docBlockIndex);
+ $lines = $this->addTestAnnotation($lines, $tokens, $docBlockIndex);
+ $lines = implode('', $lines);
+
+ $tokens[$docBlockIndex] = new Token([T_DOC_COMMENT, $lines]);
+ } else {
+ // Create a new docblock if it didn't have one before;
+ $this->createDocBlock($tokens, $docBlockIndex);
+ }
+ }
+ }
+
+ private function applyTestPrefix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ for ($i = $endIndex - 1; $i > $startIndex; --$i) {
+ // We explicitly check again if the function has a doc block to save some time.
+ if (!$this->isTestMethod($tokens, $i)) {
+ continue;
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $i);
+
+ if (!$this->isPHPDoc($tokens, $docBlockIndex)) {
+ continue;
+ }
+
+ $lines = $this->updateDocBlock($tokens, $docBlockIndex);
+ $lines = implode('', $lines);
+ $tokens[$docBlockIndex] = new Token([T_DOC_COMMENT, $lines]);
+
+ $functionNameIndex = $tokens->getNextMeaningfulToken($i);
+ $functionName = $tokens[$functionNameIndex]->getContent();
+
+ if ($this->hasTestPrefix($functionName)) {
+ continue;
+ }
+
+ $newFunctionName = $this->addTestPrefix($functionName);
+ $tokens[$functionNameIndex] = new Token([T_STRING, $newFunctionName]);
+ }
+ }
+
+ private function isTestMethod(Tokens $tokens, int $index): bool
+ {
+ // Check if we are dealing with a (non abstract, non lambda) function
+ if (!$this->isMethod($tokens, $index)) {
+ return false;
+ }
+
+ // if the function name starts with test it is a test
+ $functionNameIndex = $tokens->getNextMeaningfulToken($index);
+ $functionName = $tokens[$functionNameIndex]->getContent();
+
+ if ($this->hasTestPrefix($functionName)) {
+ return true;
+ }
+
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $index);
+
+ // If the function doesn't have test in its name, and no doc block, it is not a test
+ return
+ $this->isPHPDoc($tokens, $docBlockIndex)
+ && str_contains($tokens[$docBlockIndex]->getContent(), '@test')
+ ;
+ }
+
+ private function isMethod(Tokens $tokens, int $index): bool
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ return $tokens[$index]->isGivenKind(T_FUNCTION) && !$tokensAnalyzer->isLambda($index);
+ }
+
+ private function hasTestPrefix(string $functionName): bool
+ {
+ return str_starts_with($functionName, 'test');
+ }
+
+ private function hasProperTestAnnotation(Tokens $tokens, int $index): bool
+ {
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $index);
+ $doc = $tokens[$docBlockIndex]->getContent();
+
+ return 1 === Preg::match('/\*\s+@test\b/', $doc);
+ }
+
+ private function removeTestPrefix(string $functionName): string
+ {
+ $remainder = Preg::replace('/^test(?=[A-Z_])_?/', '', $functionName);
+
+ if ('' === $remainder) {
+ return $functionName;
+ }
+
+ return lcfirst($remainder);
+ }
+
+ private function addTestPrefix(string $functionName): string
+ {
+ return 'test'.ucfirst($functionName);
+ }
+
+ private function createDocBlock(Tokens $tokens, int $docBlockIndex): void
+ {
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
+ $toInsert = [
+ new Token([T_DOC_COMMENT, '/**'.$lineEnd."{$originalIndent} * @test".$lineEnd."{$originalIndent} */"]),
+ new Token([T_WHITESPACE, $lineEnd.$originalIndent]),
+ ];
+ $index = $tokens->getNextMeaningfulToken($docBlockIndex);
+ $tokens->insertAt($index, $toInsert);
+ }
+
+ /**
+ * @return Line[]
+ */
+ private function updateDocBlock(Tokens $tokens, int $docBlockIndex): array
+ {
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+ $lines = $doc->getLines();
+
+ return $this->updateLines($lines, $tokens, $docBlockIndex);
+ }
+
+ /**
+ * @param Line[] $lines
+ *
+ * @return Line[]
+ */
+ private function updateLines(array $lines, Tokens $tokens, int $docBlockIndex): array
+ {
+ $needsAnnotation = 'annotation' === $this->configuration['style'];
+
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+ for ($i = 0; $i < \count($lines); ++$i) {
+ // If we need to add test annotation and it is a single line comment we need to deal with that separately
+ if ($needsAnnotation && ($lines[$i]->isTheStart() && $lines[$i]->isTheEnd())) {
+ if (!$this->doesDocBlockContainTest($doc)) {
+ $lines = $this->splitUpDocBlock($lines, $tokens, $docBlockIndex);
+
+ return $this->updateLines($lines, $tokens, $docBlockIndex);
+ }
+ // One we split it up, we run the function again, so we deal with other things in a proper way
+ }
+
+ if (!$needsAnnotation
+ && str_contains($lines[$i]->getContent(), ' @test')
+ && !str_contains($lines[$i]->getContent(), '@testWith')
+ && !str_contains($lines[$i]->getContent(), '@testdox')
+ ) {
+ // We remove @test from the doc block
+ $lines[$i] = new Line(str_replace(' @test', '', $lines[$i]->getContent()));
+ }
+ // ignore the line if it isn't @depends
+ if (!str_contains($lines[$i]->getContent(), '@depends')) {
+ continue;
+ }
+
+ $lines[$i] = $this->updateDependsAnnotation($lines[$i]);
+ }
+
+ return $lines;
+ }
+
+ /**
+ * Take a one line doc block, and turn it into a multi line doc block.
+ *
+ * @param Line[] $lines
+ *
+ * @return Line[]
+ */
+ private function splitUpDocBlock(array $lines, Tokens $tokens, int $docBlockIndex): array
+ {
+ $lineContent = $this->getSingleLineDocBlockEntry($lines);
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
+
+ return [
+ new Line('/**'.$lineEnd),
+ new Line($originalIndent.' * '.$lineContent.$lineEnd),
+ new Line($originalIndent.' */'),
+ ];
+ }
+
+ /**
+ * @todo check whether it's doable to use \PhpCsFixer\DocBlock\DocBlock::getSingleLineDocBlockEntry instead
+ *
+ * @param Line[] $lines
+ */
+ private function getSingleLineDocBlockEntry(array $lines): string
+ {
+ $line = $lines[0];
+ $line = str_replace('*/', '', $line->getContent());
+ $line = trim($line);
+ $line = str_split($line);
+ $i = \count($line);
+ do {
+ --$i;
+ } while ('*' !== $line[$i] && '*' !== $line[$i - 1] && '/' !== $line[$i - 2]);
+ if (' ' === $line[$i]) {
+ ++$i;
+ }
+ $line = \array_slice($line, $i);
+
+ return implode('', $line);
+ }
+
+ /**
+ * Updates the depends tag on the current doc block.
+ */
+ private function updateDependsAnnotation(Line $line): Line
+ {
+ if ('annotation' === $this->configuration['style']) {
+ return $this->removeTestPrefixFromDependsAnnotation($line);
+ }
+
+ return $this->addTestPrefixToDependsAnnotation($line);
+ }
+
+ private function removeTestPrefixFromDependsAnnotation(Line $line): Line
+ {
+ $line = str_split($line->getContent());
+
+ $dependsIndex = $this->findWhereDependsFunctionNameStarts($line);
+ $dependsFunctionName = implode('', \array_slice($line, $dependsIndex));
+
+ if ($this->hasTestPrefix($dependsFunctionName)) {
+ $dependsFunctionName = $this->removeTestPrefix($dependsFunctionName);
+ }
+ array_splice($line, $dependsIndex);
+
+ return new Line(implode('', $line).$dependsFunctionName);
+ }
+
+ private function addTestPrefixToDependsAnnotation(Line $line): Line
+ {
+ $line = str_split($line->getContent());
+ $dependsIndex = $this->findWhereDependsFunctionNameStarts($line);
+ $dependsFunctionName = implode('', \array_slice($line, $dependsIndex));
+
+ if (!$this->hasTestPrefix($dependsFunctionName)) {
+ $dependsFunctionName = $this->addTestPrefix($dependsFunctionName);
+ }
+
+ array_splice($line, $dependsIndex);
+
+ return new Line(implode('', $line).$dependsFunctionName);
+ }
+
+ /**
+ * Helps to find where the function name in the doc block starts.
+ */
+ private function findWhereDependsFunctionNameStarts(array $line): int
+ {
+ $counter = \count($line);
+
+ do {
+ --$counter;
+ } while (' ' !== $line[$counter]);
+
+ return $counter + 1;
+ }
+
+ /**
+ * @param Line[] $lines
+ *
+ * @return Line[]
+ */
+ private function addTestAnnotation(array $lines, Tokens $tokens, int $docBlockIndex): array
+ {
+ $doc = new DocBlock($tokens[$docBlockIndex]->getContent());
+
+ if (!$this->doesDocBlockContainTest($doc)) {
+ $originalIndent = WhitespacesAnalyzer::detectIndent($tokens, $docBlockIndex);
+ $lineEnd = $this->whitespacesConfig->getLineEnding();
+
+ array_splice($lines, -1, 0, $originalIndent.' *'.$lineEnd.$originalIndent.' * @test'.$lineEnd);
+ }
+
+ return $lines;
+ }
+
+ private function doesDocBlockContainTest(DocBlock $doc): bool
+ {
+ return !empty($doc->getAnnotationsOfType('test'));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
new file mode 100644
index 0000000..2a7275b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php
@@ -0,0 +1,485 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class PhpUnitTestCaseStaticMethodCallsFixer extends AbstractPhpUnitFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const CALL_TYPE_THIS = 'this';
+
+ /**
+ * @internal
+ */
+ public const CALL_TYPE_SELF = 'self';
+
+ /**
+ * @internal
+ */
+ public const CALL_TYPE_STATIC = 'static';
+
+ /**
+ * @var array<string,bool>
+ */
+ private $allowedValues = [
+ self::CALL_TYPE_THIS => true,
+ self::CALL_TYPE_SELF => true,
+ self::CALL_TYPE_STATIC => true,
+ ];
+
+ /**
+ * @var array<string,true>
+ */
+ private $staticMethods = [
+ // Assert methods
+ 'anything' => true,
+ 'arrayHasKey' => true,
+ 'assertArrayHasKey' => true,
+ 'assertArrayNotHasKey' => true,
+ 'assertArraySubset' => true,
+ 'assertAttributeContains' => true,
+ 'assertAttributeContainsOnly' => true,
+ 'assertAttributeCount' => true,
+ 'assertAttributeEmpty' => true,
+ 'assertAttributeEquals' => true,
+ 'assertAttributeGreaterThan' => true,
+ 'assertAttributeGreaterThanOrEqual' => true,
+ 'assertAttributeInstanceOf' => true,
+ 'assertAttributeInternalType' => true,
+ 'assertAttributeLessThan' => true,
+ 'assertAttributeLessThanOrEqual' => true,
+ 'assertAttributeNotContains' => true,
+ 'assertAttributeNotContainsOnly' => true,
+ 'assertAttributeNotCount' => true,
+ 'assertAttributeNotEmpty' => true,
+ 'assertAttributeNotEquals' => true,
+ 'assertAttributeNotInstanceOf' => true,
+ 'assertAttributeNotInternalType' => true,
+ 'assertAttributeNotSame' => true,
+ 'assertAttributeSame' => true,
+ 'assertClassHasAttribute' => true,
+ 'assertClassHasStaticAttribute' => true,
+ 'assertClassNotHasAttribute' => true,
+ 'assertClassNotHasStaticAttribute' => true,
+ 'assertContains' => true,
+ 'assertContainsEquals' => true,
+ 'assertContainsOnly' => true,
+ 'assertContainsOnlyInstancesOf' => true,
+ 'assertCount' => true,
+ 'assertDirectoryDoesNotExist' => true,
+ 'assertDirectoryExists' => true,
+ 'assertDirectoryIsNotReadable' => true,
+ 'assertDirectoryIsNotWritable' => true,
+ 'assertDirectoryIsReadable' => true,
+ 'assertDirectoryIsWritable' => true,
+ 'assertDirectoryNotExists' => true,
+ 'assertDirectoryNotIsReadable' => true,
+ 'assertDirectoryNotIsWritable' => true,
+ 'assertDoesNotMatchRegularExpression' => true,
+ 'assertEmpty' => true,
+ 'assertEqualXMLStructure' => true,
+ 'assertEquals' => true,
+ 'assertEqualsCanonicalizing' => true,
+ 'assertEqualsIgnoringCase' => true,
+ 'assertEqualsWithDelta' => true,
+ 'assertFalse' => true,
+ 'assertFileDoesNotExist' => true,
+ 'assertFileEquals' => true,
+ 'assertFileEqualsCanonicalizing' => true,
+ 'assertFileEqualsIgnoringCase' => true,
+ 'assertFileExists' => true,
+ 'assertFileIsNotReadable' => true,
+ 'assertFileIsNotWritable' => true,
+ 'assertFileIsReadable' => true,
+ 'assertFileIsWritable' => true,
+ 'assertFileNotEquals' => true,
+ 'assertFileNotEqualsCanonicalizing' => true,
+ 'assertFileNotEqualsIgnoringCase' => true,
+ 'assertFileNotExists' => true,
+ 'assertFileNotIsReadable' => true,
+ 'assertFileNotIsWritable' => true,
+ 'assertFinite' => true,
+ 'assertGreaterThan' => true,
+ 'assertGreaterThanOrEqual' => true,
+ 'assertInfinite' => true,
+ 'assertInstanceOf' => true,
+ 'assertInternalType' => true,
+ 'assertIsArray' => true,
+ 'assertIsBool' => true,
+ 'assertIsCallable' => true,
+ 'assertIsClosedResource' => true,
+ 'assertIsFloat' => true,
+ 'assertIsInt' => true,
+ 'assertIsIterable' => true,
+ 'assertIsNotArray' => true,
+ 'assertIsNotBool' => true,
+ 'assertIsNotCallable' => true,
+ 'assertIsNotClosedResource' => true,
+ 'assertIsNotFloat' => true,
+ 'assertIsNotInt' => true,
+ 'assertIsNotIterable' => true,
+ 'assertIsNotNumeric' => true,
+ 'assertIsNotObject' => true,
+ 'assertIsNotReadable' => true,
+ 'assertIsNotResource' => true,
+ 'assertIsNotScalar' => true,
+ 'assertIsNotString' => true,
+ 'assertIsNotWritable' => true,
+ 'assertIsNumeric' => true,
+ 'assertIsObject' => true,
+ 'assertIsReadable' => true,
+ 'assertIsResource' => true,
+ 'assertIsScalar' => true,
+ 'assertIsString' => true,
+ 'assertIsWritable' => true,
+ 'assertJson' => true,
+ 'assertJsonFileEqualsJsonFile' => true,
+ 'assertJsonFileNotEqualsJsonFile' => true,
+ 'assertJsonStringEqualsJsonFile' => true,
+ 'assertJsonStringEqualsJsonString' => true,
+ 'assertJsonStringNotEqualsJsonFile' => true,
+ 'assertJsonStringNotEqualsJsonString' => true,
+ 'assertLessThan' => true,
+ 'assertLessThanOrEqual' => true,
+ 'assertMatchesRegularExpression' => true,
+ 'assertNan' => true,
+ 'assertNotContains' => true,
+ 'assertNotContainsEquals' => true,
+ 'assertNotContainsOnly' => true,
+ 'assertNotCount' => true,
+ 'assertNotEmpty' => true,
+ 'assertNotEquals' => true,
+ 'assertNotEqualsCanonicalizing' => true,
+ 'assertNotEqualsIgnoringCase' => true,
+ 'assertNotEqualsWithDelta' => true,
+ 'assertNotFalse' => true,
+ 'assertNotInstanceOf' => true,
+ 'assertNotInternalType' => true,
+ 'assertNotIsReadable' => true,
+ 'assertNotIsWritable' => true,
+ 'assertNotNull' => true,
+ 'assertNotRegExp' => true,
+ 'assertNotSame' => true,
+ 'assertNotSameSize' => true,
+ 'assertNotTrue' => true,
+ 'assertNull' => true,
+ 'assertObjectEquals' => true,
+ 'assertObjectHasAttribute' => true,
+ 'assertObjectNotHasAttribute' => true,
+ 'assertRegExp' => true,
+ 'assertSame' => true,
+ 'assertSameSize' => true,
+ 'assertStringContainsString' => true,
+ 'assertStringContainsStringIgnoringCase' => true,
+ 'assertStringEndsNotWith' => true,
+ 'assertStringEndsWith' => true,
+ 'assertStringEqualsFile' => true,
+ 'assertStringEqualsFileCanonicalizing' => true,
+ 'assertStringEqualsFileIgnoringCase' => true,
+ 'assertStringMatchesFormat' => true,
+ 'assertStringMatchesFormatFile' => true,
+ 'assertStringNotContainsString' => true,
+ 'assertStringNotContainsStringIgnoringCase' => true,
+ 'assertStringNotEqualsFile' => true,
+ 'assertStringNotEqualsFileCanonicalizing' => true,
+ 'assertStringNotEqualsFileIgnoringCase' => true,
+ 'assertStringNotMatchesFormat' => true,
+ 'assertStringNotMatchesFormatFile' => true,
+ 'assertStringStartsNotWith' => true,
+ 'assertStringStartsWith' => true,
+ 'assertThat' => true,
+ 'assertTrue' => true,
+ 'assertXmlFileEqualsXmlFile' => true,
+ 'assertXmlFileNotEqualsXmlFile' => true,
+ 'assertXmlStringEqualsXmlFile' => true,
+ 'assertXmlStringEqualsXmlString' => true,
+ 'assertXmlStringNotEqualsXmlFile' => true,
+ 'assertXmlStringNotEqualsXmlString' => true,
+ 'attribute' => true,
+ 'attributeEqualTo' => true,
+ 'callback' => true,
+ 'classHasAttribute' => true,
+ 'classHasStaticAttribute' => true,
+ 'contains' => true,
+ 'containsEqual' => true,
+ 'containsIdentical' => true,
+ 'containsOnly' => true,
+ 'containsOnlyInstancesOf' => true,
+ 'countOf' => true,
+ 'directoryExists' => true,
+ 'equalTo' => true,
+ 'equalToCanonicalizing' => true,
+ 'equalToIgnoringCase' => true,
+ 'equalToWithDelta' => true,
+ 'fail' => true,
+ 'fileExists' => true,
+ 'getCount' => true,
+ 'getObjectAttribute' => true,
+ 'getStaticAttribute' => true,
+ 'greaterThan' => true,
+ 'greaterThanOrEqual' => true,
+ 'identicalTo' => true,
+ 'isEmpty' => true,
+ 'isFalse' => true,
+ 'isFinite' => true,
+ 'isInfinite' => true,
+ 'isInstanceOf' => true,
+ 'isJson' => true,
+ 'isNan' => true,
+ 'isNull' => true,
+ 'isReadable' => true,
+ 'isTrue' => true,
+ 'isType' => true,
+ 'isWritable' => true,
+ 'lessThan' => true,
+ 'lessThanOrEqual' => true,
+ 'logicalAnd' => true,
+ 'logicalNot' => true,
+ 'logicalOr' => true,
+ 'logicalXor' => true,
+ 'markTestIncomplete' => true,
+ 'markTestSkipped' => true,
+ 'matches' => true,
+ 'matchesRegularExpression' => true,
+ 'objectEquals' => true,
+ 'objectHasAttribute' => true,
+ 'readAttribute' => true,
+ 'resetCount' => true,
+ 'stringContains' => true,
+ 'stringEndsWith' => true,
+ 'stringStartsWith' => true,
+
+ // TestCase methods
+ 'any' => true,
+ 'at' => true,
+ 'atLeast' => true,
+ 'atLeastOnce' => true,
+ 'atMost' => true,
+ 'exactly' => true,
+ 'never' => true,
+ 'once' => true,
+ 'onConsecutiveCalls' => true,
+ 'returnArgument' => true,
+ 'returnCallback' => true,
+ 'returnSelf' => true,
+ 'returnValue' => true,
+ 'returnValueMap' => true,
+ 'setUpBeforeClass' => true,
+ 'tearDownAfterClass' => true,
+ 'throwException' => true,
+ ];
+
+ private $conversionMap = [
+ self::CALL_TYPE_THIS => [[T_OBJECT_OPERATOR, '->'], [T_VARIABLE, '$this']],
+ self::CALL_TYPE_SELF => [[T_DOUBLE_COLON, '::'], [T_STRING, 'self']],
+ self::CALL_TYPE_STATIC => [[T_DOUBLE_COLON, '::'], [T_STATIC, 'static']],
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $codeSample = '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testMe()
+ {
+ $this->assertSame(1, 2);
+ self::assertSame(1, 2);
+ static::assertSame(1, 2);
+ }
+}
+';
+
+ return new FixerDefinition(
+ 'Calls to `PHPUnit\Framework\TestCase` static methods must all be of the same type, either `$this->`, `self::` or `static::`.',
+ [
+ new CodeSample($codeSample),
+ new CodeSample($codeSample, ['call_type' => self::CALL_TYPE_THIS]),
+ ],
+ null,
+ 'Risky when PHPUnit methods are overridden or not accessible, or when project has PHPUnit incompatibilities.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before SelfStaticAccessorFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $thisFixer = $this;
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('call_type', 'The call type to use for referring to PHPUnit methods.'))
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues(array_keys($this->allowedValues))
+ ->setDefault('static')
+ ->getOption(),
+ (new FixerOptionBuilder('methods', 'Dictionary of `method` => `call_type` values that differ from the default strategy.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $option) use ($thisFixer): bool {
+ foreach ($option as $method => $value) {
+ if (!isset($thisFixer->staticMethods[$method])) {
+ throw new InvalidOptionsException(
+ sprintf(
+ 'Unexpected "methods" key, expected any of "%s", got "%s".',
+ implode('", "', array_keys($thisFixer->staticMethods)),
+ \gettype($method).'#'.$method
+ )
+ );
+ }
+
+ if (!isset($thisFixer->allowedValues[$value])) {
+ throw new InvalidOptionsException(
+ sprintf(
+ 'Unexpected value for method "%s", expected any of "%s", got "%s".',
+ $method,
+ implode('", "', array_keys($thisFixer->allowedValues)),
+ \is_object($value) ? \get_class($value) : (null === $value ? 'null' : \gettype($value).'#'.$value)
+ )
+ );
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $startIndex; $index < $endIndex; ++$index) {
+ // skip anonymous classes
+ if ($tokens[$index]->isGivenKind(T_CLASS)) {
+ $index = $this->findEndOfNextBlock($tokens, $index);
+
+ continue;
+ }
+
+ $callType = $this->configuration['call_type'];
+
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ // skip lambda
+ if ($analyzer->isLambda($index)) {
+ $index = $this->findEndOfNextBlock($tokens, $index);
+
+ continue;
+ }
+
+ // do not change `self` to `this` in static methods
+ if ('this' === $callType) {
+ $attributes = $analyzer->getMethodAttributes($index);
+ if (false !== $attributes['static']) {
+ $index = $this->findEndOfNextBlock($tokens, $index);
+
+ continue;
+ }
+ }
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_STRING) || !isset($this->staticMethods[$tokens[$index]->getContent()])) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ if (!$tokens[$nextIndex]->equals('(')) {
+ $index = $nextIndex;
+
+ continue;
+ }
+
+ if ($tokens[$tokens->getNextMeaningfulToken($nextIndex)]->isGivenKind(CT::T_FIRST_CLASS_CALLABLE)) {
+ continue;
+ }
+
+ $methodName = $tokens[$index]->getContent();
+
+ if (isset($this->configuration['methods'][$methodName])) {
+ $callType = $this->configuration['methods'][$methodName];
+ }
+
+ $operatorIndex = $tokens->getPrevMeaningfulToken($index);
+ $referenceIndex = $tokens->getPrevMeaningfulToken($operatorIndex);
+ if (!$this->needsConversion($tokens, $index, $referenceIndex, $callType)) {
+ continue;
+ }
+
+ $tokens[$operatorIndex] = new Token($this->conversionMap[$callType][0]);
+ $tokens[$referenceIndex] = new Token($this->conversionMap[$callType][1]);
+ }
+ }
+
+ private function needsConversion(Tokens $tokens, int $index, int $referenceIndex, string $callType): bool
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ return $functionsAnalyzer->isTheSameClassCall($tokens, $index)
+ && !$tokens[$referenceIndex]->equals($this->conversionMap[$callType][1], false);
+ }
+
+ private function findEndOfNextBlock(Tokens $tokens, int $index): int
+ {
+ $nextIndex = $tokens->getNextTokenOfKind($index, [';', '{']);
+
+ return $tokens[$nextIndex]->equals('{')
+ ? $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $nextIndex)
+ : $nextIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestClassRequiresCoversFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestClassRequiresCoversFixer.php
new file mode 100644
index 0000000..2539ccd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/PhpUnit/PhpUnitTestClassRequiresCoversFixer.php
@@ -0,0 +1,135 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\PhpUnit;
+
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\Fixer\AbstractPhpUnitFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpUnitTestClassRequiresCoversFixer extends AbstractPhpUnitFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Adds a default `@coversNothing` annotation to PHPUnit test classes that have no `@covers*` annotation.',
+ [
+ new CodeSample(
+ '<?php
+final class MyTest extends \PHPUnit_Framework_TestCase
+{
+ public function testSomeTest()
+ {
+ $this->assertSame(a(), b());
+ }
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyPhpUnitClassFix(Tokens $tokens, int $startIndex, int $endIndex): void
+ {
+ $classIndex = $tokens->getPrevTokenOfKind($startIndex, [[T_CLASS]]);
+ $prevIndex = $tokens->getPrevMeaningfulToken($classIndex);
+
+ // don't add `@covers` annotation for abstract base classes
+ if ($tokens[$prevIndex]->isGivenKind(T_ABSTRACT)) {
+ return;
+ }
+
+ $index = $tokens[$prevIndex]->isGivenKind(T_FINAL) ? $prevIndex : $classIndex;
+
+ $indent = $tokens[$index - 1]->isGivenKind(T_WHITESPACE)
+ ? Preg::replace('/^.*\R*/', '', $tokens[$index - 1]->getContent())
+ : '';
+
+ $prevIndex = $tokens->getPrevNonWhitespace($index);
+
+ if ($tokens[$prevIndex]->isGivenKind(T_DOC_COMMENT)) {
+ $docIndex = $prevIndex;
+ $docContent = $tokens[$docIndex]->getContent();
+
+ // ignore one-line phpdocs like `/** foo */`, as there is no place to put new annotations
+ if (!str_contains($docContent, "\n")) {
+ return;
+ }
+
+ $doc = new DocBlock($docContent);
+
+ // skip if already has annotation
+ if (!empty($doc->getAnnotationsOfType([
+ 'covers',
+ 'coversDefaultClass',
+ 'coversNothing',
+ ]))) {
+ return;
+ }
+ } else {
+ $docIndex = $index;
+ $tokens->insertAt($docIndex, [
+ new Token([T_DOC_COMMENT, sprintf('/**%s%s */', $this->whitespacesConfig->getLineEnding(), $indent)]),
+ new Token([T_WHITESPACE, sprintf('%s%s', $this->whitespacesConfig->getLineEnding(), $indent)]),
+ ]);
+
+ if (!$tokens[$docIndex - 1]->isGivenKind(T_WHITESPACE)) {
+ $extraNewLines = $this->whitespacesConfig->getLineEnding();
+
+ if (!$tokens[$docIndex - 1]->isGivenKind(T_OPEN_TAG)) {
+ $extraNewLines .= $this->whitespacesConfig->getLineEnding();
+ }
+
+ $tokens->insertAt($docIndex, [
+ new Token([T_WHITESPACE, $extraNewLines.$indent]),
+ ]);
+ ++$docIndex;
+ }
+
+ $doc = new DocBlock($tokens[$docIndex]->getContent());
+ }
+
+ $lines = $doc->getLines();
+ array_splice(
+ $lines,
+ \count($lines) - 1,
+ 0,
+ [
+ new Line(sprintf(
+ '%s * @coversNothing%s',
+ $indent,
+ $this->whitespacesConfig->getLineEnding()
+ )),
+ ]
+ );
+
+ $tokens[$docIndex] = new Token([T_DOC_COMMENT, implode('', $lines)]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php
new file mode 100644
index 0000000..01f2d4b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/AlignMultilineCommentFixer.php
@@ -0,0 +1,182 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ * @author Julien Falque <julien.falque@gmail.com>
+ */
+final class AlignMultilineCommentFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @var null|int[]
+ */
+ private $tokenKinds;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->tokenKinds = [T_DOC_COMMENT];
+ if ('phpdocs_only' !== $this->configuration['comment_type']) {
+ $this->tokenKinds[] = T_COMMENT;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Each line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one.',
+ [
+ new CodeSample(
+ '<?php
+ /**
+ * This is a DOC Comment
+with a line not prefixed with asterisk
+
+ */
+'
+ ),
+ new CodeSample(
+ '<?php
+ /*
+ * This is a doc-like multiline comment
+*/
+',
+ ['comment_type' => 'phpdocs_like']
+ ),
+ new CodeSample(
+ '<?php
+ /*
+ * This is a doc-like multiline comment
+with a line not prefixed with asterisk
+
+ */
+',
+ ['comment_type' => 'all_multiline']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ * Must run after ArrayIndentationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 27;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound($this->tokenKinds);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind($this->tokenKinds)) {
+ continue;
+ }
+
+ $whitespace = '';
+ $previousIndex = $index - 1;
+
+ if ($tokens[$previousIndex]->isWhitespace()) {
+ $whitespace = $tokens[$previousIndex]->getContent();
+ --$previousIndex;
+ }
+
+ if ($tokens[$previousIndex]->isGivenKind(T_OPEN_TAG)) {
+ $whitespace = Preg::replace('/\S/', '', $tokens[$previousIndex]->getContent()).$whitespace;
+ }
+
+ if (1 !== Preg::match('/\R(\h*)$/', $whitespace, $matches)) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_COMMENT) && 'all_multiline' !== $this->configuration['comment_type'] && 1 === Preg::match('/\R(?:\R|\s*[^\s\*])/', $token->getContent())) {
+ continue;
+ }
+
+ $indentation = $matches[1];
+ $lines = Preg::split('/\R/u', $token->getContent());
+
+ foreach ($lines as $lineNumber => $line) {
+ if (0 === $lineNumber) {
+ continue;
+ }
+
+ $line = ltrim($line);
+
+ if ($token->isGivenKind(T_COMMENT) && (!isset($line[0]) || '*' !== $line[0])) {
+ continue;
+ }
+
+ if (!isset($line[0])) {
+ $line = '*';
+ } elseif ('*' !== $line[0]) {
+ $line = '* '.$line;
+ }
+
+ $lines[$lineNumber] = $indentation.' '.$line;
+ }
+
+ $tokens[$index] = new Token([$token->getId(), implode($lineEnding, $lines)]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('comment_type', 'Whether to fix PHPDoc comments only (`phpdocs_only`), any multi-line comment whose lines all start with an asterisk (`phpdocs_like`) or any multi-line comment (`all_multiline`).'))
+ ->setAllowedValues(['phpdocs_only', 'phpdocs_like', 'all_multiline'])
+ ->setDefault('phpdocs_only')
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php
new file mode 100644
index 0000000..be6e053
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocAnnotationRemoveFixer.php
@@ -0,0 +1,134 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class GeneralPhpdocAnnotationRemoveFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Configured annotations should be omitted from PHPDoc.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @internal
+ * @author John Doe
+ */
+function foo() {}
+',
+ ['annotations' => ['author']]
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @author John Doe
+ * @package ACME API
+ * @subpackage Authorization
+ * @version 1.0
+ */
+function foo() {}
+',
+ ['annotations' => ['package', 'subpackage']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocLineSpanFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (0 === \count($this->configuration['annotations'])) {
+ return;
+ }
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $annotations = $doc->getAnnotationsOfType($this->configuration['annotations']);
+
+ // nothing to do if there are no annotations
+ if (empty($annotations)) {
+ continue;
+ }
+
+ foreach ($annotations as $annotation) {
+ $annotation->remove();
+ }
+
+ if ('' === $doc->getContent()) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ } else {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('annotations', 'List of annotations to remove, e.g. `["author"]`.'))
+ ->setAllowedTypes(['array'])
+ ->setDefault([])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
new file mode 100644
index 0000000..b2948be
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/GeneralPhpdocTagRenameFixer.php
@@ -0,0 +1,213 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+use Symfony\Component\OptionsResolver\Options;
+
+final class GeneralPhpdocTagRenameFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Renames PHPDoc tags.',
+ [
+ new CodeSample("<?php\n/**\n * @inheritDocs\n * {@inheritdocs}\n */\n", [
+ 'replacements' => [
+ 'inheritDocs' => 'inheritDoc',
+ ],
+ ]),
+ new CodeSample("<?php\n/**\n * @inheritDocs\n * {@inheritdocs}\n */\n", [
+ 'replacements' => [
+ 'inheritDocs' => 'inheritDoc',
+ ],
+ 'fix_annotation' => false,
+ ]),
+ new CodeSample("<?php\n/**\n * @inheritDocs\n * {@inheritdocs}\n */\n", [
+ 'replacements' => [
+ 'inheritDocs' => 'inheritDoc',
+ ],
+ 'fix_inline' => false,
+ ]),
+ new CodeSample("<?php\n/**\n * @inheritDocs\n * {@inheritdocs}\n */\n", [
+ 'replacements' => [
+ 'inheritDocs' => 'inheritDoc',
+ ],
+ 'case_sensitive' => true,
+ ]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ // must be run before PhpdocAddMissingParamAnnotationFixer
+ return 11;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('fix_annotation', 'Whether annotation tags should be fixed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('fix_inline', 'Whether inline tags should be fixed.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('replacements', 'A map of tags to replace.'))
+ ->setAllowedTypes(['array'])
+ ->setNormalizer(static function (Options $options, $value): array {
+ $normalizedValue = [];
+
+ foreach ($value as $from => $to) {
+ if (!\is_string($from)) {
+ throw new InvalidOptionsException('Tag to replace must be a string.');
+ }
+
+ if (!\is_string($to)) {
+ throw new InvalidOptionsException(sprintf(
+ 'Tag to replace to from "%s" must be a string.',
+ $from
+ ));
+ }
+
+ if (1 !== Preg::match('#^\S+$#', $to) || str_contains($to, '*/')) {
+ throw new InvalidOptionsException(sprintf(
+ 'Tag "%s" cannot be replaced by invalid tag "%s".',
+ $from,
+ $to
+ ));
+ }
+
+ $from = trim($from);
+ $to = trim($to);
+
+ if (!$options['case_sensitive']) {
+ $lowercaseFrom = strtolower($from);
+
+ if (isset($normalizedValue[$lowercaseFrom]) && $normalizedValue[$lowercaseFrom] !== $to) {
+ throw new InvalidOptionsException(sprintf(
+ 'Tag "%s" cannot be configured to be replaced with several different tags when case sensitivity is off.',
+ $from
+ ));
+ }
+
+ $from = $lowercaseFrom;
+ }
+
+ $normalizedValue[$from] = $to;
+ }
+
+ foreach ($normalizedValue as $from => $to) {
+ if (isset($normalizedValue[$to]) && $normalizedValue[$to] !== $to) {
+ throw new InvalidOptionsException(sprintf(
+ 'Cannot change tag "%1$s" to tag "%2$s", as the tag "%2$s" is configured to be replaced to "%3$s".',
+ $from,
+ $to,
+ $normalizedValue[$to]
+ ));
+ }
+ }
+
+ return $normalizedValue;
+ })
+ ->setDefault([])
+ ->getOption(),
+ (new FixerOptionBuilder('case_sensitive', 'Whether tags should be replaced only if they have exact same casing.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (0 === \count($this->configuration['replacements'])) {
+ return;
+ }
+
+ if (true === $this->configuration['fix_annotation']) {
+ if ($this->configuration['fix_inline']) {
+ $regex = '/"[^"]*"(*SKIP)(*FAIL)|\b(?<=@)(%s)\b/';
+ } else {
+ $regex = '/"[^"]*"(*SKIP)(*FAIL)|(?<!\{@)(?<=@)(%s)(?!\})/';
+ }
+ } else {
+ $regex = '/(?<={@)(%s)(?=[ \t}])/';
+ }
+
+ $caseInsensitive = false === $this->configuration['case_sensitive'];
+ $replacements = $this->configuration['replacements'];
+ $regex = sprintf($regex, implode('|', array_keys($replacements)));
+
+ if ($caseInsensitive) {
+ $regex .= 'i';
+ }
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, Preg::replaceCallback(
+ $regex,
+ static function (array $matches) use ($caseInsensitive, $replacements) {
+ if ($caseInsensitive) {
+ $matches[1] = strtolower($matches[1]);
+ }
+
+ return $replacements[$matches[1]];
+ },
+ $token->getContent()
+ )]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php
new file mode 100644
index 0000000..ec3dadd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoBlankLinesAfterPhpdocFixer.php
@@ -0,0 +1,115 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class NoBlankLinesAfterPhpdocFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be blank lines between docblock and the documented element.',
+ [
+ new CodeSample(
+ '<?php
+
+/**
+ * This is the bar class.
+ */
+
+
+class Bar {}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before HeaderCommentFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -20;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $forbiddenSuccessors = [
+ T_BREAK,
+ T_COMMENT,
+ T_CONTINUE,
+ T_DECLARE,
+ T_DOC_COMMENT,
+ T_GOTO,
+ T_NAMESPACE,
+ T_RETURN,
+ T_THROW,
+ T_USE,
+ T_WHITESPACE,
+ ];
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+ // get the next non-whitespace token inc comments, provided
+ // that there is whitespace between it and the current token
+ $next = $tokens->getNextNonWhitespace($index);
+ if ($index + 2 === $next && false === $tokens[$next]->isGivenKind($forbiddenSuccessors)) {
+ $this->fixWhitespace($tokens, $index + 1);
+ }
+ }
+ }
+
+ /**
+ * Cleanup a whitespace token.
+ */
+ private function fixWhitespace(Tokens $tokens, int $index): void
+ {
+ $content = $tokens[$index]->getContent();
+ // if there is more than one new line in the whitespace, then we need to fix it
+ if (substr_count($content, "\n") > 1) {
+ // the final bit of the whitespace must be the next statement's indentation
+ $tokens[$index] = new Token([T_WHITESPACE, substr($content, strrpos($content, "\n"))]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php
new file mode 100644
index 0000000..843bf01
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoEmptyPhpdocFixer.php
@@ -0,0 +1,71 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoEmptyPhpdocFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be empty PHPDoc blocks.',
+ [new CodeSample("<?php /** */\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer, NoWhitespaceInBlankLineFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, NoSuperfluousPhpdocTagsFixer, PhpUnitNoExpectationAnnotationFixer, PhpUnitTestAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 3;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ if (Preg::match('#^/\*\*[\s\*]*\*/$#', $token->getContent())) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
new file mode 100644
index 0000000..d56738b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/NoSuperfluousPhpdocTagsFixer.php
@@ -0,0 +1,549 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoSuperfluousPhpdocTagsFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Removes `@param`, `@return` and `@var` tags that don\'t provide any useful information.',
+ [
+ new CodeSample('<?php
+class Foo {
+ /**
+ * @param Bar $bar
+ * @param mixed $baz
+ *
+ * @return Baz
+ */
+ public function doFoo(Bar $bar, $baz): Baz {}
+}
+'),
+ new CodeSample('<?php
+class Foo {
+ /**
+ * @param Bar $bar
+ * @param mixed $baz
+ */
+ public function doFoo(Bar $bar, $baz) {}
+}
+', ['allow_mixed' => true]),
+ new CodeSample('<?php
+class Foo {
+ /**
+ * @inheritDoc
+ */
+ public function doFoo(Bar $bar, $baz) {}
+}
+', ['remove_inheritdoc' => true]),
+ new CodeSample('<?php
+class Foo {
+ /**
+ * @param Bar $bar
+ * @param mixed $baz
+ * @param string|int|null $qux
+ */
+ public function doFoo(Bar $bar, $baz /*, $qux = null */) {}
+}
+', ['allow_unused_params' => true]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, VoidReturnFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, FullyQualifiedStrictTypesFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocIndentFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 6;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $namespaceUseAnalyzer = new NamespaceUsesAnalyzer();
+
+ $shortNames = [];
+
+ foreach ($namespaceUseAnalyzer->getDeclarationsFromTokens($tokens) as $namespaceUseAnalysis) {
+ $shortNames[strtolower($namespaceUseAnalysis->getShortName())] = '\\'.strtolower($namespaceUseAnalysis->getFullName());
+ }
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $content = $initialContent = $token->getContent();
+ $documentedElement = $this->findDocumentedElement($tokens, $index);
+
+ if (null === $documentedElement) {
+ continue;
+ }
+
+ if (true === $this->configuration['remove_inheritdoc']) {
+ $content = $this->removeSuperfluousInheritDoc($content);
+ }
+
+ if ('function' === $documentedElement['type']) {
+ $content = $this->fixFunctionDocComment($content, $tokens, $documentedElement, $shortNames);
+ } elseif ('property' === $documentedElement['type']) {
+ $content = $this->fixPropertyDocComment($content, $tokens, $documentedElement, $shortNames);
+ } elseif ('classy' === $documentedElement['type']) {
+ $content = $this->fixClassDocComment($content, $documentedElement);
+ } else {
+ throw new \RuntimeException('Unknown type.');
+ }
+
+ if ('' === $content) {
+ $content = '/** */';
+ }
+
+ if ($content !== $initialContent) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $content]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('allow_mixed', 'Whether type `mixed` without description is allowed (`true`) or considered superfluous (`false`)'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('remove_inheritdoc', 'Remove `@inheritDoc` tags'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('allow_unused_params', 'Whether `param` annotation without actual signature is allowed (`true`) or considered superfluous (`false`)'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ private function findDocumentedElement(Tokens $tokens, int $docCommentIndex): ?array
+ {
+ $modifierKinds = [
+ T_PRIVATE,
+ T_PROTECTED,
+ T_PUBLIC,
+ T_ABSTRACT,
+ T_FINAL,
+ T_STATIC,
+ ];
+
+ $typeKinds = [
+ CT::T_NULLABLE_TYPE,
+ CT::T_ARRAY_TYPEHINT,
+ CT::T_TYPE_ALTERNATION,
+ CT::T_TYPE_INTERSECTION,
+ T_STRING,
+ T_NS_SEPARATOR,
+ ];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $modifierKinds[] = T_READONLY;
+ }
+
+ $element = [
+ 'modifiers' => [],
+ 'types' => [],
+ ];
+
+ $index = $tokens->getNextMeaningfulToken($docCommentIndex);
+
+ while (true) {
+ if (null === $index) {
+ break;
+ }
+
+ if ($tokens[$index]->isClassy()) {
+ $element['index'] = $index;
+ $element['type'] = 'classy';
+
+ return $element;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ $element['index'] = $index;
+ $element['type'] = 'function';
+
+ return $element;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_VARIABLE)) {
+ $element['index'] = $index;
+ $element['type'] = 'property';
+
+ return $element;
+ }
+
+ if ($tokens[$index]->isGivenKind($modifierKinds)) {
+ $element['modifiers'][$index] = $tokens[$index];
+ } elseif ($tokens[$index]->isGivenKind($typeKinds)) {
+ $element['types'][$index] = $tokens[$index];
+ } else {
+ break;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return null;
+ }
+
+ private function fixFunctionDocComment(string $content, Tokens $tokens, array $element, array $shortNames): string
+ {
+ $docBlock = new DocBlock($content);
+
+ $openingParenthesisIndex = $tokens->getNextTokenOfKind($element['index'], ['(']);
+ $closingParenthesisIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openingParenthesisIndex);
+
+ $argumentsInfo = $this->getArgumentsInfo(
+ $tokens,
+ $openingParenthesisIndex + 1,
+ $closingParenthesisIndex - 1
+ );
+
+ foreach ($docBlock->getAnnotationsOfType('param') as $annotation) {
+ $argumentName = $annotation->getVariableName();
+
+ if (null === $argumentName) {
+ continue;
+ }
+
+ if (!isset($argumentsInfo[$argumentName]) && true === $this->configuration['allow_unused_params']) {
+ continue;
+ }
+
+ if (!isset($argumentsInfo[$argumentName]) || $this->annotationIsSuperfluous($annotation, $argumentsInfo[$argumentName], $shortNames)) {
+ $annotation->remove();
+ }
+ }
+
+ $returnTypeInfo = $this->getReturnTypeInfo($tokens, $closingParenthesisIndex);
+
+ foreach ($docBlock->getAnnotationsOfType('return') as $annotation) {
+ if ($this->annotationIsSuperfluous($annotation, $returnTypeInfo, $shortNames)) {
+ $annotation->remove();
+ }
+ }
+
+ $this->removeSuperfluousModifierAnnotation($docBlock, $element);
+
+ return $docBlock->getContent();
+ }
+
+ private function fixPropertyDocComment(string $content, Tokens $tokens, array $element, array $shortNames): string
+ {
+ if (\count($element['types']) > 0) {
+ $propertyTypeInfo = $this->parseTypeHint($tokens, array_key_first($element['types']));
+ } else {
+ $propertyTypeInfo = [
+ 'types' => [],
+ 'allows_null' => true,
+ ];
+ }
+
+ $docBlock = new DocBlock($content);
+
+ foreach ($docBlock->getAnnotationsOfType('var') as $annotation) {
+ if ($this->annotationIsSuperfluous($annotation, $propertyTypeInfo, $shortNames)) {
+ $annotation->remove();
+ }
+ }
+
+ return $docBlock->getContent();
+ }
+
+ private function fixClassDocComment(string $content, array $element): string
+ {
+ $docBlock = new DocBlock($content);
+
+ $this->removeSuperfluousModifierAnnotation($docBlock, $element);
+
+ return $docBlock->getContent();
+ }
+
+ /**
+ * @return array<string, array>
+ */
+ private function getArgumentsInfo(Tokens $tokens, int $start, int $end): array
+ {
+ $argumentsInfo = [];
+
+ for ($index = $start; $index <= $end; ++$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_VARIABLE)) {
+ continue;
+ }
+
+ $beforeArgumentIndex = $tokens->getPrevTokenOfKind($index, ['(', ',']);
+ $typeIndex = $tokens->getNextMeaningfulToken($beforeArgumentIndex);
+
+ if ($typeIndex !== $index) {
+ $info = $this->parseTypeHint($tokens, $typeIndex);
+ } else {
+ $info = [
+ 'types' => [],
+ 'allows_null' => true,
+ ];
+ }
+
+ if (!$info['allows_null']) {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ if (
+ $tokens[$nextIndex]->equals('=')
+ && $tokens[$tokens->getNextMeaningfulToken($nextIndex)]->equals([T_STRING, 'null'], false)
+ ) {
+ $info['allows_null'] = true;
+ }
+ }
+
+ $argumentsInfo[$token->getContent()] = $info;
+ }
+
+ return $argumentsInfo;
+ }
+
+ private function getReturnTypeInfo(Tokens $tokens, int $closingParenthesisIndex): array
+ {
+ $colonIndex = $tokens->getNextMeaningfulToken($closingParenthesisIndex);
+ if ($tokens[$colonIndex]->isGivenKind(CT::T_TYPE_COLON)) {
+ return $this->parseTypeHint($tokens, $tokens->getNextMeaningfulToken($colonIndex));
+ }
+
+ return [
+ 'types' => [],
+ 'allows_null' => true,
+ ];
+ }
+
+ /**
+ * @param int $index The index of the first token of the type hint
+ */
+ private function parseTypeHint(Tokens $tokens, int $index): array
+ {
+ $allowsNull = false;
+
+ if ($tokens[$index]->isGivenKind(CT::T_NULLABLE_TYPE)) {
+ $allowsNull = true;
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ $types = [];
+
+ while (true) {
+ $type = '';
+
+ while ($tokens[$index]->isGivenKind([T_NS_SEPARATOR, T_STATIC, T_STRING, CT::T_ARRAY_TYPEHINT, T_CALLABLE, CT::T_TYPE_INTERSECTION])) {
+ $type .= $tokens[$index]->getContent();
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ if ('' === $type) {
+ break;
+ }
+
+ $types[] = $type;
+
+ if (!$tokens[$index]->isGivenKind(CT::T_TYPE_ALTERNATION)) {
+ break;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return [
+ 'types' => $types,
+ 'allows_null' => $allowsNull,
+ ];
+ }
+
+ /**
+ * @param array<string, string> $symbolShortNames
+ */
+ private function annotationIsSuperfluous(Annotation $annotation, array $info, array $symbolShortNames): bool
+ {
+ if ('param' === $annotation->getTag()->getName()) {
+ $regex = '/@param\s+(?:\S|\s(?!\$))++\s\$\S+\s+\S/';
+ } elseif ('var' === $annotation->getTag()->getName()) {
+ $regex = '/@var\s+\S+(\s+\$\S+)?(\s+)(?!\*+\/)([^$\s]+)/';
+ } else {
+ $regex = '/@return\s+\S+\s+\S/';
+ }
+
+ if (Preg::match($regex, $annotation->getContent())) {
+ return false;
+ }
+
+ $annotationTypes = $this->toComparableNames($annotation->getTypes(), $symbolShortNames);
+
+ if (['null'] === $annotationTypes) {
+ return false;
+ }
+
+ if (['mixed'] === $annotationTypes && [] === $info['types']) {
+ return false === $this->configuration['allow_mixed'];
+ }
+
+ $actualTypes = $info['types'];
+
+ if ($info['allows_null']) {
+ $actualTypes[] = 'null';
+ }
+
+ return $annotationTypes === $this->toComparableNames($actualTypes, $symbolShortNames);
+ }
+
+ /**
+ * Normalizes types to make them comparable.
+ *
+ * Converts given types to lowercase, replaces imports aliases with
+ * their matching FQCN, and finally sorts the result.
+ *
+ * @param string[] $types The types to normalize
+ * @param array<string, string> $symbolShortNames The imports aliases
+ *
+ * @return array The normalized types
+ */
+ private function toComparableNames(array $types, array $symbolShortNames): array
+ {
+ $normalized = array_map(
+ static function (string $type) use ($symbolShortNames): string {
+ $type = strtolower($type);
+
+ if (str_contains($type, '&')) {
+ $intersects = explode('&', $type);
+ sort($intersects);
+
+ return implode('&', $intersects);
+ }
+
+ return $symbolShortNames[$type] ?? $type;
+ },
+ $types
+ );
+
+ sort($normalized);
+
+ return $normalized;
+ }
+
+ private function removeSuperfluousInheritDoc(string $docComment): string
+ {
+ return Preg::replace('~
+ # $1: before @inheritDoc tag
+ (
+ # beginning of comment or a PHPDoc tag
+ (?:
+ ^/\*\*
+ (?:
+ \R
+ [ \t]*(?:\*[ \t]*)?
+ )*?
+ |
+ @\N+
+ )
+
+ # empty comment lines
+ (?:
+ \R
+ [ \t]*(?:\*[ \t]*?)?
+ )*
+ )
+
+ # spaces before @inheritDoc tag
+ [ \t]*
+
+ # @inheritDoc tag
+ (?:@inheritDocs?|\{@inheritDocs?\})
+
+ # $2: after @inheritDoc tag
+ (
+ # empty comment lines
+ (?:
+ \R
+ [ \t]*(?:\*[ \t]*)?
+ )*
+
+ # a PHPDoc tag or end of comment
+ (?:
+ @\N+
+ |
+ (?:
+ \R
+ [ \t]*(?:\*[ \t]*)?
+ )*
+ [ \t]*\*/$
+ )
+ )
+ ~ix', '$1$2', $docComment);
+ }
+
+ private function removeSuperfluousModifierAnnotation(DocBlock $docBlock, array $element): void
+ {
+ foreach (['abstract' => T_ABSTRACT, 'final' => T_FINAL] as $annotationType => $modifierToken) {
+ $annotations = $docBlock->getAnnotationsOfType($annotationType);
+
+ foreach ($element['modifiers'] as $token) {
+ if ($token->isGivenKind($modifierToken)) {
+ foreach ($annotations as $annotation) {
+ $annotation->remove();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
new file mode 100644
index 0000000..27ac7dd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAddMissingParamAnnotationFixer.php
@@ -0,0 +1,276 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocAddMissingParamAnnotationFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPDoc should contain `@param` for all params.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @param int $bar
+ *
+ * @return void
+ */
+function f9(string $foo, $bar, $baz) {}
+'
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param int $bar
+ *
+ * @return void
+ */
+function f9(string $foo, $bar, $baz) {}
+',
+ ['only_untyped' => true]
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param int $bar
+ *
+ * @return void
+ */
+function f9(string $foo, $bar, $baz) {}
+',
+ ['only_untyped' => false]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocOrderFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, GeneralPhpdocTagRenameFixer, PhpdocIndentFixer, PhpdocNoAliasTagFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $tokenContent = $token->getContent();
+
+ if (false !== stripos($tokenContent, 'inheritdoc')) {
+ continue;
+ }
+
+ // ignore one-line phpdocs like `/** foo */`, as there is no place to put new annotations
+ if (!str_contains($tokenContent, "\n")) {
+ continue;
+ }
+
+ $mainIndex = $index;
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $index) {
+ return;
+ }
+
+ while ($tokens[$index]->isGivenKind([
+ T_ABSTRACT,
+ T_FINAL,
+ T_PRIVATE,
+ T_PROTECTED,
+ T_PUBLIC,
+ T_STATIC,
+ T_VAR,
+ ])) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $openIndex = $tokens->getNextTokenOfKind($index, ['(']);
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+
+ $arguments = [];
+
+ foreach ($argumentsAnalyzer->getArguments($tokens, $openIndex, $index) as $start => $end) {
+ $argumentInfo = $this->prepareArgumentInformation($tokens, $start, $end);
+
+ if (false === $this->configuration['only_untyped'] || '' === $argumentInfo['type']) {
+ $arguments[$argumentInfo['name']] = $argumentInfo;
+ }
+ }
+
+ if (0 === \count($arguments)) {
+ continue;
+ }
+
+ $doc = new DocBlock($tokenContent);
+ $lastParamLine = null;
+
+ foreach ($doc->getAnnotationsOfType('param') as $annotation) {
+ $pregMatched = Preg::match('/^[^$]+(\$\w+).*$/s', $annotation->getContent(), $matches);
+
+ if (1 === $pregMatched) {
+ unset($arguments[$matches[1]]);
+ }
+
+ $lastParamLine = max($lastParamLine, $annotation->getEnd());
+ }
+
+ if (0 === \count($arguments)) {
+ continue;
+ }
+
+ $lines = $doc->getLines();
+ $linesCount = \count($lines);
+
+ Preg::match('/^(\s*).*$/', $lines[$linesCount - 1]->getContent(), $matches);
+ $indent = $matches[1];
+
+ $newLines = [];
+
+ foreach ($arguments as $argument) {
+ $type = $argument['type'] ?: 'mixed';
+
+ if (!str_starts_with($type, '?') && 'null' === strtolower($argument['default'])) {
+ $type = 'null|'.$type;
+ }
+
+ $newLines[] = new Line(sprintf(
+ '%s* @param %s %s%s',
+ $indent,
+ $type,
+ $argument['name'],
+ $this->whitespacesConfig->getLineEnding()
+ ));
+ }
+
+ array_splice(
+ $lines,
+ $lastParamLine ? $lastParamLine + 1 : $linesCount - 1,
+ 0,
+ $newLines
+ );
+
+ $tokens[$mainIndex] = new Token([T_DOC_COMMENT, implode('', $lines)]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('only_untyped', 'Whether to add missing `@param` annotations for untyped parameters only.'))
+ ->setDefault(true)
+ ->setAllowedTypes(['bool'])
+ ->getOption(),
+ ]);
+ }
+
+ private function prepareArgumentInformation(Tokens $tokens, int $start, int $end): array
+ {
+ $info = [
+ 'default' => '',
+ 'name' => '',
+ 'type' => '',
+ ];
+
+ $sawName = false;
+
+ for ($index = $start; $index <= $end; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isComment() || $token->isWhitespace()) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_VARIABLE)) {
+ $sawName = true;
+ $info['name'] = $token->getContent();
+
+ continue;
+ }
+
+ if ($token->equals('=')) {
+ continue;
+ }
+
+ if ($sawName) {
+ $info['default'] .= $token->getContent();
+ } elseif ('&' !== $token->getContent()) {
+ if ($token->isGivenKind(T_ELLIPSIS)) {
+ if ('' === $info['type']) {
+ $info['type'] = 'array';
+ } else {
+ $info['type'] .= '[]';
+ }
+ } else {
+ $info['type'] .= $token->getContent();
+ }
+ }
+ }
+
+ return $info;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php
new file mode 100644
index 0000000..986706e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAlignFixer.php
@@ -0,0 +1,422 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\TypeExpression;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @author Sebastiaan Stok <s.stok@rollerscapes.net>
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocAlignFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const ALIGN_LEFT = 'left';
+
+ /**
+ * @internal
+ */
+ public const ALIGN_VERTICAL = 'vertical';
+
+ private const ALIGNABLE_TAGS = [
+ 'param',
+ 'property',
+ 'property-read',
+ 'property-write',
+ 'return',
+ 'throws',
+ 'type',
+ 'var',
+ 'method',
+ ];
+
+ private const TAGS_WITH_NAME = [
+ 'param',
+ 'property',
+ ];
+
+ private const TAGS_WITH_METHOD_SIGNATURE = [
+ 'method',
+ ];
+
+ /**
+ * @var string
+ */
+ private $regex;
+
+ /**
+ * @var string
+ */
+ private $regexCommentLine;
+
+ /**
+ * @var string
+ */
+ private $align;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $tagsWithNameToAlign = array_intersect($this->configuration['tags'], self::TAGS_WITH_NAME);
+ $tagsWithMethodSignatureToAlign = array_intersect($this->configuration['tags'], self::TAGS_WITH_METHOD_SIGNATURE);
+ $tagsWithoutNameToAlign = array_diff($this->configuration['tags'], $tagsWithNameToAlign, $tagsWithMethodSignatureToAlign);
+ $types = [];
+
+ $indent = '(?P<indent>(?:\ {2}|\t)*)';
+
+ // e.g. @param <hint> <$var>
+ if ([] !== $tagsWithNameToAlign) {
+ $types[] = '(?P<tag>'.implode('|', $tagsWithNameToAlign).')\s+(?P<hint>(?:'.TypeExpression::REGEX_TYPES.')?)\s+(?P<var>(?:&|\.{3})?\$\S+)';
+ }
+
+ // e.g. @return <hint>
+ if ([] !== $tagsWithoutNameToAlign) {
+ $types[] = '(?P<tag2>'.implode('|', $tagsWithoutNameToAlign).')\s+(?P<hint2>(?:'.TypeExpression::REGEX_TYPES.')?)';
+ }
+
+ // e.g. @method <hint> <signature>
+ if ([] !== $tagsWithMethodSignatureToAlign) {
+ $types[] = '(?P<tag3>'.implode('|', $tagsWithMethodSignatureToAlign).')(\s+(?P<hint3>[^\s(]+)|)\s+(?P<signature>.+\))';
+ }
+
+ // optional <desc>
+ $desc = '(?:\s+(?P<desc>\V*))';
+
+ $this->regex = '/^'.$indent.'\ \*\ @(?J)(?:'.implode('|', $types).')'.$desc.'\s*$/ux';
+ $this->regexCommentLine = '/^'.$indent.' \*(?! @)(?:\s+(?P<desc>\V+))(?<!\*\/)\r?$/u';
+ $this->align = $this->configuration['align'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $code = <<<'EOF'
+<?php
+/**
+ * @param EngineInterface $templating
+ * @param string $format
+ * @param int $code an HTTP response status code
+ * @param bool $debug
+ * @param mixed &$reference a parameter passed by reference
+ */
+
+EOF;
+
+ return new FixerDefinition(
+ 'All items of the given phpdoc tags must be either left-aligned or (by default) aligned vertically.',
+ [
+ new CodeSample($code),
+ new CodeSample($code, ['align' => self::ALIGN_VERTICAL]),
+ new CodeSample($code, ['align' => self::ALIGN_LEFT]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAnnotationWithoutDotFixer, PhpdocIndentFixer, PhpdocIndentFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesFixer, PhpdocTypesFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ */
+ public function getPriority(): int
+ {
+ /*
+ * Should be run after all other docblock fixers. This because they
+ * modify other annotations to change their type and or separation
+ * which totally change the behavior of this fixer. It's important that
+ * annotations are of the correct type, and are grouped correctly
+ * before running this fixer.
+ */
+ return -42;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+ $docBlock = new DocBlock($content);
+ $this->fixDocBlock($docBlock);
+ $newContent = $docBlock->getContent();
+ if ($newContent !== $content) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $newContent]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $tags = new FixerOptionBuilder('tags', 'The tags that should be aligned.');
+ $tags
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(self::ALIGNABLE_TAGS)])
+ ->setDefault([
+ 'method',
+ 'param',
+ 'property',
+ 'return',
+ 'throws',
+ 'type',
+ 'var',
+ ])
+ ;
+
+ $align = new FixerOptionBuilder('align', 'Align comments');
+ $align
+ ->setAllowedTypes(['string'])
+ ->setAllowedValues([self::ALIGN_LEFT, self::ALIGN_VERTICAL])
+ ->setDefault(self::ALIGN_VERTICAL)
+ ;
+
+ return new FixerConfigurationResolver([$tags->getOption(), $align->getOption()]);
+ }
+
+ private function fixDocBlock(DocBlock $docBlock): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ for ($i = 0, $l = \count($docBlock->getLines()); $i < $l; ++$i) {
+ $items = [];
+ $matches = $this->getMatches($docBlock->getLine($i)->getContent());
+
+ if (null === $matches) {
+ continue;
+ }
+
+ $current = $i;
+ $items[] = $matches;
+
+ while (true) {
+ if (null === $docBlock->getLine(++$i)) {
+ break 2;
+ }
+
+ $matches = $this->getMatches($docBlock->getLine($i)->getContent(), true);
+ if (null === $matches) {
+ break;
+ }
+
+ $items[] = $matches;
+ }
+
+ // compute the max length of the tag, hint and variables
+ $tagMax = 0;
+ $hintMax = 0;
+ $varMax = 0;
+
+ foreach ($items as $item) {
+ if (null === $item['tag']) {
+ continue;
+ }
+
+ $tagMax = max($tagMax, \strlen($item['tag']));
+ $hintMax = max($hintMax, \strlen($item['hint']));
+ $varMax = max($varMax, \strlen($item['var']));
+ }
+
+ $currTag = null;
+
+ // update
+ foreach ($items as $j => $item) {
+ if (null === $item['tag']) {
+ if ('@' === $item['desc'][0]) {
+ $docBlock->getLine($current + $j)->setContent($item['indent'].' * '.$item['desc'].$lineEnding);
+
+ continue;
+ }
+
+ $extraIndent = 2;
+
+ if (\in_array($currTag, self::TAGS_WITH_NAME, true) || \in_array($currTag, self::TAGS_WITH_METHOD_SIGNATURE, true)) {
+ $extraIndent = 3;
+ }
+
+ $line =
+ $item['indent']
+ .' * '
+ .$this->getIndent(
+ $tagMax + $hintMax + $varMax + $extraIndent,
+ $this->getLeftAlignedDescriptionIndent($items, $j)
+ )
+ .$item['desc']
+ .$lineEnding;
+
+ $docBlock->getLine($current + $j)->setContent($line);
+
+ continue;
+ }
+
+ $currTag = $item['tag'];
+
+ $line =
+ $item['indent']
+ .' * @'
+ .$item['tag']
+ .$this->getIndent(
+ $tagMax - \strlen($item['tag']) + 1,
+ $item['hint'] ? 1 : 0
+ )
+ .$item['hint']
+ ;
+
+ if (!empty($item['var'])) {
+ $line .=
+ $this->getIndent(($hintMax ?: -1) - \strlen($item['hint']) + 1)
+ .$item['var']
+ .(
+ !empty($item['desc'])
+ ? $this->getIndent($varMax - \strlen($item['var']) + 1).$item['desc'].$lineEnding
+ : $lineEnding
+ )
+ ;
+ } elseif (!empty($item['desc'])) {
+ $line .= $this->getIndent($hintMax - \strlen($item['hint']) + 1).$item['desc'].$lineEnding;
+ } else {
+ $line .= $lineEnding;
+ }
+
+ $docBlock->getLine($current + $j)->setContent($line);
+ }
+ }
+ }
+
+ /**
+ * @return null|array<string, null|string>
+ */
+ private function getMatches(string $line, bool $matchCommentOnly = false): ?array
+ {
+ if (Preg::match($this->regex, $line, $matches)) {
+ if (!empty($matches['tag2'])) {
+ $matches['tag'] = $matches['tag2'];
+ $matches['hint'] = $matches['hint2'];
+ $matches['var'] = '';
+ }
+
+ if (!empty($matches['tag3'])) {
+ $matches['tag'] = $matches['tag3'];
+ $matches['hint'] = $matches['hint3'];
+ $matches['var'] = $matches['signature'];
+ }
+
+ if (isset($matches['hint'])) {
+ $matches['hint'] = trim($matches['hint']);
+ }
+
+ return $matches;
+ }
+
+ if ($matchCommentOnly && Preg::match($this->regexCommentLine, $line, $matches)) {
+ $matches['tag'] = null;
+ $matches['var'] = '';
+ $matches['hint'] = '';
+
+ return $matches;
+ }
+
+ return null;
+ }
+
+ private function getIndent(int $verticalAlignIndent, int $leftAlignIndent = 1): string
+ {
+ $indent = self::ALIGN_VERTICAL === $this->align ? $verticalAlignIndent : $leftAlignIndent;
+
+ return str_repeat(' ', $indent);
+ }
+
+ /**
+ * @param array[] $items
+ */
+ private function getLeftAlignedDescriptionIndent(array $items, int $index): int
+ {
+ if (self::ALIGN_LEFT !== $this->align) {
+ return 0;
+ }
+
+ // Find last tagged line:
+ $item = null;
+ for (; $index >= 0; --$index) {
+ $item = $items[$index];
+ if (null !== $item['tag']) {
+ break;
+ }
+ }
+
+ // No last tag found — no indent:
+ if (null === $item) {
+ return 0;
+ }
+
+ // Indent according to existing values:
+ return
+ $this->getSentenceIndent($item['tag']) +
+ $this->getSentenceIndent($item['hint']) +
+ $this->getSentenceIndent($item['var']);
+ }
+
+ /**
+ * Get indent for sentence.
+ */
+ private function getSentenceIndent(?string $sentence): int
+ {
+ if (null === $sentence) {
+ return 0;
+ }
+
+ $length = \strlen($sentence);
+
+ return 0 === $length ? 0 : $length + 1;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php
new file mode 100644
index 0000000..41883d0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocAnnotationWithoutDotFixer.php
@@ -0,0 +1,138 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocAnnotationWithoutDotFixer extends AbstractFixer
+{
+ /**
+ * @var string[]
+ */
+ private $tags = ['throws', 'return', 'param', 'internal', 'deprecated', 'var', 'type'];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPDoc annotation descriptions should not be a sentence.',
+ [new CodeSample('<?php
+/**
+ * @param string $bar Some string.
+ */
+function foo ($bar) {}
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer, PhpdocTypesFixer, PhpdocTypesOrderFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocToCommentFixer.
+ */
+ public function getPriority(): int
+ {
+ return 17;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $annotations = $doc->getAnnotations();
+
+ if (empty($annotations)) {
+ continue;
+ }
+
+ foreach ($annotations as $annotation) {
+ if (
+ !$annotation->getTag()->valid() || !\in_array($annotation->getTag()->getName(), $this->tags, true)
+ ) {
+ continue;
+ }
+
+ $lineAfterAnnotation = $doc->getLine($annotation->getEnd() + 1);
+ if (null !== $lineAfterAnnotation) {
+ $lineAfterAnnotationTrimmed = ltrim($lineAfterAnnotation->getContent());
+ if ('' === $lineAfterAnnotationTrimmed || !str_starts_with($lineAfterAnnotationTrimmed, '*')) {
+ // malformed PHPDoc, missing asterisk !
+ continue;
+ }
+ }
+
+ $content = $annotation->getContent();
+
+ if (
+ 1 !== Preg::match('/[.。]\h*$/u', $content)
+ || 0 !== Preg::match('/[.。](?!\h*$)/u', $content, $matches)
+ ) {
+ continue;
+ }
+
+ $endLine = $doc->getLine($annotation->getEnd());
+ $endLine->setContent(Preg::replace('/(?<![.。])[.。]\h*(\H+)$/u', '\1', $endLine->getContent()));
+
+ $startLine = $doc->getLine($annotation->getStart());
+ $optionalTypeRegEx = $annotation->supportTypes()
+ ? sprintf('(?:%s\s+(?:\$\w+\s+)?)?', preg_quote(implode('|', $annotation->getTypes()), '/'))
+ : '';
+ $content = Preg::replaceCallback(
+ '/^(\s*\*\s*@\w+\s+'.$optionalTypeRegEx.')(\p{Lu}?(?=\p{Ll}|\p{Zs}))(.*)$/',
+ static function (array $matches): string {
+ if (\function_exists('mb_strtolower')) {
+ return $matches[1].mb_strtolower($matches[2]).$matches[3];
+ }
+
+ return $matches[1].strtolower($matches[2]).$matches[3];
+ },
+ $startLine->getContent(),
+ 1
+ );
+ $startLine->setContent($content);
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php
new file mode 100644
index 0000000..c40bc9d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocIndentFixer.php
@@ -0,0 +1,142 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Utils;
+
+/**
+ * @author Ceeram <ceeram@cakephp.org>
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocIndentFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Docblocks should have the same indentation as the documented subject.',
+ [new CodeSample('<?php
+class DocBlocks
+{
+/**
+ * Test constants
+ */
+ const INDENT = 1;
+}
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ * Must run after IndentationTypeFixer, PhpdocToCommentFixer.
+ */
+ public function getPriority(): int
+ {
+ return 20;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ // skip if there is no next token or if next token is block end `}`
+ if (null === $nextIndex || $tokens[$nextIndex]->equals('}')) {
+ continue;
+ }
+
+ $prevIndex = $index - 1;
+ $prevToken = $tokens[$prevIndex];
+
+ // ignore inline docblocks
+ if (
+ $prevToken->isGivenKind(T_OPEN_TAG)
+ || ($prevToken->isWhitespace(" \t") && !$tokens[$index - 2]->isGivenKind(T_OPEN_TAG))
+ || $prevToken->equalsAny([';', ',', '{', '('])
+ ) {
+ continue;
+ }
+
+ $indent = '';
+ if ($tokens[$nextIndex - 1]->isWhitespace()) {
+ $indent = Utils::calculateTrailingWhitespaceIndent($tokens[$nextIndex - 1]);
+ }
+
+ $newPrevContent = $this->fixWhitespaceBeforeDocblock($prevToken->getContent(), $indent);
+ if ($newPrevContent) {
+ if ($prevToken->isArray()) {
+ $tokens[$prevIndex] = new Token([$prevToken->getId(), $newPrevContent]);
+ } else {
+ $tokens[$prevIndex] = new Token($newPrevContent);
+ }
+ } else {
+ $tokens->clearAt($prevIndex);
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $this->fixDocBlock($token->getContent(), $indent)]);
+ }
+ }
+
+ /**
+ * Fix indentation of Docblock.
+ *
+ * @param string $content Docblock contents
+ * @param string $indent Indentation to apply
+ *
+ * @return string Dockblock contents including correct indentation
+ */
+ private function fixDocBlock(string $content, string $indent): string
+ {
+ return ltrim(Preg::replace('/^\h*\*/m', $indent.' *', $content));
+ }
+
+ /**
+ * @param string $content Whitespace before Docblock
+ * @param string $indent Indentation of the documented subject
+ *
+ * @return string Whitespace including correct indentation for Dockblock after this whitespace
+ */
+ private function fixWhitespaceBeforeDocblock(string $content, string $indent): string
+ {
+ return rtrim($content, " \t").$indent;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
new file mode 100644
index 0000000..19b40c4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocInlineTagNormalizerFixer.php
@@ -0,0 +1,121 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class PhpdocInlineTagNormalizerFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Fixes PHPDoc inline tags.',
+ [
+ new CodeSample(
+ "<?php\n/**\n * @{TUTORIAL}\n * {{ @link }}\n * @inheritDoc\n */\n"
+ ),
+ new CodeSample(
+ "<?php\n/**\n * @{TUTORIAL}\n * {{ @link }}\n * @inheritDoc\n */\n",
+ ['tags' => ['TUTORIAL']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (0 === \count($this->configuration['tags'])) {
+ return;
+ }
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ // Move `@` inside tag, for example @{tag} -> {@tag}, replace multiple curly brackets,
+ // remove spaces between '{' and '@', remove white space between end
+ // of text and closing bracket and between the tag and inline comment.
+ $content = Preg::replaceCallback(
+ sprintf(
+ '#(?:@{+|{+\h*@)\h*(%s)s?([^}]*)(?:}+)#i',
+ implode('|', array_map(static function (string $tag): string {
+ return preg_quote($tag, '/');
+ }, $this->configuration['tags']))
+ ),
+ static function (array $matches): string {
+ $doc = trim($matches[2]);
+
+ if ('' === $doc) {
+ return '{@'.$matches[1].'}';
+ }
+
+ return '{@'.$matches[1].' '.$doc.'}';
+ },
+ $token->getContent()
+ );
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $content]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('tags', 'The list of tags to normalize'))
+ ->setAllowedTypes(['array'])
+ ->setDefault(['example', 'id', 'internal', 'inheritdoc', 'inheritdocs', 'link', 'source', 'toc', 'tutorial'])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php
new file mode 100644
index 0000000..00f7bad
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocLineSpanFixer.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\WhitespacesAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Gert de Pagter <BackEndTea@gmail.com>
+ */
+final class PhpdocLineSpanFixer extends AbstractFixer implements WhitespacesAwareFixerInterface, ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Changes doc blocks from single to multi line, or reversed. Works for class constants, properties and methods only.',
+ [
+ new CodeSample("<?php\n\nclass Foo{\n /** @var bool */\n public \$var;\n}\n"),
+ new CodeSample(
+ "<?php\n\nclass Foo{\n /**\n * @var bool\n */\n public \$var;\n}\n",
+ ['property' => 'single']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('const', 'Whether const blocks should be single or multi line'))
+ ->setAllowedValues(['single', 'multi', null])
+ ->setDefault('multi')
+ ->getOption(),
+ (new FixerOptionBuilder('property', 'Whether property doc blocks should be single or multi line'))
+ ->setAllowedValues(['single', 'multi', null])
+ ->setDefault('multi')
+ ->getOption(),
+ (new FixerOptionBuilder('method', 'Whether method doc blocks should be single or multi line'))
+ ->setAllowedValues(['single', 'multi', null])
+ ->setDefault('multi')
+ ->getOption(),
+ ]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+
+ foreach ($analyzer->getClassyElements() as $index => $element) {
+ if (!$this->hasDocBlock($tokens, $index)) {
+ continue;
+ }
+
+ $type = $element['type'];
+
+ if (!isset($this->configuration[$type])) {
+ continue;
+ }
+
+ $docIndex = $this->getDocBlockIndex($tokens, $index);
+ $doc = new DocBlock($tokens[$docIndex]->getContent());
+
+ if ('multi' === $this->configuration[$type]) {
+ $doc->makeMultiLine(WhitespacesAnalyzer::detectIndent($tokens, $docIndex), $this->whitespacesConfig->getLineEnding());
+ } elseif ('single' === $this->configuration[$type]) {
+ $doc->makeSingleLine();
+ }
+
+ $tokens->offsetSet($docIndex, new Token([T_DOC_COMMENT, $doc->getContent()]));
+ }
+ }
+
+ private function hasDocBlock(Tokens $tokens, int $index): bool
+ {
+ $docBlockIndex = $this->getDocBlockIndex($tokens, $index);
+
+ return $tokens[$docBlockIndex]->isGivenKind(T_DOC_COMMENT);
+ }
+
+ private function getDocBlockIndex(Tokens $tokens, int $index): int
+ {
+ $propertyPartKinds = [
+ T_PUBLIC,
+ T_PROTECTED,
+ T_PRIVATE,
+ T_FINAL,
+ T_ABSTRACT,
+ T_COMMENT,
+ T_VAR,
+ T_STATIC,
+ T_STRING,
+ T_NS_SEPARATOR,
+ CT::T_ARRAY_TYPEHINT,
+ CT::T_NULLABLE_TYPE,
+ ];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $propertyPartKinds[] = T_READONLY;
+ }
+
+ do {
+ $index = $tokens->getPrevNonWhitespace($index);
+ } while ($tokens[$index]->isGivenKind($propertyPartKinds));
+
+ return $index;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
new file mode 100644
index 0000000..a168a91
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractProxyFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocNoAccessFixer extends AbstractProxyFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ '`@access` annotations should be omitted from PHPDoc.',
+ [
+ new CodeSample(
+ '<?php
+class Foo
+{
+ /**
+ * @internal
+ * @access private
+ */
+ private $bar;
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createProxyFixers(): array
+ {
+ $fixer = new GeneralPhpdocAnnotationRemoveFixer();
+ $fixer->configure(['annotations' => ['access']]);
+
+ return [$fixer];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php
new file mode 100644
index 0000000..b5af8fa
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoAliasTagFixer.php
@@ -0,0 +1,135 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractProxyFixer;
+use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+
+/**
+ * Case sensitive tag replace fixer (does not process inline tags like {@inheritdoc}).
+ *
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocNoAliasTagFixer extends AbstractProxyFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'No alias PHPDoc tags should be used.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @property string $foo
+ * @property-read string $bar
+ *
+ * @link baz
+ */
+final class Example
+{
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @property string $foo
+ * @property-read string $bar
+ *
+ * @link baz
+ */
+final class Example
+{
+}
+',
+ ['replacements' => ['link' => 'website']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocSingleLineVarSpacingFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ /** @var GeneralPhpdocTagRenameFixer $generalPhpdocTagRenameFixer */
+ $generalPhpdocTagRenameFixer = $this->proxyFixers['general_phpdoc_tag_rename'];
+
+ try {
+ $generalPhpdocTagRenameFixer->configure([
+ 'fix_annotation' => true,
+ 'fix_inline' => false,
+ 'replacements' => $this->configuration['replacements'],
+ 'case_sensitive' => true,
+ ]);
+ } catch (InvalidConfigurationException $exception) {
+ throw new InvalidFixerConfigurationException(
+ $this->getName(),
+ Preg::replace('/^\[.+?\] /', '', $exception->getMessage()),
+ $exception
+ );
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('replacements', 'Mapping between replaced annotations with new ones.'))
+ ->setAllowedTypes(['array'])
+ ->setDefault([
+ 'property-read' => 'property',
+ 'property-write' => 'property',
+ 'type' => 'var',
+ 'link' => 'see',
+ ])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createProxyFixers(): array
+ {
+ return [new GeneralPhpdocTagRenameFixer()];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php
new file mode 100644
index 0000000..bc5ec71
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoEmptyReturnFixer.php
@@ -0,0 +1,126 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocNoEmptyReturnFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ '`@return void` and `@return null` annotations should be omitted from PHPDoc.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @return null
+*/
+function foo() {}
+'
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @return void
+*/
+function foo() {}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocOrderFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer, VoidReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return 4;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $annotations = $doc->getAnnotationsOfType('return');
+
+ if (empty($annotations)) {
+ continue;
+ }
+
+ foreach ($annotations as $annotation) {
+ $this->fixAnnotation($doc, $annotation);
+ }
+
+ $newContent = $doc->getContent();
+
+ if ($newContent === $token->getContent()) {
+ continue;
+ }
+
+ if ('' === $newContent) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ continue;
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+
+ /**
+ * Remove return void or return null annotations..
+ */
+ private function fixAnnotation(DocBlock $doc, Annotation $annotation): void
+ {
+ $types = $annotation->getNormalizedTypes();
+
+ if (1 === \count($types) && ('null' === $types[0] || 'void' === $types[0])) {
+ $annotation->remove();
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php
new file mode 100644
index 0000000..d7da1d1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoPackageFixer.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractProxyFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocNoPackageFixer extends AbstractProxyFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ '`@package` and `@subpackage` annotations should be omitted from PHPDoc.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @internal
+ * @package Foo
+ * subpackage Bar
+ */
+class Baz
+{
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createProxyFixers(): array
+ {
+ $fixer = new GeneralPhpdocAnnotationRemoveFixer();
+ $fixer->configure(['annotations' => ['package', 'subpackage']]);
+
+ return [$fixer];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php
new file mode 100644
index 0000000..ef99675
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocNoUselessInheritdocFixer.php
@@ -0,0 +1,162 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Remove inheritdoc tags from classy that does not inherit.
+ */
+final class PhpdocNoUselessInheritdocFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Classy that does not inherit must not have `@inheritdoc` tags.',
+ [
+ new CodeSample("<?php\n/** {@inheritdoc} */\nclass Sample\n{\n}\n"),
+ new CodeSample("<?php\nclass Sample\n{\n /**\n * @inheritdoc\n */\n public function Test()\n {\n }\n}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoEmptyPhpdocFixer, NoTrailingWhitespaceInCommentFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 6;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT) && $tokens->isAnyTokenKindsFound([T_CLASS, T_INTERFACE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // min. offset 4 as minimal candidate is @: <?php\n/** @inheritdoc */class min{}
+ for ($index = 1, $count = \count($tokens) - 4; $index < $count; ++$index) {
+ if ($tokens[$index]->isGivenKind([T_CLASS, T_INTERFACE])) {
+ $index = $this->fixClassy($tokens, $index);
+ }
+ }
+ }
+
+ private function fixClassy(Tokens $tokens, int $index): int
+ {
+ // figure out where the classy starts
+ $classOpenIndex = $tokens->getNextTokenOfKind($index, ['{']);
+
+ // figure out where the classy ends
+ $classEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $classOpenIndex);
+
+ // is classy extending or implementing some interface
+ $extendingOrImplementing = $this->isExtendingOrImplementing($tokens, $index, $classOpenIndex);
+
+ if (!$extendingOrImplementing) {
+ // PHPDoc of classy should not have inherit tag even when using traits as Traits cannot provide this information
+ $this->fixClassyOutside($tokens, $index);
+ }
+
+ // figure out if the classy uses a trait
+ if (!$extendingOrImplementing && $this->isUsingTrait($tokens, $index, $classOpenIndex, $classEndIndex)) {
+ $extendingOrImplementing = true;
+ }
+
+ $this->fixClassyInside($tokens, $classOpenIndex, $classEndIndex, !$extendingOrImplementing);
+
+ return $classEndIndex;
+ }
+
+ private function fixClassyInside(Tokens $tokens, int $classOpenIndex, int $classEndIndex, bool $fixThisLevel): void
+ {
+ for ($i = $classOpenIndex; $i < $classEndIndex; ++$i) {
+ if ($tokens[$i]->isGivenKind(T_CLASS)) {
+ $i = $this->fixClassy($tokens, $i);
+ } elseif ($fixThisLevel && $tokens[$i]->isGivenKind(T_DOC_COMMENT)) {
+ $this->fixToken($tokens, $i);
+ }
+ }
+ }
+
+ private function fixClassyOutside(Tokens $tokens, int $classIndex): void
+ {
+ $previousIndex = $tokens->getPrevNonWhitespace($classIndex);
+ if ($tokens[$previousIndex]->isGivenKind(T_DOC_COMMENT)) {
+ $this->fixToken($tokens, $previousIndex);
+ }
+ }
+
+ private function fixToken(Tokens $tokens, int $tokenIndex): void
+ {
+ $count = 0;
+ $content = Preg::replaceCallback(
+ '#(\h*(?:@{*|{*\h*@)\h*inheritdoc\h*)([^}]*)((?:}*)\h*)#i',
+ static function (array $matches): string {
+ return ' '.$matches[2];
+ },
+ $tokens[$tokenIndex]->getContent(),
+ -1,
+ $count
+ );
+
+ if ($count) {
+ $tokens[$tokenIndex] = new Token([T_DOC_COMMENT, $content]);
+ }
+ }
+
+ private function isExtendingOrImplementing(Tokens $tokens, int $classIndex, int $classOpenIndex): bool
+ {
+ for ($index = $classIndex; $index < $classOpenIndex; ++$index) {
+ if ($tokens[$index]->isGivenKind([T_EXTENDS, T_IMPLEMENTS])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function isUsingTrait(Tokens $tokens, int $classIndex, int $classOpenIndex, int $classCloseIndex): bool
+ {
+ if ($tokens[$classIndex]->isGivenKind(T_INTERFACE)) {
+ // cannot use Trait inside an interface
+ return false;
+ }
+
+ $useIndex = $tokens->getNextTokenOfKind($classOpenIndex, [[CT::T_USE_TRAIT]]);
+
+ return null !== $useIndex && $useIndex < $classCloseIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
new file mode 100644
index 0000000..28bee07
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderByValueFixer.php
@@ -0,0 +1,222 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Options;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ * @author Andreas Möller <am@localheinz.com>
+ */
+final class PhpdocOrderByValueFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Order phpdoc tags by value.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @covers Foo
+ * @covers Bar
+ */
+final class MyTest extends \PHPUnit_Framework_TestCase
+{}
+'
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @author Bob
+ * @author Alice
+ */
+final class MyTest extends \PHPUnit_Framework_TestCase
+{}
+',
+ [
+ 'annotations' => [
+ 'author',
+ ],
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpUnitFqcnAnnotationFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_CLASS, T_DOC_COMMENT]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if ([] === $this->configuration['annotations']) {
+ return;
+ }
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ foreach ($this->configuration['annotations'] as $type => $typeLowerCase) {
+ $findPattern = sprintf(
+ '/@%s\s.+@%s\s/s',
+ $type,
+ $type
+ );
+
+ if (
+ !$tokens[$index]->isGivenKind(T_DOC_COMMENT)
+ || 0 === Preg::match($findPattern, $tokens[$index]->getContent())
+ ) {
+ continue;
+ }
+
+ $docBlock = new DocBlock($tokens[$index]->getContent());
+
+ $annotations = $docBlock->getAnnotationsOfType($type);
+ $annotationMap = [];
+
+ if (\in_array($type, ['property', 'property-read', 'property-write'], true)) {
+ $replacePattern = sprintf(
+ '/(?s)\*\s*@%s\s+(?P<optionalTypes>.+\s+)?\$(?P<comparableContent>[^\s]+).*/',
+ $type
+ );
+
+ $replacement = '\2';
+ } elseif ('method' === $type) {
+ $replacePattern = '/(?s)\*\s*@method\s+(?P<optionalReturnTypes>.+\s+)?(?P<comparableContent>.+)\(.*/';
+ $replacement = '\2';
+ } else {
+ $replacePattern = sprintf(
+ '/\*\s*@%s\s+(?P<comparableContent>.+)/',
+ $typeLowerCase
+ );
+
+ $replacement = '\1';
+ }
+
+ foreach ($annotations as $annotation) {
+ $rawContent = $annotation->getContent();
+
+ $comparableContent = Preg::replace(
+ $replacePattern,
+ $replacement,
+ strtolower(trim($rawContent))
+ );
+
+ $annotationMap[$comparableContent] = $rawContent;
+ }
+
+ $orderedAnnotationMap = $annotationMap;
+
+ ksort($orderedAnnotationMap, SORT_STRING);
+
+ if ($orderedAnnotationMap === $annotationMap) {
+ continue;
+ }
+
+ $lines = $docBlock->getLines();
+
+ foreach (array_reverse($annotations) as $annotation) {
+ array_splice(
+ $lines,
+ $annotation->getStart(),
+ $annotation->getEnd() - $annotation->getStart() + 1,
+ array_pop($orderedAnnotationMap)
+ );
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, implode('', $lines)]);
+ }
+ }
+ }
+
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $allowedValues = [
+ 'author',
+ 'covers',
+ 'coversNothing',
+ 'dataProvider',
+ 'depends',
+ 'group',
+ 'internal',
+ 'method',
+ 'property',
+ 'property-read',
+ 'property-write',
+ 'requires',
+ 'throws',
+ 'uses',
+ ];
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('annotations', 'List of annotations to order, e.g. `["covers"]`.'))
+ ->setAllowedTypes([
+ 'array',
+ ])
+ ->setAllowedValues([
+ new AllowedValueSubset($allowedValues),
+ ])
+ ->setNormalizer(static function (Options $options, $value): array {
+ $normalized = [];
+
+ foreach ($value as $annotation) {
+ // since we will be using "strtolower" on the input annotations when building the sorting
+ // map we must match the type in lower case as well
+ $normalized[$annotation] = strtolower($annotation);
+ }
+
+ return $normalized;
+ })
+ ->setDefault([
+ 'covers',
+ ])
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php
new file mode 100644
index 0000000..ba12687
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocOrderFixer.php
@@ -0,0 +1,166 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocOrderFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Annotations in PHPDoc should be ordered so that `@param` annotations come first, then `@throws` annotations, then `@return` annotations.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * Hello there!
+ *
+ * @throws Exception|RuntimeException foo
+ * @custom Test!
+ * @return int Return the number of changes.
+ * @param string $foo
+ * @param bool $bar Bar
+ */
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocIndentFixer, PhpdocNoEmptyReturnFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+ // move param to start, return to end, leave throws in the middle
+ $content = $this->moveParamAnnotations($content);
+ // we're parsing the content again to make sure the internal
+ // state of the dockblock is correct after the modifications
+ $content = $this->moveReturnAnnotations($content);
+ // persist the content at the end
+ $tokens[$index] = new Token([T_DOC_COMMENT, $content]);
+ }
+ }
+
+ /**
+ * Move all param annotations in before throws and return annotations.
+ */
+ private function moveParamAnnotations(string $content): string
+ {
+ $doc = new DocBlock($content);
+ $params = $doc->getAnnotationsOfType('param');
+
+ // nothing to do if there are no param annotations
+ if (empty($params)) {
+ return $content;
+ }
+
+ $others = $doc->getAnnotationsOfType(['throws', 'return']);
+
+ if (empty($others)) {
+ return $content;
+ }
+
+ // get the index of the final line of the final param annotation
+ $end = end($params)->getEnd();
+
+ $line = $doc->getLine($end);
+
+ // move stuff about if required
+ foreach ($others as $other) {
+ if ($other->getStart() < $end) {
+ // we're doing this to maintain the original line indexes
+ $line->setContent($line->getContent().$other->getContent());
+ $other->remove();
+ }
+ }
+
+ return $doc->getContent();
+ }
+
+ /**
+ * Move all return annotations after param and throws annotations.
+ */
+ private function moveReturnAnnotations(string $content): string
+ {
+ $doc = new DocBlock($content);
+ $returns = $doc->getAnnotationsOfType('return');
+
+ // nothing to do if there are no return annotations
+ if (empty($returns)) {
+ return $content;
+ }
+
+ $others = $doc->getAnnotationsOfType(['param', 'throws']);
+
+ // nothing to do if there are no other annotations
+ if (empty($others)) {
+ return $content;
+ }
+
+ // get the index of the first line of the first return annotation
+ $start = $returns[0]->getStart();
+ $line = $doc->getLine($start);
+
+ // move stuff about if required
+ foreach (array_reverse($others) as $other) {
+ if ($other->getEnd() > $start) {
+ // we're doing this to maintain the original line indexes
+ $line->setContent($other->getContent().$line->getContent());
+ $other->remove();
+ }
+ }
+
+ return $doc->getContent();
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
new file mode 100644
index 0000000..527492d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php
@@ -0,0 +1,231 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+use Symfony\Component\OptionsResolver\Options;
+
+final class PhpdocReturnSelfReferenceFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var string[]
+ */
+ private static $toTypes = [
+ '$this',
+ 'static',
+ 'self',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The type of `@return` annotations of methods returning a reference to itself must the configured one.',
+ [
+ new CodeSample(
+ '<?php
+class Sample
+{
+ /**
+ * @return this
+ */
+ public function test1()
+ {
+ return $this;
+ }
+
+ /**
+ * @return $self
+ */
+ public function test2()
+ {
+ return $this;
+ }
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+class Sample
+{
+ /**
+ * @return this
+ */
+ public function test1()
+ {
+ return $this;
+ }
+
+ /**
+ * @return $self
+ */
+ public function test2()
+ {
+ return $this;
+ }
+}
+',
+ ['replacements' => ['this' => 'self']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \count($tokens) > 10 && $tokens->isTokenKindFound(T_DOC_COMMENT) && $tokens->isAnyTokenKindsFound([T_CLASS, T_INTERFACE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ foreach ($tokensAnalyzer->getClassyElements() as $index => $element) {
+ if ('method' === $element['type']) {
+ $this->fixMethod($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $default = [
+ 'this' => '$this',
+ '@this' => '$this',
+ '$self' => 'self',
+ '@self' => 'self',
+ '$static' => 'static',
+ '@static' => 'static',
+ ];
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('replacements', 'Mapping between replaced return types with new ones.'))
+ ->setAllowedTypes(['array'])
+ ->setNormalizer(static function (Options $options, array $value) use ($default): array {
+ $normalizedValue = [];
+
+ foreach ($value as $from => $to) {
+ if (\is_string($from)) {
+ $from = strtolower($from);
+ }
+
+ if (!isset($default[$from])) {
+ throw new InvalidOptionsException(sprintf(
+ 'Unknown key "%s", expected any of "%s".',
+ \gettype($from).'#'.$from,
+ implode('", "', array_keys($default))
+ ));
+ }
+
+ if (!\in_array($to, self::$toTypes, true)) {
+ throw new InvalidOptionsException(sprintf(
+ 'Unknown value "%s", expected any of "%s".',
+ \is_object($to) ? \get_class($to) : \gettype($to).(\is_resource($to) ? '' : '#'.$to),
+ implode('", "', self::$toTypes)
+ ));
+ }
+
+ $normalizedValue[$from] = $to;
+ }
+
+ return $normalizedValue;
+ })
+ ->setDefault($default)
+ ->getOption(),
+ ]);
+ }
+
+ private function fixMethod(Tokens $tokens, int $index): void
+ {
+ static $methodModifiers = [T_STATIC, T_FINAL, T_ABSTRACT, T_PRIVATE, T_PROTECTED, T_PUBLIC];
+
+ // find PHPDoc of method (if any)
+ while (true) {
+ $tokenIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$tokenIndex]->isGivenKind($methodModifiers)) {
+ break;
+ }
+
+ $index = $tokenIndex;
+ }
+
+ $docIndex = $tokens->getPrevNonWhitespace($index);
+ if (!$tokens[$docIndex]->isGivenKind(T_DOC_COMMENT)) {
+ return;
+ }
+
+ // find @return
+ $docBlock = new DocBlock($tokens[$docIndex]->getContent());
+ $returnsBlock = $docBlock->getAnnotationsOfType('return');
+
+ if (0 === \count($returnsBlock)) {
+ return; // no return annotation found
+ }
+
+ $returnsBlock = $returnsBlock[0];
+ $types = $returnsBlock->getTypes();
+
+ if (0 === \count($types)) {
+ return; // no return type(s) found
+ }
+
+ $newTypes = [];
+
+ foreach ($types as $type) {
+ $newTypes[] = $this->configuration['replacements'][strtolower($type)] ?? $type;
+ }
+
+ if ($types === $newTypes) {
+ return;
+ }
+
+ $returnsBlock->setTypes($newTypes);
+ $tokens[$docIndex] = new Token([T_DOC_COMMENT, $docBlock->getContent()]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
new file mode 100644
index 0000000..cbfdfe6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocScalarFixer.php
@@ -0,0 +1,131 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractPhpdocTypesFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocScalarFixer extends AbstractPhpdocTypesFixer implements ConfigurableFixerInterface
+{
+ /**
+ * The types to fix.
+ *
+ * @var array
+ */
+ private static $types = [
+ 'boolean' => 'bool',
+ 'callback' => 'callable',
+ 'double' => 'float',
+ 'integer' => 'int',
+ 'real' => 'float',
+ 'str' => 'string',
+ ];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Scalar types should always be written in the same form. `int` not `integer`, `bool` not `boolean`, `float` not `real` or `double`.',
+ [
+ new CodeSample('<?php
+/**
+ * @param integer $a
+ * @param boolean $b
+ * @param real $c
+ *
+ * @return double
+ */
+function sample($a, $b, $c)
+{
+ return sample2($a, $b, $c);
+}
+'),
+ new CodeSample(
+ '<?php
+/**
+ * @param integer $a
+ * @param boolean $b
+ * @param real $c
+ */
+function sample($a, $b, $c)
+{
+ return sample2($a, $b, $c);
+}
+',
+ ['types' => ['boolean']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ * Must run after PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ /*
+ * Should be run before all other docblock fixers apart from the
+ * phpdoc_to_comment and phpdoc_indent fixer to make sure all fixers
+ * apply correct indentation to new code they add. This should run
+ * before alignment of params is done since this fixer might change
+ * the type and thereby un-aligning the params. We also must run after
+ * the phpdoc_types_fixer because it can convert types to things that
+ * we can fix.
+ */
+ return 15;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $types = array_keys(self::$types);
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('types', 'A list of types to fix.'))
+ ->setAllowedValues([new AllowedValueSubset($types)])
+ ->setDefault($types)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function normalize(string $type): string
+ {
+ if (\in_array($type, $this->configuration['types'], true)) {
+ return self::$types[$type];
+ }
+
+ return $type;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php
new file mode 100644
index 0000000..b8140f6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSeparationFixer.php
@@ -0,0 +1,171 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\TagComparator;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocSeparationFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Annotations in PHPDoc should be grouped together so that annotations of the same type immediately follow each other, and annotations of a different type are separated by a single blank line.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * Description.
+ * @param string $foo
+ *
+ *
+ * @param bool $bar Bar
+ * @throws Exception|RuntimeException
+ * @return bool
+ */
+function fnc($foo, $bar) {}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocOrderFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -3;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $this->fixDescription($doc);
+ $this->fixAnnotations($doc);
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+
+ /**
+ * Make sure the description is separated from the annotations.
+ */
+ private function fixDescription(DocBlock $doc): void
+ {
+ foreach ($doc->getLines() as $index => $line) {
+ if ($line->containsATag()) {
+ break;
+ }
+
+ if ($line->containsUsefulContent()) {
+ $next = $doc->getLine($index + 1);
+
+ if (null !== $next && $next->containsATag()) {
+ $line->addBlank();
+
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Make sure the annotations are correctly separated.
+ */
+ private function fixAnnotations(DocBlock $doc): void
+ {
+ foreach ($doc->getAnnotations() as $index => $annotation) {
+ $next = $doc->getAnnotation($index + 1);
+
+ if (null === $next) {
+ break;
+ }
+
+ if (true === $next->getTag()->valid()) {
+ if (TagComparator::shouldBeTogether($annotation->getTag(), $next->getTag())) {
+ $this->ensureAreTogether($doc, $annotation, $next);
+ } else {
+ $this->ensureAreSeparate($doc, $annotation, $next);
+ }
+ }
+ }
+ }
+
+ /**
+ * Force the given annotations to immediately follow each other.
+ */
+ private function ensureAreTogether(DocBlock $doc, Annotation $first, Annotation $second): void
+ {
+ $pos = $first->getEnd();
+ $final = $second->getStart();
+
+ for ($pos = $pos + 1; $pos < $final; ++$pos) {
+ $doc->getLine($pos)->remove();
+ }
+ }
+
+ /**
+ * Force the given annotations to have one empty line between each other.
+ */
+ private function ensureAreSeparate(DocBlock $doc, Annotation $first, Annotation $second): void
+ {
+ $pos = $first->getEnd();
+ $final = $second->getStart() - 1;
+
+ // check if we need to add a line, or need to remove one or more lines
+ if ($pos === $final) {
+ $doc->getLine($pos)->addBlank();
+
+ return;
+ }
+
+ for ($pos = $pos + 1; $pos < $final; ++$pos) {
+ $doc->getLine($pos)->remove();
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSingleLineVarSpacingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSingleLineVarSpacingFixer.php
new file mode 100644
index 0000000..8ccd3d7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSingleLineVarSpacingFixer.php
@@ -0,0 +1,98 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for part of rule defined in PSR5 ¶7.22.
+ */
+final class PhpdocSingleLineVarSpacingFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Single line `@var` PHPDoc should have proper spacing.',
+ [new CodeSample("<?php /**@var MyClass \$a */\n\$a = test();\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocNoAliasTagFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_COMMENT, T_DOC_COMMENT]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ /** @var Token $token */
+ foreach ($tokens as $index => $token) {
+ if (!$token->isComment()) {
+ continue;
+ }
+
+ $content = $token->getContent();
+ $fixedContent = $this->fixTokenContent($content);
+
+ if ($content !== $fixedContent) {
+ $tokens[$index] = new Token([T_DOC_COMMENT, $fixedContent]);
+ }
+ }
+ }
+
+ private function fixTokenContent(string $content): string
+ {
+ return Preg::replaceCallback(
+ '#^/\*\*\h*@var\h+(\S+)\h*(\$\S+)?\h*([^\n]*)\*/$#',
+ static function (array $matches) {
+ $content = '/** @var';
+
+ for ($i = 1, $m = \count($matches); $i < $m; ++$i) {
+ if ('' !== $matches[$i]) {
+ $content .= ' '.$matches[$i];
+ }
+ }
+
+ return rtrim($content).' */';
+ },
+ $content
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSummaryFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSummaryFixer.php
new file mode 100644
index 0000000..090ac88
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocSummaryFixer.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\ShortDescription;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocSummaryFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPDoc summary should end in either a full stop, exclamation mark, or question mark.',
+ [new CodeSample('<?php
+/**
+ * Foo function is great
+ */
+function foo () {}
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $end = (new ShortDescription($doc))->getEnd();
+
+ if (null !== $end) {
+ $line = $doc->getLine($end);
+ $content = rtrim($line->getContent());
+
+ if (!$this->isCorrectlyFormatted($content)) {
+ $line->setContent($content.'.'.$this->whitespacesConfig->getLineEnding());
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+ }
+ }
+
+ /**
+ * Is the last line of the short description correctly formatted?
+ */
+ private function isCorrectlyFormatted(string $content): bool
+ {
+ if (false !== stripos($content, '{@inheritdoc}')) {
+ return true;
+ }
+
+ return $content !== rtrim($content, '.。!?¡¿!?');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php
new file mode 100644
index 0000000..b960832
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagCasingFixer.php
@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractProxyFixer;
+use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+
+final class PhpdocTagCasingFixer extends AbstractProxyFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Fixes casing of PHPDoc tags.',
+ [
+ new CodeSample("<?php\n/**\n * @inheritdoc\n */\n"),
+ new CodeSample("<?php\n/**\n * @inheritdoc\n * @Foo\n */\n", [
+ 'tags' => ['foo'],
+ ]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return parent::getPriority();
+ }
+
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $replacements = [];
+ foreach ($this->configuration['tags'] as $tag) {
+ $replacements[$tag] = $tag;
+ }
+
+ /** @var GeneralPhpdocTagRenameFixer $generalPhpdocTagRenameFixer */
+ $generalPhpdocTagRenameFixer = $this->proxyFixers['general_phpdoc_tag_rename'];
+
+ try {
+ $generalPhpdocTagRenameFixer->configure([
+ 'fix_annotation' => true,
+ 'fix_inline' => true,
+ 'replacements' => $replacements,
+ 'case_sensitive' => false,
+ ]);
+ } catch (InvalidConfigurationException $exception) {
+ throw new InvalidFixerConfigurationException(
+ $this->getName(),
+ Preg::replace('/^\[.+?\] /', '', $exception->getMessage()),
+ $exception
+ );
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('tags', 'List of tags to fix with their expected casing.'))
+ ->setAllowedTypes(['array'])
+ ->setDefault(['inheritDoc'])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createProxyFixers(): array
+ {
+ return [new GeneralPhpdocTagRenameFixer()];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
new file mode 100644
index 0000000..216d9f9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTagTypeFixer.php
@@ -0,0 +1,212 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+use Symfony\Component\OptionsResolver\Options;
+
+final class PhpdocTagTypeFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ private const TAG_REGEX = '/^(?:
+ (?<tag>
+ (?:@(?<tag_name>.+?)(?:\s.+)?)
+ )
+ |
+ {(?<inlined_tag>
+ (?:@(?<inlined_tag_name>.+?)(?:\s.+)?)
+ )}
+ )$/x';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Forces PHPDoc tags to be either regular annotations or inline.',
+ [
+ new CodeSample(
+ "<?php\n/**\n * {@api}\n */\n"
+ ),
+ new CodeSample(
+ "<?php\n/**\n * @inheritdoc\n */\n",
+ ['tags' => ['inheritdoc' => 'inline']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (0 === \count($this->configuration['tags'])) {
+ return;
+ }
+
+ $regularExpression = sprintf(
+ '/({?@(?:%s).*?(?:(?=\s\*\/)|(?=\n)}?))/i',
+ implode('|', array_map(
+ static function (string $tag): string {
+ return preg_quote($tag, '/');
+ },
+ array_keys($this->configuration['tags'])
+ ))
+ );
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $parts = Preg::split(
+ $regularExpression,
+ $token->getContent(),
+ -1,
+ PREG_SPLIT_DELIM_CAPTURE
+ );
+
+ for ($i = 1, $max = \count($parts) - 1; $i < $max; $i += 2) {
+ if (!Preg::match(self::TAG_REGEX, $parts[$i], $matches)) {
+ continue;
+ }
+
+ if ('' !== $matches['tag']) {
+ $tag = $matches['tag'];
+ $tagName = $matches['tag_name'];
+ } else {
+ $tag = $matches['inlined_tag'];
+ $tagName = $matches['inlined_tag_name'];
+ }
+
+ $tagName = strtolower($tagName);
+ if (!isset($this->configuration['tags'][$tagName])) {
+ continue;
+ }
+
+ if ('inline' === $this->configuration['tags'][$tagName]) {
+ $parts[$i] = '{'.$tag.'}';
+
+ continue;
+ }
+
+ if (!$this->tagIsSurroundedByText($parts, $i)) {
+ $parts[$i] = $tag;
+ }
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, implode('', $parts)]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('tags', 'The list of tags to fix'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([static function (array $value): bool {
+ foreach ($value as $type) {
+ if (!\in_array($type, ['annotation', 'inline'], true)) {
+ throw new InvalidOptionsException("Unknown tag type \"{$type}\".");
+ }
+ }
+
+ return true;
+ }])
+ ->setDefault([
+ 'api' => 'annotation',
+ 'author' => 'annotation',
+ 'copyright' => 'annotation',
+ 'deprecated' => 'annotation',
+ 'example' => 'annotation',
+ 'global' => 'annotation',
+ 'inheritDoc' => 'annotation',
+ 'internal' => 'annotation',
+ 'license' => 'annotation',
+ 'method' => 'annotation',
+ 'package' => 'annotation',
+ 'param' => 'annotation',
+ 'property' => 'annotation',
+ 'return' => 'annotation',
+ 'see' => 'annotation',
+ 'since' => 'annotation',
+ 'throws' => 'annotation',
+ 'todo' => 'annotation',
+ 'uses' => 'annotation',
+ 'var' => 'annotation',
+ 'version' => 'annotation',
+ ])
+ ->setNormalizer(static function (Options $options, $value): array {
+ $normalized = [];
+
+ foreach ($value as $tag => $type) {
+ $normalized[strtolower($tag)] = $type;
+ }
+
+ return $normalized;
+ })
+ ->getOption(),
+ ]);
+ }
+
+ private function tagIsSurroundedByText(array $parts, int $index): bool
+ {
+ return
+ Preg::match('/(^|\R)\h*[^@\s]\N*/', $this->cleanComment($parts[$index - 1]))
+ || Preg::match('/^.*?\R\s*[^@\s]/', $this->cleanComment($parts[$index + 1]))
+ ;
+ }
+
+ private function cleanComment(string $comment): string
+ {
+ $comment = Preg::replace('/^\/\*\*|\*\/$/', '', $comment);
+
+ return Preg::replace('/(\R)(\h*\*)?\h*/', '$1', $comment);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php
new file mode 100644
index 0000000..b335b40
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocToCommentFixer.php
@@ -0,0 +1,162 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\CommentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Ceeram <ceeram@cakephp.org>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocToCommentFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * @var string[]
+ */
+ private $ignoredTags = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyCommentFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocAnnotationWithoutDotFixer, PhpdocIndentFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ * Must run after CommentToPhpdocFixer.
+ */
+ public function getPriority(): int
+ {
+ /*
+ * Should be run before all other docblock fixers so that these fixers
+ * don't touch doc comments which are meant to be converted to regular
+ * comments.
+ */
+ return 25;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Docblocks should only be used on structural elements.',
+ [
+ new CodeSample(
+ '<?php
+$first = true;// needed because by default first docblock is never fixed.
+
+/** This should be a comment */
+foreach($connections as $key => $sqlite) {
+ $sqlite->open($path);
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+$first = true;// needed because by default first docblock is never fixed.
+
+/** This should be a comment */
+foreach($connections as $key => $sqlite) {
+ $sqlite->open($path);
+}
+
+/** @todo This should be a PHPDoc as the tag is on "ignored_tags" list */
+foreach($connections as $key => $sqlite) {
+ $sqlite->open($path);
+}
+',
+ ['ignored_tags' => ['todo']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration = null): void
+ {
+ parent::configure($configuration);
+
+ $this->ignoredTags = array_map(
+ static function (string $tag): string {
+ return strtolower($tag);
+ },
+ $this->configuration['ignored_tags']
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('ignored_tags', 'List of ignored tags (matched case insensitively)'))
+ ->setAllowedTypes(['array'])
+ ->setDefault([])
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $commentsAnalyzer = new CommentsAnalyzer();
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ if ($commentsAnalyzer->isHeaderComment($tokens, $index)) {
+ continue;
+ }
+
+ if ($commentsAnalyzer->isBeforeStructuralElement($tokens, $index)) {
+ continue;
+ }
+
+ if (0 < Preg::matchAll('~\@([a-zA-Z0-9_\\\\-]+)\b~', $token->getContent(), $matches)) {
+ foreach ($matches[1] as $match) {
+ if (\in_array(strtolower($match), $this->ignoredTags, true)) {
+ continue 2;
+ }
+ }
+ }
+
+ $tokens[$index] = new Token([T_COMMENT, '/*'.ltrim($token->getContent(), '/*')]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php
new file mode 100644
index 0000000..bb72104
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php
@@ -0,0 +1,197 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\DocBlock\ShortDescription;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Nobu Funaki <nobu.funaki@gmail.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocTrimConsecutiveBlankLineSeparationFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Removes extra blank lines after summary and after description in PHPDoc.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * Summary.
+ *
+ *
+ * Description that contain 4 lines,
+ *
+ *
+ * while 2 of them are blank!
+ *
+ *
+ * @param string $foo
+ *
+ *
+ * @dataProvider provideFixCases
+ */
+function fnc($foo) {}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -41;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $summaryEnd = (new ShortDescription($doc))->getEnd();
+
+ if (null !== $summaryEnd) {
+ $this->fixSummary($doc, $summaryEnd);
+ $this->fixDescription($doc, $summaryEnd);
+ }
+
+ $this->fixAllTheRest($doc);
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+
+ private function fixSummary(DocBlock $doc, int $summaryEnd): void
+ {
+ $nonBlankLineAfterSummary = $this->findNonBlankLine($doc, $summaryEnd);
+
+ $this->removeExtraBlankLinesBetween($doc, $summaryEnd, $nonBlankLineAfterSummary);
+ }
+
+ private function fixDescription(DocBlock $doc, int $summaryEnd): void
+ {
+ $annotationStart = $this->findFirstAnnotationOrEnd($doc);
+
+ // assuming the end of the Description appears before the first Annotation
+ $descriptionEnd = $this->reverseFindLastUsefulContent($doc, $annotationStart);
+
+ if (null === $descriptionEnd || $summaryEnd === $descriptionEnd) {
+ return; // no Description
+ }
+
+ if ($annotationStart === \count($doc->getLines()) - 1) {
+ return; // no content after Description
+ }
+
+ $this->removeExtraBlankLinesBetween($doc, $descriptionEnd, $annotationStart);
+ }
+
+ private function fixAllTheRest(DocBlock $doc): void
+ {
+ $annotationStart = $this->findFirstAnnotationOrEnd($doc);
+ $lastLine = $this->reverseFindLastUsefulContent($doc, \count($doc->getLines()) - 1);
+
+ if (null !== $lastLine && $annotationStart !== $lastLine) {
+ $this->removeExtraBlankLinesBetween($doc, $annotationStart, $lastLine);
+ }
+ }
+
+ private function removeExtraBlankLinesBetween(DocBlock $doc, int $from, int $to): void
+ {
+ for ($index = $from + 1; $index < $to; ++$index) {
+ $line = $doc->getLine($index);
+ $next = $doc->getLine($index + 1);
+ $this->removeExtraBlankLine($line, $next);
+ }
+ }
+
+ private function removeExtraBlankLine(Line $current, Line $next): void
+ {
+ if (!$current->isTheEnd() && !$current->containsUsefulContent()
+ && !$next->isTheEnd() && !$next->containsUsefulContent()) {
+ $current->remove();
+ }
+ }
+
+ private function findNonBlankLine(DocBlock $doc, int $after): ?int
+ {
+ foreach ($doc->getLines() as $index => $line) {
+ if ($index <= $after) {
+ continue;
+ }
+
+ if ($line->containsATag() || $line->containsUsefulContent() || $line->isTheEnd()) {
+ return $index;
+ }
+ }
+
+ return null;
+ }
+
+ private function findFirstAnnotationOrEnd(DocBlock $doc): int
+ {
+ $index = null;
+ foreach ($doc->getLines() as $index => $line) {
+ if ($line->containsATag()) {
+ return $index;
+ }
+ }
+
+ return $index; // no Annotation, return the last line
+ }
+
+ private function reverseFindLastUsefulContent(DocBlock $doc, int $from): ?int
+ {
+ for ($index = $from - 1; $index >= 0; --$index) {
+ if ($doc->getLine($index)->containsUsefulContent()) {
+ return $index;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimFixer.php
new file mode 100644
index 0000000..d835fb3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTrimFixer.php
@@ -0,0 +1,124 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class PhpdocTrimFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'PHPDoc should start and end with content, excluding the very first and last line of the docblocks.',
+ [new CodeSample('<?php
+/**
+ *
+ * Foo must be final class.
+ *
+ *
+ */
+final class Foo {}
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, PhpUnitTestAnnotationFixer, PhpdocIndentFixer, PhpdocNoAccessFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocOrderFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -5;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+ $content = $this->fixStart($content);
+ // we need re-parse the docblock after fixing the start before
+ // fixing the end in order for the lines to be correctly indexed
+ $content = $this->fixEnd($content);
+ $tokens[$index] = new Token([T_DOC_COMMENT, $content]);
+ }
+ }
+
+ /**
+ * Make sure the first useful line starts immediately after the first line.
+ */
+ private function fixStart(string $content): string
+ {
+ return Preg::replace(
+ '~
+ (^/\*\*) # DocComment begin
+ (?:
+ \R\h*(?:\*\h*)? # lines without useful content
+ (?!\R\h*\*/) # not followed by a DocComment end
+ )+
+ (\R\h*(?:\*\h*)?\S) # first line with useful content
+ ~x',
+ '$1$2',
+ $content
+ );
+ }
+
+ /**
+ * Make sure the last useful line is immediately before the final line.
+ */
+ private function fixEnd(string $content): string
+ {
+ return Preg::replace(
+ '~
+ (\R\h*(?:\*\h*)?\S.*?) # last line with useful content
+ (?:
+ (?<!/\*\*) # not preceded by a DocComment start
+ \R\h*(?:\*\h*)? # lines without useful content
+ )+
+ (\R\h*\*/$) # DocComment end
+ ~xu',
+ '$1$2',
+ $content
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php
new file mode 100644
index 0000000..7371b6b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesFixer.php
@@ -0,0 +1,163 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractPhpdocTypesFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class PhpdocTypesFixer extends AbstractPhpdocTypesFixer implements ConfigurableFixerInterface
+{
+ /**
+ * Available types, grouped.
+ *
+ * @var array<string,string[]>
+ */
+ private static $possibleTypes = [
+ 'simple' => [
+ 'array',
+ 'bool',
+ 'callable',
+ 'float',
+ 'int',
+ 'iterable',
+ 'null',
+ 'object',
+ 'string',
+ ],
+ 'alias' => [
+ 'boolean',
+ 'callback',
+ 'double',
+ 'integer',
+ 'real',
+ ],
+ 'meta' => [
+ '$this',
+ 'false',
+ 'mixed',
+ 'parent',
+ 'resource',
+ 'scalar',
+ 'self',
+ 'static',
+ 'true',
+ 'void',
+ ],
+ ];
+
+ /**
+ * @var array string[]
+ */
+ private $typesToFix = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->typesToFix = array_merge(...array_map(static function (string $group): array {
+ return self::$possibleTypes[$group];
+ }, $this->configuration['groups']));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'The correct case must be used for standard PHP types in PHPDoc.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @param STRING|String[] $bar
+ *
+ * @return inT[]
+ */
+'
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param BOOL $foo
+ *
+ * @return MIXED
+ */
+',
+ ['groups' => ['simple', 'alias']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAlignFixer, PhpdocAlignFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
+ * Must run after PhpdocAnnotationWithoutDotFixer, PhpdocIndentFixer.
+ */
+ public function getPriority(): int
+ {
+ /*
+ * Should be run before all other docblock fixers apart from the
+ * phpdoc_to_comment and phpdoc_indent fixer to make sure all fixers
+ * apply correct indentation to new code they add. This should run
+ * before alignment of params is done since this fixer might change
+ * the type and thereby un-aligning the params. We also must run before
+ * the phpdoc_scalar_fixer so that it can make changes after us.
+ */
+ return 16;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function normalize(string $type): string
+ {
+ $lower = strtolower($type);
+
+ return \in_array($lower, $this->typesToFix, true) ? $lower : $type;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $possibleGroups = array_keys(self::$possibleTypes);
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('groups', 'Type groups to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset($possibleGroups)])
+ ->setDefault($possibleGroups)
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesOrderFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesOrderFixer.php
new file mode 100644
index 0000000..ed7f21f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocTypesOrderFixer.php
@@ -0,0 +1,222 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\Annotation;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Utils;
+
+final class PhpdocTypesOrderFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Sorts PHPDoc types.',
+ [
+ new CodeSample(
+ '<?php
+/**
+ * @param string|null $bar
+ */
+'
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param null|string $bar
+ */
+',
+ ['null_adjustment' => 'always_last']
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param null|string|int|\Foo $bar
+ */
+',
+ ['sort_algorithm' => 'alpha']
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param null|string|int|\Foo $bar
+ */
+',
+ [
+ 'sort_algorithm' => 'alpha',
+ 'null_adjustment' => 'always_last',
+ ]
+ ),
+ new CodeSample(
+ '<?php
+/**
+ * @param null|string|int|\Foo $bar
+ */
+',
+ [
+ 'sort_algorithm' => 'alpha',
+ 'null_adjustment' => 'none',
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocAnnotationWithoutDotFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('sort_algorithm', 'The sorting algorithm to apply.'))
+ ->setAllowedValues(['alpha', 'none'])
+ ->setDefault('alpha')
+ ->getOption(),
+ (new FixerOptionBuilder('null_adjustment', 'Forces the position of `null` (overrides `sort_algorithm`).'))
+ ->setAllowedValues(['always_first', 'always_last', 'none'])
+ ->setDefault('always_first')
+ ->getOption(),
+ ]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+ $annotations = $doc->getAnnotationsOfType(Annotation::getTagsWithTypes());
+
+ if (0 === \count($annotations)) {
+ continue;
+ }
+
+ foreach ($annotations as $annotation) {
+ $types = $annotation->getTypes();
+
+ // fix main types
+ $annotation->setTypes($this->sortTypes($types));
+
+ // fix @method parameters types
+ $line = $doc->getLine($annotation->getStart());
+ $line->setContent(Preg::replaceCallback('/(@method\s+.+?\s+\w+\()(.*)\)/', function (array $matches) {
+ $sorted = Preg::replaceCallback('/([^\s,]+)([\s]+\$[^\s,]+)/', function (array $matches): string {
+ return $this->sortJoinedTypes($matches[1]).$matches[2];
+ }, $matches[2]);
+
+ return $matches[1].$sorted.')';
+ }, $line->getContent()));
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+
+ /**
+ * @param string[] $types
+ *
+ * @return string[]
+ */
+ private function sortTypes(array $types): array
+ {
+ foreach ($types as $index => $type) {
+ $types[$index] = Preg::replaceCallback('/^([^<]+)<(?:([\w\|]+?|<?.*>)(,\s*))?(.*)>$/', function (array $matches) {
+ return $matches[1].'<'.$this->sortJoinedTypes($matches[2]).$matches[3].$this->sortJoinedTypes($matches[4]).'>';
+ }, $type);
+ }
+
+ if ('alpha' === $this->configuration['sort_algorithm']) {
+ $types = Utils::stableSort(
+ $types,
+ static function (string $type): string { return $type; },
+ static function (string $typeA, string $typeB): int {
+ $regexp = '/^\\??\\\?/';
+
+ return strcasecmp(
+ Preg::replace($regexp, '', $typeA),
+ Preg::replace($regexp, '', $typeB)
+ );
+ }
+ );
+ }
+
+ if ('none' !== $this->configuration['null_adjustment']) {
+ $nulls = [];
+ foreach ($types as $index => $type) {
+ if (Preg::match('/^\\\?null$/i', $type)) {
+ $nulls[$index] = $type;
+ unset($types[$index]);
+ }
+ }
+
+ if (\count($nulls) > 0) {
+ if ('always_last' === $this->configuration['null_adjustment']) {
+ array_push($types, ...$nulls);
+ } else {
+ array_unshift($types, ...$nulls);
+ }
+ }
+ }
+
+ return $types;
+ }
+
+ private function sortJoinedTypes(string $types): string
+ {
+ $types = array_filter(
+ Preg::split('/([^|<{\(]+(?:[<{].*[>}]|\(.+\)(?::.+)?)?)/', $types, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY),
+ static function (string $value): bool {
+ return '|' !== $value;
+ }
+ );
+
+ return implode('|', $this->sortTypes($types));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarAnnotationCorrectOrderFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarAnnotationCorrectOrderFixer.php
new file mode 100644
index 0000000..400f8dd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarAnnotationCorrectOrderFixer.php
@@ -0,0 +1,81 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ */
+final class PhpdocVarAnnotationCorrectOrderFixer extends AbstractFixer
+{
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ '`@var` and `@type` annotations must have type and name in the correct order.',
+ [new CodeSample('<?php
+/** @var $foo int */
+$foo = 2 + 2;
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ if (false === stripos($token->getContent(), '@var') && false === stripos($token->getContent(), '@type')) {
+ continue;
+ }
+
+ $newContent = Preg::replace(
+ '/(@(?:type|var)\s*)(\$\S+)(\h+)([^\$](?:[^<\s]|<[^>]*>)*)(\s|\*)/i',
+ '$1$4$3$2$5',
+ $token->getContent()
+ );
+
+ if ($newContent === $token->getContent()) {
+ continue;
+ }
+
+ $tokens[$index] = new Token([$token->getId(), $newContent]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php
new file mode 100644
index 0000000..7bfca41
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Phpdoc/PhpdocVarWithoutNameFixer.php
@@ -0,0 +1,160 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Phpdoc;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\DocBlock\DocBlock;
+use PhpCsFixer\DocBlock\Line;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Dave van der Brugge <dmvdbrugge@gmail.com>
+ */
+final class PhpdocVarWithoutNameFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ '`@var` and `@type` annotations of classy properties should not contain the name.',
+ [new CodeSample('<?php
+final class Foo
+{
+ /**
+ * @var int $bar
+ */
+ public $bar;
+
+ /**
+ * @type $baz float
+ */
+ public $baz;
+}
+')]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocAlignFixer.
+ * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOC_COMMENT) && $tokens->isAnyTokenKindsFound(Token::getClassyTokenKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_DOC_COMMENT)) {
+ continue;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $nextIndex) {
+ continue;
+ }
+
+ // For people writing "static public $foo" instead of "public static $foo"
+ if ($tokens[$nextIndex]->isGivenKind(T_STATIC)) {
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ }
+
+ // We want only doc blocks that are for properties and thus have specified access modifiers next
+ $propertyModifierKinds = [T_PRIVATE, T_PROTECTED, T_PUBLIC, T_VAR];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $propertyModifierKinds[] = T_READONLY;
+ }
+
+ if (!$tokens[$nextIndex]->isGivenKind($propertyModifierKinds)) {
+ continue;
+ }
+
+ $doc = new DocBlock($token->getContent());
+
+ $firstLevelLines = $this->getFirstLevelLines($doc);
+ $annotations = $doc->getAnnotationsOfType(['type', 'var']);
+
+ foreach ($annotations as $annotation) {
+ if (isset($firstLevelLines[$annotation->getStart()])) {
+ $this->fixLine($firstLevelLines[$annotation->getStart()]);
+ }
+ }
+
+ $tokens[$index] = new Token([T_DOC_COMMENT, $doc->getContent()]);
+ }
+ }
+
+ private function fixLine(Line $line): void
+ {
+ $content = $line->getContent();
+
+ Preg::matchAll('/ \$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $content, $matches);
+
+ if (isset($matches[0][0])) {
+ $line->setContent(str_replace($matches[0][0], '', $content));
+ }
+ }
+
+ /**
+ * @return Line[]
+ */
+ private function getFirstLevelLines(DocBlock $docBlock): array
+ {
+ $nested = 0;
+ $lines = $docBlock->getLines();
+
+ foreach ($lines as $index => $line) {
+ $content = $line->getContent();
+
+ if (Preg::match('/\s*\*\s*}$/', $content)) {
+ --$nested;
+ }
+
+ if ($nested > 0) {
+ unset($lines[$index]);
+ }
+
+ if (Preg::match('/\s\{$/', $content)) {
+ ++$nested;
+ }
+ }
+
+ return $lines;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/NoUselessReturnFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/NoUselessReturnFixer.php
new file mode 100644
index 0000000..7656f95
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/NoUselessReturnFixer.php
@@ -0,0 +1,112 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ReturnNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class NoUselessReturnFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_FUNCTION, T_RETURN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be an empty `return` statement at the end of a function.',
+ [
+ new CodeSample(
+ '<?php
+function example($b) {
+ if ($b) {
+ return;
+ }
+ return;
+}
+'
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BlankLineBeforeStatementFixer, NoExtraBlankLinesFixer, NoWhitespaceInBlankLineFixer, SingleLineCommentStyleFixer.
+ * Must run after NoEmptyStatementFixer, NoUnneededCurlyBracesFixer, NoUselessElseFixer, SimplifiedNullReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return -18;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $index = $tokens->getNextTokenOfKind($index, [';', '{']);
+ if ($tokens[$index]->equals('{')) {
+ $this->fixFunction($tokens, $index, $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index));
+ }
+ }
+ }
+
+ /**
+ * @param int $start Token index of the opening brace token of the function
+ * @param int $end Token index of the closing brace token of the function
+ */
+ private function fixFunction(Tokens $tokens, int $start, int $end): void
+ {
+ for ($index = $end; $index > $start; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_RETURN)) {
+ continue;
+ }
+
+ $nextAt = $tokens->getNextMeaningfulToken($index);
+ if (!$tokens[$nextAt]->equals(';')) {
+ continue;
+ }
+
+ if ($tokens->getNextMeaningfulToken($nextAt) !== $end) {
+ continue;
+ }
+
+ $previous = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$previous]->equalsAny([[T_ELSE], ')'])) {
+ continue;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($nextAt);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/ReturnAssignmentFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/ReturnAssignmentFixer.php
new file mode 100644
index 0000000..143d600
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/ReturnAssignmentFixer.php
@@ -0,0 +1,352 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ReturnNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+final class ReturnAssignmentFixer extends AbstractFixer
+{
+ /**
+ * @var TokensAnalyzer
+ */
+ private $tokensAnalyzer;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Local, dynamic and directly referenced variables should not be assigned and directly returned by a function or method.',
+ [new CodeSample("<?php\nfunction a() {\n \$a = 1;\n return \$a;\n}\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BlankLineBeforeStatementFixer.
+ * Must run after NoEmptyStatementFixer, NoUnneededCurlyBracesFixer.
+ */
+ public function getPriority(): int
+ {
+ return -15;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAllTokenKindsFound([T_FUNCTION, T_RETURN, T_VARIABLE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $tokenCount = \count($tokens);
+ $this->tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ for ($index = 1; $index < $tokenCount; ++$index) {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $functionOpenIndex = $tokens->getNextTokenOfKind($index, ['{', ';']);
+ if ($tokens[$functionOpenIndex]->equals(';')) { // abstract function
+ $index = $functionOpenIndex - 1;
+
+ continue;
+ }
+
+ $functionCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $functionOpenIndex);
+ $totalTokensAdded = 0;
+
+ do {
+ $tokensAdded = $this->fixFunction(
+ $tokens,
+ $index,
+ $functionOpenIndex,
+ $functionCloseIndex
+ );
+
+ $totalTokensAdded += $tokensAdded;
+ } while ($tokensAdded > 0);
+
+ $index = $functionCloseIndex + $totalTokensAdded;
+ $tokenCount += $totalTokensAdded;
+ }
+ }
+
+ /**
+ * @param int $functionIndex token index of T_FUNCTION
+ * @param int $functionOpenIndex token index of the opening brace token of the function
+ * @param int $functionCloseIndex token index of the closing brace token of the function
+ *
+ * @return int >= 0 number of tokens inserted into the Tokens collection
+ */
+ private function fixFunction(Tokens $tokens, int $functionIndex, int $functionOpenIndex, int $functionCloseIndex): int
+ {
+ static $riskyKinds = [
+ CT::T_DYNAMIC_VAR_BRACE_OPEN, // "$h = ${$g};" case
+ T_EVAL, // "$c = eval('return $this;');" case
+ T_GLOBAL,
+ T_INCLUDE, // loading additional symbols we cannot analyze here
+ T_INCLUDE_ONCE, // "
+ T_REQUIRE, // "
+ T_REQUIRE_ONCE, // "
+ T_STATIC,
+ ];
+
+ $inserted = 0;
+ $candidates = [];
+ $isRisky = false;
+
+ // go through the function declaration and check if references are passed
+ // - check if it will be risky to fix return statements of this function
+ for ($index = $functionIndex + 1; $index < $functionOpenIndex; ++$index) {
+ if ($tokens[$index]->equals('&')) {
+ $isRisky = true;
+
+ break;
+ }
+ }
+
+ // go through all the tokens of the body of the function:
+ // - check if it will be risky to fix return statements of this function
+ // - check nested functions; fix when found and update the upper limit + number of inserted token
+ // - check for return statements that might be fixed (based on if fixing will be risky, which is only know after analyzing the whole function)
+
+ for ($index = $functionOpenIndex + 1; $index < $functionCloseIndex; ++$index) {
+ if ($tokens[$index]->isGivenKind(T_FUNCTION)) {
+ $nestedFunctionOpenIndex = $tokens->getNextTokenOfKind($index, ['{', ';']);
+ if ($tokens[$nestedFunctionOpenIndex]->equals(';')) { // abstract function
+ $index = $nestedFunctionOpenIndex - 1;
+
+ continue;
+ }
+
+ $nestedFunctionCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $nestedFunctionOpenIndex);
+
+ $tokensAdded = $this->fixFunction(
+ $tokens,
+ $index,
+ $nestedFunctionOpenIndex,
+ $nestedFunctionCloseIndex
+ );
+
+ $index = $nestedFunctionCloseIndex + $tokensAdded;
+ $functionCloseIndex += $tokensAdded;
+ $inserted += $tokensAdded;
+ }
+
+ if ($isRisky) {
+ continue; // don't bother to look into anything else than nested functions as the current is risky already
+ }
+
+ if ($tokens[$index]->equals('&')) {
+ $isRisky = true;
+
+ continue;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_RETURN)) {
+ $candidates[] = $index;
+
+ continue;
+ }
+
+ // test if there is anything in the function body that might
+ // change global state or indirect changes (like through references, eval, etc.)
+
+ if ($tokens[$index]->isGivenKind($riskyKinds)) {
+ $isRisky = true;
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals('$')) {
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ if ($tokens[$nextIndex]->isGivenKind(T_VARIABLE)) {
+ $isRisky = true; // "$$a" case
+
+ continue;
+ }
+ }
+
+ if ($this->tokensAnalyzer->isSuperGlobal($index)) {
+ $isRisky = true;
+
+ continue;
+ }
+ }
+
+ if ($isRisky) {
+ return $inserted;
+ }
+
+ // fix the candidates in reverse order when applicable
+ for ($i = \count($candidates) - 1; $i >= 0; --$i) {
+ $index = $candidates[$i];
+
+ // Check if returning only a variable (i.e. not the result of an expression, function call etc.)
+ $returnVarIndex = $tokens->getNextMeaningfulToken($index);
+ if (!$tokens[$returnVarIndex]->isGivenKind(T_VARIABLE)) {
+ continue; // example: "return 1;"
+ }
+
+ $endReturnVarIndex = $tokens->getNextMeaningfulToken($returnVarIndex);
+ if (!$tokens[$endReturnVarIndex]->equalsAny([';', [T_CLOSE_TAG]])) {
+ continue; // example: "return $a + 1;"
+ }
+
+ // Check that the variable is assigned just before it is returned
+ $assignVarEndIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$assignVarEndIndex]->equals(';')) {
+ continue; // example: "? return $a;"
+ }
+
+ // Note: here we are @ "; return $a;" (or "; return $a ? >")
+ while (true) {
+ $prevMeaningFul = $tokens->getPrevMeaningfulToken($assignVarEndIndex);
+
+ if (!$tokens[$prevMeaningFul]->equals(')')) {
+ break;
+ }
+
+ $assignVarEndIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $prevMeaningFul);
+ }
+
+ $assignVarOperatorIndex = $tokens->getPrevTokenOfKind(
+ $assignVarEndIndex,
+ ['=', ';', '{', [T_OPEN_TAG], [T_OPEN_TAG_WITH_ECHO]]
+ );
+
+ if (null === $assignVarOperatorIndex || !$tokens[$assignVarOperatorIndex]->equals('=')) {
+ continue;
+ }
+
+ // Note: here we are @ "= [^;{<? ? >] ; return $a;"
+ $assignVarIndex = $tokens->getPrevMeaningfulToken($assignVarOperatorIndex);
+ if (!$tokens[$assignVarIndex]->equals($tokens[$returnVarIndex], false)) {
+ continue;
+ }
+
+ // Note: here we are @ "$a = [^;{<? ? >] ; return $a;"
+ $beforeAssignVarIndex = $tokens->getPrevMeaningfulToken($assignVarIndex);
+ if (!$tokens[$beforeAssignVarIndex]->equalsAny([';', '{', '}'])) {
+ continue;
+ }
+
+ // Note: here we are @ "[;{}] $a = [^;{<? ? >] ; return $a;"
+ $inserted += $this->simplifyReturnStatement(
+ $tokens,
+ $assignVarIndex,
+ $assignVarOperatorIndex,
+ $index,
+ $endReturnVarIndex
+ );
+ }
+
+ return $inserted;
+ }
+
+ /**
+ * @return int >= 0 number of tokens inserted into the Tokens collection
+ */
+ private function simplifyReturnStatement(
+ Tokens $tokens,
+ int $assignVarIndex,
+ int $assignVarOperatorIndex,
+ int $returnIndex,
+ int $returnVarEndIndex
+ ): int {
+ $inserted = 0;
+ $originalIndent = $tokens[$assignVarIndex - 1]->isWhitespace()
+ ? $tokens[$assignVarIndex - 1]->getContent()
+ : null
+ ;
+
+ // remove the return statement
+ if ($tokens[$returnVarEndIndex]->equals(';')) { // do not remove PHP close tags
+ $tokens->clearTokenAndMergeSurroundingWhitespace($returnVarEndIndex);
+ }
+
+ for ($i = $returnIndex; $i <= $returnVarEndIndex - 1; ++$i) {
+ $this->clearIfSave($tokens, $i);
+ }
+
+ // remove no longer needed indentation of the old/remove return statement
+ if ($tokens[$returnIndex - 1]->isWhitespace()) {
+ $content = $tokens[$returnIndex - 1]->getContent();
+ $fistLinebreakPos = strrpos($content, "\n");
+ $content = false === $fistLinebreakPos
+ ? ' '
+ : substr($content, $fistLinebreakPos)
+ ;
+
+ $tokens[$returnIndex - 1] = new Token([T_WHITESPACE, $content]);
+ }
+
+ // remove the variable and the assignment
+ for ($i = $assignVarIndex; $i <= $assignVarOperatorIndex; ++$i) {
+ $this->clearIfSave($tokens, $i);
+ }
+
+ // insert new return statement
+ $tokens->insertAt($assignVarIndex, new Token([T_RETURN, 'return']));
+ ++$inserted;
+
+ // use the original indent of the var assignment for the new return statement
+ if (
+ null !== $originalIndent
+ && $tokens[$assignVarIndex - 1]->isWhitespace()
+ && $originalIndent !== $tokens[$assignVarIndex - 1]->getContent()
+ ) {
+ $tokens[$assignVarIndex - 1] = new Token([T_WHITESPACE, $originalIndent]);
+ }
+
+ // remove trailing space after the new return statement which might be added during the clean up process
+ $nextIndex = $tokens->getNonEmptySibling($assignVarIndex, 1);
+ if (!$tokens[$nextIndex]->isWhitespace()) {
+ $tokens->insertAt($nextIndex, new Token([T_WHITESPACE, ' ']));
+ ++$inserted;
+ }
+
+ return $inserted;
+ }
+
+ private function clearIfSave(Tokens $tokens, int $index): void
+ {
+ if ($tokens[$index]->isComment()) {
+ return;
+ }
+
+ if ($tokens[$index]->isWhitespace() && $tokens[$tokens->getPrevNonWhitespace($index)]->isComment()) {
+ return;
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/SimplifiedNullReturnFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/SimplifiedNullReturnFixer.php
new file mode 100644
index 0000000..800c21c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/ReturnNotation/SimplifiedNullReturnFixer.php
@@ -0,0 +1,157 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\ReturnNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class SimplifiedNullReturnFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'A return statement wishing to return `void` should not return `null`.',
+ [
+ new CodeSample("<?php return null;\n"),
+ new CodeSample(
+ <<<'EOT'
+<?php
+function foo() { return null; }
+function bar(): int { return null; }
+function baz(): ?int { return null; }
+function xyz(): void { return null; }
+
+EOT
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoUselessReturnFixer, VoidReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return 16;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_RETURN);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_RETURN)) {
+ continue;
+ }
+
+ if ($this->needFixing($tokens, $index)) {
+ $this->clear($tokens, $index);
+ }
+ }
+ }
+
+ /**
+ * Clear the return statement located at a given index.
+ */
+ private function clear(Tokens $tokens, int $index): void
+ {
+ while (!$tokens[++$index]->equals(';')) {
+ if ($this->shouldClearToken($tokens, $index)) {
+ $tokens->clearAt($index);
+ }
+ }
+ }
+
+ /**
+ * Does the return statement located at a given index need fixing?
+ */
+ private function needFixing(Tokens $tokens, int $index): bool
+ {
+ if ($this->isStrictOrNullableReturnTypeFunction($tokens, $index)) {
+ return false;
+ }
+
+ $content = '';
+ while (!$tokens[$index]->equals(';')) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ $content .= $tokens[$index]->getContent();
+ }
+
+ $content = ltrim($content, '(');
+ $content = rtrim($content, ');');
+
+ return 'null' === strtolower($content);
+ }
+
+ /**
+ * Is the return within a function with a non-void or nullable return type?
+ *
+ * @param int $returnIndex Current return token index
+ */
+ private function isStrictOrNullableReturnTypeFunction(Tokens $tokens, int $returnIndex): bool
+ {
+ $functionIndex = $returnIndex;
+ do {
+ $functionIndex = $tokens->getPrevTokenOfKind($functionIndex, [[T_FUNCTION]]);
+ if (null === $functionIndex) {
+ return false;
+ }
+ $openingCurlyBraceIndex = $tokens->getNextTokenOfKind($functionIndex, ['{']);
+ $closingCurlyBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $openingCurlyBraceIndex);
+ } while ($closingCurlyBraceIndex < $returnIndex);
+
+ $possibleVoidIndex = $tokens->getPrevMeaningfulToken($openingCurlyBraceIndex);
+ $isStrictReturnType = $tokens[$possibleVoidIndex]->isGivenKind(T_STRING) && 'void' !== $tokens[$possibleVoidIndex]->getContent();
+
+ $nullableTypeIndex = $tokens->getNextTokenOfKind($functionIndex, [[CT::T_NULLABLE_TYPE]]);
+ $isNullableReturnType = null !== $nullableTypeIndex && $nullableTypeIndex < $openingCurlyBraceIndex;
+
+ return $isStrictReturnType || $isNullableReturnType;
+ }
+
+ /**
+ * Should we clear the specific token?
+ *
+ * If the token is a comment, or is whitespace that is immediately before a
+ * comment, then we'll leave it alone.
+ */
+ private function shouldClearToken(Tokens $tokens, int $index): bool
+ {
+ $token = $tokens[$index];
+
+ return !$token->isComment() && !($token->isWhitespace() && $tokens[$index + 1]->isComment());
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php
new file mode 100644
index 0000000..a7b3d47
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/MultilineWhitespaceBeforeSemicolonsFixer.php
@@ -0,0 +1,295 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Semicolon;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Egidijus Girčys <e.gircys@gmail.com>
+ */
+final class MultilineWhitespaceBeforeSemicolonsFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @internal
+ */
+ public const STRATEGY_NO_MULTI_LINE = 'no_multi_line';
+
+ /**
+ * @internal
+ */
+ public const STRATEGY_NEW_LINE_FOR_CHAINED_CALLS = 'new_line_for_chained_calls';
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Forbid multi-line whitespace before the closing semicolon or move the semicolon to the new line for chained calls.',
+ [
+ new CodeSample(
+ '<?php
+function foo () {
+ return 1 + 2
+ ;
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+ $this->method1()
+ ->method2()
+ ->method(3);
+ ?>
+',
+ ['strategy' => self::STRATEGY_NEW_LINE_FOR_CHAINED_CALLS]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before SpaceAfterSemicolonFixer.
+ * Must run after CombineConsecutiveIssetsFixer, NoEmptyStatementFixer, SimplifiedIfReturnFixer, SingleImportPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(';');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder(
+ 'strategy',
+ 'Forbid multi-line whitespace or move the semicolon to the new line for chained calls.'
+ ))
+ ->setAllowedValues([self::STRATEGY_NO_MULTI_LINE, self::STRATEGY_NEW_LINE_FOR_CHAINED_CALLS])
+ ->setDefault(self::STRATEGY_NO_MULTI_LINE)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ if (self::STRATEGY_NEW_LINE_FOR_CHAINED_CALLS === $this->configuration['strategy']) {
+ $this->applyChainedCallsFix($tokens);
+
+ return;
+ }
+
+ if (self::STRATEGY_NO_MULTI_LINE === $this->configuration['strategy']) {
+ $this->applyNoMultiLineFix($tokens);
+ }
+ }
+
+ private function applyNoMultiLineFix(Tokens $tokens): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ foreach ($tokens as $index => $token) {
+ if (!$token->equals(';')) {
+ continue;
+ }
+
+ $previousIndex = $index - 1;
+ $previous = $tokens[$previousIndex];
+ if (!$previous->isWhitespace() || !str_contains($previous->getContent(), "\n")) {
+ continue;
+ }
+
+ $content = $previous->getContent();
+ if (str_starts_with($content, $lineEnding) && $tokens[$index - 2]->isComment()) {
+ $tokens->ensureWhitespaceAtIndex($previousIndex, 0, $lineEnding);
+ } else {
+ $tokens->clearAt($previousIndex);
+ }
+ }
+ }
+
+ private function applyChainedCallsFix(Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index >= 0; --$index) {
+ // continue if token is not a semicolon
+ if (!$tokens[$index]->equals(';')) {
+ continue;
+ }
+
+ // get the indent of the chained call, null in case it's not a chained call
+ $indent = $this->findWhitespaceBeforeFirstCall($index - 1, $tokens);
+
+ if (null === $indent) {
+ continue;
+ }
+
+ // unset semicolon
+ $tokens->clearAt($index);
+
+ // find the line ending token index after the semicolon
+ $index = $this->getNewLineIndex($index, $tokens);
+
+ // line ending string of the last method call
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ // appended new line to the last method call
+ $newline = new Token([T_WHITESPACE, $lineEnding.$indent]);
+
+ // insert the new line with indented semicolon
+ $tokens->insertAt($index, [$newline, new Token(';')]);
+ }
+ }
+
+ /**
+ * Find the index for the new line. Return the given index when there's no new line.
+ */
+ private function getNewLineIndex(int $index, Tokens $tokens): int
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ for ($index, $count = \count($tokens); $index < $count; ++$index) {
+ if (false !== strstr($tokens[$index]->getContent(), $lineEnding)) {
+ return $index;
+ }
+ }
+
+ return $index;
+ }
+
+ /**
+ * Checks if the semicolon closes a chained call and returns the whitespace of the first call at $index.
+ * i.e. it will return the whitespace marked with '____' in the example underneath.
+ *
+ * ..
+ * ____$this->methodCall()
+ * ->anotherCall();
+ * ..
+ */
+ private function findWhitespaceBeforeFirstCall(int $index, Tokens $tokens): ?string
+ {
+ // semicolon followed by a closing bracket?
+ if (!$tokens[$index]->equals(')')) {
+ return null;
+ }
+
+ // find opening bracket
+ $openingBrackets = 1;
+ for (--$index; $index > 0; --$index) {
+ if ($tokens[$index]->equals(')')) {
+ ++$openingBrackets;
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals('(')) {
+ if (1 === $openingBrackets) {
+ break;
+ }
+ --$openingBrackets;
+ }
+ }
+
+ // method name
+ if (!$tokens[--$index]->isGivenKind(T_STRING)) {
+ return null;
+ }
+
+ // ->, ?-> or ::
+ if (!$tokens[--$index]->isObjectOperator() && !$tokens[$index]->isGivenKind(T_DOUBLE_COLON)) {
+ return null;
+ }
+
+ // white space
+ if (!$tokens[--$index]->isGivenKind(T_WHITESPACE)) {
+ return null;
+ }
+
+ $closingBrackets = 0;
+ for ($index; $index >= 0; --$index) {
+ if ($tokens[$index]->equals(')')) {
+ ++$closingBrackets;
+ }
+
+ if ($tokens[$index]->equals('(')) {
+ --$closingBrackets;
+ }
+
+ // must be the variable of the first call in the chain
+ if ($tokens[$index]->isGivenKind([T_VARIABLE, T_RETURN, T_STRING]) && 0 === $closingBrackets) {
+ if ($tokens[--$index]->isGivenKind(T_WHITESPACE)
+ || $tokens[$index]->isGivenKind(T_OPEN_TAG)) {
+ return $this->getIndentAt($tokens, $index);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private function getIndentAt(Tokens $tokens, int $index): ?string
+ {
+ $content = '';
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ // find line ending token
+ for ($index; $index > 0; --$index) {
+ if (false !== strstr($tokens[$index]->getContent(), $lineEnding)) {
+ break;
+ }
+ }
+
+ if ($tokens[$index]->isWhitespace()) {
+ $content = $tokens[$index]->getContent();
+ --$index;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_OPEN_TAG)) {
+ $content = $tokens[$index]->getContent().$content;
+ }
+
+ if (1 === Preg::match('/\R{1}(\h*)$/', $content, $matches)) {
+ return $matches[1];
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoEmptyStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoEmptyStatementFixer.php
new file mode 100644
index 0000000..bbd423e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoEmptyStatementFixer.php
@@ -0,0 +1,195 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Semicolon;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoEmptyStatementFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove useless (semicolon) statements.',
+ [
+ new CodeSample("<?php \$a = 1;;\n"),
+ new CodeSample("<?php echo 1;2;\n"),
+ new CodeSample("<?php while(foo()){\n continue 1;\n}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer, CombineConsecutiveUnsetsFixer, EmptyLoopBodyFixer, MultilineWhitespaceBeforeSemicolonsFixer, NoExtraBlankLinesFixer, NoSinglelineWhitespaceBeforeSemicolonsFixer, NoTrailingWhitespaceFixer, NoUselessElseFixer, NoUselessReturnFixer, NoWhitespaceInBlankLineFixer, ReturnAssignmentFixer, SpaceAfterSemicolonFixer, SwitchCaseSemicolonToColonFixer.
+ * Must run after NoUselessSprintfFixer.
+ */
+ public function getPriority(): int
+ {
+ return 40;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(';');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = 0, $count = $tokens->count(); $index < $count; ++$index) {
+ if ($tokens[$index]->isGivenKind([T_BREAK, T_CONTINUE])) {
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$index]->equals([T_LNUMBER, '1'])) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+
+ continue;
+ }
+
+ // skip T_FOR parenthesis to ignore double `;` like `for ($i = 1; ; ++$i) {...}`
+ if ($tokens[$index]->isGivenKind(T_FOR)) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $tokens->getNextMeaningfulToken($index)) + 1;
+
+ continue;
+ }
+
+ if (!$tokens[$index]->equals(';')) {
+ continue;
+ }
+
+ $previousMeaningfulIndex = $tokens->getPrevMeaningfulToken($index);
+
+ // A semicolon can always be removed if it follows a semicolon, '{' or opening tag.
+ if ($tokens[$previousMeaningfulIndex]->equalsAny(['{', ';', [T_OPEN_TAG]])) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ continue;
+ }
+
+ // A semicolon might be removed if it follows a '}' but only if the brace is part of certain structures.
+ if ($tokens[$previousMeaningfulIndex]->equals('}')) {
+ $this->fixSemicolonAfterCurlyBraceClose($tokens, $index, $previousMeaningfulIndex);
+
+ continue;
+ }
+
+ // A semicolon might be removed together with its noop statement, for example "<?php 1;"
+ $prePreviousMeaningfulIndex = $tokens->getPrevMeaningfulToken($previousMeaningfulIndex);
+
+ if (
+ $tokens[$prePreviousMeaningfulIndex]->equalsAny([';', '{', '}', [T_OPEN_TAG]])
+ && $tokens[$previousMeaningfulIndex]->isGivenKind([T_CONSTANT_ENCAPSED_STRING, T_DNUMBER, T_LNUMBER, T_STRING, T_VARIABLE])
+ ) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($previousMeaningfulIndex);
+ }
+ }
+ }
+
+ /**
+ * Fix semicolon after closing curly brace if needed.
+ *
+ * Test for the following cases
+ * - just '{' '}' block (following open tag or ';')
+ * - if, else, elseif
+ * - interface, trait, class (but not anonymous)
+ * - catch, finally (but not try)
+ * - for, foreach, while (but not 'do - while')
+ * - switch
+ * - function (declaration, but not lambda)
+ * - declare (with '{' '}')
+ * - namespace (with '{' '}')
+ *
+ * @param int $index Semicolon index
+ */
+ private function fixSemicolonAfterCurlyBraceClose(Tokens $tokens, int $index, int $curlyCloseIndex): void
+ {
+ static $beforeCurlyOpeningKinds = null;
+
+ if (null === $beforeCurlyOpeningKinds) {
+ $beforeCurlyOpeningKinds = [T_ELSE, T_FINALLY, T_NAMESPACE, T_OPEN_TAG];
+ }
+
+ $curlyOpeningIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $curlyCloseIndex);
+ $beforeCurlyOpeningIndex = $tokens->getPrevMeaningfulToken($curlyOpeningIndex);
+
+ if ($tokens[$beforeCurlyOpeningIndex]->isGivenKind($beforeCurlyOpeningKinds) || $tokens[$beforeCurlyOpeningIndex]->equalsAny([';', '{', '}'])) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ return;
+ }
+
+ // check for namespaces and class, interface and trait definitions
+ if ($tokens[$beforeCurlyOpeningIndex]->isGivenKind(T_STRING)) {
+ $classyTestIndex = $tokens->getPrevMeaningfulToken($beforeCurlyOpeningIndex);
+
+ while ($tokens[$classyTestIndex]->equals(',') || $tokens[$classyTestIndex]->isGivenKind([T_STRING, T_NS_SEPARATOR, T_EXTENDS, T_IMPLEMENTS])) {
+ $classyTestIndex = $tokens->getPrevMeaningfulToken($classyTestIndex);
+ }
+
+ $tokensAnalyzer = new TokensAnalyzer($tokens);
+
+ if (
+ $tokens[$classyTestIndex]->isGivenKind(T_NAMESPACE)
+ || ($tokens[$classyTestIndex]->isClassy() && !$tokensAnalyzer->isAnonymousClass($classyTestIndex))
+ ) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+ }
+
+ return;
+ }
+
+ // early return check, below only control structures with conditions are fixed
+ if (!$tokens[$beforeCurlyOpeningIndex]->equals(')')) {
+ return;
+ }
+
+ $openingBraceIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $beforeCurlyOpeningIndex);
+ $beforeOpeningBraceIndex = $tokens->getPrevMeaningfulToken($openingBraceIndex);
+
+ if ($tokens[$beforeOpeningBraceIndex]->isGivenKind([T_IF, T_ELSEIF, T_FOR, T_FOREACH, T_WHILE, T_SWITCH, T_CATCH, T_DECLARE])) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index);
+
+ return;
+ }
+
+ // check for function definition
+ if ($tokens[$beforeOpeningBraceIndex]->isGivenKind(T_STRING)) {
+ $beforeStringIndex = $tokens->getPrevMeaningfulToken($beforeOpeningBraceIndex);
+
+ if ($tokens[$beforeStringIndex]->isGivenKind(T_FUNCTION)) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($index); // implicit return
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoSinglelineWhitespaceBeforeSemicolonsFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoSinglelineWhitespaceBeforeSemicolonsFixer.php
new file mode 100644
index 0000000..c4030cf
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/NoSinglelineWhitespaceBeforeSemicolonsFixer.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Semicolon;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ */
+final class NoSinglelineWhitespaceBeforeSemicolonsFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Single-line whitespace before closing semicolon are prohibited.',
+ [new CodeSample("<?php \$this->foo() ;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after CombineConsecutiveIssetsFixer, FunctionToConstantFixer, NoEmptyStatementFixer, SimplifiedIfReturnFixer, SingleImportPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(';');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->equals(';') || !$tokens[$index - 1]->isWhitespace(" \t")) {
+ continue;
+ }
+
+ if ($tokens[$index - 2]->equals(';')) {
+ // do not remove all whitespace before the semicolon because it is also whitespace after another semicolon
+ if (!$tokens[$index - 1]->equals(' ')) {
+ $tokens[$index - 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ } elseif (!$tokens[$index - 2]->isComment()) {
+ $tokens->clearAt($index - 1);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SemicolonAfterInstructionFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SemicolonAfterInstructionFixer.php
new file mode 100644
index 0000000..c9a9131
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SemicolonAfterInstructionFixer.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Semicolon;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class SemicolonAfterInstructionFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Instructions must be terminated with a semicolon.',
+ [new CodeSample("<?php echo 1 ?>\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before SimplifiedIfReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_CLOSE_TAG);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index > 1; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_CLOSE_TAG)) {
+ continue;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$prev]->equalsAny([';', '{', '}', ':', [T_OPEN_TAG]])) {
+ continue;
+ }
+
+ $tokens->insertAt($prev + 1, new Token(';'));
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SpaceAfterSemicolonFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SpaceAfterSemicolonFixer.php
new file mode 100644
index 0000000..799ee5a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Semicolon/SpaceAfterSemicolonFixer.php
@@ -0,0 +1,146 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Semicolon;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class SpaceAfterSemicolonFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Fix whitespace after a semicolon.',
+ [
+ new CodeSample(
+ "<?php
+ sample(); \$test = 1;
+ sample();\$test = 2;
+ for ( ;;++\$sample) {
+ }\n"
+ ),
+ new CodeSample("<?php\nfor (\$i = 0; ; ++\$i) {\n}\n", [
+ 'remove_in_empty_for_expressions' => true,
+ ]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after CombineConsecutiveUnsetsFixer, MultilineWhitespaceBeforeSemicolonsFixer, NoEmptyStatementFixer, OrderedClassElementsFixer, SingleImportPerStatementFixer, SingleTraitInsertPerStatementFixer.
+ */
+ public function getPriority(): int
+ {
+ return -1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(';');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('remove_in_empty_for_expressions', 'Whether spaces should be removed for empty `for` expressions.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $insideForParenthesesUntil = null;
+
+ for ($index = 0, $max = \count($tokens) - 1; $index < $max; ++$index) {
+ if (true === $this->configuration['remove_in_empty_for_expressions']) {
+ if ($tokens[$index]->isGivenKind(T_FOR)) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ $insideForParenthesesUntil = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ continue;
+ }
+
+ if ($index === $insideForParenthesesUntil) {
+ $insideForParenthesesUntil = null;
+
+ continue;
+ }
+ }
+
+ if (!$tokens[$index]->equals(';')) {
+ continue;
+ }
+
+ if (!$tokens[$index + 1]->isWhitespace()) {
+ if (
+ !$tokens[$index + 1]->equalsAny([')', [T_INLINE_HTML]]) && (
+ false === $this->configuration['remove_in_empty_for_expressions']
+ || !$tokens[$index + 1]->equals(';')
+ )
+ ) {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, ' ']));
+ ++$max;
+ }
+
+ continue;
+ }
+
+ if (
+ null !== $insideForParenthesesUntil
+ && ($tokens[$index + 2]->equals(';') || $index + 2 === $insideForParenthesesUntil)
+ && !Preg::match('/\R/', $tokens[$index + 1]->getContent())
+ ) {
+ $tokens->clearAt($index + 1);
+
+ continue;
+ }
+
+ if (
+ isset($tokens[$index + 2])
+ && !$tokens[$index + 1]->equals([T_WHITESPACE, ' '])
+ && $tokens[$index + 1]->isWhitespace(" \t")
+ && !$tokens[$index + 2]->isComment()
+ && !$tokens[$index + 2]->equals(')')
+ ) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, ' ']);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php
new file mode 100644
index 0000000..76e26b4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php
@@ -0,0 +1,152 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Strict;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+final class DeclareStrictTypesFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Force strict types declaration in all files. Requires PHP >= 7.0.',
+ [
+ new CodeSample(
+ "<?php\n"
+ ),
+ ],
+ null,
+ 'Forcing strict types will stop non strict code from working.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BlankLineAfterOpeningTagFixer, DeclareEqualNormalizeFixer, HeaderCommentFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return isset($tokens[0]) && $tokens[0]->isGivenKind(T_OPEN_TAG);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // check if the declaration is already done
+ $searchIndex = $tokens->getNextMeaningfulToken(0);
+ if (null === $searchIndex) {
+ $this->insertSequence($tokens); // declaration not found, insert one
+
+ return;
+ }
+
+ $sequenceLocation = $tokens->findSequence([[T_DECLARE, 'declare'], '(', [T_STRING, 'strict_types'], '=', [T_LNUMBER], ')'], $searchIndex, null, false);
+ if (null === $sequenceLocation) {
+ $this->insertSequence($tokens); // declaration not found, insert one
+
+ return;
+ }
+
+ $this->fixStrictTypesCasingAndValue($tokens, $sequenceLocation);
+ }
+
+ /**
+ * @param array<int, Token> $sequence
+ */
+ private function fixStrictTypesCasingAndValue(Tokens $tokens, array $sequence): void
+ {
+ /** @var int $index */
+ /** @var Token $token */
+ foreach ($sequence as $index => $token) {
+ if ($token->isGivenKind(T_STRING)) {
+ $tokens[$index] = new Token([T_STRING, strtolower($token->getContent())]);
+
+ continue;
+ }
+ if ($token->isGivenKind(T_LNUMBER)) {
+ $tokens[$index] = new Token([T_LNUMBER, '1']);
+
+ break;
+ }
+ }
+ }
+
+ private function insertSequence(Tokens $tokens): void
+ {
+ $sequence = [
+ new Token([T_DECLARE, 'declare']),
+ new Token('('),
+ new Token([T_STRING, 'strict_types']),
+ new Token('='),
+ new Token([T_LNUMBER, '1']),
+ new Token(')'),
+ new Token(';'),
+ ];
+ $endIndex = \count($sequence);
+
+ $tokens->insertAt(1, $sequence);
+
+ // start index of the sequence is always 1 here, 0 is always open tag
+ // transform "<?php\n" to "<?php " if needed
+ if (str_contains($tokens[0]->getContent(), "\n")) {
+ $tokens[0] = new Token([$tokens[0]->getId(), trim($tokens[0]->getContent()).' ']);
+ }
+
+ if ($endIndex === \count($tokens) - 1) {
+ return; // no more tokens after sequence, single_blank_line_at_eof might add a line
+ }
+
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+ if (!$tokens[1 + $endIndex]->isWhitespace()) {
+ $tokens->insertAt(1 + $endIndex, new Token([T_WHITESPACE, $lineEnding]));
+
+ return;
+ }
+
+ $content = $tokens[1 + $endIndex]->getContent();
+ $tokens[1 + $endIndex] = new Token([T_WHITESPACE, $lineEnding.ltrim($content, " \t")]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictComparisonFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictComparisonFixer.php
new file mode 100644
index 0000000..b03ff31
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictComparisonFixer.php
@@ -0,0 +1,89 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Strict;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class StrictComparisonFixer extends AbstractFixer
+{
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Comparisons should be strict.',
+ [new CodeSample("<?php\n\$a = 1== \$b;\n")],
+ null,
+ 'Changing comparisons to strict might change code behavior.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BinaryOperatorSpacesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_IS_EQUAL, T_IS_NOT_EQUAL]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $map = [
+ T_IS_EQUAL => [
+ 'id' => T_IS_IDENTICAL,
+ 'content' => '===',
+ ],
+ T_IS_NOT_EQUAL => [
+ 'id' => T_IS_NOT_IDENTICAL,
+ 'content' => '!==',
+ ],
+ ];
+
+ foreach ($tokens as $index => $token) {
+ $tokenId = $token->getId();
+
+ if (isset($map[$tokenId])) {
+ $tokens[$index] = new Token([$map[$tokenId]['id'], $map[$tokenId]['content']]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictParamFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictParamFixer.php
new file mode 100644
index 0000000..dbe9332
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/StrictParamFixer.php
@@ -0,0 +1,177 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Strict;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\FunctionsAnalyzer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class StrictParamFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Functions should be used with `$strict` param set to `true`.',
+ [new CodeSample("<?php\n\$a = array_keys(\$b);\n\$a = array_search(\$b, \$c);\n\$a = base64_decode(\$b);\n\$a = in_array(\$b, \$c);\n\$a = mb_detect_encoding(\$b, \$c);\n")],
+ 'The functions "array_keys", "array_search", "base64_decode", "in_array" and "mb_detect_encoding" should be used with $strict param.',
+ 'Risky when the fixed function is overridden or if the code relies on non-strict usage.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NativeFunctionInvocationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 11;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $functionsAnalyzer = new FunctionsAnalyzer();
+
+ static $map = null;
+
+ if (null === $map) {
+ $trueToken = new Token([T_STRING, 'true']);
+
+ $map = [
+ 'array_keys' => [null, null, $trueToken],
+ 'array_search' => [null, null, $trueToken],
+ 'base64_decode' => [null, $trueToken],
+ 'in_array' => [null, null, $trueToken],
+ 'mb_detect_encoding' => [null, [new Token([T_STRING, 'mb_detect_order']), new Token('('), new Token(')')], $trueToken],
+ ];
+ }
+
+ for ($index = $tokens->count() - 1; 0 <= $index; --$index) {
+ $token = $tokens[$index];
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ if (null !== $nextIndex && !$tokens[$nextIndex]->equals('(')) {
+ continue;
+ }
+
+ $lowercaseContent = strtolower($token->getContent());
+ if (isset($map[$lowercaseContent]) && $functionsAnalyzer->isGlobalFunctionCall($tokens, $index)) {
+ $this->fixFunction($tokens, $index, $map[$lowercaseContent]);
+ }
+ }
+ }
+
+ private function fixFunction(Tokens $tokens, int $functionIndex, array $functionParams): void
+ {
+ $startBraceIndex = $tokens->getNextTokenOfKind($functionIndex, ['(']);
+ $endBraceIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $startBraceIndex);
+ $paramsQuantity = 0;
+ $expectParam = true;
+
+ for ($index = $startBraceIndex + 1; $index < $endBraceIndex; ++$index) {
+ $token = $tokens[$index];
+
+ if ($expectParam && !$token->isWhitespace() && !$token->isComment()) {
+ ++$paramsQuantity;
+ $expectParam = false;
+ }
+
+ if ($token->equals('(')) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE, $index);
+
+ continue;
+ }
+
+ if ($token->equals(',')) {
+ $expectParam = true;
+
+ continue;
+ }
+ }
+
+ $functionParamsQuantity = \count($functionParams);
+
+ if ($paramsQuantity === $functionParamsQuantity) {
+ return;
+ }
+
+ $tokensToInsert = [];
+
+ for ($i = $paramsQuantity; $i < $functionParamsQuantity; ++$i) {
+ // function call do not have all params that are required to set useStrict flag, exit from method!
+ if (!$functionParams[$i]) {
+ return;
+ }
+
+ $tokensToInsert[] = new Token(',');
+ $tokensToInsert[] = new Token([T_WHITESPACE, ' ']);
+
+ if (!\is_array($functionParams[$i])) {
+ $tokensToInsert[] = clone $functionParams[$i];
+
+ continue;
+ }
+
+ foreach ($functionParams[$i] as $param) {
+ $tokensToInsert[] = clone $param;
+ }
+ }
+
+ $beforeEndBraceIndex = $tokens->getPrevMeaningfulToken($endBraceIndex);
+
+ if ($tokens[$beforeEndBraceIndex]->equals(',')) {
+ array_shift($tokensToInsert);
+ $tokensToInsert[] = new Token(',');
+ }
+
+ $tokens->insertAt($beforeEndBraceIndex + 1, $tokensToInsert);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php
new file mode 100644
index 0000000..d05e513
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/EscapeImplicitBackslashesFixer.php
@@ -0,0 +1,171 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class EscapeImplicitBackslashesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $codeSample = <<<'EOF'
+<?php
+
+$singleQuoted = 'String with \" and My\Prefix\\';
+
+$doubleQuoted = "Interpret my \n but not my \a";
+
+$hereDoc = <<<HEREDOC
+Interpret my \100 but not my \999
+HEREDOC;
+
+EOF;
+
+ return new FixerDefinition(
+ 'Escape implicit backslashes in strings and heredocs to ease the understanding of which are special chars interpreted by PHP and which not.',
+ [
+ new CodeSample($codeSample),
+ new CodeSample(
+ $codeSample,
+ ['single_quoted' => true]
+ ),
+ new CodeSample(
+ $codeSample,
+ ['double_quoted' => false]
+ ),
+ new CodeSample(
+ $codeSample,
+ ['heredoc_syntax' => false]
+ ),
+ ],
+ 'In PHP double-quoted strings and heredocs some chars like `n`, `$` or `u` have special meanings if preceded by a backslash '
+ .'(and some are special only if followed by other special chars), while a backslash preceding other chars are interpreted like a plain '
+ .'backslash. The precise list of those special chars is hard to remember and to identify quickly: this fixer escapes backslashes '
+ ."that do not start a special interpretation with the char after them.\n"
+ .'It is possible to fix also single-quoted strings: in this case there is no special chars apart from single-quote and backslash '
+ .'itself, so the fixer simply ensure that all backslashes are escaped. Both single and double backslashes are allowed in single-quoted '
+ .'strings, so the purpose in this context is mainly to have a uniformed way to have them written all over the codebase.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ENCAPSED_AND_WHITESPACE, T_CONSTANT_ENCAPSED_STRING]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before HeredocToNowdocFixer, SingleQuoteFixer.
+ * Must run after BacktickToShellExecFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $singleQuotedRegex = '/(?<!\\\\)\\\\((?:\\\\\\\\)*)(?![\\\'\\\\])/';
+ static $doubleQuotedRegex = '/(?<!\\\\)\\\\((?:\\\\\\\\)*)(?![efnrtv$"\\\\0-7]|x[0-9A-Fa-f]|u{)/';
+ static $heredocSyntaxRegex = '/(?<!\\\\)\\\\((?:\\\\\\\\)*)(?![efnrtv$\\\\0-7]|x[0-9A-Fa-f]|u{)/';
+
+ $doubleQuoteOpened = false;
+ foreach ($tokens as $index => $token) {
+ $content = $token->getContent();
+ if ($token->equalsAny(['"', 'b"', 'B"'])) {
+ $doubleQuoteOpened = !$doubleQuoteOpened;
+ }
+ if (!$token->isGivenKind([T_ENCAPSED_AND_WHITESPACE, T_CONSTANT_ENCAPSED_STRING]) || !str_contains($content, '\\')) {
+ continue;
+ }
+
+ // Nowdoc syntax
+ if ($token->isGivenKind(T_ENCAPSED_AND_WHITESPACE) && '\'' === substr(rtrim($tokens[$index - 1]->getContent()), -1)) {
+ continue;
+ }
+
+ $firstTwoCharacters = strtolower(substr($content, 0, 2));
+ $isSingleQuotedString = $token->isGivenKind(T_CONSTANT_ENCAPSED_STRING) && ('\'' === $content[0] || 'b\'' === $firstTwoCharacters);
+ $isDoubleQuotedString =
+ ($token->isGivenKind(T_CONSTANT_ENCAPSED_STRING) && ('"' === $content[0] || 'b"' === $firstTwoCharacters))
+ || ($token->isGivenKind(T_ENCAPSED_AND_WHITESPACE) && $doubleQuoteOpened)
+ ;
+ $isHeredocSyntax = !$isSingleQuotedString && !$isDoubleQuotedString;
+ if (
+ (false === $this->configuration['single_quoted'] && $isSingleQuotedString)
+ || (false === $this->configuration['double_quoted'] && $isDoubleQuotedString)
+ || (false === $this->configuration['heredoc_syntax'] && $isHeredocSyntax)
+ ) {
+ continue;
+ }
+
+ $regex = $heredocSyntaxRegex;
+ if ($isSingleQuotedString) {
+ $regex = $singleQuotedRegex;
+ } elseif ($isDoubleQuotedString) {
+ $regex = $doubleQuotedRegex;
+ }
+
+ $newContent = Preg::replace($regex, '\\\\\\\\$1', $content);
+ if ($newContent !== $content) {
+ $tokens[$index] = new Token([$token->getId(), $newContent]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('single_quoted', 'Whether to fix single-quoted strings.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ (new FixerOptionBuilder('double_quoted', 'Whether to fix double-quoted strings.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ (new FixerOptionBuilder('heredoc_syntax', 'Whether to fix heredoc syntax.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(true)
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/ExplicitStringVariableFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/ExplicitStringVariableFixer.php
new file mode 100644
index 0000000..2c74756
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/ExplicitStringVariableFixer.php
@@ -0,0 +1,173 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Filippo Tessarotto <zoeslam@gmail.com>
+ */
+final class ExplicitStringVariableFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts implicit variables into explicit ones in double-quoted strings or heredoc syntax.',
+ [new CodeSample(
+ <<<'EOT'
+<?php
+$a = "My name is $name !";
+$b = "I live in $state->country !";
+$c = "I have $farm[0] chickens !";
+
+EOT
+ )],
+ 'The reasoning behind this rule is the following:'
+ ."\n".'- When there are two valid ways of doing the same thing, using both is confusing, there should be a coding standard to follow'
+ ."\n".'- PHP manual marks `"$var"` syntax as implicit and `"${var}"` syntax as explicit: explicit code should always be preferred'
+ ."\n".'- Explicit syntax allows word concatenation inside strings, e.g. `"${var}IsAVar"`, implicit doesn\'t'
+ ."\n".'- Explicit syntax is easier to detect for IDE/editors and therefore has colors/highlight with higher contrast, which is easier to read'
+ ."\n".'Backtick operator is skipped because it is harder to handle; you can use `backtick_to_shell_exec` fixer to normalize backticks to strings'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before SimpleToComplexStringVariableFixer.
+ * Must run after BacktickToShellExecFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_VARIABLE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $backtickStarted = false;
+ for ($index = \count($tokens) - 1; $index > 0; --$index) {
+ $token = $tokens[$index];
+ if ($token->equals('`')) {
+ $backtickStarted = !$backtickStarted;
+
+ continue;
+ }
+
+ if ($backtickStarted || !$token->isGivenKind(T_VARIABLE)) {
+ continue;
+ }
+
+ $prevToken = $tokens[$index - 1];
+ if (!$this->isStringPartToken($prevToken)) {
+ continue;
+ }
+
+ $distinctVariableIndex = $index;
+ $variableTokens = [
+ $distinctVariableIndex => [
+ 'tokens' => [$index => $token],
+ 'firstVariableTokenIndex' => $index,
+ 'lastVariableTokenIndex' => $index,
+ ],
+ ];
+
+ $nextIndex = $index + 1;
+ $squareBracketCount = 0;
+ while (!$this->isStringPartToken($tokens[$nextIndex])) {
+ if ($tokens[$nextIndex]->isGivenKind(T_CURLY_OPEN)) {
+ $nextIndex = $tokens->getNextTokenOfKind($nextIndex, [[CT::T_CURLY_CLOSE]]);
+ } elseif ($tokens[$nextIndex]->isGivenKind(T_VARIABLE) && 1 !== $squareBracketCount) {
+ $distinctVariableIndex = $nextIndex;
+ $variableTokens[$distinctVariableIndex] = [
+ 'tokens' => [$nextIndex => $tokens[$nextIndex]],
+ 'firstVariableTokenIndex' => $nextIndex,
+ 'lastVariableTokenIndex' => $nextIndex,
+ ];
+ } else {
+ $variableTokens[$distinctVariableIndex]['tokens'][$nextIndex] = $tokens[$nextIndex];
+ $variableTokens[$distinctVariableIndex]['lastVariableTokenIndex'] = $nextIndex;
+
+ if ($tokens[$nextIndex]->equalsAny(['[', ']'])) {
+ ++$squareBracketCount;
+ }
+ }
+
+ ++$nextIndex;
+ }
+ krsort($variableTokens, SORT_NUMERIC);
+
+ foreach ($variableTokens as $distinctVariableSet) {
+ if (1 === \count($distinctVariableSet['tokens'])) {
+ $singleVariableIndex = key($distinctVariableSet['tokens']);
+ $singleVariableToken = current($distinctVariableSet['tokens']);
+ $tokens->overrideRange($singleVariableIndex, $singleVariableIndex, [
+ new Token([T_DOLLAR_OPEN_CURLY_BRACES, '${']),
+ new Token([T_STRING_VARNAME, substr($singleVariableToken->getContent(), 1)]),
+ new Token([CT::T_DOLLAR_CLOSE_CURLY_BRACES, '}']),
+ ]);
+ } else {
+ foreach ($distinctVariableSet['tokens'] as $variablePartIndex => $variablePartToken) {
+ if ($variablePartToken->isGivenKind(T_NUM_STRING)) {
+ $tokens[$variablePartIndex] = new Token([T_LNUMBER, $variablePartToken->getContent()]);
+
+ continue;
+ }
+
+ if ($variablePartToken->isGivenKind(T_STRING) && $tokens[$variablePartIndex + 1]->equals(']')) {
+ $tokens[$variablePartIndex] = new Token([T_CONSTANT_ENCAPSED_STRING, "'".$variablePartToken->getContent()."'"]);
+ }
+ }
+
+ $tokens->insertAt($distinctVariableSet['lastVariableTokenIndex'] + 1, new Token([CT::T_CURLY_CLOSE, '}']));
+ $tokens->insertAt($distinctVariableSet['firstVariableTokenIndex'], new Token([T_CURLY_OPEN, '{']));
+ }
+ }
+ }
+ }
+
+ /**
+ * Check if token is a part of a string.
+ *
+ * @param Token $token The token to check
+ */
+ private function isStringPartToken(Token $token): bool
+ {
+ return $token->isGivenKind(T_ENCAPSED_AND_WHITESPACE)
+ || $token->isGivenKind(T_START_HEREDOC)
+ || '"' === $token->getContent()
+ || 'b"' === strtolower($token->getContent())
+ ;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/HeredocToNowdocFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/HeredocToNowdocFixer.php
new file mode 100644
index 0000000..185cc8b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/HeredocToNowdocFixer.php
@@ -0,0 +1,116 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class HeredocToNowdocFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Convert `heredoc` to `nowdoc` where possible.',
+ [
+ new CodeSample(
+ <<<'EOF'
+<?php $a = <<<"TEST"
+Foo
+TEST;
+
+EOF
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after EscapeImplicitBackslashesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_START_HEREDOC);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_START_HEREDOC) || str_contains($token->getContent(), "'")) {
+ continue;
+ }
+
+ if ($tokens[$index + 1]->isGivenKind(T_END_HEREDOC)) {
+ $tokens[$index] = $this->convertToNowdoc($token);
+
+ continue;
+ }
+
+ if (
+ !$tokens[$index + 1]->isGivenKind(T_ENCAPSED_AND_WHITESPACE)
+ || !$tokens[$index + 2]->isGivenKind(T_END_HEREDOC)
+ ) {
+ continue;
+ }
+
+ $content = $tokens[$index + 1]->getContent();
+ // regex: odd number of backslashes, not followed by dollar
+ if (Preg::match('/(?<!\\\\)(?:\\\\{2})*\\\\(?![$\\\\])/', $content)) {
+ continue;
+ }
+
+ $tokens[$index] = $this->convertToNowdoc($token);
+ $content = str_replace(['\\\\', '\\$'], ['\\', '$'], $content);
+ $tokens[$index + 1] = new Token([
+ $tokens[$index + 1]->getId(),
+ $content,
+ ]);
+ }
+ }
+
+ /**
+ * Transforms the heredoc start token to nowdoc notation.
+ */
+ private function convertToNowdoc(Token $token): Token
+ {
+ return new Token([
+ $token->getId(),
+ Preg::replace('/^([Bb]?<<<)(\h*)"?([^\s"]+)"?/', '$1$2\'$3\'', $token->getContent()),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoBinaryStringFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoBinaryStringFixer.php
new file mode 100644
index 0000000..c2b05c5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoBinaryStringFixer.php
@@ -0,0 +1,68 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author ntzm
+ */
+final class NoBinaryStringFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_CONSTANT_ENCAPSED_STRING, T_START_HEREDOC]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There should not be a binary flag before strings.',
+ [
+ new CodeSample("<?php \$a = b'foo';\n"),
+ new CodeSample("<?php \$a = b<<<EOT\nfoo\nEOT;\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind([T_CONSTANT_ENCAPSED_STRING, T_START_HEREDOC])) {
+ continue;
+ }
+
+ $content = $token->getContent();
+
+ if ('b' === strtolower($content[0])) {
+ $tokens[$index] = new Token([$token->getId(), substr($content, 1)]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php
new file mode 100644
index 0000000..8ba97ff
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php
@@ -0,0 +1,112 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan
+ */
+final class NoTrailingWhitespaceInStringFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE, T_INLINE_HTML]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There must be no trailing whitespace in strings.',
+ [
+ new CodeSample(
+ "<?php \$a = ' \n foo \n';\n"
+ ),
+ ],
+ null,
+ 'Changing the whitespaces in strings might affect string comparisons and outputs.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1, $last = true; $index >= 0; --$index, $last = false) {
+ /** @var Token $token */
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind([T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE, T_INLINE_HTML])) {
+ continue;
+ }
+
+ $isInlineHtml = $token->isGivenKind(T_INLINE_HTML);
+ $regex = $isInlineHtml && $last ? '/\h+(?=\R|$)/' : '/\h+(?=\R)/';
+ $content = Preg::replace($regex, '', $token->getContent());
+
+ if ($token->getContent() === $content) {
+ continue;
+ }
+
+ if (!$isInlineHtml || 0 === $index) {
+ $this->updateContent($tokens, $index, $content);
+
+ continue;
+ }
+
+ $prev = $index - 1;
+
+ if ($tokens[$prev]->equals([T_CLOSE_TAG, '?>']) && Preg::match('/^\R/', $content, $match)) {
+ $tokens[$prev] = new Token([T_CLOSE_TAG, $tokens[$prev]->getContent().$match[0]]);
+ $content = substr($content, \strlen($match[0]));
+ $content = false === $content ? '' : $content; // @phpstan-ignore-line due to https://github.com/phpstan/phpstan/issues/1215 , awaiting PHP8 as min requirement of Fixer
+ }
+
+ $this->updateContent($tokens, $index, $content);
+ }
+ }
+
+ private function updateContent(Tokens $tokens, int $index, string $content): void
+ {
+ if ('' === $content) {
+ $tokens->clearAt($index);
+
+ return;
+ }
+
+ $tokens[$index] = new Token([$tokens[$index]->getId(), $content]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SimpleToComplexStringVariableFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SimpleToComplexStringVariableFixer.php
new file mode 100644
index 0000000..53ccaba
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SimpleToComplexStringVariableFixer.php
@@ -0,0 +1,116 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dave van der Brugge <dmvdbrugge@gmail.com>
+ */
+final class SimpleToComplexStringVariableFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Converts explicit variables in double-quoted strings and heredoc syntax from simple to complex format (`${` to `{$`).',
+ [
+ new CodeSample(
+ <<<'EOT'
+<?php
+$name = 'World';
+echo "Hello ${name}!";
+
+EOT
+ ),
+ new CodeSample(
+ <<<'EOT'
+<?php
+$name = 'World';
+echo <<<TEST
+Hello ${name}!
+TEST;
+
+EOT
+ ),
+ ],
+ "Doesn't touch implicit variables. Works together nicely with `explicit_string_variable`."
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after ExplicitStringVariableFixer.
+ */
+ public function getPriority(): int
+ {
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_DOLLAR_OPEN_CURLY_BRACES);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 3; $index > 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_DOLLAR_OPEN_CURLY_BRACES)) {
+ continue;
+ }
+
+ $varnameToken = $tokens[$index + 1];
+
+ if (!$varnameToken->isGivenKind(T_STRING_VARNAME)) {
+ continue;
+ }
+
+ $dollarCloseToken = $tokens[$index + 2];
+
+ if (!$dollarCloseToken->isGivenKind(CT::T_DOLLAR_CLOSE_CURLY_BRACES)) {
+ continue;
+ }
+
+ $tokenOfStringBeforeToken = $tokens[$index - 1];
+ $stringContent = $tokenOfStringBeforeToken->getContent();
+
+ if (str_ends_with($stringContent, '$') && !str_ends_with($stringContent, '\\$')) {
+ $newContent = substr($stringContent, 0, -1).'\\$';
+ $tokenOfStringBeforeToken = new Token([T_ENCAPSED_AND_WHITESPACE, $newContent]);
+ }
+
+ $tokens->overrideRange($index - 1, $index + 2, [
+ $tokenOfStringBeforeToken,
+ new Token([T_CURLY_OPEN, '{']),
+ new Token([T_VARIABLE, '$'.$varnameToken->getContent()]),
+ new Token([CT::T_CURLY_CLOSE, '}']),
+ ]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php
new file mode 100644
index 0000000..b269b41
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php
@@ -0,0 +1,120 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan <gharlan@web.de>
+ */
+final class SingleQuoteFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ $codeSample = <<<'EOF'
+<?php
+
+$a = "sample";
+$b = "sample with 'single-quotes'";
+
+EOF;
+
+ return new FixerDefinition(
+ 'Convert double quotes to single quotes for simple strings.',
+ [
+ new CodeSample($codeSample),
+ new CodeSample(
+ $codeSample,
+ ['strings_containing_single_quote_chars' => true]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after BacktickToShellExecFixer, EscapeImplicitBackslashesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(T_CONSTANT_ENCAPSED_STRING);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->isGivenKind(T_CONSTANT_ENCAPSED_STRING)) {
+ continue;
+ }
+
+ $content = $token->getContent();
+ $prefix = '';
+
+ if ('b' === strtolower($content[0])) {
+ $prefix = $content[0];
+ $content = substr($content, 1);
+ }
+
+ if (
+ '"' === $content[0]
+ && (true === $this->configuration['strings_containing_single_quote_chars'] || !str_contains($content, "'"))
+ // regex: odd number of backslashes, not followed by double quote or dollar
+ && !Preg::match('/(?<!\\\\)(?:\\\\{2})*\\\\(?!["$\\\\])/', $content)
+ ) {
+ $content = substr($content, 1, -1);
+ $content = str_replace(['\\"', '\\$', '\''], ['"', '$', '\\\''], $content);
+ $tokens[$index] = new Token([T_CONSTANT_ENCAPSED_STRING, $prefix.'\''.$content.'\'']);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('strings_containing_single_quote_chars', 'Whether to fix double-quoted strings that contains single-quotes.'))
+ ->setAllowedTypes(['bool'])
+ ->setDefault(false)
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLengthToEmptyFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLengthToEmptyFixer.php
new file mode 100644
index 0000000..35d5603
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLengthToEmptyFixer.php
@@ -0,0 +1,330 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFunctionReferenceFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Analyzer\ArgumentsAnalyzer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class StringLengthToEmptyFixer extends AbstractFunctionReferenceFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'String tests for empty must be done against `\'\'`, not with `strlen`.',
+ [new CodeSample("<?php \$a = 0 === strlen(\$b) || \\STRLEN(\$c) < 1;\n")],
+ null,
+ 'Risky when `strlen` is overridden, when called using a `stringable` object, also no longer triggers warning when called using non-string(able).'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before NoExtraBlankLinesFixer, NoTrailingWhitespaceFixer.
+ * Must run after NoSpacesInsideParenthesisFixer.
+ */
+ public function getPriority(): int
+ {
+ return 1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $argumentsAnalyzer = new ArgumentsAnalyzer();
+
+ foreach ($this->findStrLengthCalls($tokens) as $candidate) {
+ [$functionNameIndex, $openParenthesisIndex, $closeParenthesisIndex] = $candidate;
+ $arguments = $argumentsAnalyzer->getArguments($tokens, $openParenthesisIndex, $closeParenthesisIndex);
+
+ if (1 !== \count($arguments)) {
+ continue; // must be one argument
+ }
+
+ // test for leading `\` before `strlen` call
+
+ $nextIndex = $tokens->getNextMeaningfulToken($closeParenthesisIndex);
+ $previousIndex = $tokens->getPrevMeaningfulToken($functionNameIndex);
+
+ if ($tokens[$previousIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $namespaceSeparatorIndex = $previousIndex;
+ $previousIndex = $tokens->getPrevMeaningfulToken($previousIndex);
+ } else {
+ $namespaceSeparatorIndex = null;
+ }
+
+ // test for yoda vs non-yoda fix case
+
+ if ($this->isOperatorOfInterest($tokens[$previousIndex])) { // test if valid yoda case to fix
+ $operatorIndex = $previousIndex;
+ $operandIndex = $tokens->getPrevMeaningfulToken($previousIndex);
+
+ if (!$this->isOperandOfInterest($tokens[$operandIndex])) { // test if operand is `0` or `1`
+ continue;
+ }
+
+ $replacement = $this->getReplacementYoda($tokens[$operatorIndex], $tokens[$operandIndex]);
+
+ if (null === $replacement) {
+ continue;
+ }
+
+ if ($this->isOfHigherPrecedence($tokens[$nextIndex])) { // is of higher precedence right; continue
+ continue;
+ }
+
+ if ($this->isOfHigherPrecedence($tokens[$tokens->getPrevMeaningfulToken($operandIndex)])) { // is of higher precedence left; continue
+ continue;
+ }
+ } elseif ($this->isOperatorOfInterest($tokens[$nextIndex])) { // test if valid !yoda case to fix
+ $operatorIndex = $nextIndex;
+ $operandIndex = $tokens->getNextMeaningfulToken($nextIndex);
+
+ if (!$this->isOperandOfInterest($tokens[$operandIndex])) { // test if operand is `0` or `1`
+ continue;
+ }
+
+ $replacement = $this->getReplacementNotYoda($tokens[$operatorIndex], $tokens[$operandIndex]);
+
+ if (null === $replacement) {
+ continue;
+ }
+
+ if ($this->isOfHigherPrecedence($tokens[$tokens->getNextMeaningfulToken($operandIndex)])) { // is of higher precedence right; continue
+ continue;
+ }
+
+ if ($this->isOfHigherPrecedence($tokens[$previousIndex])) { // is of higher precedence left; continue
+ continue;
+ }
+ } else {
+ continue;
+ }
+
+ // prepare for fixing
+
+ $keepParentheses = $this->keepParentheses($tokens, $openParenthesisIndex, $closeParenthesisIndex);
+
+ if (T_IS_IDENTICAL === $replacement) {
+ $operandContent = '===';
+ } else { // T_IS_NOT_IDENTICAL === $replacement
+ $operandContent = '!==';
+ }
+
+ // apply fixing
+
+ $tokens[$operandIndex] = new Token([T_CONSTANT_ENCAPSED_STRING, "''"]);
+ $tokens[$operatorIndex] = new Token([$replacement, $operandContent]);
+
+ if (!$keepParentheses) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($closeParenthesisIndex);
+ $tokens->clearTokenAndMergeSurroundingWhitespace($openParenthesisIndex);
+ }
+
+ $tokens->clearTokenAndMergeSurroundingWhitespace($functionNameIndex);
+
+ if (null !== $namespaceSeparatorIndex) {
+ $tokens->clearTokenAndMergeSurroundingWhitespace($namespaceSeparatorIndex);
+ }
+ }
+ }
+
+ private function getReplacementYoda(Token $operator, Token $operand): ?int
+ {
+ /* Yoda 0
+
+ 0 === strlen($b) | '' === $b
+ 0 !== strlen($b) | '' !== $b
+ 0 <= strlen($b) | X makes no sense, assume overridden
+ 0 >= strlen($b) | '' === $b
+ 0 < strlen($b) | '' !== $b
+ 0 > strlen($b) | X makes no sense, assume overridden
+ */
+
+ if ('0' === $operand->getContent()) {
+ if ($operator->isGivenKind([T_IS_IDENTICAL, T_IS_GREATER_OR_EQUAL])) {
+ return T_IS_IDENTICAL;
+ }
+
+ if ($operator->isGivenKind(T_IS_NOT_IDENTICAL) || $operator->equals('<')) {
+ return T_IS_NOT_IDENTICAL;
+ }
+
+ return null;
+ }
+
+ /* Yoda 1
+
+ 1 === strlen($b) | X cannot simplify
+ 1 !== strlen($b) | X cannot simplify
+ 1 <= strlen($b) | '' !== $b
+ 1 >= strlen($b) | cannot simplify
+ 1 < strlen($b) | cannot simplify
+ 1 > strlen($b) | '' === $b
+ */
+
+ if ($operator->isGivenKind(T_IS_SMALLER_OR_EQUAL)) {
+ return T_IS_NOT_IDENTICAL;
+ }
+
+ if ($operator->equals('>')) {
+ return T_IS_IDENTICAL;
+ }
+
+ return null;
+ }
+
+ private function getReplacementNotYoda(Token $operator, Token $operand): ?int
+ {
+ /* Not Yoda 0
+
+ strlen($b) === 0 | $b === ''
+ strlen($b) !== 0 | $b !== ''
+ strlen($b) <= 0 | $b === ''
+ strlen($b) >= 0 | X makes no sense, assume overridden
+ strlen($b) < 0 | X makes no sense, assume overridden
+ strlen($b) > 0 | $b !== ''
+ */
+
+ if ('0' === $operand->getContent()) {
+ if ($operator->isGivenKind([T_IS_IDENTICAL, T_IS_SMALLER_OR_EQUAL])) {
+ return T_IS_IDENTICAL;
+ }
+
+ if ($operator->isGivenKind(T_IS_NOT_IDENTICAL) || $operator->equals('>')) {
+ return T_IS_NOT_IDENTICAL;
+ }
+
+ return null;
+ }
+
+ /* Not Yoda 1
+
+ strlen($b) === 1 | X cannot simplify
+ strlen($b) !== 1 | X cannot simplify
+ strlen($b) <= 1 | X cannot simplify
+ strlen($b) >= 1 | $b !== ''
+ strlen($b) < 1 | $b === ''
+ strlen($b) > 1 | X cannot simplify
+ */
+
+ if ($operator->isGivenKind(T_IS_GREATER_OR_EQUAL)) {
+ return T_IS_NOT_IDENTICAL;
+ }
+
+ if ($operator->equals('<')) {
+ return T_IS_IDENTICAL;
+ }
+
+ return null;
+ }
+
+ private function isOperandOfInterest(Token $token): bool
+ {
+ if (!$token->isGivenKind(T_LNUMBER)) {
+ return false;
+ }
+
+ $content = $token->getContent();
+
+ return '0' === $content || '1' === $content;
+ }
+
+ private function isOperatorOfInterest(Token $token): bool
+ {
+ return
+ ($token->isGivenKind([T_IS_IDENTICAL, T_IS_NOT_IDENTICAL, T_IS_SMALLER_OR_EQUAL, T_IS_GREATER_OR_EQUAL]))
+ || $token->equals('<') || $token->equals('>')
+ ;
+ }
+
+ private function isOfHigherPrecedence(Token $token): bool
+ {
+ static $operatorsPerContent = [
+ '!',
+ '%',
+ '*',
+ '+',
+ '-',
+ '.',
+ '/',
+ '~',
+ '?',
+ ];
+
+ return $token->isGivenKind([T_INSTANCEOF, T_POW, T_SL, T_SR]) || $token->equalsAny($operatorsPerContent);
+ }
+
+ private function keepParentheses(Tokens $tokens, int $openParenthesisIndex, int $closeParenthesisIndex): bool
+ {
+ $i = $tokens->getNextMeaningfulToken($openParenthesisIndex);
+
+ if ($tokens[$i]->isCast()) {
+ $i = $tokens->getNextMeaningfulToken($i);
+ }
+
+ for (; $i < $closeParenthesisIndex; ++$i) {
+ $token = $tokens[$i];
+
+ if ($token->isGivenKind([T_VARIABLE, T_STRING]) || $token->isObjectOperator() || $token->isWhitespace() || $token->isComment()) {
+ continue;
+ }
+
+ /** @var null|array{isStart: bool, type: int} $blockType */
+ $blockType = Tokens::detectBlockType($token);
+
+ if (null !== $blockType && $blockType['isStart']) {
+ $i = $tokens->findBlockEnd($blockType['type'], $i);
+
+ continue;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ private function findStrLengthCalls(Tokens $tokens): \Generator
+ {
+ $candidates = [];
+ $count = \count($tokens);
+
+ for ($i = 0; $i < $count; ++$i) {
+ $candidate = $this->find('strlen', $tokens, $i, $count);
+
+ if (null === $candidate) {
+ break;
+ }
+
+ $i = $candidate[1]; // proceed to openParenthesisIndex
+ $candidates[] = $candidate;
+ }
+
+ foreach (array_reverse($candidates) as $candidate) {
+ yield $candidate;
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLineEndingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLineEndingFixer.php
new file mode 100644
index 0000000..7e50c73
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/StringLineEndingFixer.php
@@ -0,0 +1,88 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\StringNotation;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixes the line endings in multi-line strings.
+ *
+ * @author Ilija Tovilo <ilija.tovilo@me.com>
+ */
+final class StringLineEndingFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE, T_INLINE_HTML]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRisky(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All multi-line strings must use correct line ending.',
+ [
+ new CodeSample(
+ "<?php \$a = 'my\r\nmulti\nline\r\nstring';\r\n"
+ ),
+ ],
+ null,
+ 'Changing the line endings of multi-line strings might affect string comparisons and outputs.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $ending = $this->whitespacesConfig->getLineEnding();
+
+ foreach ($tokens as $tokenIndex => $token) {
+ if (!$token->isGivenKind([T_CONSTANT_ENCAPSED_STRING, T_ENCAPSED_AND_WHITESPACE, T_INLINE_HTML])) {
+ continue;
+ }
+
+ $tokens[$tokenIndex] = new Token([
+ $token->getId(),
+ Preg::replace(
+ '#\R#u',
+ $ending,
+ $token->getContent()
+ ),
+ ]);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php
new file mode 100644
index 0000000..a7504c2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/ArrayIndentationFixer.php
@@ -0,0 +1,272 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class ArrayIndentationFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /** @var int */
+ private $newlineTokenIndexCache;
+
+ /** @var int */
+ private $newlineTokenPositionCache;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Each element of an array must be indented exactly once.',
+ [
+ new CodeSample("<?php\n\$foo = [\n 'bar' => [\n 'baz' => true,\n ],\n];\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before AlignMultilineCommentFixer, BinaryOperatorSpacesFixer.
+ * Must run after BracesFixer, MethodArgumentSpaceFixer, MethodChainingIndentationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 29;
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->returnWithUpdateCache(0, null);
+
+ $scopes = [];
+ $previousLineInitialIndent = '';
+ $previousLineNewIndent = '';
+
+ foreach ($tokens as $index => $token) {
+ $currentScope = [] !== $scopes ? \count($scopes) - 1 : null;
+
+ if ($token->isComment()) {
+ continue;
+ }
+
+ if (
+ $token->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)
+ || ($token->equals('(') && $tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_ARRAY))
+ ) {
+ $endIndex = $tokens->findBlockEnd(
+ $token->equals('(') ? Tokens::BLOCK_TYPE_PARENTHESIS_BRACE : Tokens::BLOCK_TYPE_ARRAY_SQUARE_BRACE,
+ $index
+ );
+
+ $scopes[] = [
+ 'type' => 'array',
+ 'end_index' => $endIndex,
+ 'initial_indent' => $this->getLineIndentation($tokens, $index),
+ ];
+
+ continue;
+ }
+
+ if (null === $currentScope) {
+ continue;
+ }
+
+ if ($token->isWhitespace()) {
+ if (!Preg::match('/\R/', $token->getContent())) {
+ continue;
+ }
+
+ if ('array' === $scopes[$currentScope]['type']) {
+ $indent = false;
+
+ for ($searchEndIndex = $index + 1; $searchEndIndex < $scopes[$currentScope]['end_index']; ++$searchEndIndex) {
+ $searchEndToken = $tokens[$searchEndIndex];
+
+ if (
+ (!$searchEndToken->isWhitespace() && !$searchEndToken->isComment())
+ || ($searchEndToken->isWhitespace() && Preg::match('/\R/', $searchEndToken->getContent()))
+ ) {
+ $indent = true;
+
+ break;
+ }
+ }
+
+ $content = Preg::replace(
+ '/(\R+)\h*$/',
+ '$1'.$scopes[$currentScope]['initial_indent'].($indent ? $this->whitespacesConfig->getIndent() : ''),
+ $token->getContent()
+ );
+
+ $previousLineInitialIndent = $this->extractIndent($token->getContent());
+ $previousLineNewIndent = $this->extractIndent($content);
+ } else {
+ $content = Preg::replace(
+ '/(\R)'.preg_quote($scopes[$currentScope]['initial_indent'], '/').'(\h*)$/',
+ '$1'.$scopes[$currentScope]['new_indent'].'$2',
+ $token->getContent()
+ );
+ }
+
+ $tokens[$index] = new Token([T_WHITESPACE, $content]);
+
+ continue;
+ }
+
+ if ($index === $scopes[$currentScope]['end_index']) {
+ while ([] !== $scopes && $index === $scopes[$currentScope]['end_index']) {
+ array_pop($scopes);
+ --$currentScope;
+ }
+
+ continue;
+ }
+
+ if ($token->equals(',')) {
+ continue;
+ }
+
+ if ('expression' !== $scopes[$currentScope]['type']) {
+ $endIndex = $this->findExpressionEndIndex($tokens, $index, $scopes[$currentScope]['end_index']);
+
+ if ($endIndex === $index) {
+ continue;
+ }
+
+ $scopes[] = [
+ 'type' => 'expression',
+ 'end_index' => $endIndex,
+ 'initial_indent' => $previousLineInitialIndent,
+ 'new_indent' => $previousLineNewIndent,
+ ];
+ }
+ }
+ }
+
+ private function findExpressionEndIndex(Tokens $tokens, int $index, int $parentScopeEndIndex): int
+ {
+ $endIndex = null;
+
+ for ($searchEndIndex = $index + 1; $searchEndIndex < $parentScopeEndIndex; ++$searchEndIndex) {
+ $searchEndToken = $tokens[$searchEndIndex];
+
+ if ($searchEndToken->equalsAny(['(', '{']) || $searchEndToken->isGivenKind(CT::T_ARRAY_SQUARE_BRACE_OPEN)) {
+ $type = Tokens::detectBlockType($searchEndToken);
+ $searchEndIndex = $tokens->findBlockEnd(
+ $type['type'],
+ $searchEndIndex
+ );
+
+ continue;
+ }
+
+ if ($searchEndToken->equals(',')) {
+ $endIndex = $tokens->getPrevMeaningfulToken($searchEndIndex);
+
+ break;
+ }
+ }
+
+ return $endIndex ?? $tokens->getPrevMeaningfulToken($parentScopeEndIndex);
+ }
+
+ private function getLineIndentation(Tokens $tokens, int $index): string
+ {
+ $newlineTokenIndex = $this->getPreviousNewlineTokenIndex($tokens, $index);
+
+ if (null === $newlineTokenIndex) {
+ return '';
+ }
+
+ return $this->extractIndent($this->computeNewLineContent($tokens, $newlineTokenIndex));
+ }
+
+ private function extractIndent(string $content): string
+ {
+ if (Preg::match('/\R(\h*)[^\r\n]*$/D', $content, $matches)) {
+ return $matches[1];
+ }
+
+ return '';
+ }
+
+ private function getPreviousNewlineTokenIndex(Tokens $tokens, int $startIndex): ?int
+ {
+ $index = $startIndex;
+ while ($index > 0) {
+ $index = $tokens->getPrevTokenOfKind($index, [[T_WHITESPACE], [T_INLINE_HTML]]);
+
+ if ($this->newlineTokenIndexCache > $index) {
+ return $this->returnWithUpdateCache($startIndex, $this->newlineTokenPositionCache);
+ }
+
+ if (null === $index) {
+ break;
+ }
+
+ if ($this->isNewLineToken($tokens, $index)) {
+ return $this->returnWithUpdateCache($startIndex, $index);
+ }
+ }
+
+ return $this->returnWithUpdateCache($startIndex, null);
+ }
+
+ private function isNewLineToken(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isGivenKind([T_WHITESPACE, T_INLINE_HTML])) {
+ return false;
+ }
+
+ return (bool) Preg::match('/\R/', $this->computeNewLineContent($tokens, $index));
+ }
+
+ private function computeNewLineContent(Tokens $tokens, int $index): string
+ {
+ $content = $tokens[$index]->getContent();
+
+ if (0 !== $index && $tokens[$index - 1]->equalsAny([[T_OPEN_TAG], [T_CLOSE_TAG]])) {
+ $content = Preg::replace('/\S/', '', $tokens[$index - 1]->getContent()).$content;
+ }
+
+ return $content;
+ }
+
+ private function returnWithUpdateCache(int $index, ?int $position): ?int
+ {
+ $this->newlineTokenIndexCache = $index;
+ $this->newlineTokenPositionCache = $position;
+
+ return $position;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php
new file mode 100644
index 0000000..9e7cff6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/BlankLineBeforeStatementFixer.php
@@ -0,0 +1,349 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Andreas Möller <am@localheinz.com>
+ */
+final class BlankLineBeforeStatementFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @var array
+ */
+ private static $tokenMap = [
+ 'break' => T_BREAK,
+ 'case' => T_CASE,
+ 'continue' => T_CONTINUE,
+ 'declare' => T_DECLARE,
+ 'default' => T_DEFAULT,
+ 'do' => T_DO,
+ 'exit' => T_EXIT,
+ 'for' => T_FOR,
+ 'foreach' => T_FOREACH,
+ 'goto' => T_GOTO,
+ 'if' => T_IF,
+ 'include' => T_INCLUDE,
+ 'include_once' => T_INCLUDE_ONCE,
+ 'require' => T_REQUIRE,
+ 'require_once' => T_REQUIRE_ONCE,
+ 'return' => T_RETURN,
+ 'switch' => T_SWITCH,
+ 'throw' => T_THROW,
+ 'try' => T_TRY,
+ 'while' => T_WHILE,
+ 'yield' => T_YIELD,
+ 'yield_from' => T_YIELD_FROM,
+ ];
+
+ /**
+ * @var array
+ */
+ private $fixTokenMap = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ parent::configure($configuration);
+
+ $this->fixTokenMap = [];
+
+ foreach ($this->configuration['statements'] as $key) {
+ $this->fixTokenMap[$key] = self::$tokenMap[$key];
+ }
+
+ $this->fixTokenMap = array_values($this->fixTokenMap);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'An empty line feed must precede any configured statement.',
+ [
+ new CodeSample(
+ '<?php
+function A() {
+ echo 1;
+ return 1;
+}
+'
+ ),
+ new CodeSample(
+ '<?php
+switch ($foo) {
+ case 42:
+ $bar->process();
+ break;
+ case 44:
+ break;
+}
+',
+ [
+ 'statements' => ['break'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+foreach ($foo as $bar) {
+ if ($bar->isTired()) {
+ $bar->sleep();
+ continue;
+ }
+}
+',
+ [
+ 'statements' => ['continue'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+$i = 0;
+do {
+ echo $i;
+} while ($i > 0);
+',
+ [
+ 'statements' => ['do'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+if ($foo === false) {
+ exit(0);
+} else {
+ $bar = 9000;
+ exit(1);
+}
+',
+ [
+ 'statements' => ['exit'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+a:
+
+if ($foo === false) {
+ goto a;
+} else {
+ $bar = 9000;
+ goto b;
+}
+',
+ [
+ 'statements' => ['goto'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+$a = 9000;
+if (true) {
+ $foo = $bar;
+}
+',
+ [
+ 'statements' => ['if'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+
+if (true) {
+ $foo = $bar;
+ return;
+}
+',
+ [
+ 'statements' => ['return'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+$a = 9000;
+switch ($a) {
+ case 42:
+ break;
+}
+',
+ [
+ 'statements' => ['switch'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+if (null === $a) {
+ $foo->bar();
+ throw new \UnexpectedValueException("A cannot be null.");
+}
+',
+ [
+ 'statements' => ['throw'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+$a = 9000;
+try {
+ $foo->bar();
+} catch (\Exception $exception) {
+ $a = -1;
+}
+',
+ [
+ 'statements' => ['try'],
+ ]
+ ),
+ new CodeSample(
+ '<?php
+
+if (true) {
+ $foo = $bar;
+ yield $foo;
+}
+',
+ [
+ 'statements' => ['yield'],
+ ]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after NoExtraBlankLinesFixer, NoUselessReturnFixer, ReturnAssignmentFixer.
+ */
+ public function getPriority(): int
+ {
+ return -21;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound($this->fixTokenMap);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $analyzer = new TokensAnalyzer($tokens);
+
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind($this->fixTokenMap)) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_WHILE) && $analyzer->isWhilePartOfDoWhile($index)) {
+ continue;
+ }
+
+ $prevNonWhitespace = $tokens->getPrevNonWhitespace($index);
+
+ if ($this->shouldAddBlankLine($tokens, $prevNonWhitespace)) {
+ $this->insertBlankLine($tokens, $index);
+ }
+
+ $index = $prevNonWhitespace;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('statements', 'List of statements which must be preceded by an empty line.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(array_keys(self::$tokenMap))])
+ ->setDefault([
+ 'break',
+ 'continue',
+ 'declare',
+ 'return',
+ 'throw',
+ 'try',
+ ])
+ ->getOption(),
+ ]);
+ }
+
+ private function shouldAddBlankLine(Tokens $tokens, int $prevNonWhitespace): bool
+ {
+ $prevNonWhitespaceToken = $tokens[$prevNonWhitespace];
+
+ if ($prevNonWhitespaceToken->isComment()) {
+ for ($j = $prevNonWhitespace - 1; $j >= 0; --$j) {
+ if (str_contains($tokens[$j]->getContent(), "\n")) {
+ return false;
+ }
+
+ if ($tokens[$j]->isWhitespace() || $tokens[$j]->isComment()) {
+ continue;
+ }
+
+ return $tokens[$j]->equalsAny([';', '}']);
+ }
+ }
+
+ return $prevNonWhitespaceToken->equalsAny([';', '}']);
+ }
+
+ private function insertBlankLine(Tokens $tokens, int $index): void
+ {
+ $prevIndex = $index - 1;
+ $prevToken = $tokens[$prevIndex];
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ if ($prevToken->isWhitespace()) {
+ $newlinesCount = substr_count($prevToken->getContent(), "\n");
+
+ if (0 === $newlinesCount) {
+ $tokens[$prevIndex] = new Token([T_WHITESPACE, rtrim($prevToken->getContent(), " \t").$lineEnding.$lineEnding]);
+ } elseif (1 === $newlinesCount) {
+ $tokens[$prevIndex] = new Token([T_WHITESPACE, $lineEnding.$prevToken->getContent()]);
+ }
+ } else {
+ $tokens->insertAt($index, new Token([T_WHITESPACE, $lineEnding.$lineEnding]));
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php
new file mode 100644
index 0000000..042d828
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/CompactNullableTypehintFixer.php
@@ -0,0 +1,80 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Jack Cherng <jfcherng@gmail.com>
+ */
+final class CompactNullableTypehintFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove extra spaces in a nullable typehint.',
+ [
+ new CodeSample(
+ "<?php\nfunction sample(? string \$str): ? string\n{}\n"
+ ),
+ ],
+ 'Rule is applied only in a PHP 7.1+ environment.'
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound(CT::T_NULLABLE_TYPE);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ static $typehintKinds = [
+ CT::T_ARRAY_TYPEHINT,
+ T_CALLABLE,
+ T_NS_SEPARATOR,
+ T_STRING,
+ ];
+
+ for ($index = $tokens->count() - 1; $index >= 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(CT::T_NULLABLE_TYPE)) {
+ continue;
+ }
+
+ // remove whitespaces only if there are only whitespaces
+ // between '?' and the variable type
+ if (
+ $tokens[$index + 1]->isWhitespace()
+ && $tokens[$index + 2]->isGivenKind($typehintKinds)
+ ) {
+ $tokens->removeTrailingWhitespace($index);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php
new file mode 100644
index 0000000..8aadf90
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/HeredocIndentationFixer.php
@@ -0,0 +1,195 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Gregor Harlan
+ */
+final class HeredocIndentationFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Heredoc/nowdoc content must be properly indented. Requires PHP >= 7.3.',
+ [
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+ $a = <<<EOD
+abc
+ def
+EOD;
+
+SAMPLE
+ ,
+ new VersionSpecification(70300)
+ ),
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+ $a = <<<'EOD'
+abc
+ def
+EOD;
+
+SAMPLE
+ ,
+ new VersionSpecification(70300)
+ ),
+ new VersionSpecificCodeSample(
+ <<<'SAMPLE'
+<?php
+ $a = <<<'EOD'
+abc
+ def
+EOD;
+
+SAMPLE
+ ,
+ new VersionSpecification(70300),
+ ['indentation' => 'same_as_start']
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return \PHP_VERSION_ID >= 70300 && $tokens->isTokenKindFound(T_START_HEREDOC);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('indentation', 'Whether the indentation should be the same as in the start token line or one level more.'))
+ ->setAllowedValues(['start_plus_one', 'same_as_start'])
+ ->setDefault('start_plus_one')
+ ->getOption(),
+ ]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; 0 <= $index; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_END_HEREDOC)) {
+ continue;
+ }
+
+ $end = $index;
+ $index = $tokens->getPrevTokenOfKind($index, [[T_START_HEREDOC]]);
+
+ $this->fixIndentation($tokens, $index, $end);
+ }
+ }
+
+ private function fixIndentation(Tokens $tokens, int $start, int $end): void
+ {
+ $indent = $this->getIndentAt($tokens, $start);
+
+ if ('start_plus_one' === $this->configuration['indentation']) {
+ $indent .= $this->whitespacesConfig->getIndent();
+ }
+
+ Preg::match('/^\h*/', $tokens[$end]->getContent(), $matches);
+ $currentIndent = $matches[0];
+ $currentIndentLength = \strlen($currentIndent);
+
+ $content = $indent.substr($tokens[$end]->getContent(), $currentIndentLength);
+ $tokens[$end] = new Token([T_END_HEREDOC, $content]);
+
+ if ($end === $start + 1) {
+ return;
+ }
+
+ for ($index = $end - 1, $last = true; $index > $start; --$index, $last = false) {
+ if (!$tokens[$index]->isGivenKind([T_ENCAPSED_AND_WHITESPACE, T_WHITESPACE])) {
+ continue;
+ }
+
+ $content = $tokens[$index]->getContent();
+
+ if ('' !== $currentIndent) {
+ $content = Preg::replace('/(?<=\v)(?!'.$currentIndent.')\h+/', '', $content);
+ }
+
+ $regexEnd = $last && !$currentIndent ? '(?!\v|$)' : '(?!\v)';
+ $content = Preg::replace('/(?<=\v)'.$currentIndent.$regexEnd.'/', $indent, $content);
+
+ $tokens[$index] = new Token([$tokens[$index]->getId(), $content]);
+ }
+
+ ++$index;
+
+ if (!$tokens[$index]->isGivenKind(T_ENCAPSED_AND_WHITESPACE)) {
+ $tokens->insertAt($index, new Token([T_ENCAPSED_AND_WHITESPACE, $indent]));
+
+ return;
+ }
+
+ $content = $tokens[$index]->getContent();
+
+ if (!\in_array($content[0], ["\r", "\n"], true) && (!$currentIndent || $currentIndent === substr($content, 0, $currentIndentLength))) {
+ $content = $indent.substr($content, $currentIndentLength);
+ } elseif ($currentIndent) {
+ $content = Preg::replace('/^(?!'.$currentIndent.')\h+/', '', $content);
+ }
+
+ $tokens[$index] = new Token([T_ENCAPSED_AND_WHITESPACE, $content]);
+ }
+
+ private function getIndentAt(Tokens $tokens, int $index): string
+ {
+ for (; $index >= 0; --$index) {
+ if (!$tokens[$index]->isGivenKind([T_WHITESPACE, T_INLINE_HTML, T_OPEN_TAG])) {
+ continue;
+ }
+
+ $content = $tokens[$index]->getContent();
+
+ if ($tokens[$index]->isWhitespace() && $tokens[$index - 1]->isGivenKind(T_OPEN_TAG)) {
+ $content = $tokens[$index - 1]->getContent().$content;
+ }
+
+ if (1 === Preg::match('/\R(\h*)$/', $content, $matches)) {
+ return $matches[1];
+ }
+ }
+
+ return '';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php
new file mode 100644
index 0000000..14a1d29
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/IndentationTypeFixer.php
@@ -0,0 +1,153 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶2.4.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class IndentationTypeFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * @var string
+ */
+ private $indent;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Code MUST use configured indentation type.',
+ [
+ new CodeSample("<?php\n\nif (true) {\n\techo 'Hello!';\n}\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before PhpdocIndentFixer.
+ * Must run after ClassAttributesSeparationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 50;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([T_COMMENT, T_DOC_COMMENT, T_WHITESPACE]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->indent = $this->whitespacesConfig->getIndent();
+
+ foreach ($tokens as $index => $token) {
+ if ($token->isComment()) {
+ $tokens[$index] = $this->fixIndentInComment($tokens, $index);
+
+ continue;
+ }
+
+ if ($token->isWhitespace()) {
+ $tokens[$index] = $this->fixIndentToken($tokens, $index);
+
+ continue;
+ }
+ }
+ }
+
+ private function fixIndentInComment(Tokens $tokens, int $index): Token
+ {
+ $content = Preg::replace('/^(?:(?<! ) {1,3})?\t/m', '\1 ', $tokens[$index]->getContent(), -1, $count);
+
+ // Also check for more tabs.
+ while (0 !== $count) {
+ $content = Preg::replace('/^(\ +)?\t/m', '\1 ', $content, -1, $count);
+ }
+
+ $indent = $this->indent;
+
+ // change indent to expected one
+ $content = Preg::replaceCallback('/^(?: )+/m', function (array $matches) use ($indent): string {
+ return $this->getExpectedIndent($matches[0], $indent);
+ }, $content);
+
+ return new Token([$tokens[$index]->getId(), $content]);
+ }
+
+ private function fixIndentToken(Tokens $tokens, int $index): Token
+ {
+ $content = $tokens[$index]->getContent();
+ $previousTokenHasTrailingLinebreak = false;
+
+ // @TODO this can be removed when we have a transformer for "T_OPEN_TAG" to "T_OPEN_TAG + T_WHITESPACE"
+ if (str_contains($tokens[$index - 1]->getContent(), "\n")) {
+ $content = "\n".$content;
+ $previousTokenHasTrailingLinebreak = true;
+ }
+
+ $indent = $this->indent;
+ $newContent = Preg::replaceCallback(
+ '/(\R)(\h+)/', // find indent
+ function (array $matches) use ($indent): string {
+ // normalize mixed indent
+ $content = Preg::replace('/(?:(?<! ) {1,3})?\t/', ' ', $matches[2]);
+
+ // change indent to expected one
+ return $matches[1].$this->getExpectedIndent($content, $indent);
+ },
+ $content
+ );
+
+ if ($previousTokenHasTrailingLinebreak) {
+ $newContent = substr($newContent, 1);
+ }
+
+ return new Token([T_WHITESPACE, $newContent]);
+ }
+
+ /**
+ * @return string mixed
+ */
+ private function getExpectedIndent(string $content, string $indent): string
+ {
+ if ("\t" === $indent) {
+ $content = str_replace(' ', $indent, $content);
+ }
+
+ return $content;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/LineEndingFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/LineEndingFixer.php
new file mode 100644
index 0000000..65e673a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/LineEndingFixer.php
@@ -0,0 +1,104 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶2.2.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class LineEndingFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'All PHP files must use same line ending.',
+ [
+ new CodeSample(
+ "<?php \$b = \" \$a \r\n 123\"; \$a = <<<TEST\r\nAAAAA \r\n |\r\nTEST;\n"
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BracesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 40;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $ending = $this->whitespacesConfig->getLineEnding();
+
+ for ($index = 0, $count = \count($tokens); $index < $count; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_ENCAPSED_AND_WHITESPACE)) {
+ if ($tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_END_HEREDOC)) {
+ $tokens[$index] = new Token([
+ $token->getId(),
+ Preg::replace(
+ '#\R#',
+ $ending,
+ $token->getContent()
+ ),
+ ]);
+ }
+
+ continue;
+ }
+
+ if ($token->isGivenKind([T_CLOSE_TAG, T_COMMENT, T_DOC_COMMENT, T_OPEN_TAG, T_START_HEREDOC, T_WHITESPACE])) {
+ $tokens[$index] = new Token([
+ $token->getId(),
+ Preg::replace(
+ '#\R#',
+ $ending,
+ $token->getContent()
+ ),
+ ]);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/MethodChainingIndentationFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/MethodChainingIndentationFixer.php
new file mode 100644
index 0000000..66e70b4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/MethodChainingIndentationFixer.php
@@ -0,0 +1,197 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Vladimir Boliev <voff.web@gmail.com>
+ */
+final class MethodChainingIndentationFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Method chaining MUST be properly indented. Method chaining with different levels of indentation is not supported.',
+ [new CodeSample("<?php\n\$user->setEmail('voff.web@gmail.com')\n ->setPassword('233434');\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before ArrayIndentationFixer, MethodArgumentSpaceFixer.
+ * Must run after BracesFixer.
+ */
+ public function getPriority(): int
+ {
+ return 34;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(Token::getObjectOperatorKinds());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $lineEnding = $this->whitespacesConfig->getLineEnding();
+
+ for ($index = 1, $count = \count($tokens); $index < $count; ++$index) {
+ if (!$tokens[$index]->isObjectOperator()) {
+ continue;
+ }
+
+ if ($this->canBeMovedToNextLine($index, $tokens)) {
+ $newline = new Token([T_WHITESPACE, $lineEnding]);
+ if ($tokens[$index - 1]->isWhitespace()) {
+ $tokens[$index - 1] = $newline;
+ } else {
+ $tokens->insertAt($index, $newline);
+ ++$index;
+ }
+ }
+
+ $currentIndent = $this->getIndentAt($tokens, $index - 1);
+ if (null === $currentIndent) {
+ continue;
+ }
+
+ $expectedIndent = $this->getExpectedIndentAt($tokens, $index);
+ if ($currentIndent !== $expectedIndent) {
+ $tokens[$index - 1] = new Token([T_WHITESPACE, $lineEnding.$expectedIndent]);
+ }
+ }
+ }
+
+ /**
+ * @param int $index index of the first token on the line to indent
+ */
+ private function getExpectedIndentAt(Tokens $tokens, int $index): string
+ {
+ $index = $tokens->getPrevMeaningfulToken($index);
+ $indent = $this->whitespacesConfig->getIndent();
+
+ for ($i = $index; $i >= 0; --$i) {
+ if ($tokens[$i]->equals(')')) {
+ $i = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $i);
+ }
+
+ $currentIndent = $this->getIndentAt($tokens, $i);
+ if (null === $currentIndent) {
+ continue;
+ }
+
+ if ($this->currentLineRequiresExtraIndentLevel($tokens, $i, $index)) {
+ return $currentIndent.$indent;
+ }
+
+ return $currentIndent;
+ }
+
+ return $indent;
+ }
+
+ /**
+ * @param int $index position of the object operator token ("->" or "?->")
+ */
+ private function canBeMovedToNextLine(int $index, Tokens $tokens): bool
+ {
+ $prevMeaningful = $tokens->getPrevMeaningfulToken($index);
+ $hasCommentBefore = false;
+
+ for ($i = $index - 1; $i > $prevMeaningful; --$i) {
+ if ($tokens[$i]->isComment()) {
+ $hasCommentBefore = true;
+
+ continue;
+ }
+
+ if ($tokens[$i]->isWhitespace() && 1 === Preg::match('/\R/', $tokens[$i]->getContent())) {
+ return $hasCommentBefore;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @param int $index index of the indentation token
+ */
+ private function getIndentAt(Tokens $tokens, int $index): ?string
+ {
+ if (1 === Preg::match('/\R{1}(\h*)$/', $this->getIndentContentAt($tokens, $index), $matches)) {
+ return $matches[1];
+ }
+
+ return null;
+ }
+
+ private function getIndentContentAt(Tokens $tokens, int $index): string
+ {
+ if (!$tokens[$index]->isGivenKind([T_WHITESPACE, T_INLINE_HTML])) {
+ return '';
+ }
+
+ $content = $tokens[$index]->getContent();
+
+ if ($tokens[$index]->isWhitespace() && $tokens[$index - 1]->isGivenKind(T_OPEN_TAG)) {
+ $content = $tokens[$index - 1]->getContent().$content;
+ }
+
+ if (Preg::match('/\R/', $content)) {
+ return $content;
+ }
+
+ return '';
+ }
+
+ /**
+ * @param int $start index of first meaningful token on previous line
+ * @param int $end index of last token on previous line
+ */
+ private function currentLineRequiresExtraIndentLevel(Tokens $tokens, int $start, int $end): bool
+ {
+ if ($tokens[$start + 1]->isObjectOperator()) {
+ return false;
+ }
+
+ if ($tokens[$end]->isGivenKind(CT::T_BRACE_CLASS_INSTANTIATION_CLOSE)) {
+ return true;
+ }
+
+ return
+ !$tokens[$end]->equals(')')
+ || $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $end) >= $start
+ ;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoExtraBlankLinesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoExtraBlankLinesFixer.php
new file mode 100644
index 0000000..fcab4e9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoExtraBlankLinesFixer.php
@@ -0,0 +1,458 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+use PhpCsFixer\Utils;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoExtraBlankLinesFixer extends AbstractFixer implements ConfigurableFixerInterface, WhitespacesAwareFixerInterface
+{
+ /**
+ * @var string[]
+ */
+ private static $availableTokens = [
+ 'break',
+ 'case',
+ 'continue',
+ 'curly_brace_block',
+ 'default',
+ 'extra',
+ 'parenthesis_brace_block',
+ 'return',
+ 'square_brace_block',
+ 'switch',
+ 'throw',
+ 'use',
+ 'use_trait',
+ ];
+
+ /**
+ * @var array<int, string> key is token id, value is name of callback
+ */
+ private $tokenKindCallbackMap;
+
+ /**
+ * @var array<string, string> token prototype, value is name of callback
+ */
+ private $tokenEqualsMap;
+
+ /**
+ * @var Tokens
+ */
+ private $tokens;
+
+ /**
+ * @var TokensAnalyzer
+ */
+ private $tokensAnalyzer;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function configure(array $configuration): void
+ {
+ if (isset($configuration['tokens']) && \in_array('use_trait', $configuration['tokens'], true)) {
+ Utils::triggerDeprecation(new \RuntimeException('Option "use_trait" is deprecated, use the rule `class_attributes_separation` with `elements: trait_import` instead.'));
+ }
+
+ parent::configure($configuration);
+
+ static $reprToTokenMap = [
+ 'break' => T_BREAK,
+ 'case' => T_CASE,
+ 'continue' => T_CONTINUE,
+ 'curly_brace_block' => '{',
+ 'default' => T_DEFAULT,
+ 'extra' => T_WHITESPACE,
+ 'parenthesis_brace_block' => '(',
+ 'return' => T_RETURN,
+ 'square_brace_block' => CT::T_ARRAY_SQUARE_BRACE_OPEN,
+ 'switch' => T_SWITCH,
+ 'throw' => T_THROW,
+ 'use' => T_USE,
+ 'use_trait' => CT::T_USE_TRAIT,
+ ];
+
+ static $tokenKindCallbackMap = [
+ T_BREAK => 'fixAfterToken',
+ T_CASE => 'fixAfterToken',
+ T_CONTINUE => 'fixAfterToken',
+ T_DEFAULT => 'fixAfterToken',
+ T_RETURN => 'fixAfterToken',
+ T_SWITCH => 'fixAfterToken',
+ T_THROW => 'fixAfterThrowToken',
+ T_USE => 'removeBetweenUse',
+ T_WHITESPACE => 'removeMultipleBlankLines',
+ CT::T_USE_TRAIT => 'removeBetweenUse',
+ CT::T_ARRAY_SQUARE_BRACE_OPEN => 'fixStructureOpenCloseIfMultiLine', // typeless '[' tokens should not be fixed (too rare)
+ ];
+
+ static $tokenEqualsMap = [
+ '{' => 'fixStructureOpenCloseIfMultiLine', // i.e. not: CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN
+ '(' => 'fixStructureOpenCloseIfMultiLine', // i.e. not: CT::T_BRACE_CLASS_INSTANTIATION_OPEN
+ ];
+
+ $tokensAssoc = array_flip(array_intersect_key($reprToTokenMap, array_flip($this->configuration['tokens'])));
+
+ $this->tokenKindCallbackMap = array_intersect_key($tokenKindCallbackMap, $tokensAssoc);
+ $this->tokenEqualsMap = array_intersect_key($tokenEqualsMap, $tokensAssoc);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Removes extra blank lines and/or blank lines following configuration.',
+ [
+ new CodeSample(
+ '<?php
+
+$foo = array("foo");
+
+
+$bar = "bar";
+'
+ ),
+ new CodeSample(
+ '<?php
+
+switch ($foo) {
+ case 41:
+ echo "foo";
+ break;
+
+ case 42:
+ break;
+}
+',
+ ['tokens' => ['break']]
+ ),
+ new CodeSample(
+ '<?php
+
+for ($i = 0; $i < 9000; ++$i) {
+ if (true) {
+ continue;
+
+ }
+}
+',
+ ['tokens' => ['continue']]
+ ),
+ new CodeSample(
+ '<?php
+
+for ($i = 0; $i < 9000; ++$i) {
+
+ echo $i;
+
+}
+',
+ ['tokens' => ['curly_brace_block']]
+ ),
+ new CodeSample(
+ '<?php
+
+$foo = array("foo");
+
+
+$bar = "bar";
+',
+ ['tokens' => ['extra']]
+ ),
+ new CodeSample(
+ '<?php
+
+$foo = array(
+
+ "foo"
+
+);
+',
+ ['tokens' => ['parenthesis_brace_block']]
+ ),
+ new CodeSample(
+ '<?php
+
+function foo($bar)
+{
+ return $bar;
+
+}
+',
+ ['tokens' => ['return']]
+ ),
+ new CodeSample(
+ '<?php
+
+$foo = [
+
+ "foo"
+
+];
+',
+ ['tokens' => ['square_brace_block']]
+ ),
+ new CodeSample(
+ '<?php
+
+function foo($bar)
+{
+ throw new \Exception("Hello!");
+
+}
+',
+ ['tokens' => ['throw']]
+ ),
+ new CodeSample(
+ '<?php
+
+namespace Foo;
+
+use Bar\Baz;
+
+use Baz\Bar;
+
+class Bar
+{
+}
+',
+ ['tokens' => ['use']]
+ ),
+ new CodeSample(
+ '<?php
+switch($a) {
+
+ case 1:
+
+ default:
+
+ echo 3;
+}
+',
+ ['tokens' => ['switch', 'case', 'default']]
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before BlankLineBeforeStatementFixer.
+ * Must run after ClassAttributesSeparationFixer, CombineConsecutiveUnsetsFixer, EmptyLoopBodyFixer, EmptyLoopConditionFixer, FunctionToConstantFixer, ModernizeStrposFixer, NoEmptyCommentFixer, NoEmptyPhpdocFixer, NoEmptyStatementFixer, NoUnusedImportsFixer, NoUselessElseFixer, NoUselessReturnFixer, NoUselessSprintfFixer, StringLengthToEmptyFixer.
+ */
+ public function getPriority(): int
+ {
+ return -20;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $this->tokens = $tokens;
+ $this->tokensAnalyzer = new TokensAnalyzer($this->tokens);
+ for ($index = $tokens->getSize() - 1; $index > 0; --$index) {
+ $this->fixByToken($tokens[$index], $index);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('tokens', 'List of tokens to fix.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset(self::$availableTokens)])
+ ->setDefault(['extra'])
+ ->getOption(),
+ ]);
+ }
+
+ private function fixByToken(Token $token, int $index): void
+ {
+ foreach ($this->tokenKindCallbackMap as $kind => $callback) {
+ if (!$token->isGivenKind($kind)) {
+ continue;
+ }
+
+ $this->{$callback}($index);
+
+ return;
+ }
+
+ foreach ($this->tokenEqualsMap as $equals => $callback) {
+ if (!$token->equals($equals)) {
+ continue;
+ }
+
+ $this->{$callback}($index);
+
+ return;
+ }
+ }
+
+ private function removeBetweenUse(int $index): void
+ {
+ $next = $this->tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]);
+ if (null === $next || $this->tokens[$next]->isGivenKind(T_CLOSE_TAG)) {
+ return;
+ }
+
+ $nextUseCandidate = $this->tokens->getNextMeaningfulToken($next);
+ if (null === $nextUseCandidate || !$this->tokens[$nextUseCandidate]->isGivenKind($this->tokens[$index]->getId()) || !$this->containsLinebreak($index, $nextUseCandidate)) {
+ return;
+ }
+
+ $this->removeEmptyLinesAfterLineWithTokenAt($next);
+ }
+
+ private function removeMultipleBlankLines(int $index): void
+ {
+ $expected = $this->tokens[$index - 1]->isGivenKind(T_OPEN_TAG) && 1 === Preg::match('/\R$/', $this->tokens[$index - 1]->getContent()) ? 1 : 2;
+
+ $parts = Preg::split('/(.*\R)/', $this->tokens[$index]->getContent(), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+ $count = \count($parts);
+
+ if ($count > $expected) {
+ $this->tokens[$index] = new Token([T_WHITESPACE, implode('', \array_slice($parts, 0, $expected)).rtrim($parts[$count - 1], "\r\n")]);
+ }
+ }
+
+ private function fixAfterToken(int $index): void
+ {
+ for ($i = $index - 1; $i > 0; --$i) {
+ if ($this->tokens[$i]->isGivenKind(T_FUNCTION) && $this->tokensAnalyzer->isLambda($i)) {
+ return;
+ }
+
+ if ($this->tokens[$i]->isGivenKind(T_CLASS) && $this->tokensAnalyzer->isAnonymousClass($i)) {
+ return;
+ }
+
+ if ($this->tokens[$i]->isWhitespace() && str_contains($this->tokens[$i]->getContent(), "\n")) {
+ break;
+ }
+ }
+
+ $this->removeEmptyLinesAfterLineWithTokenAt($index);
+ }
+
+ private function fixAfterThrowToken(int $index): void
+ {
+ if ($this->tokens[$this->tokens->getPrevMeaningfulToken($index)]->equalsAny([';', '{', '}', ':', [T_OPEN_TAG]])) {
+ $this->fixAfterToken($index);
+ }
+ }
+
+ /**
+ * Remove white line(s) after the index of a block type,
+ * but only if the block is not on one line.
+ *
+ * @param int $index body start
+ */
+ private function fixStructureOpenCloseIfMultiLine(int $index): void
+ {
+ $blockTypeInfo = Tokens::detectBlockType($this->tokens[$index]);
+ $bodyEnd = $this->tokens->findBlockEnd($blockTypeInfo['type'], $index);
+
+ for ($i = $bodyEnd - 1; $i >= $index; --$i) {
+ if (str_contains($this->tokens[$i]->getContent(), "\n")) {
+ $this->removeEmptyLinesAfterLineWithTokenAt($i);
+ $this->removeEmptyLinesAfterLineWithTokenAt($index);
+
+ break;
+ }
+ }
+ }
+
+ private function removeEmptyLinesAfterLineWithTokenAt(int $index): void
+ {
+ // find the line break
+ $tokenCount = \count($this->tokens);
+ for ($end = $index; $end < $tokenCount; ++$end) {
+ if (
+ $this->tokens[$end]->equals('}')
+ || str_contains($this->tokens[$end]->getContent(), "\n")
+ ) {
+ break;
+ }
+ }
+
+ if ($end === $tokenCount) {
+ return; // not found, early return
+ }
+
+ $ending = $this->whitespacesConfig->getLineEnding();
+
+ for ($i = $end; $i < $tokenCount && $this->tokens[$i]->isWhitespace(); ++$i) {
+ $content = $this->tokens[$i]->getContent();
+ if (substr_count($content, "\n") < 1) {
+ continue;
+ }
+
+ $pos = strrpos($content, "\n");
+ if ($pos + 2 <= \strlen($content)) { // preserve indenting where possible
+ $newContent = $ending.substr($content, $pos + 1);
+ } else {
+ $newContent = $ending;
+ }
+
+ $this->tokens[$i] = new Token([T_WHITESPACE, $newContent]);
+ }
+ }
+
+ private function containsLinebreak(int $startIndex, int $endIndex): bool
+ {
+ for ($i = $endIndex; $i > $startIndex; --$i) {
+ if (Preg::match('/\R/', $this->tokens[$i]->getContent())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesAroundOffsetFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesAroundOffsetFixer.php
new file mode 100644
index 0000000..a9f6961
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesAroundOffsetFixer.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\AllowedValueSubset;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Javier Spagnoletti <phansys@gmail.com>
+ */
+final class NoSpacesAroundOffsetFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST NOT be spaces around offset braces.',
+ [
+ new CodeSample("<?php\n\$sample = \$b [ 'a' ] [ 'b' ];\n"),
+ new CodeSample("<?php\n\$sample = \$b [ 'a' ] [ 'b' ];\n", ['positions' => ['inside']]),
+ new CodeSample("<?php\n\$sample = \$b [ 'a' ] [ 'b' ];\n", ['positions' => ['outside']]),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound(['[', CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->equalsAny(['[', [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN]])) {
+ continue;
+ }
+
+ if (\in_array('inside', $this->configuration['positions'], true)) {
+ if ($token->equals('[')) {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE, $index);
+ } else {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE, $index);
+ }
+
+ // remove space after opening `[` or `{`
+ if ($tokens[$index + 1]->isWhitespace(" \t")) {
+ $tokens->clearAt($index + 1);
+ }
+
+ // remove space before closing `]` or `}`
+ if ($tokens[$endIndex - 1]->isWhitespace(" \t")) {
+ $tokens->clearAt($endIndex - 1);
+ }
+ }
+
+ if (\in_array('outside', $this->configuration['positions'], true)) {
+ $prevNonWhitespaceIndex = $tokens->getPrevNonWhitespace($index);
+ if ($tokens[$prevNonWhitespaceIndex]->isComment()) {
+ continue;
+ }
+
+ $tokens->removeLeadingWhitespace($index);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ $values = ['inside', 'outside'];
+
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('positions', 'Whether spacing should be fixed inside and/or outside the offset braces.'))
+ ->setAllowedTypes(['array'])
+ ->setAllowedValues([new AllowedValueSubset($values)])
+ ->setDefault($values)
+ ->getOption(),
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesInsideParenthesisFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesInsideParenthesisFixer.php
new file mode 100644
index 0000000..623af81
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoSpacesInsideParenthesisFixer.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶4.3, ¶4.6, ¶5.
+ *
+ * @author Marc Aubé
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoSpacesInsideParenthesisFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis.',
+ [
+ new CodeSample("<?php\nif ( \$a ) {\n foo( );\n}\n"),
+ new CodeSample(
+ "<?php
+function foo( \$bar, \$baz )
+{
+}\n"
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run before FunctionToConstantFixer, StringLengthToEmptyFixer.
+ * Must run after CombineConsecutiveIssetsFixer, CombineNestedDirnameFixer, LambdaNotUsedImportFixer, ModernizeStrposFixer, NoUselessSprintfFixer, PowToExponentiationFixer.
+ */
+ public function getPriority(): int
+ {
+ return 2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isTokenKindFound('(');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ foreach ($tokens as $index => $token) {
+ if (!$token->equals('(')) {
+ continue;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ // ignore parenthesis for T_ARRAY
+ if (null !== $prevIndex && $tokens[$prevIndex]->isGivenKind(T_ARRAY)) {
+ continue;
+ }
+
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ // remove space after opening `(`
+ if (!$tokens[$tokens->getNextNonWhitespace($index)]->isComment()) {
+ $this->removeSpaceAroundToken($tokens, $index + 1);
+ }
+
+ // remove space before closing `)` if it is not `list($a, $b, )` case
+ if (!$tokens[$tokens->getPrevMeaningfulToken($endIndex)]->equals(',')) {
+ $this->removeSpaceAroundToken($tokens, $endIndex - 1);
+ }
+ }
+ }
+
+ /**
+ * Remove spaces from token at a given index.
+ */
+ private function removeSpaceAroundToken(Tokens $tokens, int $index): void
+ {
+ $token = $tokens[$index];
+
+ if ($token->isWhitespace() && !str_contains($token->getContent(), "\n")) {
+ $tokens->clearAt($index);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php
new file mode 100644
index 0000000..1c3c87d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoTrailingWhitespaceFixer.php
@@ -0,0 +1,117 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Fixer for rules defined in PSR2 ¶2.3.
+ *
+ * Don't add trailing spaces at the end of non-blank lines.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoTrailingWhitespaceFixer extends AbstractFixer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove trailing whitespace at the end of non-blank lines.',
+ [new CodeSample("<?php\n\$a = 1; \n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after CombineConsecutiveIssetsFixer, CombineConsecutiveUnsetsFixer, EmptyLoopBodyFixer, EmptyLoopConditionFixer, FunctionToConstantFixer, ModernizeStrposFixer, NoEmptyCommentFixer, NoEmptyPhpdocFixer, NoEmptyStatementFixer, NoUnneededControlParenthesesFixer, NoUselessElseFixer, StringLengthToEmptyFixer, TernaryToElvisOperatorFixer.
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = \count($tokens) - 1; $index >= 0; --$index) {
+ $token = $tokens[$index];
+ if (
+ $token->isGivenKind(T_OPEN_TAG)
+ && $tokens->offsetExists($index + 1)
+ && $tokens[$index + 1]->isWhitespace()
+ && 1 === Preg::match('/(.*)\h$/', $token->getContent(), $openTagMatches)
+ && 1 === Preg::match('/^(\R)(.*)$/s', $tokens[$index + 1]->getContent(), $whitespaceMatches)
+ ) {
+ $tokens[$index] = new Token([T_OPEN_TAG, $openTagMatches[1].$whitespaceMatches[1]]);
+ if ('' === $whitespaceMatches[2]) {
+ $tokens->clearAt($index + 1);
+ } else {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, $whitespaceMatches[2]]);
+ }
+
+ continue;
+ }
+
+ if (!$token->isWhitespace()) {
+ continue;
+ }
+
+ $lines = Preg::split('/(\\R+)/', $token->getContent(), -1, PREG_SPLIT_DELIM_CAPTURE);
+ $linesSize = \count($lines);
+
+ // fix only multiline whitespaces or singleline whitespaces at the end of file
+ if ($linesSize > 1 || !isset($tokens[$index + 1])) {
+ if (!$tokens[$index - 1]->isGivenKind(T_OPEN_TAG) || 1 !== Preg::match('/(.*)\R$/', $tokens[$index - 1]->getContent())) {
+ $lines[0] = rtrim($lines[0], " \t");
+ }
+
+ for ($i = 1; $i < $linesSize; ++$i) {
+ $trimmedLine = rtrim($lines[$i], " \t");
+ if ('' !== $trimmedLine) {
+ $lines[$i] = $trimmedLine;
+ }
+ }
+
+ $content = implode('', $lines);
+ if ('' !== $content) {
+ $tokens[$index] = new Token([$token->getId(), $content]);
+ } else {
+ $tokens->clearAt($index);
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php
new file mode 100644
index 0000000..50313c4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/NoWhitespaceInBlankLineFixer.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class NoWhitespaceInBlankLineFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'Remove trailing whitespace at the end of blank lines.',
+ [new CodeSample("<?php\n \n\$a = 1;\n")]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Must run after AssignNullCoalescingToCoalesceEqualFixer, CombineConsecutiveIssetsFixer, CombineConsecutiveUnsetsFixer, FunctionToConstantFixer, NoEmptyCommentFixer, NoEmptyPhpdocFixer, NoEmptyStatementFixer, NoUselessElseFixer, NoUselessReturnFixer.
+ */
+ public function getPriority(): int
+ {
+ return -19;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ // skip first as it cannot be a white space token
+ for ($i = 1, $count = \count($tokens); $i < $count; ++$i) {
+ if ($tokens[$i]->isWhitespace()) {
+ $this->fixWhitespaceToken($tokens, $i);
+ }
+ }
+ }
+
+ private function fixWhitespaceToken(Tokens $tokens, int $index): void
+ {
+ $content = $tokens[$index]->getContent();
+ $lines = Preg::split("/(\r\n|\n)/", $content);
+ $lineCount = \count($lines);
+
+ if (
+ // fix T_WHITESPACES with at least 3 lines (eg `\n \n`)
+ $lineCount > 2
+ // and T_WHITESPACES with at least 2 lines at the end of file or after open tag with linebreak
+ || ($lineCount > 0 && (!isset($tokens[$index + 1]) || $tokens[$index - 1]->isGivenKind(T_OPEN_TAG)))
+ ) {
+ $lMax = isset($tokens[$index + 1]) ? $lineCount - 1 : $lineCount;
+
+ $lStart = 1;
+ if ($tokens[$index - 1]->isGivenKind(T_OPEN_TAG) && "\n" === substr($tokens[$index - 1]->getContent(), -1)) {
+ $lStart = 0;
+ }
+
+ for ($l = $lStart; $l < $lMax; ++$l) {
+ $lines[$l] = Preg::replace('/^\h+$/', '', $lines[$l]);
+ }
+ $content = implode($this->whitespacesConfig->getLineEnding(), $lines);
+ if ('' !== $content) {
+ $tokens[$index] = new Token([T_WHITESPACE, $content]);
+ } else {
+ $tokens->clearAt($index);
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php
new file mode 100644
index 0000000..af7fa87
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/SingleBlankLineAtEofFixer.php
@@ -0,0 +1,76 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * A file must always end with a line endings character.
+ *
+ * Fixer for rules defined in PSR2 ¶2.2.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class SingleBlankLineAtEofFixer extends AbstractFixer implements WhitespacesAwareFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'A PHP file without end tag must always end with a single empty line feed.',
+ [
+ new CodeSample("<?php\n\$a = 1;"),
+ new CodeSample("<?php\n\$a = 1;\n\n"),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // must run last to be sure the file is properly formatted before it runs
+ return -50;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ $count = $tokens->count();
+
+ if ($count > 0 && !$tokens[$count - 1]->isGivenKind([T_INLINE_HTML, T_CLOSE_TAG, T_OPEN_TAG])) {
+ $tokens->ensureWhitespaceAtIndex($count - 1, 1, $this->whitespacesConfig->getLineEnding());
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php
new file mode 100644
index 0000000..c0e7515
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/Whitespace/TypesSpacesFixer.php
@@ -0,0 +1,126 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer\Whitespace;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
+use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
+use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
+use PhpCsFixer\FixerDefinition\CodeSample;
+use PhpCsFixer\FixerDefinition\FixerDefinition;
+use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
+use PhpCsFixer\FixerDefinition\VersionSpecification;
+use PhpCsFixer\FixerDefinition\VersionSpecificCodeSample;
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class TypesSpacesFixer extends AbstractFixer implements ConfigurableFixerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefinition(): FixerDefinitionInterface
+ {
+ return new FixerDefinition(
+ 'A single space or none should be around union type operator.',
+ [
+ new CodeSample(
+ "<?php\ntry\n{\n new Foo();\n} catch (ErrorA | ErrorB \$e) {\necho'error';}\n"
+ ),
+ new CodeSample(
+ "<?php\ntry\n{\n new Foo();\n} catch (ErrorA|ErrorB \$e) {\necho'error';}\n",
+ ['space' => 'single']
+ ),
+ new VersionSpecificCodeSample(
+ "<?php\nfunction foo(int | string \$x)\n{\n}\n",
+ new VersionSpecification(80000)
+ ),
+ ]
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isCandidate(Tokens $tokens): bool
+ {
+ return $tokens->isAnyTokenKindsFound([CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
+ {
+ return new FixerConfigurationResolver([
+ (new FixerOptionBuilder('space', 'spacing to apply around union type operator.'))
+ ->setAllowedValues(['none', 'single'])
+ ->setDefault('none')
+ ->getOption(),
+ ]);
+ }
+
+ protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
+ {
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ if (!$tokens[$index]->isGivenKind([CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION])) {
+ continue;
+ }
+
+ if ('single' === $this->configuration['space']) {
+ $this->ensureSingleSpace($tokens, $index + 1, 0);
+ $this->ensureSingleSpace($tokens, $index - 1, 1);
+ } else {
+ $this->ensureNoSpace($tokens, $index + 1);
+ $this->ensureNoSpace($tokens, $index - 1);
+ }
+ }
+ }
+
+ private function ensureSingleSpace(Tokens $tokens, int $index, int $offset): void
+ {
+ if (!$tokens[$index]->isWhitespace()) {
+ $tokens->insertSlices([$index + $offset => new Token([T_WHITESPACE, ' '])]);
+
+ return;
+ }
+
+ if (' ' === $tokens[$index]->getContent()) {
+ return;
+ }
+
+ if (1 === Preg::match('/\R/', $tokens[$index]->getContent())) {
+ return;
+ }
+
+ $tokens[$index] = new Token([T_WHITESPACE, ' ']);
+ }
+
+ private function ensureNoSpace(Tokens $tokens, int $index): void
+ {
+ if (!$tokens[$index]->isWhitespace()) {
+ return;
+ }
+
+ if (1 === Preg::match('/\R/', $tokens[$index]->getContent())) {
+ return;
+ }
+
+ $tokens->clearAt($index);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php
new file mode 100644
index 0000000..c03a3e7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Fixer/WhitespacesAwareFixerInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Fixer;
+
+use PhpCsFixer\WhitespacesFixerConfig;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface WhitespacesAwareFixerInterface extends FixerInterface
+{
+ public function setWhitespacesConfig(WhitespacesFixerConfig $config): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOption.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOption.php
new file mode 100644
index 0000000..6e54eb8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOption.php
@@ -0,0 +1,100 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+/**
+ * @author ntzm
+ *
+ * @internal
+ */
+final class AliasedFixerOption implements FixerOptionInterface
+{
+ /**
+ * @var FixerOptionInterface
+ */
+ private $fixerOption;
+
+ /**
+ * @var string
+ */
+ private $alias;
+
+ public function __construct(FixerOptionInterface $fixerOption, string $alias)
+ {
+ $this->fixerOption = $fixerOption;
+ $this->alias = $alias;
+ }
+
+ public function getAlias(): string
+ {
+ return $this->alias;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName(): string
+ {
+ return $this->fixerOption->getName();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDescription(): string
+ {
+ return $this->fixerOption->getDescription();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasDefault(): bool
+ {
+ return $this->fixerOption->hasDefault();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefault()
+ {
+ return $this->fixerOption->getDefault();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAllowedTypes(): ?array
+ {
+ return $this->fixerOption->getAllowedTypes();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAllowedValues(): ?array
+ {
+ return $this->fixerOption->getAllowedValues();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNormalizer(): ?\Closure
+ {
+ return $this->fixerOption->getNormalizer();
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOptionBuilder.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOptionBuilder.php
new file mode 100644
index 0000000..6fa2329
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AliasedFixerOptionBuilder.php
@@ -0,0 +1,91 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+/**
+ * @author ntzm
+ *
+ * @internal
+ */
+final class AliasedFixerOptionBuilder
+{
+ /**
+ * @var FixerOptionBuilder
+ */
+ private $optionBuilder;
+
+ /**
+ * @var string
+ */
+ private $alias;
+
+ public function __construct(FixerOptionBuilder $optionBuilder, string $alias)
+ {
+ $this->optionBuilder = $optionBuilder;
+ $this->alias = $alias;
+ }
+
+ /**
+ * @param mixed $default
+ *
+ * @return $this
+ */
+ public function setDefault($default): self
+ {
+ $this->optionBuilder->setDefault($default);
+
+ return $this;
+ }
+
+ /**
+ * @param string[] $allowedTypes
+ *
+ * @return $this
+ */
+ public function setAllowedTypes(array $allowedTypes): self
+ {
+ $this->optionBuilder->setAllowedTypes($allowedTypes);
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function setAllowedValues(array $allowedValues): self
+ {
+ $this->optionBuilder->setAllowedValues($allowedValues);
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function setNormalizer(\Closure $normalizer): self
+ {
+ $this->optionBuilder->setNormalizer($normalizer);
+
+ return $this;
+ }
+
+ public function getOption(): AliasedFixerOption
+ {
+ return new AliasedFixerOption(
+ $this->optionBuilder->getOption(),
+ $this->alias
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AllowedValueSubset.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AllowedValueSubset.php
new file mode 100644
index 0000000..3317605
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/AllowedValueSubset.php
@@ -0,0 +1,56 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+/**
+ * @internal
+ */
+final class AllowedValueSubset
+{
+ /**
+ * @var array
+ */
+ private $allowedValues;
+
+ public function __construct(array $allowedValues)
+ {
+ $this->allowedValues = $allowedValues;
+ }
+
+ /**
+ * Checks whether the given values are a subset of the allowed ones.
+ *
+ * @param mixed $values the value to validate
+ */
+ public function __invoke($values): bool
+ {
+ if (!\is_array($values)) {
+ return false;
+ }
+
+ foreach ($values as $value) {
+ if (!\in_array($value, $this->allowedValues, true)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public function getAllowedValues(): ?array
+ {
+ return $this->allowedValues;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOption.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOption.php
new file mode 100644
index 0000000..41121b1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOption.php
@@ -0,0 +1,95 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+final class DeprecatedFixerOption implements DeprecatedFixerOptionInterface
+{
+ /**
+ * @var FixerOptionInterface
+ */
+ private $option;
+
+ /**
+ * @var string
+ */
+ private $deprecationMessage;
+
+ public function __construct(FixerOptionInterface $option, string $deprecationMessage)
+ {
+ $this->option = $option;
+ $this->deprecationMessage = $deprecationMessage;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName(): string
+ {
+ return $this->option->getName();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDescription(): string
+ {
+ return $this->option->getDescription();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasDefault(): bool
+ {
+ return $this->option->hasDefault();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefault()
+ {
+ return $this->option->getDefault();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAllowedTypes(): ?array
+ {
+ return $this->option->getAllowedTypes();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAllowedValues(): ?array
+ {
+ return $this->option->getAllowedValues();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNormalizer(): ?\Closure
+ {
+ return $this->option->getNormalizer();
+ }
+
+ public function getDeprecationMessage(): string
+ {
+ return $this->deprecationMessage;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOptionInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOptionInterface.php
new file mode 100644
index 0000000..d847aea
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/DeprecatedFixerOptionInterface.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+interface DeprecatedFixerOptionInterface extends FixerOptionInterface
+{
+ public function getDeprecationMessage(): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php
new file mode 100644
index 0000000..6c79e44
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolver.php
@@ -0,0 +1,131 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+use PhpCsFixer\Utils;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+use Symfony\Component\OptionsResolver\OptionsResolver;
+
+final class FixerConfigurationResolver implements FixerConfigurationResolverInterface
+{
+ /**
+ * @var FixerOptionInterface[]
+ */
+ private $options = [];
+
+ /**
+ * @var string[]
+ */
+ private $registeredNames = [];
+
+ /**
+ * @param iterable<FixerOptionInterface> $options
+ */
+ public function __construct(iterable $options)
+ {
+ foreach ($options as $option) {
+ $this->addOption($option);
+ }
+
+ if (empty($this->registeredNames)) {
+ throw new \LogicException('Options cannot be empty.');
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getOptions(): array
+ {
+ return $this->options;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function resolve(array $options): array
+ {
+ $resolver = new OptionsResolver();
+
+ foreach ($this->options as $option) {
+ $name = $option->getName();
+
+ if ($option instanceof AliasedFixerOption) {
+ $alias = $option->getAlias();
+
+ if (\array_key_exists($alias, $options)) {
+ if (\array_key_exists($name, $options)) {
+ throw new InvalidOptionsException(sprintf('Aliased option "%s"/"%s" is passed multiple times.', $name, $alias));
+ }
+
+ Utils::triggerDeprecation(new \RuntimeException(sprintf(
+ 'Option "%s" is deprecated, use "%s" instead.',
+ $alias,
+ $name
+ )));
+
+ $options[$name] = $options[$alias];
+ unset($options[$alias]);
+ }
+ }
+
+ if ($option->hasDefault()) {
+ $resolver->setDefault($name, $option->getDefault());
+ } else {
+ $resolver->setRequired($name);
+ }
+
+ $allowedValues = $option->getAllowedValues();
+ if (null !== $allowedValues) {
+ foreach ($allowedValues as &$allowedValue) {
+ if (\is_object($allowedValue) && \is_callable($allowedValue)) {
+ $allowedValue = static function (/* mixed */ $values) use ($allowedValue) {
+ return $allowedValue($values);
+ };
+ }
+ }
+
+ $resolver->setAllowedValues($name, $allowedValues);
+ }
+
+ $allowedTypes = $option->getAllowedTypes();
+ if (null !== $allowedTypes) {
+ $resolver->setAllowedTypes($name, $allowedTypes);
+ }
+
+ $normalizer = $option->getNormalizer();
+ if (null !== $normalizer) {
+ $resolver->setNormalizer($name, $normalizer);
+ }
+ }
+
+ return $resolver->resolve($options);
+ }
+
+ /**
+ * @throws \LogicException when the option is already defined
+ */
+ private function addOption(FixerOptionInterface $option): void
+ {
+ $name = $option->getName();
+
+ if (\in_array($name, $this->registeredNames, true)) {
+ throw new \LogicException(sprintf('The "%s" option is defined multiple times.', $name));
+ }
+
+ $this->options[] = $option;
+ $this->registeredNames[] = $name;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolverInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolverInterface.php
new file mode 100644
index 0000000..d0932ac
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerConfigurationResolverInterface.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+interface FixerConfigurationResolverInterface
+{
+ /**
+ * @return FixerOptionInterface[]
+ */
+ public function getOptions(): array;
+
+ /**
+ * @param array<string, mixed> $configuration
+ *
+ * @return array<string, mixed>
+ */
+ public function resolve(array $configuration): array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php
new file mode 100644
index 0000000..f25b52b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php
@@ -0,0 +1,169 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+final class FixerOption implements FixerOptionInterface
+{
+ /**
+ * @var string
+ */
+ private $name;
+
+ /**
+ * @var string
+ */
+ private $description;
+
+ /**
+ * @var mixed
+ */
+ private $default;
+
+ /**
+ * @var bool
+ */
+ private $isRequired;
+
+ /**
+ * @var null|string[]
+ */
+ private $allowedTypes;
+
+ /**
+ * @var null|array
+ */
+ private $allowedValues;
+
+ /**
+ * @var null|\Closure
+ */
+ private $normalizer;
+
+ /**
+ * @param mixed $default
+ * @param null|string[] $allowedTypes
+ */
+ public function __construct(
+ string $name,
+ string $description,
+ bool $isRequired = true,
+ $default = null,
+ ?array $allowedTypes = null,
+ ?array $allowedValues = null,
+ ?\Closure $normalizer = null
+ ) {
+ if ($isRequired && null !== $default) {
+ throw new \LogicException('Required options cannot have a default value.');
+ }
+
+ if (null !== $allowedValues) {
+ foreach ($allowedValues as &$allowedValue) {
+ if ($allowedValue instanceof \Closure) {
+ $allowedValue = $this->unbind($allowedValue);
+ }
+ }
+ }
+
+ $this->name = $name;
+ $this->description = $description;
+ $this->isRequired = $isRequired;
+ $this->default = $default;
+ $this->allowedTypes = $allowedTypes;
+ $this->allowedValues = $allowedValues;
+ if (null !== $normalizer) {
+ $this->normalizer = $this->unbind($normalizer);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDescription(): string
+ {
+ return $this->description;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasDefault(): bool
+ {
+ return !$this->isRequired;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefault()
+ {
+ if (!$this->hasDefault()) {
+ throw new \LogicException('No default value defined.');
+ }
+
+ return $this->default;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAllowedTypes(): ?array
+ {
+ return $this->allowedTypes;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getAllowedValues(): ?array
+ {
+ return $this->allowedValues;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNormalizer(): ?\Closure
+ {
+ return $this->normalizer;
+ }
+
+ /**
+ * Unbinds the given closure to avoid memory leaks.
+ *
+ * The closures provided to this class were probably defined in a fixer
+ * class and thus bound to it by default. The configuration will then be
+ * stored in {@see AbstractFixer::$configurationDefinition}, leading to the
+ * following cyclic reference:
+ *
+ * fixer -> configuration definition -> options -> closures -> fixer
+ *
+ * This cyclic reference prevent the garbage collector to free memory as
+ * all elements are still referenced.
+ *
+ * See {@see https://bugs.php.net/bug.php?id=69639 Bug #69639} for details.
+ */
+ private function unbind(\Closure $closure): \Closure
+ {
+ return $closure->bindTo(null);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php
new file mode 100644
index 0000000..499be70
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionBuilder.php
@@ -0,0 +1,138 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+final class FixerOptionBuilder
+{
+ /**
+ * @var string
+ */
+ private $name;
+
+ /**
+ * @var string
+ */
+ private $description;
+
+ /**
+ * @var mixed
+ */
+ private $default;
+
+ /**
+ * @var bool
+ */
+ private $isRequired = true;
+
+ /**
+ * @var null|string[]
+ */
+ private $allowedTypes;
+
+ /**
+ * @var null|array
+ */
+ private $allowedValues;
+
+ /**
+ * @var null|\Closure
+ */
+ private $normalizer;
+
+ /**
+ * @var null|string
+ */
+ private $deprecationMessage;
+
+ public function __construct(string $name, string $description)
+ {
+ $this->name = $name;
+ $this->description = $description;
+ }
+
+ /**
+ * @param mixed $default
+ *
+ * @return $this
+ */
+ public function setDefault($default): self
+ {
+ $this->default = $default;
+ $this->isRequired = false;
+
+ return $this;
+ }
+
+ /**
+ * @param string[] $allowedTypes
+ *
+ * @return $this
+ */
+ public function setAllowedTypes(array $allowedTypes): self
+ {
+ $this->allowedTypes = $allowedTypes;
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function setAllowedValues(array $allowedValues): self
+ {
+ $this->allowedValues = $allowedValues;
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function setNormalizer(\Closure $normalizer): self
+ {
+ $this->normalizer = $normalizer;
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function setDeprecationMessage(?string $deprecationMessage): self
+ {
+ $this->deprecationMessage = $deprecationMessage;
+
+ return $this;
+ }
+
+ public function getOption(): FixerOptionInterface
+ {
+ $option = new FixerOption(
+ $this->name,
+ $this->description,
+ $this->isRequired,
+ $this->default,
+ $this->allowedTypes,
+ $this->allowedValues,
+ $this->normalizer
+ );
+
+ if (null !== $this->deprecationMessage) {
+ $option = new DeprecatedFixerOption($option, $this->deprecationMessage);
+ }
+
+ return $option;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php
new file mode 100644
index 0000000..f7bfaeb
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOptionInterface.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+interface FixerOptionInterface
+{
+ public function getName(): string;
+
+ public function getDescription(): string;
+
+ public function hasDefault(): bool;
+
+ /**
+ * @throws \LogicException when no default value is defined
+ *
+ * @return mixed
+ */
+ public function getDefault();
+
+ /**
+ * @return null|string[]
+ */
+ public function getAllowedTypes(): ?array;
+
+ public function getAllowedValues(): ?array;
+
+ public function getNormalizer(): ?\Closure;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php
new file mode 100644
index 0000000..e1957ac
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerConfiguration/InvalidOptionsForEnvException.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerConfiguration;
+
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class InvalidOptionsForEnvException extends InvalidOptionsException
+{
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php
new file mode 100644
index 0000000..dd5e473
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSample.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class CodeSample implements CodeSampleInterface
+{
+ /**
+ * @var string
+ */
+ private $code;
+
+ /**
+ * @var null|array
+ */
+ private $configuration;
+
+ public function __construct(string $code, ?array $configuration = null)
+ {
+ $this->code = $code;
+ $this->configuration = $configuration;
+ }
+
+ public function getCode(): string
+ {
+ return $this->code;
+ }
+
+ public function getConfiguration(): ?array
+ {
+ return $this->configuration;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php
new file mode 100644
index 0000000..7d4971f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/CodeSampleInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface CodeSampleInterface
+{
+ public function getCode(): string;
+
+ public function getConfiguration(): ?array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSample.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSample.php
new file mode 100644
index 0000000..24a1f72
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSample.php
@@ -0,0 +1,66 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FileSpecificCodeSample implements FileSpecificCodeSampleInterface
+{
+ /**
+ * @var CodeSampleInterface
+ */
+ private $codeSample;
+
+ /**
+ * @var \SplFileInfo
+ */
+ private $splFileInfo;
+
+ public function __construct(
+ string $code,
+ \SplFileInfo $splFileInfo,
+ ?array $configuration = null
+ ) {
+ $this->codeSample = new CodeSample($code, $configuration);
+ $this->splFileInfo = $splFileInfo;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCode(): string
+ {
+ return $this->codeSample->getCode();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getConfiguration(): ?array
+ {
+ return $this->codeSample->getConfiguration();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getSplFileInfo(): \SplFileInfo
+ {
+ return $this->splFileInfo;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSampleInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSampleInterface.php
new file mode 100644
index 0000000..df6f092
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FileSpecificCodeSampleInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+interface FileSpecificCodeSampleInterface extends CodeSampleInterface
+{
+ public function getSplFileInfo(): \SplFileInfo;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinition.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinition.php
new file mode 100644
index 0000000..87fb055
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinition.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class FixerDefinition implements FixerDefinitionInterface
+{
+ /**
+ * @var null|string
+ */
+ private $riskyDescription;
+
+ /**
+ * @var CodeSampleInterface[]
+ */
+ private $codeSamples;
+
+ /**
+ * @var string
+ */
+ private $summary;
+
+ /**
+ * @var null|string
+ */
+ private $description;
+
+ /**
+ * @param CodeSampleInterface[] $codeSamples array of samples, where single sample is [code, configuration]
+ * @param null|string $riskyDescription null for non-risky fixer
+ */
+ public function __construct(
+ string $summary,
+ array $codeSamples,
+ ?string $description = null,
+ ?string $riskyDescription = null
+ ) {
+ $this->summary = $summary;
+ $this->codeSamples = $codeSamples;
+ $this->description = $description;
+ $this->riskyDescription = $riskyDescription;
+ }
+
+ public function getSummary(): string
+ {
+ return $this->summary;
+ }
+
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ public function getRiskyDescription(): ?string
+ {
+ return $this->riskyDescription;
+ }
+
+ public function getCodeSamples(): array
+ {
+ return $this->codeSamples;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinitionInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinitionInterface.php
new file mode 100644
index 0000000..85c2282
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/FixerDefinitionInterface.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface FixerDefinitionInterface
+{
+ public function getSummary(): string;
+
+ public function getDescription(): ?string;
+
+ /**
+ * @return null|string null for non-risky fixer
+ */
+ public function getRiskyDescription(): ?string;
+
+ /**
+ * Array of samples, where single sample is [code, configuration].
+ *
+ * @return CodeSampleInterface[]
+ */
+ public function getCodeSamples(): array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSample.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSample.php
new file mode 100644
index 0000000..aa5a0ab
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSample.php
@@ -0,0 +1,64 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ */
+final class VersionSpecificCodeSample implements VersionSpecificCodeSampleInterface
+{
+ /**
+ * @var CodeSampleInterface
+ */
+ private $codeSample;
+
+ /**
+ * @var VersionSpecificationInterface
+ */
+ private $versionSpecification;
+
+ public function __construct(
+ string $code,
+ VersionSpecificationInterface $versionSpecification,
+ ?array $configuration = null
+ ) {
+ $this->codeSample = new CodeSample($code, $configuration);
+ $this->versionSpecification = $versionSpecification;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCode(): string
+ {
+ return $this->codeSample->getCode();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getConfiguration(): ?array
+ {
+ return $this->codeSample->getConfiguration();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isSuitableFor(int $version): bool
+ {
+ return $this->versionSpecification->isSatisfiedBy($version);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSampleInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSampleInterface.php
new file mode 100644
index 0000000..74e4f44
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificCodeSampleInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Andreas Moeller <am@localheinz.com>
+ */
+interface VersionSpecificCodeSampleInterface extends CodeSampleInterface
+{
+ public function isSuitableFor(int $version): bool;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecification.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecification.php
new file mode 100644
index 0000000..d28cae6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecification.php
@@ -0,0 +1,74 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ */
+final class VersionSpecification implements VersionSpecificationInterface
+{
+ /**
+ * @var null|int
+ */
+ private $minimum;
+
+ /**
+ * @var null|int
+ */
+ private $maximum;
+
+ /**
+ * @throws \InvalidArgumentException
+ */
+ public function __construct(?int $minimum = null, ?int $maximum = null)
+ {
+ if (null === $minimum && null === $maximum) {
+ throw new \InvalidArgumentException('Minimum or maximum need to be specified.');
+ }
+
+ if (null !== $minimum && 1 > $minimum) {
+ throw new \InvalidArgumentException('Minimum needs to be either null or an integer greater than 0.');
+ }
+
+ if (null !== $maximum) {
+ if (1 > $maximum) {
+ throw new \InvalidArgumentException('Maximum needs to be either null or an integer greater than 0.');
+ }
+
+ if (null !== $minimum && $maximum < $minimum) {
+ throw new \InvalidArgumentException('Maximum should not be lower than the minimum.');
+ }
+ }
+
+ $this->minimum = $minimum;
+ $this->maximum = $maximum;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(int $version): bool
+ {
+ if (null !== $this->minimum && $version < $this->minimum) {
+ return false;
+ }
+
+ if (null !== $this->maximum && $version > $this->maximum) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificationInterface.php b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificationInterface.php
new file mode 100644
index 0000000..502cdc4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerDefinition/VersionSpecificationInterface.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\FixerDefinition;
+
+/**
+ * @author Andreas Möller <am@localheinz.com>
+ */
+interface VersionSpecificationInterface
+{
+ public function isSatisfiedBy(int $version): bool;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php b/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php
new file mode 100644
index 0000000..2ad10fd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerFactory.php
@@ -0,0 +1,238 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+use PhpCsFixer\Fixer\ConfigurableFixerInterface;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
+use PhpCsFixer\RuleSet\RuleSetInterface;
+use Symfony\Component\Finder\Finder as SymfonyFinder;
+use Symfony\Component\Finder\SplFileInfo;
+
+/**
+ * Class provides a way to create a group of fixers.
+ *
+ * Fixers may be registered (made the factory aware of them) by
+ * registering a custom fixer and default, built in fixers.
+ * Then, one can attach Config instance to fixer instances.
+ *
+ * Finally factory creates a ready to use group of fixers.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FixerFactory
+{
+ /**
+ * @var FixerNameValidator
+ */
+ private $nameValidator;
+
+ /**
+ * @var FixerInterface[]
+ */
+ private $fixers = [];
+
+ /**
+ * @var FixerInterface[] Associative array of fixers with names as keys
+ */
+ private $fixersByName = [];
+
+ public function __construct()
+ {
+ $this->nameValidator = new FixerNameValidator();
+ }
+
+ public function setWhitespacesConfig(WhitespacesFixerConfig $config): self
+ {
+ foreach ($this->fixers as $fixer) {
+ if ($fixer instanceof WhitespacesAwareFixerInterface) {
+ $fixer->setWhitespacesConfig($config);
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return FixerInterface[]
+ */
+ public function getFixers(): array
+ {
+ $this->fixers = Utils::sortFixers($this->fixers);
+
+ return $this->fixers;
+ }
+
+ /**
+ * @return $this
+ */
+ public function registerBuiltInFixers(): self
+ {
+ static $builtInFixers = null;
+
+ if (null === $builtInFixers) {
+ $builtInFixers = [];
+
+ /** @var SplFileInfo $file */
+ foreach (SymfonyFinder::create()->files()->in(__DIR__.'/Fixer')->name('*Fixer.php')->depth(1) as $file) {
+ $relativeNamespace = $file->getRelativePath();
+ $fixerClass = 'PhpCsFixer\\Fixer\\'.($relativeNamespace ? $relativeNamespace.'\\' : '').$file->getBasename('.php');
+ $builtInFixers[] = $fixerClass;
+ }
+ }
+
+ foreach ($builtInFixers as $class) {
+ $this->registerFixer(new $class(), false);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @param FixerInterface[] $fixers
+ *
+ * @return $this
+ */
+ public function registerCustomFixers(iterable $fixers): self
+ {
+ foreach ($fixers as $fixer) {
+ $this->registerFixer($fixer, true);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ */
+ public function registerFixer(FixerInterface $fixer, bool $isCustom): self
+ {
+ $name = $fixer->getName();
+
+ if (isset($this->fixersByName[$name])) {
+ throw new \UnexpectedValueException(sprintf('Fixer named "%s" is already registered.', $name));
+ }
+
+ if (!$this->nameValidator->isValid($name, $isCustom)) {
+ throw new \UnexpectedValueException(sprintf('Fixer named "%s" has invalid name.', $name));
+ }
+
+ $this->fixers[] = $fixer;
+ $this->fixersByName[$name] = $fixer;
+
+ return $this;
+ }
+
+ /**
+ * Apply RuleSet on fixers to filter out all unwanted fixers.
+ *
+ * @return $this
+ */
+ public function useRuleSet(RuleSetInterface $ruleSet): self
+ {
+ $fixers = [];
+ $fixersByName = [];
+ $fixerConflicts = [];
+
+ $fixerNames = array_keys($ruleSet->getRules());
+ foreach ($fixerNames as $name) {
+ if (!\array_key_exists($name, $this->fixersByName)) {
+ throw new \UnexpectedValueException(sprintf('Rule "%s" does not exist.', $name));
+ }
+
+ $fixer = $this->fixersByName[$name];
+ $config = $ruleSet->getRuleConfiguration($name);
+
+ if (null !== $config) {
+ if ($fixer instanceof ConfigurableFixerInterface) {
+ if (\count($config) < 1) {
+ throw new InvalidFixerConfigurationException($fixer->getName(), 'Configuration must be an array and may not be empty.');
+ }
+
+ $fixer->configure($config);
+ } else {
+ throw new InvalidFixerConfigurationException($fixer->getName(), 'Is not configurable.');
+ }
+ }
+
+ $fixers[] = $fixer;
+ $fixersByName[$name] = $fixer;
+
+ $conflicts = array_intersect($this->getFixersConflicts($fixer), $fixerNames);
+ if (\count($conflicts) > 0) {
+ $fixerConflicts[$name] = $conflicts;
+ }
+ }
+
+ if (\count($fixerConflicts) > 0) {
+ throw new \UnexpectedValueException($this->generateConflictMessage($fixerConflicts));
+ }
+
+ $this->fixers = $fixers;
+ $this->fixersByName = $fixersByName;
+
+ return $this;
+ }
+
+ /**
+ * Check if fixer exists.
+ */
+ public function hasRule(string $name): bool
+ {
+ return isset($this->fixersByName[$name]);
+ }
+
+ /**
+ * @return null|string[]
+ */
+ private function getFixersConflicts(FixerInterface $fixer): ?array
+ {
+ static $conflictMap = [
+ 'no_blank_lines_before_namespace' => ['single_blank_line_before_namespace'],
+ 'single_import_per_statement' => ['group_import'],
+ ];
+
+ $fixerName = $fixer->getName();
+
+ return \array_key_exists($fixerName, $conflictMap) ? $conflictMap[$fixerName] : [];
+ }
+
+ /**
+ * @param array<string, string[]> $fixerConflicts
+ */
+ private function generateConflictMessage(array $fixerConflicts): string
+ {
+ $message = 'Rule contains conflicting fixers:';
+ $report = [];
+ foreach ($fixerConflicts as $fixer => $fixers) {
+ // filter mutual conflicts
+ $report[$fixer] = array_filter(
+ $fixers,
+ static function (string $candidate) use ($report, $fixer): bool {
+ return !\array_key_exists($candidate, $report) || !\in_array($fixer, $report[$candidate], true);
+ }
+ );
+
+ if (\count($report[$fixer]) > 0) {
+ $message .= sprintf("\n- \"%s\" with \"%s\"", $fixer, implode('", "', $report[$fixer]));
+ }
+ }
+
+ return $message;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerFileProcessedEvent.php b/vendor/friendsofphp/php-cs-fixer/src/FixerFileProcessedEvent.php
new file mode 100644
index 0000000..d46bb32
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerFileProcessedEvent.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use Symfony\Contracts\EventDispatcher\Event;
+
+/**
+ * Event that is fired when file was processed by Fixer.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FixerFileProcessedEvent extends Event
+{
+ /**
+ * Event name.
+ */
+ public const NAME = 'fixer.file_processed';
+
+ public const STATUS_UNKNOWN = 0;
+ public const STATUS_INVALID = 1;
+ public const STATUS_SKIPPED = 2;
+ public const STATUS_NO_CHANGES = 3;
+ public const STATUS_FIXED = 4;
+ public const STATUS_EXCEPTION = 5;
+ public const STATUS_LINT = 6;
+
+ /**
+ * @var int
+ */
+ private $status;
+
+ public function __construct(int $status)
+ {
+ $this->status = $status;
+ }
+
+ public function getStatus(): int
+ {
+ return $this->status;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/FixerNameValidator.php b/vendor/friendsofphp/php-cs-fixer/src/FixerNameValidator.php
new file mode 100644
index 0000000..ce2697d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/FixerNameValidator.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FixerNameValidator
+{
+ public function isValid(string $name, bool $isCustom): bool
+ {
+ if (!$isCustom) {
+ return 1 === Preg::match('/^[a-z][a-z0-9_]*$/', $name);
+ }
+
+ return 1 === Preg::match('/^[A-Z][a-zA-Z0-9]*\/[a-z][a-z0-9_]*$/', $name);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php b/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php
new file mode 100644
index 0000000..21d089b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Indicator/PhpUnitTestCaseIndicator.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Indicator;
+
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class PhpUnitTestCaseIndicator
+{
+ public function isPhpUnitClass(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isGivenKind(T_CLASS)) {
+ throw new \LogicException(sprintf('No "T_CLASS" at given index %d, got "%s".', $index, $tokens[$index]->getName()));
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ return false;
+ }
+
+ if (0 !== Preg::match('/(?:Test|TestCase)$/', $tokens[$index]->getContent())) {
+ return true;
+ }
+
+ while (null !== $index = $tokens->getNextMeaningfulToken($index)) {
+ if ($tokens[$index]->equals('{')) {
+ break; // end of class signature
+ }
+
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ continue; // not part of extends nor part of implements; so continue
+ }
+
+ if (0 !== Preg::match('/(?:Test|TestCase)(?:Interface)?$/', $tokens[$index]->getContent())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @return \Generator array of [int start, int end] indexes from sooner to later classes
+ */
+ public function findPhpUnitClasses(Tokens $tokens): \Generator
+ {
+ for ($index = $tokens->count() - 1; $index > 0; --$index) {
+ if (!$tokens[$index]->isGivenKind(T_CLASS) || !$this->isPhpUnitClass($tokens, $index)) {
+ continue;
+ }
+
+ $startIndex = $tokens->getNextTokenOfKind($index, ['{']);
+
+ if (null === $startIndex) {
+ return;
+ }
+
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $startIndex);
+ yield [$startIndex, $endIndex];
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/CachingLinter.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/CachingLinter.php
new file mode 100644
index 0000000..6da3898
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/CachingLinter.php
@@ -0,0 +1,74 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class CachingLinter implements LinterInterface
+{
+ /**
+ * @var LinterInterface
+ */
+ private $sublinter;
+
+ /**
+ * @var array<int, LintingResultInterface>
+ */
+ private $cache = [];
+
+ public function __construct(LinterInterface $linter)
+ {
+ $this->sublinter = $linter;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isAsync(): bool
+ {
+ return $this->sublinter->isAsync();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintFile(string $path): LintingResultInterface
+ {
+ $checksum = crc32(file_get_contents($path));
+
+ if (!isset($this->cache[$checksum])) {
+ $this->cache[$checksum] = $this->sublinter->lintFile($path);
+ }
+
+ return $this->cache[$checksum];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintSource(string $source): LintingResultInterface
+ {
+ $checksum = crc32($source);
+
+ if (!isset($this->cache[$checksum])) {
+ $this->cache[$checksum] = $this->sublinter->lintSource($source);
+ }
+
+ return $this->cache[$checksum];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/Linter.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/Linter.php
new file mode 100644
index 0000000..563b117
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/Linter.php
@@ -0,0 +1,66 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * Handle PHP code linting process.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class Linter implements LinterInterface
+{
+ /**
+ * @var LinterInterface
+ */
+ private $sublinter;
+
+ /**
+ * @param null|string $executable PHP executable, null for autodetection
+ */
+ public function __construct(?string $executable = null)
+ {
+ try {
+ $this->sublinter = new TokenizerLinter();
+ } catch (UnavailableLinterException $e) {
+ $this->sublinter = new ProcessLinter($executable);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isAsync(): bool
+ {
+ return $this->sublinter->isAsync();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintFile(string $path): LintingResultInterface
+ {
+ return $this->sublinter->lintFile($path);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintSource(string $source): LintingResultInterface
+ {
+ return $this->sublinter->lintSource($source);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/LinterInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/LinterInterface.php
new file mode 100644
index 0000000..1b5c2db
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/LinterInterface.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * Interface for PHP code linting process manager.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface LinterInterface
+{
+ public function isAsync(): bool;
+
+ /**
+ * Lint PHP file.
+ */
+ public function lintFile(string $path): LintingResultInterface;
+
+ /**
+ * Lint PHP code.
+ */
+ public function lintSource(string $source): LintingResultInterface;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/LintingException.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/LintingException.php
new file mode 100644
index 0000000..eb24dda
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/LintingException.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @final
+ * @TODO 4.0 make class "final"
+ */
+class LintingException extends \RuntimeException
+{
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/LintingResultInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/LintingResultInterface.php
new file mode 100644
index 0000000..855d695
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/LintingResultInterface.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface LintingResultInterface
+{
+ /**
+ * Check if linting process was successful and raise LintingException if not.
+ */
+ public function check(): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php
new file mode 100644
index 0000000..d19b69e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinter.php
@@ -0,0 +1,167 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+use PhpCsFixer\FileReader;
+use PhpCsFixer\FileRemoval;
+use Symfony\Component\Filesystem\Exception\IOException;
+use Symfony\Component\Process\PhpExecutableFinder;
+use Symfony\Component\Process\Process;
+
+/**
+ * Handle PHP code linting using separated process of `php -l _file_`.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ProcessLinter implements LinterInterface
+{
+ /**
+ * @var FileRemoval
+ */
+ private $fileRemoval;
+
+ /**
+ * @var ProcessLinterProcessBuilder
+ */
+ private $processBuilder;
+
+ /**
+ * Temporary file for code linting.
+ *
+ * @var null|string
+ */
+ private $temporaryFile;
+
+ /**
+ * @param null|string $executable PHP executable, null for autodetection
+ */
+ public function __construct(?string $executable = null)
+ {
+ if (null === $executable) {
+ $executableFinder = new PhpExecutableFinder();
+ $executable = $executableFinder->find(false);
+
+ if (false === $executable) {
+ throw new UnavailableLinterException('Cannot find PHP executable.');
+ }
+
+ if ('phpdbg' === \PHP_SAPI) {
+ if (!str_contains($executable, 'phpdbg')) {
+ throw new UnavailableLinterException('Automatically found PHP executable is non-standard phpdbg. Could not find proper PHP executable.');
+ }
+
+ // automatically found executable is `phpdbg`, let us try to fallback to regular `php`
+ $executable = str_replace('phpdbg', 'php', $executable);
+
+ if (!is_executable($executable)) {
+ throw new UnavailableLinterException('Automatically found PHP executable is phpdbg. Could not find proper PHP executable.');
+ }
+ }
+ }
+
+ $this->processBuilder = new ProcessLinterProcessBuilder($executable);
+
+ $this->fileRemoval = new FileRemoval();
+ }
+
+ public function __destruct()
+ {
+ if (null !== $this->temporaryFile) {
+ $this->fileRemoval->delete($this->temporaryFile);
+ }
+ }
+
+ /**
+ * This class is not intended to be serialized,
+ * and cannot be deserialized (see __wakeup method).
+ */
+ public function __sleep(): array
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ /**
+ * Disable the deserialization of the class to prevent attacker executing
+ * code by leveraging the __destruct method.
+ *
+ * @see https://owasp.org/www-community/vulnerabilities/PHP_Object_Injection
+ */
+ public function __wakeup(): void
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isAsync(): bool
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintFile(string $path): LintingResultInterface
+ {
+ return new ProcessLintingResult($this->createProcessForFile($path), $path);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintSource(string $source): LintingResultInterface
+ {
+ return new ProcessLintingResult($this->createProcessForSource($source), $this->temporaryFile);
+ }
+
+ /**
+ * @param string $path path to file
+ */
+ private function createProcessForFile(string $path): Process
+ {
+ // in case php://stdin
+ if (!is_file($path)) {
+ return $this->createProcessForSource(FileReader::createSingleton()->read($path));
+ }
+
+ $process = $this->processBuilder->build($path);
+ $process->setTimeout(10);
+ $process->start();
+
+ return $process;
+ }
+
+ /**
+ * Create process that lint PHP code.
+ *
+ * @param string $source code
+ */
+ private function createProcessForSource(string $source): Process
+ {
+ if (null === $this->temporaryFile) {
+ $this->temporaryFile = tempnam(sys_get_temp_dir(), 'cs_fixer_tmp_');
+ $this->fileRemoval->observe($this->temporaryFile);
+ }
+
+ if (false === @file_put_contents($this->temporaryFile, $source)) {
+ throw new IOException(sprintf('Failed to write file "%s".', $this->temporaryFile), 0, null, $this->temporaryFile);
+ }
+
+ return $this->createProcessForFile($this->temporaryFile);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinterProcessBuilder.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinterProcessBuilder.php
new file mode 100644
index 0000000..4b6403e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLinterProcessBuilder.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+use Symfony\Component\Process\Process;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ProcessLinterProcessBuilder
+{
+ /**
+ * @var string
+ */
+ private $executable;
+
+ /**
+ * @param string $executable PHP executable
+ */
+ public function __construct(string $executable)
+ {
+ $this->executable = $executable;
+ }
+
+ public function build(string $path): Process
+ {
+ return new Process([
+ $this->executable,
+ '-l',
+ $path,
+ ]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php
new file mode 100644
index 0000000..808f795
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/ProcessLintingResult.php
@@ -0,0 +1,97 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+use Symfony\Component\Process\Process;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ProcessLintingResult implements LintingResultInterface
+{
+ /**
+ * @var bool
+ */
+ private $isSuccessful;
+
+ /**
+ * @var Process
+ */
+ private $process;
+
+ /**
+ * @var null|string
+ */
+ private $path;
+
+ public function __construct(Process $process, ?string $path = null)
+ {
+ $this->process = $process;
+ $this->path = $path;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check(): void
+ {
+ if (!$this->isSuccessful()) {
+ // on some systems stderr is used, but on others, it's not
+ throw new LintingException($this->getProcessErrorMessage(), $this->process->getExitCode());
+ }
+ }
+
+ private function getProcessErrorMessage(): string
+ {
+ $output = strtok(ltrim($this->process->getErrorOutput() ?: $this->process->getOutput()), "\n");
+
+ if (false === $output) {
+ return 'Fatal error: Unable to lint file.';
+ }
+
+ if (null !== $this->path) {
+ $needle = sprintf('in %s ', $this->path);
+ $pos = strrpos($output, $needle);
+
+ if (false !== $pos) {
+ $output = sprintf('%s%s', substr($output, 0, $pos), substr($output, $pos + \strlen($needle)));
+ }
+ }
+
+ $prefix = substr($output, 0, 18);
+
+ if ('PHP Parse error: ' === $prefix) {
+ return sprintf('Parse error: %s.', substr($output, 18));
+ }
+
+ if ('PHP Fatal error: ' === $prefix) {
+ return sprintf('Fatal error: %s.', substr($output, 18));
+ }
+
+ return sprintf('%s.', $output);
+ }
+
+ private function isSuccessful(): bool
+ {
+ if (null === $this->isSuccessful) {
+ $this->process->wait();
+ $this->isSuccessful = $this->process->isSuccessful();
+ }
+
+ return $this->isSuccessful;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLinter.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLinter.php
new file mode 100644
index 0000000..e017bbc
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLinter.php
@@ -0,0 +1,77 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+use PhpCsFixer\FileReader;
+use PhpCsFixer\Tokenizer\CodeHasher;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Handle PHP code linting.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class TokenizerLinter implements LinterInterface
+{
+ public function __construct()
+ {
+ if (
+ // @TODO: drop condition when PHP 7.3+ is required
+ false === class_exists(\CompileError::class)
+ ) {
+ throw new UnavailableLinterException('Cannot use tokenizer as linter.');
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isAsync(): bool
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintFile(string $path): LintingResultInterface
+ {
+ return $this->lintSource(FileReader::createSingleton()->read($path));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lintSource(string $source): LintingResultInterface
+ {
+ try {
+ // To lint, we will parse the source into Tokens.
+ // During that process, it might throw a ParseError or CompileError.
+ // If it won't, cache of tokenized version of source will be kept, which is great for Runner.
+ // Yet, first we need to clear already existing cache to not hit it and lint the code indeed.
+ $codeHash = CodeHasher::calculateCodeHash($source);
+ Tokens::clearCache($codeHash);
+ Tokens::fromCode($source);
+
+ return new TokenizerLintingResult();
+ } catch (\ParseError $e) {
+ return new TokenizerLintingResult($e);
+ } catch (\CompileError $e) {
+ return new TokenizerLintingResult($e);
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php
new file mode 100644
index 0000000..ea49e49
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/TokenizerLintingResult.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class TokenizerLintingResult implements LintingResultInterface
+{
+ /**
+ * @var null|\Error
+ */
+ private $error;
+
+ public function __construct(?\Error $error = null)
+ {
+ $this->error = $error;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function check(): void
+ {
+ if (null !== $this->error) {
+ throw new LintingException(
+ sprintf('%s: %s on line %d.', $this->getMessagePrefix(), $this->error->getMessage(), $this->error->getLine()),
+ $this->error->getCode(),
+ $this->error
+ );
+ }
+ }
+
+ private function getMessagePrefix(): string
+ {
+ return $this->error instanceof \ParseError ? 'Parse error' : 'Fatal error';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Linter/UnavailableLinterException.php b/vendor/friendsofphp/php-cs-fixer/src/Linter/UnavailableLinterException.php
new file mode 100644
index 0000000..32e2765
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Linter/UnavailableLinterException.php
@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Linter;
+
+/**
+ * Exception that is thrown when the chosen linter is not available on the environment.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @final
+ * @TODO 4.0 make class "final"
+ */
+class UnavailableLinterException extends \RuntimeException
+{
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/PharChecker.php b/vendor/friendsofphp/php-cs-fixer/src/PharChecker.php
new file mode 100644
index 0000000..fb35242
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/PharChecker.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @internal
+ */
+final class PharChecker implements PharCheckerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function checkFileValidity(string $filename): ?string
+ {
+ try {
+ $phar = new \Phar($filename);
+ // free the variable to unlock the file
+ unset($phar);
+ } catch (\Exception $e) {
+ if (!$e instanceof \UnexpectedValueException && !$e instanceof \PharException) {
+ throw $e;
+ }
+
+ return 'Failed to create Phar instance. '.$e->getMessage();
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/PharCheckerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/PharCheckerInterface.php
new file mode 100644
index 0000000..6ae2208
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/PharCheckerInterface.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @internal
+ */
+interface PharCheckerInterface
+{
+ /**
+ * @return null|string the invalidity reason if any, null otherwise
+ */
+ public function checkFileValidity(string $filename): ?string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Preg.php b/vendor/friendsofphp/php-cs-fixer/src/Preg.php
new file mode 100644
index 0000000..f238e11
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Preg.php
@@ -0,0 +1,209 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * This class replaces preg_* functions to better handling UTF8 strings,
+ * ensuring no matter "u" modifier is present or absent subject will be handled correctly.
+ *
+ * @author Kuba Werłos <werlos@gmail.com>
+ *
+ * @internal
+ */
+final class Preg
+{
+ /**
+ * @param null|string[] $matches
+ *
+ * @throws PregException
+ */
+ public static function match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
+ {
+ $result = @preg_match(self::addUtf8Modifier($pattern), $subject, $matches, $flags, $offset);
+ if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ $result = @preg_match(self::removeUtf8Modifier($pattern), $subject, $matches, $flags, $offset);
+ if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ throw self::newPregException(preg_last_error(), __METHOD__, (array) $pattern);
+ }
+
+ /**
+ * @param null|string[] $matches
+ *
+ * @throws PregException
+ */
+ public static function matchAll(string $pattern, string $subject, ?array &$matches = null, int $flags = PREG_PATTERN_ORDER, int $offset = 0): int
+ {
+ $result = @preg_match_all(self::addUtf8Modifier($pattern), $subject, $matches, $flags, $offset);
+ if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ $result = @preg_match_all(self::removeUtf8Modifier($pattern), $subject, $matches, $flags, $offset);
+ if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ throw self::newPregException(preg_last_error(), __METHOD__, (array) $pattern);
+ }
+
+ /**
+ * @param string|string[] $pattern
+ * @param string|string[] $replacement
+ * @param string|string[] $subject
+ *
+ * @throws PregException
+ *
+ * @return string|string[]
+ */
+ public static function replace($pattern, $replacement, $subject, int $limit = -1, ?int &$count = null)
+ {
+ $result = @preg_replace(self::addUtf8Modifier($pattern), $replacement, $subject, $limit, $count);
+ if (null !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ $result = @preg_replace(self::removeUtf8Modifier($pattern), $replacement, $subject, $limit, $count);
+ if (null !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ throw self::newPregException(preg_last_error(), __METHOD__, (array) $pattern);
+ }
+
+ /**
+ * @param string|string[] $pattern
+ * @param string|string[] $subject
+ *
+ * @throws PregException
+ *
+ * @return string|string[]
+ */
+ public static function replaceCallback($pattern, callable $callback, $subject, int $limit = -1, ?int &$count = null)
+ {
+ $result = @preg_replace_callback(self::addUtf8Modifier($pattern), $callback, $subject, $limit, $count);
+ if (null !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ $result = @preg_replace_callback(self::removeUtf8Modifier($pattern), $callback, $subject, $limit, $count);
+ if (null !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ throw self::newPregException(preg_last_error(), __METHOD__, (array) $pattern);
+ }
+
+ /**
+ * @throws PregException
+ *
+ * @return string[]
+ */
+ public static function split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array
+ {
+ $result = @preg_split(self::addUtf8Modifier($pattern), $subject, $limit, $flags);
+ if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ $result = @preg_split(self::removeUtf8Modifier($pattern), $subject, $limit, $flags);
+ if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
+ return $result;
+ }
+
+ throw self::newPregException(preg_last_error(), __METHOD__, (array) $pattern);
+ }
+
+ /**
+ * @param string|string[] $pattern
+ *
+ * @return string|string[]
+ */
+ private static function addUtf8Modifier($pattern)
+ {
+ if (\is_array($pattern)) {
+ return array_map(__METHOD__, $pattern);
+ }
+
+ return $pattern.'u';
+ }
+
+ /**
+ * @param string|string[] $pattern
+ *
+ * @return string|string[]
+ */
+ private static function removeUtf8Modifier($pattern)
+ {
+ if (\is_array($pattern)) {
+ return array_map(__METHOD__, $pattern);
+ }
+
+ if ('' === $pattern) {
+ return '';
+ }
+
+ $delimiter = $pattern[0];
+
+ $endDelimiterPosition = strrpos($pattern, $delimiter);
+
+ return substr($pattern, 0, $endDelimiterPosition).str_replace('u', '', substr($pattern, $endDelimiterPosition));
+ }
+
+ /**
+ * Create PregException.
+ *
+ * Create the generic PregException message and if possible due to finding
+ * an invalid pattern, tell more about such kind of error in the message.
+ *
+ * @param string[] $patterns
+ */
+ private static function newPregException(int $error, string $method, array $patterns): PregException
+ {
+ foreach ($patterns as $pattern) {
+ $last = error_get_last();
+ $result = @preg_match($pattern, '');
+
+ if (false !== $result) {
+ continue;
+ }
+
+ $code = preg_last_error();
+ $next = error_get_last();
+
+ if ($last !== $next) {
+ $message = sprintf(
+ '(code: %d) %s',
+ $code,
+ preg_replace('~preg_[a-z_]+[()]{2}: ~', '', $next['message'])
+ );
+ } else {
+ $message = sprintf('(code: %d)', $code);
+ }
+
+ return new PregException(
+ sprintf('%s(): Invalid PCRE pattern "%s": %s (version: %s)', $method, $pattern, $message, PCRE_VERSION),
+ $code
+ );
+ }
+
+ return new PregException(sprintf('Error occurred when calling %s.', $method), $error);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/PregException.php b/vendor/friendsofphp/php-cs-fixer/src/PregException.php
new file mode 100644
index 0000000..c91b86c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/PregException.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * Exception that is thrown when PCRE function encounters an error.
+ *
+ * @author Kuba Werłos <werlos@gmail.com>
+ *
+ * @internal
+ */
+final class PregException extends \RuntimeException
+{
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php
new file mode 100644
index 0000000..9c36c3c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractMigrationSetDescription.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet;
+
+use PhpCsFixer\Preg;
+
+/**
+ * @internal
+ */
+abstract class AbstractMigrationSetDescription extends AbstractRuleSetDescription
+{
+ public function getDescription(): string
+ {
+ $name = $this->getName();
+
+ if (0 !== Preg::match('#^@PHPUnit([\d]{2})Migration.*$#', $name, $matches)) {
+ return sprintf('Rules to improve tests code for PHPUnit %d.%d compatibility.', $matches[1][0], $matches[1][1]);
+ }
+
+ if (0 !== Preg::match('#^@PHP([\d]{2})Migration.*$#', $name, $matches)) {
+ return sprintf('Rules to improve code for PHP %d.%d compatibility.', $matches[1][0], $matches[1][1]);
+ }
+
+ throw new \RuntimeException(sprintf('Cannot generate description for "%s" "%s".', static::class, $name));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractRuleSetDescription.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractRuleSetDescription.php
new file mode 100644
index 0000000..d822ffc
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/AbstractRuleSetDescription.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet;
+
+/**
+ * @internal
+ */
+abstract class AbstractRuleSetDescription implements RuleSetDescriptionInterface
+{
+ public function __construct()
+ {
+ }
+
+ public function getName(): string
+ {
+ $name = substr(static::class, 1 + strrpos(static::class, '\\'), -3);
+
+ return '@'.str_replace('Risky', ':risky', $name);
+ }
+
+ public function isRisky(): bool
+ {
+ return str_contains(static::class, 'Risky');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php
new file mode 100644
index 0000000..e8efe9a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSet.php
@@ -0,0 +1,146 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet;
+
+use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
+
+/**
+ * Set of rules to be used by fixer.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class RuleSet implements RuleSetInterface
+{
+ /**
+ * Group of rules generated from input set.
+ *
+ * The key is name of rule, value is bool if the rule/set should be used.
+ * The key must not point to any set.
+ *
+ * @var array
+ */
+ private $rules;
+
+ public function __construct(array $set = [])
+ {
+ foreach ($set as $name => $value) {
+ if ('' === $name) {
+ throw new \InvalidArgumentException('Rule/set name must not be empty.');
+ }
+
+ if (\is_int($name)) {
+ throw new \InvalidArgumentException(sprintf('Missing value for "%s" rule/set.', $value));
+ }
+
+ if (!\is_bool($value) && !\is_array($value)) {
+ $message = str_starts_with($name, '@') ? 'Set must be enabled (true) or disabled (false). Other values are not allowed.' : 'Rule must be enabled (true), disabled (false) or configured (non-empty, assoc array). Other values are not allowed.';
+
+ if (null === $value) {
+ $message .= ' To disable the '.(str_starts_with($name, '@') ? 'set' : 'rule').', use "FALSE" instead of "NULL".';
+ }
+
+ throw new InvalidFixerConfigurationException($name, $message);
+ }
+ }
+
+ $this->resolveSet($set);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasRule(string $rule): bool
+ {
+ return \array_key_exists($rule, $this->rules);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRuleConfiguration(string $rule): ?array
+ {
+ if (!$this->hasRule($rule)) {
+ throw new \InvalidArgumentException(sprintf('Rule "%s" is not in the set.', $rule));
+ }
+
+ if (true === $this->rules[$rule]) {
+ return null;
+ }
+
+ return $this->rules[$rule];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRules(): array
+ {
+ return $this->rules;
+ }
+
+ /**
+ * Resolve input set into group of rules.
+ */
+ private function resolveSet(array $rules): void
+ {
+ $resolvedRules = [];
+
+ // expand sets
+ foreach ($rules as $name => $value) {
+ if (str_starts_with($name, '@')) {
+ if (!\is_bool($value)) {
+ throw new \UnexpectedValueException(sprintf('Nested rule set "%s" configuration must be a boolean.', $name));
+ }
+
+ $set = $this->resolveSubset($name, $value);
+ $resolvedRules = array_merge($resolvedRules, $set);
+ } else {
+ $resolvedRules[$name] = $value;
+ }
+ }
+
+ // filter out all resolvedRules that are off
+ $resolvedRules = array_filter($resolvedRules);
+
+ $this->rules = $resolvedRules;
+ }
+
+ /**
+ * Resolve set rules as part of another set.
+ *
+ * If set value is false then disable all fixers in set,
+ * if not then get value from set item.
+ */
+ private function resolveSubset(string $setName, bool $setValue): array
+ {
+ $rules = RuleSets::getSetDefinition($setName)->getRules();
+
+ foreach ($rules as $name => $value) {
+ if (str_starts_with($name, '@')) {
+ $set = $this->resolveSubset($name, $setValue);
+ unset($rules[$name]);
+ $rules = array_merge($rules, $set);
+ } elseif (!$setValue) {
+ $rules[$name] = false;
+ } else {
+ $rules[$name] = $value;
+ }
+ }
+
+ return $rules;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetDescriptionInterface.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetDescriptionInterface.php
new file mode 100644
index 0000000..1d4555c
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetDescriptionInterface.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet;
+
+/**
+ * @internal
+ */
+interface RuleSetDescriptionInterface
+{
+ public function __construct();
+
+ public function getDescription(): string;
+
+ public function getName(): string;
+
+ /**
+ * Get all rules from rules set.
+ */
+ public function getRules(): array;
+
+ public function isRisky(): bool;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php
new file mode 100644
index 0000000..6149e0e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSetInterface.php
@@ -0,0 +1,46 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet;
+
+/**
+ * Set of rules to be used by fixer.
+ *
+ * Example of set: ["@PSR2" => true, "@PSR1" => false, "strict" => true].
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+interface RuleSetInterface
+{
+ public function __construct(array $set = []);
+
+ /**
+ * Get configuration for given rule.
+ *
+ * @param string $rule name of rule
+ */
+ public function getRuleConfiguration(string $rule): ?array;
+
+ /**
+ * Get all rules from rules set.
+ */
+ public function getRules(): array;
+
+ /**
+ * Check given rule is in rules set.
+ *
+ * @param string $rule name of rule
+ */
+ public function hasRule(string $rule): bool;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php
new file mode 100644
index 0000000..2b0969f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/RuleSets.php
@@ -0,0 +1,70 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet;
+
+use Symfony\Component\Finder\Finder;
+
+/**
+ * Set of rule sets to be used by fixer.
+ *
+ * @internal
+ */
+final class RuleSets
+{
+ /**
+ * @var array<string,RuleSetDescriptionInterface>
+ */
+ private static $setDefinitions;
+
+ /**
+ * @return array<string, RuleSetDescriptionInterface>
+ */
+ public static function getSetDefinitions(): array
+ {
+ if (null === self::$setDefinitions) {
+ self::$setDefinitions = [];
+
+ foreach (Finder::create()->files()->in(__DIR__.'/Sets') as $file) {
+ $class = 'PhpCsFixer\RuleSet\Sets\\'.$file->getBasename('.php');
+ $set = new $class();
+
+ self::$setDefinitions[$set->getName()] = $set;
+ }
+
+ ksort(self::$setDefinitions);
+ }
+
+ return self::$setDefinitions;
+ }
+
+ /**
+ * @return string[]
+ */
+ public static function getSetDefinitionNames(): array
+ {
+ return array_keys(self::getSetDefinitions());
+ }
+
+ public static function getSetDefinition(string $name): RuleSetDescriptionInterface
+ {
+ $definitions = self::getSetDefinitions();
+
+ if (!isset($definitions[$name])) {
+ throw new \InvalidArgumentException(sprintf('Set "%s" does not exist.', $name));
+ }
+
+ return $definitions[$name];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php
new file mode 100644
index 0000000..c4d3ae6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/DoctrineAnnotationSet.php
@@ -0,0 +1,42 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class DoctrineAnnotationSet extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ 'doctrine_annotation_array_assignment' => [
+ 'operator' => ':',
+ ],
+ 'doctrine_annotation_braces' => true,
+ 'doctrine_annotation_indentation' => true,
+ 'doctrine_annotation_spaces' => [
+ 'before_array_assignments_colon' => false,
+ ],
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules covering Doctrine annotations with configuration based on examples found in `Doctrine Annotation documentation <https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/annotations.html>`_ and `Symfony documentation <http://symfony.com/doc/master/bundles/SensioFrameworkExtraBundle/annotations/routing.html>`_.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php
new file mode 100644
index 0000000..bb87792
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP54MigrationSet.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP54MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ 'array_syntax' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP56MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP56MigrationRiskySet.php
new file mode 100644
index 0000000..848b350
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP56MigrationRiskySet.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP56MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ 'pow_to_exponentiation' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationRiskySet.php
new file mode 100644
index 0000000..a7fcb21
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationRiskySet.php
@@ -0,0 +1,39 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP70MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP56Migration:risky' => true,
+ 'combine_nested_dirname' => true,
+ 'declare_strict_types' => true,
+ 'non_printable_character' => true,
+ 'random_api_migration' => [
+ 'replacements' => [
+ 'mt_rand' => 'random_int',
+ 'rand' => 'random_int',
+ ],
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationSet.php
new file mode 100644
index 0000000..62b0ad9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP70MigrationSet.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP70MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP54Migration' => true,
+ 'ternary_to_null_coalescing' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationRiskySet.php
new file mode 100644
index 0000000..5a57f26
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationRiskySet.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP71MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP70Migration:risky' => true,
+ 'void_return' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationSet.php
new file mode 100644
index 0000000..9379628
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP71MigrationSet.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP71MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP70Migration' => true,
+ 'list_syntax' => true,
+ 'visibility_required' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP73MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP73MigrationSet.php
new file mode 100644
index 0000000..aa0ed8f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP73MigrationSet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP73MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP71Migration' => true,
+ 'heredoc_indentation' => true,
+ 'method_argument_space' => ['after_heredoc' => true],
+ 'no_whitespace_before_comma_in_array' => ['after_heredoc' => true],
+ 'trailing_comma_in_multiline' => ['after_heredoc' => true],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationRiskySet.php
new file mode 100644
index 0000000..0a1bc17
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationRiskySet.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP74MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP71Migration:risky' => true,
+ 'implode_call' => true,
+ 'no_alias_functions' => true,
+ 'use_arrow_functions' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationSet.php
new file mode 100644
index 0000000..8af7296
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP74MigrationSet.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP74MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP73Migration' => true,
+ 'assign_null_coalescing_to_coalesce_equal' => true,
+ 'normalize_index_brace' => true,
+ 'short_scalar_cast' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationRiskySet.php
new file mode 100644
index 0000000..e3daabf
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationRiskySet.php
@@ -0,0 +1,39 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP80MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP74Migration:risky' => true,
+ 'modernize_strpos' => true,
+ 'no_alias_functions' => [
+ 'sets' => [
+ '@all',
+ ],
+ ],
+ 'no_php4_constructor' => true,
+ 'no_unneeded_final_method' => true, // final private method (not constructor) are no longer allowed >= PHP8.0
+ 'no_unreachable_default_argument_value' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php
new file mode 100644
index 0000000..8b49a55
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP80MigrationSet.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP80MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP74Migration' => true,
+ 'clean_namespace' => true,
+ 'no_unset_cast' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php
new file mode 100644
index 0000000..eaa27e9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHP81MigrationSet.php
@@ -0,0 +1,31 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHP81MigrationSet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHP80Migration' => true,
+ 'octal_notation' => true,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php
new file mode 100644
index 0000000..1cabfc0
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit30MigrationRiskySet.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit30MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ 'php_unit_dedicate_assert' => [
+ 'target' => PhpUnitTargetVersion::VERSION_3_0,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php
new file mode 100644
index 0000000..fb4cbfb
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit32MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit32MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit30Migration:risky' => true,
+ 'php_unit_no_expectation_annotation' => [
+ 'target' => PhpUnitTargetVersion::VERSION_3_2,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php
new file mode 100644
index 0000000..6a52afa
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit35MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit35MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit32Migration:risky' => true,
+ 'php_unit_dedicate_assert' => [
+ 'target' => PhpUnitTargetVersion::VERSION_3_5,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php
new file mode 100644
index 0000000..1392797
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit43MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit43MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit35Migration:risky' => true,
+ 'php_unit_no_expectation_annotation' => [
+ 'target' => PhpUnitTargetVersion::VERSION_4_3,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php
new file mode 100644
index 0000000..fcb1b57
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit48MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit48MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit43Migration:risky' => true,
+ 'php_unit_namespaced' => [
+ 'target' => PhpUnitTargetVersion::VERSION_4_8,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit50MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit50MigrationRiskySet.php
new file mode 100644
index 0000000..3847458
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit50MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit50MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit48Migration:risky' => true,
+ 'php_unit_dedicate_assert' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_0,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php
new file mode 100644
index 0000000..d0f71ee
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit52MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit52MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit50Migration:risky' => true,
+ 'php_unit_expectation' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_2,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php
new file mode 100644
index 0000000..b7c8792
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit54MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit54MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit52Migration:risky' => true,
+ 'php_unit_mock' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_4,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php
new file mode 100644
index 0000000..e3c1647
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit55MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit55MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit54Migration:risky' => true,
+ 'php_unit_mock' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_5,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php
new file mode 100644
index 0000000..a1038bf
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit56MigrationRiskySet.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit56MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit55Migration:risky' => true,
+ 'php_unit_dedicate_assert' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_6,
+ ],
+ 'php_unit_expectation' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_6,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php
new file mode 100644
index 0000000..84076e1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit57MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit57MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit56Migration:risky' => true,
+ 'php_unit_namespaced' => [
+ 'target' => PhpUnitTargetVersion::VERSION_5_7,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php
new file mode 100644
index 0000000..6bc7f71
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit60MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit60MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit57Migration:risky' => true,
+ 'php_unit_namespaced' => [
+ 'target' => PhpUnitTargetVersion::VERSION_6_0,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php
new file mode 100644
index 0000000..a7efa23
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit75MigrationRiskySet.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit75MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit60Migration:risky' => true,
+ 'php_unit_dedicate_assert_internal_type' => [
+ 'target' => PhpUnitTargetVersion::VERSION_7_5,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php
new file mode 100644
index 0000000..aaf5fc3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PHPUnit84MigrationRiskySet.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\Fixer\PhpUnit\PhpUnitTargetVersion;
+use PhpCsFixer\RuleSet\AbstractMigrationSetDescription;
+
+/**
+ * @internal
+ */
+final class PHPUnit84MigrationRiskySet extends AbstractMigrationSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PHPUnit60Migration:risky' => true,
+ '@PHPUnit75Migration:risky' => true,
+ 'php_unit_expectation' => [
+ 'target' => PhpUnitTargetVersion::VERSION_8_4,
+ ],
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php
new file mode 100644
index 0000000..84fd3ef
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12RiskySet.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class PSR12RiskySet extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ 'no_trailing_whitespace_in_string' => true,
+ 'no_unreachable_default_argument_value' => true,
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules that follow `PSR-12 <https://www.php-fig.org/psr/psr-12/>`_ standard.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php
new file mode 100644
index 0000000..9a8e4c1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR12Set.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class PSR12Set extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PSR2' => true,
+ 'blank_line_after_opening_tag' => true,
+ 'braces' => [
+ 'allow_single_line_anonymous_class_with_empty_body' => true,
+ ],
+ 'class_definition' => ['space_before_parenthesis' => true], // defined in PSR12 ¶8. Anonymous Classes
+ 'compact_nullable_typehint' => true,
+ 'declare_equal_normalize' => true,
+ 'lowercase_cast' => true,
+ 'lowercase_static_reference' => true,
+ 'new_with_braces' => true,
+ 'no_blank_lines_after_class_opening' => true,
+ 'no_leading_import_slash' => true,
+ 'no_whitespace_in_blank_line' => true,
+ 'ordered_class_elements' => [
+ 'order' => [
+ 'use_trait',
+ ],
+ ],
+ 'ordered_imports' => [
+ 'imports_order' => [
+ 'class',
+ 'function',
+ 'const',
+ ],
+ 'sort_algorithm' => 'none',
+ ],
+ 'return_type_declaration' => true,
+ 'short_scalar_cast' => true,
+ 'single_blank_line_before_namespace' => true,
+ 'single_trait_insert_per_statement' => true,
+ 'ternary_operator_spaces' => true,
+ 'visibility_required' => true,
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules that follow `PSR-12 <https://www.php-fig.org/psr/psr-12/>`_ standard.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php
new file mode 100644
index 0000000..3c82ea5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR1Set.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class PSR1Set extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ 'encoding' => true,
+ 'full_opening_tag' => true,
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules that follow `PSR-1 <https://www.php-fig.org/psr/psr-1/>`_ standard.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR2Set.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR2Set.php
new file mode 100644
index 0000000..b9489ee
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PSR2Set.php
@@ -0,0 +1,65 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class PSR2Set extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PSR1' => true,
+ 'blank_line_after_namespace' => true,
+ 'braces' => true,
+ 'class_definition' => true,
+ 'constant_case' => true,
+ 'elseif' => true,
+ 'function_declaration' => true,
+ 'indentation_type' => true,
+ 'line_ending' => true,
+ 'lowercase_keywords' => true,
+ 'method_argument_space' => [
+ 'on_multiline' => 'ensure_fully_multiline',
+ ],
+ 'no_break_comment' => true,
+ 'no_closing_tag' => true,
+ 'no_space_around_double_colon' => true,
+ 'no_spaces_after_function_name' => true,
+ 'no_spaces_inside_parenthesis' => true,
+ 'no_trailing_whitespace' => true,
+ 'no_trailing_whitespace_in_comment' => true,
+ 'single_blank_line_at_eof' => true,
+ 'single_class_element_per_statement' => [
+ 'elements' => [
+ 'property',
+ ],
+ ],
+ 'single_import_per_statement' => true,
+ 'single_line_after_imports' => true,
+ 'switch_case_semicolon_to_colon' => true,
+ 'switch_case_space' => true,
+ 'visibility_required' => ['elements' => ['method', 'property']],
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules that follow `PSR-2 <https://www.php-fig.org/psr/psr-2/>`_ standard.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerRiskySet.php
new file mode 100644
index 0000000..d537201
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerRiskySet.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class PhpCsFixerRiskySet extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@Symfony:risky' => true,
+ 'comment_to_phpdoc' => true,
+ 'final_internal_class' => true,
+ // @TODO: consider switching to `true`, like in @Symfony
+ 'native_constant_invocation' => [
+ 'fix_built_in' => false,
+ 'include' => [
+ 'DIRECTORY_SEPARATOR',
+ 'PHP_INT_SIZE',
+ 'PHP_SAPI',
+ 'PHP_VERSION_ID',
+ ],
+ 'scope' => 'namespaced',
+ 'strict' => true,
+ ],
+ 'no_alias_functions' => [
+ 'sets' => [
+ '@all',
+ ],
+ ],
+ 'no_unreachable_default_argument_value' => true,
+ 'no_unset_on_property' => true,
+ 'php_unit_strict' => true,
+ 'php_unit_test_case_static_method_calls' => true,
+ 'strict_comparison' => true,
+ 'strict_param' => true,
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rule set as used by the PHP-CS-Fixer development team, highly opinionated.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerSet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerSet.php
new file mode 100644
index 0000000..6bd37f6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/PhpCsFixerSet.php
@@ -0,0 +1,107 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class PhpCsFixerSet extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@Symfony' => true,
+ 'align_multiline_comment' => true,
+ 'array_indentation' => true,
+ 'blank_line_before_statement' => [
+ 'statements' => [
+ 'break',
+ 'case',
+ 'continue',
+ 'declare',
+ 'default',
+ 'exit',
+ 'goto',
+ 'include',
+ 'include_once',
+ 'require',
+ 'require_once',
+ 'return',
+ 'switch',
+ 'throw',
+ 'try',
+ ],
+ ],
+ 'combine_consecutive_issets' => true,
+ 'combine_consecutive_unsets' => true,
+ 'empty_loop_body' => true,
+ 'escape_implicit_backslashes' => true,
+ 'explicit_indirect_variable' => true,
+ 'explicit_string_variable' => true,
+ 'heredoc_to_nowdoc' => true,
+ 'method_argument_space' => [
+ 'on_multiline' => 'ensure_fully_multiline',
+ ],
+ 'method_chaining_indentation' => true,
+ 'multiline_comment_opening_closing' => true,
+ 'multiline_whitespace_before_semicolons' => [
+ 'strategy' => 'new_line_for_chained_calls',
+ ],
+ 'no_extra_blank_lines' => [
+ 'tokens' => [
+ 'break',
+ 'case',
+ 'continue',
+ 'curly_brace_block',
+ 'default',
+ 'extra',
+ 'parenthesis_brace_block',
+ 'return',
+ 'square_brace_block',
+ 'switch',
+ 'throw',
+ 'use',
+ ],
+ ],
+ 'no_null_property_initialization' => true,
+ 'no_superfluous_elseif' => true,
+ 'no_useless_else' => true,
+ 'no_useless_return' => true,
+ 'operator_linebreak' => [
+ 'only_booleans' => true,
+ ],
+ 'ordered_class_elements' => true,
+ 'php_unit_internal_class' => true,
+ 'php_unit_test_class_requires_covers' => true,
+ 'phpdoc_add_missing_param_annotation' => true,
+ 'phpdoc_no_empty_return' => true,
+ 'phpdoc_order' => true,
+ 'phpdoc_order_by_value' => true,
+ 'phpdoc_types_order' => true,
+ 'phpdoc_var_annotation_correct_order' => true,
+ 'return_assignment' => true,
+ 'simple_to_complex_string_variable' => true,
+ 'single_line_comment_style' => true,
+ 'single_line_throw' => false,
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rule set as used by the PHP-CS-Fixer development team, highly opinionated.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonyRiskySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonyRiskySet.php
new file mode 100644
index 0000000..562ca3b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonyRiskySet.php
@@ -0,0 +1,80 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class SymfonyRiskySet extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ $rules = [
+ '@PHP56Migration:risky' => true,
+ '@PSR12:risky' => true,
+ 'array_push' => true,
+ 'combine_nested_dirname' => true,
+ 'dir_constant' => true,
+ 'ereg_to_preg' => true,
+ 'error_suppression' => true,
+ 'fopen_flag_order' => true,
+ 'fopen_flags' => [
+ 'b_mode' => false,
+ ],
+ 'function_to_constant' => true,
+ 'implode_call' => true,
+ 'is_null' => true,
+ 'logical_operators' => true,
+ 'modernize_types_casting' => true,
+ 'native_constant_invocation' => true,
+ 'native_function_invocation' => [
+ 'include' => [
+ '@compiler_optimized',
+ ],
+ 'scope' => 'namespaced',
+ 'strict' => true,
+ ],
+ 'no_alias_functions' => true,
+ 'no_homoglyph_names' => true,
+ 'no_php4_constructor' => true,
+ 'no_unneeded_final_method' => true,
+ 'no_unreachable_default_argument_value' => false,
+ 'no_useless_sprintf' => true,
+ 'non_printable_character' => true,
+ 'ordered_traits' => true,
+ 'php_unit_construct' => true,
+ 'php_unit_mock_short_will_return' => true,
+ 'php_unit_set_up_tear_down_visibility' => true,
+ 'php_unit_test_annotation' => true,
+ 'psr_autoloading' => true,
+ 'self_accessor' => true,
+ 'set_type_to_cast' => true,
+ 'string_length_to_empty' => true,
+ 'string_line_ending' => true,
+ 'ternary_to_elvis_operator' => true,
+ ];
+
+ ksort($rules);
+
+ return $rules;
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules that follow the official `Symfony Coding Standards <https://symfony.com/doc/current/contributing/code/standards.html>`_.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonySet.php b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonySet.php
new file mode 100644
index 0000000..ad7a652
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/RuleSet/Sets/SymfonySet.php
@@ -0,0 +1,186 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\RuleSet\Sets;
+
+use PhpCsFixer\RuleSet\AbstractRuleSetDescription;
+
+/**
+ * @internal
+ */
+final class SymfonySet extends AbstractRuleSetDescription
+{
+ public function getRules(): array
+ {
+ return [
+ '@PSR12' => true,
+ 'array_syntax' => true,
+ 'backtick_to_shell_exec' => true,
+ 'binary_operator_spaces' => true,
+ 'blank_line_before_statement' => [
+ 'statements' => [
+ 'return',
+ ],
+ ],
+ 'braces' => [
+ 'allow_single_line_anonymous_class_with_empty_body' => true,
+ 'allow_single_line_closure' => true,
+ ],
+ 'cast_spaces' => true,
+ 'class_attributes_separation' => [
+ 'elements' => [
+ 'method' => 'one',
+ ],
+ ],
+ 'class_definition' => [
+ 'single_line' => true,
+ ],
+ 'clean_namespace' => true,
+ 'concat_space' => true,
+ 'echo_tag_syntax' => true,
+ 'empty_loop_body' => ['style' => 'braces'],
+ 'empty_loop_condition' => true,
+ 'fully_qualified_strict_types' => true,
+ 'function_typehint_space' => true,
+ 'general_phpdoc_tag_rename' => [
+ 'replacements' => [
+ 'inheritDocs' => 'inheritDoc',
+ ],
+ ],
+ 'include' => true,
+ 'increment_style' => true,
+ 'integer_literal_case' => true,
+ 'lambda_not_used_import' => true,
+ 'linebreak_after_opening_tag' => true,
+ 'magic_constant_casing' => true,
+ 'magic_method_casing' => true,
+ 'method_argument_space' => [
+ 'on_multiline' => 'ignore',
+ ],
+ 'native_function_casing' => true,
+ 'native_function_type_declaration_casing' => true,
+ 'no_alias_language_construct_call' => true,
+ 'no_alternative_syntax' => true,
+ 'no_binary_string' => true,
+ 'no_blank_lines_after_phpdoc' => true,
+ 'no_empty_comment' => true,
+ 'no_empty_phpdoc' => true,
+ 'no_empty_statement' => true,
+ 'no_extra_blank_lines' => [
+ 'tokens' => [
+ 'case',
+ 'continue',
+ 'curly_brace_block',
+ 'default',
+ 'extra',
+ 'parenthesis_brace_block',
+ 'square_brace_block',
+ 'switch',
+ 'throw',
+ 'use',
+ ],
+ ],
+ 'no_leading_namespace_whitespace' => true,
+ 'no_mixed_echo_print' => true,
+ 'no_multiline_whitespace_around_double_arrow' => true,
+ 'no_short_bool_cast' => true,
+ 'no_singleline_whitespace_before_semicolons' => true,
+ 'no_spaces_around_offset' => true,
+ 'no_superfluous_phpdoc_tags' => [
+ 'allow_mixed' => true,
+ 'allow_unused_params' => true,
+ ],
+ 'no_trailing_comma_in_list_call' => true,
+ 'no_trailing_comma_in_singleline_array' => true,
+ 'no_unneeded_control_parentheses' => [
+ 'statements' => [
+ 'break',
+ 'clone',
+ 'continue',
+ 'echo_print',
+ 'return',
+ 'switch_case',
+ 'yield',
+ 'yield_from',
+ ],
+ ],
+ 'no_unneeded_curly_braces' => [
+ 'namespaces' => true,
+ ],
+ 'no_unset_cast' => true,
+ 'no_unused_imports' => true,
+ 'no_whitespace_before_comma_in_array' => true,
+ 'normalize_index_brace' => true,
+ 'object_operator_without_whitespace' => true,
+ 'ordered_imports' => true,
+ 'php_unit_fqcn_annotation' => true,
+ 'php_unit_method_casing' => true,
+ 'phpdoc_align' => true,
+ 'phpdoc_annotation_without_dot' => true,
+ 'phpdoc_indent' => true,
+ 'phpdoc_inline_tag_normalizer' => true,
+ 'phpdoc_no_access' => true,
+ 'phpdoc_no_alias_tag' => true,
+ 'phpdoc_no_package' => true,
+ 'phpdoc_no_useless_inheritdoc' => true,
+ 'phpdoc_return_self_reference' => true,
+ 'phpdoc_scalar' => true,
+ 'phpdoc_separation' => true,
+ 'phpdoc_single_line_var_spacing' => true,
+ 'phpdoc_summary' => true,
+ 'phpdoc_tag_type' => [
+ 'tags' => [
+ 'inheritDoc' => 'inline',
+ ],
+ ],
+ 'phpdoc_to_comment' => true,
+ 'phpdoc_trim' => true,
+ 'phpdoc_trim_consecutive_blank_line_separation' => true,
+ 'phpdoc_types' => true,
+ 'phpdoc_types_order' => [
+ 'null_adjustment' => 'always_last',
+ 'sort_algorithm' => 'none',
+ ],
+ 'phpdoc_var_without_name' => true,
+ 'protected_to_private' => true,
+ 'semicolon_after_instruction' => true,
+ 'single_class_element_per_statement' => true,
+ 'single_line_comment_style' => [
+ 'comment_types' => [
+ 'hash',
+ ],
+ ],
+ 'single_line_throw' => true,
+ 'single_quote' => true,
+ 'single_space_after_construct' => true,
+ 'space_after_semicolon' => [
+ 'remove_in_empty_for_expressions' => true,
+ ],
+ 'standardize_increment' => true,
+ 'standardize_not_equals' => true,
+ 'switch_continue_to_break' => true,
+ 'trailing_comma_in_multiline' => true,
+ 'trim_array_spaces' => true,
+ 'types_spaces' => true,
+ 'unary_operator_spaces' => true,
+ 'whitespace_after_comma_in_array' => true,
+ 'yoda_style' => true,
+ ];
+ }
+
+ public function getDescription(): string
+ {
+ return 'Rules that follow the official `Symfony Coding Standards <https://symfony.com/doc/current/contributing/code/standards.html>`_.';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Runner/FileCachingLintingIterator.php b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileCachingLintingIterator.php
new file mode 100644
index 0000000..b8ea84d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileCachingLintingIterator.php
@@ -0,0 +1,82 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Runner;
+
+use PhpCsFixer\Linter\LinterInterface;
+use PhpCsFixer\Linter\LintingResultInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FileCachingLintingIterator extends \CachingIterator
+{
+ /**
+ * @var LintingResultInterface
+ */
+ private $currentResult;
+
+ /**
+ * @var LinterInterface
+ */
+ private $linter;
+
+ /**
+ * @var LintingResultInterface
+ */
+ private $nextResult;
+
+ public function __construct(\Iterator $iterator, LinterInterface $linter)
+ {
+ parent::__construct($iterator);
+
+ $this->linter = $linter;
+ }
+
+ public function currentLintingResult(): LintingResultInterface
+ {
+ return $this->currentResult;
+ }
+
+ public function next(): void
+ {
+ parent::next();
+
+ $this->currentResult = $this->nextResult;
+
+ if ($this->hasNext()) {
+ $this->nextResult = $this->handleItem($this->getInnerIterator()->current());
+ }
+ }
+
+ public function rewind(): void
+ {
+ parent::rewind();
+
+ if ($this->valid()) {
+ $this->currentResult = $this->handleItem($this->current());
+ }
+
+ if ($this->hasNext()) {
+ $this->nextResult = $this->handleItem($this->getInnerIterator()->current());
+ }
+ }
+
+ private function handleItem(\SplFileInfo $file): LintingResultInterface
+ {
+ return $this->linter->lintFile($file->getRealPath());
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php
new file mode 100644
index 0000000..8feb19f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileFilterIterator.php
@@ -0,0 +1,112 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Runner;
+
+use PhpCsFixer\Cache\CacheManagerInterface;
+use PhpCsFixer\FileReader;
+use PhpCsFixer\FixerFileProcessedEvent;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Contracts\EventDispatcher\Event;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FileFilterIterator extends \FilterIterator
+{
+ /**
+ * @var null|EventDispatcherInterface
+ */
+ private $eventDispatcher;
+
+ /**
+ * @var CacheManagerInterface
+ */
+ private $cacheManager;
+
+ /**
+ * @var array<string,bool>
+ */
+ private $visitedElements = [];
+
+ public function __construct(
+ \Traversable $iterator,
+ ?EventDispatcherInterface $eventDispatcher,
+ CacheManagerInterface $cacheManager
+ ) {
+ if (!$iterator instanceof \Iterator) {
+ $iterator = new \IteratorIterator($iterator);
+ }
+
+ parent::__construct($iterator);
+
+ $this->eventDispatcher = $eventDispatcher;
+ $this->cacheManager = $cacheManager;
+ }
+
+ public function accept(): bool
+ {
+ $file = $this->current();
+ if (!$file instanceof \SplFileInfo) {
+ throw new \RuntimeException(
+ sprintf(
+ 'Expected instance of "\SplFileInfo", got "%s".',
+ \is_object($file) ? \get_class($file) : \gettype($file)
+ )
+ );
+ }
+
+ $path = $file->isLink() ? $file->getPathname() : $file->getRealPath();
+
+ if (isset($this->visitedElements[$path])) {
+ return false;
+ }
+
+ $this->visitedElements[$path] = true;
+
+ if (!$file->isFile() || $file->isLink()) {
+ return false;
+ }
+
+ $content = FileReader::createSingleton()->read($path);
+
+ // mark as skipped:
+ if (
+ // empty file
+ '' === $content
+ // file that does not need fixing due to cache
+ || !$this->cacheManager->needFixing($file->getPathname(), $content)
+ ) {
+ $this->dispatchEvent(
+ FixerFileProcessedEvent::NAME,
+ new FixerFileProcessedEvent(FixerFileProcessedEvent::STATUS_SKIPPED)
+ );
+
+ return false;
+ }
+
+ return true;
+ }
+
+ private function dispatchEvent(string $name, Event $event): void
+ {
+ if (null === $this->eventDispatcher) {
+ return;
+ }
+
+ $this->eventDispatcher->dispatch($event, $name);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Runner/FileLintingIterator.php b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileLintingIterator.php
new file mode 100644
index 0000000..fb0a7b4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Runner/FileLintingIterator.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Runner;
+
+use PhpCsFixer\Linter\LinterInterface;
+use PhpCsFixer\Linter\LintingResultInterface;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class FileLintingIterator extends \IteratorIterator
+{
+ /**
+ * @var LintingResultInterface
+ */
+ private $currentResult;
+
+ /**
+ * @var null|LinterInterface
+ */
+ private $linter;
+
+ public function __construct(\Iterator $iterator, LinterInterface $linter)
+ {
+ parent::__construct($iterator);
+
+ $this->linter = $linter;
+ }
+
+ public function currentLintingResult(): ?LintingResultInterface
+ {
+ return $this->currentResult;
+ }
+
+ public function next(): void
+ {
+ parent::next();
+
+ $this->currentResult = $this->valid() ? $this->handleItem($this->current()) : null;
+ }
+
+ public function rewind(): void
+ {
+ parent::rewind();
+
+ $this->currentResult = $this->valid() ? $this->handleItem($this->current()) : null;
+ }
+
+ private function handleItem(\SplFileInfo $file): LintingResultInterface
+ {
+ return $this->linter->lintFile($file->getRealPath());
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php b/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php
new file mode 100644
index 0000000..215da18
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php
@@ -0,0 +1,315 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Runner;
+
+use PhpCsFixer\AbstractFixer;
+use PhpCsFixer\Cache\CacheManagerInterface;
+use PhpCsFixer\Cache\Directory;
+use PhpCsFixer\Cache\DirectoryInterface;
+use PhpCsFixer\Differ\DifferInterface;
+use PhpCsFixer\Error\Error;
+use PhpCsFixer\Error\ErrorsManager;
+use PhpCsFixer\FileReader;
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\FixerFileProcessedEvent;
+use PhpCsFixer\Linter\LinterInterface;
+use PhpCsFixer\Linter\LintingException;
+use PhpCsFixer\Linter\LintingResultInterface;
+use PhpCsFixer\Tokenizer\Tokens;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\Filesystem\Exception\IOException;
+use Symfony\Contracts\EventDispatcher\Event;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class Runner
+{
+ /**
+ * @var DifferInterface
+ */
+ private $differ;
+
+ /**
+ * @var DirectoryInterface
+ */
+ private $directory;
+
+ /**
+ * @var null|EventDispatcherInterface
+ */
+ private $eventDispatcher;
+
+ /**
+ * @var ErrorsManager
+ */
+ private $errorsManager;
+
+ /**
+ * @var CacheManagerInterface
+ */
+ private $cacheManager;
+
+ /**
+ * @var bool
+ */
+ private $isDryRun;
+
+ /**
+ * @var LinterInterface
+ */
+ private $linter;
+
+ /**
+ * @var \Traversable
+ */
+ private $finder;
+
+ /**
+ * @var FixerInterface[]
+ */
+ private $fixers;
+
+ /**
+ * @var bool
+ */
+ private $stopOnViolation;
+
+ public function __construct(
+ $finder,
+ array $fixers,
+ DifferInterface $differ,
+ ?EventDispatcherInterface $eventDispatcher,
+ ErrorsManager $errorsManager,
+ LinterInterface $linter,
+ bool $isDryRun,
+ CacheManagerInterface $cacheManager,
+ ?DirectoryInterface $directory = null,
+ bool $stopOnViolation = false
+ ) {
+ $this->finder = $finder;
+ $this->fixers = $fixers;
+ $this->differ = $differ;
+ $this->eventDispatcher = $eventDispatcher;
+ $this->errorsManager = $errorsManager;
+ $this->linter = $linter;
+ $this->isDryRun = $isDryRun;
+ $this->cacheManager = $cacheManager;
+ $this->directory = $directory ?: new Directory('');
+ $this->stopOnViolation = $stopOnViolation;
+ }
+
+ public function fix(): array
+ {
+ $changed = [];
+
+ $finder = $this->finder;
+ $finderIterator = $finder instanceof \IteratorAggregate ? $finder->getIterator() : $finder;
+ $fileFilteredFileIterator = new FileFilterIterator(
+ $finderIterator,
+ $this->eventDispatcher,
+ $this->cacheManager
+ );
+
+ $collection = $this->linter->isAsync()
+ ? new FileCachingLintingIterator($fileFilteredFileIterator, $this->linter)
+ : new FileLintingIterator($fileFilteredFileIterator, $this->linter);
+
+ /** @var \SplFileInfo $file */
+ foreach ($collection as $file) {
+ $fixInfo = $this->fixFile($file, $collection->currentLintingResult());
+
+ // we do not need Tokens to still caching just fixed file - so clear the cache
+ Tokens::clearCache();
+
+ if (null !== $fixInfo) {
+ $name = $this->directory->getRelativePathTo($file->__toString());
+ $changed[$name] = $fixInfo;
+
+ if ($this->stopOnViolation) {
+ break;
+ }
+ }
+ }
+
+ return $changed;
+ }
+
+ private function fixFile(\SplFileInfo $file, LintingResultInterface $lintingResult): ?array
+ {
+ $name = $file->getPathname();
+
+ try {
+ $lintingResult->check();
+ } catch (LintingException $e) {
+ $this->dispatchEvent(
+ FixerFileProcessedEvent::NAME,
+ new FixerFileProcessedEvent(FixerFileProcessedEvent::STATUS_INVALID)
+ );
+
+ $this->errorsManager->report(new Error(Error::TYPE_INVALID, $name, $e));
+
+ return null;
+ }
+
+ $old = FileReader::createSingleton()->read($file->getRealPath());
+
+ $tokens = Tokens::fromCode($old);
+ $oldHash = $tokens->getCodeHash();
+
+ $newHash = $oldHash;
+ $new = $old;
+
+ $appliedFixers = [];
+
+ try {
+ foreach ($this->fixers as $fixer) {
+ // for custom fixers we don't know is it safe to run `->fix()` without checking `->supports()` and `->isCandidate()`,
+ // thus we need to check it and conditionally skip fixing
+ if (
+ !$fixer instanceof AbstractFixer
+ && (!$fixer->supports($file) || !$fixer->isCandidate($tokens))
+ ) {
+ continue;
+ }
+
+ $fixer->fix($file, $tokens);
+
+ if ($tokens->isChanged()) {
+ $tokens->clearEmptyTokens();
+ $tokens->clearChanged();
+ $appliedFixers[] = $fixer->getName();
+ }
+ }
+ } catch (\ParseError $e) {
+ $this->dispatchEvent(
+ FixerFileProcessedEvent::NAME,
+ new FixerFileProcessedEvent(FixerFileProcessedEvent::STATUS_LINT)
+ );
+
+ $this->errorsManager->report(new Error(Error::TYPE_LINT, $name, $e));
+
+ return null;
+ } catch (\Throwable $e) {
+ $this->processException($name, $e);
+
+ return null;
+ }
+
+ $fixInfo = null;
+
+ if (!empty($appliedFixers)) {
+ $new = $tokens->generateCode();
+ $newHash = $tokens->getCodeHash();
+ }
+
+ // We need to check if content was changed and then applied changes.
+ // But we can't simply check $appliedFixers, because one fixer may revert
+ // work of other and both of them will mark collection as changed.
+ // Therefore we need to check if code hashes changed.
+ if ($oldHash !== $newHash) {
+ $fixInfo = [
+ 'appliedFixers' => $appliedFixers,
+ 'diff' => $this->differ->diff($old, $new, $file),
+ ];
+
+ try {
+ $this->linter->lintSource($new)->check();
+ } catch (LintingException $e) {
+ $this->dispatchEvent(
+ FixerFileProcessedEvent::NAME,
+ new FixerFileProcessedEvent(FixerFileProcessedEvent::STATUS_LINT)
+ );
+
+ $this->errorsManager->report(new Error(Error::TYPE_LINT, $name, $e, $fixInfo['appliedFixers'], $fixInfo['diff']));
+
+ return null;
+ }
+
+ if (!$this->isDryRun) {
+ $fileName = $file->getRealPath();
+
+ if (!file_exists($fileName)) {
+ throw new IOException(
+ sprintf('Failed to write file "%s" (no longer) exists.', $file->getPathname()),
+ 0,
+ null,
+ $file->getPathname()
+ );
+ }
+
+ if (is_dir($fileName)) {
+ throw new IOException(
+ sprintf('Cannot write file "%s" as the location exists as directory.', $fileName),
+ 0,
+ null,
+ $fileName
+ );
+ }
+
+ if (!is_writable($fileName)) {
+ throw new IOException(
+ sprintf('Cannot write to file "%s" as it is not writable.', $fileName),
+ 0,
+ null,
+ $fileName
+ );
+ }
+
+ if (false === @file_put_contents($fileName, $new)) {
+ $error = error_get_last();
+
+ throw new IOException(
+ sprintf('Failed to write file "%s", "%s".', $fileName, $error ? $error['message'] : 'no reason available'),
+ 0,
+ null,
+ $fileName
+ );
+ }
+ }
+ }
+
+ $this->cacheManager->setFile($name, $new);
+
+ $this->dispatchEvent(
+ FixerFileProcessedEvent::NAME,
+ new FixerFileProcessedEvent($fixInfo ? FixerFileProcessedEvent::STATUS_FIXED : FixerFileProcessedEvent::STATUS_NO_CHANGES)
+ );
+
+ return $fixInfo;
+ }
+
+ /**
+ * Process an exception that occurred.
+ */
+ private function processException(string $name, \Throwable $e): void
+ {
+ $this->dispatchEvent(
+ FixerFileProcessedEvent::NAME,
+ new FixerFileProcessedEvent(FixerFileProcessedEvent::STATUS_EXCEPTION)
+ );
+
+ $this->errorsManager->report(new Error(Error::TYPE_EXCEPTION, $name, $e));
+ }
+
+ private function dispatchEvent(string $name, Event $event): void
+ {
+ if (null === $this->eventDispatcher) {
+ return;
+ }
+
+ $this->eventDispatcher->dispatch($event, $name);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php b/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php
new file mode 100644
index 0000000..bbb66ac
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/StdinFileInfo.php
@@ -0,0 +1,174 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @author Davi Koscianski Vidal <davividal@gmail.com>
+ *
+ * @internal
+ */
+final class StdinFileInfo extends \SplFileInfo
+{
+ public function __construct()
+ {
+ }
+
+ public function __toString(): string
+ {
+ return $this->getRealPath();
+ }
+
+ public function getRealPath(): string
+ {
+ // So file_get_contents & friends will work.
+ // Warning - this stream is not seekable, so `file_get_contents` will work only once! Consider using `FileReader`.
+ return 'php://stdin';
+ }
+
+ public function getATime(): int
+ {
+ return 0;
+ }
+
+ public function getBasename($suffix = null): string
+ {
+ return $this->getFilename();
+ }
+
+ public function getCTime(): int
+ {
+ return 0;
+ }
+
+ public function getExtension(): string
+ {
+ return '.php';
+ }
+
+ public function getFileInfo($className = null): \SplFileInfo
+ {
+ throw new \BadMethodCallException(sprintf('Method "%s" is not implemented.', __METHOD__));
+ }
+
+ public function getFilename(): string
+ {
+ /*
+ * Useful so fixers depending on PHP-only files still work.
+ *
+ * The idea to use STDIN is to parse PHP-only files, so we can
+ * assume that there will be always a PHP file out there.
+ */
+
+ return 'stdin.php';
+ }
+
+ public function getGroup(): int
+ {
+ return 0;
+ }
+
+ public function getInode(): int
+ {
+ return 0;
+ }
+
+ public function getLinkTarget(): string
+ {
+ return '';
+ }
+
+ public function getMTime(): int
+ {
+ return 0;
+ }
+
+ public function getOwner(): int
+ {
+ return 0;
+ }
+
+ public function getPath(): string
+ {
+ return '';
+ }
+
+ public function getPathInfo($className = null): \SplFileInfo
+ {
+ throw new \BadMethodCallException(sprintf('Method "%s" is not implemented.', __METHOD__));
+ }
+
+ public function getPathname(): string
+ {
+ return $this->getFilename();
+ }
+
+ public function getPerms(): int
+ {
+ return 0;
+ }
+
+ public function getSize(): int
+ {
+ return 0;
+ }
+
+ public function getType(): string
+ {
+ return 'file';
+ }
+
+ public function isDir(): bool
+ {
+ return false;
+ }
+
+ public function isExecutable(): bool
+ {
+ return false;
+ }
+
+ public function isFile(): bool
+ {
+ return true;
+ }
+
+ public function isLink(): bool
+ {
+ return false;
+ }
+
+ public function isReadable(): bool
+ {
+ return true;
+ }
+
+ public function isWritable(): bool
+ {
+ return false;
+ }
+
+ public function openFile($openMode = 'r', $useIncludePath = false, $context = null): \SplFileObject
+ {
+ throw new \BadMethodCallException(sprintf('Method "%s" is not implemented.', __METHOD__));
+ }
+
+ public function setFileClass($className = null): void
+ {
+ }
+
+ public function setInfoClass($className = null): void
+ {
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTransformer.php
new file mode 100644
index 0000000..8b0fae8
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTransformer.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+use PhpCsFixer\Utils;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+abstract class AbstractTransformer implements TransformerInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getName(): string
+ {
+ $nameParts = explode('\\', static::class);
+ $name = substr(end($nameParts), 0, -\strlen('Transformer'));
+
+ return Utils::camelCaseToUnderscore($name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ abstract public function getCustomTokens(): array;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTypeTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTypeTransformer.php
new file mode 100644
index 0000000..9e93818
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/AbstractTypeTransformer.php
@@ -0,0 +1,87 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+abstract class AbstractTypeTransformer extends AbstractTransformer
+{
+ protected function doProcess(Tokens $tokens, int $index, $originalToken): void
+ {
+ if (!$tokens[$index]->equals($originalToken)) {
+ return;
+ }
+
+ $prevIndex = $tokens->getTokenNotOfKindsSibling($index, -1, [T_CALLABLE, T_NS_SEPARATOR, T_STRING, CT::T_ARRAY_TYPEHINT, T_WHITESPACE, T_COMMENT, T_DOC_COMMENT]);
+
+ /** @var Token $prevToken */
+ $prevToken = $tokens[$prevIndex];
+
+ if ($prevToken->isGivenKind([
+ CT::T_TYPE_COLON, // `:` is part of a function return type `foo(): X|Y`
+ CT::T_TYPE_ALTERNATION, // `|` is part of a union (chain) `X|Y`
+ CT::T_TYPE_INTERSECTION,
+ T_STATIC, T_VAR, T_PUBLIC, T_PROTECTED, T_PRIVATE, // `var X|Y $a;`, `private X|Y $a` or `public static X|Y $a`
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE, CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED, CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC, // promoted properties
+ ])) {
+ $this->replaceToken($tokens, $index);
+
+ return;
+ }
+
+ if (\defined('T_READONLY') && $prevToken->isGivenKind(T_READONLY)) { // @TODO: drop condition when PHP 8.1+ is required
+ $this->replaceToken($tokens, $index);
+
+ return;
+ }
+
+ if (!$prevToken->equalsAny(['(', ','])) {
+ return;
+ }
+
+ $prevPrevTokenIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+
+ if ($tokens[$prevPrevTokenIndex]->isGivenKind([T_CATCH])) {
+ $this->replaceToken($tokens, $index);
+
+ return;
+ }
+
+ $functionKinds = [[T_FUNCTION]];
+ if (\defined('T_FN')) {
+ $functionKinds[] = [T_FN];
+ }
+
+ $functionIndex = $tokens->getPrevTokenOfKind($prevIndex, $functionKinds);
+
+ if (null === $functionIndex) {
+ return;
+ }
+
+ $braceOpenIndex = $tokens->getNextTokenOfKind($functionIndex, ['(']);
+ $braceCloseIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $braceOpenIndex);
+
+ if ($braceCloseIndex < $index) {
+ return;
+ }
+
+ $this->replaceToken($tokens, $index);
+ }
+
+ abstract protected function replaceToken(Tokens $tokens, int $index): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php
new file mode 100644
index 0000000..e1890f7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/AbstractControlCaseStructuresAnalysis.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+abstract class AbstractControlCaseStructuresAnalysis
+{
+ /**
+ * @var int
+ */
+ private $index;
+
+ /**
+ * @var int
+ */
+ private $open;
+
+ /**
+ * @var int
+ */
+ private $close;
+
+ public function __construct(int $index, int $open, int $close)
+ {
+ $this->index = $index;
+ $this->open = $open;
+ $this->close = $close;
+ }
+
+ public function getIndex(): int
+ {
+ return $this->index;
+ }
+
+ public function getOpenIndex(): int
+ {
+ return $this->open;
+ }
+
+ public function getCloseIndex(): int
+ {
+ return $this->close;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php
new file mode 100644
index 0000000..54b8167
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/ArgumentAnalysis.php
@@ -0,0 +1,87 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class ArgumentAnalysis
+{
+ /**
+ * The default value of the argument.
+ *
+ * @var null|string
+ */
+ private $default;
+
+ /**
+ * The name of the argument.
+ *
+ * @var string
+ */
+ private $name;
+
+ /**
+ * The index where the name is located in the supplied Tokens object.
+ *
+ * @var int
+ */
+ private $nameIndex;
+
+ /**
+ * The type analysis of the argument.
+ *
+ * @var ?TypeAnalysis
+ */
+ private $typeAnalysis;
+
+ public function __construct(string $name, int $nameIndex, ?string $default, ?TypeAnalysis $typeAnalysis = null)
+ {
+ $this->name = $name;
+ $this->nameIndex = $nameIndex;
+ $this->default = $default ?: null;
+ $this->typeAnalysis = $typeAnalysis ?: null;
+ }
+
+ public function getDefault(): ?string
+ {
+ return $this->default;
+ }
+
+ public function hasDefault(): bool
+ {
+ return null !== $this->default;
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getNameIndex(): int
+ {
+ return $this->nameIndex;
+ }
+
+ public function getTypeAnalysis(): ?TypeAnalysis
+ {
+ return $this->typeAnalysis;
+ }
+
+ public function hasTypeAnalysis(): bool
+ {
+ return null !== $this->typeAnalysis;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php
new file mode 100644
index 0000000..8289b89
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/CaseAnalysis.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ *
+ * @internal
+ */
+final class CaseAnalysis
+{
+ /**
+ * @var int
+ */
+ private $index;
+
+ /**
+ * @var int
+ */
+ private $colonIndex;
+
+ public function __construct(int $index, int $colonIndex)
+ {
+ $this->index = $index;
+ $this->colonIndex = $colonIndex;
+ }
+
+ public function getIndex(): int
+ {
+ return $this->index;
+ }
+
+ public function getColonIndex(): int
+ {
+ return $this->colonIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php
new file mode 100644
index 0000000..c2d6ee7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/DefaultAnalysis.php
@@ -0,0 +1,47 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class DefaultAnalysis
+{
+ /**
+ * @var int
+ */
+ private $index;
+
+ /**
+ * @var int
+ */
+ private $colonIndex;
+
+ public function __construct(int $index, int $colonIndex)
+ {
+ $this->index = $index;
+ $this->colonIndex = $colonIndex;
+ }
+
+ public function getIndex(): int
+ {
+ return $this->index;
+ }
+
+ public function getColonIndex(): int
+ {
+ return $this->colonIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php
new file mode 100644
index 0000000..b337f1f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/EnumAnalysis.php
@@ -0,0 +1,44 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class EnumAnalysis extends AbstractControlCaseStructuresAnalysis
+{
+ /**
+ * @var CaseAnalysis[]
+ */
+ private $cases;
+
+ /**
+ * @param CaseAnalysis[] $cases
+ */
+ public function __construct(int $index, int $open, int $close, array $cases)
+ {
+ parent::__construct($index, $open, $close);
+
+ $this->cases = $cases;
+ }
+
+ /**
+ * @return CaseAnalysis[]
+ */
+ public function getCases(): array
+ {
+ return $this->cases;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php
new file mode 100644
index 0000000..43a1ecd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/MatchAnalysis.php
@@ -0,0 +1,38 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class MatchAnalysis extends AbstractControlCaseStructuresAnalysis
+{
+ /**
+ * @var null|DefaultAnalysis
+ */
+ private $defaultAnalysis;
+
+ public function __construct(int $index, int $open, int $close, ?DefaultAnalysis $defaultAnalysis)
+ {
+ parent::__construct($index, $open, $close);
+
+ $this->defaultAnalysis = $defaultAnalysis;
+ }
+
+ public function getDefaultAnalysis(): ?DefaultAnalysis
+ {
+ return $this->defaultAnalysis;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceAnalysis.php
new file mode 100644
index 0000000..2a9aa0a
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceAnalysis.php
@@ -0,0 +1,103 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class NamespaceAnalysis implements StartEndTokenAwareAnalysis
+{
+ /**
+ * The fully qualified namespace name.
+ *
+ * @var string
+ */
+ private $fullName;
+
+ /**
+ * The short version of the namespace.
+ *
+ * @var string
+ */
+ private $shortName;
+
+ /**
+ * The start index of the namespace declaration in the analyzed Tokens.
+ *
+ * @var int
+ */
+ private $startIndex;
+
+ /**
+ * The end index of the namespace declaration in the analyzed Tokens.
+ *
+ * @var int
+ */
+ private $endIndex;
+
+ /**
+ * The start index of the scope of the namespace in the analyzed Tokens.
+ *
+ * @var int
+ */
+ private $scopeStartIndex;
+
+ /**
+ * The end index of the scope of the namespace in the analyzed Tokens.
+ *
+ * @var int
+ */
+ private $scopeEndIndex;
+
+ public function __construct(string $fullName, string $shortName, int $startIndex, int $endIndex, int $scopeStartIndex, int $scopeEndIndex)
+ {
+ $this->fullName = $fullName;
+ $this->shortName = $shortName;
+ $this->startIndex = $startIndex;
+ $this->endIndex = $endIndex;
+ $this->scopeStartIndex = $scopeStartIndex;
+ $this->scopeEndIndex = $scopeEndIndex;
+ }
+
+ public function getFullName(): string
+ {
+ return $this->fullName;
+ }
+
+ public function getShortName(): string
+ {
+ return $this->shortName;
+ }
+
+ public function getStartIndex(): int
+ {
+ return $this->startIndex;
+ }
+
+ public function getEndIndex(): int
+ {
+ return $this->endIndex;
+ }
+
+ public function getScopeStartIndex(): int
+ {
+ return $this->scopeStartIndex;
+ }
+
+ public function getScopeEndIndex(): int
+ {
+ return $this->scopeEndIndex;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceUseAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceUseAnalysis.php
new file mode 100644
index 0000000..beb29d7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/NamespaceUseAnalysis.php
@@ -0,0 +1,122 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class NamespaceUseAnalysis implements StartEndTokenAwareAnalysis
+{
+ public const TYPE_CLASS = 1; // "classy" could be class, interface or trait
+ public const TYPE_FUNCTION = 2;
+ public const TYPE_CONSTANT = 3;
+
+ /**
+ * The fully qualified use namespace.
+ *
+ * @var string
+ */
+ private $fullName;
+
+ /**
+ * The short version of use namespace or the alias name in case of aliased use statements.
+ *
+ * @var string
+ */
+ private $shortName;
+
+ /**
+ * Is the use statement being aliased?
+ *
+ * @var bool
+ */
+ private $isAliased;
+
+ /**
+ * The start index of the namespace declaration in the analyzed Tokens.
+ *
+ * @var int
+ */
+ private $startIndex;
+
+ /**
+ * The end index of the namespace declaration in the analyzed Tokens.
+ *
+ * @var int
+ */
+ private $endIndex;
+
+ /**
+ * The type of import: class, function or constant.
+ *
+ * @var int
+ */
+ private $type;
+
+ public function __construct(string $fullName, string $shortName, bool $isAliased, int $startIndex, int $endIndex, int $type)
+ {
+ $this->fullName = $fullName;
+ $this->shortName = $shortName;
+ $this->isAliased = $isAliased;
+ $this->startIndex = $startIndex;
+ $this->endIndex = $endIndex;
+ $this->type = $type;
+ }
+
+ public function getFullName(): string
+ {
+ return $this->fullName;
+ }
+
+ public function getShortName(): string
+ {
+ return $this->shortName;
+ }
+
+ public function isAliased(): bool
+ {
+ return $this->isAliased;
+ }
+
+ public function getStartIndex(): int
+ {
+ return $this->startIndex;
+ }
+
+ public function getEndIndex(): int
+ {
+ return $this->endIndex;
+ }
+
+ public function getType(): int
+ {
+ return $this->type;
+ }
+
+ public function isClass(): bool
+ {
+ return self::TYPE_CLASS === $this->type;
+ }
+
+ public function isFunction(): bool
+ {
+ return self::TYPE_FUNCTION === $this->type;
+ }
+
+ public function isConstant(): bool
+ {
+ return self::TYPE_CONSTANT === $this->type;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/StartEndTokenAwareAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/StartEndTokenAwareAnalysis.php
new file mode 100644
index 0000000..0b2f318
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/StartEndTokenAwareAnalysis.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+interface StartEndTokenAwareAnalysis
+{
+ /**
+ * The start index of the analyzed subject inside of the Tokens.
+ */
+ public function getStartIndex(): int;
+
+ /**
+ * The end index of the analyzed subject inside of the Tokens.
+ */
+ public function getEndIndex(): int;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/SwitchAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/SwitchAnalysis.php
new file mode 100644
index 0000000..228ed88
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/SwitchAnalysis.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class SwitchAnalysis extends AbstractControlCaseStructuresAnalysis
+{
+ /**
+ * @var null|DefaultAnalysis
+ */
+ private $defaultAnalysis;
+
+ /**
+ * @var CaseAnalysis[]
+ */
+ private $cases;
+
+ /**
+ * @param CaseAnalysis[] $cases
+ */
+ public function __construct(int $index, int $open, int $close, array $cases, ?DefaultAnalysis $defaultAnalysis)
+ {
+ parent::__construct($index, $open, $close);
+
+ $this->cases = $cases;
+ $this->defaultAnalysis = $defaultAnalysis;
+ }
+
+ /**
+ * @return CaseAnalysis[]
+ */
+ public function getCases(): array
+ {
+ return $this->cases;
+ }
+
+ public function getDefaultAnalysis(): ?DefaultAnalysis
+ {
+ return $this->defaultAnalysis;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php
new file mode 100644
index 0000000..9c55d60
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php
@@ -0,0 +1,108 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer\Analysis;
+
+/**
+ * @internal
+ */
+final class TypeAnalysis implements StartEndTokenAwareAnalysis
+{
+ /**
+ * This list contains soft and hard reserved types that can be used or will be used by PHP at some point.
+ *
+ * More info:
+ *
+ * @see https://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.types
+ * @see https://php.net/manual/en/reserved.other-reserved-words.php
+ * @see https://php.net/manual/en/language.pseudo-types.php
+ *
+ * @var array
+ */
+ private static $reservedTypes = [
+ 'array',
+ 'bool',
+ 'callable',
+ 'float',
+ 'int',
+ 'iterable',
+ 'mixed',
+ 'never',
+ 'numeric',
+ 'object',
+ 'resource',
+ 'self',
+ 'string',
+ 'void',
+ ];
+
+ /**
+ * @var string
+ */
+ private $name;
+
+ /**
+ * @var int
+ */
+ private $startIndex;
+
+ /**
+ * @var int
+ */
+ private $endIndex;
+
+ /**
+ * @var bool
+ */
+ private $nullable;
+
+ public function __construct(string $name, int $startIndex, int $endIndex)
+ {
+ $this->name = $name;
+ $this->nullable = false;
+
+ if (str_starts_with($name, '?')) {
+ $this->name = substr($name, 1);
+ $this->nullable = true;
+ }
+
+ $this->startIndex = $startIndex;
+ $this->endIndex = $endIndex;
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function getStartIndex(): int
+ {
+ return $this->startIndex;
+ }
+
+ public function getEndIndex(): int
+ {
+ return $this->endIndex;
+ }
+
+ public function isReservedType(): bool
+ {
+ return \in_array($this->name, self::$reservedTypes, true);
+ }
+
+ public function isNullable(): bool
+ {
+ return $this->nullable;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ArgumentsAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ArgumentsAnalyzer.php
new file mode 100644
index 0000000..0bc0a9d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ArgumentsAnalyzer.php
@@ -0,0 +1,147 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\ArgumentAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\TypeAnalysis;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Vladimir Reznichenko <kalessil@gmail.com>
+ *
+ * @internal
+ */
+final class ArgumentsAnalyzer
+{
+ /**
+ * Count amount of parameters in a function/method reference.
+ */
+ public function countArguments(Tokens $tokens, int $openParenthesis, int $closeParenthesis): int
+ {
+ return \count($this->getArguments($tokens, $openParenthesis, $closeParenthesis));
+ }
+
+ /**
+ * Returns start and end token indexes of arguments.
+ *
+ * Returns an array with each key being the first token of an
+ * argument and the value the last. Including non-function tokens
+ * such as comments and white space tokens, but without the separation
+ * tokens like '(', ',' and ')'.
+ *
+ * @return array<int, int>
+ */
+ public function getArguments(Tokens $tokens, int $openParenthesis, int $closeParenthesis): array
+ {
+ $arguments = [];
+ $firstSensibleToken = $tokens->getNextMeaningfulToken($openParenthesis);
+
+ if ($tokens[$firstSensibleToken]->equals(')')) {
+ return $arguments;
+ }
+
+ $paramContentIndex = $openParenthesis + 1;
+ $argumentsStart = $paramContentIndex;
+
+ for (; $paramContentIndex < $closeParenthesis; ++$paramContentIndex) {
+ $token = $tokens[$paramContentIndex];
+
+ // skip nested (), [], {} constructs
+ $blockDefinitionProbe = Tokens::detectBlockType($token);
+
+ if (null !== $blockDefinitionProbe && true === $blockDefinitionProbe['isStart']) {
+ $paramContentIndex = $tokens->findBlockEnd($blockDefinitionProbe['type'], $paramContentIndex);
+
+ continue;
+ }
+
+ // if comma matched, increase arguments counter
+ if ($token->equals(',')) {
+ if ($tokens->getNextMeaningfulToken($paramContentIndex) === $closeParenthesis) {
+ break; // trailing ',' in function call (PHP 7.3)
+ }
+
+ $arguments[$argumentsStart] = $paramContentIndex - 1;
+ $argumentsStart = $paramContentIndex + 1;
+ }
+ }
+
+ $arguments[$argumentsStart] = $paramContentIndex - 1;
+
+ return $arguments;
+ }
+
+ public function getArgumentInfo(Tokens $tokens, int $argumentStart, int $argumentEnd): ArgumentAnalysis
+ {
+ $info = [
+ 'default' => null,
+ 'name' => null,
+ 'name_index' => null,
+ 'type' => null,
+ 'type_index_start' => null,
+ 'type_index_end' => null,
+ ];
+
+ $sawName = false;
+
+ for ($index = $argumentStart; $index <= $argumentEnd; ++$index) {
+ $token = $tokens[$index];
+
+ if (
+ $token->isComment()
+ || $token->isWhitespace()
+ || $token->isGivenKind([T_ELLIPSIS, CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC, CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED, CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE])
+ || $token->equals('&')
+ ) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_VARIABLE)) {
+ $sawName = true;
+ $info['name_index'] = $index;
+ $info['name'] = $token->getContent();
+
+ continue;
+ }
+
+ if ($token->equals('=')) {
+ continue;
+ }
+
+ if (\defined('T_ATTRIBUTE') && $token->isGivenKind(T_ATTRIBUTE)) {
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ATTRIBUTE, $index);
+
+ continue;
+ }
+
+ if ($sawName) {
+ $info['default'] .= $token->getContent();
+ } else {
+ $info['type_index_start'] = ($info['type_index_start'] > 0) ? $info['type_index_start'] : $index;
+ $info['type_index_end'] = $index;
+ $info['type'] .= $token->getContent();
+ }
+ }
+
+ return new ArgumentAnalysis(
+ $info['name'],
+ $info['name_index'],
+ $info['default'],
+ $info['type'] ? new TypeAnalysis($info['type'], $info['type_index_start'], $info['type_index_end']) : null
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AttributeAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AttributeAnalyzer.php
new file mode 100644
index 0000000..c67b76b
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/AttributeAnalyzer.php
@@ -0,0 +1,70 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class AttributeAnalyzer
+{
+ private const TOKEN_KINDS_NOT_ALLOWED_IN_ATTRIBUTE = [
+ ';',
+ '{',
+ [T_ATTRIBUTE],
+ [T_FUNCTION],
+ [T_OPEN_TAG],
+ [T_OPEN_TAG_WITH_ECHO],
+ [T_PRIVATE],
+ [T_PROTECTED],
+ [T_PUBLIC],
+ [T_RETURN],
+ [T_VARIABLE],
+ [CT::T_ATTRIBUTE_CLOSE],
+ ];
+
+ /**
+ * Check if given index is an attribute declaration.
+ */
+ public static function isAttribute(Tokens $tokens, int $index): bool
+ {
+ if (
+ !\defined('T_ATTRIBUTE') // attributes not available, PHP version lower than 8.0
+ || !$tokens[$index]->isGivenKind(T_STRING) // checked token is not a string
+ || !$tokens->isAnyTokenKindsFound([T_ATTRIBUTE]) // no attributes in the tokens collection
+ ) {
+ return false;
+ }
+
+ $attributeStartIndex = $tokens->getPrevTokenOfKind($index, self::TOKEN_KINDS_NOT_ALLOWED_IN_ATTRIBUTE);
+ if (!$tokens[$attributeStartIndex]->isGivenKind(T_ATTRIBUTE)) {
+ return false;
+ }
+
+ // now, between attribute start and the attribute candidate index cannot be more "(" than ")"
+ $count = 0;
+ for ($i = $attributeStartIndex + 1; $i < $index; ++$i) {
+ if ($tokens[$i]->equals('(')) {
+ ++$count;
+ } elseif ($tokens[$i]->equals(')')) {
+ --$count;
+ }
+ }
+
+ return 0 === $count;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php
new file mode 100644
index 0000000..bc72630
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/BlocksAnalyzer.php
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ *
+ * @internal
+ */
+final class BlocksAnalyzer
+{
+ public function isBlock(Tokens $tokens, ?int $openIndex, ?int $closeIndex): bool
+ {
+ if (null === $openIndex || null === $closeIndex) {
+ return false;
+ }
+
+ if (!$tokens->offsetExists($openIndex)) {
+ return false;
+ }
+
+ if (!$tokens->offsetExists($closeIndex)) {
+ return false;
+ }
+
+ $blockType = $this->getBlockType($tokens[$openIndex]);
+
+ if (null === $blockType) {
+ return false;
+ }
+
+ return $closeIndex === $tokens->findBlockEnd($blockType, $openIndex);
+ }
+
+ private function getBlockType(Token $token): ?int
+ {
+ foreach (Tokens::getBlockEdgeDefinitions() as $blockType => $definition) {
+ if ($token->equals($definition['start'])) {
+ return $blockType;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php
new file mode 100644
index 0000000..8a68d91
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ClassyAnalyzer.php
@@ -0,0 +1,83 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class ClassyAnalyzer
+{
+ public function isClassyInvocation(Tokens $tokens, int $index): bool
+ {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_STRING)) {
+ throw new \LogicException(sprintf('No T_STRING at given index %d, got "%s".', $index, $tokens[$index]->getName()));
+ }
+
+ if (\in_array(strtolower($token->getContent()), ['bool', 'float', 'int', 'iterable', 'object', 'parent', 'self', 'string', 'void', 'null', 'false', 'never'], true)) {
+ return false;
+ }
+
+ $next = $tokens->getNextMeaningfulToken($index);
+ $nextToken = $tokens[$next];
+
+ if ($nextToken->isGivenKind(T_NS_SEPARATOR)) {
+ return false;
+ }
+
+ if ($nextToken->isGivenKind([T_DOUBLE_COLON, T_ELLIPSIS, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION, T_VARIABLE])) {
+ return true;
+ }
+
+ $prev = $tokens->getPrevMeaningfulToken($index);
+
+ while ($tokens[$prev]->isGivenKind([CT::T_NAMESPACE_OPERATOR, T_NS_SEPARATOR, T_STRING])) {
+ $prev = $tokens->getPrevMeaningfulToken($prev);
+ }
+
+ $prevToken = $tokens[$prev];
+
+ if ($prevToken->isGivenKind([T_EXTENDS, T_INSTANCEOF, T_INSTEADOF, T_IMPLEMENTS, T_NEW, CT::T_NULLABLE_TYPE, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION, CT::T_TYPE_COLON, CT::T_USE_TRAIT])) {
+ return true;
+ }
+
+ if (AttributeAnalyzer::isAttribute($tokens, $index)) {
+ return true;
+ }
+
+ // `Foo & $bar` could be:
+ // - function reference parameter: function baz(Foo & $bar) {}
+ // - bit operator: $x = Foo & $bar;
+ if ($nextToken->equals('&') && $tokens[$tokens->getNextMeaningfulToken($next)]->isGivenKind(T_VARIABLE)) {
+ $checkIndex = $tokens->getPrevTokenOfKind($prev + 1, [';', '{', '}', [T_FUNCTION], [T_OPEN_TAG], [T_OPEN_TAG_WITH_ECHO]]);
+
+ return $tokens[$checkIndex]->isGivenKind(T_FUNCTION);
+ }
+
+ if (!$prevToken->equals(',')) {
+ return false;
+ }
+
+ do {
+ $prev = $tokens->getPrevMeaningfulToken($prev);
+ } while ($tokens[$prev]->equalsAny([',', [T_NS_SEPARATOR], [T_STRING], [CT::T_NAMESPACE_OPERATOR]]));
+
+ return $tokens[$prev]->isGivenKind([T_IMPLEMENTS, CT::T_USE_TRAIT]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php
new file mode 100644
index 0000000..37e12d3
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/CommentsAnalyzer.php
@@ -0,0 +1,311 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ *
+ * @internal
+ */
+final class CommentsAnalyzer
+{
+ private const TYPE_HASH = 1;
+ private const TYPE_DOUBLE_SLASH = 2;
+ private const TYPE_SLASH_ASTERISK = 3;
+
+ public function isHeaderComment(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isGivenKind([T_COMMENT, T_DOC_COMMENT])) {
+ throw new \InvalidArgumentException('Given index must point to a comment.');
+ }
+
+ if (null === $tokens->getNextMeaningfulToken($index)) {
+ return false;
+ }
+
+ $prevIndex = $tokens->getPrevNonWhitespace($index);
+
+ if ($tokens[$prevIndex]->equals(';')) {
+ $braceCloseIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ if (!$tokens[$braceCloseIndex]->equals(')')) {
+ return false;
+ }
+
+ $braceOpenIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $braceCloseIndex);
+ $declareIndex = $tokens->getPrevMeaningfulToken($braceOpenIndex);
+ if (!$tokens[$declareIndex]->isGivenKind(T_DECLARE)) {
+ return false;
+ }
+
+ $prevIndex = $tokens->getPrevNonWhitespace($declareIndex);
+ }
+
+ return $tokens[$prevIndex]->isGivenKind(T_OPEN_TAG);
+ }
+
+ /**
+ * Check if comment at given index precedes structural element.
+ *
+ * @see https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#3-definitions
+ */
+ public function isBeforeStructuralElement(Tokens $tokens, int $index): bool
+ {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind([T_COMMENT, T_DOC_COMMENT])) {
+ throw new \InvalidArgumentException('Given index must point to a comment.');
+ }
+
+ $nextIndex = $index;
+ do {
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+
+ // @TODO: drop condition when PHP 8.0+ is required
+ if (\defined('T_ATTRIBUTE')) {
+ while (null !== $nextIndex && $tokens[$nextIndex]->isGivenKind(T_ATTRIBUTE)) {
+ $nextIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_ATTRIBUTE, $nextIndex);
+ $nextIndex = $tokens->getNextMeaningfulToken($nextIndex);
+ }
+ }
+ } while (null !== $nextIndex && $tokens[$nextIndex]->equals('('));
+
+ if (null === $nextIndex || $tokens[$nextIndex]->equals('}')) {
+ return false;
+ }
+
+ if ($this->isStructuralElement($tokens, $nextIndex)) {
+ return true;
+ }
+
+ if ($this->isValidControl($tokens, $token, $nextIndex)) {
+ return true;
+ }
+
+ if ($this->isValidVariable($tokens, $nextIndex)) {
+ return true;
+ }
+
+ if ($this->isValidLanguageConstruct($tokens, $token, $nextIndex)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Return array of indices that are part of a comment started at given index.
+ *
+ * @param int $index T_COMMENT index
+ */
+ public function getCommentBlockIndices(Tokens $tokens, int $index): ?array
+ {
+ if (!$tokens[$index]->isGivenKind(T_COMMENT)) {
+ throw new \InvalidArgumentException('Given index must point to a comment.');
+ }
+
+ $commentType = $this->getCommentType($tokens[$index]->getContent());
+ $indices = [$index];
+
+ if (self::TYPE_SLASH_ASTERISK === $commentType) {
+ return $indices;
+ }
+
+ $count = \count($tokens);
+ ++$index;
+
+ for (; $index < $count; ++$index) {
+ if ($tokens[$index]->isComment()) {
+ if ($commentType === $this->getCommentType($tokens[$index]->getContent())) {
+ $indices[] = $index;
+
+ continue;
+ }
+
+ break;
+ }
+
+ if (!$tokens[$index]->isWhitespace() || $this->getLineBreakCount($tokens, $index, $index + 1) > 1) {
+ break;
+ }
+ }
+
+ return $indices;
+ }
+
+ /**
+ * @see https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#3-definitions
+ */
+ private function isStructuralElement(Tokens $tokens, int $index): bool
+ {
+ static $skip;
+
+ if (null === $skip) {
+ $skip = [
+ T_PRIVATE,
+ T_PROTECTED,
+ T_PUBLIC,
+ T_VAR,
+ T_FUNCTION,
+ T_ABSTRACT,
+ T_CONST,
+ T_NAMESPACE,
+ T_REQUIRE,
+ T_REQUIRE_ONCE,
+ T_INCLUDE,
+ T_INCLUDE_ONCE,
+ T_FINAL,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE,
+ ];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $skip[] = T_READONLY;
+ }
+ }
+
+ $token = $tokens[$index];
+
+ if ($token->isClassy() || $token->isGivenKind($skip)) {
+ return true;
+ }
+
+ if ($token->isGivenKind(T_STATIC)) {
+ return !$tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_DOUBLE_COLON);
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks control structures (for, foreach, if, switch, while) for correct docblock usage.
+ *
+ * @param Token $docsToken docs Token
+ * @param int $controlIndex index of control structure Token
+ */
+ private function isValidControl(Tokens $tokens, Token $docsToken, int $controlIndex): bool
+ {
+ static $controlStructures = [
+ T_FOR,
+ T_FOREACH,
+ T_IF,
+ T_SWITCH,
+ T_WHILE,
+ ];
+
+ if (!$tokens[$controlIndex]->isGivenKind($controlStructures)) {
+ return false;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($controlIndex);
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+ $docsContent = $docsToken->getContent();
+
+ for ($index = $index + 1; $index < $endIndex; ++$index) {
+ $token = $tokens[$index];
+
+ if (
+ $token->isGivenKind(T_VARIABLE)
+ && str_contains($docsContent, $token->getContent())
+ ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks variable assignments through `list()`, `print()` etc. calls for correct docblock usage.
+ *
+ * @param Token $docsToken docs Token
+ * @param int $languageConstructIndex index of variable Token
+ */
+ private function isValidLanguageConstruct(Tokens $tokens, Token $docsToken, int $languageConstructIndex): bool
+ {
+ static $languageStructures = [
+ T_LIST,
+ T_PRINT,
+ T_ECHO,
+ CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN,
+ ];
+
+ if (!$tokens[$languageConstructIndex]->isGivenKind($languageStructures)) {
+ return false;
+ }
+
+ $endKind = $tokens[$languageConstructIndex]->isGivenKind(CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN)
+ ? [CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE]
+ : ')';
+
+ $endIndex = $tokens->getNextTokenOfKind($languageConstructIndex, [$endKind]);
+
+ $docsContent = $docsToken->getContent();
+
+ for ($index = $languageConstructIndex + 1; $index < $endIndex; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_VARIABLE) && str_contains($docsContent, $token->getContent())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks variable assignments for correct docblock usage.
+ *
+ * @param int $index index of variable Token
+ */
+ private function isValidVariable(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isGivenKind(T_VARIABLE)) {
+ return false;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ return $tokens[$nextIndex]->equals('=');
+ }
+
+ private function getCommentType(string $content): int
+ {
+ if (str_starts_with($content, '#')) {
+ return self::TYPE_HASH;
+ }
+
+ if ('*' === $content[1]) {
+ return self::TYPE_SLASH_ASTERISK;
+ }
+
+ return self::TYPE_DOUBLE_SLASH;
+ }
+
+ private function getLineBreakCount(Tokens $tokens, int $whiteStart, int $whiteEnd): int
+ {
+ $lineCount = 0;
+ for ($i = $whiteStart; $i < $whiteEnd; ++$i) {
+ $lineCount += Preg::matchAll('/\R/u', $tokens[$i]->getContent());
+ }
+
+ return $lineCount;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php
new file mode 100644
index 0000000..30efbe1
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ControlCaseStructuresAnalyzer.php
@@ -0,0 +1,284 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\AbstractControlCaseStructuresAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\CaseAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\DefaultAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\EnumAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\MatchAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\SwitchAnalysis;
+use PhpCsFixer\Tokenizer\Tokens;
+
+final class ControlCaseStructuresAnalyzer
+{
+ /**
+ * @param int[] $types Token types of interest of which analyzes must be returned
+ */
+ public static function findControlStructures(Tokens $tokens, array $types): \Generator
+ {
+ if (\count($types) < 1) {
+ return; // quick skip
+ }
+
+ $typesWithCaseOrDefault = self::getTypesWithCaseOrDefault();
+
+ foreach ($types as $type) {
+ if (!\in_array($type, $typesWithCaseOrDefault, true)) {
+ throw new \InvalidArgumentException(sprintf('Unexpected type "%d".', $type));
+ }
+ }
+
+ if (!$tokens->isAnyTokenKindsFound($types)) {
+ return; // quick skip
+ }
+
+ $depth = -1;
+ $stack = [];
+ $isTypeOfInterest = false;
+
+ foreach ($tokens as $index => $token) {
+ if ($token->isGivenKind($typesWithCaseOrDefault)) {
+ ++$depth;
+
+ $stack[$depth] = [
+ 'kind' => $token->getId(),
+ 'index' => $index,
+ 'brace_count' => 0,
+ 'cases' => [],
+ 'default' => null,
+ 'alternative_syntax' => false,
+ ];
+
+ $isTypeOfInterest = \in_array($stack[$depth]['kind'], $types, true);
+
+ if ($token->isGivenKind(T_SWITCH)) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ $stack[$depth]['open'] = $tokens->getNextMeaningfulToken($index);
+ $stack[$depth]['alternative_syntax'] = $tokens[$stack[$depth]['open']]->equals(':');
+ } elseif (\defined('T_MATCH') && $token->isGivenKind(T_MATCH)) { // @TODO: drop condition when PHP 8.0+ is required
+ $index = $tokens->getNextMeaningfulToken($index);
+ $index = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ $stack[$depth]['open'] = $tokens->getNextMeaningfulToken($index);
+ } elseif (\defined('T_ENUM') && $token->isGivenKind(T_ENUM)) {
+ $stack[$depth]['open'] = $tokens->getNextTokenOfKind($index, ['{']);
+ }
+
+ continue;
+ }
+
+ if ($depth < 0) {
+ continue;
+ }
+
+ if ($token->equals('{')) {
+ ++$stack[$depth]['brace_count']; // @phpstan-ignore-line
+
+ continue;
+ }
+
+ if ($token->equals('}')) {
+ --$stack[$depth]['brace_count']; // @phpstan-ignore-line
+
+ if (0 === $stack[$depth]['brace_count']) {
+ if ($stack[$depth]['alternative_syntax']) {
+ continue;
+ }
+
+ if ($isTypeOfInterest) {
+ $stack[$depth]['end'] = $index;
+
+ yield $stack[$depth]['index'] => self::buildControlCaseStructureAnalysis($stack[$depth]);
+ }
+
+ array_pop($stack);
+ --$depth;
+
+ if ($depth < -1) { // @phpstan-ignore-line
+ throw new \RuntimeException('Analysis depth count failure.');
+ }
+
+ if (isset($stack[$depth]['kind'])) {
+ $isTypeOfInterest = \in_array($stack[$depth]['kind'], $types, true);
+ }
+ }
+
+ continue;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_ENDSWITCH)) {
+ if (!$stack[$depth]['alternative_syntax']) {
+ throw new \RuntimeException('Analysis syntax failure, unexpected "T_ENDSWITCH".');
+ }
+
+ if (T_SWITCH !== $stack[$depth]['kind']) {
+ throw new \RuntimeException('Analysis type failure, unexpected "T_ENDSWITCH".');
+ }
+
+ if (0 !== $stack[$depth]['brace_count']) {
+ throw new \RuntimeException('Analysis count failure, unexpected "T_ENDSWITCH".');
+ }
+
+ $index = $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]);
+
+ if ($isTypeOfInterest) {
+ $stack[$depth]['end'] = $index;
+
+ yield $stack[$depth]['index'] => self::buildControlCaseStructureAnalysis($stack[$depth]);
+ }
+
+ array_pop($stack);
+ --$depth;
+
+ if ($depth < -1) { // @phpstan-ignore-line
+ throw new \RuntimeException('Analysis depth count failure ("T_ENDSWITCH").');
+ }
+
+ if (isset($stack[$depth]['kind'])) {
+ $isTypeOfInterest = \in_array($stack[$depth]['kind'], $types, true);
+ }
+ }
+
+ if (!$isTypeOfInterest) {
+ continue; // don't bother to analyze stuff that caller is not interested in
+ }
+
+ if ($token->isGivenKind(T_CASE)) {
+ $stack[$depth]['cases'][] = ['index' => $index, 'open' => self::findCaseOpen($tokens, $stack[$depth]['kind'], $index)];
+ } elseif ($token->isGivenKind(T_DEFAULT)) {
+ if (null !== $stack[$depth]['default']) {
+ throw new \RuntimeException('Analysis multiple "default" found.');
+ }
+
+ $stack[$depth]['default'] = ['index' => $index, 'open' => self::findDefaultOpen($tokens, $stack[$depth]['kind'], $index)];
+ }
+ }
+ }
+
+ private static function buildControlCaseStructureAnalysis(array $analysis): AbstractControlCaseStructuresAnalysis
+ {
+ $default = null === $analysis['default']
+ ? null
+ : new DefaultAnalysis($analysis['default']['index'], $analysis['default']['open'])
+ ;
+
+ $cases = [];
+
+ foreach ($analysis['cases'] as $case) {
+ $cases[$case['index']] = new CaseAnalysis($case['index'], $case['open']);
+ }
+
+ sort($cases);
+
+ if (T_SWITCH === $analysis['kind']) {
+ return new SwitchAnalysis(
+ $analysis['index'],
+ $analysis['open'],
+ $analysis['end'],
+ $cases,
+ $default
+ );
+ }
+
+ if (\defined('T_ENUM') && T_ENUM === $analysis['kind']) {
+ return new EnumAnalysis(
+ $analysis['index'],
+ $analysis['open'],
+ $analysis['end'],
+ $cases
+ );
+ }
+
+ if (\defined('T_MATCH') && T_MATCH === $analysis['kind']) { // @TODO: drop condition when PHP 8.0+ is required
+ return new MatchAnalysis(
+ $analysis['index'],
+ $analysis['open'],
+ $analysis['end'],
+ $default
+ );
+ }
+
+ throw new \InvalidArgumentException(sprintf('Unexpected type "%d".', $analysis['kind']));
+ }
+
+ private static function findCaseOpen(Tokens $tokens, int $kind, int $index): int
+ {
+ if (T_SWITCH === $kind) {
+ $ternariesCount = 0;
+
+ do {
+ if ($tokens[$index]->equalsAny(['(', '{'])) { // skip constructs
+ $type = Tokens::detectBlockType($tokens[$index]);
+ $index = $tokens->findBlockEnd($type['type'], $index);
+
+ continue;
+ }
+
+ if ($tokens[$index]->equals('?')) {
+ ++$ternariesCount;
+
+ continue;
+ }
+
+ if ($tokens[$index]->equalsAny([':', ';'])) {
+ if (0 === $ternariesCount) {
+ break;
+ }
+
+ --$ternariesCount;
+ }
+ } while (++$index);
+
+ return $index;
+ }
+
+ if (\defined('T_ENUM') && T_ENUM === $kind) {
+ return $tokens->getNextTokenOfKind($index, ['=', ';']);
+ }
+
+ throw new \InvalidArgumentException(sprintf('Unexpected case for type "%d".', $kind));
+ }
+
+ private static function findDefaultOpen(Tokens $tokens, int $kind, int $index): int
+ {
+ if (T_SWITCH === $kind) {
+ return $tokens->getNextTokenOfKind($index, [':', ';']);
+ }
+
+ if (\defined('T_MATCH') && T_MATCH === $kind) { // @TODO: drop condition when PHP 8.0+ is required
+ return $tokens->getNextTokenOfKind($index, [[T_DOUBLE_ARROW]]);
+ }
+
+ throw new \InvalidArgumentException(sprintf('Unexpected default for type "%d".', $kind));
+ }
+
+ private static function getTypesWithCaseOrDefault(): array
+ {
+ $supportedTypes = [T_SWITCH];
+
+ if (\defined('T_MATCH')) { // @TODO: drop condition when PHP 8.0+ is required
+ $supportedTypes[] = T_MATCH;
+ }
+
+ if (\defined('T_ENUM')) { // @TODO: drop condition when PHP 8.1+ is required
+ $supportedTypes[] = T_ENUM;
+ }
+
+ return $supportedTypes;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php
new file mode 100644
index 0000000..5edfab2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/FunctionsAnalyzer.php
@@ -0,0 +1,269 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\ArgumentAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\TypeAnalysis;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class FunctionsAnalyzer
+{
+ /**
+ * @var array
+ */
+ private $functionsAnalysis = ['tokens' => '', 'imports' => [], 'declarations' => []];
+
+ /**
+ * Important: risky because of the limited (file) scope of the tool.
+ */
+ public function isGlobalFunctionCall(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->isGivenKind(T_STRING)) {
+ return false;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$nextIndex]->equals('(')) {
+ return false;
+ }
+
+ $previousIsNamespaceSeparator = false;
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $previousIsNamespaceSeparator = true;
+ $prevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ }
+
+ $possibleKind = array_merge([T_DOUBLE_COLON, T_FUNCTION, CT::T_NAMESPACE_OPERATOR, T_NEW, CT::T_RETURN_REF, T_STRING], Token::getObjectOperatorKinds());
+
+ // @TODO: drop condition when PHP 8.0+ is required
+ if (\defined('T_ATTRIBUTE')) {
+ $possibleKind[] = T_ATTRIBUTE;
+ }
+
+ if ($tokens[$prevIndex]->isGivenKind($possibleKind)) {
+ return false;
+ }
+
+ if ($previousIsNamespaceSeparator) {
+ return true;
+ }
+
+ if ($tokens[$tokens->getNextMeaningfulToken($nextIndex)]->isGivenKind(CT::T_FIRST_CLASS_CALLABLE)) {
+ return false;
+ }
+
+ if ($tokens->isChanged() || $tokens->getCodeHash() !== $this->functionsAnalysis['tokens']) {
+ $this->buildFunctionsAnalysis($tokens);
+ }
+
+ // figure out in which namespace we are
+ $namespaceAnalyzer = new NamespacesAnalyzer();
+
+ $declarations = $namespaceAnalyzer->getDeclarations($tokens);
+ $scopeStartIndex = 0;
+ $scopeEndIndex = \count($tokens) - 1;
+ $inGlobalNamespace = false;
+
+ foreach ($declarations as $declaration) {
+ $scopeStartIndex = $declaration->getScopeStartIndex();
+ $scopeEndIndex = $declaration->getScopeEndIndex();
+
+ if ($index >= $scopeStartIndex && $index <= $scopeEndIndex) {
+ $inGlobalNamespace = '' === $declaration->getFullName();
+
+ break;
+ }
+ }
+
+ $call = strtolower($tokens[$index]->getContent());
+
+ // check if the call is to a function declared in the same namespace as the call is done,
+ // if the call is already in the global namespace than declared functions are in the same
+ // global namespace and don't need checking
+
+ if (!$inGlobalNamespace) {
+ /** @var int $functionNameIndex */
+ foreach ($this->functionsAnalysis['declarations'] as $functionNameIndex) {
+ if ($functionNameIndex < $scopeStartIndex || $functionNameIndex > $scopeEndIndex) {
+ continue;
+ }
+
+ if (strtolower($tokens[$functionNameIndex]->getContent()) === $call) {
+ return false;
+ }
+ }
+ }
+
+ /** @var NamespaceUseAnalysis $functionUse */
+ foreach ($this->functionsAnalysis['imports'] as $functionUse) {
+ if ($functionUse->getStartIndex() < $scopeStartIndex || $functionUse->getEndIndex() > $scopeEndIndex) {
+ continue;
+ }
+
+ if ($call !== strtolower($functionUse->getShortName())) {
+ continue;
+ }
+
+ // global import like `use function \str_repeat;`
+ return $functionUse->getShortName() === ltrim($functionUse->getFullName(), '\\');
+ }
+
+ if (AttributeAnalyzer::isAttribute($tokens, $index)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * @return ArgumentAnalysis[]
+ */
+ public function getFunctionArguments(Tokens $tokens, int $functionIndex): array
+ {
+ $argumentsStart = $tokens->getNextTokenOfKind($functionIndex, ['(']);
+ $argumentsEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $argumentsStart);
+ $argumentAnalyzer = new ArgumentsAnalyzer();
+ $arguments = [];
+
+ foreach ($argumentAnalyzer->getArguments($tokens, $argumentsStart, $argumentsEnd) as $start => $end) {
+ $argumentInfo = $argumentAnalyzer->getArgumentInfo($tokens, $start, $end);
+ $arguments[$argumentInfo->getName()] = $argumentInfo;
+ }
+
+ return $arguments;
+ }
+
+ public function getFunctionReturnType(Tokens $tokens, int $methodIndex): ?TypeAnalysis
+ {
+ $argumentsStart = $tokens->getNextTokenOfKind($methodIndex, ['(']);
+ $argumentsEnd = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $argumentsStart);
+ $typeColonIndex = $tokens->getNextMeaningfulToken($argumentsEnd);
+
+ if (!$tokens[$typeColonIndex]->isGivenKind(CT::T_TYPE_COLON)) {
+ return null;
+ }
+
+ $type = '';
+ $typeStartIndex = $tokens->getNextMeaningfulToken($typeColonIndex);
+ $typeEndIndex = $typeStartIndex;
+ $functionBodyStart = $tokens->getNextTokenOfKind($typeColonIndex, ['{', ';', [T_DOUBLE_ARROW]]);
+
+ for ($i = $typeStartIndex; $i < $functionBodyStart; ++$i) {
+ if ($tokens[$i]->isWhitespace() || $tokens[$i]->isComment()) {
+ continue;
+ }
+
+ $type .= $tokens[$i]->getContent();
+ $typeEndIndex = $i;
+ }
+
+ return new TypeAnalysis($type, $typeStartIndex, $typeEndIndex);
+ }
+
+ public function isTheSameClassCall(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens->offsetExists($index)) {
+ return false;
+ }
+
+ $operatorIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (null === $operatorIndex) {
+ return false;
+ }
+
+ if (!$tokens[$operatorIndex]->isObjectOperator() && !$tokens[$operatorIndex]->isGivenKind(T_DOUBLE_COLON)) {
+ return false;
+ }
+
+ $referenceIndex = $tokens->getPrevMeaningfulToken($operatorIndex);
+
+ if (null === $referenceIndex) {
+ return false;
+ }
+
+ return $tokens[$referenceIndex]->equalsAny([[T_VARIABLE, '$this'], [T_STRING, 'self'], [T_STATIC, 'static']], false);
+ }
+
+ private function buildFunctionsAnalysis(Tokens $tokens): void
+ {
+ $this->functionsAnalysis = [
+ 'tokens' => $tokens->getCodeHash(),
+ 'imports' => [],
+ 'declarations' => [],
+ ];
+
+ // find declarations
+
+ if ($tokens->isTokenKindFound(T_FUNCTION)) {
+ $end = \count($tokens);
+
+ for ($i = 0; $i < $end; ++$i) {
+ // skip classy, we are looking for functions not methods
+ if ($tokens[$i]->isGivenKind(Token::getClassyTokenKinds())) {
+ $i = $tokens->getNextTokenOfKind($i, ['(', '{']);
+
+ if ($tokens[$i]->equals('(')) { // anonymous class
+ $i = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $i);
+ $i = $tokens->getNextTokenOfKind($i, ['{']);
+ }
+
+ $i = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $i);
+
+ continue;
+ }
+
+ if (!$tokens[$i]->isGivenKind(T_FUNCTION)) {
+ continue;
+ }
+
+ $i = $tokens->getNextMeaningfulToken($i);
+
+ if ($tokens[$i]->isGivenKind(CT::T_RETURN_REF)) {
+ $i = $tokens->getNextMeaningfulToken($i);
+ }
+
+ if (!$tokens[$i]->isGivenKind(T_STRING)) {
+ continue;
+ }
+
+ $this->functionsAnalysis['declarations'][] = $i;
+ }
+ }
+
+ // find imported functions
+
+ $namespaceUsesAnalyzer = new NamespaceUsesAnalyzer();
+
+ if ($tokens->isTokenKindFound(CT::T_FUNCTION_IMPORT)) {
+ $declarations = $namespaceUsesAnalyzer->getDeclarationsFromTokens($tokens);
+
+ foreach ($declarations as $declaration) {
+ if ($declaration->isFunction()) {
+ $this->functionsAnalysis['imports'][] = $declaration;
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php
new file mode 100644
index 0000000..15d5b06
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/GotoLabelAnalyzer.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class GotoLabelAnalyzer
+{
+ public function belongsToGoToLabel(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->equals(':')) {
+ return false;
+ }
+
+ $prevMeaningfulTokenIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$tokens[$prevMeaningfulTokenIndex]->isGivenKind(T_STRING)) {
+ return false;
+ }
+
+ $prevMeaningfulTokenIndex = $tokens->getPrevMeaningfulToken($prevMeaningfulTokenIndex);
+
+ return $tokens[$prevMeaningfulTokenIndex]->equalsAny([':', ';', '{', '}', [T_OPEN_TAG]]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php
new file mode 100644
index 0000000..e319856
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespaceUsesAnalyzer.php
@@ -0,0 +1,119 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceUseAnalysis;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+use PhpCsFixer\Tokenizer\TokensAnalyzer;
+
+/**
+ * @internal
+ */
+final class NamespaceUsesAnalyzer
+{
+ /**
+ * @return NamespaceUseAnalysis[]
+ */
+ public function getDeclarationsFromTokens(Tokens $tokens): array
+ {
+ $tokenAnalyzer = new TokensAnalyzer($tokens);
+ $useIndexes = $tokenAnalyzer->getImportUseIndexes();
+
+ return $this->getDeclarations($tokens, $useIndexes);
+ }
+
+ /**
+ * @return NamespaceUseAnalysis[]
+ */
+ public function getDeclarationsInNamespace(Tokens $tokens, NamespaceAnalysis $namespace): array
+ {
+ $namespaceUses = [];
+
+ foreach ($this->getDeclarationsFromTokens($tokens) as $namespaceUse) {
+ if ($namespaceUse->getStartIndex() >= $namespace->getScopeStartIndex() && $namespaceUse->getStartIndex() <= $namespace->getScopeEndIndex()) {
+ $namespaceUses[] = $namespaceUse;
+ }
+ }
+
+ return $namespaceUses;
+ }
+
+ /**
+ * @return NamespaceUseAnalysis[]
+ */
+ private function getDeclarations(Tokens $tokens, array $useIndexes): array
+ {
+ $uses = [];
+
+ foreach ($useIndexes as $index) {
+ $endIndex = $tokens->getNextTokenOfKind($index, [';', [T_CLOSE_TAG]]);
+ $analysis = $this->parseDeclaration($tokens, $index, $endIndex);
+
+ if (null !== $analysis) {
+ $uses[] = $analysis;
+ }
+ }
+
+ return $uses;
+ }
+
+ private function parseDeclaration(Tokens $tokens, int $startIndex, int $endIndex): ?NamespaceUseAnalysis
+ {
+ $fullName = $shortName = '';
+ $aliased = false;
+
+ $type = NamespaceUseAnalysis::TYPE_CLASS;
+ for ($i = $startIndex; $i <= $endIndex; ++$i) {
+ $token = $tokens[$i];
+ if ($token->equals(',') || $token->isGivenKind(CT::T_GROUP_IMPORT_BRACE_CLOSE)) {
+ // do not touch group use declarations until the logic of this is added (for example: `use some\a\{ClassD};`)
+ // ignore multiple use statements that should be split into few separate statements (for example: `use BarB, BarC as C;`)
+ return null;
+ }
+
+ if ($token->isGivenKind(CT::T_FUNCTION_IMPORT)) {
+ $type = NamespaceUseAnalysis::TYPE_FUNCTION;
+ } elseif ($token->isGivenKind(CT::T_CONST_IMPORT)) {
+ $type = NamespaceUseAnalysis::TYPE_CONSTANT;
+ }
+
+ if ($token->isWhitespace() || $token->isComment() || $token->isGivenKind(T_USE)) {
+ continue;
+ }
+
+ if ($token->isGivenKind(T_STRING)) {
+ $shortName = $token->getContent();
+ if (!$aliased) {
+ $fullName .= $shortName;
+ }
+ } elseif ($token->isGivenKind(T_NS_SEPARATOR)) {
+ $fullName .= $token->getContent();
+ } elseif ($token->isGivenKind(T_AS)) {
+ $aliased = true;
+ }
+ }
+
+ return new NamespaceUseAnalysis(
+ trim($fullName),
+ $shortName,
+ $aliased,
+ $startIndex,
+ $endIndex,
+ $type
+ );
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php
new file mode 100644
index 0000000..e5e3f57
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/NamespacesAnalyzer.php
@@ -0,0 +1,88 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class NamespacesAnalyzer
+{
+ /**
+ * @return NamespaceAnalysis[]
+ */
+ public function getDeclarations(Tokens $tokens): array
+ {
+ $namespaces = [];
+
+ for ($index = 1, $count = \count($tokens); $index < $count; ++$index) {
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_NAMESPACE)) {
+ continue;
+ }
+
+ $declarationEndIndex = $tokens->getNextTokenOfKind($index, [';', '{']);
+ $namespace = trim($tokens->generatePartialCode($index + 1, $declarationEndIndex - 1));
+ $declarationParts = explode('\\', $namespace);
+ $shortName = end($declarationParts);
+
+ if ($tokens[$declarationEndIndex]->equals('{')) {
+ $scopeEndIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $declarationEndIndex);
+ } else {
+ $scopeEndIndex = $tokens->getNextTokenOfKind($declarationEndIndex, [[T_NAMESPACE]]);
+ if (null === $scopeEndIndex) {
+ $scopeEndIndex = \count($tokens);
+ }
+ --$scopeEndIndex;
+ }
+
+ $namespaces[] = new NamespaceAnalysis(
+ $namespace,
+ $shortName,
+ $index,
+ $declarationEndIndex,
+ $index,
+ $scopeEndIndex
+ );
+
+ // Continue the analysis after the end of this namespace to find the next one
+ $index = $scopeEndIndex;
+ }
+
+ if (0 === \count($namespaces)) {
+ $namespaces[] = new NamespaceAnalysis('', '', 0, 0, 0, \count($tokens) - 1);
+ }
+
+ return $namespaces;
+ }
+
+ public function getNamespaceAt(Tokens $tokens, int $index): NamespaceAnalysis
+ {
+ if (!$tokens->offsetExists($index)) {
+ throw new \InvalidArgumentException(sprintf('Token index %d does not exist.', $index));
+ }
+
+ foreach ($this->getDeclarations($tokens) as $namespace) {
+ if ($namespace->getScopeStartIndex() <= $index && $namespace->getScopeEndIndex() >= $index) {
+ return $namespace;
+ }
+ }
+
+ throw new \LogicException(sprintf('Unable to get the namespace at index %d.', $index));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ReferenceAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ReferenceAnalyzer.php
new file mode 100644
index 0000000..0c7d4bd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/ReferenceAnalyzer.php
@@ -0,0 +1,49 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @author Kuba Werłos <werlos@gmail.com>
+ *
+ * @internal
+ */
+final class ReferenceAnalyzer
+{
+ public function isReference(Tokens $tokens, int $index): bool
+ {
+ if ($tokens[$index]->isGivenKind(CT::T_RETURN_REF)) {
+ return true;
+ }
+
+ if (!$tokens[$index]->equals('&')) {
+ return false;
+ }
+
+ /** @var int $index */
+ $index = $tokens->getPrevMeaningfulToken($index);
+ if ($tokens[$index]->equalsAny(['=', [T_AS], [T_CALLABLE], [T_DOUBLE_ARROW], [CT::T_ARRAY_TYPEHINT]])) {
+ return true;
+ }
+
+ if ($tokens[$index]->isGivenKind(T_STRING)) {
+ $index = $tokens->getPrevMeaningfulToken($index);
+ }
+
+ return $tokens[$index]->equalsAny(['(', ',', [T_NS_SEPARATOR], [CT::T_NULLABLE_TYPE]]);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/WhitespacesAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/WhitespacesAnalyzer.php
new file mode 100644
index 0000000..0845ce4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Analyzer/WhitespacesAnalyzer.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Analyzer;
+
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class WhitespacesAnalyzer
+{
+ public static function detectIndent(Tokens $tokens, int $index): string
+ {
+ while (true) {
+ $whitespaceIndex = $tokens->getPrevTokenOfKind($index, [[T_WHITESPACE]]);
+
+ if (null === $whitespaceIndex) {
+ return '';
+ }
+
+ $whitespaceToken = $tokens[$whitespaceIndex];
+
+ if (str_contains($whitespaceToken->getContent(), "\n")) {
+ break;
+ }
+
+ $prevToken = $tokens[$whitespaceIndex - 1];
+
+ if ($prevToken->isGivenKind([T_OPEN_TAG, T_COMMENT]) && "\n" === substr($prevToken->getContent(), -1)) {
+ break;
+ }
+
+ $index = $whitespaceIndex;
+ }
+
+ $explodedContent = explode("\n", $whitespaceToken->getContent());
+
+ return end($explodedContent);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php
new file mode 100644
index 0000000..8d9c8f6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CT.php
@@ -0,0 +1,101 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class CT
+{
+ public const T_ARRAY_INDEX_CURLY_BRACE_CLOSE = 10001;
+ public const T_ARRAY_INDEX_CURLY_BRACE_OPEN = 10002;
+ public const T_ARRAY_SQUARE_BRACE_CLOSE = 10003;
+ public const T_ARRAY_SQUARE_BRACE_OPEN = 10004;
+ public const T_ARRAY_TYPEHINT = 10005;
+ public const T_BRACE_CLASS_INSTANTIATION_CLOSE = 10006;
+ public const T_BRACE_CLASS_INSTANTIATION_OPEN = 10007;
+ public const T_CLASS_CONSTANT = 10008;
+ public const T_CONST_IMPORT = 10009;
+ public const T_CURLY_CLOSE = 10010;
+ public const T_DESTRUCTURING_SQUARE_BRACE_CLOSE = 10011;
+ public const T_DESTRUCTURING_SQUARE_BRACE_OPEN = 10012;
+ public const T_DOLLAR_CLOSE_CURLY_BRACES = 10013;
+ public const T_DYNAMIC_PROP_BRACE_CLOSE = 10014;
+ public const T_DYNAMIC_PROP_BRACE_OPEN = 10015;
+ public const T_DYNAMIC_VAR_BRACE_CLOSE = 10016;
+ public const T_DYNAMIC_VAR_BRACE_OPEN = 10017;
+ public const T_FUNCTION_IMPORT = 10018;
+ public const T_GROUP_IMPORT_BRACE_CLOSE = 10019;
+ public const T_GROUP_IMPORT_BRACE_OPEN = 10020;
+ public const T_NAMESPACE_OPERATOR = 10021;
+ public const T_NULLABLE_TYPE = 10022;
+ public const T_RETURN_REF = 10023;
+ public const T_TYPE_ALTERNATION = 10024;
+ public const T_TYPE_COLON = 10025;
+ public const T_USE_LAMBDA = 10026;
+ public const T_USE_TRAIT = 10027;
+ public const T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC = 10028;
+ public const T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED = 10029;
+ public const T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE = 10030;
+ public const T_ATTRIBUTE_CLOSE = 10031;
+ public const T_NAMED_ARGUMENT_NAME = 10032;
+ public const T_NAMED_ARGUMENT_COLON = 10033;
+ public const T_FIRST_CLASS_CALLABLE = 10034;
+ public const T_TYPE_INTERSECTION = 10035;
+
+ private function __construct()
+ {
+ }
+
+ /**
+ * Get name for custom token.
+ *
+ * @param int $value custom token value
+ */
+ public static function getName(int $value): string
+ {
+ if (!self::has($value)) {
+ throw new \InvalidArgumentException(sprintf('No custom token was found for "%s".', $value));
+ }
+
+ $tokens = self::getMapById();
+
+ return 'CT::'.$tokens[$value];
+ }
+
+ /**
+ * Check if given custom token exists.
+ *
+ * @param int $value custom token value
+ */
+ public static function has(int $value): bool
+ {
+ $tokens = self::getMapById();
+
+ return isset($tokens[$value]);
+ }
+
+ private static function getMapById(): array
+ {
+ static $constants;
+
+ if (null === $constants) {
+ $reflection = new \ReflectionClass(__CLASS__);
+ $constants = array_flip($reflection->getConstants());
+ }
+
+ return $constants;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CodeHasher.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CodeHasher.php
new file mode 100644
index 0000000..2c9a7cc
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/CodeHasher.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class CodeHasher
+{
+ private function __construct()
+ {
+ // cannot create instance of util. class
+ }
+
+ /**
+ * Calculate hash for code.
+ */
+ public static function calculateCodeHash(string $code): string
+ {
+ return (string) crc32($code);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Generator/NamespacedStringTokenGenerator.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Generator/NamespacedStringTokenGenerator.php
new file mode 100644
index 0000000..d78c510
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Generator/NamespacedStringTokenGenerator.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Generator;
+
+use PhpCsFixer\Tokenizer\Token;
+
+/**
+ * @internal
+ */
+final class NamespacedStringTokenGenerator
+{
+ /**
+ * Parse a string that contains a namespace into tokens.
+ *
+ * @return Token[]
+ */
+ public function generate(string $input): array
+ {
+ $tokens = [];
+ $parts = explode('\\', $input);
+
+ foreach ($parts as $index => $part) {
+ $tokens[] = new Token([T_STRING, $part]);
+ if ($index !== \count($parts) - 1) {
+ $tokens[] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+ }
+
+ return $tokens;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Resolver/TypeShortNameResolver.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Resolver/TypeShortNameResolver.php
new file mode 100644
index 0000000..d07a0d5
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Resolver/TypeShortNameResolver.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Resolver;
+
+use PhpCsFixer\Preg;
+use PhpCsFixer\Tokenizer\Analyzer\Analysis\NamespaceAnalysis;
+use PhpCsFixer\Tokenizer\Analyzer\NamespacesAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\NamespaceUsesAnalyzer;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class TypeShortNameResolver
+{
+ /**
+ * This method will resolve the shortName of a FQCN if possible or otherwise return the inserted type name.
+ * E.g.: use Foo\Bar => "Bar".
+ */
+ public function resolve(Tokens $tokens, string $typeName): string
+ {
+ // First match explicit imports:
+ $useMap = $this->getUseMapFromTokens($tokens);
+ foreach ($useMap as $shortName => $fullName) {
+ $regex = '/^\\\\?'.preg_quote($fullName, '/').'$/';
+ if (Preg::match($regex, $typeName)) {
+ return $shortName;
+ }
+ }
+
+ // Next try to match (partial) classes inside the same namespace
+ // For now only support one namespace per file:
+ $namespaces = $this->getNamespacesFromTokens($tokens);
+ if (1 === \count($namespaces)) {
+ foreach ($namespaces as $fullName) {
+ $matches = [];
+ $regex = '/^\\\\?'.preg_quote($fullName, '/').'\\\\(?P<className>.+)$/';
+ if (Preg::match($regex, $typeName, $matches)) {
+ return $matches['className'];
+ }
+ }
+ }
+
+ // Next: Try to match partial use statements:
+
+ foreach ($useMap as $shortName => $fullName) {
+ $matches = [];
+ $regex = '/^\\\\?'.preg_quote($fullName, '/').'\\\\(?P<className>.+)$/';
+ if (Preg::match($regex, $typeName, $matches)) {
+ return $shortName.'\\'.$matches['className'];
+ }
+ }
+
+ return $typeName;
+ }
+
+ /**
+ * @return array<string, string> A list of all FQN namespaces in the file with the short name as key
+ */
+ private function getNamespacesFromTokens(Tokens $tokens): array
+ {
+ return array_map(static function (NamespaceAnalysis $info): string {
+ return $info->getFullName();
+ }, (new NamespacesAnalyzer())->getDeclarations($tokens));
+ }
+
+ /**
+ * @return array<string, string> A list of all FQN use statements in the file with the short name as key
+ */
+ private function getUseMapFromTokens(Tokens $tokens): array
+ {
+ $map = [];
+
+ foreach ((new NamespaceUsesAnalyzer())->getDeclarationsFromTokens($tokens) as $useDeclaration) {
+ $map[$useDeclaration->getShortName()] = $useDeclaration->getFullName();
+ }
+
+ return $map;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php
new file mode 100644
index 0000000..d5850e2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Token.php
@@ -0,0 +1,494 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+/**
+ * Representation of single token.
+ * As a token prototype you should understand a single element generated by token_get_all.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class Token
+{
+ /**
+ * Content of token prototype.
+ *
+ * @var string
+ */
+ private $content;
+
+ /**
+ * ID of token prototype, if available.
+ *
+ * @var null|int
+ */
+ private $id;
+
+ /**
+ * If token prototype is an array.
+ *
+ * @var bool
+ */
+ private $isArray;
+
+ /**
+ * Flag is token was changed.
+ *
+ * @var bool
+ */
+ private $changed = false;
+
+ /**
+ * @param array|string $token token prototype
+ */
+ public function __construct($token)
+ {
+ if (\is_array($token)) {
+ if (!\is_int($token[0])) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Id must be an int, got "%s".',
+ \is_object($token[0]) ? \get_class($token[0]) : \gettype($token[0])
+ ));
+ }
+
+ if (!\is_string($token[1])) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Content must be a string, got "%s".',
+ \is_object($token[1]) ? \get_class($token[1]) : \gettype($token[1])
+ ));
+ }
+
+ if ('' === $token[1]) {
+ throw new \InvalidArgumentException('Cannot set empty content for id-based Token.');
+ }
+
+ $this->isArray = true;
+ $this->id = $token[0];
+ $this->content = $token[1];
+ } elseif (\is_string($token)) {
+ $this->isArray = false;
+ $this->content = $token;
+ } else {
+ throw new \InvalidArgumentException(sprintf(
+ 'Cannot recognize input value as valid Token prototype, got "%s".',
+ // @phpstan-ignore-next-line due to lack of strong typing of method parameter
+ \is_object($token) ? \get_class($token) : \gettype($token)
+ ));
+ }
+ }
+
+ /**
+ * @return int[]
+ */
+ public static function getCastTokenKinds(): array
+ {
+ static $castTokens = [T_ARRAY_CAST, T_BOOL_CAST, T_DOUBLE_CAST, T_INT_CAST, T_OBJECT_CAST, T_STRING_CAST, T_UNSET_CAST];
+
+ return $castTokens;
+ }
+
+ /**
+ * Get classy tokens kinds: T_CLASS, T_INTERFACE and T_TRAIT.
+ *
+ * @return int[]
+ */
+ public static function getClassyTokenKinds(): array
+ {
+ static $classTokens = [T_CLASS, T_TRAIT, T_INTERFACE];
+
+ return $classTokens;
+ }
+
+ /**
+ * Get object operator tokens kinds: T_OBJECT_OPERATOR and (if available) T_NULLSAFE_OBJECT_OPERATOR.
+ *
+ * @return int[]
+ */
+ public static function getObjectOperatorKinds(): array
+ {
+ static $objectOperators = null;
+
+ if (null === $objectOperators) {
+ $objectOperators = [T_OBJECT_OPERATOR];
+ if (\defined('T_NULLSAFE_OBJECT_OPERATOR')) {
+ $objectOperators[] = T_NULLSAFE_OBJECT_OPERATOR;
+ }
+ }
+
+ return $objectOperators;
+ }
+
+ /**
+ * Check if token is equals to given one.
+ *
+ * If tokens are arrays, then only keys defined in parameter token are checked.
+ *
+ * @param array|string|Token $other token or it's prototype
+ * @param bool $caseSensitive perform a case sensitive comparison
+ */
+ public function equals($other, bool $caseSensitive = true): bool
+ {
+ if ($other instanceof self) {
+ // Inlined getPrototype() on this very hot path.
+ // We access the private properties of $other directly to save function call overhead.
+ // This is only possible because $other is of the same class as `self`.
+ if (!$other->isArray) {
+ $otherPrototype = $other->content;
+ } else {
+ $otherPrototype = [
+ $other->id,
+ $other->content,
+ ];
+ }
+ } else {
+ $otherPrototype = $other;
+ }
+
+ if ($this->isArray !== \is_array($otherPrototype)) {
+ return false;
+ }
+
+ if (!$this->isArray) {
+ return $this->content === $otherPrototype;
+ }
+
+ if ($this->id !== $otherPrototype[0]) {
+ return false;
+ }
+
+ if (isset($otherPrototype[1])) {
+ if ($caseSensitive) {
+ if ($this->content !== $otherPrototype[1]) {
+ return false;
+ }
+ } elseif (0 !== strcasecmp($this->content, $otherPrototype[1])) {
+ return false;
+ }
+ }
+
+ // detect unknown keys
+ unset($otherPrototype[0], $otherPrototype[1]);
+
+ return empty($otherPrototype);
+ }
+
+ /**
+ * Check if token is equals to one of given.
+ *
+ * @param array $others array of tokens or token prototypes
+ * @param bool $caseSensitive perform a case sensitive comparison
+ */
+ public function equalsAny(array $others, bool $caseSensitive = true): bool
+ {
+ foreach ($others as $other) {
+ if ($this->equals($other, $caseSensitive)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * A helper method used to find out whether a certain input token has to be case-sensitively matched.
+ *
+ * @param array<int, bool>|bool $caseSensitive global case sensitiveness or an array of booleans, whose keys should match
+ * the ones used in $others. If any is missing, the default case-sensitive
+ * comparison is used
+ * @param int $key the key of the token that has to be looked up
+ */
+ public static function isKeyCaseSensitive($caseSensitive, int $key): bool
+ {
+ if (\is_array($caseSensitive)) {
+ return $caseSensitive[$key] ?? true;
+ }
+
+ return $caseSensitive;
+ }
+
+ /**
+ * @return array|string token prototype
+ */
+ public function getPrototype()
+ {
+ if (!$this->isArray) {
+ return $this->content;
+ }
+
+ return [
+ $this->id,
+ $this->content,
+ ];
+ }
+
+ /**
+ * Get token's content.
+ *
+ * It shall be used only for getting the content of token, not for checking it against excepted value.
+ */
+ public function getContent(): string
+ {
+ return $this->content;
+ }
+
+ /**
+ * Get token's id.
+ *
+ * It shall be used only for getting the internal id of token, not for checking it against excepted value.
+ */
+ public function getId(): ?int
+ {
+ return $this->id;
+ }
+
+ /**
+ * Get token's name.
+ *
+ * It shall be used only for getting the name of token, not for checking it against excepted value.
+ *
+ * @return null|string token name
+ */
+ public function getName(): ?string
+ {
+ if (null === $this->id) {
+ return null;
+ }
+
+ return self::getNameForId($this->id);
+ }
+
+ /**
+ * Get token's name.
+ *
+ * It shall be used only for getting the name of token, not for checking it against excepted value.
+ *
+ * @return null|string token name
+ */
+ public static function getNameForId(int $id): ?string
+ {
+ if (CT::has($id)) {
+ return CT::getName($id);
+ }
+
+ $name = token_name($id);
+
+ return 'UNKNOWN' === $name ? null : $name;
+ }
+
+ /**
+ * Generate array containing all keywords that exists in PHP version in use.
+ *
+ * @return array<int, int>
+ */
+ public static function getKeywords(): array
+ {
+ static $keywords = null;
+
+ if (null === $keywords) {
+ $keywords = self::getTokenKindsForNames(['T_ABSTRACT', 'T_ARRAY', 'T_AS', 'T_BREAK', 'T_CALLABLE', 'T_CASE',
+ 'T_CATCH', 'T_CLASS', 'T_CLONE', 'T_CONST', 'T_CONTINUE', 'T_DECLARE', 'T_DEFAULT', 'T_DO',
+ 'T_ECHO', 'T_ELSE', 'T_ELSEIF', 'T_EMPTY', 'T_ENDDECLARE', 'T_ENDFOR', 'T_ENDFOREACH',
+ 'T_ENDIF', 'T_ENDSWITCH', 'T_ENDWHILE', 'T_EVAL', 'T_EXIT', 'T_EXTENDS', 'T_FINAL',
+ 'T_FINALLY', 'T_FN', 'T_FOR', 'T_FOREACH', 'T_FUNCTION', 'T_GLOBAL', 'T_GOTO', 'T_HALT_COMPILER',
+ 'T_IF', 'T_IMPLEMENTS', 'T_INCLUDE', 'T_INCLUDE_ONCE', 'T_INSTANCEOF', 'T_INSTEADOF',
+ 'T_INTERFACE', 'T_ISSET', 'T_LIST', 'T_LOGICAL_AND', 'T_LOGICAL_OR', 'T_LOGICAL_XOR',
+ 'T_NAMESPACE', 'T_MATCH', 'T_NEW', 'T_PRINT', 'T_PRIVATE', 'T_PROTECTED', 'T_PUBLIC', 'T_REQUIRE',
+ 'T_REQUIRE_ONCE', 'T_RETURN', 'T_STATIC', 'T_SWITCH', 'T_THROW', 'T_TRAIT', 'T_TRY',
+ 'T_UNSET', 'T_USE', 'T_VAR', 'T_WHILE', 'T_YIELD', 'T_YIELD_FROM', 'T_READONLY', 'T_ENUM',
+ ]) + [
+ CT::T_ARRAY_TYPEHINT => CT::T_ARRAY_TYPEHINT,
+ CT::T_CLASS_CONSTANT => CT::T_CLASS_CONSTANT,
+ CT::T_CONST_IMPORT => CT::T_CONST_IMPORT,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE => CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED => CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC => CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC,
+ CT::T_FUNCTION_IMPORT => CT::T_FUNCTION_IMPORT,
+ CT::T_NAMESPACE_OPERATOR => CT::T_NAMESPACE_OPERATOR,
+ CT::T_USE_LAMBDA => CT::T_USE_LAMBDA,
+ CT::T_USE_TRAIT => CT::T_USE_TRAIT,
+ ];
+ }
+
+ return $keywords;
+ }
+
+ /**
+ * Generate array containing all predefined constants that exists in PHP version in use.
+ *
+ * @see https://php.net/manual/en/language.constants.predefined.php
+ *
+ * @return array<int, int>
+ */
+ public static function getMagicConstants(): array
+ {
+ static $magicConstants = null;
+
+ if (null === $magicConstants) {
+ $magicConstants = self::getTokenKindsForNames(['T_CLASS_C', 'T_DIR', 'T_FILE', 'T_FUNC_C', 'T_LINE', 'T_METHOD_C', 'T_NS_C', 'T_TRAIT_C']);
+ }
+
+ return $magicConstants;
+ }
+
+ /**
+ * Check if token prototype is an array.
+ *
+ * @return bool is array
+ */
+ public function isArray(): bool
+ {
+ return $this->isArray;
+ }
+
+ /**
+ * Check if token is one of type cast tokens.
+ */
+ public function isCast(): bool
+ {
+ return $this->isGivenKind(self::getCastTokenKinds());
+ }
+
+ /**
+ * Check if token is one of classy tokens: T_CLASS, T_INTERFACE or T_TRAIT.
+ */
+ public function isClassy(): bool
+ {
+ return $this->isGivenKind(self::getClassyTokenKinds());
+ }
+
+ /**
+ * Check if token is one of comment tokens: T_COMMENT or T_DOC_COMMENT.
+ */
+ public function isComment(): bool
+ {
+ static $commentTokens = [T_COMMENT, T_DOC_COMMENT];
+
+ return $this->isGivenKind($commentTokens);
+ }
+
+ /**
+ * Check if token is one of object operator tokens: T_OBJECT_OPERATOR or T_NULLSAFE_OBJECT_OPERATOR.
+ */
+ public function isObjectOperator(): bool
+ {
+ return $this->isGivenKind(self::getObjectOperatorKinds());
+ }
+
+ /**
+ * Check if token is one of given kind.
+ *
+ * @param int|int[] $possibleKind kind or array of kinds
+ */
+ public function isGivenKind($possibleKind): bool
+ {
+ return $this->isArray && (\is_array($possibleKind) ? \in_array($this->id, $possibleKind, true) : $this->id === $possibleKind);
+ }
+
+ /**
+ * Check if token is a keyword.
+ */
+ public function isKeyword(): bool
+ {
+ $keywords = static::getKeywords();
+
+ return $this->isArray && isset($keywords[$this->id]);
+ }
+
+ /**
+ * Check if token is a native PHP constant: true, false or null.
+ */
+ public function isNativeConstant(): bool
+ {
+ static $nativeConstantStrings = ['true', 'false', 'null'];
+
+ return $this->isArray && \in_array(strtolower($this->content), $nativeConstantStrings, true);
+ }
+
+ /**
+ * Returns if the token is of a Magic constants type.
+ *
+ * @see https://php.net/manual/en/language.constants.predefined.php
+ */
+ public function isMagicConstant(): bool
+ {
+ $magicConstants = static::getMagicConstants();
+
+ return $this->isArray && isset($magicConstants[$this->id]);
+ }
+
+ /**
+ * Check if token is whitespace.
+ *
+ * @param null|string $whitespaces whitespace characters, default is " \t\n\r\0\x0B"
+ */
+ public function isWhitespace(?string $whitespaces = " \t\n\r\0\x0B"): bool
+ {
+ if (null === $whitespaces) {
+ $whitespaces = " \t\n\r\0\x0B";
+ }
+
+ if ($this->isArray && !$this->isGivenKind(T_WHITESPACE)) {
+ return false;
+ }
+
+ return '' === trim($this->content, $whitespaces);
+ }
+
+ public function toArray(): array
+ {
+ return [
+ 'id' => $this->id,
+ 'name' => $this->getName(),
+ 'content' => $this->content,
+ 'isArray' => $this->isArray,
+ 'changed' => $this->changed,
+ ];
+ }
+
+ public function toJson(): string
+ {
+ $jsonResult = json_encode($this->toArray(), JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK);
+
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ $jsonResult = json_encode(
+ [
+ 'errorDescription' => 'Cannot encode Tokens to JSON.',
+ 'rawErrorMessage' => json_last_error_msg(),
+ ],
+ JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK
+ );
+ }
+
+ return $jsonResult;
+ }
+
+ /**
+ * @param string[] $tokenNames
+ *
+ * @return array<int, int>
+ */
+ private static function getTokenKindsForNames(array $tokenNames): array
+ {
+ $keywords = [];
+ foreach ($tokenNames as $keywordName) {
+ if (\defined($keywordName)) {
+ $keyword = \constant($keywordName);
+ $keywords[$keyword] = $keyword;
+ }
+ }
+
+ return $keywords;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php
new file mode 100644
index 0000000..0f347f4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Tokens.php
@@ -0,0 +1,1395 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+use PhpCsFixer\Preg;
+
+/**
+ * Collection of code tokens.
+ *
+ * Its role is to provide the ability to manage collection and navigate through it.
+ *
+ * As a token prototype you should understand a single element generated by token_get_all.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @extends \SplFixedArray<Token>
+ *
+ * @final
+ */
+class Tokens extends \SplFixedArray
+{
+ public const BLOCK_TYPE_PARENTHESIS_BRACE = 1;
+ public const BLOCK_TYPE_CURLY_BRACE = 2;
+ public const BLOCK_TYPE_INDEX_SQUARE_BRACE = 3;
+ public const BLOCK_TYPE_ARRAY_SQUARE_BRACE = 4;
+ public const BLOCK_TYPE_DYNAMIC_PROP_BRACE = 5;
+ public const BLOCK_TYPE_DYNAMIC_VAR_BRACE = 6;
+ public const BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE = 7;
+ public const BLOCK_TYPE_GROUP_IMPORT_BRACE = 8;
+ public const BLOCK_TYPE_DESTRUCTURING_SQUARE_BRACE = 9;
+ public const BLOCK_TYPE_BRACE_CLASS_INSTANTIATION = 10;
+ public const BLOCK_TYPE_ATTRIBUTE = 11;
+
+ /**
+ * Static class cache.
+ *
+ * @var array
+ */
+ private static $cache = [];
+
+ /**
+ * Cache of block starts. Any change in collection will invalidate it.
+ *
+ * @var array<int, int>
+ */
+ private $blockStartCache = [];
+
+ /**
+ * Cache of block ends. Any change in collection will invalidate it.
+ *
+ * @var array<int, int>
+ */
+ private $blockEndCache = [];
+
+ /**
+ * crc32 hash of code string.
+ *
+ * @var string
+ */
+ private $codeHash;
+
+ /**
+ * Flag is collection was changed.
+ *
+ * It doesn't know about change of collection's items. To check it run `isChanged` method.
+ *
+ * @var bool
+ */
+ private $changed = false;
+
+ /**
+ * Set of found token kinds.
+ *
+ * When the token kind is present in this set it means that given token kind
+ * was ever seen inside the collection (but may not be part of it any longer).
+ * The key is token kind and the value is always true.
+ *
+ * @var array<int|string, int>
+ */
+ private $foundTokenKinds = [];
+
+ /**
+ * Clone tokens collection.
+ */
+ public function __clone()
+ {
+ foreach ($this as $key => $val) {
+ $this[$key] = clone $val;
+ }
+ }
+
+ /**
+ * Clear cache - one position or all of them.
+ *
+ * @param null|string $key position to clear, when null clear all
+ */
+ public static function clearCache(?string $key = null): void
+ {
+ if (null === $key) {
+ self::$cache = [];
+
+ return;
+ }
+
+ if (self::hasCache($key)) {
+ unset(self::$cache[$key]);
+ }
+ }
+
+ /**
+ * Detect type of block.
+ *
+ * @param Token $token token
+ *
+ * @return null|array array with 'type' and 'isStart' keys or null if not found
+ */
+ public static function detectBlockType(Token $token): ?array
+ {
+ foreach (self::getBlockEdgeDefinitions() as $type => $definition) {
+ if ($token->equals($definition['start'])) {
+ return ['type' => $type, 'isStart' => true];
+ }
+
+ if ($token->equals($definition['end'])) {
+ return ['type' => $type, 'isStart' => false];
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Create token collection from array.
+ *
+ * @param Token[] $array the array to import
+ * @param ?bool $saveIndexes save the numeric indexes used in the original array, default is yes
+ */
+ public static function fromArray($array, $saveIndexes = null): self
+ {
+ $tokens = new self(\count($array));
+
+ if (null === $saveIndexes || $saveIndexes) {
+ foreach ($array as $key => $val) {
+ $tokens[$key] = $val;
+ }
+ } else {
+ $index = 0;
+
+ foreach ($array as $val) {
+ $tokens[$index++] = $val;
+ }
+ }
+
+ $tokens->generateCode(); // regenerate code to calculate code hash
+ $tokens->clearChanged();
+
+ return $tokens;
+ }
+
+ /**
+ * Create token collection directly from code.
+ *
+ * @param string $code PHP code
+ */
+ public static function fromCode(string $code): self
+ {
+ $codeHash = self::calculateCodeHash($code);
+
+ if (self::hasCache($codeHash)) {
+ $tokens = self::getCache($codeHash);
+
+ // generate the code to recalculate the hash
+ $tokens->generateCode();
+
+ if ($codeHash === $tokens->codeHash) {
+ $tokens->clearEmptyTokens();
+ $tokens->clearChanged();
+
+ return $tokens;
+ }
+ }
+
+ $tokens = new self();
+ $tokens->setCode($code);
+ $tokens->clearChanged();
+
+ return $tokens;
+ }
+
+ public static function getBlockEdgeDefinitions(): array
+ {
+ $definitions = [
+ self::BLOCK_TYPE_CURLY_BRACE => [
+ 'start' => '{',
+ 'end' => '}',
+ ],
+ self::BLOCK_TYPE_PARENTHESIS_BRACE => [
+ 'start' => '(',
+ 'end' => ')',
+ ],
+ self::BLOCK_TYPE_INDEX_SQUARE_BRACE => [
+ 'start' => '[',
+ 'end' => ']',
+ ],
+ self::BLOCK_TYPE_ARRAY_SQUARE_BRACE => [
+ 'start' => [CT::T_ARRAY_SQUARE_BRACE_OPEN, '['],
+ 'end' => [CT::T_ARRAY_SQUARE_BRACE_CLOSE, ']'],
+ ],
+ self::BLOCK_TYPE_DYNAMIC_PROP_BRACE => [
+ 'start' => [CT::T_DYNAMIC_PROP_BRACE_OPEN, '{'],
+ 'end' => [CT::T_DYNAMIC_PROP_BRACE_CLOSE, '}'],
+ ],
+ self::BLOCK_TYPE_DYNAMIC_VAR_BRACE => [
+ 'start' => [CT::T_DYNAMIC_VAR_BRACE_OPEN, '{'],
+ 'end' => [CT::T_DYNAMIC_VAR_BRACE_CLOSE, '}'],
+ ],
+ self::BLOCK_TYPE_ARRAY_INDEX_CURLY_BRACE => [
+ 'start' => [CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN, '{'],
+ 'end' => [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE, '}'],
+ ],
+ self::BLOCK_TYPE_GROUP_IMPORT_BRACE => [
+ 'start' => [CT::T_GROUP_IMPORT_BRACE_OPEN, '{'],
+ 'end' => [CT::T_GROUP_IMPORT_BRACE_CLOSE, '}'],
+ ],
+ self::BLOCK_TYPE_DESTRUCTURING_SQUARE_BRACE => [
+ 'start' => [CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN, '['],
+ 'end' => [CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE, ']'],
+ ],
+ self::BLOCK_TYPE_BRACE_CLASS_INSTANTIATION => [
+ 'start' => [CT::T_BRACE_CLASS_INSTANTIATION_OPEN, '('],
+ 'end' => [CT::T_BRACE_CLASS_INSTANTIATION_CLOSE, ')'],
+ ],
+ ];
+
+ // @TODO: drop condition when PHP 8.0+ is required
+ if (\defined('T_ATTRIBUTE')) {
+ $definitions[self::BLOCK_TYPE_ATTRIBUTE] = [
+ 'start' => [T_ATTRIBUTE, '#['],
+ 'end' => [CT::T_ATTRIBUTE_CLOSE, ']'],
+ ];
+ }
+
+ return $definitions;
+ }
+
+ /**
+ * Set new size of collection.
+ *
+ * @param int $size
+ */
+ public function setSize($size): bool
+ {
+ if ($this->getSize() !== $size) {
+ $this->changed = true;
+
+ return parent::setSize($size);
+ }
+
+ return true;
+ }
+
+ /**
+ * Unset collection item.
+ *
+ * @param int $index
+ */
+ public function offsetUnset($index): void
+ {
+ $this->changed = true;
+ $this->unregisterFoundToken($this[$index]);
+ parent::offsetUnset($index);
+ }
+
+ /**
+ * Set collection item.
+ *
+ * Warning! `$newval` must not be typehinted to be compatible with `ArrayAccess::offsetSet` method.
+ *
+ * @param int $index
+ * @param Token $newval
+ */
+ public function offsetSet($index, $newval): void
+ {
+ $this->blockStartCache = [];
+ $this->blockEndCache = [];
+
+ if (!isset($this[$index]) || !$this[$index]->equals($newval)) {
+ $this->changed = true;
+
+ if (isset($this[$index])) {
+ $this->unregisterFoundToken($this[$index]);
+ }
+
+ $this->registerFoundToken($newval);
+ }
+
+ parent::offsetSet($index, $newval);
+ }
+
+ /**
+ * Clear internal flag if collection was changed and flag for all collection's items.
+ */
+ public function clearChanged(): void
+ {
+ $this->changed = false;
+ }
+
+ /**
+ * Clear empty tokens.
+ *
+ * Empty tokens can occur e.g. after calling clear on item of collection.
+ */
+ public function clearEmptyTokens(): void
+ {
+ $limit = $this->count();
+ $index = 0;
+
+ for (; $index < $limit; ++$index) {
+ if ($this->isEmptyAt($index)) {
+ break;
+ }
+ }
+
+ // no empty token found, therefore there is no need to override collection
+ if ($limit === $index) {
+ return;
+ }
+
+ for ($count = $index; $index < $limit; ++$index) {
+ if (!$this->isEmptyAt($index)) {
+ $this[$count++] = $this[$index]; // @phpstan-ignore-line as we know that index exists
+ }
+ }
+
+ $this->setSize($count);
+ }
+
+ /**
+ * Ensure that on given index is a whitespace with given kind.
+ *
+ * If there is a whitespace then it's content will be modified.
+ * If not - the new Token will be added.
+ *
+ * @param int $index index
+ * @param int $indexOffset index offset for Token insertion
+ * @param string $whitespace whitespace to set
+ *
+ * @return bool if new Token was added
+ */
+ public function ensureWhitespaceAtIndex(int $index, int $indexOffset, string $whitespace): bool
+ {
+ $removeLastCommentLine = static function (self $tokens, int $index, int $indexOffset, string $whitespace): string {
+ $token = $tokens[$index];
+
+ if (1 === $indexOffset && $token->isGivenKind(T_OPEN_TAG)) {
+ if (str_starts_with($whitespace, "\r\n")) {
+ $tokens[$index] = new Token([T_OPEN_TAG, rtrim($token->getContent())."\r\n"]);
+
+ return \strlen($whitespace) > 2 // can be removed on PHP 7; https://php.net/manual/en/function.substr.php
+ ? substr($whitespace, 2)
+ : ''
+ ;
+ }
+
+ $tokens[$index] = new Token([T_OPEN_TAG, rtrim($token->getContent()).$whitespace[0]]);
+
+ return \strlen($whitespace) > 1 // can be removed on PHP 7; https://php.net/manual/en/function.substr.php
+ ? substr($whitespace, 1)
+ : ''
+ ;
+ }
+
+ return $whitespace;
+ };
+
+ if ($this[$index]->isWhitespace()) {
+ $whitespace = $removeLastCommentLine($this, $index - 1, $indexOffset, $whitespace);
+
+ if ('' === $whitespace) {
+ $this->clearAt($index);
+ } else {
+ $this[$index] = new Token([T_WHITESPACE, $whitespace]);
+ }
+
+ return false;
+ }
+
+ $whitespace = $removeLastCommentLine($this, $index, $indexOffset, $whitespace);
+
+ if ('' === $whitespace) {
+ return false;
+ }
+
+ $this->insertAt(
+ $index + $indexOffset,
+ [new Token([T_WHITESPACE, $whitespace])]
+ );
+
+ return true;
+ }
+
+ /**
+ * @param int $type type of block, one of BLOCK_TYPE_*
+ * @param int $searchIndex index of opening brace
+ *
+ * @return int index of closing brace
+ */
+ public function findBlockEnd(int $type, int $searchIndex): int
+ {
+ return $this->findOppositeBlockEdge($type, $searchIndex, true);
+ }
+
+ /**
+ * @param int $type type of block, one of BLOCK_TYPE_*
+ * @param int $searchIndex index of closing brace
+ *
+ * @return int index of opening brace
+ */
+ public function findBlockStart(int $type, int $searchIndex): int
+ {
+ return $this->findOppositeBlockEdge($type, $searchIndex, false);
+ }
+
+ /**
+ * @param array|int $possibleKind kind or array of kind
+ * @param int $start optional offset
+ * @param null|int $end optional limit
+ *
+ * @return array array of tokens of given kinds or assoc array of arrays
+ */
+ public function findGivenKind($possibleKind, int $start = 0, ?int $end = null): array
+ {
+ if (null === $end) {
+ $end = $this->count();
+ }
+
+ $elements = [];
+ $possibleKinds = (array) $possibleKind;
+
+ foreach ($possibleKinds as $kind) {
+ $elements[$kind] = [];
+ }
+
+ $possibleKinds = array_filter($possibleKinds, function ($kind): bool {
+ return $this->isTokenKindFound($kind);
+ });
+
+ if (\count($possibleKinds) > 0) {
+ for ($i = $start; $i < $end; ++$i) {
+ $token = $this[$i];
+ if ($token->isGivenKind($possibleKinds)) {
+ $elements[$token->getId()][$i] = $token;
+ }
+ }
+ }
+
+ return \is_array($possibleKind) ? $elements : $elements[$possibleKind];
+ }
+
+ public function generateCode(): string
+ {
+ $code = $this->generatePartialCode(0, \count($this) - 1);
+ $this->changeCodeHash(self::calculateCodeHash($code));
+
+ return $code;
+ }
+
+ /**
+ * Generate code from tokens between given indexes.
+ *
+ * @param int $start start index
+ * @param int $end end index
+ */
+ public function generatePartialCode(int $start, int $end): string
+ {
+ $code = '';
+
+ for ($i = $start; $i <= $end; ++$i) {
+ $code .= $this[$i]->getContent();
+ }
+
+ return $code;
+ }
+
+ /**
+ * Get hash of code.
+ */
+ public function getCodeHash(): string
+ {
+ return $this->codeHash;
+ }
+
+ /**
+ * Get index for closest next token which is non whitespace.
+ *
+ * This method is shorthand for getNonWhitespaceSibling method.
+ *
+ * @param int $index token index
+ * @param null|string $whitespaces whitespaces characters for Token::isWhitespace
+ */
+ public function getNextNonWhitespace(int $index, ?string $whitespaces = null): ?int
+ {
+ return $this->getNonWhitespaceSibling($index, 1, $whitespaces);
+ }
+
+ /**
+ * Get index for closest next token of given kind.
+ *
+ * This method is shorthand for getTokenOfKindSibling method.
+ *
+ * @param int $index token index
+ * @param array $tokens possible tokens
+ * @param bool $caseSensitive perform a case sensitive comparison
+ */
+ public function getNextTokenOfKind(int $index, array $tokens = [], bool $caseSensitive = true): ?int
+ {
+ return $this->getTokenOfKindSibling($index, 1, $tokens, $caseSensitive);
+ }
+
+ /**
+ * Get index for closest sibling token which is non whitespace.
+ *
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ * @param null|string $whitespaces whitespaces characters for Token::isWhitespace
+ */
+ public function getNonWhitespaceSibling(int $index, int $direction, ?string $whitespaces = null): ?int
+ {
+ while (true) {
+ $index += $direction;
+
+ if (!$this->offsetExists($index)) {
+ return null;
+ }
+
+ if (!$this[$index]->isWhitespace($whitespaces)) {
+ return $index;
+ }
+ }
+ }
+
+ /**
+ * Get index for closest previous token which is non whitespace.
+ *
+ * This method is shorthand for getNonWhitespaceSibling method.
+ *
+ * @param int $index token index
+ * @param null|string $whitespaces whitespaces characters for Token::isWhitespace
+ */
+ public function getPrevNonWhitespace(int $index, ?string $whitespaces = null): ?int
+ {
+ return $this->getNonWhitespaceSibling($index, -1, $whitespaces);
+ }
+
+ /**
+ * Get index for closest previous token of given kind.
+ * This method is shorthand for getTokenOfKindSibling method.
+ *
+ * @param int $index token index
+ * @param array $tokens possible tokens
+ * @param bool $caseSensitive perform a case sensitive comparison
+ */
+ public function getPrevTokenOfKind(int $index, array $tokens = [], bool $caseSensitive = true): ?int
+ {
+ return $this->getTokenOfKindSibling($index, -1, $tokens, $caseSensitive);
+ }
+
+ /**
+ * Get index for closest sibling token of given kind.
+ *
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ * @param array $tokens possible tokens
+ * @param bool $caseSensitive perform a case sensitive comparison
+ */
+ public function getTokenOfKindSibling(int $index, int $direction, array $tokens = [], bool $caseSensitive = true): ?int
+ {
+ $tokens = array_filter($tokens, function ($token): bool {
+ return $this->isTokenKindFound($this->extractTokenKind($token));
+ });
+
+ if (0 === \count($tokens)) {
+ return null;
+ }
+
+ while (true) {
+ $index += $direction;
+
+ if (!$this->offsetExists($index)) {
+ return null;
+ }
+
+ if ($this[$index]->equalsAny($tokens, $caseSensitive)) {
+ return $index;
+ }
+ }
+ }
+
+ /**
+ * Get index for closest sibling token not of given kind.
+ *
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ * @param array $tokens possible tokens
+ */
+ public function getTokenNotOfKindSibling(int $index, int $direction, array $tokens = []): ?int
+ {
+ return $this->getTokenNotOfKind(
+ $index,
+ $direction,
+ function (int $a) use ($tokens): bool {
+ return $this[$a]->equalsAny($tokens);
+ }
+ );
+ }
+
+ /**
+ * Get index for closest sibling token not of given kind.
+ *
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ * @param array $kinds possible tokens kinds
+ */
+ public function getTokenNotOfKindsSibling(int $index, int $direction, array $kinds = []): ?int
+ {
+ return $this->getTokenNotOfKind(
+ $index,
+ $direction,
+ function (int $index) use ($kinds): bool {
+ return $this[$index]->isGivenKind($kinds);
+ }
+ );
+ }
+
+ /**
+ * Get index for closest sibling token that is not a whitespace, comment or attribute.
+ *
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ */
+ public function getMeaningfulTokenSibling(int $index, int $direction): ?int
+ {
+ return $this->getTokenNotOfKindsSibling(
+ $index,
+ $direction,
+ [T_WHITESPACE, T_COMMENT, T_DOC_COMMENT]
+ );
+ }
+
+ /**
+ * Get index for closest sibling token which is not empty.
+ *
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ */
+ public function getNonEmptySibling(int $index, int $direction): ?int
+ {
+ while (true) {
+ $index += $direction;
+
+ if (!$this->offsetExists($index)) {
+ return null;
+ }
+
+ if (!$this->isEmptyAt($index)) {
+ return $index;
+ }
+ }
+ }
+
+ /**
+ * Get index for closest next token that is not a whitespace or comment.
+ *
+ * @param int $index token index
+ */
+ public function getNextMeaningfulToken(int $index): ?int
+ {
+ return $this->getMeaningfulTokenSibling($index, 1);
+ }
+
+ /**
+ * Get index for closest previous token that is not a whitespace or comment.
+ *
+ * @param int $index token index
+ */
+ public function getPrevMeaningfulToken(int $index): ?int
+ {
+ return $this->getMeaningfulTokenSibling($index, -1);
+ }
+
+ /**
+ * Find a sequence of meaningful tokens and returns the array of their locations.
+ *
+ * @param array $sequence an array of tokens (kinds) (same format used by getNextTokenOfKind)
+ * @param int $start start index, defaulting to the start of the file
+ * @param null|int $end end index, defaulting to the end of the file
+ * @param array<int, bool>|bool $caseSensitive global case sensitiveness or an array of booleans, whose keys should match
+ * the ones used in $others. If any is missing, the default case-sensitive
+ * comparison is used
+ *
+ * @return null|array<int, Token> an array containing the tokens matching the sequence elements, indexed by their position
+ */
+ public function findSequence(array $sequence, int $start = 0, ?int $end = null, $caseSensitive = true): ?array
+ {
+ $sequenceCount = \count($sequence);
+ if (0 === $sequenceCount) {
+ throw new \InvalidArgumentException('Invalid sequence.');
+ }
+
+ // $end defaults to the end of the collection
+ $end = null === $end ? \count($this) - 1 : min($end, \count($this) - 1);
+
+ if ($start + $sequenceCount - 1 > $end) {
+ return null;
+ }
+
+ $nonMeaningFullKind = [T_COMMENT, T_DOC_COMMENT, T_WHITESPACE];
+
+ // make sure the sequence content is "meaningful"
+ foreach ($sequence as $key => $token) {
+ // if not a Token instance already, we convert it to verify the meaningfulness
+ if (!$token instanceof Token) {
+ if (\is_array($token) && !isset($token[1])) {
+ // fake some content as it is required by the Token constructor,
+ // although optional for search purposes
+ $token[1] = 'DUMMY';
+ }
+
+ $token = new Token($token);
+ }
+
+ if ($token->isGivenKind($nonMeaningFullKind)) {
+ throw new \InvalidArgumentException(sprintf('Non-meaningful token at position: "%s".', $key));
+ }
+
+ if ('' === $token->getContent()) {
+ throw new \InvalidArgumentException(sprintf('Non-meaningful (empty) token at position: "%s".', $key));
+ }
+ }
+
+ foreach ($sequence as $token) {
+ if (!$this->isTokenKindFound($this->extractTokenKind($token))) {
+ return null;
+ }
+ }
+
+ // remove the first token from the sequence, so we can freely iterate through the sequence after a match to
+ // the first one is found
+ $key = key($sequence);
+ $firstCs = Token::isKeyCaseSensitive($caseSensitive, $key);
+ $firstToken = $sequence[$key];
+ unset($sequence[$key]);
+
+ // begin searching for the first token in the sequence (start included)
+ $index = $start - 1;
+ while ($index <= $end) {
+ $index = $this->getNextTokenOfKind($index, [$firstToken], $firstCs);
+
+ // ensure we found a match and didn't get past the end index
+ if (null === $index || $index > $end) {
+ return null;
+ }
+
+ // initialise the result array with the current index
+ $result = [$index => $this[$index]];
+
+ // advance cursor to the current position
+ $currIdx = $index;
+
+ // iterate through the remaining tokens in the sequence
+ foreach ($sequence as $key => $token) {
+ $currIdx = $this->getNextMeaningfulToken($currIdx);
+
+ // ensure we didn't go too far
+ if (null === $currIdx || $currIdx > $end) {
+ return null;
+ }
+
+ if (!$this[$currIdx]->equals($token, Token::isKeyCaseSensitive($caseSensitive, $key))) {
+ // not a match, restart the outer loop
+ continue 2;
+ }
+
+ // append index to the result array
+ $result[$currIdx] = $this[$currIdx];
+ }
+
+ // do we have a complete match?
+ // hint: $result is bigger than $sequence since the first token has been removed from the latter
+ if (\count($sequence) < \count($result)) {
+ return $result;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Insert instances of Token inside collection.
+ *
+ * @param int $index start inserting index
+ * @param array<Token>|Token|Tokens $items instances of Token to insert
+ */
+ public function insertAt(int $index, $items): void
+ {
+ $items = \is_array($items) || $items instanceof self ? $items : [$items];
+
+ $this->insertSlices([$index => $items]);
+ }
+
+ /**
+ * Insert a slices or individual Tokens into multiple places in a single run.
+ *
+ * This approach is kind-of an experiment - it's proven to improve performance a lot for big files that needs plenty of new tickets to be inserted,
+ * like edge case example of 3.7h vs 4s (https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3996#issuecomment-455617637),
+ * yet at same time changing a logic of fixers in not-always easy way.
+ *
+ * To be discussed:
+ * - should we always aim to use this method?
+ * - should we deprecate `insertAt` method ?
+ *
+ * The `$slices` parameter is an assoc array, in which:
+ * - index: starting point for inserting of individual slice, with indexes being relatives to original array collection before any Token inserted
+ * - value under index: a slice of Tokens to be inserted
+ *
+ * @internal
+ *
+ * @param array<int, array<Token>|Token|Tokens> $slices
+ */
+ public function insertSlices(array $slices): void
+ {
+ $itemsCount = 0;
+ foreach ($slices as $slice) {
+ $slice = \is_array($slice) || $slice instanceof self ? $slice : [$slice];
+ $itemsCount += \count($slice);
+ }
+
+ if (0 === $itemsCount) {
+ return;
+ }
+
+ $oldSize = \count($this);
+ $this->changed = true;
+ $this->blockStartCache = [];
+ $this->blockEndCache = [];
+ $this->setSize($oldSize + $itemsCount);
+
+ krsort($slices);
+
+ $insertBound = $oldSize - 1;
+
+ // since we only move already existing items around, we directly call into SplFixedArray::offset* methods.
+ // that way we get around additional overhead this class adds with overridden offset* methods.
+ foreach ($slices as $index => $slice) {
+ $slice = \is_array($slice) || $slice instanceof self ? $slice : [$slice];
+ $sliceCount = \count($slice);
+
+ for ($i = $insertBound; $i >= $index; --$i) {
+ $oldItem = parent::offsetExists($i) ? parent::offsetGet($i) : new Token('');
+ parent::offsetSet($i + $itemsCount, $oldItem);
+ }
+
+ $insertBound = $index - $sliceCount;
+ $itemsCount -= $sliceCount;
+
+ foreach ($slice as $indexItem => $item) {
+ if ('' === $item->getContent()) {
+ throw new \InvalidArgumentException('Must not add empty token to collection.');
+ }
+
+ $this->registerFoundToken($item);
+ $newOffset = $index + $itemsCount + $indexItem;
+ parent::offsetSet($newOffset, $item);
+ }
+ }
+ }
+
+ /**
+ * Check if collection was change: collection itself (like insert new tokens) or any of collection's elements.
+ */
+ public function isChanged(): bool
+ {
+ if ($this->changed) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public function isEmptyAt(int $index): bool
+ {
+ $token = $this[$index];
+
+ return null === $token->getId() && '' === $token->getContent();
+ }
+
+ public function clearAt(int $index): void
+ {
+ $this[$index] = new Token('');
+ }
+
+ /**
+ * Override tokens at given range.
+ *
+ * @param int $indexStart start overriding index
+ * @param int $indexEnd end overriding index
+ * @param array<Token>|Tokens $items tokens to insert
+ */
+ public function overrideRange(int $indexStart, int $indexEnd, iterable $items): void
+ {
+ $indexToChange = $indexEnd - $indexStart + 1;
+ $itemsCount = \count($items);
+
+ // If we want to add more items than passed range contains we need to
+ // add placeholders for overhead items.
+ if ($itemsCount > $indexToChange) {
+ $placeholders = [];
+
+ while ($itemsCount > $indexToChange) {
+ $placeholders[] = new Token('__PLACEHOLDER__');
+ ++$indexToChange;
+ }
+
+ $this->insertAt($indexEnd + 1, $placeholders);
+ }
+
+ // Override each items.
+ foreach ($items as $itemIndex => $item) {
+ $this[$indexStart + $itemIndex] = $item;
+ }
+
+ // If we want to add fewer tokens than passed range contains then clear
+ // not needed tokens.
+ if ($itemsCount < $indexToChange) {
+ $this->clearRange($indexStart + $itemsCount, $indexEnd);
+ }
+ }
+
+ /**
+ * @param null|string $whitespaces optional whitespaces characters for Token::isWhitespace
+ */
+ public function removeLeadingWhitespace(int $index, ?string $whitespaces = null): void
+ {
+ $this->removeWhitespaceSafely($index, -1, $whitespaces);
+ }
+
+ /**
+ * @param null|string $whitespaces optional whitespaces characters for Token::isWhitespace
+ */
+ public function removeTrailingWhitespace(int $index, ?string $whitespaces = null): void
+ {
+ $this->removeWhitespaceSafely($index, 1, $whitespaces);
+ }
+
+ /**
+ * Set code. Clear all current content and replace it by new Token items generated from code directly.
+ *
+ * @param string $code PHP code
+ */
+ public function setCode(string $code): void
+ {
+ // No need to work when the code is the same.
+ // That is how we avoid a lot of work and setting changed flag.
+ if ($code === $this->generateCode()) {
+ return;
+ }
+
+ // clear memory
+ $this->setSize(0);
+
+ $tokens = token_get_all($code, TOKEN_PARSE);
+
+ $this->setSize(\count($tokens));
+
+ foreach ($tokens as $index => $token) {
+ $this[$index] = new Token($token);
+ }
+
+ $this->applyTransformers();
+
+ $this->foundTokenKinds = [];
+
+ foreach ($this as $token) {
+ $this->registerFoundToken($token);
+ }
+
+ if (\PHP_VERSION_ID < 80000) {
+ $this->rewind();
+ }
+
+ $this->changeCodeHash(self::calculateCodeHash($code));
+ $this->changed = true;
+ }
+
+ public function toJson(): string
+ {
+ $output = new \SplFixedArray(\count($this));
+
+ foreach ($this as $index => $token) {
+ $output[$index] = $token->toArray();
+ }
+
+ if (\PHP_VERSION_ID < 80000) {
+ $this->rewind();
+ }
+
+ return json_encode($output, JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK);
+ }
+
+ /**
+ * Check if all token kinds given as argument are found.
+ */
+ public function isAllTokenKindsFound(array $tokenKinds): bool
+ {
+ foreach ($tokenKinds as $tokenKind) {
+ if (empty($this->foundTokenKinds[$tokenKind])) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if any token kind given as argument is found.
+ */
+ public function isAnyTokenKindsFound(array $tokenKinds): bool
+ {
+ foreach ($tokenKinds as $tokenKind) {
+ if (!empty($this->foundTokenKinds[$tokenKind])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if token kind given as argument is found.
+ *
+ * @param int|string $tokenKind
+ */
+ public function isTokenKindFound($tokenKind): bool
+ {
+ return !empty($this->foundTokenKinds[$tokenKind]);
+ }
+
+ /**
+ * @param int|string $tokenKind
+ */
+ public function countTokenKind($tokenKind): int
+ {
+ return $this->foundTokenKinds[$tokenKind] ?? 0;
+ }
+
+ /**
+ * Clear tokens in the given range.
+ */
+ public function clearRange(int $indexStart, int $indexEnd): void
+ {
+ for ($i = $indexStart; $i <= $indexEnd; ++$i) {
+ $this->clearAt($i);
+ }
+ }
+
+ /**
+ * Checks for monolithic PHP code.
+ *
+ * Checks that the code is pure PHP code, in a single code block, starting
+ * with an open tag.
+ */
+ public function isMonolithicPhp(): bool
+ {
+ $size = $this->count();
+
+ if (0 === $size) {
+ return false;
+ }
+
+ if ($this->isTokenKindFound(T_INLINE_HTML)) {
+ return false;
+ }
+
+ return 1 >= ($this->countTokenKind(T_OPEN_TAG) + $this->countTokenKind(T_OPEN_TAG_WITH_ECHO));
+ }
+
+ /**
+ * @param int $start start index
+ * @param int $end end index
+ */
+ public function isPartialCodeMultiline(int $start, int $end): bool
+ {
+ for ($i = $start; $i <= $end; ++$i) {
+ if (str_contains($this[$i]->getContent(), "\n")) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function hasAlternativeSyntax(): bool
+ {
+ return $this->isAnyTokenKindsFound([
+ T_ENDDECLARE,
+ T_ENDFOR,
+ T_ENDFOREACH,
+ T_ENDIF,
+ T_ENDSWITCH,
+ T_ENDWHILE,
+ ]);
+ }
+
+ public function clearTokenAndMergeSurroundingWhitespace(int $index): void
+ {
+ $count = \count($this);
+ $this->clearAt($index);
+
+ if ($index === $count - 1) {
+ return;
+ }
+
+ $nextIndex = $this->getNonEmptySibling($index, 1);
+
+ if (null === $nextIndex || !$this[$nextIndex]->isWhitespace()) {
+ return;
+ }
+
+ $prevIndex = $this->getNonEmptySibling($index, -1);
+
+ if ($this[$prevIndex]->isWhitespace()) {
+ $this[$prevIndex] = new Token([T_WHITESPACE, $this[$prevIndex]->getContent().$this[$nextIndex]->getContent()]);
+ } elseif ($this->isEmptyAt($prevIndex + 1)) {
+ $this[$prevIndex + 1] = new Token([T_WHITESPACE, $this[$nextIndex]->getContent()]);
+ }
+
+ $this->clearAt($nextIndex);
+ }
+
+ /**
+ * @internal
+ */
+ protected function applyTransformers(): void
+ {
+ $transformers = Transformers::createSingleton();
+ $transformers->transform($this);
+ }
+
+ private function removeWhitespaceSafely(int $index, int $direction, ?string $whitespaces = null): void
+ {
+ $whitespaceIndex = $this->getNonEmptySibling($index, $direction);
+ if (isset($this[$whitespaceIndex]) && $this[$whitespaceIndex]->isWhitespace()) {
+ $newContent = '';
+ $tokenToCheck = $this[$whitespaceIndex];
+
+ // if the token candidate to remove is preceded by single line comment we do not consider the new line after this comment as part of T_WHITESPACE
+ if (isset($this[$whitespaceIndex - 1]) && $this[$whitespaceIndex - 1]->isComment() && '/*' !== substr($this[$whitespaceIndex - 1]->getContent(), 0, 2)) {
+ [$emptyString, $newContent, $whitespacesToCheck] = Preg::split('/^(\R)/', $this[$whitespaceIndex]->getContent(), -1, PREG_SPLIT_DELIM_CAPTURE);
+
+ if ('' === $whitespacesToCheck) {
+ return;
+ }
+
+ $tokenToCheck = new Token([T_WHITESPACE, $whitespacesToCheck]);
+ }
+
+ if (!$tokenToCheck->isWhitespace($whitespaces)) {
+ return;
+ }
+
+ if ('' === $newContent) {
+ $this->clearAt($whitespaceIndex);
+ } else {
+ $this[$whitespaceIndex] = new Token([T_WHITESPACE, $newContent]);
+ }
+ }
+ }
+
+ /**
+ * @param int $type type of block, one of BLOCK_TYPE_*
+ * @param int $searchIndex index of starting brace
+ * @param bool $findEnd if method should find block's end or start
+ *
+ * @return int index of opposite brace
+ */
+ private function findOppositeBlockEdge(int $type, int $searchIndex, bool $findEnd): int
+ {
+ $blockEdgeDefinitions = self::getBlockEdgeDefinitions();
+
+ if (!isset($blockEdgeDefinitions[$type])) {
+ throw new \InvalidArgumentException(sprintf('Invalid param type: "%s".', $type));
+ }
+
+ if ($findEnd && isset($this->blockStartCache[$searchIndex])) {
+ return $this->blockStartCache[$searchIndex];
+ }
+ if (!$findEnd && isset($this->blockEndCache[$searchIndex])) {
+ return $this->blockEndCache[$searchIndex];
+ }
+
+ $startEdge = $blockEdgeDefinitions[$type]['start'];
+ $endEdge = $blockEdgeDefinitions[$type]['end'];
+ $startIndex = $searchIndex;
+ $endIndex = $this->count() - 1;
+ $indexOffset = 1;
+
+ if (!$findEnd) {
+ [$startEdge, $endEdge] = [$endEdge, $startEdge];
+ $indexOffset = -1;
+ $endIndex = 0;
+ }
+
+ if (!$this[$startIndex]->equals($startEdge)) {
+ throw new \InvalidArgumentException(sprintf('Invalid param $startIndex - not a proper block "%s".', $findEnd ? 'start' : 'end'));
+ }
+
+ $blockLevel = 0;
+
+ for ($index = $startIndex; $index !== $endIndex; $index += $indexOffset) {
+ $token = $this[$index];
+
+ if ($token->equals($startEdge)) {
+ ++$blockLevel;
+
+ continue;
+ }
+
+ if ($token->equals($endEdge)) {
+ --$blockLevel;
+
+ if (0 === $blockLevel) {
+ break;
+ }
+ }
+ }
+
+ if (!$this[$index]->equals($endEdge)) {
+ throw new \UnexpectedValueException(sprintf('Missing block "%s".', $findEnd ? 'end' : 'start'));
+ }
+
+ if ($startIndex < $index) {
+ $this->blockStartCache[$startIndex] = $index;
+ $this->blockEndCache[$index] = $startIndex;
+ } else {
+ $this->blockStartCache[$index] = $startIndex;
+ $this->blockEndCache[$startIndex] = $index;
+ }
+
+ return $index;
+ }
+
+ /**
+ * Calculate hash for code.
+ */
+ private static function calculateCodeHash(string $code): string
+ {
+ return CodeHasher::calculateCodeHash($code);
+ }
+
+ /**
+ * Get cache value for given key.
+ *
+ * @param string $key item key
+ */
+ private static function getCache(string $key): self
+ {
+ if (!self::hasCache($key)) {
+ throw new \OutOfBoundsException(sprintf('Unknown cache key: "%s".', $key));
+ }
+
+ return self::$cache[$key];
+ }
+
+ /**
+ * Check if given key exists in cache.
+ *
+ * @param string $key item key
+ */
+ private static function hasCache(string $key): bool
+ {
+ return isset(self::$cache[$key]);
+ }
+
+ /**
+ * @param string $key item key
+ * @param Tokens $value item value
+ */
+ private static function setCache(string $key, self $value): void
+ {
+ self::$cache[$key] = $value;
+ }
+
+ /**
+ * Change code hash.
+ *
+ * Remove old cache and set new one.
+ *
+ * @param string $codeHash new code hash
+ */
+ private function changeCodeHash(string $codeHash): void
+ {
+ if (null !== $this->codeHash) {
+ self::clearCache($this->codeHash);
+ }
+
+ $this->codeHash = $codeHash;
+ self::setCache($this->codeHash, $this);
+ }
+
+ /**
+ * Register token as found.
+ *
+ * @param array|string|Token $token token prototype
+ */
+ private function registerFoundToken($token): void
+ {
+ // inlined extractTokenKind() call on the hot path
+ $tokenKind = $token instanceof Token
+ ? ($token->isArray() ? $token->getId() : $token->getContent())
+ : (\is_array($token) ? $token[0] : $token)
+ ;
+
+ if (!isset($this->foundTokenKinds[$tokenKind])) {
+ $this->foundTokenKinds[$tokenKind] = 0;
+ }
+
+ ++$this->foundTokenKinds[$tokenKind];
+ }
+
+ /**
+ * Register token as found.
+ *
+ * @param array|string|Token $token token prototype
+ */
+ private function unregisterFoundToken($token): void
+ {
+ // inlined extractTokenKind() call on the hot path
+ $tokenKind = $token instanceof Token
+ ? ($token->isArray() ? $token->getId() : $token->getContent())
+ : (\is_array($token) ? $token[0] : $token)
+ ;
+
+ if (!isset($this->foundTokenKinds[$tokenKind])) {
+ return;
+ }
+
+ --$this->foundTokenKinds[$tokenKind];
+ }
+
+ /**
+ * @param array|string|Token $token token prototype
+ *
+ * @return int|string
+ */
+ private function extractTokenKind($token)
+ {
+ return $token instanceof Token
+ ? ($token->isArray() ? $token->getId() : $token->getContent())
+ : (\is_array($token) ? $token[0] : $token)
+ ;
+ }
+
+ /**
+ * @param int $index token index
+ * @param int $direction direction for looking, +1 or -1
+ */
+ private function getTokenNotOfKind(int $index, int $direction, callable $filter): ?int
+ {
+ while (true) {
+ $index += $direction;
+
+ if (!$this->offsetExists($index)) {
+ return null;
+ }
+
+ if ($this->isEmptyAt($index) || $filter($index)) {
+ continue;
+ }
+
+ return $index;
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php
new file mode 100644
index 0000000..1356365
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TokensAnalyzer.php
@@ -0,0 +1,762 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+use PhpCsFixer\Tokenizer\Analyzer\AttributeAnalyzer;
+use PhpCsFixer\Tokenizer\Analyzer\GotoLabelAnalyzer;
+
+/**
+ * Analyzer of Tokens collection.
+ *
+ * Its role is to provide the ability to analyze collection.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Gregor Harlan <gharlan@web.de>
+ *
+ * @internal
+ */
+final class TokensAnalyzer
+{
+ /**
+ * Tokens collection instance.
+ *
+ * @var Tokens
+ */
+ private $tokens;
+
+ /**
+ * @var ?GotoLabelAnalyzer
+ */
+ private $gotoLabelAnalyzer;
+
+ public function __construct(Tokens $tokens)
+ {
+ $this->tokens = $tokens;
+ }
+
+ /**
+ * Get indexes of methods and properties in classy code (classes, interfaces and traits).
+ *
+ * @return array[]
+ */
+ public function getClassyElements(): array
+ {
+ $elements = [];
+
+ for ($index = 1, $count = \count($this->tokens) - 2; $index < $count; ++$index) {
+ if ($this->tokens[$index]->isClassy()) {
+ [$index, $newElements] = $this->findClassyElements($index, $index);
+ $elements += $newElements;
+ }
+ }
+
+ ksort($elements);
+
+ return $elements;
+ }
+
+ /**
+ * Get indexes of namespace uses.
+ *
+ * @param bool $perNamespace Return namespace uses per namespace
+ *
+ * @return int[]|int[][]
+ */
+ public function getImportUseIndexes(bool $perNamespace = false): array
+ {
+ $tokens = $this->tokens;
+
+ $uses = [];
+ $namespaceIndex = 0;
+
+ for ($index = 0, $limit = $tokens->count(); $index < $limit; ++$index) {
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind(T_NAMESPACE)) {
+ $nextTokenIndex = $tokens->getNextTokenOfKind($index, [';', '{']);
+ $nextToken = $tokens[$nextTokenIndex];
+
+ if ($nextToken->equals('{')) {
+ $index = $nextTokenIndex;
+ }
+
+ if ($perNamespace) {
+ ++$namespaceIndex;
+ }
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_USE)) {
+ $uses[$namespaceIndex][] = $index;
+ }
+ }
+
+ if (!$perNamespace && isset($uses[$namespaceIndex])) {
+ return $uses[$namespaceIndex];
+ }
+
+ return $uses;
+ }
+
+ /**
+ * Check if there is an array at given index.
+ */
+ public function isArray(int $index): bool
+ {
+ return $this->tokens[$index]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN]);
+ }
+
+ /**
+ * Check if the array at index is multiline.
+ *
+ * This only checks the root-level of the array.
+ */
+ public function isArrayMultiLine(int $index): bool
+ {
+ if (!$this->isArray($index)) {
+ throw new \InvalidArgumentException(sprintf('Not an array at given index %d.', $index));
+ }
+
+ $tokens = $this->tokens;
+
+ // Skip only when it's an array, for short arrays we need the brace for correct
+ // level counting
+ if ($tokens[$index]->isGivenKind(T_ARRAY)) {
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+
+ return $this->isBlockMultiline($tokens, $index);
+ }
+
+ public function isBlockMultiline(Tokens $tokens, int $index): bool
+ {
+ $blockType = Tokens::detectBlockType($tokens[$index]);
+
+ if (null === $blockType || !$blockType['isStart']) {
+ throw new \InvalidArgumentException(sprintf('Not an block start at given index %d.', $index));
+ }
+
+ $endIndex = $tokens->findBlockEnd($blockType['type'], $index);
+
+ for (++$index; $index < $endIndex; ++$index) {
+ $token = $tokens[$index];
+ $blockType = Tokens::detectBlockType($token);
+
+ if (null !== $blockType && $blockType['isStart']) {
+ $index = $tokens->findBlockEnd($blockType['type'], $index);
+
+ continue;
+ }
+
+ if (
+ $token->isWhitespace()
+ && !$tokens[$index - 1]->isGivenKind(T_END_HEREDOC)
+ && str_contains($token->getContent(), "\n")
+ ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the attributes of the method under the given index.
+ *
+ * The array has the following items:
+ * 'visibility' int|null T_PRIVATE, T_PROTECTED or T_PUBLIC
+ * 'static' bool
+ * 'abstract' bool
+ * 'final' bool
+ *
+ * @param int $index Token index of the method (T_FUNCTION)
+ */
+ public function getMethodAttributes(int $index): array
+ {
+ $tokens = $this->tokens;
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_FUNCTION)) {
+ throw new \LogicException(sprintf('No T_FUNCTION at given index %d, got "%s".', $index, $token->getName()));
+ }
+
+ $attributes = [
+ 'visibility' => null,
+ 'static' => false,
+ 'abstract' => false,
+ 'final' => false,
+ ];
+
+ for ($i = $index; $i >= 0; --$i) {
+ $tokenIndex = $tokens->getPrevMeaningfulToken($i);
+
+ $i = $tokenIndex;
+ $token = $tokens[$tokenIndex];
+
+ if ($token->isGivenKind(T_STATIC)) {
+ $attributes['static'] = true;
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_FINAL)) {
+ $attributes['final'] = true;
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_ABSTRACT)) {
+ $attributes['abstract'] = true;
+
+ continue;
+ }
+
+ // visibility
+
+ if ($token->isGivenKind(T_PRIVATE)) {
+ $attributes['visibility'] = T_PRIVATE;
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_PROTECTED)) {
+ $attributes['visibility'] = T_PROTECTED;
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_PUBLIC)) {
+ $attributes['visibility'] = T_PUBLIC;
+
+ continue;
+ }
+
+ // found a meaningful token that is not part of
+ // the function signature; stop looking
+ break;
+ }
+
+ return $attributes;
+ }
+
+ /**
+ * Check if there is an anonymous class under given index.
+ */
+ public function isAnonymousClass(int $index): bool
+ {
+ if (!$this->tokens[$index]->isClassy()) {
+ throw new \LogicException(sprintf('No classy token at given index %d.', $index));
+ }
+
+ if (!$this->tokens[$index]->isGivenKind(T_CLASS)) {
+ return false;
+ }
+
+ $index = $this->tokens->getPrevMeaningfulToken($index);
+
+ while ($this->tokens[$index]->isGivenKind(CT::T_ATTRIBUTE_CLOSE)) {
+ $index = $this->tokens->findBlockStart(Tokens::BLOCK_TYPE_ATTRIBUTE, $index);
+ $index = $this->tokens->getPrevMeaningfulToken($index);
+ }
+
+ return $this->tokens[$index]->isGivenKind(T_NEW);
+ }
+
+ /**
+ * Check if the function under given index is a lambda.
+ */
+ public function isLambda(int $index): bool
+ {
+ if (
+ !$this->tokens[$index]->isGivenKind(T_FUNCTION)
+ && (\PHP_VERSION_ID < 70400 || !$this->tokens[$index]->isGivenKind(T_FN))
+ ) {
+ throw new \LogicException(sprintf('No T_FUNCTION or T_FN at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
+ }
+
+ $startParenthesisIndex = $this->tokens->getNextMeaningfulToken($index);
+ $startParenthesisToken = $this->tokens[$startParenthesisIndex];
+
+ // skip & for `function & () {}` syntax
+ if ($startParenthesisToken->isGivenKind(CT::T_RETURN_REF)) {
+ $startParenthesisIndex = $this->tokens->getNextMeaningfulToken($startParenthesisIndex);
+ $startParenthesisToken = $this->tokens[$startParenthesisIndex];
+ }
+
+ return $startParenthesisToken->equals('(');
+ }
+
+ /**
+ * Check if the T_STRING under given index is a constant invocation.
+ */
+ public function isConstantInvocation(int $index): bool
+ {
+ if (!$this->tokens[$index]->isGivenKind(T_STRING)) {
+ throw new \LogicException(sprintf('No T_STRING at given index %d, got "%s".', $index, $this->tokens[$index]->getName()));
+ }
+
+ $nextIndex = $this->tokens->getNextMeaningfulToken($index);
+
+ if (
+ $this->tokens[$nextIndex]->equalsAny(['(', '{'])
+ || $this->tokens[$nextIndex]->isGivenKind([T_AS, T_DOUBLE_COLON, T_ELLIPSIS, T_NS_SEPARATOR, CT::T_RETURN_REF, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION, T_VARIABLE])
+ ) {
+ return false;
+ }
+
+ $prevIndex = $this->tokens->getPrevMeaningfulToken($index);
+
+ if ($this->tokens[$prevIndex]->isGivenKind([T_AS, T_CLASS, T_CONST, T_DOUBLE_COLON, T_FUNCTION, T_GOTO, CT::T_GROUP_IMPORT_BRACE_OPEN, T_INTERFACE, T_TRAIT, CT::T_TYPE_COLON, CT::T_TYPE_ALTERNATION, CT::T_TYPE_INTERSECTION]) || $this->tokens[$prevIndex]->isObjectOperator()) {
+ return false;
+ }
+
+ while ($this->tokens[$prevIndex]->isGivenKind([CT::T_NAMESPACE_OPERATOR, T_NS_SEPARATOR, T_STRING])) {
+ $prevIndex = $this->tokens->getPrevMeaningfulToken($prevIndex);
+ }
+
+ if ($this->tokens[$prevIndex]->isGivenKind([CT::T_CONST_IMPORT, T_EXTENDS, CT::T_FUNCTION_IMPORT, T_IMPLEMENTS, T_INSTANCEOF, T_INSTEADOF, T_NAMESPACE, T_NEW, CT::T_NULLABLE_TYPE, CT::T_TYPE_COLON, T_USE, CT::T_USE_TRAIT])) {
+ return false;
+ }
+
+ // `FOO & $bar` could be:
+ // - function reference parameter: function baz(Foo & $bar) {}
+ // - bit operator: $x = FOO & $bar;
+ if ($this->tokens[$nextIndex]->equals('&') && $this->tokens[$this->tokens->getNextMeaningfulToken($nextIndex)]->isGivenKind(T_VARIABLE)) {
+ $checkIndex = $this->tokens->getPrevTokenOfKind($prevIndex, [';', '{', '}', [T_FUNCTION], [T_OPEN_TAG], [T_OPEN_TAG_WITH_ECHO]]);
+
+ if ($this->tokens[$checkIndex]->isGivenKind(T_FUNCTION)) {
+ return false;
+ }
+ }
+
+ // check for `extends`/`implements`/`use` list
+ if ($this->tokens[$prevIndex]->equals(',')) {
+ $checkIndex = $prevIndex;
+ while ($this->tokens[$checkIndex]->equalsAny([',', [T_AS], [CT::T_NAMESPACE_OPERATOR], [T_NS_SEPARATOR], [T_STRING]])) {
+ $checkIndex = $this->tokens->getPrevMeaningfulToken($checkIndex);
+ }
+
+ if ($this->tokens[$checkIndex]->isGivenKind([T_EXTENDS, CT::T_GROUP_IMPORT_BRACE_OPEN, T_IMPLEMENTS, T_USE, CT::T_USE_TRAIT])) {
+ return false;
+ }
+ }
+
+ // check for array in double quoted string: `"..$foo[bar].."`
+ if ($this->tokens[$prevIndex]->equals('[') && $this->tokens[$nextIndex]->equals(']')) {
+ $checkToken = $this->tokens[$this->tokens->getNextMeaningfulToken($nextIndex)];
+
+ if ($checkToken->equals('"') || $checkToken->isGivenKind([T_CURLY_OPEN, T_DOLLAR_OPEN_CURLY_BRACES, T_ENCAPSED_AND_WHITESPACE, T_VARIABLE])) {
+ return false;
+ }
+ }
+
+ // check for attribute: `#[Foo]`
+ if (AttributeAnalyzer::isAttribute($this->tokens, $index)) {
+ return false;
+ }
+
+ // check for goto label
+ if ($this->tokens[$nextIndex]->equals(':')) {
+ if (null === $this->gotoLabelAnalyzer) {
+ $this->gotoLabelAnalyzer = new GotoLabelAnalyzer();
+ }
+
+ if ($this->gotoLabelAnalyzer->belongsToGoToLabel($this->tokens, $nextIndex)) {
+ return false;
+ }
+ }
+
+ // check for non-capturing catches
+ if ($this->tokens[$prevIndex]->equals('(')) {
+ $prevPrevIndex = $this->tokens->getPrevMeaningfulToken($prevIndex);
+ if ($this->tokens[$prevPrevIndex]->isGivenKind(T_CATCH)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks if there is a unary successor operator under given index.
+ */
+ public function isUnarySuccessorOperator(int $index): bool
+ {
+ static $allowedPrevToken = [
+ ']',
+ [T_STRING],
+ [T_VARIABLE],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ [CT::T_DYNAMIC_PROP_BRACE_CLOSE],
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ ];
+
+ $tokens = $this->tokens;
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind([T_INC, T_DEC])) {
+ return false;
+ }
+
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+
+ return $prevToken->equalsAny($allowedPrevToken);
+ }
+
+ /**
+ * Checks if there is a unary predecessor operator under given index.
+ */
+ public function isUnaryPredecessorOperator(int $index): bool
+ {
+ static $potentialSuccessorOperator = [T_INC, T_DEC];
+
+ static $potentialBinaryOperator = ['+', '-', '&', [CT::T_RETURN_REF]];
+
+ static $otherOperators;
+ if (null === $otherOperators) {
+ $otherOperators = ['!', '~', '@', [T_ELLIPSIS]];
+ }
+
+ static $disallowedPrevTokens;
+ if (null === $disallowedPrevTokens) {
+ $disallowedPrevTokens = [
+ ']',
+ '}',
+ ')',
+ '"',
+ '`',
+ [CT::T_ARRAY_SQUARE_BRACE_CLOSE],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ [CT::T_DYNAMIC_PROP_BRACE_CLOSE],
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ [T_CLASS_C],
+ [T_CONSTANT_ENCAPSED_STRING],
+ [T_DEC],
+ [T_DIR],
+ [T_DNUMBER],
+ [T_FILE],
+ [T_FUNC_C],
+ [T_INC],
+ [T_LINE],
+ [T_LNUMBER],
+ [T_METHOD_C],
+ [T_NS_C],
+ [T_STRING],
+ [T_TRAIT_C],
+ [T_VARIABLE],
+ ];
+ }
+
+ $tokens = $this->tokens;
+ $token = $tokens[$index];
+
+ if ($token->isGivenKind($potentialSuccessorOperator)) {
+ return !$this->isUnarySuccessorOperator($index);
+ }
+
+ if ($token->equalsAny($otherOperators)) {
+ return true;
+ }
+
+ if (!$token->equalsAny($potentialBinaryOperator)) {
+ return false;
+ }
+
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+
+ if (!$prevToken->equalsAny($disallowedPrevTokens)) {
+ return true;
+ }
+
+ if (!$token->equals('&') || !$prevToken->isGivenKind(T_STRING)) {
+ return false;
+ }
+
+ static $searchTokens = [
+ ';',
+ '{',
+ '}',
+ [T_FUNCTION],
+ [T_OPEN_TAG],
+ [T_OPEN_TAG_WITH_ECHO],
+ ];
+ $prevToken = $tokens[$tokens->getPrevTokenOfKind($index, $searchTokens)];
+
+ return $prevToken->isGivenKind(T_FUNCTION);
+ }
+
+ /**
+ * Checks if there is a binary operator under given index.
+ */
+ public function isBinaryOperator(int $index): bool
+ {
+ static $nonArrayOperators = [
+ '=' => true,
+ '*' => true,
+ '/' => true,
+ '%' => true,
+ '<' => true,
+ '>' => true,
+ '|' => true,
+ '^' => true,
+ '.' => true,
+ ];
+
+ static $potentialUnaryNonArrayOperators = [
+ '+' => true,
+ '-' => true,
+ '&' => true,
+ ];
+
+ static $arrayOperators;
+ if (null === $arrayOperators) {
+ $arrayOperators = [
+ T_AND_EQUAL => true, // &=
+ T_BOOLEAN_AND => true, // &&
+ T_BOOLEAN_OR => true, // ||
+ T_CONCAT_EQUAL => true, // .=
+ T_DIV_EQUAL => true, // /=
+ T_DOUBLE_ARROW => true, // =>
+ T_IS_EQUAL => true, // ==
+ T_IS_GREATER_OR_EQUAL => true, // >=
+ T_IS_IDENTICAL => true, // ===
+ T_IS_NOT_EQUAL => true, // !=, <>
+ T_IS_NOT_IDENTICAL => true, // !==
+ T_IS_SMALLER_OR_EQUAL => true, // <=
+ T_LOGICAL_AND => true, // and
+ T_LOGICAL_OR => true, // or
+ T_LOGICAL_XOR => true, // xor
+ T_MINUS_EQUAL => true, // -=
+ T_MOD_EQUAL => true, // %=
+ T_MUL_EQUAL => true, // *=
+ T_OR_EQUAL => true, // |=
+ T_PLUS_EQUAL => true, // +=
+ T_POW => true, // **
+ T_POW_EQUAL => true, // **=
+ T_SL => true, // <<
+ T_SL_EQUAL => true, // <<=
+ T_SR => true, // >>
+ T_SR_EQUAL => true, // >>=
+ T_XOR_EQUAL => true, // ^=
+ T_SPACESHIP => true, // <=>
+ T_COALESCE => true, // ??
+ ];
+
+ // @TODO: drop condition when PHP 7.4+ is required
+ if (\defined('T_COALESCE_EQUAL')) {
+ $arrayOperators[T_COALESCE_EQUAL] = true; // ??=
+ }
+ }
+
+ $tokens = $this->tokens;
+ $token = $tokens[$index];
+
+ if ($token->isArray()) {
+ return isset($arrayOperators[$token->getId()]);
+ }
+
+ if (isset($nonArrayOperators[$token->getContent()])) {
+ return true;
+ }
+
+ if (isset($potentialUnaryNonArrayOperators[$token->getContent()])) {
+ return !$this->isUnaryPredecessorOperator($index);
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if `T_WHILE` token at given index is `do { ... } while ();` syntax
+ * and not `while () { ...}`.
+ */
+ public function isWhilePartOfDoWhile(int $index): bool
+ {
+ $tokens = $this->tokens;
+ $token = $tokens[$index];
+
+ if (!$token->isGivenKind(T_WHILE)) {
+ throw new \LogicException(sprintf('No T_WHILE at given index %d, got "%s".', $index, $token->getName()));
+ }
+
+ $endIndex = $tokens->getPrevMeaningfulToken($index);
+ if (!$tokens[$endIndex]->equals('}')) {
+ return false;
+ }
+
+ $startIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $endIndex);
+ $beforeStartIndex = $tokens->getPrevMeaningfulToken($startIndex);
+
+ return $tokens[$beforeStartIndex]->isGivenKind(T_DO);
+ }
+
+ public function isSuperGlobal(int $index): bool
+ {
+ static $superNames = [
+ '$_COOKIE' => true,
+ '$_ENV' => true,
+ '$_FILES' => true,
+ '$_GET' => true,
+ '$_POST' => true,
+ '$_REQUEST' => true,
+ '$_SERVER' => true,
+ '$_SESSION' => true,
+ '$GLOBALS' => true,
+ ];
+
+ $token = $this->tokens[$index];
+
+ if (!$token->isGivenKind(T_VARIABLE)) {
+ return false;
+ }
+
+ return isset($superNames[strtoupper($token->getContent())]);
+ }
+
+ /**
+ * Find classy elements.
+ *
+ * Searches in tokens from the classy (start) index till the end (index) of the classy.
+ * Returns an array; first value is the index until the method has analysed (int), second the found classy elements (array).
+ *
+ * @param int $classIndex classy index
+ */
+ private function findClassyElements(int $classIndex, int $index): array
+ {
+ $elements = [];
+ $curlyBracesLevel = 0;
+ $bracesLevel = 0;
+ ++$index; // skip the classy index itself
+
+ for ($count = \count($this->tokens); $index < $count; ++$index) {
+ $token = $this->tokens[$index];
+
+ if ($token->isGivenKind(T_ENCAPSED_AND_WHITESPACE)) {
+ continue;
+ }
+
+ if ($token->isClassy()) { // anonymous class in class
+ // check for nested anonymous classes inside the new call of an anonymous class,
+ // for example `new class(function (){new class(function (){new class(function (){}){};}){};}){};` etc.
+ // if class(XYZ) {} skip till `(` as XYZ might contain functions etc.
+
+ $nestedClassIndex = $index;
+ $index = $this->tokens->getNextMeaningfulToken($index);
+
+ if ($this->tokens[$index]->equals('(')) {
+ ++$index; // move after `(`
+
+ for ($nestedBracesLevel = 1; $index < $count; ++$index) {
+ $token = $this->tokens[$index];
+
+ if ($token->equals('(')) {
+ ++$nestedBracesLevel;
+
+ continue;
+ }
+
+ if ($token->equals(')')) {
+ --$nestedBracesLevel;
+
+ if (0 === $nestedBracesLevel) {
+ [$index, $newElements] = $this->findClassyElements($nestedClassIndex, $index);
+ $elements += $newElements;
+
+ break;
+ }
+
+ continue;
+ }
+
+ if ($token->isClassy()) { // anonymous class in class
+ [$index, $newElements] = $this->findClassyElements($index, $index);
+ $elements += $newElements;
+ }
+ }
+ } else {
+ [$index, $newElements] = $this->findClassyElements($nestedClassIndex, $nestedClassIndex);
+ $elements += $newElements;
+ }
+
+ continue;
+ }
+
+ if ($token->equals('(')) {
+ ++$bracesLevel;
+
+ continue;
+ }
+
+ if ($token->equals(')')) {
+ --$bracesLevel;
+
+ continue;
+ }
+
+ if ($token->equals('{')) {
+ ++$curlyBracesLevel;
+
+ continue;
+ }
+
+ if ($token->equals('}')) {
+ --$curlyBracesLevel;
+
+ if (0 === $curlyBracesLevel) {
+ break;
+ }
+
+ continue;
+ }
+
+ if (1 !== $curlyBracesLevel || !$token->isArray()) {
+ continue;
+ }
+
+ if (0 === $bracesLevel && $token->isGivenKind(T_VARIABLE)) {
+ $elements[$index] = [
+ 'classIndex' => $classIndex,
+ 'token' => $token,
+ 'type' => 'property',
+ ];
+
+ continue;
+ }
+
+ if ($token->isGivenKind(T_FUNCTION)) {
+ $elements[$index] = [
+ 'classIndex' => $classIndex,
+ 'token' => $token,
+ 'type' => 'method',
+ ];
+ } elseif ($token->isGivenKind(T_CONST)) {
+ $elements[$index] = [
+ 'classIndex' => $classIndex,
+ 'token' => $token,
+ 'type' => 'const',
+ ];
+ } elseif ($token->isGivenKind(CT::T_USE_TRAIT)) {
+ $elements[$index] = [
+ 'classIndex' => $classIndex,
+ 'token' => $token,
+ 'type' => 'trait_import',
+ ];
+ }
+ }
+
+ return [$index, $elements];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php
new file mode 100644
index 0000000..69410f7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ArrayTypehintTransformer.php
@@ -0,0 +1,63 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `array` typehint from T_ARRAY into CT::T_ARRAY_TYPEHINT.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ArrayTypehintTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->isGivenKind(T_ARRAY)) {
+ return;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+ $nextToken = $tokens[$nextIndex];
+
+ if (!$nextToken->equals('(')) {
+ $tokens[$index] = new Token([CT::T_ARRAY_TYPEHINT, $token->getContent()]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_ARRAY_TYPEHINT];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php
new file mode 100644
index 0000000..c099f88
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/AttributeTransformer.php
@@ -0,0 +1,79 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transforms attribute related Tokens.
+ *
+ * @internal
+ */
+final class AttributeTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // must run before all other transformers that might touch attributes
+ return 200;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 80000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$tokens[$index]->isGivenKind(T_ATTRIBUTE)) {
+ return;
+ }
+
+ $level = 1;
+
+ do {
+ ++$index;
+
+ if ($tokens[$index]->equals('[')) {
+ ++$level;
+ } elseif ($tokens[$index]->equals(']')) {
+ --$level;
+ }
+ } while (0 < $level);
+
+ $tokens[$index] = new Token([CT::T_ATTRIBUTE_CLOSE, ']']);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [
+ CT::T_ATTRIBUTE_CLOSE,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php
new file mode 100644
index 0000000..00be8d7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/BraceClassInstantiationTransformer.php
@@ -0,0 +1,90 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform braced class instantiation braces in `(new Foo())` into CT::T_BRACE_CLASS_INSTANTIATION_OPEN
+ * and CT::T_BRACE_CLASS_INSTANTIATION_CLOSE.
+ *
+ * @author Sebastiaans Stok <s.stok@rollerscapes.net>
+ *
+ * @internal
+ */
+final class BraceClassInstantiationTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // must run after CurlyBraceTransformer and SquareBraceTransformer
+ return -2;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$tokens[$index]->equals('(') || !$tokens[$tokens->getNextMeaningfulToken($index)]->equals([T_NEW])) {
+ return;
+ }
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($index)]->equalsAny([
+ ']',
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ [CT::T_ARRAY_SQUARE_BRACE_CLOSE],
+ [T_ARRAY],
+ [T_CLASS],
+ [T_ELSEIF],
+ [T_FOR],
+ [T_FOREACH],
+ [T_IF],
+ [T_STATIC],
+ [T_STRING],
+ [T_SWITCH],
+ [T_VARIABLE],
+ [T_WHILE],
+ ])) {
+ return;
+ }
+
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
+
+ $tokens[$index] = new Token([CT::T_BRACE_CLASS_INSTANTIATION_OPEN, '(']);
+ $tokens[$closeIndex] = new Token([CT::T_BRACE_CLASS_INSTANTIATION_CLOSE, ')']);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_BRACE_CLASS_INSTANTIATION_OPEN, CT::T_BRACE_CLASS_INSTANTIATION_CLOSE];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php
new file mode 100644
index 0000000..5a60092
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ClassConstantTransformer.php
@@ -0,0 +1,66 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `class` class' constant from T_CLASS into CT::T_CLASS_CONSTANT.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ClassConstantTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50500;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->equalsAny([
+ [T_CLASS, 'class'],
+ [T_STRING, 'class'],
+ ], false)) {
+ return;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+ $prevToken = $tokens[$prevIndex];
+
+ if ($prevToken->isGivenKind(T_DOUBLE_COLON)) {
+ $tokens[$index] = new Token([CT::T_CLASS_CONSTANT, $token->getContent()]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_CLASS_CONSTANT];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php
new file mode 100644
index 0000000..aa3d495
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ConstructorPromotionTransformer.php
@@ -0,0 +1,80 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transforms for Constructor Property Promotion.
+ *
+ * Transform T_PUBLIC, T_PROTECTED and T_PRIVATE of Constructor Property Promotion into custom tokens.
+ *
+ * @internal
+ */
+final class ConstructorPromotionTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 80000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
+ return;
+ }
+
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ if (!$tokens[$index]->isGivenKind(T_STRING) || '__construct' !== strtolower($tokens[$index]->getContent())) {
+ return;
+ }
+
+ /** @var int $openIndex */
+ $openIndex = $tokens->getNextMeaningfulToken($index); // we are @ '(' now
+ $closeIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $openIndex);
+
+ for ($index = $openIndex; $index < $closeIndex; ++$index) {
+ if ($tokens[$index]->isGivenKind(T_PUBLIC)) {
+ $tokens[$index] = new Token([CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC, $tokens[$index]->getContent()]);
+ } elseif ($tokens[$index]->isGivenKind(T_PROTECTED)) {
+ $tokens[$index] = new Token([CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED, $tokens[$index]->getContent()]);
+ } elseif ($tokens[$index]->isGivenKind(T_PRIVATE)) {
+ $tokens[$index] = new Token([CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE, $tokens[$index]->getContent()]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED,
+ CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/CurlyBraceTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/CurlyBraceTransformer.php
new file mode 100644
index 0000000..14333dc
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/CurlyBraceTransformer.php
@@ -0,0 +1,253 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform discriminate overloaded curly braces tokens.
+ *
+ * Performed transformations:
+ * - closing `}` for T_CURLY_OPEN into CT::T_CURLY_CLOSE,
+ * - closing `}` for T_DOLLAR_OPEN_CURLY_BRACES into CT::T_DOLLAR_CLOSE_CURLY_BRACES,
+ * - in `$foo->{$bar}` into CT::T_DYNAMIC_PROP_BRACE_OPEN and CT::T_DYNAMIC_PROP_BRACE_CLOSE,
+ * - in `${$foo}` into CT::T_DYNAMIC_VAR_BRACE_OPEN and CT::T_DYNAMIC_VAR_BRACE_CLOSE,
+ * - in `$array{$index}` into CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN and CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE,
+ * - in `use some\a\{ClassA, ClassB, ClassC as C}` into CT::T_GROUP_IMPORT_BRACE_OPEN, CT::T_GROUP_IMPORT_BRACE_CLOSE.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class CurlyBraceTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ $this->transformIntoCurlyCloseBrace($tokens, $token, $index);
+ $this->transformIntoDollarCloseBrace($tokens, $token, $index);
+ $this->transformIntoDynamicPropBraces($tokens, $token, $index);
+ $this->transformIntoDynamicVarBraces($tokens, $token, $index);
+ $this->transformIntoCurlyIndexBraces($tokens, $token, $index);
+ $this->transformIntoGroupUseBraces($tokens, $token, $index);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [
+ CT::T_CURLY_CLOSE,
+ CT::T_DOLLAR_CLOSE_CURLY_BRACES,
+ CT::T_DYNAMIC_PROP_BRACE_OPEN,
+ CT::T_DYNAMIC_PROP_BRACE_CLOSE,
+ CT::T_DYNAMIC_VAR_BRACE_OPEN,
+ CT::T_DYNAMIC_VAR_BRACE_CLOSE,
+ CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN,
+ CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE,
+ CT::T_GROUP_IMPORT_BRACE_OPEN,
+ CT::T_GROUP_IMPORT_BRACE_CLOSE,
+ ];
+ }
+
+ /**
+ * Transform closing `}` for T_CURLY_OPEN into CT::T_CURLY_CLOSE.
+ *
+ * This should be done at very beginning of curly braces transformations.
+ */
+ private function transformIntoCurlyCloseBrace(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->isGivenKind(T_CURLY_OPEN)) {
+ return;
+ }
+
+ $level = 1;
+
+ do {
+ ++$index;
+
+ if ($tokens[$index]->equals('{') || $tokens[$index]->isGivenKind(T_CURLY_OPEN)) { // we count all kind of {
+ ++$level;
+ } elseif ($tokens[$index]->equals('}')) { // we count all kind of }
+ --$level;
+ }
+ } while (0 < $level);
+
+ $tokens[$index] = new Token([CT::T_CURLY_CLOSE, '}']);
+ }
+
+ private function transformIntoDollarCloseBrace(Tokens $tokens, Token $token, int $index): void
+ {
+ if ($token->isGivenKind(T_DOLLAR_OPEN_CURLY_BRACES)) {
+ $nextIndex = $tokens->getNextTokenOfKind($index, ['}']);
+ $tokens[$nextIndex] = new Token([CT::T_DOLLAR_CLOSE_CURLY_BRACES, '}']);
+ }
+ }
+
+ private function transformIntoDynamicPropBraces(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->isObjectOperator()) {
+ return;
+ }
+
+ if (!$tokens[$index + 1]->equals('{')) {
+ return;
+ }
+
+ $openIndex = $index + 1;
+ $closeIndex = $this->naivelyFindCurlyBlockEnd($tokens, $openIndex);
+
+ $tokens[$openIndex] = new Token([CT::T_DYNAMIC_PROP_BRACE_OPEN, '{']);
+ $tokens[$closeIndex] = new Token([CT::T_DYNAMIC_PROP_BRACE_CLOSE, '}']);
+ }
+
+ private function transformIntoDynamicVarBraces(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->equals('$')) {
+ return;
+ }
+
+ $openIndex = $tokens->getNextMeaningfulToken($index);
+
+ if (null === $openIndex) {
+ return;
+ }
+
+ $openToken = $tokens[$openIndex];
+
+ if (!$openToken->equals('{')) {
+ return;
+ }
+
+ $closeIndex = $this->naivelyFindCurlyBlockEnd($tokens, $openIndex);
+
+ $tokens[$openIndex] = new Token([CT::T_DYNAMIC_VAR_BRACE_OPEN, '{']);
+ $tokens[$closeIndex] = new Token([CT::T_DYNAMIC_VAR_BRACE_CLOSE, '}']);
+ }
+
+ private function transformIntoCurlyIndexBraces(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->equals('{')) {
+ return;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$tokens[$prevIndex]->equalsAny([
+ [T_STRING],
+ [T_VARIABLE],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ ']',
+ ')',
+ ])) {
+ return;
+ }
+
+ if (
+ $tokens[$prevIndex]->isGivenKind(T_STRING)
+ && !$tokens[$tokens->getPrevMeaningfulToken($prevIndex)]->isObjectOperator()
+ ) {
+ return;
+ }
+
+ if (
+ $tokens[$prevIndex]->equals(')')
+ && !$tokens[$tokens->getPrevMeaningfulToken(
+ $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $prevIndex)
+ )]->isGivenKind(T_ARRAY)
+ ) {
+ return;
+ }
+
+ $closeIndex = $this->naivelyFindCurlyBlockEnd($tokens, $index);
+
+ $tokens[$index] = new Token([CT::T_ARRAY_INDEX_CURLY_BRACE_OPEN, '{']);
+ $tokens[$closeIndex] = new Token([CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE, '}']);
+ }
+
+ private function transformIntoGroupUseBraces(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->equals('{')) {
+ return;
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$tokens[$prevIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ return;
+ }
+
+ $closeIndex = $this->naivelyFindCurlyBlockEnd($tokens, $index);
+
+ $tokens[$index] = new Token([CT::T_GROUP_IMPORT_BRACE_OPEN, '{']);
+ $tokens[$closeIndex] = new Token([CT::T_GROUP_IMPORT_BRACE_CLOSE, '}']);
+ }
+
+ /**
+ * We do not want to rely on `$tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index)` here,
+ * as it relies on block types that are assuming that `}` tokens are already transformed to Custom Tokens that are allowing to distinguish different block types.
+ * As we are just about to transform `{` and `}` into Custom Tokens by this transformer, thus we need to compare those tokens manually by content without using `Tokens::findBlockEnd`.
+ */
+ private function naivelyFindCurlyBlockEnd(Tokens $tokens, int $startIndex): int
+ {
+ if (!$tokens->offsetExists($startIndex)) {
+ throw new \OutOfBoundsException(sprintf('Unavailable index: "%s".', $startIndex));
+ }
+
+ if ('{' !== $tokens[$startIndex]->getContent()) {
+ throw new \InvalidArgumentException(sprintf('Wrong start index: "%s".', $startIndex));
+ }
+
+ $blockLevel = 1;
+ $endIndex = $tokens->count() - 1;
+ for ($index = $startIndex + 1; $index !== $endIndex; ++$index) {
+ $token = $tokens[$index];
+
+ if ('{' === $token->getContent()) {
+ ++$blockLevel;
+
+ continue;
+ }
+
+ if ('}' === $token->getContent()) {
+ --$blockLevel;
+
+ if (0 === $blockLevel) {
+ if (!$token->equals('}')) {
+ throw new \UnexpectedValueException(sprintf('Detected block end for index: "%s" was already transformed into other token type: "%s".', $startIndex, $token->getName()));
+ }
+
+ return $index;
+ }
+ }
+ }
+
+ throw new \UnexpectedValueException(sprintf('Missing block end for index: "%s".', $startIndex));
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php
new file mode 100644
index 0000000..f96a3e6
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/FirstClassCallableTransformer.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * @internal
+ */
+final class FirstClassCallableTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 80100;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (
+ $token->isGivenKind(T_ELLIPSIS)
+ && $tokens[$tokens->getPrevMeaningfulToken($index)]->equals('(')
+ && $tokens[$tokens->getNextMeaningfulToken($index)]->equals(')')
+ ) {
+ $tokens[$index] = new Token([CT::T_FIRST_CLASS_CALLABLE, '...']);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [
+ CT::T_FIRST_CLASS_CALLABLE,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php
new file mode 100644
index 0000000..fc64f6f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform const/function import tokens.
+ *
+ * Performed transformations:
+ * - T_CONST into CT::T_CONST_IMPORT
+ * - T_FUNCTION into CT::T_FUNCTION_IMPORT
+ *
+ * @author Gregor Harlan <gharlan@web.de>
+ *
+ * @internal
+ */
+final class ImportTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50600;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->isGivenKind([T_CONST, T_FUNCTION])) {
+ return;
+ }
+
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+
+ if ($prevToken->isGivenKind(T_USE)) {
+ $tokens[$index] = new Token([
+ $token->isGivenKind(T_FUNCTION) ? CT::T_FUNCTION_IMPORT : CT::T_CONST_IMPORT,
+ $token->getContent(),
+ ]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_CONST_IMPORT, CT::T_FUNCTION_IMPORT];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php
new file mode 100644
index 0000000..d840377
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NameQualifiedTransformer.php
@@ -0,0 +1,101 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED and T_NAME_RELATIVE into T_NAMESPACE T_NS_SEPARATOR T_STRING.
+ *
+ * @internal
+ */
+final class NameQualifiedTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ return 1; // must run before NamespaceOperatorTransformer
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 80000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if ($token->isGivenKind([T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED])) {
+ $this->transformQualified($tokens, $token, $index);
+ } elseif ($token->isGivenKind(T_NAME_RELATIVE)) {
+ $this->transformRelative($tokens, $token, $index);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [];
+ }
+
+ private function transformQualified(Tokens $tokens, Token $token, int $index): void
+ {
+ $parts = explode('\\', $token->getContent());
+ $newTokens = [];
+
+ if ('' === $parts[0]) {
+ $newTokens[] = new Token([T_NS_SEPARATOR, '\\']);
+ array_shift($parts);
+ }
+
+ foreach ($parts as $part) {
+ $newTokens[] = new Token([T_STRING, $part]);
+ $newTokens[] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+
+ array_pop($newTokens);
+
+ $tokens->overrideRange($index, $index, $newTokens);
+ }
+
+ private function transformRelative(Tokens $tokens, Token $token, int $index): void
+ {
+ $parts = explode('\\', $token->getContent());
+ $newTokens = [
+ new Token([T_NAMESPACE, array_shift($parts)]),
+ new Token([T_NS_SEPARATOR, '\\']),
+ ];
+
+ foreach ($parts as $part) {
+ $newTokens[] = new Token([T_STRING, $part]);
+ $newTokens[] = new Token([T_NS_SEPARATOR, '\\']);
+ }
+
+ array_pop($newTokens);
+
+ $tokens->overrideRange($index, $index, $newTokens);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamedArgumentTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamedArgumentTransformer.php
new file mode 100644
index 0000000..e72993f
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamedArgumentTransformer.php
@@ -0,0 +1,85 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform named argument tokens.
+ *
+ * @internal
+ */
+final class NamedArgumentTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // needs to run after TypeColonTransformer
+ return -15;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 80000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$tokens[$index]->equals(':')) {
+ return;
+ }
+
+ $stringIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$tokens[$stringIndex]->isGivenKind(T_STRING)) {
+ return;
+ }
+
+ $preStringIndex = $tokens->getPrevMeaningfulToken($stringIndex);
+
+ // if equals any [';', '{', '}', [T_OPEN_TAG]] than it is a goto label
+ // if equals ')' than likely it is a type colon, but sure not a name argument
+ // if equals '?' than it is part of ternary statement
+
+ if (!$tokens[$preStringIndex]->equalsAny([',', '('])) {
+ return;
+ }
+
+ $tokens[$stringIndex] = new Token([CT::T_NAMED_ARGUMENT_NAME, $tokens[$stringIndex]->getContent()]);
+ $tokens[$index] = new Token([CT::T_NAMED_ARGUMENT_COLON, ':']);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [
+ CT::T_NAMED_ARGUMENT_COLON,
+ CT::T_NAMED_ARGUMENT_NAME,
+ ];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamespaceOperatorTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamespaceOperatorTransformer.php
new file mode 100644
index 0000000..fc740e2
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NamespaceOperatorTransformer.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `namespace` operator from T_NAMESPACE into CT::T_NAMESPACE_OPERATOR.
+ *
+ * @author Gregor Harlan <gharlan@web.de>
+ *
+ * @internal
+ */
+final class NamespaceOperatorTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50300;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->isGivenKind(T_NAMESPACE)) {
+ return;
+ }
+
+ $nextIndex = $tokens->getNextMeaningfulToken($index);
+
+ if ($tokens[$nextIndex]->isGivenKind(T_NS_SEPARATOR)) {
+ $tokens[$index] = new Token([CT::T_NAMESPACE_OPERATOR, $token->getContent()]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_NAMESPACE_OPERATOR];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NullableTypeTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NullableTypeTransformer.php
new file mode 100644
index 0000000..c8f17ec
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/NullableTypeTransformer.php
@@ -0,0 +1,94 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `?` operator into CT::T_NULLABLE_TYPE in `function foo(?Bar $b) {}`.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class NullableTypeTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // needs to run after TypeColonTransformer
+ return -20;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 70100;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->equals('?')) {
+ return;
+ }
+
+ static $types;
+
+ if (null === $types) {
+ $types = [
+ '(',
+ ',',
+ [CT::T_TYPE_COLON],
+ [CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PUBLIC],
+ [CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PROTECTED],
+ [CT::T_CONSTRUCTOR_PROPERTY_PROMOTION_PRIVATE],
+ [CT::T_ATTRIBUTE_CLOSE],
+ [T_PRIVATE],
+ [T_PROTECTED],
+ [T_PUBLIC],
+ [T_VAR],
+ [T_STATIC],
+ ];
+
+ if (\defined('T_READONLY')) { // @TODO: drop condition when PHP 8.1+ is required
+ $types[] = [T_READONLY];
+ }
+ }
+
+ $prevIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if ($tokens[$prevIndex]->equalsAny($types)) {
+ $tokens[$index] = new Token([CT::T_NULLABLE_TYPE, '?']);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_NULLABLE_TYPE];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ReturnRefTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ReturnRefTransformer.php
new file mode 100644
index 0000000..fb6d3bd
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ReturnRefTransformer.php
@@ -0,0 +1,64 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `&` operator into CT::T_RETURN_REF in `function & foo() {}`.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ReturnRefTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ $prevKinds = [T_FUNCTION];
+ if (\PHP_VERSION_ID >= 70400) {
+ $prevKinds[] = T_FN;
+ }
+
+ if (
+ ($token->equals('&') || (\defined('T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG') && $token->isGivenKind(T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG)))
+ && $tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind($prevKinds)
+ ) {
+ $tokens[$index] = new Token([CT::T_RETURN_REF, '&']);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_RETURN_REF];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/SquareBraceTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/SquareBraceTransformer.php
new file mode 100644
index 0000000..dfce931
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/SquareBraceTransformer.php
@@ -0,0 +1,182 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform discriminate overloaded square braces tokens.
+ *
+ * Performed transformations:
+ * - in `[1, 2, 3]` into CT::T_ARRAY_SQUARE_BRACE_OPEN and CT::T_ARRAY_SQUARE_BRACE_CLOSE,
+ * - in `[$a, &$b, [$c]] = array(1, 2, array(3))` into CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN and CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class SquareBraceTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // must run after CurlyBraceTransformer and AttributeTransformer
+ return -1;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ // Short array syntax was introduced in PHP 5.4, but the fixer is smart
+ // enough to handle it even before 5.4.
+ // Same for array destructing syntax sugar `[` introduced in PHP 7.1.
+ return 50000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if ($this->isArrayDestructing($tokens, $index)) {
+ $this->transformIntoDestructuringSquareBrace($tokens, $index);
+
+ return;
+ }
+
+ if ($this->isShortArray($tokens, $index)) {
+ $this->transformIntoArraySquareBrace($tokens, $index);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [
+ CT::T_ARRAY_SQUARE_BRACE_OPEN,
+ CT::T_ARRAY_SQUARE_BRACE_CLOSE,
+ CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN,
+ CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE,
+ ];
+ }
+
+ private function transformIntoArraySquareBrace(Tokens $tokens, int $index): void
+ {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE, $index);
+
+ $tokens[$index] = new Token([CT::T_ARRAY_SQUARE_BRACE_OPEN, '[']);
+ $tokens[$endIndex] = new Token([CT::T_ARRAY_SQUARE_BRACE_CLOSE, ']']);
+ }
+
+ private function transformIntoDestructuringSquareBrace(Tokens $tokens, int $index): void
+ {
+ $endIndex = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE, $index);
+
+ $tokens[$index] = new Token([CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN, '[']);
+ $tokens[$endIndex] = new Token([CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE, ']']);
+
+ $previousMeaningfulIndex = $index;
+ $index = $tokens->getNextMeaningfulToken($index);
+
+ while ($index < $endIndex) {
+ if ($tokens[$index]->equals('[') && $tokens[$previousMeaningfulIndex]->equalsAny([[CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN], ','])) {
+ $tokens[$tokens->findBlockEnd(Tokens::BLOCK_TYPE_INDEX_SQUARE_BRACE, $index)] = new Token([CT::T_DESTRUCTURING_SQUARE_BRACE_CLOSE, ']']);
+ $tokens[$index] = new Token([CT::T_DESTRUCTURING_SQUARE_BRACE_OPEN, '[']);
+ }
+
+ $previousMeaningfulIndex = $index;
+ $index = $tokens->getNextMeaningfulToken($index);
+ }
+ }
+
+ /**
+ * Check if token under given index is short array opening.
+ */
+ private function isShortArray(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->equals('[')) {
+ return false;
+ }
+
+ static $disallowedPrevTokens = [
+ ')',
+ ']',
+ '}',
+ '"',
+ [T_CONSTANT_ENCAPSED_STRING],
+ [T_STRING],
+ [T_STRING_VARNAME],
+ [T_VARIABLE],
+ [CT::T_ARRAY_SQUARE_BRACE_CLOSE],
+ [CT::T_DYNAMIC_PROP_BRACE_CLOSE],
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ ];
+
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+ if ($prevToken->equalsAny($disallowedPrevTokens)) {
+ return false;
+ }
+
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];
+ if ($nextToken->equals(']')) {
+ return true;
+ }
+
+ return !$this->isArrayDestructing($tokens, $index);
+ }
+
+ private function isArrayDestructing(Tokens $tokens, int $index): bool
+ {
+ if (!$tokens[$index]->equals('[')) {
+ return false;
+ }
+
+ static $disallowedPrevTokens = [
+ ')',
+ ']',
+ '"',
+ [T_CONSTANT_ENCAPSED_STRING],
+ [T_STRING],
+ [T_STRING_VARNAME],
+ [T_VARIABLE],
+ [CT::T_ARRAY_SQUARE_BRACE_CLOSE],
+ [CT::T_DYNAMIC_PROP_BRACE_CLOSE],
+ [CT::T_DYNAMIC_VAR_BRACE_CLOSE],
+ [CT::T_ARRAY_INDEX_CURLY_BRACE_CLOSE],
+ ];
+
+ $prevToken = $tokens[$tokens->getPrevMeaningfulToken($index)];
+ if ($prevToken->equalsAny($disallowedPrevTokens)) {
+ return false;
+ }
+
+ $type = Tokens::detectBlockType($tokens[$index]);
+ $end = $tokens->findBlockEnd($type['type'], $index);
+
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($end)];
+
+ return $nextToken->equals('=');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeAlternationTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeAlternationTransformer.php
new file mode 100644
index 0000000..380ceb4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeAlternationTransformer.php
@@ -0,0 +1,69 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTypeTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `|` operator into CT::T_TYPE_ALTERNATION in `function foo(Type1 | Type2 $x) {`
+ * or `} catch (ExceptionType1 | ExceptionType2 $e) {`.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class TypeAlternationTransformer extends AbstractTypeTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // needs to run after ArrayTypehintTransformer and TypeColonTransformer
+ return -15;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 70100;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ $this->doProcess($tokens, $index, '|');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_TYPE_ALTERNATION];
+ }
+
+ protected function replaceToken(Tokens $tokens, int $index): void
+ {
+ $tokens[$index] = new Token([CT::T_TYPE_ALTERNATION, '|']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeColonTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeColonTransformer.php
new file mode 100644
index 0000000..229384d
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeColonTransformer.php
@@ -0,0 +1,92 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `:` operator into CT::T_TYPE_COLON in `function foo() : int {}`.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class TypeColonTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // needs to run after ReturnRefTransformer and UseTransformer
+ // and before TypeAlternationTransformer
+ return -10;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 70000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->equals(':')) {
+ return;
+ }
+
+ $endIndex = $tokens->getPrevMeaningfulToken($index);
+
+ if (!$tokens[$endIndex]->equals(')')) {
+ return;
+ }
+
+ $startIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $endIndex);
+ $prevIndex = $tokens->getPrevMeaningfulToken($startIndex);
+ $prevToken = $tokens[$prevIndex];
+
+ // if this could be a function name we need to take one more step
+ if ($prevToken->isGivenKind(T_STRING)) {
+ $prevIndex = $tokens->getPrevMeaningfulToken($prevIndex);
+ $prevToken = $tokens[$prevIndex];
+ }
+
+ $prevKinds = [T_FUNCTION, CT::T_RETURN_REF, CT::T_USE_LAMBDA];
+
+ if (\PHP_VERSION_ID >= 70400) {
+ $prevKinds[] = T_FN;
+ }
+
+ if ($prevToken->isGivenKind($prevKinds)) {
+ $tokens[$index] = new Token([CT::T_TYPE_COLON, ':']);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_TYPE_COLON];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeIntersectionTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeIntersectionTransformer.php
new file mode 100644
index 0000000..ea967f9
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/TypeIntersectionTransformer.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTypeTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform `&` operator into CT::T_TYPE_INTERSECTION in `function foo(Type1 & Type2 $x) {`
+ * or `} catch (ExceptionType1 & ExceptionType2 $e) {`.
+ *
+ * @internal
+ */
+final class TypeIntersectionTransformer extends AbstractTypeTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // needs to run after ArrayTypehintTransformer and TypeColonTransformer
+ return -15;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 80100;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ $this->doProcess($tokens, $index, [T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, '&']);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_TYPE_INTERSECTION];
+ }
+
+ protected function replaceToken(Tokens $tokens, int $index): void
+ {
+ $tokens[$index] = new Token([CT::T_TYPE_INTERSECTION, '&']);
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/UseTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/UseTransformer.php
new file mode 100644
index 0000000..b5d69c7
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/UseTransformer.php
@@ -0,0 +1,108 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\CT;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Transform T_USE into:
+ * - CT::T_USE_TRAIT for imports,
+ * - CT::T_USE_LAMBDA for lambda variable uses.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class UseTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getPriority(): int
+ {
+ // Should run after CurlyBraceTransformer and before TypeColonTransformer
+ return -5;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50300;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if ($token->isGivenKind(T_USE) && $this->isUseForLambda($tokens, $index)) {
+ $tokens[$index] = new Token([CT::T_USE_LAMBDA, $token->getContent()]);
+
+ return;
+ }
+
+ // Only search inside class/trait body for `T_USE` for traits.
+ // Cannot import traits inside interfaces or anywhere else
+
+ if (!$token->isGivenKind([T_CLASS, T_TRAIT])) {
+ return;
+ }
+
+ if ($tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_DOUBLE_COLON)) {
+ return;
+ }
+
+ $index = $tokens->getNextTokenOfKind($index, ['{']);
+ $innerLimit = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
+
+ while ($index < $innerLimit) {
+ $token = $tokens[++$index];
+
+ if (!$token->isGivenKind(T_USE)) {
+ continue;
+ }
+
+ if ($this->isUseForLambda($tokens, $index)) {
+ $tokens[$index] = new Token([CT::T_USE_LAMBDA, $token->getContent()]);
+ } else {
+ $tokens[$index] = new Token([CT::T_USE_TRAIT, $token->getContent()]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [CT::T_USE_TRAIT, CT::T_USE_LAMBDA];
+ }
+
+ /**
+ * Check if token under given index is `use` statement for lambda function.
+ */
+ private function isUseForLambda(Tokens $tokens, int $index): bool
+ {
+ $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];
+
+ // test `function () use ($foo) {}` case
+ return $nextToken->equals('(');
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/WhitespacyCommentTransformer.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/WhitespacyCommentTransformer.php
new file mode 100644
index 0000000..bf81faa
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/WhitespacyCommentTransformer.php
@@ -0,0 +1,73 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer\Transformer;
+
+use PhpCsFixer\Tokenizer\AbstractTransformer;
+use PhpCsFixer\Tokenizer\Token;
+use PhpCsFixer\Tokenizer\Tokens;
+
+/**
+ * Move trailing whitespaces from comments and docs into following T_WHITESPACE token.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class WhitespacyCommentTransformer extends AbstractTransformer
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function getRequiredPhpVersionId(): int
+ {
+ return 50000;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void
+ {
+ if (!$token->isComment()) {
+ return;
+ }
+
+ $content = $token->getContent();
+ $trimmedContent = rtrim($content);
+
+ // nothing trimmed, nothing to do
+ if ($content === $trimmedContent) {
+ return;
+ }
+
+ $whitespaces = substr($content, \strlen($trimmedContent));
+
+ $tokens[$index] = new Token([$token->getId(), $trimmedContent]);
+
+ if (isset($tokens[$index + 1]) && $tokens[$index + 1]->isWhitespace()) {
+ $tokens[$index + 1] = new Token([T_WHITESPACE, $whitespaces.$tokens[$index + 1]->getContent()]);
+ } else {
+ $tokens->insertAt($index + 1, new Token([T_WHITESPACE, $whitespaces]));
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCustomTokens(): array
+ {
+ return [];
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TransformerInterface.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TransformerInterface.php
new file mode 100644
index 0000000..d8fb5fe
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/TransformerInterface.php
@@ -0,0 +1,68 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+/**
+ * Interface for Transformer class.
+ *
+ * Transformer role is to register custom tokens and transform Tokens collection to use them.
+ *
+ * Custom token is a user defined token type and is used to separate different meaning of original token type.
+ * For example T_ARRAY is a token for both creating new array and typehinting a parameter. This two meaning should have two token types.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+interface TransformerInterface
+{
+ /**
+ * Get tokens created by Transformer.
+ *
+ * @return int[]
+ */
+ public function getCustomTokens(): array;
+
+ /**
+ * Return the name of the transformer.
+ *
+ * The name must be all lowercase and without any spaces.
+ *
+ * @return string The name of the fixer
+ */
+ public function getName(): string;
+
+ /**
+ * Returns the priority of the transformer.
+ *
+ * The default priority is 0 and higher priorities are executed first.
+ */
+ public function getPriority(): int;
+
+ /**
+ * Return minimal required PHP version id to transform the code.
+ *
+ * Custom Token kinds from Transformers are always registered, but sometimes
+ * there is no need to analyse the Tokens if for sure we cannot find examined
+ * token kind, eg transforming `T_FUNCTION` in `<?php use function Foo\\bar;`
+ * code.
+ */
+ public function getRequiredPhpVersionId(): int;
+
+ /**
+ * Process Token to transform it into custom token when needed.
+ */
+ public function process(Tokens $tokens, Token $token, int $index): void;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformers.php b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformers.php
new file mode 100644
index 0000000..ac63347
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformers.php
@@ -0,0 +1,111 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer\Tokenizer;
+
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Finder\SplFileInfo;
+
+/**
+ * Collection of Transformer classes.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class Transformers
+{
+ /**
+ * The registered transformers.
+ *
+ * @var TransformerInterface[]
+ */
+ private $items = [];
+
+ /**
+ * Register built in Transformers.
+ */
+ private function __construct()
+ {
+ $this->registerBuiltInTransformers();
+
+ usort($this->items, static function (TransformerInterface $a, TransformerInterface $b): int {
+ return $b->getPriority() <=> $a->getPriority();
+ });
+ }
+
+ public static function createSingleton(): self
+ {
+ static $instance = null;
+
+ if (!$instance) {
+ $instance = new self();
+ }
+
+ return $instance;
+ }
+
+ /**
+ * Transform given Tokens collection through all Transformer classes.
+ *
+ * @param Tokens $tokens Tokens collection
+ */
+ public function transform(Tokens $tokens): void
+ {
+ foreach ($this->items as $transformer) {
+ foreach ($tokens as $index => $token) {
+ $transformer->process($tokens, $token, $index);
+ }
+ }
+ }
+
+ /**
+ * @param TransformerInterface $transformer Transformer
+ */
+ private function registerTransformer(TransformerInterface $transformer): void
+ {
+ if (\PHP_VERSION_ID >= $transformer->getRequiredPhpVersionId()) {
+ $this->items[] = $transformer;
+ }
+ }
+
+ private function registerBuiltInTransformers(): void
+ {
+ static $registered = false;
+
+ if ($registered) {
+ return;
+ }
+
+ $registered = true;
+
+ foreach ($this->findBuiltInTransformers() as $transformer) {
+ $this->registerTransformer($transformer);
+ }
+ }
+
+ /**
+ * @return \Generator|TransformerInterface[]
+ */
+ private function findBuiltInTransformers(): iterable
+ {
+ /** @var SplFileInfo $file */
+ foreach (Finder::create()->files()->in(__DIR__.'/Transformer') as $file) {
+ $relativeNamespace = $file->getRelativePath();
+ $class = __NAMESPACE__.'\\Transformer\\'.($relativeNamespace ? $relativeNamespace.'\\' : '').$file->getBasename('.php');
+
+ yield new $class();
+ }
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php b/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php
new file mode 100644
index 0000000..f8e2aba
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ToolInfo.php
@@ -0,0 +1,113 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Console\Application;
+
+/**
+ * Obtain information about using version of tool.
+ *
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class ToolInfo implements ToolInfoInterface
+{
+ public const COMPOSER_PACKAGE_NAME = 'friendsofphp/php-cs-fixer';
+
+ public const COMPOSER_LEGACY_PACKAGE_NAME = 'fabpot/php-cs-fixer';
+
+ /**
+ * @var null|array
+ */
+ private $composerInstallationDetails;
+
+ /**
+ * @var null|bool
+ */
+ private $isInstalledByComposer;
+
+ public function getComposerInstallationDetails(): array
+ {
+ if (!$this->isInstalledByComposer()) {
+ throw new \LogicException('Cannot get composer version for tool not installed by composer.');
+ }
+
+ if (null === $this->composerInstallationDetails) {
+ $composerInstalled = json_decode(file_get_contents($this->getComposerInstalledFile()), true);
+
+ $packages = $composerInstalled['packages'] ?? $composerInstalled;
+
+ foreach ($packages as $package) {
+ if (\in_array($package['name'], [self::COMPOSER_PACKAGE_NAME, self::COMPOSER_LEGACY_PACKAGE_NAME], true)) {
+ $this->composerInstallationDetails = $package;
+
+ break;
+ }
+ }
+ }
+
+ return $this->composerInstallationDetails;
+ }
+
+ public function getComposerVersion(): string
+ {
+ $package = $this->getComposerInstallationDetails();
+
+ $versionSuffix = '';
+
+ if (isset($package['dist']['reference'])) {
+ $versionSuffix = '#'.$package['dist']['reference'];
+ }
+
+ return $package['version'].$versionSuffix;
+ }
+
+ public function getVersion(): string
+ {
+ if ($this->isInstalledByComposer()) {
+ return Application::VERSION.':'.$this->getComposerVersion();
+ }
+
+ return Application::VERSION;
+ }
+
+ public function isInstalledAsPhar(): bool
+ {
+ return str_starts_with(__DIR__, 'phar://');
+ }
+
+ public function isInstalledByComposer(): bool
+ {
+ if (null === $this->isInstalledByComposer) {
+ $this->isInstalledByComposer = !$this->isInstalledAsPhar() && file_exists($this->getComposerInstalledFile());
+ }
+
+ return $this->isInstalledByComposer;
+ }
+
+ public function getPharDownloadUri(string $version): string
+ {
+ return sprintf(
+ 'https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/%s/php-cs-fixer.phar',
+ $version
+ );
+ }
+
+ private function getComposerInstalledFile(): string
+ {
+ return __DIR__.'/../../../composer/installed.json';
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/ToolInfoInterface.php b/vendor/friendsofphp/php-cs-fixer/src/ToolInfoInterface.php
new file mode 100644
index 0000000..4e65411
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/ToolInfoInterface.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @internal
+ */
+interface ToolInfoInterface
+{
+ public function getComposerInstallationDetails(): array;
+
+ public function getComposerVersion(): string;
+
+ public function getVersion(): string;
+
+ public function isInstalledAsPhar(): bool;
+
+ public function isInstalledByComposer(): bool;
+
+ public function getPharDownloadUri(string $version): string;
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/Utils.php b/vendor/friendsofphp/php-cs-fixer/src/Utils.php
new file mode 100644
index 0000000..ae95ae4
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/Utils.php
@@ -0,0 +1,173 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+use PhpCsFixer\Fixer\FixerInterface;
+use PhpCsFixer\Tokenizer\Token;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ * @author Graham Campbell <hello@gjcampbell.co.uk>
+ * @author Odín del Río <odin.drp@gmail.com>
+ *
+ * @internal
+ */
+final class Utils
+{
+ /**
+ * @var array<string,true>
+ */
+ private static $deprecations = [];
+
+ private function __construct()
+ {
+ // cannot create instance of util. class
+ }
+
+ /**
+ * Converts a camel cased string to a snake cased string.
+ */
+ public static function camelCaseToUnderscore(string $string): string
+ {
+ return strtolower(Preg::replace('/(?<!^)((?=[A-Z][^A-Z])|(?<![A-Z])(?=[A-Z]))/', '_', $string));
+ }
+
+ /**
+ * Calculate the trailing whitespace.
+ *
+ * What we're doing here is grabbing everything after the final newline.
+ */
+ public static function calculateTrailingWhitespaceIndent(Token $token): string
+ {
+ if (!$token->isWhitespace()) {
+ throw new \InvalidArgumentException(sprintf('The given token must be whitespace, got "%s".', $token->getName()));
+ }
+
+ $str = strrchr(
+ str_replace(["\r\n", "\r"], "\n", $token->getContent()),
+ "\n"
+ );
+
+ if (false === $str) {
+ return '';
+ }
+
+ return ltrim($str, "\n");
+ }
+
+ /**
+ * Perform stable sorting using provided comparison function.
+ *
+ * Stability is ensured by using Schwartzian transform.
+ *
+ * @param mixed[] $elements
+ * @param callable $getComparedValue a callable that takes a single element and returns the value to compare
+ * @param callable $compareValues a callable that compares two values
+ *
+ * @return mixed[]
+ */
+ public static function stableSort(array $elements, callable $getComparedValue, callable $compareValues): array
+ {
+ array_walk($elements, static function (&$element, int $index) use ($getComparedValue): void {
+ $element = [$element, $index, $getComparedValue($element)];
+ });
+
+ usort($elements, static function ($a, $b) use ($compareValues): int {
+ $comparison = $compareValues($a[2], $b[2]);
+
+ if (0 !== $comparison) {
+ return $comparison;
+ }
+
+ return $a[1] <=> $b[1];
+ });
+
+ return array_map(static function (array $item) {
+ return $item[0];
+ }, $elements);
+ }
+
+ /**
+ * Sort fixers by their priorities.
+ *
+ * @param FixerInterface[] $fixers
+ *
+ * @return FixerInterface[]
+ */
+ public static function sortFixers(array $fixers): array
+ {
+ // Schwartzian transform is used to improve the efficiency and avoid
+ // `usort(): Array was modified by the user comparison function` warning for mocked objects.
+ return self::stableSort(
+ $fixers,
+ static function (FixerInterface $fixer): int {
+ return $fixer->getPriority();
+ },
+ static function (int $a, int $b): int {
+ return $b <=> $a;
+ }
+ );
+ }
+
+ /**
+ * Join names in natural language wrapped in backticks, e.g. `a`, `b` and `c`.
+ *
+ * @param string[] $names
+ *
+ * @throws \InvalidArgumentException
+ */
+ public static function naturalLanguageJoinWithBackticks(array $names): string
+ {
+ if (empty($names)) {
+ throw new \InvalidArgumentException('Array of names cannot be empty.');
+ }
+
+ $names = array_map(static function (string $name): string {
+ return sprintf('`%s`', $name);
+ }, $names);
+
+ $last = array_pop($names);
+
+ if (\count($names) > 0) {
+ return implode(', ', $names).' and '.$last;
+ }
+
+ return $last;
+ }
+
+ public static function triggerDeprecation(\Exception $futureException): void
+ {
+ if (getenv('PHP_CS_FIXER_FUTURE_MODE')) {
+ throw new \RuntimeException(
+ 'Your are using something deprecated, see previous exception. Aborting execution because `PHP_CS_FIXER_FUTURE_MODE` environment variable is set.',
+ 0,
+ $futureException
+ );
+ }
+
+ $message = $futureException->getMessage();
+
+ self::$deprecations[$message] = true;
+ @trigger_error($message, E_USER_DEPRECATED);
+ }
+
+ public static function getTriggeredDeprecations(): array
+ {
+ $triggeredDeprecations = array_keys(self::$deprecations);
+ sort($triggeredDeprecations);
+
+ return $triggeredDeprecations;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/WhitespacesFixerConfig.php b/vendor/friendsofphp/php-cs-fixer/src/WhitespacesFixerConfig.php
new file mode 100644
index 0000000..0640a05
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/WhitespacesFixerConfig.php
@@ -0,0 +1,55 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ */
+final class WhitespacesFixerConfig
+{
+ /**
+ * @var string
+ */
+ private $indent;
+
+ /**
+ * @var string
+ */
+ private $lineEnding;
+
+ public function __construct(string $indent = ' ', string $lineEnding = "\n")
+ {
+ if (!\in_array($indent, [' ', ' ', "\t"], true)) {
+ throw new \InvalidArgumentException('Invalid "indent" param, expected tab or two or four spaces.');
+ }
+
+ if (!\in_array($lineEnding, ["\n", "\r\n"], true)) {
+ throw new \InvalidArgumentException('Invalid "lineEnding" param, expected "\n" or "\r\n".');
+ }
+
+ $this->indent = $indent;
+ $this->lineEnding = $lineEnding;
+ }
+
+ public function getIndent(): string
+ {
+ return $this->indent;
+ }
+
+ public function getLineEnding(): string
+ {
+ return $this->lineEnding;
+ }
+}
diff --git a/vendor/friendsofphp/php-cs-fixer/src/WordMatcher.php b/vendor/friendsofphp/php-cs-fixer/src/WordMatcher.php
new file mode 100644
index 0000000..5314b1e
--- /dev/null
+++ b/vendor/friendsofphp/php-cs-fixer/src/WordMatcher.php
@@ -0,0 +1,53 @@
+<?php
+
+declare(strict_types=1);
+
+/*
+ * This file is part of PHP CS Fixer.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ * Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace PhpCsFixer;
+
+/**
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class WordMatcher
+{
+ /**
+ * @var string[]
+ */
+ private $candidates;
+
+ /**
+ * @param string[] $candidates
+ */
+ public function __construct(array $candidates)
+ {
+ $this->candidates = $candidates;
+ }
+
+ public function match(string $needle): ?string
+ {
+ $word = null;
+ $distance = ceil(\strlen($needle) * 0.35);
+
+ foreach ($this->candidates as $candidate) {
+ $candidateDistance = levenshtein($needle, $candidate);
+
+ if ($candidateDistance < $distance) {
+ $word = $candidate;
+ $distance = $candidateDistance;
+ }
+ }
+
+ return $word;
+ }
+}
diff --git a/vendor/nextcloud/coding-standard/.github/workflows/lint.yml b/vendor/nextcloud/coding-standard/.github/workflows/lint.yml
new file mode 100644
index 0000000..41f5afb
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/.github/workflows/lint.yml
@@ -0,0 +1,22 @@
+name: Lint
+on:
+ push:
+ branches:
+ - master
+ - stable*
+ pull_request:
+
+jobs:
+ lint-php:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Install Dependencies
+ run: composer install --prefer-dist
+ - name: Load problem matcher for php -l
+ uses: korelstar/phplint-problem-matcher@v1
+ - name: PHP syntax check
+ run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"
+ - name: PHP Coding Standards Fixer
+ run: vendor/bin/php-cs-fixer fix --dry-run --diff
diff --git a/vendor/nextcloud/coding-standard/.gitignore b/vendor/nextcloud/coding-standard/.gitignore
new file mode 100644
index 0000000..5d11b93
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/.gitignore
@@ -0,0 +1,8 @@
+composer.phar
+/composer.lock
+/vendor/
+
+/.idea
+
+.php_cs.cache
+.php-cs-fixer.cache
diff --git a/vendor/nextcloud/coding-standard/.php-cs-fixer.dist.php b/vendor/nextcloud/coding-standard/.php-cs-fixer.dist.php
new file mode 100644
index 0000000..48c0baf
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/.php-cs-fixer.dist.php
@@ -0,0 +1,15 @@
+<?php
+
+declare(strict_types=1);
+
+require_once './vendor/autoload.php';
+
+use Nextcloud\CodingStandard\Config;
+
+$config = new Config();
+$config
+ ->getFinder()
+ ->ignoreVCSIgnored(true)
+ ->notPath('vendor')
+ ->in(__DIR__);
+return $config;
diff --git a/vendor/nextcloud/coding-standard/CHANGELOG.md b/vendor/nextcloud/coding-standard/CHANGELOG.md
new file mode 100644
index 0000000..88758a3
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/CHANGELOG.md
@@ -0,0 +1,14 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+## 0.5.0 – 2021-01-11
+### Added
+- New rule: short list syntax
+- php7.2 support (back, for apps that support Nextclod 20 - 21)
+
+## 0.4.0 – 2020-12-14
+### Added
+- php8 support
+- New rule: binary operators should be surrounded by a single space
+### Changed
+- php-cs-fixer updated to the latest version
diff --git a/vendor/nextcloud/coding-standard/LICENSE b/vendor/nextcloud/coding-standard/LICENSE
new file mode 100644
index 0000000..887be18
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Christoph Wurst
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/nextcloud/coding-standard/README.md b/vendor/nextcloud/coding-standard/README.md
new file mode 100644
index 0000000..62729e3
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/README.md
@@ -0,0 +1,56 @@
+# Nextcloud Coding Standard
+
+Nextcloud coding standards for the [php cs fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).
+
+## Installation
+
+Add the package to your dev dependencies
+
+```bash
+composer require --dev nextcloud/coding-standard
+```
+
+and create a `.php-cs-fixer.dist.php` like
+
+```php
+<?php
+
+declare(strict_types=1);
+
+require_once './vendor/autoload.php';
+
+use Nextcloud\CodingStandard\Config;
+
+$config = new Config();
+$config
+ ->getFinder()
+ ->ignoreVCSIgnored(true)
+ ->notPath('build')
+ ->notPath('l10n')
+ ->notPath('src')
+ ->notPath('vendor')
+ ->in(__DIR__);
+return $config;
+```
+
+To run the fixer you first have to [install it](https://github.com/FriendsOfPhp/PHP-CS-Fixer#installation). Then you can run `php-cs-fixer fix` to apply all automated fixes.
+
+For convenience you may add it to the `scripts` section of your `composer.json`:
+
+```json
+{
+ "scripts": {
+ "cs:check": "php-cs-fixer fix --dry-run --diff",
+ "cs:fix": "php-cs-fixer fix"
+ }
+}
+```
+
+*Note: Don't forget to exclude .php_cs.dist in your build scripts.*
+
+## Upgrade from v0.x to v1.0
+
+With v1.0 php-cs-fixer was updated from v2 to v3. You'll have to adjust your app slightly:
+
+* Rename `.php_cs.dist` to `.php-cs-fixer.dist.php`
+* Add `.php-cs-fixer.cache` to your ignore files
diff --git a/vendor/nextcloud/coding-standard/composer.json b/vendor/nextcloud/coding-standard/composer.json
new file mode 100644
index 0000000..ebfef6e
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "nextcloud/coding-standard",
+ "description": "Nextcloud coding standards for the php cs fixer",
+ "type": "library",
+ "require": {
+ "php": "^7.3|^8.0",
+ "friendsofphp/php-cs-fixer": "^3.2"
+ },
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Christoph Wurst",
+ "email": "christoph@winzerhof-wurst.at"
+ }
+ ],
+ "autoload": {
+ "psr-4": {
+ "Nextcloud\\CodingStandard\\": "src"
+ }
+ }
+}
diff --git a/vendor/nextcloud/coding-standard/src/Config.php b/vendor/nextcloud/coding-standard/src/Config.php
new file mode 100644
index 0000000..ed9d0ef
--- /dev/null
+++ b/vendor/nextcloud/coding-standard/src/Config.php
@@ -0,0 +1,59 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Nextcloud\CodingStandard;
+
+use PhpCsFixer\Config as Base;
+
+class Config extends Base {
+ public function __construct($name = 'default') {
+ parent::__construct($name);
+ $this->setIndent("\t");
+ }
+
+ public function getRules() : array {
+ return [
+ '@PSR1' => true,
+ '@PSR2' => true,
+ 'align_multiline_comment' => true,
+ 'array_indentation' => true,
+ 'binary_operator_spaces' => [
+ 'default' => 'single_space',
+ ],
+ 'blank_line_after_namespace' => true,
+ 'blank_line_after_opening_tag' => true,
+ 'braces' => [
+ 'position_after_anonymous_constructs' => 'same',
+ 'position_after_control_structures' => 'same',
+ 'position_after_functions_and_oop_constructs' => 'same',
+ ],
+ 'elseif' => true,
+ 'encoding' => true,
+ 'full_opening_tag' => true,
+ 'function_declaration' => [
+ 'closure_function_spacing' => 'one',
+ ],
+ 'indentation_type' => true,
+ 'line_ending' => true,
+ 'lowercase_keywords' => true,
+ 'method_argument_space' => [
+ 'on_multiline' => 'ignore',
+ ],
+ 'no_closing_tag' => true,
+ 'no_spaces_after_function_name' => true,
+ 'no_spaces_inside_parenthesis' => true,
+ 'no_trailing_whitespace' => true,
+ 'no_trailing_whitespace_in_comment' => true,
+ 'no_unused_imports' => true,
+ 'single_blank_line_at_eof' => true,
+ 'single_class_element_per_statement' => true,
+ 'single_import_per_statement' => true,
+ 'single_line_after_imports' => true,
+ 'switch_case_space' => true,
+ 'visibility_required' => [
+ 'elements' => ['property', 'method', 'const']
+ ],
+ ];
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/LICENSE b/vendor/php-cs-fixer/diff/LICENSE
new file mode 100644
index 0000000..93cf008
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/LICENSE
@@ -0,0 +1,31 @@
+Copyright (c) 2002-2017, Sebastian Bergmann <sebastian@phpunit.de>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name of Sebastian Bergmann nor the names of his
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/php-cs-fixer/diff/README.md b/vendor/php-cs-fixer/diff/README.md
new file mode 100644
index 0000000..19cddca
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/README.md
@@ -0,0 +1,10 @@
+# PHP-CS-Fixer/diff
+
+This version is for PHP CS Fixer only! Do not use it!
+
+Code from `sebastian/diff` has been forked a republished by permission of Sebastian Bergmann.
+Main change is to make the package compatible with older PHP engines.
+Licenced with BSD-3-Clause @ see LICENSE, copyright (c) Sebastian Bergmann <sebastian@phpunit.de>
+https://github.com/sebastianbergmann/diff
+
+For questions visit us @ https://gitter.im/PHP-CS-Fixer/Lobby
diff --git a/vendor/php-cs-fixer/diff/composer.json b/vendor/php-cs-fixer/diff/composer.json
new file mode 100644
index 0000000..910267f
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/composer.json
@@ -0,0 +1,38 @@
+{
+ "name": "php-cs-fixer/diff",
+ "description": "sebastian/diff v3 backport support for PHP 5.6+",
+ "keywords": ["diff"],
+ "homepage": "https://github.com/PHP-CS-Fixer",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ }
+ ],
+ "require": {
+ "php": "^5.6 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
+ "symfony/process": "^3.3"
+ },
+ "config": {
+ "optimize-autoloader": true,
+ "sort-packages": true
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "PhpCsFixer\\Diff\\": "tests"
+ }
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Chunk.php b/vendor/php-cs-fixer/diff/src/Chunk.php
new file mode 100644
index 0000000..49c7757
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Chunk.php
@@ -0,0 +1,90 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+final class Chunk
+{
+ /**
+ * @var int
+ */
+ private $start;
+
+ /**
+ * @var int
+ */
+ private $startRange;
+
+ /**
+ * @var int
+ */
+ private $end;
+
+ /**
+ * @var int
+ */
+ private $endRange;
+
+ /**
+ * @var Line[]
+ */
+ private $lines;
+
+ public function __construct($start = 0, $startRange = 1, $end = 0, $endRange = 1, array $lines = [])
+ {
+ $this->start = $start;
+ $this->startRange = $startRange;
+ $this->end = $end;
+ $this->endRange = $endRange;
+ $this->lines = $lines;
+ }
+
+ public function getStart()
+ {
+ return $this->start;
+ }
+
+ public function getStartRange()
+ {
+ return $this->startRange;
+ }
+
+ public function getEnd()
+ {
+ return $this->end;
+ }
+
+ public function getEndRange()
+ {
+ return $this->endRange;
+ }
+
+ /**
+ * @return Line[]
+ */
+ public function getLines()
+ {
+ return $this->lines;
+ }
+
+ /**
+ * @param Line[] $lines
+ */
+ public function setLines(array $lines)
+ {
+ foreach ($lines as $line) {
+ if (!$line instanceof Line) {
+ throw new InvalidArgumentException;
+ }
+ }
+
+ $this->lines = $lines;
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Diff.php b/vendor/php-cs-fixer/diff/src/Diff.php
new file mode 100644
index 0000000..a458d27
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Diff.php
@@ -0,0 +1,67 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+final class Diff
+{
+ /**
+ * @var string
+ */
+ private $from;
+
+ /**
+ * @var string
+ */
+ private $to;
+
+ /**
+ * @var Chunk[]
+ */
+ private $chunks;
+
+ /**
+ * @param string $from
+ * @param string $to
+ * @param Chunk[] $chunks
+ */
+ public function __construct($from, $to, array $chunks = [])
+ {
+ $this->from = $from;
+ $this->to = $to;
+ $this->chunks = $chunks;
+ }
+
+ public function getFrom()
+ {
+ return $this->from;
+ }
+
+ public function getTo()
+ {
+ return $this->to;
+ }
+
+ /**
+ * @return Chunk[]
+ */
+ public function getChunks()
+ {
+ return $this->chunks;
+ }
+
+ /**
+ * @param Chunk[] $chunks
+ */
+ public function setChunks(array $chunks)
+ {
+ $this->chunks = $chunks;
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Differ.php b/vendor/php-cs-fixer/diff/src/Differ.php
new file mode 100644
index 0000000..d252e39
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Differ.php
@@ -0,0 +1,329 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+use PhpCsFixer\Diff\Output\DiffOutputBuilderInterface;
+use PhpCsFixer\Diff\Output\UnifiedDiffOutputBuilder;
+
+/**
+ * Diff implementation.
+ */
+final class Differ
+{
+ const OLD = 0;
+ const ADDED = 1;
+ const REMOVED = 2;
+ const DIFF_LINE_END_WARNING = 3;
+ const NO_LINE_END_EOF_WARNING = 4;
+
+ /**
+ * @var DiffOutputBuilderInterface
+ */
+ private $outputBuilder;
+
+ /**
+ * @param DiffOutputBuilderInterface $outputBuilder
+ *
+ * @throws InvalidArgumentException
+ */
+ public function __construct($outputBuilder = null)
+ {
+ if ($outputBuilder instanceof DiffOutputBuilderInterface) {
+ $this->outputBuilder = $outputBuilder;
+ } elseif (null === $outputBuilder) {
+ $this->outputBuilder = new UnifiedDiffOutputBuilder;
+ } elseif (\is_string($outputBuilder)) {
+ // PHPUnit 6.1.4, 6.2.0, 6.2.1, 6.2.2, and 6.2.3 support
+ // @see https://github.com/sebastianbergmann/phpunit/issues/2734#issuecomment-314514056
+ // @deprecated
+ $this->outputBuilder = new UnifiedDiffOutputBuilder($outputBuilder);
+ } else {
+ throw new InvalidArgumentException(
+ \sprintf(
+ 'Expected builder to be an instance of DiffOutputBuilderInterface, <null> or a string, got %s.',
+ \is_object($outputBuilder) ? 'instance of "' . \get_class($outputBuilder) . '"' : \gettype($outputBuilder) . ' "' . $outputBuilder . '"'
+ )
+ );
+ }
+ }
+
+ /**
+ * Returns the diff between two arrays or strings as string.
+ *
+ * @param array|string $from
+ * @param array|string $to
+ * @param null|LongestCommonSubsequenceCalculator $lcs
+ *
+ * @return string
+ */
+ public function diff($from, $to, LongestCommonSubsequenceCalculator $lcs = null)
+ {
+ $diff = $this->diffToArray(
+ $this->normalizeDiffInput($from),
+ $this->normalizeDiffInput($to),
+ $lcs
+ );
+
+ return $this->outputBuilder->getDiff($diff);
+ }
+
+ /**
+ * Returns the diff between two arrays or strings as array.
+ *
+ * Each array element contains two elements:
+ * - [0] => mixed $token
+ * - [1] => 2|1|0
+ *
+ * - 2: REMOVED: $token was removed from $from
+ * - 1: ADDED: $token was added to $from
+ * - 0: OLD: $token is not changed in $to
+ *
+ * @param array|string $from
+ * @param array|string $to
+ * @param LongestCommonSubsequenceCalculator $lcs
+ *
+ * @return array
+ */
+ public function diffToArray($from, $to, LongestCommonSubsequenceCalculator $lcs = null)
+ {
+ if (\is_string($from)) {
+ $from = $this->splitStringByLines($from);
+ } elseif (!\is_array($from)) {
+ throw new InvalidArgumentException('"from" must be an array or string.');
+ }
+
+ if (\is_string($to)) {
+ $to = $this->splitStringByLines($to);
+ } elseif (!\is_array($to)) {
+ throw new InvalidArgumentException('"to" must be an array or string.');
+ }
+
+ list($from, $to, $start, $end) = self::getArrayDiffParted($from, $to);
+
+ if ($lcs === null) {
+ $lcs = $this->selectLcsImplementation($from, $to);
+ }
+
+ $common = $lcs->calculate(\array_values($from), \array_values($to));
+ $diff = [];
+
+ foreach ($start as $token) {
+ $diff[] = [$token, self::OLD];
+ }
+
+ \reset($from);
+ \reset($to);
+
+ foreach ($common as $token) {
+ while (($fromToken = \reset($from)) !== $token) {
+ $diff[] = [\array_shift($from), self::REMOVED];
+ }
+
+ while (($toToken = \reset($to)) !== $token) {
+ $diff[] = [\array_shift($to), self::ADDED];
+ }
+
+ $diff[] = [$token, self::OLD];
+
+ \array_shift($from);
+ \array_shift($to);
+ }
+
+ while (($token = \array_shift($from)) !== null) {
+ $diff[] = [$token, self::REMOVED];
+ }
+
+ while (($token = \array_shift($to)) !== null) {
+ $diff[] = [$token, self::ADDED];
+ }
+
+ foreach ($end as $token) {
+ $diff[] = [$token, self::OLD];
+ }
+
+ if ($this->detectUnmatchedLineEndings($diff)) {
+ \array_unshift($diff, ["#Warnings contain different line endings!\n", self::DIFF_LINE_END_WARNING]);
+ }
+
+ return $diff;
+ }
+
+ /**
+ * Casts variable to string if it is not a string or array.
+ *
+ * @param mixed $input
+ *
+ * @return array|string
+ */
+ private function normalizeDiffInput($input)
+ {
+ if (!\is_array($input) && !\is_string($input)) {
+ return (string) $input;
+ }
+
+ return $input;
+ }
+
+ /**
+ * Checks if input is string, if so it will split it line-by-line.
+ *
+ * @param string $input
+ *
+ * @return array
+ */
+ private function splitStringByLines($input)
+ {
+ return \preg_split('/(.*\R)/', $input, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+ }
+
+ /**
+ * @param array $from
+ * @param array $to
+ *
+ * @return LongestCommonSubsequenceCalculator
+ */
+ private function selectLcsImplementation(array $from, array $to)
+ {
+ // We do not want to use the time-efficient implementation if its memory
+ // footprint will probably exceed this value. Note that the footprint
+ // calculation is only an estimation for the matrix and the LCS method
+ // will typically allocate a bit more memory than this.
+ $memoryLimit = 100 * 1024 * 1024;
+
+ if ($this->calculateEstimatedFootprint($from, $to) > $memoryLimit) {
+ return new MemoryEfficientLongestCommonSubsequenceCalculator;
+ }
+
+ return new TimeEfficientLongestCommonSubsequenceCalculator;
+ }
+
+ /**
+ * Calculates the estimated memory footprint for the DP-based method.
+ *
+ * @param array $from
+ * @param array $to
+ *
+ * @return float|int
+ */
+ private function calculateEstimatedFootprint(array $from, array $to)
+ {
+ $itemSize = PHP_INT_SIZE === 4 ? 76 : 144;
+
+ return $itemSize * \min(\count($from), \count($to)) ** 2;
+ }
+
+ /**
+ * Returns true if line ends don't match in a diff.
+ *
+ * @param array $diff
+ *
+ * @return bool
+ */
+ private function detectUnmatchedLineEndings(array $diff)
+ {
+ $newLineBreaks = ['' => true];
+ $oldLineBreaks = ['' => true];
+
+ foreach ($diff as $entry) {
+ if (self::OLD === $entry[1]) {
+ $ln = $this->getLinebreak($entry[0]);
+ $oldLineBreaks[$ln] = true;
+ $newLineBreaks[$ln] = true;
+ } elseif (self::ADDED === $entry[1]) {
+ $newLineBreaks[$this->getLinebreak($entry[0])] = true;
+ } elseif (self::REMOVED === $entry[1]) {
+ $oldLineBreaks[$this->getLinebreak($entry[0])] = true;
+ }
+ }
+
+ // if either input or output is a single line without breaks than no warning should be raised
+ if (['' => true] === $newLineBreaks || ['' => true] === $oldLineBreaks) {
+ return false;
+ }
+
+ // two way compare
+ foreach ($newLineBreaks as $break => $set) {
+ if (!isset($oldLineBreaks[$break])) {
+ return true;
+ }
+ }
+
+ foreach ($oldLineBreaks as $break => $set) {
+ if (!isset($newLineBreaks[$break])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function getLinebreak($line)
+ {
+ if (!\is_string($line)) {
+ return '';
+ }
+
+ $lc = \substr($line, -1);
+ if ("\r" === $lc) {
+ return "\r";
+ }
+
+ if ("\n" !== $lc) {
+ return '';
+ }
+
+ if ("\r\n" === \substr($line, -2)) {
+ return "\r\n";
+ }
+
+ return "\n";
+ }
+
+ private static function getArrayDiffParted(array &$from, array &$to)
+ {
+ $start = [];
+ $end = [];
+
+ \reset($to);
+
+ foreach ($from as $k => $v) {
+ $toK = \key($to);
+
+ if ($toK === $k && $v === $to[$k]) {
+ $start[$k] = $v;
+
+ unset($from[$k], $to[$k]);
+ } else {
+ break;
+ }
+ }
+
+ \end($from);
+ \end($to);
+
+ do {
+ $fromK = \key($from);
+ $toK = \key($to);
+
+ if (null === $fromK || null === $toK || \current($from) !== \current($to)) {
+ break;
+ }
+
+ \prev($from);
+ \prev($to);
+
+ $end = [$fromK => $from[$fromK]] + $end;
+ unset($from[$fromK], $to[$toK]);
+ } while (true);
+
+ return [$from, $to, $start, $end];
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Exception/ConfigurationException.php b/vendor/php-cs-fixer/diff/src/Exception/ConfigurationException.php
new file mode 100644
index 0000000..0cd0f88
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Exception/ConfigurationException.php
@@ -0,0 +1,40 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+final class ConfigurationException extends InvalidArgumentException
+{
+ /**
+ * @param string $option
+ * @param string $expected
+ * @param mixed $value
+ * @param int $code
+ * @param null|\Exception $previous
+ */
+ public function __construct(
+ $option,
+ $expected,
+ $value,
+ $code = 0,
+ \Exception $previous = null
+ ) {
+ parent::__construct(
+ \sprintf(
+ 'Option "%s" must be %s, got "%s".',
+ $option,
+ $expected,
+ \is_object($value) ? \get_class($value) : (null === $value ? '<null>' : \gettype($value) . '#' . $value)
+ ),
+ $code,
+ $previous
+ );
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Exception/Exception.php b/vendor/php-cs-fixer/diff/src/Exception/Exception.php
new file mode 100644
index 0000000..ba4a609
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Exception/Exception.php
@@ -0,0 +1,15 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+interface Exception
+{
+}
diff --git a/vendor/php-cs-fixer/diff/src/Exception/InvalidArgumentException.php b/vendor/php-cs-fixer/diff/src/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..e694666
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Exception/InvalidArgumentException.php
@@ -0,0 +1,15 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+class InvalidArgumentException extends \InvalidArgumentException implements Exception
+{
+}
diff --git a/vendor/php-cs-fixer/diff/src/Line.php b/vendor/php-cs-fixer/diff/src/Line.php
new file mode 100644
index 0000000..df9d956
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Line.php
@@ -0,0 +1,44 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+final class Line
+{
+ const ADDED = 1;
+ const REMOVED = 2;
+ const UNCHANGED = 3;
+
+ /**
+ * @var int
+ */
+ private $type;
+
+ /**
+ * @var string
+ */
+ private $content;
+
+ public function __construct($type = self::UNCHANGED, $content = '')
+ {
+ $this->type = $type;
+ $this->content = $content;
+ }
+
+ public function getContent()
+ {
+ return $this->content;
+ }
+
+ public function getType()
+ {
+ return $this->type;
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/LongestCommonSubsequenceCalculator.php b/vendor/php-cs-fixer/diff/src/LongestCommonSubsequenceCalculator.php
new file mode 100644
index 0000000..d344851
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/LongestCommonSubsequenceCalculator.php
@@ -0,0 +1,24 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+interface LongestCommonSubsequenceCalculator
+{
+ /**
+ * Calculates the longest common subsequence of two arrays.
+ *
+ * @param array $from
+ * @param array $to
+ *
+ * @return array
+ */
+ public function calculate(array $from, array $to);
+}
diff --git a/vendor/php-cs-fixer/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php b/vendor/php-cs-fixer/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php
new file mode 100644
index 0000000..a54e190
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php
@@ -0,0 +1,81 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+final class MemoryEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function calculate(array $from, array $to)
+ {
+ $cFrom = \count($from);
+ $cTo = \count($to);
+
+ if ($cFrom === 0) {
+ return [];
+ }
+
+ if ($cFrom === 1) {
+ if (\in_array($from[0], $to, true)) {
+ return [$from[0]];
+ }
+
+ return [];
+ }
+
+ $i = (int) ($cFrom / 2);
+ $fromStart = \array_slice($from, 0, $i);
+ $fromEnd = \array_slice($from, $i);
+ $llB = $this->length($fromStart, $to);
+ $llE = $this->length(\array_reverse($fromEnd), \array_reverse($to));
+ $jMax = 0;
+ $max = 0;
+
+ for ($j = 0; $j <= $cTo; $j++) {
+ $m = $llB[$j] + $llE[$cTo - $j];
+
+ if ($m >= $max) {
+ $max = $m;
+ $jMax = $j;
+ }
+ }
+
+ $toStart = \array_slice($to, 0, $jMax);
+ $toEnd = \array_slice($to, $jMax);
+
+ return \array_merge(
+ $this->calculate($fromStart, $toStart),
+ $this->calculate($fromEnd, $toEnd)
+ );
+ }
+
+ private function length(array $from, array $to)
+ {
+ $current = \array_fill(0, \count($to) + 1, 0);
+ $cFrom = \count($from);
+ $cTo = \count($to);
+
+ for ($i = 0; $i < $cFrom; $i++) {
+ $prev = $current;
+
+ for ($j = 0; $j < $cTo; $j++) {
+ if ($from[$i] === $to[$j]) {
+ $current[$j + 1] = $prev[$j] + 1;
+ } else {
+ $current[$j + 1] = \max($current[$j], $prev[$j + 1]);
+ }
+ }
+ }
+
+ return $current;
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Output/AbstractChunkOutputBuilder.php b/vendor/php-cs-fixer/diff/src/Output/AbstractChunkOutputBuilder.php
new file mode 100644
index 0000000..6fec704
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Output/AbstractChunkOutputBuilder.php
@@ -0,0 +1,56 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff\Output;
+
+abstract class AbstractChunkOutputBuilder implements DiffOutputBuilderInterface
+{
+ /**
+ * Takes input of the diff array and returns the common parts.
+ * Iterates through diff line by line.
+ *
+ * @param array $diff
+ * @param int $lineThreshold
+ *
+ * @return array
+ */
+ protected function getCommonChunks(array $diff, $lineThreshold = 5)
+ {
+ $diffSize = \count($diff);
+ $capturing = false;
+ $chunkStart = 0;
+ $chunkSize = 0;
+ $commonChunks = [];
+
+ for ($i = 0; $i < $diffSize; ++$i) {
+ if ($diff[$i][1] === 0 /* OLD */) {
+ if ($capturing === false) {
+ $capturing = true;
+ $chunkStart = $i;
+ $chunkSize = 0;
+ } else {
+ ++$chunkSize;
+ }
+ } elseif ($capturing !== false) {
+ if ($chunkSize >= $lineThreshold) {
+ $commonChunks[$chunkStart] = $chunkStart + $chunkSize;
+ }
+
+ $capturing = false;
+ }
+ }
+
+ if ($capturing !== false && $chunkSize >= $lineThreshold) {
+ $commonChunks[$chunkStart] = $chunkStart + $chunkSize;
+ }
+
+ return $commonChunks;
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Output/DiffOnlyOutputBuilder.php b/vendor/php-cs-fixer/diff/src/Output/DiffOnlyOutputBuilder.php
new file mode 100644
index 0000000..b010040
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Output/DiffOnlyOutputBuilder.php
@@ -0,0 +1,66 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff\Output;
+
+use PhpCsFixer\Diff\Differ;
+
+/**
+ * Builds a diff string representation in a loose unified diff format
+ * listing only changes lines. Does not include line numbers.
+ */
+final class DiffOnlyOutputBuilder implements DiffOutputBuilderInterface
+{
+ /**
+ * @var string
+ */
+ private $header;
+
+ public function __construct($header = "--- Original\n+++ New\n")
+ {
+ $this->header = $header;
+ }
+
+ public function getDiff(array $diff)
+ {
+ $buffer = \fopen('php://memory', 'r+b');
+
+ if ('' !== $this->header) {
+ \fwrite($buffer, $this->header);
+ if ("\n" !== \substr($this->header, -1, 1)) {
+ \fwrite($buffer, "\n");
+ }
+ }
+
+ foreach ($diff as $diffEntry) {
+ if ($diffEntry[1] === Differ::ADDED) {
+ \fwrite($buffer, '+' . $diffEntry[0]);
+ } elseif ($diffEntry[1] === Differ::REMOVED) {
+ \fwrite($buffer, '-' . $diffEntry[0]);
+ } elseif ($diffEntry[1] === Differ::DIFF_LINE_END_WARNING) {
+ \fwrite($buffer, ' ' . $diffEntry[0]);
+
+ continue; // Warnings should not be tested for line break, it will always be there
+ } else { /* Not changed (old) 0 */
+ continue; // we didn't write the non changs line, so do not add a line break either
+ }
+
+ $lc = \substr($diffEntry[0], -1);
+ if ($lc !== "\n" && $lc !== "\r") {
+ \fwrite($buffer, "\n"); // \No newline at end of file
+ }
+ }
+
+ $diff = \stream_get_contents($buffer, -1, 0);
+ \fclose($buffer);
+
+ return $diff;
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Output/DiffOutputBuilderInterface.php b/vendor/php-cs-fixer/diff/src/Output/DiffOutputBuilderInterface.php
new file mode 100644
index 0000000..d348ed1
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Output/DiffOutputBuilderInterface.php
@@ -0,0 +1,20 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff\Output;
+
+/**
+ * Defines how an output builder should take a generated
+ * diff array and return a string representation of that diff.
+ */
+interface DiffOutputBuilderInterface
+{
+ public function getDiff(array $diff);
+}
diff --git a/vendor/php-cs-fixer/diff/src/Output/StrictUnifiedDiffOutputBuilder.php b/vendor/php-cs-fixer/diff/src/Output/StrictUnifiedDiffOutputBuilder.php
new file mode 100644
index 0000000..4b08055
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Output/StrictUnifiedDiffOutputBuilder.php
@@ -0,0 +1,315 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff\Output;
+
+use PhpCsFixer\Diff\ConfigurationException;
+use PhpCsFixer\Diff\Differ;
+
+/**
+ * Strict Unified diff output builder.
+ *
+ * Generates (strict) Unified diff's (unidiffs) with hunks.
+ */
+final class StrictUnifiedDiffOutputBuilder implements DiffOutputBuilderInterface
+{
+ /**
+ * @var bool
+ */
+ private $changed;
+
+ /**
+ * @var bool
+ */
+ private $collapseRanges;
+
+ /**
+ * @var int >= 0
+ */
+ private $commonLineThreshold;
+
+ /**
+ * @var string
+ */
+ private $header;
+
+ /**
+ * @var int >= 0
+ */
+ private $contextLines;
+
+ private static $default = [
+ 'collapseRanges' => true, // ranges of length one are rendered with the trailing `,1`
+ 'commonLineThreshold' => 6, // number of same lines before ending a new hunk and creating a new one (if needed)
+ 'contextLines' => 3, // like `diff: -u, -U NUM, --unified[=NUM]`, for patch/git apply compatibility best to keep at least @ 3
+ 'fromFile' => null,
+ 'fromFileDate' => null,
+ 'toFile' => null,
+ 'toFileDate' => null,
+ ];
+
+ public function __construct(array $options = [])
+ {
+ $options = \array_merge(self::$default, $options);
+
+ if (!\is_bool($options['collapseRanges'])) {
+ throw new ConfigurationException('collapseRanges', 'a bool', $options['collapseRanges']);
+ }
+
+ if (!\is_int($options['contextLines']) || $options['contextLines'] < 0) {
+ throw new ConfigurationException('contextLines', 'an int >= 0', $options['contextLines']);
+ }
+
+ if (!\is_int($options['commonLineThreshold']) || $options['commonLineThreshold'] <= 0) {
+ throw new ConfigurationException('commonLineThreshold', 'an int > 0', $options['commonLineThreshold']);
+ }
+
+ foreach (['fromFile', 'toFile'] as $option) {
+ if (!\is_string($options[$option])) {
+ throw new ConfigurationException($option, 'a string', $options[$option]);
+ }
+ }
+
+ foreach (['fromFileDate', 'toFileDate'] as $option) {
+ if (null !== $options[$option] && !\is_string($options[$option])) {
+ throw new ConfigurationException($option, 'a string or <null>', $options[$option]);
+ }
+ }
+
+ $this->header = \sprintf(
+ "--- %s%s\n+++ %s%s\n",
+ $options['fromFile'],
+ null === $options['fromFileDate'] ? '' : "\t" . $options['fromFileDate'],
+ $options['toFile'],
+ null === $options['toFileDate'] ? '' : "\t" . $options['toFileDate']
+ );
+
+ $this->collapseRanges = $options['collapseRanges'];
+ $this->commonLineThreshold = $options['commonLineThreshold'];
+ $this->contextLines = $options['contextLines'];
+ }
+
+ public function getDiff(array $diff)
+ {
+ if (0 === \count($diff)) {
+ return '';
+ }
+
+ $this->changed = false;
+
+ $buffer = \fopen('php://memory', 'r+b');
+ \fwrite($buffer, $this->header);
+
+ $this->writeDiffHunks($buffer, $diff);
+
+ if (!$this->changed) {
+ \fclose($buffer);
+
+ return '';
+ }
+
+ $diff = \stream_get_contents($buffer, -1, 0);
+
+ \fclose($buffer);
+
+ // If the last char is not a linebreak: add it.
+ // This might happen when both the `from` and `to` do not have a trailing linebreak
+ $last = \substr($diff, -1);
+
+ return "\n" !== $last && "\r" !== $last
+ ? $diff . "\n"
+ : $diff
+ ;
+ }
+
+ private function writeDiffHunks($output, array $diff)
+ {
+ // detect "No newline at end of file" and insert into `$diff` if needed
+
+ $upperLimit = \count($diff);
+
+ if (0 === $diff[$upperLimit - 1][1]) {
+ $lc = \substr($diff[$upperLimit - 1][0], -1);
+ if ("\n" !== $lc) {
+ \array_splice($diff, $upperLimit, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]);
+ }
+ } else {
+ // search back for the last `+` and `-` line,
+ // check if has trailing linebreak, else add under it warning under it
+ $toFind = [1 => true, 2 => true];
+ for ($i = $upperLimit - 1; $i >= 0; --$i) {
+ if (isset($toFind[$diff[$i][1]])) {
+ unset($toFind[$diff[$i][1]]);
+ $lc = \substr($diff[$i][0], -1);
+ if ("\n" !== $lc) {
+ \array_splice($diff, $i + 1, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]);
+ }
+
+ if (!\count($toFind)) {
+ break;
+ }
+ }
+ }
+ }
+
+ // write hunks to output buffer
+
+ $cutOff = \max($this->commonLineThreshold, $this->contextLines);
+ $hunkCapture = false;
+ $sameCount = $toRange = $fromRange = 0;
+ $toStart = $fromStart = 1;
+
+ foreach ($diff as $i => $entry) {
+ if (0 === $entry[1]) { // same
+ if (false === $hunkCapture) {
+ ++$fromStart;
+ ++$toStart;
+
+ continue;
+ }
+
+ ++$sameCount;
+ ++$toRange;
+ ++$fromRange;
+
+ if ($sameCount === $cutOff) {
+ $contextStartOffset = ($hunkCapture - $this->contextLines) < 0
+ ? $hunkCapture
+ : $this->contextLines
+ ;
+
+ // note: $contextEndOffset = $this->contextLines;
+ //
+ // because we never go beyond the end of the diff.
+ // with the cutoff/contextlines here the follow is never true;
+ //
+ // if ($i - $cutOff + $this->contextLines + 1 > \count($diff)) {
+ // $contextEndOffset = count($diff) - 1;
+ // }
+ //
+ // ; that would be true for a trailing incomplete hunk case which is dealt with after this loop
+
+ $this->writeHunk(
+ $diff,
+ $hunkCapture - $contextStartOffset,
+ $i - $cutOff + $this->contextLines + 1,
+ $fromStart - $contextStartOffset,
+ $fromRange - $cutOff + $contextStartOffset + $this->contextLines,
+ $toStart - $contextStartOffset,
+ $toRange - $cutOff + $contextStartOffset + $this->contextLines,
+ $output
+ );
+
+ $fromStart += $fromRange;
+ $toStart += $toRange;
+
+ $hunkCapture = false;
+ $sameCount = $toRange = $fromRange = 0;
+ }
+
+ continue;
+ }
+
+ $sameCount = 0;
+
+ if ($entry[1] === Differ::NO_LINE_END_EOF_WARNING) {
+ continue;
+ }
+
+ $this->changed = true;
+
+ if (false === $hunkCapture) {
+ $hunkCapture = $i;
+ }
+
+ if (Differ::ADDED === $entry[1]) { // added
+ ++$toRange;
+ }
+
+ if (Differ::REMOVED === $entry[1]) { // removed
+ ++$fromRange;
+ }
+ }
+
+ if (false === $hunkCapture) {
+ return;
+ }
+
+ // we end here when cutoff (commonLineThreshold) was not reached, but we where capturing a hunk,
+ // do not render hunk till end automatically because the number of context lines might be less than the commonLineThreshold
+
+ $contextStartOffset = $hunkCapture - $this->contextLines < 0
+ ? $hunkCapture
+ : $this->contextLines
+ ;
+
+ // prevent trying to write out more common lines than there are in the diff _and_
+ // do not write more than configured through the context lines
+ $contextEndOffset = \min($sameCount, $this->contextLines);
+
+ $fromRange -= $sameCount;
+ $toRange -= $sameCount;
+
+ $this->writeHunk(
+ $diff,
+ $hunkCapture - $contextStartOffset,
+ $i - $sameCount + $contextEndOffset + 1,
+ $fromStart - $contextStartOffset,
+ $fromRange + $contextStartOffset + $contextEndOffset,
+ $toStart - $contextStartOffset,
+ $toRange + $contextStartOffset + $contextEndOffset,
+ $output
+ );
+ }
+
+ private function writeHunk(
+ array $diff,
+ $diffStartIndex,
+ $diffEndIndex,
+ $fromStart,
+ $fromRange,
+ $toStart,
+ $toRange,
+ $output
+ ) {
+ \fwrite($output, '@@ -' . $fromStart);
+
+ if (!$this->collapseRanges || 1 !== $fromRange) {
+ \fwrite($output, ',' . $fromRange);
+ }
+
+ \fwrite($output, ' +' . $toStart);
+ if (!$this->collapseRanges || 1 !== $toRange) {
+ \fwrite($output, ',' . $toRange);
+ }
+
+ \fwrite($output, " @@\n");
+
+ for ($i = $diffStartIndex; $i < $diffEndIndex; ++$i) {
+ if ($diff[$i][1] === Differ::ADDED) {
+ $this->changed = true;
+ \fwrite($output, '+' . $diff[$i][0]);
+ } elseif ($diff[$i][1] === Differ::REMOVED) {
+ $this->changed = true;
+ \fwrite($output, '-' . $diff[$i][0]);
+ } elseif ($diff[$i][1] === Differ::OLD) {
+ \fwrite($output, ' ' . $diff[$i][0]);
+ } elseif ($diff[$i][1] === Differ::NO_LINE_END_EOF_WARNING) {
+ $this->changed = true;
+ \fwrite($output, $diff[$i][0]);
+ }
+ //} elseif ($diff[$i][1] === Differ::DIFF_LINE_END_WARNING) { // custom comment inserted by PHPUnit/diff package
+ // skip
+ //} else {
+ // unknown/invalid
+ //}
+ }
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Output/UnifiedDiffOutputBuilder.php b/vendor/php-cs-fixer/diff/src/Output/UnifiedDiffOutputBuilder.php
new file mode 100644
index 0000000..13e6636
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Output/UnifiedDiffOutputBuilder.php
@@ -0,0 +1,259 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff\Output;
+
+use PhpCsFixer\Diff\Differ;
+
+/**
+ * Builds a diff string representation in unified diff format in chunks.
+ */
+final class UnifiedDiffOutputBuilder extends AbstractChunkOutputBuilder
+{
+ /**
+ * @var bool
+ */
+ private $collapseRanges = true;
+
+ /**
+ * @var int >= 0
+ */
+ private $commonLineThreshold = 6;
+
+ /**
+ * @var int >= 0
+ */
+ private $contextLines = 3;
+
+ /**
+ * @var string
+ */
+ private $header;
+
+ /**
+ * @var bool
+ */
+ private $addLineNumbers;
+
+ public function __construct($header = "--- Original\n+++ New\n", $addLineNumbers = false)
+ {
+ $this->header = $header;
+ $this->addLineNumbers = $addLineNumbers;
+ }
+
+ public function getDiff(array $diff)
+ {
+ $buffer = \fopen('php://memory', 'r+b');
+
+ if ('' !== $this->header) {
+ \fwrite($buffer, $this->header);
+ if ("\n" !== \substr($this->header, -1, 1)) {
+ \fwrite($buffer, "\n");
+ }
+ }
+
+ if (0 !== \count($diff)) {
+ $this->writeDiffHunks($buffer, $diff);
+ }
+
+ $diff = \stream_get_contents($buffer, -1, 0);
+
+ \fclose($buffer);
+
+ // If the diff is non-empty and a linebreak: add it.
+ // This might happen when both the `from` and `to` do not have a trailing linebreak
+ $last = \substr($diff, -1);
+
+ return 0 !== \strlen($diff) && "\n" !== $last && "\r" !== $last
+ ? $diff . "\n"
+ : $diff
+ ;
+ }
+
+ private function writeDiffHunks($output, array $diff)
+ {
+ // detect "No newline at end of file" and insert into `$diff` if needed
+
+ $upperLimit = \count($diff);
+
+ if (0 === $diff[$upperLimit - 1][1]) {
+ $lc = \substr($diff[$upperLimit - 1][0], -1);
+ if ("\n" !== $lc) {
+ \array_splice($diff, $upperLimit, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]);
+ }
+ } else {
+ // search back for the last `+` and `-` line,
+ // check if has trailing linebreak, else add under it warning under it
+ $toFind = [1 => true, 2 => true];
+ for ($i = $upperLimit - 1; $i >= 0; --$i) {
+ if (isset($toFind[$diff[$i][1]])) {
+ unset($toFind[$diff[$i][1]]);
+ $lc = \substr($diff[$i][0], -1);
+ if ("\n" !== $lc) {
+ \array_splice($diff, $i + 1, 0, [["\n\\ No newline at end of file\n", Differ::NO_LINE_END_EOF_WARNING]]);
+ }
+
+ if (!\count($toFind)) {
+ break;
+ }
+ }
+ }
+ }
+
+ // write hunks to output buffer
+
+ $cutOff = \max($this->commonLineThreshold, $this->contextLines);
+ $hunkCapture = false;
+ $sameCount = $toRange = $fromRange = 0;
+ $toStart = $fromStart = 1;
+
+ foreach ($diff as $i => $entry) {
+ if (0 === $entry[1]) { // same
+ if (false === $hunkCapture) {
+ ++$fromStart;
+ ++$toStart;
+
+ continue;
+ }
+
+ ++$sameCount;
+ ++$toRange;
+ ++$fromRange;
+
+ if ($sameCount === $cutOff) {
+ $contextStartOffset = ($hunkCapture - $this->contextLines) < 0
+ ? $hunkCapture
+ : $this->contextLines
+ ;
+
+ // note: $contextEndOffset = $this->contextLines;
+ //
+ // because we never go beyond the end of the diff.
+ // with the cutoff/contextlines here the follow is never true;
+ //
+ // if ($i - $cutOff + $this->contextLines + 1 > \count($diff)) {
+ // $contextEndOffset = count($diff) - 1;
+ // }
+ //
+ // ; that would be true for a trailing incomplete hunk case which is dealt with after this loop
+
+ $this->writeHunk(
+ $diff,
+ $hunkCapture - $contextStartOffset,
+ $i - $cutOff + $this->contextLines + 1,
+ $fromStart - $contextStartOffset,
+ $fromRange - $cutOff + $contextStartOffset + $this->contextLines,
+ $toStart - $contextStartOffset,
+ $toRange - $cutOff + $contextStartOffset + $this->contextLines,
+ $output
+ );
+
+ $fromStart += $fromRange;
+ $toStart += $toRange;
+
+ $hunkCapture = false;
+ $sameCount = $toRange = $fromRange = 0;
+ }
+
+ continue;
+ }
+
+ $sameCount = 0;
+
+ if ($entry[1] === Differ::NO_LINE_END_EOF_WARNING) {
+ continue;
+ }
+
+ if (false === $hunkCapture) {
+ $hunkCapture = $i;
+ }
+
+ if (Differ::ADDED === $entry[1]) {
+ ++$toRange;
+ }
+
+ if (Differ::REMOVED === $entry[1]) {
+ ++$fromRange;
+ }
+ }
+
+ if (false === $hunkCapture) {
+ return;
+ }
+
+ // we end here when cutoff (commonLineThreshold) was not reached, but we where capturing a hunk,
+ // do not render hunk till end automatically because the number of context lines might be less than the commonLineThreshold
+
+ $contextStartOffset = $hunkCapture - $this->contextLines < 0
+ ? $hunkCapture
+ : $this->contextLines
+ ;
+
+ // prevent trying to write out more common lines than there are in the diff _and_
+ // do not write more than configured through the context lines
+ $contextEndOffset = \min($sameCount, $this->contextLines);
+
+ $fromRange -= $sameCount;
+ $toRange -= $sameCount;
+
+ $this->writeHunk(
+ $diff,
+ $hunkCapture - $contextStartOffset,
+ $i - $sameCount + $contextEndOffset + 1,
+ $fromStart - $contextStartOffset,
+ $fromRange + $contextStartOffset + $contextEndOffset,
+ $toStart - $contextStartOffset,
+ $toRange + $contextStartOffset + $contextEndOffset,
+ $output
+ );
+ }
+
+ private function writeHunk(
+ array $diff,
+ $diffStartIndex,
+ $diffEndIndex,
+ $fromStart,
+ $fromRange,
+ $toStart,
+ $toRange,
+ $output
+ ) {
+ if ($this->addLineNumbers) {
+ \fwrite($output, '@@ -' . $fromStart);
+
+ if (!$this->collapseRanges || 1 !== $fromRange) {
+ \fwrite($output, ',' . $fromRange);
+ }
+
+ \fwrite($output, ' +' . $toStart);
+ if (!$this->collapseRanges || 1 !== $toRange) {
+ \fwrite($output, ',' . $toRange);
+ }
+
+ \fwrite($output, " @@\n");
+ } else {
+ \fwrite($output, "@@ @@\n");
+ }
+
+ for ($i = $diffStartIndex; $i < $diffEndIndex; ++$i) {
+ if ($diff[$i][1] === Differ::ADDED) {
+ \fwrite($output, '+' . $diff[$i][0]);
+ } elseif ($diff[$i][1] === Differ::REMOVED) {
+ \fwrite($output, '-' . $diff[$i][0]);
+ } elseif ($diff[$i][1] === Differ::OLD) {
+ \fwrite($output, ' ' . $diff[$i][0]);
+ } elseif ($diff[$i][1] === Differ::NO_LINE_END_EOF_WARNING) {
+ \fwrite($output, "\n"); // $diff[$i][0]
+ } else { /* Not changed (old) Differ::OLD or Warning Differ::DIFF_LINE_END_WARNING */
+ \fwrite($output, ' ' . $diff[$i][0]);
+ }
+ }
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/Parser.php b/vendor/php-cs-fixer/diff/src/Parser.php
new file mode 100644
index 0000000..87afb93
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/Parser.php
@@ -0,0 +1,106 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+/**
+ * Unified diff parser.
+ */
+final class Parser
+{
+ /**
+ * @param string $string
+ *
+ * @return Diff[]
+ */
+ public function parse($string)
+ {
+ $lines = \preg_split('(\r\n|\r|\n)', $string);
+
+ if (!empty($lines) && $lines[\count($lines) - 1] === '') {
+ \array_pop($lines);
+ }
+
+ $lineCount = \count($lines);
+ $diffs = [];
+ $diff = null;
+ $collected = [];
+
+ for ($i = 0; $i < $lineCount; ++$i) {
+ if (\preg_match('(^---\\s+(?P<file>\\S+))', $lines[$i], $fromMatch) &&
+ \preg_match('(^\\+\\+\\+\\s+(?P<file>\\S+))', $lines[$i + 1], $toMatch)) {
+ if ($diff !== null) {
+ $this->parseFileDiff($diff, $collected);
+
+ $diffs[] = $diff;
+ $collected = [];
+ }
+
+ $diff = new Diff($fromMatch['file'], $toMatch['file']);
+
+ ++$i;
+ } else {
+ if (\preg_match('/^(?:diff --git |index [\da-f\.]+|[+-]{3} [ab])/', $lines[$i])) {
+ continue;
+ }
+
+ $collected[] = $lines[$i];
+ }
+ }
+
+ if ($diff !== null && \count($collected)) {
+ $this->parseFileDiff($diff, $collected);
+
+ $diffs[] = $diff;
+ }
+
+ return $diffs;
+ }
+
+ private function parseFileDiff(Diff $diff, array $lines)
+ {
+ $chunks = [];
+ $chunk = null;
+
+ foreach ($lines as $line) {
+ if (\preg_match('/^@@\s+-(?P<start>\d+)(?:,\s*(?P<startrange>\d+))?\s+\+(?P<end>\d+)(?:,\s*(?P<endrange>\d+))?\s+@@/', $line, $match)) {
+ $chunk = new Chunk(
+ (int) $match['start'],
+ isset($match['startrange']) ? \max(1, (int) $match['startrange']) : 1,
+ (int) $match['end'],
+ isset($match['endrange']) ? \max(1, (int) $match['endrange']) : 1
+ );
+
+ $chunks[] = $chunk;
+ $diffLines = [];
+
+ continue;
+ }
+
+ if (\preg_match('/^(?P<type>[+ -])?(?P<line>.*)/', $line, $match)) {
+ $type = Line::UNCHANGED;
+
+ if ($match['type'] === '+') {
+ $type = Line::ADDED;
+ } elseif ($match['type'] === '-') {
+ $type = Line::REMOVED;
+ }
+
+ $diffLines[] = new Line($type, $match['line']);
+
+ if (null !== $chunk) {
+ $chunk->setLines($diffLines);
+ }
+ }
+ }
+
+ $diff->setChunks($chunks);
+ }
+}
diff --git a/vendor/php-cs-fixer/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php b/vendor/php-cs-fixer/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php
new file mode 100644
index 0000000..5e4d51d
--- /dev/null
+++ b/vendor/php-cs-fixer/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php
@@ -0,0 +1,66 @@
+<?php
+/*
+ * This file is part of sebastian/diff.
+ *
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace PhpCsFixer\Diff;
+
+final class TimeEfficientLongestCommonSubsequenceCalculator implements LongestCommonSubsequenceCalculator
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function calculate(array $from, array $to)
+ {
+ $common = [];
+ $fromLength = \count($from);
+ $toLength = \count($to);
+ $width = $fromLength + 1;
+ $matrix = new \SplFixedArray($width * ($toLength + 1));
+
+ for ($i = 0; $i <= $fromLength; ++$i) {
+ $matrix[$i] = 0;
+ }
+
+ for ($j = 0; $j <= $toLength; ++$j) {
+ $matrix[$j * $width] = 0;
+ }
+
+ for ($i = 1; $i <= $fromLength; ++$i) {
+ for ($j = 1; $j <= $toLength; ++$j) {
+ $o = ($j * $width) + $i;
+ $matrix[$o] = \max(
+ $matrix[$o - 1],
+ $matrix[$o - $width],
+ $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0
+ );
+ }
+ }
+
+ $i = $fromLength;
+ $j = $toLength;
+
+ while ($i > 0 && $j > 0) {
+ if ($from[$i - 1] === $to[$j - 1]) {
+ $common[] = $from[$i - 1];
+ --$i;
+ --$j;
+ } else {
+ $o = ($j * $width) + $i;
+
+ if ($matrix[$o - $width] > $matrix[$o - 1]) {
+ --$j;
+ } else {
+ --$i;
+ }
+ }
+ }
+
+ return \array_reverse($common);
+ }
+}
diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md
new file mode 100644
index 0000000..58ddab0
--- /dev/null
+++ b/vendor/psr/cache/CHANGELOG.md
@@ -0,0 +1,16 @@
+# Changelog
+
+All notable changes to this project will be documented in this file, in reverse chronological order by release.
+
+## 1.0.1 - 2016-08-06
+
+### Fixed
+
+- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr
+- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr
+- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell
+- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell
+
+## 1.0.0 - 2015-12-11
+
+Initial stable release; reflects accepted PSR-6 specification
diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt
new file mode 100644
index 0000000..b1c2c97
--- /dev/null
+++ b/vendor/psr/cache/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2015 PHP Framework Interoperability Group
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md
new file mode 100644
index 0000000..c8706ce
--- /dev/null
+++ b/vendor/psr/cache/README.md
@@ -0,0 +1,9 @@
+PSR Cache
+=========
+
+This repository holds all interfaces defined by
+[PSR-6](http://www.php-fig.org/psr/psr-6/).
+
+Note that this is not a Cache implementation of its own. It is merely an
+interface that describes a Cache implementation. See the specification for more
+details.
diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json
new file mode 100644
index 0000000..e828fec
--- /dev/null
+++ b/vendor/psr/cache/composer.json
@@ -0,0 +1,25 @@
+{
+ "name": "psr/cache",
+ "description": "Common interface for caching libraries",
+ "keywords": ["psr", "psr-6", "cache"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Cache\\": "src/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ }
+}
diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php
new file mode 100644
index 0000000..e27f22f
--- /dev/null
+++ b/vendor/psr/cache/src/CacheException.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Psr\Cache;
+
+/**
+ * Exception interface for all exceptions thrown by an Implementing Library.
+ */
+interface CacheException
+{
+}
diff --git a/vendor/psr/cache/src/CacheItemInterface.php b/vendor/psr/cache/src/CacheItemInterface.php
new file mode 100644
index 0000000..63d05dd
--- /dev/null
+++ b/vendor/psr/cache/src/CacheItemInterface.php
@@ -0,0 +1,105 @@
+<?php
+
+namespace Psr\Cache;
+
+/**
+ * CacheItemInterface defines an interface for interacting with objects inside a cache.
+ *
+ * Each Item object MUST be associated with a specific key, which can be set
+ * according to the implementing system and is typically passed by the
+ * Cache\CacheItemPoolInterface object.
+ *
+ * The Cache\CacheItemInterface object encapsulates the storage and retrieval of
+ * cache items. Each Cache\CacheItemInterface is generated by a
+ * Cache\CacheItemPoolInterface object, which is responsible for any required
+ * setup as well as associating the object with a unique Key.
+ * Cache\CacheItemInterface objects MUST be able to store and retrieve any type
+ * of PHP value defined in the Data section of the specification.
+ *
+ * Calling Libraries MUST NOT instantiate Item objects themselves. They may only
+ * be requested from a Pool object via the getItem() method. Calling Libraries
+ * SHOULD NOT assume that an Item created by one Implementing Library is
+ * compatible with a Pool from another Implementing Library.
+ */
+interface CacheItemInterface
+{
+ /**
+ * Returns the key for the current cache item.
+ *
+ * The key is loaded by the Implementing Library, but should be available to
+ * the higher level callers when needed.
+ *
+ * @return string
+ * The key string for this cache item.
+ */
+ public function getKey();
+
+ /**
+ * Retrieves the value of the item from the cache associated with this object's key.
+ *
+ * The value returned must be identical to the value originally stored by set().
+ *
+ * If isHit() returns false, this method MUST return null. Note that null
+ * is a legitimate cached value, so the isHit() method SHOULD be used to
+ * differentiate between "null value was found" and "no value was found."
+ *
+ * @return mixed
+ * The value corresponding to this cache item's key, or null if not found.
+ */
+ public function get();
+
+ /**
+ * Confirms if the cache item lookup resulted in a cache hit.
+ *
+ * Note: This method MUST NOT have a race condition between calling isHit()
+ * and calling get().
+ *
+ * @return bool
+ * True if the request resulted in a cache hit. False otherwise.
+ */
+ public function isHit();
+
+ /**
+ * Sets the value represented by this cache item.
+ *
+ * The $value argument may be any item that can be serialized by PHP,
+ * although the method of serialization is left up to the Implementing
+ * Library.
+ *
+ * @param mixed $value
+ * The serializable value to be stored.
+ *
+ * @return static
+ * The invoked object.
+ */
+ public function set($value);
+
+ /**
+ * Sets the expiration time for this cache item.
+ *
+ * @param \DateTimeInterface|null $expiration
+ * The point in time after which the item MUST be considered expired.
+ * If null is passed explicitly, a default value MAY be used. If none is set,
+ * the value should be stored permanently or for as long as the
+ * implementation allows.
+ *
+ * @return static
+ * The called object.
+ */
+ public function expiresAt($expiration);
+
+ /**
+ * Sets the expiration time for this cache item.
+ *
+ * @param int|\DateInterval|null $time
+ * The period of time from the present after which the item MUST be considered
+ * expired. An integer parameter is understood to be the time in seconds until
+ * expiration. If null is passed explicitly, a default value MAY be used.
+ * If none is set, the value should be stored permanently or for as long as the
+ * implementation allows.
+ *
+ * @return static
+ * The called object.
+ */
+ public function expiresAfter($time);
+}
diff --git a/vendor/psr/cache/src/CacheItemPoolInterface.php b/vendor/psr/cache/src/CacheItemPoolInterface.php
new file mode 100644
index 0000000..0351419
--- /dev/null
+++ b/vendor/psr/cache/src/CacheItemPoolInterface.php
@@ -0,0 +1,138 @@
+<?php
+
+namespace Psr\Cache;
+
+/**
+ * CacheItemPoolInterface generates CacheItemInterface objects.
+ *
+ * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from
+ * the Calling Library and return the associated Cache\CacheItemInterface object.
+ * It is also the primary point of interaction with the entire cache collection.
+ * All configuration and initialization of the Pool is left up to an
+ * Implementing Library.
+ */
+interface CacheItemPoolInterface
+{
+ /**
+ * Returns a Cache Item representing the specified key.
+ *
+ * This method must always return a CacheItemInterface object, even in case of
+ * a cache miss. It MUST NOT return null.
+ *
+ * @param string $key
+ * The key for which to return the corresponding Cache Item.
+ *
+ * @throws InvalidArgumentException
+ * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
+ * MUST be thrown.
+ *
+ * @return CacheItemInterface
+ * The corresponding Cache Item.
+ */
+ public function getItem($key);
+
+ /**
+ * Returns a traversable set of cache items.
+ *
+ * @param string[] $keys
+ * An indexed array of keys of items to retrieve.
+ *
+ * @throws InvalidArgumentException
+ * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
+ * MUST be thrown.
+ *
+ * @return array|\Traversable
+ * A traversable collection of Cache Items keyed by the cache keys of
+ * each item. A Cache item will be returned for each key, even if that
+ * key is not found. However, if no keys are specified then an empty
+ * traversable MUST be returned instead.
+ */
+ public function getItems(array $keys = array());
+
+ /**
+ * Confirms if the cache contains specified cache item.
+ *
+ * Note: This method MAY avoid retrieving the cached value for performance reasons.
+ * This could result in a race condition with CacheItemInterface::get(). To avoid
+ * such situation use CacheItemInterface::isHit() instead.
+ *
+ * @param string $key
+ * The key for which to check existence.
+ *
+ * @throws InvalidArgumentException
+ * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
+ * MUST be thrown.
+ *
+ * @return bool
+ * True if item exists in the cache, false otherwise.
+ */
+ public function hasItem($key);
+
+ /**
+ * Deletes all items in the pool.
+ *
+ * @return bool
+ * True if the pool was successfully cleared. False if there was an error.
+ */
+ public function clear();
+
+ /**
+ * Removes the item from the pool.
+ *
+ * @param string $key
+ * The key to delete.
+ *
+ * @throws InvalidArgumentException
+ * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException
+ * MUST be thrown.
+ *
+ * @return bool
+ * True if the item was successfully removed. False if there was an error.
+ */
+ public function deleteItem($key);
+
+ /**
+ * Removes multiple items from the pool.
+ *
+ * @param string[] $keys
+ * An array of keys that should be removed from the pool.
+
+ * @throws InvalidArgumentException
+ * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
+ * MUST be thrown.
+ *
+ * @return bool
+ * True if the items were successfully removed. False if there was an error.
+ */
+ public function deleteItems(array $keys);
+
+ /**
+ * Persists a cache item immediately.
+ *
+ * @param CacheItemInterface $item
+ * The cache item to save.
+ *
+ * @return bool
+ * True if the item was successfully persisted. False if there was an error.
+ */
+ public function save(CacheItemInterface $item);
+
+ /**
+ * Sets a cache item to be persisted later.
+ *
+ * @param CacheItemInterface $item
+ * The cache item to save.
+ *
+ * @return bool
+ * False if the item could not be queued or if a commit was attempted and failed. True otherwise.
+ */
+ public function saveDeferred(CacheItemInterface $item);
+
+ /**
+ * Persists any deferred cache items.
+ *
+ * @return bool
+ * True if all not-yet-saved items were successfully saved or there were none. False otherwise.
+ */
+ public function commit();
+}
diff --git a/vendor/psr/cache/src/InvalidArgumentException.php b/vendor/psr/cache/src/InvalidArgumentException.php
new file mode 100644
index 0000000..be7c6fa
--- /dev/null
+++ b/vendor/psr/cache/src/InvalidArgumentException.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Psr\Cache;
+
+/**
+ * Exception interface for invalid cache arguments.
+ *
+ * Any time an invalid argument is passed into a method it must throw an
+ * exception class which implements Psr\Cache\InvalidArgumentException.
+ */
+interface InvalidArgumentException extends CacheException
+{
+}
diff --git a/vendor/psr/container/.gitignore b/vendor/psr/container/.gitignore
new file mode 100644
index 0000000..b2395aa
--- /dev/null
+++ b/vendor/psr/container/.gitignore
@@ -0,0 +1,3 @@
+composer.lock
+composer.phar
+/vendor/
diff --git a/vendor/psr/container/LICENSE b/vendor/psr/container/LICENSE
new file mode 100644
index 0000000..2877a48
--- /dev/null
+++ b/vendor/psr/container/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013-2016 container-interop
+Copyright (c) 2016 PHP Framework Interoperability Group
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/psr/container/README.md b/vendor/psr/container/README.md
new file mode 100644
index 0000000..1b9d9e5
--- /dev/null
+++ b/vendor/psr/container/README.md
@@ -0,0 +1,13 @@
+Container interface
+==============
+
+This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url].
+
+Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container.
+
+The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist.
+
+[psr-url]: https://www.php-fig.org/psr/psr-11/
+[package-url]: https://packagist.org/packages/psr/container
+[implementation-url]: https://packagist.org/providers/psr/container-implementation
+
diff --git a/vendor/psr/container/composer.json b/vendor/psr/container/composer.json
new file mode 100644
index 0000000..017f41e
--- /dev/null
+++ b/vendor/psr/container/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "psr/container",
+ "type": "library",
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"],
+ "homepage": "https://github.com/php-fig/container",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ }
+}
diff --git a/vendor/psr/container/src/ContainerExceptionInterface.php b/vendor/psr/container/src/ContainerExceptionInterface.php
new file mode 100644
index 0000000..0f213f2
--- /dev/null
+++ b/vendor/psr/container/src/ContainerExceptionInterface.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace Psr\Container;
+
+use Throwable;
+
+/**
+ * Base interface representing a generic exception in a container.
+ */
+interface ContainerExceptionInterface extends Throwable
+{
+}
diff --git a/vendor/psr/container/src/ContainerInterface.php b/vendor/psr/container/src/ContainerInterface.php
new file mode 100644
index 0000000..cf8e7fd
--- /dev/null
+++ b/vendor/psr/container/src/ContainerInterface.php
@@ -0,0 +1,36 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Psr\Container;
+
+/**
+ * Describes the interface of a container that exposes methods to read its entries.
+ */
+interface ContainerInterface
+{
+ /**
+ * Finds an entry of the container by its identifier and returns it.
+ *
+ * @param string $id Identifier of the entry to look for.
+ *
+ * @throws NotFoundExceptionInterface No entry was found for **this** identifier.
+ * @throws ContainerExceptionInterface Error while retrieving the entry.
+ *
+ * @return mixed Entry.
+ */
+ public function get(string $id);
+
+ /**
+ * Returns true if the container can return an entry for the given identifier.
+ * Returns false otherwise.
+ *
+ * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
+ * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
+ *
+ * @param string $id Identifier of the entry to look for.
+ *
+ * @return bool
+ */
+ public function has(string $id);
+}
diff --git a/vendor/psr/container/src/NotFoundExceptionInterface.php b/vendor/psr/container/src/NotFoundExceptionInterface.php
new file mode 100644
index 0000000..650bf46
--- /dev/null
+++ b/vendor/psr/container/src/NotFoundExceptionInterface.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Psr\Container;
+
+/**
+ * No entry was found in the container.
+ */
+interface NotFoundExceptionInterface extends ContainerExceptionInterface
+{
+}
diff --git a/vendor/psr/log/.gitignore b/vendor/psr/log/.gitignore
deleted file mode 100644
index 22d0d82..0000000
--- a/vendor/psr/log/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-vendor
diff --git a/vendor/psr/log/Psr/Log/AbstractLogger.php b/vendor/psr/log/Psr/Log/AbstractLogger.php
index 90e721a..e02f9da 100644
--- a/vendor/psr/log/Psr/Log/AbstractLogger.php
+++ b/vendor/psr/log/Psr/Log/AbstractLogger.php
@@ -14,8 +14,8 @@ abstract class AbstractLogger implements LoggerInterface
/**
* System is unusable.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -30,8 +30,8 @@ abstract class AbstractLogger implements LoggerInterface
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -45,8 +45,8 @@ abstract class AbstractLogger implements LoggerInterface
*
* Example: Application component unavailable, unexpected exception.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -59,8 +59,8 @@ abstract class AbstractLogger implements LoggerInterface
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -75,8 +75,8 @@ abstract class AbstractLogger implements LoggerInterface
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -88,8 +88,8 @@ abstract class AbstractLogger implements LoggerInterface
/**
* Normal but significant events.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -103,8 +103,8 @@ abstract class AbstractLogger implements LoggerInterface
*
* Example: User logs in, SQL logs.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -116,8 +116,8 @@ abstract class AbstractLogger implements LoggerInterface
/**
* Detailed debug information.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
diff --git a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/vendor/psr/log/Psr/Log/LoggerAwareTrait.php
index 639f79b..82bf45c 100644
--- a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php
+++ b/vendor/psr/log/Psr/Log/LoggerAwareTrait.php
@@ -10,7 +10,7 @@ trait LoggerAwareTrait
/**
* The logger instance.
*
- * @var LoggerInterface
+ * @var LoggerInterface|null
*/
protected $logger;
diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php
index 5ea7243..2206cfd 100644
--- a/vendor/psr/log/Psr/Log/LoggerInterface.php
+++ b/vendor/psr/log/Psr/Log/LoggerInterface.php
@@ -22,8 +22,8 @@ interface LoggerInterface
/**
* System is unusable.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -35,8 +35,8 @@ interface LoggerInterface
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -47,8 +47,8 @@ interface LoggerInterface
*
* Example: Application component unavailable, unexpected exception.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -58,8 +58,8 @@ interface LoggerInterface
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -71,8 +71,8 @@ interface LoggerInterface
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -81,8 +81,8 @@ interface LoggerInterface
/**
* Normal but significant events.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -93,8 +93,8 @@ interface LoggerInterface
*
* Example: User logs in, SQL logs.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -103,8 +103,8 @@ interface LoggerInterface
/**
* Detailed debug information.
*
- * @param string $message
- * @param array $context
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
*/
@@ -113,11 +113,13 @@ interface LoggerInterface
/**
* Logs with an arbitrary level.
*
- * @param mixed $level
- * @param string $message
- * @param array $context
+ * @param mixed $level
+ * @param string $message
+ * @param mixed[] $context
*
* @return void
+ *
+ * @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, $message, array $context = array());
}
diff --git a/vendor/psr/log/Psr/Log/LoggerTrait.php b/vendor/psr/log/Psr/Log/LoggerTrait.php
index 867225d..e392fef 100644
--- a/vendor/psr/log/Psr/Log/LoggerTrait.php
+++ b/vendor/psr/log/Psr/Log/LoggerTrait.php
@@ -135,6 +135,8 @@ trait LoggerTrait
* @param array $context
*
* @return void
+ *
+ * @throws \Psr\Log\InvalidArgumentException
*/
abstract public function log($level, $message, array $context = array());
}
diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php
index d8cd682..c8f7293 100644
--- a/vendor/psr/log/Psr/Log/NullLogger.php
+++ b/vendor/psr/log/Psr/Log/NullLogger.php
@@ -20,6 +20,8 @@ class NullLogger extends AbstractLogger
* @param array $context
*
* @return void
+ *
+ * @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, $message, array $context = array())
{
diff --git a/vendor/psr/log/Psr/Log/Test/DummyTest.php b/vendor/psr/log/Psr/Log/Test/DummyTest.php
new file mode 100644
index 0000000..9638c11
--- /dev/null
+++ b/vendor/psr/log/Psr/Log/Test/DummyTest.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Psr\Log\Test;
+
+/**
+ * This class is internal and does not follow the BC promise.
+ *
+ * Do NOT use this class in any way.
+ *
+ * @internal
+ */
+class DummyTest
+{
+ public function __toString()
+ {
+ return 'DummyTest';
+ }
+}
diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
index a0391a5..e1e5354 100644
--- a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
+++ b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php
@@ -4,6 +4,7 @@ namespace Psr\Log\Test;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
+use PHPUnit\Framework\TestCase;
/**
* Provides a base test class for ensuring compliance with the LoggerInterface.
@@ -11,7 +12,7 @@ use Psr\Log\LogLevel;
* Implementors can extend the class and implement abstract methods to run this
* as part of their test suite.
*/
-abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
+abstract class LoggerInterfaceTest extends TestCase
{
/**
* @return LoggerInterface
@@ -101,6 +102,9 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
public function testContextCanContainAnything()
{
+ $closed = fopen('php://memory', 'r');
+ fclose($closed);
+
$context = array(
'bool' => true,
'null' => null,
@@ -110,6 +114,7 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
'nested' => array('with object' => new DummyTest),
'object' => new \DateTime,
'resource' => fopen('php://memory', 'r'),
+ 'closed' => $closed,
);
$this->getLogger()->warning('Crazy context data', $context);
@@ -131,10 +136,3 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expected, $this->getLogs());
}
}
-
-class DummyTest
-{
- public function __toString()
- {
- }
-}
diff --git a/vendor/psr/log/Psr/Log/Test/TestLogger.php b/vendor/psr/log/Psr/Log/Test/TestLogger.php
new file mode 100644
index 0000000..1be3230
--- /dev/null
+++ b/vendor/psr/log/Psr/Log/Test/TestLogger.php
@@ -0,0 +1,147 @@
+<?php
+
+namespace Psr\Log\Test;
+
+use Psr\Log\AbstractLogger;
+
+/**
+ * Used for testing purposes.
+ *
+ * It records all records and gives you access to them for verification.
+ *
+ * @method bool hasEmergency($record)
+ * @method bool hasAlert($record)
+ * @method bool hasCritical($record)
+ * @method bool hasError($record)
+ * @method bool hasWarning($record)
+ * @method bool hasNotice($record)
+ * @method bool hasInfo($record)
+ * @method bool hasDebug($record)
+ *
+ * @method bool hasEmergencyRecords()
+ * @method bool hasAlertRecords()
+ * @method bool hasCriticalRecords()
+ * @method bool hasErrorRecords()
+ * @method bool hasWarningRecords()
+ * @method bool hasNoticeRecords()
+ * @method bool hasInfoRecords()
+ * @method bool hasDebugRecords()
+ *
+ * @method bool hasEmergencyThatContains($message)
+ * @method bool hasAlertThatContains($message)
+ * @method bool hasCriticalThatContains($message)
+ * @method bool hasErrorThatContains($message)
+ * @method bool hasWarningThatContains($message)
+ * @method bool hasNoticeThatContains($message)
+ * @method bool hasInfoThatContains($message)
+ * @method bool hasDebugThatContains($message)
+ *
+ * @method bool hasEmergencyThatMatches($message)
+ * @method bool hasAlertThatMatches($message)
+ * @method bool hasCriticalThatMatches($message)
+ * @method bool hasErrorThatMatches($message)
+ * @method bool hasWarningThatMatches($message)
+ * @method bool hasNoticeThatMatches($message)
+ * @method bool hasInfoThatMatches($message)
+ * @method bool hasDebugThatMatches($message)
+ *
+ * @method bool hasEmergencyThatPasses($message)
+ * @method bool hasAlertThatPasses($message)
+ * @method bool hasCriticalThatPasses($message)
+ * @method bool hasErrorThatPasses($message)
+ * @method bool hasWarningThatPasses($message)
+ * @method bool hasNoticeThatPasses($message)
+ * @method bool hasInfoThatPasses($message)
+ * @method bool hasDebugThatPasses($message)
+ */
+class TestLogger extends AbstractLogger
+{
+ /**
+ * @var array
+ */
+ public $records = [];
+
+ public $recordsByLevel = [];
+
+ /**
+ * @inheritdoc
+ */
+ public function log($level, $message, array $context = [])
+ {
+ $record = [
+ 'level' => $level,
+ 'message' => $message,
+ 'context' => $context,
+ ];
+
+ $this->recordsByLevel[$record['level']][] = $record;
+ $this->records[] = $record;
+ }
+
+ public function hasRecords($level)
+ {
+ return isset($this->recordsByLevel[$level]);
+ }
+
+ public function hasRecord($record, $level)
+ {
+ if (is_string($record)) {
+ $record = ['message' => $record];
+ }
+ return $this->hasRecordThatPasses(function ($rec) use ($record) {
+ if ($rec['message'] !== $record['message']) {
+ return false;
+ }
+ if (isset($record['context']) && $rec['context'] !== $record['context']) {
+ return false;
+ }
+ return true;
+ }, $level);
+ }
+
+ public function hasRecordThatContains($message, $level)
+ {
+ return $this->hasRecordThatPasses(function ($rec) use ($message) {
+ return strpos($rec['message'], $message) !== false;
+ }, $level);
+ }
+
+ public function hasRecordThatMatches($regex, $level)
+ {
+ return $this->hasRecordThatPasses(function ($rec) use ($regex) {
+ return preg_match($regex, $rec['message']) > 0;
+ }, $level);
+ }
+
+ public function hasRecordThatPasses(callable $predicate, $level)
+ {
+ if (!isset($this->recordsByLevel[$level])) {
+ return false;
+ }
+ foreach ($this->recordsByLevel[$level] as $i => $rec) {
+ if (call_user_func($predicate, $rec, $i)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public function __call($method, $args)
+ {
+ if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
+ $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
+ $level = strtolower($matches[2]);
+ if (method_exists($this, $genericMethod)) {
+ $args[] = $level;
+ return call_user_func_array([$this, $genericMethod], $args);
+ }
+ }
+ throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
+ }
+
+ public function reset()
+ {
+ $this->records = [];
+ $this->recordsByLevel = [];
+ }
+}
diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md
index 574bc1c..a9f20c4 100644
--- a/vendor/psr/log/README.md
+++ b/vendor/psr/log/README.md
@@ -7,6 +7,13 @@ This repository holds all interfaces/classes/traits related to
Note that this is not a logger of its own. It is merely an interface that
describes a logger. See the specification for more details.
+Installation
+------------
+
+```bash
+composer require psr/log
+```
+
Usage
-----
@@ -31,6 +38,12 @@ class Foo
if ($this->logger) {
$this->logger->info('Doing work');
}
+
+ try {
+ $this->doSomethingElse();
+ } catch (Exception $exception) {
+ $this->logger->error('Oh no!', array('exception' => $exception));
+ }
// do something useful
}
diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json
index 87934d7..ca05695 100644
--- a/vendor/psr/log/composer.json
+++ b/vendor/psr/log/composer.json
@@ -7,7 +7,7 @@
"authors": [
{
"name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
+ "homepage": "https://www.php-fig.org/"
}
],
"require": {
@@ -20,7 +20,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
}
}
diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php
index 38f38e2..1021a90 100644
--- a/vendor/symfony/console/Application.php
+++ b/vendor/symfony/console/Application.php
@@ -11,32 +11,41 @@
namespace Symfony\Component\Console;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Command\HelpCommand;
+use Symfony\Component\Console\Command\ListCommand;
+use Symfony\Component\Console\CommandLoader\CommandLoaderInterface;
+use Symfony\Component\Console\Event\ConsoleCommandEvent;
+use Symfony\Component\Console\Event\ConsoleErrorEvent;
+use Symfony\Component\Console\Event\ConsoleTerminateEvent;
+use Symfony\Component\Console\Exception\CommandNotFoundException;
use Symfony\Component\Console\Exception\ExceptionInterface;
+use Symfony\Component\Console\Exception\LogicException;
+use Symfony\Component\Console\Exception\NamespaceNotFoundException;
+use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\DebugFormatterHelper;
+use Symfony\Component\Console\Helper\FormatterHelper;
+use Symfony\Component\Console\Helper\Helper;
+use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Helper\ProcessHelper;
use Symfony\Component\Console\Helper\QuestionHelper;
-use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputAwareInterface;
-use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Input\InputDefinition;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Command\HelpCommand;
-use Symfony\Component\Console\Command\ListCommand;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Helper\FormatterHelper;
-use Symfony\Component\Console\Event\ConsoleCommandEvent;
-use Symfony\Component\Console\Event\ConsoleExceptionEvent;
-use Symfony\Component\Console\Event\ConsoleTerminateEvent;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
-use Symfony\Component\Console\Exception\LogicException;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Style\SymfonyStyle;
+use Symfony\Component\Debug\ErrorHandler as LegacyErrorHandler;
use Symfony\Component\Debug\Exception\FatalThrowableError;
+use Symfony\Component\ErrorHandler\ErrorHandler;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
+use Symfony\Contracts\Service\ResetInterface;
/**
* An Application is the container for a collection of commands.
@@ -53,57 +62,63 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
-class Application
+class Application implements ResetInterface
{
- private $commands = array();
+ private $commands = [];
private $wantHelps = false;
private $runningCommand;
private $name;
private $version;
+ private $commandLoader;
private $catchExceptions = true;
private $autoExit = true;
private $definition;
private $helperSet;
private $dispatcher;
- private $terminalDimensions;
+ private $terminal;
private $defaultCommand;
+ private $singleCommand = false;
+ private $initialized;
/**
- * Constructor.
- *
* @param string $name The name of the application
* @param string $version The version of the application
*/
- public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
+ public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN')
{
$this->name = $name;
$this->version = $version;
+ $this->terminal = new Terminal();
$this->defaultCommand = 'list';
- $this->helperSet = $this->getDefaultHelperSet();
- $this->definition = $this->getDefaultInputDefinition();
-
- foreach ($this->getDefaultCommands() as $command) {
- $this->add($command);
- }
}
+ /**
+ * @final since Symfony 4.3, the type-hint will be updated to the interface from symfony/contracts in 5.0
+ */
public function setDispatcher(EventDispatcherInterface $dispatcher)
{
- $this->dispatcher = $dispatcher;
+ $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
+ }
+
+ public function setCommandLoader(CommandLoaderInterface $commandLoader)
+ {
+ $this->commandLoader = $commandLoader;
}
/**
* Runs the current application.
*
- * @param InputInterface $input An Input instance
- * @param OutputInterface $output An Output instance
- *
* @return int 0 if everything went fine, or an error code
*
- * @throws \Exception When doRun returns Exception
+ * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}.
*/
public function run(InputInterface $input = null, OutputInterface $output = null)
{
+ if (\function_exists('putenv')) {
+ @putenv('LINES='.$this->terminal->getHeight());
+ @putenv('COLUMNS='.$this->terminal->getWidth());
+ }
+
if (null === $input) {
$input = new ArgvInput();
}
@@ -112,6 +127,22 @@ class Application
$output = new ConsoleOutput();
}
+ $renderException = function (\Throwable $e) use ($output) {
+ if ($output instanceof ConsoleOutputInterface) {
+ $this->renderThrowable($e, $output->getErrorOutput());
+ } else {
+ $this->renderThrowable($e, $output);
+ }
+ };
+ if ($phpHandler = set_exception_handler($renderException)) {
+ restore_exception_handler();
+ if (!\is_array($phpHandler) || (!$phpHandler[0] instanceof ErrorHandler && !$phpHandler[0] instanceof LegacyErrorHandler)) {
+ $errorHandler = true;
+ } elseif ($errorHandler = $phpHandler[0]->setExceptionHandler($renderException)) {
+ $phpHandler[0]->setExceptionHandler($errorHandler);
+ }
+ }
+
$this->configureIO($input, $output);
try {
@@ -121,21 +152,31 @@ class Application
throw $e;
}
- if ($output instanceof ConsoleOutputInterface) {
- $this->renderException($e, $output->getErrorOutput());
- } else {
- $this->renderException($e, $output);
- }
+ $renderException($e);
$exitCode = $e->getCode();
if (is_numeric($exitCode)) {
$exitCode = (int) $exitCode;
- if (0 === $exitCode) {
+ if ($exitCode <= 0) {
$exitCode = 1;
}
} else {
$exitCode = 1;
}
+ } finally {
+ // if the exception handler changed, keep it
+ // otherwise, unregister $renderException
+ if (!$phpHandler) {
+ if (set_exception_handler($renderException) === $renderException) {
+ restore_exception_handler();
+ }
+ restore_exception_handler();
+ } elseif (!$errorHandler) {
+ $finalHandler = $phpHandler[0]->setExceptionHandler(null);
+ if ($finalHandler !== $renderException) {
+ $phpHandler[0]->setExceptionHandler($finalHandler);
+ }
+ }
}
if ($this->autoExit) {
@@ -152,24 +193,28 @@ class Application
/**
* Runs the current application.
*
- * @param InputInterface $input An Input instance
- * @param OutputInterface $output An Output instance
- *
* @return int 0 if everything went fine, or an error code
*/
public function doRun(InputInterface $input, OutputInterface $output)
{
- if (true === $input->hasParameterOption(array('--version', '-V'), true)) {
+ if (true === $input->hasParameterOption(['--version', '-V'], true)) {
$output->writeln($this->getLongVersion());
return 0;
}
+ try {
+ // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument.
+ $input->bind($this->getDefinition());
+ } catch (ExceptionInterface $e) {
+ // Errors must be ignored, full binding/validation happens later when the command is known.
+ }
+
$name = $this->getCommandName($input);
- if (true === $input->hasParameterOption(array('--help', '-h'), true)) {
+ if (true === $input->hasParameterOption(['--help', '-h'], true)) {
if (!$name) {
$name = 'help';
- $input = new ArrayInput(array('command' => 'help'));
+ $input = new ArrayInput(['command_name' => $this->defaultCommand]);
} else {
$this->wantHelps = true;
}
@@ -177,11 +222,52 @@ class Application
if (!$name) {
$name = $this->defaultCommand;
- $input = new ArrayInput(array('command' => $this->defaultCommand));
+ $definition = $this->getDefinition();
+ $definition->setArguments(array_merge(
+ $definition->getArguments(),
+ [
+ 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name),
+ ]
+ ));
}
- // the command name MUST be the first element of the input
- $command = $this->find($name);
+ try {
+ $this->runningCommand = null;
+ // the command name MUST be the first element of the input
+ $command = $this->find($name);
+ } catch (\Throwable $e) {
+ if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) {
+ if (null !== $this->dispatcher) {
+ $event = new ConsoleErrorEvent($input, $output, $e);
+ $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
+
+ if (0 === $event->getExitCode()) {
+ return 0;
+ }
+
+ $e = $event->getError();
+ }
+
+ throw $e;
+ }
+
+ $alternative = $alternatives[0];
+
+ $style = new SymfonyStyle($input, $output);
+ $style->block(sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error');
+ if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) {
+ if (null !== $this->dispatcher) {
+ $event = new ConsoleErrorEvent($input, $output, $e);
+ $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
+
+ return $event->getExitCode();
+ }
+
+ return 1;
+ }
+
+ $command = $this->find($alternative);
+ }
$this->runningCommand = $command;
$exitCode = $this->doRunCommand($command, $input, $output);
@@ -191,10 +277,12 @@ class Application
}
/**
- * Set a helper set to be used with the command.
- *
- * @param HelperSet $helperSet The helper set
+ * {@inheritdoc}
*/
+ public function reset()
+ {
+ }
+
public function setHelperSet(HelperSet $helperSet)
{
$this->helperSet = $helperSet;
@@ -207,14 +295,13 @@ class Application
*/
public function getHelperSet()
{
+ if (!$this->helperSet) {
+ $this->helperSet = $this->getDefaultHelperSet();
+ }
+
return $this->helperSet;
}
- /**
- * Set an input definition to be used with this application.
- *
- * @param InputDefinition $definition The input definition
- */
public function setDefinition(InputDefinition $definition)
{
$this->definition = $definition;
@@ -227,6 +314,17 @@ class Application
*/
public function getDefinition()
{
+ if (!$this->definition) {
+ $this->definition = $this->getDefaultInputDefinition();
+ }
+
+ if ($this->singleCommand) {
+ $inputDefinition = $this->definition;
+ $inputDefinition->setArguments();
+
+ return $inputDefinition;
+ }
+
return $this->definition;
}
@@ -329,13 +427,13 @@ class Application
{
if ('UNKNOWN' !== $this->getName()) {
if ('UNKNOWN' !== $this->getVersion()) {
- return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
+ return sprintf('%s <info>%s</info>', $this->getName(), $this->getVersion());
}
- return sprintf('<info>%s</info>', $this->getName());
+ return $this->getName();
}
- return '<info>Console Tool</info>';
+ return 'Console Tool';
}
/**
@@ -370,22 +468,25 @@ class Application
* If a command with the same name already exists, it will be overridden.
* If the command is not enabled it will not be added.
*
- * @param Command $command A Command object
- *
* @return Command|null The registered command if enabled or null
*/
public function add(Command $command)
{
+ $this->init();
+
$command->setApplication($this);
if (!$command->isEnabled()) {
$command->setApplication(null);
- return;
+ return null;
}
- if (null === $command->getDefinition()) {
- throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command)));
+ // Will throw if the command is not correctly initialized.
+ $command->getDefinition();
+
+ if (!$command->getName()) {
+ throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command)));
}
$this->commands[$command->getName()] = $command;
@@ -404,14 +505,21 @@ class Application
*
* @return Command A Command object
*
- * @throws CommandNotFoundException When command name given does not exist
+ * @throws CommandNotFoundException When given command name does not exist
*/
public function get($name)
{
- if (!isset($this->commands[$name])) {
+ $this->init();
+
+ if (!$this->has($name)) {
throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
}
+ // When the command has a different name than the one used at the command loader level
+ if (!isset($this->commands[$name])) {
+ throw new CommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
+ }
+
$command = $this->commands[$name];
if ($this->wantHelps) {
@@ -435,7 +543,9 @@ class Application
*/
public function has($name)
{
- return isset($this->commands[$name]);
+ $this->init();
+
+ return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name)));
}
/**
@@ -447,8 +557,12 @@ class Application
*/
public function getNamespaces()
{
- $namespaces = array();
+ $namespaces = [];
foreach ($this->all() as $command) {
+ if ($command->isHidden()) {
+ continue;
+ }
+
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName()));
foreach ($command->getAliases() as $alias) {
@@ -466,7 +580,7 @@ class Application
*
* @return string A registered namespace
*
- * @throws CommandNotFoundException When namespace is incorrect or ambiguous
+ * @throws NamespaceNotFoundException When namespace is incorrect or ambiguous
*/
public function findNamespace($namespace)
{
@@ -478,7 +592,7 @@ class Application
$message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
- if (1 == count($alternatives)) {
+ if (1 == \count($alternatives)) {
$message .= "\n\nDid you mean this?\n ";
} else {
$message .= "\n\nDid you mean one of these?\n ";
@@ -487,12 +601,12 @@ class Application
$message .= implode("\n ", $alternatives);
}
- throw new CommandNotFoundException($message, $alternatives);
+ throw new NamespaceNotFoundException($message, $alternatives);
}
- $exact = in_array($namespace, $namespaces, true);
- if (count($namespaces) > 1 && !$exact) {
- throw new CommandNotFoundException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
+ $exact = \in_array($namespace, $namespaces, true);
+ if (\count($namespaces) > 1 && !$exact) {
+ throw new NamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
}
return $exact ? $namespace : reset($namespaces);
@@ -512,11 +626,32 @@ class Application
*/
public function find($name)
{
- $allCommands = array_keys($this->commands);
+ $this->init();
+
+ $aliases = [];
+
+ foreach ($this->commands as $command) {
+ foreach ($command->getAliases() as $alias) {
+ if (!$this->has($alias)) {
+ $this->commands[$alias] = $command;
+ }
+ }
+ }
+
+ if ($this->has($name)) {
+ return $this->get($name);
+ }
+
+ $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands);
$expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name);
$commands = preg_grep('{^'.$expr.'}', $allCommands);
- if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) {
+ if (empty($commands)) {
+ $commands = preg_grep('{^'.$expr.'}i', $allCommands);
+ }
+
+ // if no commands matched or we just matched namespaces
+ if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
if (false !== $pos = strrpos($name, ':')) {
// check if a namespace exists and contains commands
$this->findNamespace(substr($name, 0, $pos));
@@ -525,7 +660,12 @@ class Application
$message = sprintf('Command "%s" is not defined.', $name);
if ($alternatives = $this->findAlternatives($name, $allCommands)) {
- if (1 == count($alternatives)) {
+ // remove hidden commands
+ $alternatives = array_filter($alternatives, function ($name) {
+ return !$this->get($name)->isHidden();
+ });
+
+ if (1 == \count($alternatives)) {
$message .= "\n\nDid you mean this?\n ";
} else {
$message .= "\n\nDid you mean one of these?\n ";
@@ -533,27 +673,58 @@ class Application
$message .= implode("\n ", $alternatives);
}
- throw new CommandNotFoundException($message, $alternatives);
+ throw new CommandNotFoundException($message, array_values($alternatives));
}
// filter out aliases for commands which are already on the list
- if (count($commands) > 1) {
- $commandList = $this->commands;
- $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) {
+ if (\count($commands) > 1) {
+ $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands;
+ $commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) {
+ if (!$commandList[$nameOrAlias] instanceof Command) {
+ $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias);
+ }
+
$commandName = $commandList[$nameOrAlias]->getName();
- return $commandName === $nameOrAlias || !in_array($commandName, $commands);
- });
+ $aliases[$nameOrAlias] = $commandName;
+
+ return $commandName === $nameOrAlias || !\in_array($commandName, $commands);
+ }));
+ }
+
+ if (\count($commands) > 1) {
+ $usableWidth = $this->terminal->getWidth() - 10;
+ $abbrevs = array_values($commands);
+ $maxLen = 0;
+ foreach ($abbrevs as $abbrev) {
+ $maxLen = max(Helper::strlen($abbrev), $maxLen);
+ }
+ $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen, &$commands) {
+ if ($commandList[$cmd]->isHidden()) {
+ unset($commands[array_search($cmd, $commands)]);
+
+ return false;
+ }
+
+ $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription();
+
+ return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev;
+ }, array_values($commands));
+
+ if (\count($commands) > 1) {
+ $suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs));
+
+ throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
+ }
}
- $exact = in_array($name, $commands, true);
- if (count($commands) > 1 && !$exact) {
- $suggestions = $this->getAbbreviationSuggestions(array_values($commands));
+ $command = $this->get(reset($commands));
- throw new CommandNotFoundException(sprintf('Command "%s" is ambiguous (%s).', $name, $suggestions), array_values($commands));
+ if ($command->isHidden()) {
+ @trigger_error(sprintf('Command "%s" is hidden, finding it using an abbreviation is deprecated since Symfony 4.4, use its full name instead.', $command->getName()), \E_USER_DEPRECATED);
}
- return $this->get($exact ? $name : reset($commands));
+ return $command;
}
/**
@@ -567,17 +738,38 @@ class Application
*/
public function all($namespace = null)
{
+ $this->init();
+
if (null === $namespace) {
- return $this->commands;
+ if (!$this->commandLoader) {
+ return $this->commands;
+ }
+
+ $commands = $this->commands;
+ foreach ($this->commandLoader->getNames() as $name) {
+ if (!isset($commands[$name]) && $this->has($name)) {
+ $commands[$name] = $this->get($name);
+ }
+ }
+
+ return $commands;
}
- $commands = array();
+ $commands = [];
foreach ($this->commands as $name => $command) {
if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) {
$commands[$name] = $command;
}
}
+ if ($this->commandLoader) {
+ foreach ($this->commandLoader->getNames() as $name) {
+ if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) {
+ $commands[$name] = $this->get($name);
+ }
+ }
+ }
+
return $commands;
}
@@ -590,9 +782,9 @@ class Application
*/
public static function getAbbreviations($names)
{
- $abbrevs = array();
+ $abbrevs = [];
foreach ($names as $name) {
- for ($len = strlen($name); $len > 0; --$len) {
+ for ($len = \strlen($name); $len > 0; --$len) {
$abbrev = substr($name, 0, $len);
$abbrevs[$abbrev][] = $name;
}
@@ -604,194 +796,197 @@ class Application
/**
* Renders a caught exception.
*
- * @param \Exception $e An exception instance
- * @param OutputInterface $output An OutputInterface instance
+ * @deprecated since Symfony 4.4, use "renderThrowable()" instead
*/
public function renderException(\Exception $e, OutputInterface $output)
{
+ @trigger_error(sprintf('The "%s::renderException()" method is deprecated since Symfony 4.4, use "renderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED);
+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
- do {
- $title = sprintf(
- ' [%s%s] ',
- get_class($e),
- $output->isVerbose() && 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''
- );
-
- $len = $this->stringWidth($title);
-
- $width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX;
- // HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327
- if (defined('HHVM_VERSION') && $width > 1 << 31) {
- $width = 1 << 31;
- }
- $formatter = $output->getFormatter();
- $lines = array();
- foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) {
- foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
- // pre-format lines to get the right string length
- $lineLength = $this->stringWidth(preg_replace('/\[[^m]*m/', '', $formatter->format($line))) + 4;
- $lines[] = array($line, $lineLength);
+ $this->doRenderException($e, $output);
- $len = max($lineLength, $len);
- }
- }
+ $this->finishRenderThrowableOrException($output);
+ }
- $messages = array();
- $messages[] = $emptyLine = $formatter->format(sprintf('<error>%s</error>', str_repeat(' ', $len)));
- $messages[] = $formatter->format(sprintf('<error>%s%s</error>', $title, str_repeat(' ', max(0, $len - $this->stringWidth($title)))));
- foreach ($lines as $line) {
- $messages[] = $formatter->format(sprintf('<error> %s %s</error>', $line[0], str_repeat(' ', $len - $line[1])));
+ public function renderThrowable(\Throwable $e, OutputInterface $output): void
+ {
+ if (__CLASS__ !== static::class && __CLASS__ === (new \ReflectionMethod($this, 'renderThrowable'))->getDeclaringClass()->getName() && __CLASS__ !== (new \ReflectionMethod($this, 'renderException'))->getDeclaringClass()->getName()) {
+ @trigger_error(sprintf('The "%s::renderException()" method is deprecated since Symfony 4.4, use "renderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED);
+
+ if (!$e instanceof \Exception) {
+ $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine());
}
- $messages[] = $emptyLine;
- $messages[] = '';
- $output->writeln($messages, OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_QUIET);
+ $this->renderException($e, $output);
- if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
- $output->writeln('<comment>Exception trace:</comment>', OutputInterface::VERBOSITY_QUIET);
+ return;
+ }
- // exception related properties
- $trace = $e->getTrace();
- array_unshift($trace, array(
- 'function' => '',
- 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a',
- 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a',
- 'args' => array(),
- ));
-
- for ($i = 0, $count = count($trace); $i < $count; ++$i) {
- $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
- $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
- $function = $trace[$i]['function'];
- $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a';
- $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a';
-
- $output->writeln(sprintf(' %s%s%s() at <info>%s:%s</info>', $class, $type, $function, $file, $line), OutputInterface::VERBOSITY_QUIET);
- }
+ $output->writeln('', OutputInterface::VERBOSITY_QUIET);
- $output->writeln('', OutputInterface::VERBOSITY_QUIET);
- }
- } while ($e = $e->getPrevious());
+ $this->doRenderThrowable($e, $output);
+ $this->finishRenderThrowableOrException($output);
+ }
+
+ private function finishRenderThrowableOrException(OutputInterface $output): void
+ {
if (null !== $this->runningCommand) {
- $output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET);
+ $output->writeln(sprintf('<info>%s</info>', OutputFormatter::escape(sprintf($this->runningCommand->getSynopsis(), $this->getName()))), OutputInterface::VERBOSITY_QUIET);
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
}
}
/**
- * Tries to figure out the terminal width in which this application runs.
- *
- * @return int|null
+ * @deprecated since Symfony 4.4, use "doRenderThrowable()" instead
*/
- protected function getTerminalWidth()
+ protected function doRenderException(\Exception $e, OutputInterface $output)
{
- $dimensions = $this->getTerminalDimensions();
+ @trigger_error(sprintf('The "%s::doRenderException()" method is deprecated since Symfony 4.4, use "doRenderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED);
- return $dimensions[0];
+ $this->doActuallyRenderThrowable($e, $output);
}
- /**
- * Tries to figure out the terminal height in which this application runs.
- *
- * @return int|null
- */
- protected function getTerminalHeight()
+ protected function doRenderThrowable(\Throwable $e, OutputInterface $output): void
{
- $dimensions = $this->getTerminalDimensions();
+ if (__CLASS__ !== static::class && __CLASS__ === (new \ReflectionMethod($this, 'doRenderThrowable'))->getDeclaringClass()->getName() && __CLASS__ !== (new \ReflectionMethod($this, 'doRenderException'))->getDeclaringClass()->getName()) {
+ @trigger_error(sprintf('The "%s::doRenderException()" method is deprecated since Symfony 4.4, use "doRenderThrowable()" instead.', __CLASS__), \E_USER_DEPRECATED);
+
+ if (!$e instanceof \Exception) {
+ $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine());
+ }
+
+ $this->doRenderException($e, $output);
+
+ return;
+ }
- return $dimensions[1];
+ $this->doActuallyRenderThrowable($e, $output);
}
- /**
- * Tries to figure out the terminal dimensions based on the current environment.
- *
- * @return array Array containing width and height
- */
- public function getTerminalDimensions()
+ private function doActuallyRenderThrowable(\Throwable $e, OutputInterface $output): void
{
- if ($this->terminalDimensions) {
- return $this->terminalDimensions;
- }
+ do {
+ $message = trim($e->getMessage());
+ if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
+ $class = get_debug_type($e);
+ $title = sprintf(' [%s%s] ', $class, 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : '');
+ $len = Helper::strlen($title);
+ } else {
+ $len = 0;
+ }
- if ('\\' === DIRECTORY_SEPARATOR) {
- // extract [w, H] from "wxh (WxH)"
- if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) {
- return array((int) $matches[1], (int) $matches[2]);
+ if (str_contains($message, "@anonymous\0")) {
+ $message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
+ return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
+ }, $message);
}
- // extract [w, h] from "wxh"
- if (preg_match('/^(\d+)x(\d+)$/', $this->getConsoleMode(), $matches)) {
- return array((int) $matches[1], (int) $matches[2]);
+
+ $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX;
+ $lines = [];
+ foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) {
+ foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
+ // pre-format lines to get the right string length
+ $lineLength = Helper::strlen($line) + 4;
+ $lines[] = [$line, $lineLength];
+
+ $len = max($lineLength, $len);
+ }
}
- }
- if ($sttyString = $this->getSttyColumns()) {
- // extract [w, h] from "rows h; columns w;"
- if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) {
- return array((int) $matches[2], (int) $matches[1]);
+ $messages = [];
+ if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
+ $messages[] = sprintf('<comment>%s</comment>', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a')));
}
- // extract [w, h] from "; h rows; w columns"
- if (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) {
- return array((int) $matches[2], (int) $matches[1]);
+ $messages[] = $emptyLine = sprintf('<error>%s</error>', str_repeat(' ', $len));
+ if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
+ $messages[] = sprintf('<error>%s%s</error>', $title, str_repeat(' ', max(0, $len - Helper::strlen($title))));
}
- }
+ foreach ($lines as $line) {
+ $messages[] = sprintf('<error> %s %s</error>', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1]));
+ }
+ $messages[] = $emptyLine;
+ $messages[] = '';
- return array(null, null);
- }
+ $output->writeln($messages, OutputInterface::VERBOSITY_QUIET);
- /**
- * Sets terminal dimensions.
- *
- * Can be useful to force terminal dimensions for functional tests.
- *
- * @param int $width The width
- * @param int $height The height
- *
- * @return Application The current application
- */
- public function setTerminalDimensions($width, $height)
- {
- $this->terminalDimensions = array($width, $height);
+ if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
+ $output->writeln('<comment>Exception trace:</comment>', OutputInterface::VERBOSITY_QUIET);
- return $this;
+ // exception related properties
+ $trace = $e->getTrace();
+
+ array_unshift($trace, [
+ 'function' => '',
+ 'file' => $e->getFile() ?: 'n/a',
+ 'line' => $e->getLine() ?: 'n/a',
+ 'args' => [],
+ ]);
+
+ for ($i = 0, $count = \count($trace); $i < $count; ++$i) {
+ $class = $trace[$i]['class'] ?? '';
+ $type = $trace[$i]['type'] ?? '';
+ $function = $trace[$i]['function'] ?? '';
+ $file = $trace[$i]['file'] ?? 'n/a';
+ $line = $trace[$i]['line'] ?? 'n/a';
+
+ $output->writeln(sprintf(' %s%s at <info>%s:%s</info>', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET);
+ }
+
+ $output->writeln('', OutputInterface::VERBOSITY_QUIET);
+ }
+ } while ($e = $e->getPrevious());
}
/**
* Configures the input and output instances based on the user arguments and options.
- *
- * @param InputInterface $input An InputInterface instance
- * @param OutputInterface $output An OutputInterface instance
*/
protected function configureIO(InputInterface $input, OutputInterface $output)
{
- if (true === $input->hasParameterOption(array('--ansi'), true)) {
+ if (true === $input->hasParameterOption(['--ansi'], true)) {
$output->setDecorated(true);
- } elseif (true === $input->hasParameterOption(array('--no-ansi'), true)) {
+ } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) {
$output->setDecorated(false);
}
- if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) {
+ if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) {
$input->setInteractive(false);
- } elseif (function_exists('posix_isatty') && $this->getHelperSet()->has('question')) {
- $inputStream = $this->getHelperSet()->get('question')->getInputStream();
- if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) {
- $input->setInteractive(false);
- }
}
- if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) {
+ switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
+ case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break;
+ case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break;
+ case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break;
+ case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break;
+ default: $shellVerbosity = 0; break;
+ }
+
+ if (true === $input->hasParameterOption(['--quiet', '-q'], true)) {
$output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
- $input->setInteractive(false);
+ $shellVerbosity = -1;
} else {
- if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || $input->getParameterOption('--verbose', false, true) === 3) {
+ if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) {
$output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
- } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || $input->getParameterOption('--verbose', false, true) === 2) {
+ $shellVerbosity = 3;
+ } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) {
$output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
+ $shellVerbosity = 2;
} elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) {
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
+ $shellVerbosity = 1;
}
}
+
+ if (-1 === $shellVerbosity) {
+ $input->setInteractive(false);
+ }
+
+ if (\function_exists('putenv')) {
+ @putenv('SHELL_VERBOSITY='.$shellVerbosity);
+ }
+ $_ENV['SHELL_VERBOSITY'] = $shellVerbosity;
+ $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity;
}
/**
@@ -800,13 +995,7 @@ class Application
* If an event dispatcher has been attached to the application,
* events are also dispatched during the life-cycle of the command.
*
- * @param Command $command A Command instance
- * @param InputInterface $input An Input instance
- * @param OutputInterface $output An Output instance
- *
* @return int 0 if everything went fine, or an error code
- *
- * @throws \Exception when the command being run threw an exception
*/
protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
{
@@ -829,36 +1018,32 @@ class Application
}
$event = new ConsoleCommandEvent($command, $input, $output);
- $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event);
+ $e = null;
- if ($event->commandShouldRun()) {
- try {
- $e = null;
+ try {
+ $this->dispatcher->dispatch($event, ConsoleEvents::COMMAND);
+
+ if ($event->commandShouldRun()) {
$exitCode = $command->run($input, $output);
- } catch (\Exception $x) {
- $e = $x;
- } catch (\Throwable $x) {
- $e = new FatalThrowableError($x);
+ } else {
+ $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED;
}
- if (null !== $e) {
- $event = new ConsoleExceptionEvent($command, $input, $output, $e, $e->getCode());
- $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event);
+ } catch (\Throwable $e) {
+ $event = new ConsoleErrorEvent($input, $output, $e, $command);
+ $this->dispatcher->dispatch($event, ConsoleEvents::ERROR);
+ $e = $event->getError();
- if ($e !== $event->getException()) {
- $x = $e = $event->getException();
- }
-
- $event = new ConsoleTerminateEvent($command, $input, $output, $e->getCode());
- $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event);
-
- throw $x;
+ if (0 === $exitCode = $event->getExitCode()) {
+ $e = null;
}
- } else {
- $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED;
}
$event = new ConsoleTerminateEvent($command, $input, $output, $exitCode);
- $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event);
+ $this->dispatcher->dispatch($event, ConsoleEvents::TERMINATE);
+
+ if (null !== $e) {
+ throw $e;
+ }
return $event->getExitCode();
}
@@ -866,13 +1051,11 @@ class Application
/**
* Gets the name of the command based on input.
*
- * @param InputInterface $input The input interface
- *
- * @return string The command name
+ * @return string|null
*/
protected function getCommandName(InputInterface $input)
{
- return $input->getFirstArgument();
+ return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument();
}
/**
@@ -882,7 +1065,7 @@ class Application
*/
protected function getDefaultInputDefinition()
{
- return new InputDefinition(array(
+ return new InputDefinition([
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
@@ -892,7 +1075,7 @@ class Application
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
- ));
+ ]);
}
/**
@@ -902,7 +1085,7 @@ class Application
*/
protected function getDefaultCommands()
{
- return array(new HelpCommand(), new ListCommand());
+ return [new HelpCommand(), new ListCommand()];
}
/**
@@ -912,72 +1095,20 @@ class Application
*/
protected function getDefaultHelperSet()
{
- return new HelperSet(array(
+ return new HelperSet([
new FormatterHelper(),
new DebugFormatterHelper(),
new ProcessHelper(),
new QuestionHelper(),
- ));
- }
-
- /**
- * Runs and parses stty -a if it's available, suppressing any error output.
- *
- * @return string
- */
- private function getSttyColumns()
- {
- if (!function_exists('proc_open')) {
- return;
- }
-
- $descriptorspec = array(1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
- $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
- if (is_resource($process)) {
- $info = stream_get_contents($pipes[1]);
- fclose($pipes[1]);
- fclose($pipes[2]);
- proc_close($process);
-
- return $info;
- }
- }
-
- /**
- * Runs and parses mode CON if it's available, suppressing any error output.
- *
- * @return string|null <width>x<height> or null if it could not be parsed
- */
- private function getConsoleMode()
- {
- if (!function_exists('proc_open')) {
- return;
- }
-
- $descriptorspec = array(1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
- $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
- if (is_resource($process)) {
- $info = stream_get_contents($pipes[1]);
- fclose($pipes[1]);
- fclose($pipes[2]);
- proc_close($process);
-
- if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) {
- return $matches[2].'x'.$matches[1];
- }
- }
+ ]);
}
/**
* Returns abbreviated suggestions in string format.
- *
- * @param array $abbrevs Abbreviated suggestions to convert
- *
- * @return string A formatted string of abbreviated suggestions
*/
- private function getAbbreviationSuggestions($abbrevs)
+ private function getAbbreviationSuggestions(array $abbrevs): string
{
- return sprintf('%s, %s%s', $abbrevs[0], $abbrevs[1], count($abbrevs) > 2 ? sprintf(' and %d more', count($abbrevs) - 2) : '');
+ return ' '.implode("\n ", $abbrevs);
}
/**
@@ -992,27 +1123,23 @@ class Application
*/
public function extractNamespace($name, $limit = null)
{
- $parts = explode(':', $name);
- array_pop($parts);
+ $parts = explode(':', $name, -1);
- return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit));
+ return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit));
}
/**
* Finds alternative of $name among $collection,
* if nothing is found in $collection, try in $abbrevs.
*
- * @param string $name The string
- * @param array|\Traversable $collection The collection
- *
* @return string[] A sorted array of similar string
*/
- private function findAlternatives($name, $collection)
+ private function findAlternatives(string $name, iterable $collection): array
{
$threshold = 1e3;
- $alternatives = array();
+ $alternatives = [];
- $collectionParts = array();
+ $collectionParts = [];
foreach ($collection as $item) {
$collectionParts[$item] = explode(':', $item);
}
@@ -1028,7 +1155,7 @@ class Application
}
$lev = levenshtein($subname, $parts[$i]);
- if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) {
+ if ($lev <= \strlen($subname) / 3 || '' !== $subname && str_contains($parts[$i], $subname)) {
$alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev;
} elseif ($exists) {
$alternatives[$collectionName] += $threshold;
@@ -1038,13 +1165,13 @@ class Application
foreach ($collection as $item) {
$lev = levenshtein($name, $item);
- if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) {
+ if ($lev <= \strlen($name) / 3 || str_contains($item, $name)) {
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
}
}
$alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
- asort($alternatives);
+ ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE);
return array_keys($alternatives);
}
@@ -1052,23 +1179,34 @@ class Application
/**
* Sets the default Command name.
*
- * @param string $commandName The Command name
+ * @param string $commandName The Command name
+ * @param bool $isSingleCommand Set to true if there is only one command in this application
+ *
+ * @return self
*/
- public function setDefaultCommand($commandName)
+ public function setDefaultCommand($commandName, $isSingleCommand = false)
{
$this->defaultCommand = $commandName;
- }
- private function stringWidth($string)
- {
- if (false === $encoding = mb_detect_encoding($string, null, true)) {
- return strlen($string);
+ if ($isSingleCommand) {
+ // Ensure the command exist
+ $this->find($commandName);
+
+ $this->singleCommand = true;
}
- return mb_strwidth($string, $encoding);
+ return $this;
+ }
+
+ /**
+ * @internal
+ */
+ public function isSingleCommand(): bool
+ {
+ return $this->singleCommand;
}
- private function splitStringByWidth($string, $width)
+ private function splitStringByWidth(string $string, int $width): array
{
// str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
// additionally, array_slice() is not enough as some character has doubled width.
@@ -1078,22 +1216,27 @@ class Application
}
$utf8String = mb_convert_encoding($string, 'utf8', $encoding);
- $lines = array();
+ $lines = [];
$line = '';
- foreach (preg_split('//u', $utf8String) as $char) {
- // test if $char could be appended to current line
- if (mb_strwidth($line.$char, 'utf8') <= $width) {
- $line .= $char;
- continue;
+
+ $offset = 0;
+ while (preg_match('/.{1,10000}/u', $utf8String, $m, 0, $offset)) {
+ $offset += \strlen($m[0]);
+
+ foreach (preg_split('//u', $m[0]) as $char) {
+ // test if $char could be appended to current line
+ if (mb_strwidth($line.$char, 'utf8') <= $width) {
+ $line .= $char;
+ continue;
+ }
+ // if not, push current line to array and make new line
+ $lines[] = str_pad($line, $width);
+ $line = $char;
}
- // if not, push current line to array and make new line
- $lines[] = str_pad($line, $width);
- $line = $char;
- }
- if ('' !== $line) {
- $lines[] = count($lines) ? str_pad($line, $width) : $line;
}
+ $lines[] = \count($lines) ? str_pad($line, $width) : $line;
+
mb_convert_variables($encoding, 'utf8', $lines);
return $lines;
@@ -1102,18 +1245,16 @@ class Application
/**
* Returns all namespaces of the command name.
*
- * @param string $name The full name of the command
- *
* @return string[] The namespaces of the command
*/
- private function extractAllNamespaces($name)
+ private function extractAllNamespaces(string $name): array
{
// -1 as third argument is needed to skip the command short name when exploding
$parts = explode(':', $name, -1);
- $namespaces = array();
+ $namespaces = [];
foreach ($parts as $part) {
- if (count($namespaces)) {
+ if (\count($namespaces)) {
$namespaces[] = end($namespaces).':'.$part;
} else {
$namespaces[] = $part;
@@ -1122,4 +1263,16 @@ class Application
return $namespaces;
}
+
+ private function init()
+ {
+ if ($this->initialized) {
+ return;
+ }
+ $this->initialized = true;
+
+ foreach ($this->getDefaultCommands() as $command) {
+ $this->add($command);
+ }
+ }
}
diff --git a/vendor/symfony/console/CHANGELOG.md b/vendor/symfony/console/CHANGELOG.md
index df37640..5159244 100644
--- a/vendor/symfony/console/CHANGELOG.md
+++ b/vendor/symfony/console/CHANGELOG.md
@@ -1,11 +1,94 @@
CHANGELOG
=========
+4.4.0
+-----
+
+ * deprecated finding hidden commands using an abbreviation, use the full name instead
+ * added `Question::setTrimmable` default to true to allow the answer to be trimmed
+ * added method `minSecondsBetweenRedraws()` and `maxSecondsBetweenRedraws()` on `ProgressBar`
+ * `Application` implements `ResetInterface`
+ * marked all dispatched event classes as `@final`
+ * added support for displaying table horizontally
+ * deprecated returning `null` from `Command::execute()`, return `0` instead
+ * Deprecated the `Application::renderException()` and `Application::doRenderException()` methods,
+ use `renderThrowable()` and `doRenderThrowable()` instead.
+ * added support for the `NO_COLOR` env var (https://no-color.org/)
+
+4.3.0
+-----
+
+ * added support for hyperlinks
+ * added `ProgressBar::iterate()` method that simplify updating the progress bar when iterating
+ * added `Question::setAutocompleterCallback()` to provide a callback function
+ that dynamically generates suggestions as the user types
+
+4.2.0
+-----
+
+ * allowed passing commands as `[$process, 'ENV_VAR' => 'value']` to
+ `ProcessHelper::run()` to pass environment variables
+ * deprecated passing a command as a string to `ProcessHelper::run()`,
+ pass it the command as an array of its arguments instead
+ * made the `ProcessHelper` class final
+ * added `WrappableOutputFormatterInterface::formatAndWrap()` (implemented in `OutputFormatter`)
+ * added `capture_stderr_separately` option to `CommandTester::execute()`
+
+4.1.0
+-----
+
+ * added option to run suggested command if command is not found and only 1 alternative is available
+ * added option to modify console output and print multiple modifiable sections
+ * added support for iterable messages in output `write` and `writeln` methods
+
+4.0.0
+-----
+
+ * `OutputFormatter` throws an exception when unknown options are used
+ * removed `QuestionHelper::setInputStream()/getInputStream()`
+ * removed `Application::getTerminalWidth()/getTerminalHeight()` and
+ `Application::setTerminalDimensions()/getTerminalDimensions()`
+ * removed `ConsoleExceptionEvent`
+ * removed `ConsoleEvents::EXCEPTION`
+
+3.4.0
+-----
+
+ * added `SHELL_VERBOSITY` env var to control verbosity
+ * added `CommandLoaderInterface`, `FactoryCommandLoader` and PSR-11
+ `ContainerCommandLoader` for commands lazy-loading
+ * added a case-insensitive command name matching fallback
+ * added static `Command::$defaultName/getDefaultName()`, allowing for
+ commands to be registered at compile time in the application command loader.
+ Setting the `$defaultName` property avoids the need for filling the `command`
+ attribute on the `console.command` tag when using `AddConsoleCommandPass`.
+
+3.3.0
+-----
+
+ * added `ExceptionListener`
+ * added `AddConsoleCommandPass` (originally in FrameworkBundle)
+ * [BC BREAK] `Input::getOption()` no longer returns the default value for options
+ with value optional explicitly passed empty
+ * added console.error event to catch exceptions thrown by other listeners
+ * deprecated console.exception event in favor of console.error
+ * added ability to handle `CommandNotFoundException` through the
+ `console.error` event
+ * deprecated default validation in `SymfonyQuestionHelper::ask`
+
+3.2.0
+------
+
+ * added `setInputs()` method to CommandTester for ease testing of commands expecting inputs
+ * added `setStream()` and `getStream()` methods to Input (implement StreamableInputInterface)
+ * added StreamableInputInterface
+ * added LockableTrait
+
3.1.0
-----
* added truncate method to FormatterHelper
- * added setColumnWidth(s) method to Table
+ * added setColumnWidth(s) method to Table
2.8.3
-----
diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php
index 0d5001b..da9b9f6 100644
--- a/vendor/symfony/console/Command/Command.php
+++ b/vendor/symfony/console/Command/Command.php
@@ -11,16 +11,16 @@
namespace Symfony\Component\Console\Command;
+use Symfony\Component\Console\Application;
use Symfony\Component\Console\Exception\ExceptionInterface;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Exception\LogicException;
+use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Helper\HelperSet;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\LogicException;
/**
* Base class for all commands.
@@ -29,41 +29,52 @@ use Symfony\Component\Console\Exception\LogicException;
*/
class Command
{
+ /**
+ * @var string|null The default command name
+ */
+ protected static $defaultName;
+
private $application;
private $name;
private $processTitle;
- private $aliases = array();
+ private $aliases = [];
private $definition;
- private $help;
- private $description;
+ private $hidden = false;
+ private $help = '';
+ private $description = '';
private $ignoreValidationErrors = false;
private $applicationDefinitionMerged = false;
private $applicationDefinitionMergedWithArgs = false;
private $code;
- private $synopsis = array();
- private $usages = array();
+ private $synopsis = [];
+ private $usages = [];
private $helperSet;
/**
- * Constructor.
- *
+ * @return string|null The default command name or null when no default name is set
+ */
+ public static function getDefaultName()
+ {
+ $class = static::class;
+ $r = new \ReflectionProperty($class, 'defaultName');
+
+ return $class === $r->class ? static::$defaultName : null;
+ }
+
+ /**
* @param string|null $name The name of the command; passing null means it must be set in configure()
*
* @throws LogicException When the command name is empty
*/
- public function __construct($name = null)
+ public function __construct(string $name = null)
{
$this->definition = new InputDefinition();
- if (null !== $name) {
+ if (null !== $name || null !== $name = static::getDefaultName()) {
$this->setName($name);
}
$this->configure();
-
- if (!$this->name) {
- throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this)));
- }
}
/**
@@ -76,11 +87,6 @@ class Command
$this->ignoreValidationErrors = true;
}
- /**
- * Sets the application instance for this command.
- *
- * @param Application $application An Application instance
- */
public function setApplication(Application $application = null)
{
$this->application = $application;
@@ -91,11 +97,6 @@ class Command
}
}
- /**
- * Sets the helper set.
- *
- * @param HelperSet $helperSet A HelperSet instance
- */
public function setHelperSet(HelperSet $helperSet)
{
$this->helperSet = $helperSet;
@@ -104,7 +105,7 @@ class Command
/**
* Gets the helper set.
*
- * @return HelperSet A HelperSet instance
+ * @return HelperSet|null A HelperSet instance
*/
public function getHelperSet()
{
@@ -114,7 +115,7 @@ class Command
/**
* Gets the application instance for this command.
*
- * @return Application An Application instance
+ * @return Application|null An Application instance
*/
public function getApplication()
{
@@ -149,10 +150,7 @@ class Command
* execute() method, you set the code to execute by passing
* a Closure to the setCode() method.
*
- * @param InputInterface $input An InputInterface instance
- * @param OutputInterface $output An OutputInterface instance
- *
- * @return null|int null or 0 if everything went fine, or an error code
+ * @return int 0 if everything went fine, or an exit code
*
* @throws LogicException When this abstract method is not implemented
*
@@ -169,22 +167,20 @@ class Command
* This method is executed before the InputDefinition is validated.
* This means that this is the only place where the command can
* interactively ask for values of missing required arguments.
- *
- * @param InputInterface $input An InputInterface instance
- * @param OutputInterface $output An OutputInterface instance
*/
protected function interact(InputInterface $input, OutputInterface $output)
{
}
/**
- * Initializes the command just after the input has been validated.
+ * Initializes the command after the input has been bound and before the input
+ * is validated.
*
* This is mainly useful when a lot of commands extends one main command
* where some things need to be initialized based on the input arguments and options.
*
- * @param InputInterface $input An InputInterface instance
- * @param OutputInterface $output An OutputInterface instance
+ * @see InputInterface::bind()
+ * @see InputInterface::validate()
*/
protected function initialize(InputInterface $input, OutputInterface $output)
{
@@ -197,12 +193,9 @@ class Command
* setCode() method or by overriding the execute() method
* in a sub-class.
*
- * @param InputInterface $input An InputInterface instance
- * @param OutputInterface $output An OutputInterface instance
- *
* @return int The command exit code
*
- * @throws \Exception
+ * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}.
*
* @see setCode()
* @see execute()
@@ -228,9 +221,15 @@ class Command
$this->initialize($input, $output);
if (null !== $this->processTitle) {
- if (function_exists('cli_set_process_title')) {
- cli_set_process_title($this->processTitle);
- } elseif (function_exists('setproctitle')) {
+ if (\function_exists('cli_set_process_title')) {
+ if (!@cli_set_process_title($this->processTitle)) {
+ if ('Darwin' === \PHP_OS) {
+ $output->writeln('<comment>Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.</comment>', OutputInterface::VERBOSITY_VERY_VERBOSE);
+ } else {
+ cli_set_process_title($this->processTitle);
+ }
+ }
+ } elseif (\function_exists('setproctitle')) {
setproctitle($this->processTitle);
} elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) {
$output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>');
@@ -251,9 +250,13 @@ class Command
$input->validate();
if ($this->code) {
- $statusCode = call_user_func($this->code, $input, $output);
+ $statusCode = ($this->code)($input, $output);
} else {
$statusCode = $this->execute($input, $output);
+
+ if (!\is_int($statusCode)) {
+ @trigger_error(sprintf('Return value of "%s::execute()" should always be of the type int since Symfony 4.4, %s returned.', static::class, \gettype($statusCode)), \E_USER_DEPRECATED);
+ }
}
return is_numeric($statusCode) ? (int) $statusCode : 0;
@@ -267,7 +270,7 @@ class Command
*
* @param callable $code A callable(InputInterface $input, OutputInterface $output)
*
- * @return Command The current instance
+ * @return $this
*
* @throws InvalidArgumentException
*
@@ -278,7 +281,14 @@ class Command
if ($code instanceof \Closure) {
$r = new \ReflectionFunction($code);
if (null === $r->getClosureThis()) {
- $code = \Closure::bind($code, $this);
+ set_error_handler(static function () {});
+ try {
+ if ($c = \Closure::bind($code, $this)) {
+ $code = $c;
+ }
+ } finally {
+ restore_error_handler();
+ }
}
}
@@ -302,14 +312,13 @@ class Command
$this->definition->addOptions($this->application->getDefinition()->getOptions());
+ $this->applicationDefinitionMerged = true;
+
if ($mergeArgs) {
$currentArguments = $this->definition->getArguments();
$this->definition->setArguments($this->application->getDefinition()->getArguments());
$this->definition->addArguments($currentArguments);
- }
- $this->applicationDefinitionMerged = true;
- if ($mergeArgs) {
$this->applicationDefinitionMergedWithArgs = true;
}
}
@@ -319,7 +328,7 @@ class Command
*
* @param array|InputDefinition $definition An array of argument and option instances or a definition instance
*
- * @return Command The current instance
+ * @return $this
*/
public function setDefinition($definition)
{
@@ -341,6 +350,10 @@ class Command
*/
public function getDefinition()
{
+ if (null === $this->definition) {
+ throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
+ }
+
return $this->definition;
}
@@ -362,12 +375,14 @@ class Command
/**
* Adds an argument.
*
- * @param string $name The argument name
- * @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
- * @param string $description A description text
- * @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
+ * @param string $name The argument name
+ * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
+ * @param string $description A description text
+ * @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
*
- * @return Command The current instance
+ * @throws InvalidArgumentException When argument mode is not valid
+ *
+ * @return $this
*/
public function addArgument($name, $mode = null, $description = '', $default = null)
{
@@ -379,13 +394,15 @@ class Command
/**
* Adds an option.
*
- * @param string $name The option name
- * @param string $shortcut The shortcut (can be null)
- * @param int $mode The option mode: One of the InputOption::VALUE_* constants
- * @param string $description A description text
- * @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
+ * @param string $name The option name
+ * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
+ * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
+ * @param string $description A description text
+ * @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
+ *
+ * @throws InvalidArgumentException If option mode is invalid or incompatible
*
- * @return Command The current instance
+ * @return $this
*/
public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
{
@@ -404,7 +421,7 @@ class Command
*
* @param string $name The command name
*
- * @return Command The current instance
+ * @return $this
*
* @throws InvalidArgumentException When the name is invalid
*/
@@ -423,11 +440,9 @@ class Command
* This feature should be used only when creating a long process command,
* like a daemon.
*
- * PHP 5.5+ or the proctitle PECL library is required
- *
* @param string $title The process title
*
- * @return Command The current instance
+ * @return $this
*/
public function setProcessTitle($title)
{
@@ -439,7 +454,7 @@ class Command
/**
* Returns the command name.
*
- * @return string The command name
+ * @return string|null
*/
public function getName()
{
@@ -447,11 +462,31 @@ class Command
}
/**
+ * @param bool $hidden Whether or not the command should be hidden from the list of commands
+ *
+ * @return $this
+ */
+ public function setHidden($hidden)
+ {
+ $this->hidden = (bool) $hidden;
+
+ return $this;
+ }
+
+ /**
+ * @return bool whether the command should be publicly shown or not
+ */
+ public function isHidden()
+ {
+ return $this->hidden;
+ }
+
+ /**
* Sets the description for the command.
*
* @param string $description The description for the command
*
- * @return Command The current instance
+ * @return $this
*/
public function setDescription($description)
{
@@ -475,7 +510,7 @@ class Command
*
* @param string $help The help for the command
*
- * @return Command The current instance
+ * @return $this
*/
public function setHelp($help)
{
@@ -503,15 +538,16 @@ class Command
public function getProcessedHelp()
{
$name = $this->name;
+ $isSingleCommand = $this->application && $this->application->isSingleCommand();
- $placeholders = array(
+ $placeholders = [
'%command.name%',
'%command.full_name%',
- );
- $replacements = array(
+ ];
+ $replacements = [
$name,
- $_SERVER['PHP_SELF'].' '.$name,
- );
+ $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name,
+ ];
return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());
}
@@ -521,14 +557,14 @@ class Command
*
* @param string[] $aliases An array of aliases for the command
*
- * @return Command The current instance
+ * @return $this
*
* @throws InvalidArgumentException When an alias is invalid
*/
public function setAliases($aliases)
{
- if (!is_array($aliases) && !$aliases instanceof \Traversable) {
- throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable');
+ if (!\is_array($aliases) && !$aliases instanceof \Traversable) {
+ throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable.');
}
foreach ($aliases as $alias) {
@@ -573,11 +609,11 @@ class Command
*
* @param string $usage The usage, it'll be prefixed with the command name
*
- * @return Command The current instance
+ * @return $this
*/
public function addUsage($usage)
{
- if (0 !== strpos($usage, $this->name)) {
+ if (!str_starts_with($usage, $this->name)) {
$usage = sprintf('%s %s', $this->name, $usage);
}
@@ -620,11 +656,9 @@ class Command
*
* It must be non-empty and parts can optionally be separated by ":".
*
- * @param string $name
- *
* @throws InvalidArgumentException When the name is invalid
*/
- private function validateName($name)
+ private function validateName(string $name)
{
if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) {
throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name));
diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php
index b8fd911..cece782 100644
--- a/vendor/symfony/console/Command/HelpCommand.php
+++ b/vendor/symfony/console/Command/HelpCommand.php
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Command;
use Symfony\Component\Console\Helper\DescriptorHelper;
use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
@@ -35,12 +35,12 @@ class HelpCommand extends Command
$this
->setName('help')
- ->setDefinition(array(
+ ->setDefinition([
new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
- ))
- ->setDescription('Displays help for a command')
+ ])
+ ->setDescription('Display help for a command')
->setHelp(<<<'EOF'
The <info>%command.name%</info> command displays help for a given command:
@@ -56,11 +56,6 @@ EOF
;
}
- /**
- * Sets the command.
- *
- * @param Command $command The command to set
- */
public function setCommand(Command $command)
{
$this->command = $command;
@@ -76,11 +71,13 @@ EOF
}
$helper = new DescriptorHelper();
- $helper->describe($output, $this->command, array(
+ $helper->describe($output, $this->command, [
'format' => $input->getOption('format'),
'raw_text' => $input->getOption('raw'),
- ));
+ ]);
$this->command = null;
+
+ return 0;
}
}
diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php
index 179ddea..44324a5 100644
--- a/vendor/symfony/console/Command/ListCommand.php
+++ b/vendor/symfony/console/Command/ListCommand.php
@@ -13,10 +13,10 @@ namespace Symfony\Component\Console\Command;
use Symfony\Component\Console\Helper\DescriptorHelper;
use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Input\InputDefinition;
/**
* ListCommand displays the list of all available commands for the application.
@@ -33,7 +33,7 @@ class ListCommand extends Command
$this
->setName('list')
->setDefinition($this->createDefinition())
- ->setDescription('Lists commands')
+ ->setDescription('List commands')
->setHelp(<<<'EOF'
The <info>%command.name%</info> command lists all commands:
@@ -69,22 +69,21 @@ EOF
protected function execute(InputInterface $input, OutputInterface $output)
{
$helper = new DescriptorHelper();
- $helper->describe($output, $this->getApplication(), array(
+ $helper->describe($output, $this->getApplication(), [
'format' => $input->getOption('format'),
'raw_text' => $input->getOption('raw'),
'namespace' => $input->getArgument('namespace'),
- ));
+ ]);
+
+ return 0;
}
- /**
- * {@inheritdoc}
- */
- private function createDefinition()
+ private function createDefinition(): InputDefinition
{
- return new InputDefinition(array(
+ return new InputDefinition([
new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
- ));
+ ]);
}
}
diff --git a/vendor/symfony/console/Command/LockableTrait.php b/vendor/symfony/console/Command/LockableTrait.php
new file mode 100644
index 0000000..60cfe36
--- /dev/null
+++ b/vendor/symfony/console/Command/LockableTrait.php
@@ -0,0 +1,69 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Command;
+
+use Symfony\Component\Console\Exception\LogicException;
+use Symfony\Component\Lock\Lock;
+use Symfony\Component\Lock\LockFactory;
+use Symfony\Component\Lock\Store\FlockStore;
+use Symfony\Component\Lock\Store\SemaphoreStore;
+
+/**
+ * Basic lock feature for commands.
+ *
+ * @author Geoffrey Brier <geoffrey.brier@gmail.com>
+ */
+trait LockableTrait
+{
+ /** @var Lock */
+ private $lock;
+
+ /**
+ * Locks a command.
+ */
+ private function lock(string $name = null, bool $blocking = false): bool
+ {
+ if (!class_exists(SemaphoreStore::class)) {
+ throw new LogicException('To enable the locking feature you must install the symfony/lock component.');
+ }
+
+ if (null !== $this->lock) {
+ throw new LogicException('A lock is already in place.');
+ }
+
+ if (SemaphoreStore::isSupported()) {
+ $store = new SemaphoreStore();
+ } else {
+ $store = new FlockStore();
+ }
+
+ $this->lock = (new LockFactory($store))->createLock($name ?: $this->getName());
+ if (!$this->lock->acquire($blocking)) {
+ $this->lock = null;
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Releases the command lock if there is one.
+ */
+ private function release()
+ {
+ if ($this->lock) {
+ $this->lock->release();
+ $this->lock = null;
+ }
+ }
+}
diff --git a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
new file mode 100644
index 0000000..ca1029c
--- /dev/null
+++ b/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
@@ -0,0 +1,46 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\CommandLoader;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Exception\CommandNotFoundException;
+
+/**
+ * @author Robin Chalas <robin.chalas@gmail.com>
+ */
+interface CommandLoaderInterface
+{
+ /**
+ * Loads a command.
+ *
+ * @param string $name
+ *
+ * @return Command
+ *
+ * @throws CommandNotFoundException
+ */
+ public function get($name);
+
+ /**
+ * Checks if a command exists.
+ *
+ * @param string $name
+ *
+ * @return bool
+ */
+ public function has($name);
+
+ /**
+ * @return string[] All registered command names
+ */
+ public function getNames();
+}
diff --git a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
new file mode 100644
index 0000000..50e5950
--- /dev/null
+++ b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php
@@ -0,0 +1,63 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\CommandLoader;
+
+use Psr\Container\ContainerInterface;
+use Symfony\Component\Console\Exception\CommandNotFoundException;
+
+/**
+ * Loads commands from a PSR-11 container.
+ *
+ * @author Robin Chalas <robin.chalas@gmail.com>
+ */
+class ContainerCommandLoader implements CommandLoaderInterface
+{
+ private $container;
+ private $commandMap;
+
+ /**
+ * @param array $commandMap An array with command names as keys and service ids as values
+ */
+ public function __construct(ContainerInterface $container, array $commandMap)
+ {
+ $this->container = $container;
+ $this->commandMap = $commandMap;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get($name)
+ {
+ if (!$this->has($name)) {
+ throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
+ }
+
+ return $this->container->get($this->commandMap[$name]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function has($name)
+ {
+ return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNames()
+ {
+ return array_keys($this->commandMap);
+ }
+}
diff --git a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
new file mode 100644
index 0000000..d9c2055
--- /dev/null
+++ b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php
@@ -0,0 +1,62 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\CommandLoader;
+
+use Symfony\Component\Console\Exception\CommandNotFoundException;
+
+/**
+ * A simple command loader using factories to instantiate commands lazily.
+ *
+ * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
+ */
+class FactoryCommandLoader implements CommandLoaderInterface
+{
+ private $factories;
+
+ /**
+ * @param callable[] $factories Indexed by command names
+ */
+ public function __construct(array $factories)
+ {
+ $this->factories = $factories;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function has($name)
+ {
+ return isset($this->factories[$name]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get($name)
+ {
+ if (!isset($this->factories[$name])) {
+ throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
+ }
+
+ $factory = $this->factories[$name];
+
+ return $factory();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNames()
+ {
+ return array_keys($this->factories);
+ }
+}
diff --git a/vendor/symfony/console/ConsoleEvents.php b/vendor/symfony/console/ConsoleEvents.php
index b3571e9..99b423c 100644
--- a/vendor/symfony/console/ConsoleEvents.php
+++ b/vendor/symfony/console/ConsoleEvents.php
@@ -21,33 +21,27 @@ final class ConsoleEvents
/**
* The COMMAND event allows you to attach listeners before any command is
* executed by the console. It also allows you to modify the command, input and output
- * before they are handled to the command.
+ * before they are handed to the command.
*
* @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
- *
- * @var string
*/
- const COMMAND = 'console.command';
+ public const COMMAND = 'console.command';
/**
* The TERMINATE event allows you to attach listeners after a command is
* executed by the console.
*
* @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
- *
- * @var string
*/
- const TERMINATE = 'console.terminate';
+ public const TERMINATE = 'console.terminate';
/**
- * The EXCEPTION event occurs when an uncaught exception appears.
+ * The ERROR event occurs when an uncaught exception or error appears.
*
- * This event allows you to deal with the exception or
+ * This event allows you to deal with the exception/error or
* to modify the thrown exception.
*
- * @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent")
- *
- * @var string
+ * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent")
*/
- const EXCEPTION = 'console.exception';
+ public const ERROR = 'console.error';
}
diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
new file mode 100644
index 0000000..aff892c
--- /dev/null
+++ b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php
@@ -0,0 +1,98 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\DependencyInjection;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\CommandLoader\ContainerCommandLoader;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\TypedReference;
+
+/**
+ * Registers console commands.
+ *
+ * @author Grégoire Pineau <lyrixx@lyrixx.info>
+ */
+class AddConsoleCommandPass implements CompilerPassInterface
+{
+ private $commandLoaderServiceId;
+ private $commandTag;
+
+ public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command')
+ {
+ $this->commandLoaderServiceId = $commandLoaderServiceId;
+ $this->commandTag = $commandTag;
+ }
+
+ public function process(ContainerBuilder $container)
+ {
+ $commandServices = $container->findTaggedServiceIds($this->commandTag, true);
+ $lazyCommandMap = [];
+ $lazyCommandRefs = [];
+ $serviceIds = [];
+
+ foreach ($commandServices as $id => $tags) {
+ $definition = $container->getDefinition($id);
+ $class = $container->getParameterBag()->resolveValue($definition->getClass());
+
+ if (isset($tags[0]['command'])) {
+ $commandName = $tags[0]['command'];
+ } else {
+ if (!$r = $container->getReflectionClass($class)) {
+ throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
+ }
+ if (!$r->isSubclassOf(Command::class)) {
+ throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class));
+ }
+ $commandName = $class::getDefaultName() !== null ? str_replace('%', '%%', $class::getDefaultName()) : null;
+ }
+
+ if (null === $commandName) {
+ if (!$definition->isPublic() || $definition->isPrivate()) {
+ $commandId = 'console.command.public_alias.'.$id;
+ $container->setAlias($commandId, $id)->setPublic(true);
+ $id = $commandId;
+ }
+ $serviceIds[] = $id;
+
+ continue;
+ }
+
+ unset($tags[0]);
+ $lazyCommandMap[$commandName] = $id;
+ $lazyCommandRefs[$id] = new TypedReference($id, $class);
+ $aliases = [];
+
+ foreach ($tags as $tag) {
+ if (isset($tag['command'])) {
+ $aliases[] = $tag['command'];
+ $lazyCommandMap[$tag['command']] = $id;
+ }
+ }
+
+ $definition->addMethodCall('setName', [$commandName]);
+
+ if ($aliases) {
+ $definition->addMethodCall('setAliases', [$aliases]);
+ }
+ }
+
+ $container
+ ->register($this->commandLoaderServiceId, ContainerCommandLoader::class)
+ ->setPublic(true)
+ ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]);
+
+ $container->setParameter('console.command.ids', $serviceIds);
+ }
+}
diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php
index 89961b9..3970b90 100644
--- a/vendor/symfony/console/Descriptor/ApplicationDescription.php
+++ b/vendor/symfony/console/Descriptor/ApplicationDescription.php
@@ -22,17 +22,11 @@ use Symfony\Component\Console\Exception\CommandNotFoundException;
*/
class ApplicationDescription
{
- const GLOBAL_NAMESPACE = '_global';
+ public const GLOBAL_NAMESPACE = '_global';
- /**
- * @var Application
- */
private $application;
-
- /**
- * @var null|string
- */
private $namespace;
+ private $showHidden;
/**
* @var array
@@ -49,22 +43,14 @@ class ApplicationDescription
*/
private $aliases;
- /**
- * Constructor.
- *
- * @param Application $application
- * @param string|null $namespace
- */
- public function __construct(Application $application, $namespace = null)
+ public function __construct(Application $application, string $namespace = null, bool $showHidden = false)
{
$this->application = $application;
$this->namespace = $namespace;
+ $this->showHidden = $showHidden;
}
- /**
- * @return array
- */
- public function getNamespaces()
+ public function getNamespaces(): array
{
if (null === $this->namespaces) {
$this->inspectApplication();
@@ -76,7 +62,7 @@ class ApplicationDescription
/**
* @return Command[]
*/
- public function getCommands()
+ public function getCommands(): array
{
if (null === $this->commands) {
$this->inspectApplication();
@@ -86,33 +72,29 @@ class ApplicationDescription
}
/**
- * @param string $name
- *
- * @return Command
- *
* @throws CommandNotFoundException
*/
- public function getCommand($name)
+ public function getCommand(string $name): Command
{
if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) {
- throw new CommandNotFoundException(sprintf('Command %s does not exist.', $name));
+ throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
}
- return isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name];
+ return $this->commands[$name] ?? $this->aliases[$name];
}
private function inspectApplication()
{
- $this->commands = array();
- $this->namespaces = array();
+ $this->commands = [];
+ $this->namespaces = [];
$all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null);
foreach ($this->sortCommands($all) as $namespace => $commands) {
- $names = array();
+ $names = [];
/** @var Command $command */
foreach ($commands as $name => $command) {
- if (!$command->getName()) {
+ if (!$command->getName() || (!$this->showHidden && $command->isHidden())) {
continue;
}
@@ -125,36 +107,37 @@ class ApplicationDescription
$names[] = $name;
}
- $this->namespaces[$namespace] = array('id' => $namespace, 'commands' => $names);
+ $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names];
}
}
- /**
- * @param array $commands
- *
- * @return array
- */
- private function sortCommands(array $commands)
+ private function sortCommands(array $commands): array
{
- $namespacedCommands = array();
- $globalCommands = array();
+ $namespacedCommands = [];
+ $globalCommands = [];
+ $sortedCommands = [];
foreach ($commands as $name => $command) {
$key = $this->application->extractNamespace($name, 1);
- if (!$key) {
- $globalCommands['_global'][$name] = $command;
+ if (\in_array($key, ['', self::GLOBAL_NAMESPACE], true)) {
+ $globalCommands[$name] = $command;
} else {
$namespacedCommands[$key][$name] = $command;
}
}
- ksort($namespacedCommands);
- $namespacedCommands = array_merge($globalCommands, $namespacedCommands);
- foreach ($namespacedCommands as &$commandsSet) {
- ksort($commandsSet);
+ if ($globalCommands) {
+ ksort($globalCommands);
+ $sortedCommands[self::GLOBAL_NAMESPACE] = $globalCommands;
+ }
+
+ if ($namespacedCommands) {
+ ksort($namespacedCommands);
+ foreach ($namespacedCommands as $key => $commandsSet) {
+ ksort($commandsSet);
+ $sortedCommands[$key] = $commandsSet;
+ }
}
- // unset reference to keep scope clear
- unset($commandsSet);
- return $namespacedCommands;
+ return $sortedCommands;
}
}
diff --git a/vendor/symfony/console/Descriptor/Descriptor.php b/vendor/symfony/console/Descriptor/Descriptor.php
index 50dd86c..9c3878d 100644
--- a/vendor/symfony/console/Descriptor/Descriptor.php
+++ b/vendor/symfony/console/Descriptor/Descriptor.php
@@ -13,11 +13,11 @@ namespace Symfony\Component\Console\Descriptor;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
/**
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
@@ -34,7 +34,7 @@ abstract class Descriptor implements DescriptorInterface
/**
* {@inheritdoc}
*/
- public function describe(OutputInterface $output, $object, array $options = array())
+ public function describe(OutputInterface $output, $object, array $options = [])
{
$this->output = $output;
@@ -55,7 +55,7 @@ abstract class Descriptor implements DescriptorInterface
$this->describeApplication($object, $options);
break;
default:
- throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object)));
+ throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', \get_class($object)));
}
}
@@ -72,51 +72,26 @@ abstract class Descriptor implements DescriptorInterface
/**
* Describes an InputArgument instance.
- *
- * @param InputArgument $argument
- * @param array $options
- *
- * @return string|mixed
*/
- abstract protected function describeInputArgument(InputArgument $argument, array $options = array());
+ abstract protected function describeInputArgument(InputArgument $argument, array $options = []);
/**
* Describes an InputOption instance.
- *
- * @param InputOption $option
- * @param array $options
- *
- * @return string|mixed
*/
- abstract protected function describeInputOption(InputOption $option, array $options = array());
+ abstract protected function describeInputOption(InputOption $option, array $options = []);
/**
* Describes an InputDefinition instance.
- *
- * @param InputDefinition $definition
- * @param array $options
- *
- * @return string|mixed
*/
- abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array());
+ abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);
/**
* Describes a Command instance.
- *
- * @param Command $command
- * @param array $options
- *
- * @return string|mixed
*/
- abstract protected function describeCommand(Command $command, array $options = array());
+ abstract protected function describeCommand(Command $command, array $options = []);
/**
* Describes an Application instance.
- *
- * @param Application $application
- * @param array $options
- *
- * @return string|mixed
*/
- abstract protected function describeApplication(Application $application, array $options = array());
+ abstract protected function describeApplication(Application $application, array $options = []);
}
diff --git a/vendor/symfony/console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Descriptor/DescriptorInterface.php
index 3929b6d..e3184a6 100644
--- a/vendor/symfony/console/Descriptor/DescriptorInterface.php
+++ b/vendor/symfony/console/Descriptor/DescriptorInterface.php
@@ -21,11 +21,9 @@ use Symfony\Component\Console\Output\OutputInterface;
interface DescriptorInterface
{
/**
- * Describes an InputArgument instance.
+ * Describes an object if supported.
*
- * @param OutputInterface $output
- * @param object $object
- * @param array $options
+ * @param object $object
*/
- public function describe(OutputInterface $output, $object, array $options = array());
+ public function describe(OutputInterface $output, $object, array $options = []);
}
diff --git a/vendor/symfony/console/Descriptor/JsonDescriptor.php b/vendor/symfony/console/Descriptor/JsonDescriptor.php
index 87e38fd..4c09e12 100644
--- a/vendor/symfony/console/Descriptor/JsonDescriptor.php
+++ b/vendor/symfony/console/Descriptor/JsonDescriptor.php
@@ -29,7 +29,7 @@ class JsonDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputArgument(InputArgument $argument, array $options = array())
+ protected function describeInputArgument(InputArgument $argument, array $options = [])
{
$this->writeData($this->getInputArgumentData($argument), $options);
}
@@ -37,7 +37,7 @@ class JsonDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputOption(InputOption $option, array $options = array())
+ protected function describeInputOption(InputOption $option, array $options = [])
{
$this->writeData($this->getInputOptionData($option), $options);
}
@@ -45,7 +45,7 @@ class JsonDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputDefinition(InputDefinition $definition, array $options = array())
+ protected function describeInputDefinition(InputDefinition $definition, array $options = [])
{
$this->writeData($this->getInputDefinitionData($definition), $options);
}
@@ -53,7 +53,7 @@ class JsonDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeCommand(Command $command, array $options = array())
+ protected function describeCommand(Command $command, array $options = [])
{
$this->writeData($this->getCommandData($command), $options);
}
@@ -61,106 +61,96 @@ class JsonDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeApplication(Application $application, array $options = array())
+ protected function describeApplication(Application $application, array $options = [])
{
- $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
- $description = new ApplicationDescription($application, $describedNamespace);
- $commands = array();
+ $describedNamespace = $options['namespace'] ?? null;
+ $description = new ApplicationDescription($application, $describedNamespace, true);
+ $commands = [];
foreach ($description->getCommands() as $command) {
$commands[] = $this->getCommandData($command);
}
- $data = $describedNamespace
- ? array('commands' => $commands, 'namespace' => $describedNamespace)
- : array('commands' => $commands, 'namespaces' => array_values($description->getNamespaces()));
+ $data = [];
+ if ('UNKNOWN' !== $application->getName()) {
+ $data['application']['name'] = $application->getName();
+ if ('UNKNOWN' !== $application->getVersion()) {
+ $data['application']['version'] = $application->getVersion();
+ }
+ }
+
+ $data['commands'] = $commands;
+
+ if ($describedNamespace) {
+ $data['namespace'] = $describedNamespace;
+ } else {
+ $data['namespaces'] = array_values($description->getNamespaces());
+ }
$this->writeData($data, $options);
}
/**
* Writes data as json.
- *
- * @param array $data
- * @param array $options
- *
- * @return array|string
*/
private function writeData(array $data, array $options)
{
- $this->write(json_encode($data, isset($options['json_encoding']) ? $options['json_encoding'] : 0));
+ $flags = $options['json_encoding'] ?? 0;
+
+ $this->write(json_encode($data, $flags));
}
- /**
- * @param InputArgument $argument
- *
- * @return array
- */
- private function getInputArgumentData(InputArgument $argument)
+ private function getInputArgumentData(InputArgument $argument): array
{
- return array(
+ return [
'name' => $argument->getName(),
'is_required' => $argument->isRequired(),
'is_array' => $argument->isArray(),
'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()),
- 'default' => $argument->getDefault(),
- );
+ 'default' => \INF === $argument->getDefault() ? 'INF' : $argument->getDefault(),
+ ];
}
- /**
- * @param InputOption $option
- *
- * @return array
- */
- private function getInputOptionData(InputOption $option)
+ private function getInputOptionData(InputOption $option): array
{
- return array(
+ return [
'name' => '--'.$option->getName(),
- 'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
+ 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '',
'accept_value' => $option->acceptValue(),
'is_value_required' => $option->isValueRequired(),
'is_multiple' => $option->isArray(),
'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()),
- 'default' => $option->getDefault(),
- );
+ 'default' => \INF === $option->getDefault() ? 'INF' : $option->getDefault(),
+ ];
}
- /**
- * @param InputDefinition $definition
- *
- * @return array
- */
- private function getInputDefinitionData(InputDefinition $definition)
+ private function getInputDefinitionData(InputDefinition $definition): array
{
- $inputArguments = array();
+ $inputArguments = [];
foreach ($definition->getArguments() as $name => $argument) {
$inputArguments[$name] = $this->getInputArgumentData($argument);
}
- $inputOptions = array();
+ $inputOptions = [];
foreach ($definition->getOptions() as $name => $option) {
$inputOptions[$name] = $this->getInputOptionData($option);
}
- return array('arguments' => $inputArguments, 'options' => $inputOptions);
+ return ['arguments' => $inputArguments, 'options' => $inputOptions];
}
- /**
- * @param Command $command
- *
- * @return array
- */
- private function getCommandData(Command $command)
+ private function getCommandData(Command $command): array
{
$command->getSynopsis();
$command->mergeApplicationDefinition(false);
- return array(
+ return [
'name' => $command->getName(),
- 'usage' => array_merge(array($command->getSynopsis()), $command->getUsages(), $command->getAliases()),
+ 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()),
'description' => $command->getDescription(),
'help' => $command->getProcessedHelp(),
'definition' => $this->getInputDefinitionData($command->getNativeDefinition()),
- );
+ 'hidden' => $command->isHidden(),
+ ];
}
}
diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php
index 2eb9944..9a9d280 100644
--- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php
+++ b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php
@@ -13,9 +13,11 @@ namespace Symfony\Component\Console\Descriptor;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Helper\Helper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
/**
* Markdown descriptor.
@@ -29,14 +31,34 @@ class MarkdownDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputArgument(InputArgument $argument, array $options = array())
+ public function describe(OutputInterface $output, $object, array $options = [])
+ {
+ $decorated = $output->isDecorated();
+ $output->setDecorated(false);
+
+ parent::describe($output, $object, $options);
+
+ $output->setDecorated($decorated);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function write($content, $decorated = true)
+ {
+ parent::write($content, $decorated);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function describeInputArgument(InputArgument $argument, array $options = [])
{
$this->write(
- '**'.$argument->getName().':**'."\n\n"
- .'* Name: '.($argument->getName() ?: '<none>')."\n"
+ '#### `'.($argument->getName() ?: '<none>')."`\n\n"
+ .($argument->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $argument->getDescription())."\n\n" : '')
.'* Is required: '.($argument->isRequired() ? 'yes' : 'no')."\n"
.'* Is array: '.($argument->isArray() ? 'yes' : 'no')."\n"
- .'* Description: '.preg_replace('/\s*[\r\n]\s*/', "\n ", $argument->getDescription() ?: '<none>')."\n"
.'* Default: `'.str_replace("\n", '', var_export($argument->getDefault(), true)).'`'
);
}
@@ -44,16 +66,19 @@ class MarkdownDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputOption(InputOption $option, array $options = array())
+ protected function describeInputOption(InputOption $option, array $options = [])
{
+ $name = '--'.$option->getName();
+ if ($option->getShortcut()) {
+ $name .= '|-'.str_replace('|', '|-', $option->getShortcut()).'';
+ }
+
$this->write(
- '**'.$option->getName().':**'."\n\n"
- .'* Name: `--'.$option->getName().'`'."\n"
- .'* Shortcut: '.($option->getShortcut() ? '`-'.implode('|-', explode('|', $option->getShortcut())).'`' : '<none>')."\n"
+ '#### `'.$name.'`'."\n\n"
+ .($option->getDescription() ? preg_replace('/\s*[\r\n]\s*/', "\n", $option->getDescription())."\n\n" : '')
.'* Accept value: '.($option->acceptValue() ? 'yes' : 'no')."\n"
.'* Is value required: '.($option->isValueRequired() ? 'yes' : 'no')."\n"
.'* Is multiple: '.($option->isArray() ? 'yes' : 'no')."\n"
- .'* Description: '.preg_replace('/\s*[\r\n]\s*/', "\n ", $option->getDescription() ?: '<none>')."\n"
.'* Default: `'.str_replace("\n", '', var_export($option->getDefault(), true)).'`'
);
}
@@ -61,22 +86,22 @@ class MarkdownDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputDefinition(InputDefinition $definition, array $options = array())
+ protected function describeInputDefinition(InputDefinition $definition, array $options = [])
{
- if ($showArguments = count($definition->getArguments()) > 0) {
- $this->write('### Arguments:');
+ if ($showArguments = \count($definition->getArguments()) > 0) {
+ $this->write('### Arguments');
foreach ($definition->getArguments() as $argument) {
$this->write("\n\n");
$this->write($this->describeInputArgument($argument));
}
}
- if (count($definition->getOptions()) > 0) {
+ if (\count($definition->getOptions()) > 0) {
if ($showArguments) {
$this->write("\n\n");
}
- $this->write('### Options:');
+ $this->write('### Options');
foreach ($definition->getOptions() as $option) {
$this->write("\n\n");
$this->write($this->describeInputOption($option));
@@ -87,18 +112,18 @@ class MarkdownDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeCommand(Command $command, array $options = array())
+ protected function describeCommand(Command $command, array $options = [])
{
$command->getSynopsis();
$command->mergeApplicationDefinition(false);
$this->write(
- $command->getName()."\n"
- .str_repeat('-', strlen($command->getName()))."\n\n"
- .'* Description: '.($command->getDescription() ?: '<none>')."\n"
- .'* Usage:'."\n\n"
- .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) {
- return $carry.' * `'.$usage.'`'."\n";
+ '`'.$command->getName()."`\n"
+ .str_repeat('-', Helper::strlen($command->getName()) + 2)."\n\n"
+ .($command->getDescription() ? $command->getDescription()."\n\n" : '')
+ .'### Usage'."\n\n"
+ .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) {
+ return $carry.'* `'.$usage.'`'."\n";
})
);
@@ -116,12 +141,13 @@ class MarkdownDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeApplication(Application $application, array $options = array())
+ protected function describeApplication(Application $application, array $options = [])
{
- $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
+ $describedNamespace = $options['namespace'] ?? null;
$description = new ApplicationDescription($application, $describedNamespace);
+ $title = $this->getApplicationTitle($application);
- $this->write($application->getName()."\n".str_repeat('=', strlen($application->getName())));
+ $this->write($title."\n".str_repeat('=', Helper::strlen($title)));
foreach ($description->getNamespaces() as $namespace) {
if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
@@ -130,8 +156,8 @@ class MarkdownDescriptor extends Descriptor
}
$this->write("\n\n");
- $this->write(implode("\n", array_map(function ($commandName) {
- return '* '.$commandName;
+ $this->write(implode("\n", array_map(function ($commandName) use ($description) {
+ return sprintf('* [`%s`](#%s)', $commandName, str_replace(':', '', $description->getCommand($commandName)->getName()));
}, $namespace['commands'])));
}
@@ -140,4 +166,17 @@ class MarkdownDescriptor extends Descriptor
$this->write($this->describeCommand($command));
}
}
+
+ private function getApplicationTitle(Application $application): string
+ {
+ if ('UNKNOWN' !== $application->getName()) {
+ if ('UNKNOWN' !== $application->getVersion()) {
+ return sprintf('%s %s', $application->getName(), $application->getVersion());
+ }
+
+ return $application->getName();
+ }
+
+ return 'Console Tool';
+ }
}
diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php
index f7446eb..7d4d5f0 100644
--- a/vendor/symfony/console/Descriptor/TextDescriptor.php
+++ b/vendor/symfony/console/Descriptor/TextDescriptor.php
@@ -13,6 +13,8 @@ namespace Symfony\Component\Console\Descriptor;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Helper\Helper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
@@ -29,22 +31,22 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputArgument(InputArgument $argument, array $options = array())
+ protected function describeInputArgument(InputArgument $argument, array $options = [])
{
- if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) {
+ if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) {
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault()));
} else {
$default = '';
}
- $totalWidth = isset($options['total_width']) ? $options['total_width'] : strlen($argument->getName());
- $spacingWidth = $totalWidth - strlen($argument->getName()) + 2;
+ $totalWidth = $options['total_width'] ?? Helper::strlen($argument->getName());
+ $spacingWidth = $totalWidth - \strlen($argument->getName());
- $this->writeText(sprintf(' <info>%s</info>%s%s%s',
+ $this->writeText(sprintf(' <info>%s</info> %s%s%s',
$argument->getName(),
str_repeat(' ', $spacingWidth),
- // + 17 = 2 spaces + <info> + </info> + 2 spaces
- preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $argument->getDescription()),
+ // + 4 = 2 spaces before <info>, 2 spaces after </info>
+ preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()),
$default
), $options);
}
@@ -52,9 +54,9 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputOption(InputOption $option, array $options = array())
+ protected function describeInputOption(InputOption $option, array $options = [])
{
- if ($option->acceptValue() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) {
+ if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) {
$default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault()));
} else {
$default = '';
@@ -69,19 +71,19 @@ class TextDescriptor extends Descriptor
}
}
- $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions(array($option));
+ $totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]);
$synopsis = sprintf('%s%s',
$option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ',
sprintf('--%s%s', $option->getName(), $value)
);
- $spacingWidth = $totalWidth - strlen($synopsis) + 2;
+ $spacingWidth = $totalWidth - Helper::strlen($synopsis);
- $this->writeText(sprintf(' <info>%s</info>%s%s%s%s',
+ $this->writeText(sprintf(' <info>%s</info> %s%s%s%s',
$synopsis,
str_repeat(' ', $spacingWidth),
- // + 17 = 2 spaces + <info> + </info> + 2 spaces
- preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $option->getDescription()),
+ // + 4 = 2 spaces before <info>, 2 spaces after </info>
+ preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()),
$default,
$option->isArray() ? '<comment> (multiple values allowed)</comment>' : ''
), $options);
@@ -90,18 +92,18 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputDefinition(InputDefinition $definition, array $options = array())
+ protected function describeInputDefinition(InputDefinition $definition, array $options = [])
{
$totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions());
foreach ($definition->getArguments() as $argument) {
- $totalWidth = max($totalWidth, strlen($argument->getName()));
+ $totalWidth = max($totalWidth, Helper::strlen($argument->getName()));
}
if ($definition->getArguments()) {
$this->writeText('<comment>Arguments:</comment>', $options);
$this->writeText("\n");
foreach ($definition->getArguments() as $argument) {
- $this->describeInputArgument($argument, array_merge($options, array('total_width' => $totalWidth)));
+ $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth]));
$this->writeText("\n");
}
}
@@ -111,20 +113,20 @@ class TextDescriptor extends Descriptor
}
if ($definition->getOptions()) {
- $laterOptions = array();
+ $laterOptions = [];
$this->writeText('<comment>Options:</comment>', $options);
foreach ($definition->getOptions() as $option) {
- if (strlen($option->getShortcut()) > 1) {
+ if (\strlen($option->getShortcut() ?? '') > 1) {
$laterOptions[] = $option;
continue;
}
$this->writeText("\n");
- $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth)));
+ $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth]));
}
foreach ($laterOptions as $option) {
$this->writeText("\n");
- $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth)));
+ $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth]));
}
}
}
@@ -132,16 +134,23 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeCommand(Command $command, array $options = array())
+ protected function describeCommand(Command $command, array $options = [])
{
$command->getSynopsis(true);
$command->getSynopsis(false);
$command->mergeApplicationDefinition(false);
+ if ($description = $command->getDescription()) {
+ $this->writeText('<comment>Description:</comment>', $options);
+ $this->writeText("\n");
+ $this->writeText(' '.$description);
+ $this->writeText("\n\n");
+ }
+
$this->writeText('<comment>Usage:</comment>', $options);
- foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) {
+ foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) {
$this->writeText("\n");
- $this->writeText(' '.$usage, $options);
+ $this->writeText(' '.OutputFormatter::escape($usage), $options);
}
$this->writeText("\n");
@@ -152,7 +161,8 @@ class TextDescriptor extends Descriptor
$this->writeText("\n");
}
- if ($help = $command->getProcessedHelp()) {
+ $help = $command->getProcessedHelp();
+ if ($help && $help !== $description) {
$this->writeText("\n");
$this->writeText('<comment>Help:</comment>', $options);
$this->writeText("\n");
@@ -164,9 +174,9 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeApplication(Application $application, array $options = array())
+ protected function describeApplication(Application $application, array $options = [])
{
- $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null;
+ $describedNamespace = $options['namespace'] ?? null;
$description = new ApplicationDescription($application, $describedNamespace);
if (isset($options['raw_text']) && $options['raw_text']) {
@@ -189,7 +199,20 @@ class TextDescriptor extends Descriptor
$this->writeText("\n");
$this->writeText("\n");
- $width = $this->getColumnWidth($description->getCommands());
+ $commands = $description->getCommands();
+ $namespaces = $description->getNamespaces();
+ if ($describedNamespace && $namespaces) {
+ // make sure all alias commands are included when describing a specific namespace
+ $describedNamespaceInfo = reset($namespaces);
+ foreach ($describedNamespaceInfo['commands'] as $name) {
+ $commands[$name] = $description->getCommand($name);
+ }
+ }
+
+ // calculate max. width based on available commands per namespace
+ $width = $this->getColumnWidth(array_merge(...array_values(array_map(function ($namespace) use ($commands) {
+ return array_intersect($namespace['commands'], array_keys($commands));
+ }, array_values($namespaces)))));
if ($describedNamespace) {
$this->writeText(sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options);
@@ -197,8 +220,15 @@ class TextDescriptor extends Descriptor
$this->writeText('<comment>Available commands:</comment>', $options);
}
- // add commands by namespace
- foreach ($description->getNamespaces() as $namespace) {
+ foreach ($namespaces as $namespace) {
+ $namespace['commands'] = array_filter($namespace['commands'], function ($name) use ($commands) {
+ return isset($commands[$name]);
+ });
+
+ if (!$namespace['commands']) {
+ continue;
+ }
+
if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) {
$this->writeText("\n");
$this->writeText(' <comment>'.$namespace['id'].'</comment>', $options);
@@ -206,8 +236,10 @@ class TextDescriptor extends Descriptor
foreach ($namespace['commands'] as $name) {
$this->writeText("\n");
- $spacingWidth = $width - strlen($name);
- $this->writeText(sprintf(' <info>%s</info>%s%s', $name, str_repeat(' ', $spacingWidth), $description->getCommand($name)->getDescription()), $options);
+ $spacingWidth = $width - Helper::strlen($name);
+ $command = $commands[$name];
+ $commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : '';
+ $this->writeText(sprintf(' <info>%s</info>%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options);
}
}
@@ -218,7 +250,7 @@ class TextDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- private function writeText($content, array $options = array())
+ private function writeText(string $content, array $options = [])
{
$this->write(
isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content,
@@ -227,50 +259,77 @@ class TextDescriptor extends Descriptor
}
/**
+ * Formats command aliases to show them in the command description.
+ */
+ private function getCommandAliasesText(Command $command): string
+ {
+ $text = '';
+ $aliases = $command->getAliases();
+
+ if ($aliases) {
+ $text = '['.implode('|', $aliases).'] ';
+ }
+
+ return $text;
+ }
+
+ /**
* Formats input option/argument default value.
*
* @param mixed $default
- *
- * @return string
*/
- private function formatDefaultValue($default)
+ private function formatDefaultValue($default): string
{
- return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
+ if (\INF === $default) {
+ return 'INF';
+ }
+
+ if (\is_string($default)) {
+ $default = OutputFormatter::escape($default);
+ } elseif (\is_array($default)) {
+ foreach ($default as $key => $value) {
+ if (\is_string($value)) {
+ $default[$key] = OutputFormatter::escape($value);
+ }
+ }
+ }
+
+ return str_replace('\\\\', '\\', json_encode($default, \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE));
}
/**
- * @param Command[] $commands
- *
- * @return int
+ * @param array<Command|string> $commands
*/
- private function getColumnWidth(array $commands)
+ private function getColumnWidth(array $commands): int
{
- $widths = array();
+ $widths = [];
foreach ($commands as $command) {
- $widths[] = strlen($command->getName());
- foreach ($command->getAliases() as $alias) {
- $widths[] = strlen($alias);
+ if ($command instanceof Command) {
+ $widths[] = Helper::strlen($command->getName());
+ foreach ($command->getAliases() as $alias) {
+ $widths[] = Helper::strlen($alias);
+ }
+ } else {
+ $widths[] = Helper::strlen($command);
}
}
- return max($widths) + 2;
+ return $widths ? max($widths) + 2 : 0;
}
/**
* @param InputOption[] $options
- *
- * @return int
*/
- private function calculateTotalWidthForOptions($options)
+ private function calculateTotalWidthForOptions(array $options): int
{
$totalWidth = 0;
foreach ($options as $option) {
// "-" + shortcut + ", --" + name
- $nameLength = 1 + max(strlen($option->getShortcut()), 1) + 4 + strlen($option->getName());
+ $nameLength = 1 + max(Helper::strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName());
if ($option->acceptValue()) {
- $valueLength = 1 + strlen($option->getName()); // = + value
+ $valueLength = 1 + Helper::strlen($option->getName()); // = + value
$valueLength += $option->isValueOptional() ? 2 : 0; // [ + ]
$nameLength += $valueLength;
diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php
index b5676be..e0ed53a 100644
--- a/vendor/symfony/console/Descriptor/XmlDescriptor.php
+++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php
@@ -26,12 +26,7 @@ use Symfony\Component\Console\Input\InputOption;
*/
class XmlDescriptor extends Descriptor
{
- /**
- * @param InputDefinition $definition
- *
- * @return \DOMDocument
- */
- public function getInputDefinitionDocument(InputDefinition $definition)
+ public function getInputDefinitionDocument(InputDefinition $definition): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($definitionXML = $dom->createElement('definition'));
@@ -49,12 +44,7 @@ class XmlDescriptor extends Descriptor
return $dom;
}
- /**
- * @param Command $command
- *
- * @return \DOMDocument
- */
- public function getCommandDocument(Command $command)
+ public function getCommandDocument(Command $command): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($commandXML = $dom->createElement('command'));
@@ -64,10 +54,11 @@ class XmlDescriptor extends Descriptor
$commandXML->setAttribute('id', $command->getName());
$commandXML->setAttribute('name', $command->getName());
+ $commandXML->setAttribute('hidden', $command->isHidden() ? 1 : 0);
$commandXML->appendChild($usagesXML = $dom->createElement('usages'));
- foreach (array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()) as $usage) {
+ foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) {
$usagesXML->appendChild($dom->createElement('usage', $usage));
}
@@ -83,27 +74,21 @@ class XmlDescriptor extends Descriptor
return $dom;
}
- /**
- * @param Application $application
- * @param string|null $namespace
- *
- * @return \DOMDocument
- */
- public function getApplicationDocument(Application $application, $namespace = null)
+ public function getApplicationDocument(Application $application, string $namespace = null): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($rootXml = $dom->createElement('symfony'));
- if ($application->getName() !== 'UNKNOWN') {
+ if ('UNKNOWN' !== $application->getName()) {
$rootXml->setAttribute('name', $application->getName());
- if ($application->getVersion() !== 'UNKNOWN') {
+ if ('UNKNOWN' !== $application->getVersion()) {
$rootXml->setAttribute('version', $application->getVersion());
}
}
$rootXml->appendChild($commandsXML = $dom->createElement('commands'));
- $description = new ApplicationDescription($application, $namespace);
+ $description = new ApplicationDescription($application, $namespace, true);
if ($namespace) {
$commandsXML->setAttribute('namespace', $namespace);
@@ -133,7 +118,7 @@ class XmlDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputArgument(InputArgument $argument, array $options = array())
+ protected function describeInputArgument(InputArgument $argument, array $options = [])
{
$this->writeDocument($this->getInputArgumentDocument($argument));
}
@@ -141,7 +126,7 @@ class XmlDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputOption(InputOption $option, array $options = array())
+ protected function describeInputOption(InputOption $option, array $options = [])
{
$this->writeDocument($this->getInputOptionDocument($option));
}
@@ -149,7 +134,7 @@ class XmlDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeInputDefinition(InputDefinition $definition, array $options = array())
+ protected function describeInputDefinition(InputDefinition $definition, array $options = [])
{
$this->writeDocument($this->getInputDefinitionDocument($definition));
}
@@ -157,7 +142,7 @@ class XmlDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeCommand(Command $command, array $options = array())
+ protected function describeCommand(Command $command, array $options = [])
{
$this->writeDocument($this->getCommandDocument($command));
}
@@ -165,16 +150,13 @@ class XmlDescriptor extends Descriptor
/**
* {@inheritdoc}
*/
- protected function describeApplication(Application $application, array $options = array())
+ protected function describeApplication(Application $application, array $options = [])
{
- $this->writeDocument($this->getApplicationDocument($application, isset($options['namespace']) ? $options['namespace'] : null));
+ $this->writeDocument($this->getApplicationDocument($application, $options['namespace'] ?? null));
}
/**
* Appends document children to parent node.
- *
- * @param \DOMNode $parentNode
- * @param \DOMNode $importedParent
*/
private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent)
{
@@ -185,10 +167,6 @@ class XmlDescriptor extends Descriptor
/**
* Writes DOM document.
- *
- * @param \DOMDocument $dom
- *
- * @return \DOMDocument|string
*/
private function writeDocument(\DOMDocument $dom)
{
@@ -196,12 +174,7 @@ class XmlDescriptor extends Descriptor
$this->write($dom->saveXML());
}
- /**
- * @param InputArgument $argument
- *
- * @return \DOMDocument
- */
- private function getInputArgumentDocument(InputArgument $argument)
+ private function getInputArgumentDocument(InputArgument $argument): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
@@ -213,7 +186,7 @@ class XmlDescriptor extends Descriptor
$descriptionXML->appendChild($dom->createTextNode($argument->getDescription()));
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
- $defaults = is_array($argument->getDefault()) ? $argument->getDefault() : (is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array()));
+ $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : []));
foreach ($defaults as $default) {
$defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
$defaultXML->appendChild($dom->createTextNode($default));
@@ -222,21 +195,16 @@ class XmlDescriptor extends Descriptor
return $dom;
}
- /**
- * @param InputOption $option
- *
- * @return \DOMDocument
- */
- private function getInputOptionDocument(InputOption $option)
+ private function getInputOptionDocument(InputOption $option): \DOMDocument
{
$dom = new \DOMDocument('1.0', 'UTF-8');
$dom->appendChild($objectXML = $dom->createElement('option'));
$objectXML->setAttribute('name', '--'.$option->getName());
- $pos = strpos($option->getShortcut(), '|');
+ $pos = strpos($option->getShortcut() ?? '', '|');
if (false !== $pos) {
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
- $objectXML->setAttribute('shortcuts', '-'.implode('|-', explode('|', $option->getShortcut())));
+ $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
} else {
$objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : '');
}
@@ -247,7 +215,7 @@ class XmlDescriptor extends Descriptor
$descriptionXML->appendChild($dom->createTextNode($option->getDescription()));
if ($option->acceptValue()) {
- $defaults = is_array($option->getDefault()) ? $option->getDefault() : (is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array()));
+ $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : []));
$objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
if (!empty($defaults)) {
diff --git a/vendor/symfony/console/Event/ConsoleCommandEvent.php b/vendor/symfony/console/Event/ConsoleCommandEvent.php
index 92adf1e..9691db6 100644
--- a/vendor/symfony/console/Event/ConsoleCommandEvent.php
+++ b/vendor/symfony/console/Event/ConsoleCommandEvent.php
@@ -15,18 +15,18 @@ namespace Symfony\Component\Console\Event;
* Allows to do things before the command is executed, like skipping the command or changing the input.
*
* @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @final since Symfony 4.4
*/
class ConsoleCommandEvent extends ConsoleEvent
{
/**
* The return code for skipped commands, this will also be passed into the terminate event.
*/
- const RETURN_CODE_DISABLED = 113;
+ public const RETURN_CODE_DISABLED = 113;
/**
* Indicates if the command should be run or skipped.
- *
- * @var bool
*/
private $commandShouldRun = true;
diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php
new file mode 100644
index 0000000..57d9b38
--- /dev/null
+++ b/vendor/symfony/console/Event/ConsoleErrorEvent.php
@@ -0,0 +1,58 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Event;
+
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Allows to handle throwables thrown while running a command.
+ *
+ * @author Wouter de Jong <wouter@wouterj.nl>
+ */
+final class ConsoleErrorEvent extends ConsoleEvent
+{
+ private $error;
+ private $exitCode;
+
+ public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null)
+ {
+ parent::__construct($command, $input, $output);
+
+ $this->error = $error;
+ }
+
+ public function getError(): \Throwable
+ {
+ return $this->error;
+ }
+
+ public function setError(\Throwable $error): void
+ {
+ $this->error = $error;
+ }
+
+ public function setExitCode(int $exitCode): void
+ {
+ $this->exitCode = $exitCode;
+
+ $r = new \ReflectionProperty($this->error, 'code');
+ $r->setAccessible(true);
+ $r->setValue($this->error, $this->exitCode);
+ }
+
+ public function getExitCode(): int
+ {
+ return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
+ }
+}
diff --git a/vendor/symfony/console/Event/ConsoleEvent.php b/vendor/symfony/console/Event/ConsoleEvent.php
index ab620c4..400eb57 100644
--- a/vendor/symfony/console/Event/ConsoleEvent.php
+++ b/vendor/symfony/console/Event/ConsoleEvent.php
@@ -28,7 +28,7 @@ class ConsoleEvent extends Event
private $input;
private $output;
- public function __construct(Command $command, InputInterface $input, OutputInterface $output)
+ public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
{
$this->command = $command;
$this->input = $input;
@@ -38,7 +38,7 @@ class ConsoleEvent extends Event
/**
* Gets the command that is executed.
*
- * @return Command A Command instance
+ * @return Command|null A Command instance
*/
public function getCommand()
{
diff --git a/vendor/symfony/console/Event/ConsoleExceptionEvent.php b/vendor/symfony/console/Event/ConsoleExceptionEvent.php
deleted file mode 100644
index 603b7ee..0000000
--- a/vendor/symfony/console/Event/ConsoleExceptionEvent.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Console\Event;
-
-use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
-
-/**
- * Allows to handle exception thrown in a command.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ConsoleExceptionEvent extends ConsoleEvent
-{
- private $exception;
- private $exitCode;
-
- public function __construct(Command $command, InputInterface $input, OutputInterface $output, \Exception $exception, $exitCode)
- {
- parent::__construct($command, $input, $output);
-
- $this->setException($exception);
- $this->exitCode = (int) $exitCode;
- }
-
- /**
- * Returns the thrown exception.
- *
- * @return \Exception The thrown exception
- */
- public function getException()
- {
- return $this->exception;
- }
-
- /**
- * Replaces the thrown exception.
- *
- * This exception will be thrown if no response is set in the event.
- *
- * @param \Exception $exception The thrown exception
- */
- public function setException(\Exception $exception)
- {
- $this->exception = $exception;
- }
-
- /**
- * Gets the exit code.
- *
- * @return int The command exit code
- */
- public function getExitCode()
- {
- return $this->exitCode;
- }
-}
diff --git a/vendor/symfony/console/Event/ConsoleTerminateEvent.php b/vendor/symfony/console/Event/ConsoleTerminateEvent.php
index b6a5d7c..43d0f8a 100644
--- a/vendor/symfony/console/Event/ConsoleTerminateEvent.php
+++ b/vendor/symfony/console/Event/ConsoleTerminateEvent.php
@@ -19,17 +19,14 @@ use Symfony\Component\Console\Output\OutputInterface;
* Allows to manipulate the exit code of a command after its execution.
*
* @author Francesco Levorato <git@flevour.net>
+ *
+ * @final since Symfony 4.4
*/
class ConsoleTerminateEvent extends ConsoleEvent
{
- /**
- * The exit code of the command.
- *
- * @var int
- */
private $exitCode;
- public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exitCode)
+ public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode)
{
parent::__construct($command, $input, $output);
diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php
new file mode 100644
index 0000000..897d985
--- /dev/null
+++ b/vendor/symfony/console/EventListener/ErrorListener.php
@@ -0,0 +1,95 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\EventListener;
+
+use Psr\Log\LoggerInterface;
+use Symfony\Component\Console\ConsoleEvents;
+use Symfony\Component\Console\Event\ConsoleErrorEvent;
+use Symfony\Component\Console\Event\ConsoleEvent;
+use Symfony\Component\Console\Event\ConsoleTerminateEvent;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+/**
+ * @author James Halsall <james.t.halsall@googlemail.com>
+ * @author Robin Chalas <robin.chalas@gmail.com>
+ */
+class ErrorListener implements EventSubscriberInterface
+{
+ private $logger;
+
+ public function __construct(LoggerInterface $logger = null)
+ {
+ $this->logger = $logger;
+ }
+
+ public function onConsoleError(ConsoleErrorEvent $event)
+ {
+ if (null === $this->logger) {
+ return;
+ }
+
+ $error = $event->getError();
+
+ if (!$inputString = $this->getInputString($event)) {
+ $this->logger->critical('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]);
+
+ return;
+ }
+
+ $this->logger->critical('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]);
+ }
+
+ public function onConsoleTerminate(ConsoleTerminateEvent $event)
+ {
+ if (null === $this->logger) {
+ return;
+ }
+
+ $exitCode = $event->getExitCode();
+
+ if (0 === $exitCode) {
+ return;
+ }
+
+ if (!$inputString = $this->getInputString($event)) {
+ $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]);
+
+ return;
+ }
+
+ $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]);
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return [
+ ConsoleEvents::ERROR => ['onConsoleError', -128],
+ ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128],
+ ];
+ }
+
+ private static function getInputString(ConsoleEvent $event): ?string
+ {
+ $commandName = $event->getCommand() ? $event->getCommand()->getName() : null;
+ $input = $event->getInput();
+
+ if (method_exists($input, '__toString')) {
+ if ($commandName) {
+ return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input);
+ }
+
+ return (string) $input;
+ }
+
+ return $commandName;
+ }
+}
diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php
index 54f1a5b..590a71c 100644
--- a/vendor/symfony/console/Exception/CommandNotFoundException.php
+++ b/vendor/symfony/console/Exception/CommandNotFoundException.php
@@ -21,12 +21,12 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
private $alternatives;
/**
- * @param string $message Exception message to throw
- * @param array $alternatives List of similar defined names
- * @param int $code Exception code
- * @param Exception $previous previous exception used for the exception chaining
+ * @param string $message Exception message to throw
+ * @param string[] $alternatives List of similar defined names
+ * @param int $code Exception code
+ * @param \Throwable|null $previous Previous exception used for the exception chaining
*/
- public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null)
+ public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
@@ -34,7 +34,7 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
}
/**
- * @return array A list of similar defined names
+ * @return string[] A list of similar defined names
*/
public function getAlternatives()
{
diff --git a/vendor/symfony/console/Exception/ExceptionInterface.php b/vendor/symfony/console/Exception/ExceptionInterface.php
index 491cc4c..1624e13 100644
--- a/vendor/symfony/console/Exception/ExceptionInterface.php
+++ b/vendor/symfony/console/Exception/ExceptionInterface.php
@@ -16,6 +16,6 @@ namespace Symfony\Component\Console\Exception;
*
* @author Jérôme Tamarelle <jerome@tamarelle.net>
*/
-interface ExceptionInterface
+interface ExceptionInterface extends \Throwable
{
}
diff --git a/vendor/symfony/console/Exception/MissingInputException.php b/vendor/symfony/console/Exception/MissingInputException.php
new file mode 100644
index 0000000..04f02ad
--- /dev/null
+++ b/vendor/symfony/console/Exception/MissingInputException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Exception;
+
+/**
+ * Represents failure to read input from stdin.
+ *
+ * @author Gabriel Ostrolucký <gabriel.ostrolucky@gmail.com>
+ */
+class MissingInputException extends RuntimeException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/console/Exception/NamespaceNotFoundException.php b/vendor/symfony/console/Exception/NamespaceNotFoundException.php
new file mode 100644
index 0000000..dd16e45
--- /dev/null
+++ b/vendor/symfony/console/Exception/NamespaceNotFoundException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Exception;
+
+/**
+ * Represents an incorrect namespace typed in the console.
+ *
+ * @author Pierre du Plessis <pdples@gmail.com>
+ */
+class NamespaceNotFoundException extends CommandNotFoundException
+{
+}
diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php
index 56cd5e5..e8c10e7 100644
--- a/vendor/symfony/console/Formatter/OutputFormatter.php
+++ b/vendor/symfony/console/Formatter/OutputFormatter.php
@@ -17,15 +17,24 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
* Formatter class for console output.
*
* @author Konstantin Kudryashov <ever.zet@gmail.com>
+ * @author Roland Franssen <franssen.roland@gmail.com>
*/
-class OutputFormatter implements OutputFormatterInterface
+class OutputFormatter implements WrappableOutputFormatterInterface
{
private $decorated;
- private $styles = array();
+ private $styles = [];
private $styleStack;
+ public function __clone()
+ {
+ $this->styleStack = clone $this->styleStack;
+ foreach ($this->styles as $key => $value) {
+ $this->styles[$key] = clone $value;
+ }
+ }
+
/**
- * Escapes "<" special char in given text.
+ * Escapes "<" and ">" special chars in given text.
*
* @param string $text Text to escape
*
@@ -33,12 +42,23 @@ class OutputFormatter implements OutputFormatterInterface
*/
public static function escape($text)
{
- $text = preg_replace('/([^\\\\]?)</', '$1\\<', $text);
+ $text = preg_replace('/([^\\\\]|^)([<>])/', '$1\\\\$2', $text);
- if ('\\' === substr($text, -1)) {
- $len = strlen($text);
+ return self::escapeTrailingBackslash($text);
+ }
+
+ /**
+ * Escapes trailing "\" in given text.
+ *
+ * @internal
+ */
+ public static function escapeTrailingBackslash(string $text): string
+ {
+ if (str_ends_with($text, '\\')) {
+ $len = \strlen($text);
$text = rtrim($text, '\\');
- $text .= str_repeat('<<', $len - strlen($text));
+ $text = str_replace("\0", '', $text);
+ $text .= str_repeat("\0", $len - \strlen($text));
}
return $text;
@@ -47,12 +67,11 @@ class OutputFormatter implements OutputFormatterInterface
/**
* Initializes console output formatter.
*
- * @param bool $decorated Whether this formatter should actually decorate strings
- * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
+ * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
*/
- public function __construct($decorated = false, array $styles = array())
+ public function __construct(bool $decorated = false, array $styles = [])
{
- $this->decorated = (bool) $decorated;
+ $this->decorated = $decorated;
$this->setStyle('error', new OutputFormatterStyle('white', 'red'));
$this->setStyle('info', new OutputFormatterStyle('green'));
@@ -67,9 +86,7 @@ class OutputFormatter implements OutputFormatterInterface
}
/**
- * Sets the decorated flag.
- *
- * @param bool $decorated Whether to decorate the messages or not
+ * {@inheritdoc}
*/
public function setDecorated($decorated)
{
@@ -77,9 +94,7 @@ class OutputFormatter implements OutputFormatterInterface
}
/**
- * Gets the decorated flag.
- *
- * @return bool true if the output will decorate messages, false otherwise
+ * {@inheritdoc}
*/
public function isDecorated()
{
@@ -87,10 +102,7 @@ class OutputFormatter implements OutputFormatterInterface
}
/**
- * Sets a new style.
- *
- * @param string $name The style name
- * @param OutputFormatterStyleInterface $style The style instance
+ * {@inheritdoc}
*/
public function setStyle($name, OutputFormatterStyleInterface $style)
{
@@ -98,11 +110,7 @@ class OutputFormatter implements OutputFormatterInterface
}
/**
- * Checks if output formatter has style with specified name.
- *
- * @param string $name
- *
- * @return bool
+ * {@inheritdoc}
*/
public function hasStyle($name)
{
@@ -110,37 +118,36 @@ class OutputFormatter implements OutputFormatterInterface
}
/**
- * Gets style options from style with specified name.
- *
- * @param string $name
- *
- * @return OutputFormatterStyleInterface
- *
- * @throws InvalidArgumentException When style isn't defined
+ * {@inheritdoc}
*/
public function getStyle($name)
{
if (!$this->hasStyle($name)) {
- throw new InvalidArgumentException(sprintf('Undefined style: %s', $name));
+ throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name));
}
return $this->styles[strtolower($name)];
}
/**
- * Formats a message according to the given styles.
- *
- * @param string $message The message to style
- *
- * @return string The styled message
+ * {@inheritdoc}
*/
public function format($message)
{
- $message = (string) $message;
+ return $this->formatAndWrap((string) $message, 0);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function formatAndWrap(string $message, int $width)
+ {
$offset = 0;
$output = '';
- $tagRegex = '[a-z][a-z0-9_=;-]*+';
- preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#ix", $message, $matches, PREG_OFFSET_CAPTURE);
+ $openTagRegex = '[a-z](?:[^\\\\<>]*+ | \\\\.)*';
+ $closeTagRegex = '[a-z][^<>]*+';
+ $currentLineLength = 0;
+ preg_match_all("#<(($openTagRegex) | /($closeTagRegex)?)>#ix", $message, $matches, \PREG_OFFSET_CAPTURE);
foreach ($matches[0] as $i => $match) {
$pos = $match[1];
$text = $match[0];
@@ -150,21 +157,21 @@ class OutputFormatter implements OutputFormatterInterface
}
// add the text up to the next tag
- $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset));
- $offset = $pos + strlen($text);
+ $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset), $output, $width, $currentLineLength);
+ $offset = $pos + \strlen($text);
// opening tag?
if ($open = '/' != $text[1]) {
$tag = $matches[1][$i][0];
} else {
- $tag = isset($matches[3][$i][0]) ? $matches[3][$i][0] : '';
+ $tag = $matches[3][$i][0] ?? '';
}
if (!$open && !$tag) {
// </>
$this->styleStack->pop();
- } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) {
- $output .= $this->applyCurrentStyle($text);
+ } elseif (null === $style = $this->createStyleFromString($tag)) {
+ $output .= $this->applyCurrentStyle($text, $output, $width, $currentLineLength);
} elseif ($open) {
$this->styleStack->push($style);
} else {
@@ -172,13 +179,9 @@ class OutputFormatter implements OutputFormatterInterface
}
}
- $output .= $this->applyCurrentStyle(substr($message, $offset));
+ $output .= $this->applyCurrentStyle(substr($message, $offset), $output, $width, $currentLineLength);
- if (false !== strpos($output, '<<')) {
- return strtr($output, array('\\<' => '<', '<<' => '\\'));
- }
-
- return str_replace('\\<', '<', $output);
+ return strtr($output, ["\0" => '\\', '\\<' => '<', '\\>' => '>']);
}
/**
@@ -191,35 +194,37 @@ class OutputFormatter implements OutputFormatterInterface
/**
* Tries to create new style instance from string.
- *
- * @param string $string
- *
- * @return OutputFormatterStyle|bool false if string is not format string
*/
- private function createStyleFromString($string)
+ private function createStyleFromString(string $string): ?OutputFormatterStyleInterface
{
if (isset($this->styles[$string])) {
return $this->styles[$string];
}
- if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) {
- return false;
+ if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', $string, $matches, \PREG_SET_ORDER)) {
+ return null;
}
$style = new OutputFormatterStyle();
foreach ($matches as $match) {
array_shift($match);
+ $match[0] = strtolower($match[0]);
if ('fg' == $match[0]) {
- $style->setForeground($match[1]);
+ $style->setForeground(strtolower($match[1]));
} elseif ('bg' == $match[0]) {
- $style->setBackground($match[1]);
- } else {
- try {
- $style->setOption($match[1]);
- } catch (\InvalidArgumentException $e) {
- return false;
+ $style->setBackground(strtolower($match[1]));
+ } elseif ('href' === $match[0]) {
+ $url = preg_replace('{\\\\([<>])}', '$1', $match[1]);
+ $style->setHref($url);
+ } elseif ('options' === $match[0]) {
+ preg_match_all('([^,;]+)', strtolower($match[1]), $options);
+ $options = array_shift($options);
+ foreach ($options as $option) {
+ $style->setOption($option);
}
+ } else {
+ return null;
}
}
@@ -228,13 +233,51 @@ class OutputFormatter implements OutputFormatterInterface
/**
* Applies current style from stack to text, if must be applied.
- *
- * @param string $text Input text
- *
- * @return string Styled text
*/
- private function applyCurrentStyle($text)
+ private function applyCurrentStyle(string $text, string $current, int $width, int &$currentLineLength): string
{
- return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text;
+ if ('' === $text) {
+ return '';
+ }
+
+ if (!$width) {
+ return $this->isDecorated() ? $this->styleStack->getCurrent()->apply($text) : $text;
+ }
+
+ if (!$currentLineLength && '' !== $current) {
+ $text = ltrim($text);
+ }
+
+ if ($currentLineLength) {
+ $prefix = substr($text, 0, $i = $width - $currentLineLength)."\n";
+ $text = substr($text, $i);
+ } else {
+ $prefix = '';
+ }
+
+ preg_match('~(\\n)$~', $text, $matches);
+ $text = $prefix.preg_replace('~([^\\n]{'.$width.'})\\ *~', "\$1\n", $text);
+ $text = rtrim($text, "\n").($matches[1] ?? '');
+
+ if (!$currentLineLength && '' !== $current && "\n" !== substr($current, -1)) {
+ $text = "\n".$text;
+ }
+
+ $lines = explode("\n", $text);
+
+ foreach ($lines as $line) {
+ $currentLineLength += \strlen($line);
+ if ($width <= $currentLineLength) {
+ $currentLineLength = 0;
+ }
+ }
+
+ if ($this->isDecorated()) {
+ foreach ($lines as $i => $line) {
+ $lines[$i] = $this->styleStack->getCurrent()->apply($line);
+ }
+ }
+
+ return implode("\n", $lines);
}
}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterInterface.php b/vendor/symfony/console/Formatter/OutputFormatterInterface.php
index 5a52ba0..22f40a3 100644
--- a/vendor/symfony/console/Formatter/OutputFormatterInterface.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterInterface.php
@@ -35,8 +35,7 @@ interface OutputFormatterInterface
/**
* Sets a new style.
*
- * @param string $name The style name
- * @param OutputFormatterStyleInterface $style The style instance
+ * @param string $name The style name
*/
public function setStyle($name, OutputFormatterStyleInterface $style);
@@ -55,6 +54,8 @@ interface OutputFormatterInterface
* @param string $name
*
* @return OutputFormatterStyleInterface
+ *
+ * @throws \InvalidArgumentException When style isn't defined
*/
public function getStyle($name);
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php
index c7c6b4a..7cb6116 100644
--- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterStyle.php
@@ -20,48 +20,49 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
*/
class OutputFormatterStyle implements OutputFormatterStyleInterface
{
- private static $availableForegroundColors = array(
- 'black' => array('set' => 30, 'unset' => 39),
- 'red' => array('set' => 31, 'unset' => 39),
- 'green' => array('set' => 32, 'unset' => 39),
- 'yellow' => array('set' => 33, 'unset' => 39),
- 'blue' => array('set' => 34, 'unset' => 39),
- 'magenta' => array('set' => 35, 'unset' => 39),
- 'cyan' => array('set' => 36, 'unset' => 39),
- 'white' => array('set' => 37, 'unset' => 39),
- 'default' => array('set' => 39, 'unset' => 39),
- );
- private static $availableBackgroundColors = array(
- 'black' => array('set' => 40, 'unset' => 49),
- 'red' => array('set' => 41, 'unset' => 49),
- 'green' => array('set' => 42, 'unset' => 49),
- 'yellow' => array('set' => 43, 'unset' => 49),
- 'blue' => array('set' => 44, 'unset' => 49),
- 'magenta' => array('set' => 45, 'unset' => 49),
- 'cyan' => array('set' => 46, 'unset' => 49),
- 'white' => array('set' => 47, 'unset' => 49),
- 'default' => array('set' => 49, 'unset' => 49),
- );
- private static $availableOptions = array(
- 'bold' => array('set' => 1, 'unset' => 22),
- 'underscore' => array('set' => 4, 'unset' => 24),
- 'blink' => array('set' => 5, 'unset' => 25),
- 'reverse' => array('set' => 7, 'unset' => 27),
- 'conceal' => array('set' => 8, 'unset' => 28),
- );
+ private static $availableForegroundColors = [
+ 'black' => ['set' => 30, 'unset' => 39],
+ 'red' => ['set' => 31, 'unset' => 39],
+ 'green' => ['set' => 32, 'unset' => 39],
+ 'yellow' => ['set' => 33, 'unset' => 39],
+ 'blue' => ['set' => 34, 'unset' => 39],
+ 'magenta' => ['set' => 35, 'unset' => 39],
+ 'cyan' => ['set' => 36, 'unset' => 39],
+ 'white' => ['set' => 37, 'unset' => 39],
+ 'default' => ['set' => 39, 'unset' => 39],
+ ];
+ private static $availableBackgroundColors = [
+ 'black' => ['set' => 40, 'unset' => 49],
+ 'red' => ['set' => 41, 'unset' => 49],
+ 'green' => ['set' => 42, 'unset' => 49],
+ 'yellow' => ['set' => 43, 'unset' => 49],
+ 'blue' => ['set' => 44, 'unset' => 49],
+ 'magenta' => ['set' => 45, 'unset' => 49],
+ 'cyan' => ['set' => 46, 'unset' => 49],
+ 'white' => ['set' => 47, 'unset' => 49],
+ 'default' => ['set' => 49, 'unset' => 49],
+ ];
+ private static $availableOptions = [
+ 'bold' => ['set' => 1, 'unset' => 22],
+ 'underscore' => ['set' => 4, 'unset' => 24],
+ 'blink' => ['set' => 5, 'unset' => 25],
+ 'reverse' => ['set' => 7, 'unset' => 27],
+ 'conceal' => ['set' => 8, 'unset' => 28],
+ ];
private $foreground;
private $background;
- private $options = array();
+ private $href;
+ private $options = [];
+ private $handlesHrefGracefully;
/**
* Initializes output formatter style.
*
* @param string|null $foreground The style foreground color name
* @param string|null $background The style background color name
- * @param array $options The style options
*/
- public function __construct($foreground = null, $background = null, array $options = array())
+ public function __construct(string $foreground = null, string $background = null, array $options = [])
{
if (null !== $foreground) {
$this->setForeground($foreground);
@@ -69,17 +70,13 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
if (null !== $background) {
$this->setBackground($background);
}
- if (count($options)) {
+ if (\count($options)) {
$this->setOptions($options);
}
}
/**
- * Sets style foreground color.
- *
- * @param string|null $color The color name
- *
- * @throws InvalidArgumentException When the color name isn't defined
+ * {@inheritdoc}
*/
public function setForeground($color = null)
{
@@ -90,22 +87,14 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
if (!isset(static::$availableForegroundColors[$color])) {
- throw new InvalidArgumentException(sprintf(
- 'Invalid foreground color specified: "%s". Expected one of (%s)',
- $color,
- implode(', ', array_keys(static::$availableForegroundColors))
- ));
+ throw new InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableForegroundColors))));
}
$this->foreground = static::$availableForegroundColors[$color];
}
/**
- * Sets style background color.
- *
- * @param string|null $color The color name
- *
- * @throws InvalidArgumentException When the color name isn't defined
+ * {@inheritdoc}
*/
public function setBackground($color = null)
{
@@ -116,53 +105,38 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
if (!isset(static::$availableBackgroundColors[$color])) {
- throw new InvalidArgumentException(sprintf(
- 'Invalid background color specified: "%s". Expected one of (%s)',
- $color,
- implode(', ', array_keys(static::$availableBackgroundColors))
- ));
+ throw new InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s).', $color, implode(', ', array_keys(static::$availableBackgroundColors))));
}
$this->background = static::$availableBackgroundColors[$color];
}
+ public function setHref(string $url): void
+ {
+ $this->href = $url;
+ }
+
/**
- * Sets some specific style option.
- *
- * @param string $option The option name
- *
- * @throws InvalidArgumentException When the option name isn't defined
+ * {@inheritdoc}
*/
public function setOption($option)
{
if (!isset(static::$availableOptions[$option])) {
- throw new InvalidArgumentException(sprintf(
- 'Invalid option specified: "%s". Expected one of (%s)',
- $option,
- implode(', ', array_keys(static::$availableOptions))
- ));
+ throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions))));
}
- if (!in_array(static::$availableOptions[$option], $this->options)) {
+ if (!\in_array(static::$availableOptions[$option], $this->options)) {
$this->options[] = static::$availableOptions[$option];
}
}
/**
- * Unsets some specific style option.
- *
- * @param string $option The option name
- *
- * @throws InvalidArgumentException When the option name isn't defined
+ * {@inheritdoc}
*/
public function unsetOption($option)
{
if (!isset(static::$availableOptions[$option])) {
- throw new InvalidArgumentException(sprintf(
- 'Invalid option specified: "%s". Expected one of (%s)',
- $option,
- implode(', ', array_keys(static::$availableOptions))
- ));
+ throw new InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s).', $option, implode(', ', array_keys(static::$availableOptions))));
}
$pos = array_search(static::$availableOptions[$option], $this->options);
@@ -172,13 +146,11 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
- * Sets multiple style options at once.
- *
- * @param array $options
+ * {@inheritdoc}
*/
public function setOptions(array $options)
{
- $this->options = array();
+ $this->options = [];
foreach ($options as $option) {
$this->setOption($option);
@@ -186,16 +158,17 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
}
/**
- * Applies the style to a given text.
- *
- * @param string $text The text to style
- *
- * @return string
+ * {@inheritdoc}
*/
public function apply($text)
{
- $setCodes = array();
- $unsetCodes = array();
+ $setCodes = [];
+ $unsetCodes = [];
+
+ if (null === $this->handlesHrefGracefully) {
+ $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR')
+ && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100);
+ }
if (null !== $this->foreground) {
$setCodes[] = $this->foreground['set'];
@@ -205,14 +178,17 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$setCodes[] = $this->background['set'];
$unsetCodes[] = $this->background['unset'];
}
- if (count($this->options)) {
- foreach ($this->options as $option) {
- $setCodes[] = $option['set'];
- $unsetCodes[] = $option['unset'];
- }
+
+ foreach ($this->options as $option) {
+ $setCodes[] = $option['set'];
+ $unsetCodes[] = $option['unset'];
+ }
+
+ if (null !== $this->href && $this->handlesHrefGracefully) {
+ $text = "\033]8;;$this->href\033\\$text\033]8;;\033\\";
}
- if (0 === count($setCodes)) {
+ if (0 === \count($setCodes)) {
return $text;
}
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
index c36fda8..af171c2 100644
--- a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php
@@ -21,7 +21,7 @@ interface OutputFormatterStyleInterface
/**
* Sets style foreground color.
*
- * @param string $color The color name
+ * @param string|null $color The color name
*/
public function setForeground($color = null);
@@ -48,8 +48,6 @@ interface OutputFormatterStyleInterface
/**
* Sets multiple style options at once.
- *
- * @param array $options
*/
public function setOptions(array $options);
diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
index e5d14ea..fc48dc0 100644
--- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
+++ b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php
@@ -12,30 +12,23 @@
namespace Symfony\Component\Console\Formatter;
use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Contracts\Service\ResetInterface;
/**
* @author Jean-François Simon <contact@jfsimon.fr>
*/
-class OutputFormatterStyleStack
+class OutputFormatterStyleStack implements ResetInterface
{
/**
* @var OutputFormatterStyleInterface[]
*/
private $styles;
- /**
- * @var OutputFormatterStyleInterface
- */
private $emptyStyle;
- /**
- * Constructor.
- *
- * @param OutputFormatterStyleInterface|null $emptyStyle
- */
public function __construct(OutputFormatterStyleInterface $emptyStyle = null)
{
- $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle();
+ $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle();
$this->reset();
}
@@ -44,13 +37,11 @@ class OutputFormatterStyleStack
*/
public function reset()
{
- $this->styles = array();
+ $this->styles = [];
}
/**
* Pushes a style in the stack.
- *
- * @param OutputFormatterStyleInterface $style
*/
public function push(OutputFormatterStyleInterface $style)
{
@@ -60,8 +51,6 @@ class OutputFormatterStyleStack
/**
* Pops a style from the stack.
*
- * @param OutputFormatterStyleInterface|null $style
- *
* @return OutputFormatterStyleInterface
*
* @throws InvalidArgumentException When style tags incorrectly nested
@@ -78,7 +67,7 @@ class OutputFormatterStyleStack
foreach (array_reverse($this->styles, true) as $index => $stackedStyle) {
if ($style->apply('') === $stackedStyle->apply('')) {
- $this->styles = array_slice($this->styles, 0, $index);
+ $this->styles = \array_slice($this->styles, 0, $index);
return $stackedStyle;
}
@@ -98,13 +87,11 @@ class OutputFormatterStyleStack
return $this->emptyStyle;
}
- return $this->styles[count($this->styles) - 1];
+ return $this->styles[\count($this->styles) - 1];
}
/**
- * @param OutputFormatterStyleInterface $emptyStyle
- *
- * @return OutputFormatterStyleStack
+ * @return $this
*/
public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle)
{
diff --git a/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
new file mode 100644
index 0000000..6694053
--- /dev/null
+++ b/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Formatter;
+
+/**
+ * Formatter interface for console output that supports word wrapping.
+ *
+ * @author Roland Franssen <franssen.roland@gmail.com>
+ */
+interface WrappableOutputFormatterInterface extends OutputFormatterInterface
+{
+ /**
+ * Formats a message according to the given styles, wrapping at `$width` (0 means no wrapping).
+ */
+ public function formatAndWrap(string $message, int $width);
+}
diff --git a/vendor/symfony/console/Helper/DebugFormatterHelper.php b/vendor/symfony/console/Helper/DebugFormatterHelper.php
index 1119b79..1653ede 100644
--- a/vendor/symfony/console/Helper/DebugFormatterHelper.php
+++ b/vendor/symfony/console/Helper/DebugFormatterHelper.php
@@ -20,8 +20,8 @@ namespace Symfony\Component\Console\Helper;
*/
class DebugFormatterHelper extends Helper
{
- private $colors = array('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default');
- private $started = array();
+ private $colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'];
+ private $started = [];
private $count = -1;
/**
@@ -35,7 +35,7 @@ class DebugFormatterHelper extends Helper
*/
public function start($id, $message, $prefix = 'RUN')
{
- $this->started[$id] = array('border' => ++$this->count % count($this->colors));
+ $this->started[$id] = ['border' => ++$this->count % \count($this->colors)];
return sprintf("%s<bg=blue;fg=white> %s </> <fg=blue>%s</>\n", $this->getBorder($id), $prefix, $message);
}
@@ -107,12 +107,7 @@ class DebugFormatterHelper extends Helper
return $message;
}
- /**
- * @param string $id The id of the formatting session
- *
- * @return string
- */
- private function getBorder($id)
+ private function getBorder(string $id): string
{
return sprintf('<bg=%s> </>', $this->colors[$this->started[$id]['border']]);
}
diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php
index a53b476..3055bae 100644
--- a/vendor/symfony/console/Helper/DescriptorHelper.php
+++ b/vendor/symfony/console/Helper/DescriptorHelper.php
@@ -16,8 +16,8 @@ use Symfony\Component\Console\Descriptor\JsonDescriptor;
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
use Symfony\Component\Console\Descriptor\TextDescriptor;
use Symfony\Component\Console\Descriptor\XmlDescriptor;
-use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Output\OutputInterface;
/**
* This class adds helper method to describe objects in various formats.
@@ -29,11 +29,8 @@ class DescriptorHelper extends Helper
/**
* @var DescriptorInterface[]
*/
- private $descriptors = array();
+ private $descriptors = [];
- /**
- * Constructor.
- */
public function __construct()
{
$this
@@ -51,18 +48,16 @@ class DescriptorHelper extends Helper
* * format: string, the output format name
* * raw_text: boolean, sets output type as raw
*
- * @param OutputInterface $output
- * @param object $object
- * @param array $options
+ * @param object $object
*
* @throws InvalidArgumentException when the given format is not supported
*/
- public function describe(OutputInterface $output, $object, array $options = array())
+ public function describe(OutputInterface $output, $object, array $options = [])
{
- $options = array_merge(array(
+ $options = array_merge([
'raw_text' => false,
'format' => 'txt',
- ), $options);
+ ], $options);
if (!isset($this->descriptors[$options['format']])) {
throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format']));
@@ -75,10 +70,9 @@ class DescriptorHelper extends Helper
/**
* Registers a descriptor.
*
- * @param string $format
- * @param DescriptorInterface $descriptor
+ * @param string $format
*
- * @return DescriptorHelper
+ * @return $this
*/
public function register($format, DescriptorInterface $descriptor)
{
diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php
new file mode 100644
index 0000000..b013b6c
--- /dev/null
+++ b/vendor/symfony/console/Helper/Dumper.php
@@ -0,0 +1,64 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Helper;
+
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\VarDumper\Cloner\ClonerInterface;
+use Symfony\Component\VarDumper\Cloner\VarCloner;
+use Symfony\Component\VarDumper\Dumper\CliDumper;
+
+/**
+ * @author Roland Franssen <franssen.roland@gmail.com>
+ */
+final class Dumper
+{
+ private $output;
+ private $dumper;
+ private $cloner;
+ private $handler;
+
+ public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null)
+ {
+ $this->output = $output;
+ $this->dumper = $dumper;
+ $this->cloner = $cloner;
+
+ if (class_exists(CliDumper::class)) {
+ $this->handler = function ($var): string {
+ $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR);
+ $dumper->setColors($this->output->isDecorated());
+
+ return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true));
+ };
+ } else {
+ $this->handler = function ($var): string {
+ switch (true) {
+ case null === $var:
+ return 'null';
+ case true === $var:
+ return 'true';
+ case false === $var:
+ return 'false';
+ case \is_string($var):
+ return '"'.$var.'"';
+ default:
+ return rtrim(print_r($var, true));
+ }
+ };
+ }
+ }
+
+ public function __invoke($var): string
+ {
+ return ($this->handler)($var);
+ }
+}
diff --git a/vendor/symfony/console/Helper/FormatterHelper.php b/vendor/symfony/console/Helper/FormatterHelper.php
index 6a48a77..d6eccee 100644
--- a/vendor/symfony/console/Helper/FormatterHelper.php
+++ b/vendor/symfony/console/Helper/FormatterHelper.php
@@ -45,21 +45,21 @@ class FormatterHelper extends Helper
*/
public function formatBlock($messages, $style, $large = false)
{
- if (!is_array($messages)) {
- $messages = array($messages);
+ if (!\is_array($messages)) {
+ $messages = [$messages];
}
$len = 0;
- $lines = array();
+ $lines = [];
foreach ($messages as $message) {
$message = OutputFormatter::escape($message);
$lines[] = sprintf($large ? ' %s ' : ' %s ', $message);
- $len = max($this->strlen($message) + ($large ? 4 : 2), $len);
+ $len = max(self::strlen($message) + ($large ? 4 : 2), $len);
}
- $messages = $large ? array(str_repeat(' ', $len)) : array();
+ $messages = $large ? [str_repeat(' ', $len)] : [];
for ($i = 0; isset($lines[$i]); ++$i) {
- $messages[] = $lines[$i].str_repeat(' ', $len - $this->strlen($lines[$i]));
+ $messages[] = $lines[$i].str_repeat(' ', $len - self::strlen($lines[$i]));
}
if ($large) {
$messages[] = str_repeat(' ', $len);
@@ -83,17 +83,13 @@ class FormatterHelper extends Helper
*/
public function truncate($message, $length, $suffix = '...')
{
- $computedLength = $length - $this->strlen($suffix);
+ $computedLength = $length - self::strlen($suffix);
- if ($computedLength > $this->strlen($message)) {
+ if ($computedLength > self::strlen($message)) {
return $message;
}
- if (false === $encoding = mb_detect_encoding($message, null, true)) {
- return substr($message, 0, $length).$suffix;
- }
-
- return mb_substr($message, 0, $length, $encoding).$suffix;
+ return self::substr($message, 0, $length).$suffix;
}
/**
diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php
index 43f9a16..0521aaf 100644
--- a/vendor/symfony/console/Helper/Helper.php
+++ b/vendor/symfony/console/Helper/Helper.php
@@ -23,9 +23,7 @@ abstract class Helper implements HelperInterface
protected $helperSet = null;
/**
- * Sets the helper set associated with this helper.
- *
- * @param HelperSet $helperSet A HelperSet instance
+ * {@inheritdoc}
*/
public function setHelperSet(HelperSet $helperSet = null)
{
@@ -33,9 +31,7 @@ abstract class Helper implements HelperInterface
}
/**
- * Gets the helper set associated with this helper.
- *
- * @return HelperSet A HelperSet instance
+ * {@inheritdoc}
*/
public function getHelperSet()
{
@@ -51,33 +47,55 @@ abstract class Helper implements HelperInterface
*/
public static function strlen($string)
{
+ $string = (string) $string;
+
if (false === $encoding = mb_detect_encoding($string, null, true)) {
- return strlen($string);
+ return \strlen($string);
}
return mb_strwidth($string, $encoding);
}
+ /**
+ * Returns the subset of a string, using mb_substr if it is available.
+ *
+ * @param string $string String to subset
+ * @param int $from Start offset
+ * @param int|null $length Length to read
+ *
+ * @return string The string subset
+ */
+ public static function substr($string, $from, $length = null)
+ {
+ $string = (string) $string;
+
+ if (false === $encoding = mb_detect_encoding($string, null, true)) {
+ return substr($string, $from, $length);
+ }
+
+ return mb_substr($string, $from, $length, $encoding);
+ }
+
public static function formatTime($secs)
{
- static $timeFormats = array(
- array(0, '< 1 sec'),
- array(1, '1 sec'),
- array(2, 'secs', 1),
- array(60, '1 min'),
- array(120, 'mins', 60),
- array(3600, '1 hr'),
- array(7200, 'hrs', 3600),
- array(86400, '1 day'),
- array(172800, 'days', 86400),
- );
+ static $timeFormats = [
+ [0, '< 1 sec'],
+ [1, '1 sec'],
+ [2, 'secs', 1],
+ [60, '1 min'],
+ [120, 'mins', 60],
+ [3600, '1 hr'],
+ [7200, 'hrs', 3600],
+ [86400, '1 day'],
+ [172800, 'days', 86400],
+ ];
foreach ($timeFormats as $index => $format) {
if ($secs >= $format[0]) {
if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0])
- || $index == count($timeFormats) - 1
+ || $index == \count($timeFormats) - 1
) {
- if (2 == count($format)) {
+ if (2 == \count($format)) {
return $format[1];
}
@@ -106,6 +124,11 @@ abstract class Helper implements HelperInterface
public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
{
+ return self::strlen(self::removeDecoration($formatter, $string));
+ }
+
+ public static function removeDecoration(OutputFormatterInterface $formatter, $string)
+ {
$isDecorated = $formatter->isDecorated();
$formatter->setDecorated(false);
// remove <...> formatting
@@ -114,6 +137,6 @@ abstract class Helper implements HelperInterface
$string = preg_replace("/\033\[[^m]*m/", '', $string);
$formatter->setDecorated($isDecorated);
- return self::strlen($string);
+ return $string;
}
}
diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php
index 5a923e0..1ce8235 100644
--- a/vendor/symfony/console/Helper/HelperInterface.php
+++ b/vendor/symfony/console/Helper/HelperInterface.php
@@ -20,8 +20,6 @@ interface HelperInterface
{
/**
* Sets the helper set associated with this helper.
- *
- * @param HelperSet $helperSet A HelperSet instance
*/
public function setHelperSet(HelperSet $helperSet = null);
diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php
index 6f12b39..9aa1e67 100644
--- a/vendor/symfony/console/Helper/HelperSet.php
+++ b/vendor/symfony/console/Helper/HelperSet.php
@@ -24,26 +24,23 @@ class HelperSet implements \IteratorAggregate
/**
* @var Helper[]
*/
- private $helpers = array();
+ private $helpers = [];
private $command;
/**
- * Constructor.
- *
* @param Helper[] $helpers An array of helper
*/
- public function __construct(array $helpers = array())
+ public function __construct(array $helpers = [])
{
foreach ($helpers as $alias => $helper) {
- $this->set($helper, is_int($alias) ? null : $alias);
+ $this->set($helper, \is_int($alias) ? null : $alias);
}
}
/**
* Sets a helper.
*
- * @param HelperInterface $helper The helper instance
- * @param string $alias An alias
+ * @param string $alias An alias
*/
public function set(HelperInterface $helper, $alias = null)
{
@@ -85,11 +82,6 @@ class HelperSet implements \IteratorAggregate
return $this->helpers[$name];
}
- /**
- * Sets the command associated with this helper set.
- *
- * @param Command $command A Command instance
- */
public function setCommand(Command $command = null)
{
$this->command = $command;
@@ -106,8 +98,9 @@ class HelperSet implements \IteratorAggregate
}
/**
- * @return Helper[]
+ * @return \Traversable<Helper>
*/
+ #[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->helpers);
diff --git a/vendor/symfony/console/Helper/InputAwareHelper.php b/vendor/symfony/console/Helper/InputAwareHelper.php
index 4261767..0d0dba2 100644
--- a/vendor/symfony/console/Helper/InputAwareHelper.php
+++ b/vendor/symfony/console/Helper/InputAwareHelper.php
@@ -11,8 +11,8 @@
namespace Symfony\Component\Console\Helper;
-use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputAwareInterface;
+use Symfony\Component\Console\Input\InputInterface;
/**
* An implementation of InputAwareInterface for Helpers.
diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php
index 2c46a2c..862d09f 100644
--- a/vendor/symfony/console/Helper/ProcessHelper.php
+++ b/vendor/symfony/console/Helper/ProcessHelper.php
@@ -15,41 +15,56 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
-use Symfony\Component\Process\ProcessBuilder;
/**
* The ProcessHelper class provides helpers to run external processes.
*
* @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @final since Symfony 4.2
*/
class ProcessHelper extends Helper
{
/**
* Runs an external process.
*
- * @param OutputInterface $output An OutputInterface instance
- * @param string|array|Process $cmd An instance of Process or an array of arguments to escape and run or a command to run
- * @param string|null $error An error message that must be displayed if something went wrong
- * @param callable|null $callback A PHP callback to run whenever there is some
- * output available on STDOUT or STDERR
- * @param int $verbosity The threshold for verbosity
+ * @param array|Process $cmd An instance of Process or an array of the command and arguments
+ * @param string|null $error An error message that must be displayed if something went wrong
+ * @param callable|null $callback A PHP callback to run whenever there is some
+ * output available on STDOUT or STDERR
+ * @param int $verbosity The threshold for verbosity
*
* @return Process The process that ran
*/
public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE)
{
+ if (!class_exists(Process::class)) {
+ throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".');
+ }
+
if ($output instanceof ConsoleOutputInterface) {
$output = $output->getErrorOutput();
}
$formatter = $this->getHelperSet()->get('debug_formatter');
- if (is_array($cmd)) {
- $process = ProcessBuilder::create($cmd)->getProcess();
- } elseif ($cmd instanceof Process) {
- $process = $cmd;
- } else {
+ if ($cmd instanceof Process) {
+ $cmd = [$cmd];
+ }
+
+ if (!\is_array($cmd)) {
+ @trigger_error(sprintf('Passing a command as a string to "%s()" is deprecated since Symfony 4.2, pass it the command as an array of arguments instead.', __METHOD__), \E_USER_DEPRECATED);
+ $cmd = [method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd)];
+ }
+
+ if (\is_string($cmd[0] ?? null)) {
$process = new Process($cmd);
+ $cmd = [];
+ } elseif (($cmd[0] ?? null) instanceof Process) {
+ $process = $cmd[0];
+ unset($cmd[0]);
+ } else {
+ throw new \InvalidArgumentException(sprintf('Invalid command provided to "%s()": the command should be an array whose first element is either the path to the binary to run or a "Process" object.', __METHOD__));
}
if ($verbosity <= $output->getVerbosity()) {
@@ -60,7 +75,7 @@ class ProcessHelper extends Helper
$callback = $this->wrapCallback($output, $process, $callback);
}
- $process->run($callback);
+ $process->run($callback, $cmd);
if ($verbosity <= $output->getVerbosity()) {
$message = $process->isSuccessful() ? 'Command ran successfully' : sprintf('%s Command did not run successfully', $process->getExitCode());
@@ -80,11 +95,10 @@ class ProcessHelper extends Helper
* This is identical to run() except that an exception is thrown if the process
* exits with a non-zero exit code.
*
- * @param OutputInterface $output An OutputInterface instance
- * @param string|Process $cmd An instance of Process or a command to run
- * @param string|null $error An error message that must be displayed if something went wrong
- * @param callable|null $callback A PHP callback to run whenever there is some
- * output available on STDOUT or STDERR
+ * @param array|Process $cmd An instance of Process or a command to run
+ * @param string|null $error An error message that must be displayed if something went wrong
+ * @param callable|null $callback A PHP callback to run whenever there is some
+ * output available on STDOUT or STDERR
*
* @return Process The process that ran
*
@@ -106,10 +120,6 @@ class ProcessHelper extends Helper
/**
* Wraps a Process callback to add debugging output.
*
- * @param OutputInterface $output An OutputInterface interface
- * @param Process $process The Process
- * @param callable|null $callback A PHP callable
- *
* @return callable
*/
public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null)
@@ -124,12 +134,12 @@ class ProcessHelper extends Helper
$output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type));
if (null !== $callback) {
- call_user_func($callback, $type, $buffer);
+ $callback($type, $buffer);
}
};
}
- private function escapeString($str)
+ private function escapeString(string $str): string
{
return str_replace('<', '\\<', $str);
}
diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php
index 6aea12e..1de9b7b 100644
--- a/vendor/symfony/console/Helper/ProgressBar.php
+++ b/vendor/symfony/console/Helper/ProgressBar.php
@@ -11,9 +11,11 @@
namespace Symfony\Component\Console\Helper;
+use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\ConsoleSectionOutput;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Exception\LogicException;
+use Symfony\Component\Console\Terminal;
/**
* The ProgressBar provides helpers to display progress output.
@@ -21,9 +23,8 @@ use Symfony\Component\Console\Exception\LogicException;
* @author Fabien Potencier <fabien@symfony.com>
* @author Chris Jones <leeked@gmail.com>
*/
-class ProgressBar
+final class ProgressBar
{
- // options
private $barWidth = 28;
private $barChar;
private $emptyBarChar = '-';
@@ -31,10 +32,10 @@ class ProgressBar
private $format;
private $internalFormat;
private $redrawFreq = 1;
-
- /**
- * @var OutputInterface
- */
+ private $writeCount;
+ private $lastWriteTime;
+ private $minSecondsBetweenRedraws = 0;
+ private $maxSecondsBetweenRedraws = 1;
private $output;
private $step = 0;
private $max;
@@ -42,20 +43,18 @@ class ProgressBar
private $stepWidth;
private $percent = 0.0;
private $formatLineCount;
- private $messages = array();
+ private $messages = [];
private $overwrite = true;
- private $firstRun = true;
+ private $terminal;
+ private $previousMessage;
private static $formatters;
private static $formats;
/**
- * Constructor.
- *
- * @param OutputInterface $output An OutputInterface instance
- * @param int $max Maximum steps (0 if unknown)
+ * @param int $max Maximum steps (0 if unknown)
*/
- public function __construct(OutputInterface $output, $max = 0)
+ public function __construct(OutputInterface $output, int $max = 0, float $minSecondsBetweenRedraws = 0.1)
{
if ($output instanceof ConsoleOutputInterface) {
$output = $output->getErrorOutput();
@@ -63,13 +62,19 @@ class ProgressBar
$this->output = $output;
$this->setMaxSteps($max);
+ $this->terminal = new Terminal();
+
+ if (0 < $minSecondsBetweenRedraws) {
+ $this->redrawFreq = null;
+ $this->minSecondsBetweenRedraws = $minSecondsBetweenRedraws;
+ }
if (!$this->output->isDecorated()) {
// disable overwrite when output does not support ANSI codes.
$this->overwrite = false;
// set a reasonable redraw frequency so output isn't flooded
- $this->setRedrawFrequency($max / 10);
+ $this->redrawFreq = null;
}
$this->startTime = time();
@@ -83,7 +88,7 @@ class ProgressBar
* @param string $name The placeholder name (including the delimiter char like %)
* @param callable $callable A PHP callable
*/
- public static function setPlaceholderFormatterDefinition($name, callable $callable)
+ public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void
{
if (!self::$formatters) {
self::$formatters = self::initPlaceholderFormatters();
@@ -99,13 +104,13 @@ class ProgressBar
*
* @return callable|null A PHP callable
*/
- public static function getPlaceholderFormatterDefinition($name)
+ public static function getPlaceholderFormatterDefinition(string $name): ?callable
{
if (!self::$formatters) {
self::$formatters = self::initPlaceholderFormatters();
}
- return isset(self::$formatters[$name]) ? self::$formatters[$name] : null;
+ return self::$formatters[$name] ?? null;
}
/**
@@ -116,7 +121,7 @@ class ProgressBar
* @param string $name The format name
* @param string $format A format string
*/
- public static function setFormatDefinition($name, $format)
+ public static function setFormatDefinition(string $name, string $format): void
{
if (!self::$formats) {
self::$formats = self::initFormats();
@@ -132,13 +137,13 @@ class ProgressBar
*
* @return string|null A format string
*/
- public static function getFormatDefinition($name)
+ public static function getFormatDefinition(string $name): ?string
{
if (!self::$formats) {
self::$formats = self::initFormats();
}
- return isset(self::$formats[$name]) ? self::$formats[$name] : null;
+ return self::$formats[$name] ?? null;
}
/**
@@ -151,102 +156,62 @@ class ProgressBar
* @param string $message The text to associate with the placeholder
* @param string $name The name of the placeholder
*/
- public function setMessage($message, $name = 'message')
+ public function setMessage(string $message, string $name = 'message')
{
$this->messages[$name] = $message;
}
- public function getMessage($name = 'message')
+ public function getMessage(string $name = 'message')
{
return $this->messages[$name];
}
- /**
- * Gets the progress bar start time.
- *
- * @return int The progress bar start time
- */
- public function getStartTime()
+ public function getStartTime(): int
{
return $this->startTime;
}
- /**
- * Gets the progress bar maximal steps.
- *
- * @return int The progress bar max steps
- */
- public function getMaxSteps()
+ public function getMaxSteps(): int
{
return $this->max;
}
- /**
- * Gets the current step position.
- *
- * @return int The progress bar step
- */
- public function getProgress()
+ public function getProgress(): int
{
return $this->step;
}
- /**
- * Gets the progress bar step width.
- *
- * @return int The progress bar step width
- */
- private function getStepWidth()
+ private function getStepWidth(): int
{
return $this->stepWidth;
}
- /**
- * Gets the current progress bar percent.
- *
- * @return float The current progress bar percent
- */
- public function getProgressPercent()
+ public function getProgressPercent(): float
{
return $this->percent;
}
- /**
- * Sets the progress bar width.
- *
- * @param int $size The progress bar size
- */
- public function setBarWidth($size)
+ public function getBarOffset(): int
{
- $this->barWidth = (int) $size;
+ return floor($this->max ? $this->percent * $this->barWidth : (null === $this->redrawFreq ? (int) (min(5, $this->barWidth / 15) * $this->writeCount) : $this->step) % $this->barWidth);
}
- /**
- * Gets the progress bar width.
- *
- * @return int The progress bar size
- */
- public function getBarWidth()
+ public function setBarWidth(int $size)
+ {
+ $this->barWidth = max(1, $size);
+ }
+
+ public function getBarWidth(): int
{
return $this->barWidth;
}
- /**
- * Sets the bar character.
- *
- * @param string $char A character
- */
- public function setBarCharacter($char)
+ public function setBarCharacter(string $char)
{
$this->barChar = $char;
}
- /**
- * Gets the bar character.
- *
- * @return string A character
- */
- public function getBarCharacter()
+ public function getBarCharacter(): string
{
if (null === $this->barChar) {
return $this->max ? '=' : $this->emptyBarChar;
@@ -255,52 +220,27 @@ class ProgressBar
return $this->barChar;
}
- /**
- * Sets the empty bar character.
- *
- * @param string $char A character
- */
- public function setEmptyBarCharacter($char)
+ public function setEmptyBarCharacter(string $char)
{
$this->emptyBarChar = $char;
}
- /**
- * Gets the empty bar character.
- *
- * @return string A character
- */
- public function getEmptyBarCharacter()
+ public function getEmptyBarCharacter(): string
{
return $this->emptyBarChar;
}
- /**
- * Sets the progress bar character.
- *
- * @param string $char A character
- */
- public function setProgressCharacter($char)
+ public function setProgressCharacter(string $char)
{
$this->progressChar = $char;
}
- /**
- * Gets the progress bar character.
- *
- * @return string A character
- */
- public function getProgressCharacter()
+ public function getProgressCharacter(): string
{
return $this->progressChar;
}
- /**
- * Sets the progress bar format.
- *
- * @param string $format The format
- */
- public function setFormat($format)
+ public function setFormat(string $format)
{
$this->format = null;
$this->internalFormat = $format;
@@ -309,11 +249,39 @@ class ProgressBar
/**
* Sets the redraw frequency.
*
- * @param int|float $freq The frequency in steps
+ * @param int|null $freq The frequency in steps
*/
- public function setRedrawFrequency($freq)
+ public function setRedrawFrequency(?int $freq)
{
- $this->redrawFreq = max((int) $freq, 1);
+ $this->redrawFreq = null !== $freq ? max(1, $freq) : null;
+ }
+
+ public function minSecondsBetweenRedraws(float $seconds): void
+ {
+ $this->minSecondsBetweenRedraws = $seconds;
+ }
+
+ public function maxSecondsBetweenRedraws(float $seconds): void
+ {
+ $this->maxSecondsBetweenRedraws = $seconds;
+ }
+
+ /**
+ * Returns an iterator that will automatically update the progress bar when iterated.
+ *
+ * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable
+ */
+ public function iterate(iterable $iterable, int $max = null): iterable
+ {
+ $this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0));
+
+ foreach ($iterable as $key => $value) {
+ yield $key => $value;
+
+ $this->advance();
+ }
+
+ $this->finish();
}
/**
@@ -321,7 +289,7 @@ class ProgressBar
*
* @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged
*/
- public function start($max = null)
+ public function start(int $max = null)
{
$this->startTime = time();
$this->step = 0;
@@ -338,55 +306,64 @@ class ProgressBar
* Advances the progress output X steps.
*
* @param int $step Number of steps to advance
- *
- * @throws LogicException
*/
- public function advance($step = 1)
+ public function advance(int $step = 1)
{
$this->setProgress($this->step + $step);
}
/**
* Sets whether to overwrite the progressbar, false for new line.
- *
- * @param bool $overwrite
*/
- public function setOverwrite($overwrite)
+ public function setOverwrite(bool $overwrite)
{
- $this->overwrite = (bool) $overwrite;
+ $this->overwrite = $overwrite;
}
- /**
- * Sets the current progress.
- *
- * @param int $step The current progress
- *
- * @throws LogicException
- */
- public function setProgress($step)
+ public function setProgress(int $step)
{
- $step = (int) $step;
- if ($step < $this->step) {
- throw new LogicException('You can\'t regress the progress bar.');
- }
-
if ($this->max && $step > $this->max) {
$this->max = $step;
+ } elseif ($step < 0) {
+ $step = 0;
}
- $prevPeriod = (int) ($this->step / $this->redrawFreq);
- $currPeriod = (int) ($step / $this->redrawFreq);
+ $redrawFreq = $this->redrawFreq ?? (($this->max ?: 10) / 10);
+ $prevPeriod = (int) ($this->step / $redrawFreq);
+ $currPeriod = (int) ($step / $redrawFreq);
$this->step = $step;
$this->percent = $this->max ? (float) $this->step / $this->max : 0;
- if ($prevPeriod !== $currPeriod || $this->max === $step) {
+ $timeInterval = microtime(true) - $this->lastWriteTime;
+
+ // Draw regardless of other limits
+ if ($this->max === $step) {
+ $this->display();
+
+ return;
+ }
+
+ // Throttling
+ if ($timeInterval < $this->minSecondsBetweenRedraws) {
+ return;
+ }
+
+ // Draw each step period, but not too late
+ if ($prevPeriod !== $currPeriod || $timeInterval >= $this->maxSecondsBetweenRedraws) {
$this->display();
}
}
+ public function setMaxSteps(int $max)
+ {
+ $this->format = null;
+ $this->max = max(0, $max);
+ $this->stepWidth = $this->max ? Helper::strlen((string) $this->max) : 4;
+ }
+
/**
* Finishes the progress output.
*/
- public function finish()
+ public function finish(): void
{
if (!$this->max) {
$this->max = $this->step;
@@ -403,7 +380,7 @@ class ProgressBar
/**
* Outputs the current progress string.
*/
- public function display()
+ public function display(): void
{
if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
return;
@@ -413,21 +390,7 @@ class ProgressBar
$this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
}
- $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) {
- if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
- $text = call_user_func($formatter, $this, $this->output);
- } elseif (isset($this->messages[$matches[1]])) {
- $text = $this->messages[$matches[1]];
- } else {
- return $matches[0];
- }
-
- if (isset($matches[2])) {
- $text = sprintf('%'.$matches[2], $text);
- }
-
- return $text;
- }, $this->format));
+ $this->overwrite($this->buildLine());
}
/**
@@ -437,7 +400,7 @@ class ProgressBar
* while a progress bar is running.
* Call display() to show the progress bar again.
*/
- public function clear()
+ public function clear(): void
{
if (!$this->overwrite) {
return;
@@ -450,12 +413,7 @@ class ProgressBar
$this->overwrite('');
}
- /**
- * Sets the progress bar format.
- *
- * @param string $format The format
- */
- private function setRealFormat($format)
+ private function setRealFormat(string $format)
{
// try to use the _nomax variant if available
if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) {
@@ -470,46 +428,50 @@ class ProgressBar
}
/**
- * Sets the progress bar maximal steps.
- *
- * @param int $max The progress bar max steps
- */
- private function setMaxSteps($max)
- {
- $this->max = max(0, (int) $max);
- $this->stepWidth = $this->max ? Helper::strlen($this->max) : 4;
- }
-
- /**
* Overwrites a previous message to the output.
- *
- * @param string $message The message
*/
- private function overwrite($message)
+ private function overwrite(string $message): void
{
- if ($this->overwrite) {
- if (!$this->firstRun) {
- // Move the cursor to the beginning of the line
- $this->output->write("\x0D");
+ if ($this->previousMessage === $message) {
+ return;
+ }
+
+ $originalMessage = $message;
- // Erase the line
- $this->output->write("\x1B[2K");
+ if ($this->overwrite) {
+ if (null !== $this->previousMessage) {
+ if ($this->output instanceof ConsoleSectionOutput) {
+ $messageLines = explode("\n", $message);
+ $lineCount = \count($messageLines);
+ foreach ($messageLines as $messageLine) {
+ $messageLineLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $messageLine);
+ if ($messageLineLength > $this->terminal->getWidth()) {
+ $lineCount += floor($messageLineLength / $this->terminal->getWidth());
+ }
+ }
+ $this->output->clear($lineCount);
+ } else {
+ // Erase previous lines
+ if ($this->formatLineCount > 0) {
+ $message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount).$message;
+ }
- // Erase previous lines
- if ($this->formatLineCount > 0) {
- $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount));
+ // Move the cursor to the beginning of the line and erase the line
+ $message = "\x0D\x1B[2K$message";
}
}
} elseif ($this->step > 0) {
- $this->output->writeln('');
+ $message = \PHP_EOL.$message;
}
- $this->firstRun = false;
+ $this->previousMessage = $originalMessage;
+ $this->lastWriteTime = microtime(true);
$this->output->write($message);
+ ++$this->writeCount;
}
- private function determineBestFormat()
+ private function determineBestFormat(): string
{
switch ($this->output->getVerbosity()) {
// OutputInterface::VERBOSITY_QUIET: display is disabled anyway
@@ -524,11 +486,11 @@ class ProgressBar
}
}
- private static function initPlaceholderFormatters()
+ private static function initPlaceholderFormatters(): array
{
- return array(
- 'bar' => function (ProgressBar $bar, OutputInterface $output) {
- $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth());
+ return [
+ 'bar' => function (self $bar, OutputInterface $output) {
+ $completeBars = $bar->getBarOffset();
$display = str_repeat($bar->getBarCharacter(), $completeBars);
if ($completeBars < $bar->getBarWidth()) {
$emptyBars = $bar->getBarWidth() - $completeBars - Helper::strlenWithoutDecoration($output->getFormatter(), $bar->getProgressCharacter());
@@ -537,10 +499,10 @@ class ProgressBar
return $display;
},
- 'elapsed' => function (ProgressBar $bar) {
+ 'elapsed' => function (self $bar) {
return Helper::formatTime(time() - $bar->getStartTime());
},
- 'remaining' => function (ProgressBar $bar) {
+ 'remaining' => function (self $bar) {
if (!$bar->getMaxSteps()) {
throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.');
}
@@ -553,7 +515,7 @@ class ProgressBar
return Helper::formatTime($remaining);
},
- 'estimated' => function (ProgressBar $bar) {
+ 'estimated' => function (self $bar) {
if (!$bar->getMaxSteps()) {
throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.');
}
@@ -566,24 +528,24 @@ class ProgressBar
return Helper::formatTime($estimated);
},
- 'memory' => function (ProgressBar $bar) {
+ 'memory' => function (self $bar) {
return Helper::formatMemory(memory_get_usage(true));
},
- 'current' => function (ProgressBar $bar) {
- return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT);
+ 'current' => function (self $bar) {
+ return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', \STR_PAD_LEFT);
},
- 'max' => function (ProgressBar $bar) {
+ 'max' => function (self $bar) {
return $bar->getMaxSteps();
},
- 'percent' => function (ProgressBar $bar) {
+ 'percent' => function (self $bar) {
return floor($bar->getProgressPercent() * 100);
},
- );
+ ];
}
- private static function initFormats()
+ private static function initFormats(): array
{
- return array(
+ return [
'normal' => ' %current%/%max% [%bar%] %percent:3s%%',
'normal_nomax' => ' %current% [%bar%]',
@@ -595,6 +557,43 @@ class ProgressBar
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
- );
+ ];
+ }
+
+ private function buildLine(): string
+ {
+ $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i";
+ $callback = function ($matches) {
+ if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) {
+ $text = $formatter($this, $this->output);
+ } elseif (isset($this->messages[$matches[1]])) {
+ $text = $this->messages[$matches[1]];
+ } else {
+ return $matches[0];
+ }
+
+ if (isset($matches[2])) {
+ $text = sprintf('%'.$matches[2], $text);
+ }
+
+ return $text;
+ };
+ $line = preg_replace_callback($regex, $callback, $this->format);
+
+ // gets string length for each sub line with multiline format
+ $linesLength = array_map(function ($subLine) {
+ return Helper::strlenWithoutDecoration($this->output->getFormatter(), rtrim($subLine, "\r"));
+ }, explode("\n", $line));
+
+ $linesWidth = max($linesLength);
+
+ $terminalWidth = $this->terminal->getWidth();
+ if ($linesWidth <= $terminalWidth) {
+ return $line;
+ }
+
+ $this->setBarWidth($this->barWidth - $linesWidth + $terminalWidth);
+
+ return preg_replace_callback($regex, $callback, $this->format);
}
}
diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php
index f90a85c..dc37148 100644
--- a/vendor/symfony/console/Helper/ProgressIndicator.php
+++ b/vendor/symfony/console/Helper/ProgressIndicator.php
@@ -28,19 +28,17 @@ class ProgressIndicator
private $indicatorCurrent;
private $indicatorChangeInterval;
private $indicatorUpdateTime;
- private $lastMessagesLength;
private $started = false;
private static $formatters;
private static $formats;
/**
- * @param OutputInterface $output
- * @param string|null $format Indicator format
- * @param int $indicatorChangeInterval Change interval in milliseconds
- * @param array|null $indicatorValues Animated indicator characters
+ * @param string|null $format Indicator format
+ * @param int $indicatorChangeInterval Change interval in milliseconds
+ * @param array|null $indicatorValues Animated indicator characters
*/
- public function __construct(OutputInterface $output, $format = null, $indicatorChangeInterval = 100, $indicatorValues = null)
+ public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null)
{
$this->output = $output;
@@ -49,12 +47,12 @@ class ProgressIndicator
}
if (null === $indicatorValues) {
- $indicatorValues = array('-', '\\', '|', '/');
+ $indicatorValues = ['-', '\\', '|', '/'];
}
$indicatorValues = array_values($indicatorValues);
- if (2 > count($indicatorValues)) {
+ if (2 > \count($indicatorValues)) {
throw new InvalidArgumentException('Must have at least 2 indicator value characters.');
}
@@ -89,7 +87,6 @@ class ProgressIndicator
$this->message = $message;
$this->started = true;
- $this->lastMessagesLength = 0;
$this->startTime = time();
$this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval;
$this->indicatorCurrent = 0;
@@ -152,7 +149,7 @@ class ProgressIndicator
self::$formats = self::initFormats();
}
- return isset(self::$formats[$name]) ? self::$formats[$name] : null;
+ return self::$formats[$name] ?? null;
}
/**
@@ -185,7 +182,7 @@ class ProgressIndicator
self::$formatters = self::initPlaceholderFormatters();
}
- return isset(self::$formatters[$name]) ? self::$formatters[$name] : null;
+ return self::$formatters[$name] ?? null;
}
private function display()
@@ -194,18 +191,16 @@ class ProgressIndicator
return;
}
- $self = $this;
-
- $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) {
- if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) {
- return call_user_func($formatter, $self);
+ $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) {
+ if ($formatter = self::getPlaceholderFormatterDefinition($matches[1])) {
+ return $formatter($this);
}
return $matches[0];
- }, $this->format));
+ }, $this->format ?? ''));
}
- private function determineBestFormat()
+ private function determineBestFormat(): string
{
switch ($this->output->getVerbosity()) {
// OutputInterface::VERBOSITY_QUIET: display is disabled anyway
@@ -221,60 +216,43 @@ class ProgressIndicator
/**
* Overwrites a previous message to the output.
- *
- * @param string $message The message
*/
- private function overwrite($message)
+ private function overwrite(string $message)
{
- // append whitespace to match the line's length
- if (null !== $this->lastMessagesLength) {
- if ($this->lastMessagesLength > Helper::strlenWithoutDecoration($this->output->getFormatter(), $message)) {
- $message = str_pad($message, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT);
- }
- }
-
if ($this->output->isDecorated()) {
- $this->output->write("\x0D");
+ $this->output->write("\x0D\x1B[2K");
$this->output->write($message);
} else {
$this->output->writeln($message);
}
-
- $this->lastMessagesLength = 0;
-
- $len = Helper::strlenWithoutDecoration($this->output->getFormatter(), $message);
-
- if ($len > $this->lastMessagesLength) {
- $this->lastMessagesLength = $len;
- }
}
- private function getCurrentTimeInMilliseconds()
+ private function getCurrentTimeInMilliseconds(): float
{
return round(microtime(true) * 1000);
}
- private static function initPlaceholderFormatters()
+ private static function initPlaceholderFormatters(): array
{
- return array(
- 'indicator' => function (ProgressIndicator $indicator) {
- return $indicator->indicatorValues[$indicator->indicatorCurrent % count($indicator->indicatorValues)];
+ return [
+ 'indicator' => function (self $indicator) {
+ return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)];
},
- 'message' => function (ProgressIndicator $indicator) {
+ 'message' => function (self $indicator) {
return $indicator->message;
},
- 'elapsed' => function (ProgressIndicator $indicator) {
+ 'elapsed' => function (self $indicator) {
return Helper::formatTime(time() - $indicator->startTime);
},
'memory' => function () {
return Helper::formatMemory(memory_get_usage(true));
},
- );
+ ];
}
- private static function initFormats()
+ private static function initFormats(): array
{
- return array(
+ return [
'normal' => ' %indicator% %message%',
'normal_no_ansi' => ' %message%',
@@ -283,6 +261,6 @@ class ProgressIndicator
'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)',
'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)',
- );
+ ];
}
}
diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php
index 4012b08..a4754b8 100644
--- a/vendor/symfony/console/Helper/QuestionHelper.php
+++ b/vendor/symfony/console/Helper/QuestionHelper.php
@@ -11,14 +11,18 @@
namespace Symfony\Component\Console\Helper;
-use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Exception\MissingInputException;
use Symfony\Component\Console\Exception\RuntimeException;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\StreamableInputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\ConsoleSectionOutput;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Formatter\OutputFormatterStyle;
-use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Question\ChoiceQuestion;
+use Symfony\Component\Console\Question\Question;
+use Symfony\Component\Console\Terminal;
/**
* The QuestionHelper class provides helpers to interact with the user.
@@ -29,16 +33,13 @@ class QuestionHelper extends Helper
{
private $inputStream;
private static $shell;
- private static $stty;
+ private static $stty = true;
+ private static $stdinIsInteractive;
/**
* Asks a question to the user.
*
- * @param InputInterface $input An InputInterface instance
- * @param OutputInterface $output An OutputInterface instance
- * @param Question $question The question to ask
- *
- * @return string The user answer
+ * @return mixed The user answer
*
* @throws RuntimeException If there is no data to read in the input stream
*/
@@ -49,80 +50,71 @@ class QuestionHelper extends Helper
}
if (!$input->isInteractive()) {
- return $question->getDefault();
+ return $this->getDefaultAnswer($question);
}
- if (!$question->getValidator()) {
- return $this->doAsk($output, $question);
+ if ($input instanceof StreamableInputInterface && $stream = $input->getStream()) {
+ $this->inputStream = $stream;
}
- $interviewer = function () use ($output, $question) {
- return $this->doAsk($output, $question);
- };
+ try {
+ if (!$question->getValidator()) {
+ return $this->doAsk($output, $question);
+ }
- return $this->validateAttempts($interviewer, $output, $question);
- }
+ $interviewer = function () use ($output, $question) {
+ return $this->doAsk($output, $question);
+ };
- /**
- * Sets the input stream to read from when interacting with the user.
- *
- * This is mainly useful for testing purpose.
- *
- * @param resource $stream The input stream
- *
- * @throws InvalidArgumentException In case the stream is not a resource
- */
- public function setInputStream($stream)
- {
- if (!is_resource($stream)) {
- throw new InvalidArgumentException('Input stream must be a valid resource.');
- }
+ return $this->validateAttempts($interviewer, $output, $question);
+ } catch (MissingInputException $exception) {
+ $input->setInteractive(false);
- $this->inputStream = $stream;
+ if (null === $fallbackOutput = $this->getDefaultAnswer($question)) {
+ throw $exception;
+ }
+
+ return $fallbackOutput;
+ }
}
/**
- * Returns the helper's input stream.
- *
- * @return resource
+ * {@inheritdoc}
*/
- public function getInputStream()
+ public function getName()
{
- return $this->inputStream;
+ return 'question';
}
/**
- * {@inheritdoc}
+ * Prevents usage of stty.
*/
- public function getName()
+ public static function disableStty()
{
- return 'question';
+ self::$stty = false;
}
/**
* Asks the question to the user.
*
- * @param OutputInterface $output
- * @param Question $question
- *
- * @return bool|mixed|null|string
+ * @return mixed
*
- * @throws \Exception
- * @throws \RuntimeException
+ * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
private function doAsk(OutputInterface $output, Question $question)
{
$this->writePrompt($output, $question);
- $inputStream = $this->inputStream ?: STDIN;
- $autocomplete = $question->getAutocompleterValues();
+ $inputStream = $this->inputStream ?: \STDIN;
+ $autocomplete = $question->getAutocompleterCallback();
- if (null === $autocomplete || !$this->hasSttyAvailable()) {
+ if (null === $autocomplete || !self::$stty || !Terminal::hasSttyAvailable()) {
$ret = false;
if ($question->isHidden()) {
try {
- $ret = trim($this->getHiddenResponse($output, $inputStream));
- } catch (\RuntimeException $e) {
+ $hiddenResponse = $this->getHiddenResponse($output, $inputStream, $question->isTrimmable());
+ $ret = $question->isTrimmable() ? trim($hiddenResponse) : $hiddenResponse;
+ } catch (RuntimeException $e) {
if (!$question->isHiddenFallback()) {
throw $e;
}
@@ -130,17 +122,26 @@ class QuestionHelper extends Helper
}
if (false === $ret) {
+ $cp = $this->setIOCodepage();
$ret = fgets($inputStream, 4096);
+ $ret = $this->resetIOCodepage($cp, $ret);
if (false === $ret) {
- throw new \RuntimeException('Aborted');
+ throw new MissingInputException('Aborted.');
+ }
+ if ($question->isTrimmable()) {
+ $ret = trim($ret);
}
- $ret = trim($ret);
}
} else {
- $ret = trim($this->autocomplete($output, $question, $inputStream));
+ $autocomplete = $this->autocomplete($output, $question, $inputStream, $autocomplete);
+ $ret = $question->isTrimmable() ? trim($autocomplete) : $autocomplete;
+ }
+
+ if ($output instanceof ConsoleSectionOutput) {
+ $output->addContent($ret);
}
- $ret = strlen($ret) > 0 ? $ret : $question->getDefault();
+ $ret = \strlen($ret) > 0 ? $ret : $question->getDefault();
if ($normalizer = $question->getNormalizer()) {
return $normalizer($ret);
@@ -150,25 +151,46 @@ class QuestionHelper extends Helper
}
/**
+ * @return mixed
+ */
+ private function getDefaultAnswer(Question $question)
+ {
+ $default = $question->getDefault();
+
+ if (null === $default) {
+ return $default;
+ }
+
+ if ($validator = $question->getValidator()) {
+ return \call_user_func($question->getValidator(), $default);
+ } elseif ($question instanceof ChoiceQuestion) {
+ $choices = $question->getChoices();
+
+ if (!$question->isMultiselect()) {
+ return $choices[$default] ?? $default;
+ }
+
+ $default = explode(',', $default);
+ foreach ($default as $k => $v) {
+ $v = $question->isTrimmable() ? trim($v) : $v;
+ $default[$k] = $choices[$v] ?? $v;
+ }
+ }
+
+ return $default;
+ }
+
+ /**
* Outputs the question prompt.
- *
- * @param OutputInterface $output
- * @param Question $question
*/
protected function writePrompt(OutputInterface $output, Question $question)
{
$message = $question->getQuestion();
if ($question instanceof ChoiceQuestion) {
- $maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices())));
-
- $messages = (array) $question->getQuestion();
- foreach ($question->getChoices() as $key => $value) {
- $width = $maxWidth - $this->strlen($key);
- $messages[] = ' [<info>'.$key.str_repeat(' ', $width).'</info>] '.$value;
- }
-
- $output->writeln($messages);
+ $output->writeln(array_merge([
+ $question->getQuestion(),
+ ], $this->formatChoiceQuestionChoices($question, 'info')));
$message = $question->getPrompt();
}
@@ -177,10 +199,27 @@ class QuestionHelper extends Helper
}
/**
- * Outputs an error message.
+ * @param string $tag
*
- * @param OutputInterface $output
- * @param \Exception $error
+ * @return string[]
+ */
+ protected function formatChoiceQuestionChoices(ChoiceQuestion $question, $tag)
+ {
+ $messages = [];
+
+ $maxWidth = max(array_map([__CLASS__, 'strlen'], array_keys($choices = $question->getChoices())));
+
+ foreach ($choices as $key => $value) {
+ $padding = str_repeat(' ', $maxWidth - self::strlen($key));
+
+ $messages[] = sprintf(" [<$tag>%s$padding</$tag>] %s", $key, $value);
+ }
+
+ return $messages;
+ }
+
+ /**
+ * Outputs an error message.
*/
protected function writeError(OutputInterface $output, \Exception $error)
{
@@ -196,21 +235,17 @@ class QuestionHelper extends Helper
/**
* Autocompletes a question.
*
- * @param OutputInterface $output
- * @param Question $question
- * @param resource $inputStream
- *
- * @return string
+ * @param resource $inputStream
*/
- private function autocomplete(OutputInterface $output, Question $question, $inputStream)
+ private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string
{
- $autocomplete = $question->getAutocompleterValues();
+ $fullChoice = '';
$ret = '';
$i = 0;
$ofs = -1;
- $matches = $autocomplete;
- $numMatches = count($matches);
+ $matches = $autocomplete($ret);
+ $numMatches = \count($matches);
$sttyMode = shell_exec('stty -g');
@@ -224,24 +259,28 @@ class QuestionHelper extends Helper
while (!feof($inputStream)) {
$c = fread($inputStream, 1);
- // Backspace Character
- if ("\177" === $c) {
+ // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false.
+ if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) {
+ shell_exec(sprintf('stty %s', $sttyMode));
+ throw new MissingInputException('Aborted.');
+ } elseif ("\177" === $c) { // Backspace Character
if (0 === $numMatches && 0 !== $i) {
--$i;
+ $fullChoice = self::substr($fullChoice, 0, $i);
// Move cursor backwards
$output->write("\033[1D");
}
- if ($i === 0) {
+ if (0 === $i) {
$ofs = -1;
- $matches = $autocomplete;
- $numMatches = count($matches);
+ $matches = $autocomplete($ret);
+ $numMatches = \count($matches);
} else {
$numMatches = 0;
}
// Pop the last character off the end of our string
- $ret = substr($ret, 0, $i);
+ $ret = self::substr($ret, 0, $i);
} elseif ("\033" === $c) {
// Did we read an escape sequence?
$c .= fread($inputStream, 2);
@@ -259,13 +298,24 @@ class QuestionHelper extends Helper
$ofs += ('A' === $c[2]) ? -1 : 1;
$ofs = ($numMatches + $ofs) % $numMatches;
}
- } elseif (ord($c) < 32) {
+ } elseif (\ord($c) < 32) {
if ("\t" === $c || "\n" === $c) {
if ($numMatches > 0 && -1 !== $ofs) {
- $ret = $matches[$ofs];
+ $ret = (string) $matches[$ofs];
// Echo out remaining chars for current match
- $output->write(substr($ret, $i));
- $i = strlen($ret);
+ $remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))));
+ $output->write($remainingCharacters);
+ $fullChoice .= $remainingCharacters;
+ $i = (false === $encoding = mb_detect_encoding($fullChoice, null, true)) ? \strlen($fullChoice) : mb_strlen($fullChoice, $encoding);
+
+ $matches = array_filter(
+ $autocomplete($ret),
+ function ($match) use ($ret) {
+ return '' === $ret || str_starts_with($match, $ret);
+ }
+ );
+ $numMatches = \count($matches);
+ $ofs = -1;
}
if ("\n" === $c) {
@@ -278,16 +328,27 @@ class QuestionHelper extends Helper
continue;
} else {
+ if ("\x80" <= $c) {
+ $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]);
+ }
+
$output->write($c);
$ret .= $c;
+ $fullChoice .= $c;
++$i;
+ $tempRet = $ret;
+
+ if ($question instanceof ChoiceQuestion && $question->isMultiselect()) {
+ $tempRet = $this->mostRecentlyEnteredValue($fullChoice);
+ }
+
$numMatches = 0;
$ofs = 0;
- foreach ($autocomplete as $value) {
+ foreach ($autocomplete($ret) as $value) {
// If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle)
- if (0 === strpos($value, $ret) && $i !== strlen($value)) {
+ if (str_starts_with($value, $tempRet)) {
$matches[$numMatches++] = $value;
}
}
@@ -299,8 +360,9 @@ class QuestionHelper extends Helper
if ($numMatches > 0 && -1 !== $ofs) {
// Save cursor position
$output->write("\0337");
- // Write highlighted text
- $output->write('<hl>'.substr($matches[$ofs], $i).'</hl>');
+ // Write highlighted text, complete the partially entered response
+ $charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)));
+ $output->write('<hl>'.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).'</hl>');
// Restore cursor position
$output->write("\0338");
}
@@ -309,22 +371,35 @@ class QuestionHelper extends Helper
// Reset stty so it behaves normally again
shell_exec(sprintf('stty %s', $sttyMode));
- return $ret;
+ return $fullChoice;
+ }
+
+ private function mostRecentlyEnteredValue(string $entered): string
+ {
+ // Determine the most recent value that the user entered
+ if (!str_contains($entered, ',')) {
+ return $entered;
+ }
+
+ $choices = explode(',', $entered);
+ if ('' !== $lastChoice = trim($choices[\count($choices) - 1])) {
+ return $lastChoice;
+ }
+
+ return $entered;
}
/**
* Gets a hidden response from user.
*
- * @param OutputInterface $output An Output instance
- * @param resource $inputStream The handler resource
- *
- * @return string The answer
+ * @param resource $inputStream The handler resource
+ * @param bool $trimmable Is the answer trimmable
*
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
- private function getHiddenResponse(OutputInterface $output, $inputStream)
+ private function getHiddenResponse(OutputInterface $output, $inputStream, bool $trimmable = true): string
{
- if ('\\' === DIRECTORY_SEPARATOR) {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
$exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
// handle code running from a phar
@@ -334,7 +409,8 @@ class QuestionHelper extends Helper
$exe = $tmpExe;
}
- $value = rtrim(shell_exec($exe));
+ $sExec = shell_exec('"'.$exe.'"');
+ $value = $trimmable ? rtrim($sExec) : $sExec;
$output->writeln('');
if (isset($tmpExe)) {
@@ -344,43 +420,36 @@ class QuestionHelper extends Helper
return $value;
}
- if ($this->hasSttyAvailable()) {
+ if (self::$stty && Terminal::hasSttyAvailable()) {
$sttyMode = shell_exec('stty -g');
-
shell_exec('stty -echo');
- $value = fgets($inputStream, 4096);
- shell_exec(sprintf('stty %s', $sttyMode));
-
- if (false === $value) {
- throw new RuntimeException('Aborted');
- }
+ } elseif ($this->isInteractiveInput($inputStream)) {
+ throw new RuntimeException('Unable to hide the response.');
+ }
- $value = trim($value);
- $output->writeln('');
+ $value = fgets($inputStream, 4096);
- return $value;
+ if (self::$stty && Terminal::hasSttyAvailable()) {
+ shell_exec(sprintf('stty %s', $sttyMode));
}
- if (false !== $shell = $this->getShell()) {
- $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword';
- $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd);
- $value = rtrim(shell_exec($command));
- $output->writeln('');
-
- return $value;
+ if (false === $value) {
+ throw new MissingInputException('Aborted.');
+ }
+ if ($trimmable) {
+ $value = trim($value);
}
+ $output->writeln('');
- throw new RuntimeException('Unable to hide the response.');
+ return $value;
}
/**
* Validates an attempt.
*
- * @param callable $interviewer A callable that will ask for a question and return the result
- * @param OutputInterface $output An Output instance
- * @param Question $question A Question instance
+ * @param callable $interviewer A callable that will ask for a question and return the result
*
- * @return string The validated response
+ * @return mixed The validated response
*
* @throws \Exception In case the max number of attempts has been reached and no valid response has been given
*/
@@ -388,13 +457,16 @@ class QuestionHelper extends Helper
{
$error = null;
$attempts = $question->getMaxAttempts();
+
while (null === $attempts || $attempts--) {
if (null !== $error) {
$this->writeError($output, $error);
}
try {
- return call_user_func($question->getValidator(), $interviewer());
+ return $question->getValidator()($interviewer());
+ } catch (RuntimeException $e) {
+ throw $e;
} catch (\Exception $error) {
}
}
@@ -402,46 +474,67 @@ class QuestionHelper extends Helper
throw $error;
}
- /**
- * Returns a valid unix shell.
- *
- * @return string|bool The valid shell name, false in case no valid shell is found
- */
- private function getShell()
+ private function isInteractiveInput($inputStream): bool
{
- if (null !== self::$shell) {
- return self::$shell;
+ if ('php://stdin' !== (stream_get_meta_data($inputStream)['uri'] ?? null)) {
+ return false;
}
- self::$shell = false;
+ if (null !== self::$stdinIsInteractive) {
+ return self::$stdinIsInteractive;
+ }
- if (file_exists('/usr/bin/env')) {
- // handle other OSs with bash/zsh/ksh/csh if available to hide the answer
- $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null";
- foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) {
- if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) {
- self::$shell = $sh;
- break;
- }
- }
+ if (\function_exists('stream_isatty')) {
+ return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r'));
}
- return self::$shell;
+ if (\function_exists('posix_isatty')) {
+ return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r'));
+ }
+
+ if (!\function_exists('exec')) {
+ return self::$stdinIsInteractive = true;
+ }
+
+ exec('stty 2> /dev/null', $output, $status);
+
+ return self::$stdinIsInteractive = 1 !== $status;
}
/**
- * Returns whether Stty is available or not.
+ * Sets console I/O to the host code page.
*
- * @return bool
+ * @return int Previous code page in IBM/EBCDIC format
*/
- private function hasSttyAvailable()
+ private function setIOCodepage(): int
{
- if (null !== self::$stty) {
- return self::$stty;
+ if (\function_exists('sapi_windows_cp_set')) {
+ $cp = sapi_windows_cp_get();
+ sapi_windows_cp_set(sapi_windows_cp_get('oem'));
+
+ return $cp;
}
- exec('stty 2>&1', $output, $exitcode);
+ return 0;
+ }
+
+ /**
+ * Sets console I/O to the specified code page and converts the user input.
+ *
+ * @param string|false $input
+ *
+ * @return string|false
+ */
+ private function resetIOCodepage(int $cp, $input)
+ {
+ if (0 !== $cp) {
+ sapi_windows_cp_set($cp);
+
+ if (false !== $input && '' !== $input) {
+ $input = sapi_windows_cp_conv(sapi_windows_cp_get('oem'), $cp, $input);
+ }
+ }
- return self::$stty = $exitcode === 0;
+ return $input;
}
}
diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
index 88351d1..ace5e18 100644
--- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
+++ b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php
@@ -11,14 +11,12 @@
namespace Symfony\Component\Console\Helper;
-use Symfony\Component\Console\Exception\LogicException;
-use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Console\Style\SymfonyStyle;
-use Symfony\Component\Console\Formatter\OutputFormatter;
/**
* Symfony Style Guide compliant question helper.
@@ -30,31 +28,9 @@ class SymfonyQuestionHelper extends QuestionHelper
/**
* {@inheritdoc}
*/
- public function ask(InputInterface $input, OutputInterface $output, Question $question)
- {
- $validator = $question->getValidator();
- $question->setValidator(function ($value) use ($validator) {
- if (null !== $validator) {
- $value = $validator($value);
- } else {
- // make required
- if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) {
- throw new LogicException('A value is required.');
- }
- }
-
- return $value;
- });
-
- return parent::ask($input, $output, $question);
- }
-
- /**
- * {@inheritdoc}
- */
protected function writePrompt(OutputInterface $output, Question $question)
{
- $text = OutputFormatter::escape($question->getQuestion());
+ $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());
$default = $question->getDefault();
switch (true) {
@@ -82,7 +58,7 @@ class SymfonyQuestionHelper extends QuestionHelper
case $question instanceof ChoiceQuestion:
$choices = $question->getChoices();
- $text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape($choices[$default]));
+ $text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, OutputFormatter::escape($choices[$default] ?? $default));
break;
@@ -92,15 +68,15 @@ class SymfonyQuestionHelper extends QuestionHelper
$output->writeln($text);
+ $prompt = ' > ';
+
if ($question instanceof ChoiceQuestion) {
- $width = max(array_map('strlen', array_keys($question->getChoices())));
+ $output->writeln($this->formatChoiceQuestionChoices($question, 'comment'));
- foreach ($question->getChoices() as $key => $value) {
- $output->writeln(sprintf(" [<comment>%-${width}s</comment>] %s", $key, $value));
- }
+ $prompt = $question->getPrompt();
}
- $output->write(' > ');
+ $output->write($prompt);
}
/**
diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php
index 1434562..99496b1 100644
--- a/vendor/symfony/console/Helper/Table.php
+++ b/vendor/symfony/console/Helper/Table.php
@@ -11,8 +11,12 @@
namespace Symfony\Component\Console\Helper;
-use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Exception\RuntimeException;
+use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface;
+use Symfony\Component\Console\Output\ConsoleSectionOutput;
+use Symfony\Component\Console\Output\OutputInterface;
/**
* Provides helpers to display a table.
@@ -21,34 +25,40 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
* @author Саша Стаменковић <umpirsky@gmail.com>
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
* @author Max Grigorian <maxakawizard@gmail.com>
+ * @author Dany Maillard <danymaillard93b@gmail.com>
*/
class Table
{
+ private const SEPARATOR_TOP = 0;
+ private const SEPARATOR_TOP_BOTTOM = 1;
+ private const SEPARATOR_MID = 2;
+ private const SEPARATOR_BOTTOM = 3;
+ private const BORDER_OUTSIDE = 0;
+ private const BORDER_INSIDE = 1;
+
+ private $headerTitle;
+ private $footerTitle;
+
/**
* Table headers.
- *
- * @var array
*/
- private $headers = array();
+ private $headers = [];
/**
* Table rows.
- *
- * @var array
*/
- private $rows = array();
+ private $rows = [];
+ private $horizontal = false;
/**
* Column widths cache.
- *
- * @var array
*/
- private $effectiveColumnWidths = array();
+ private $effectiveColumnWidths = [];
/**
* Number of columns cache.
*
- * @var array
+ * @var int
*/
private $numberOfColumns;
@@ -65,17 +75,20 @@ class Table
/**
* @var array
*/
- private $columnStyles = array();
+ private $columnStyles = [];
/**
* User set column widths.
*
* @var array
*/
- private $columnWidths = array();
+ private $columnWidths = [];
+ private $columnMaxWidths = [];
private static $styles;
+ private $rendered = false;
+
public function __construct(OutputInterface $output)
{
$this->output = $output;
@@ -90,8 +103,7 @@ class Table
/**
* Sets a style definition.
*
- * @param string $name The style name
- * @param TableStyle $style A TableStyle instance
+ * @param string $name The style name
*/
public static function setStyleDefinition($name, TableStyle $style)
{
@@ -107,7 +119,7 @@ class Table
*
* @param string $name The style name
*
- * @return TableStyle A TableStyle instance
+ * @return TableStyle
*/
public static function getStyleDefinition($name)
{
@@ -127,7 +139,7 @@ class Table
*
* @param TableStyle|string $name The style name or a TableStyle instance
*
- * @return Table
+ * @return $this
*/
public function setStyle($name)
{
@@ -152,11 +164,11 @@ class Table
* @param int $columnIndex Column index
* @param TableStyle|string $name The style name or a TableStyle instance
*
- * @return Table
+ * @return $this
*/
public function setColumnStyle($columnIndex, $name)
{
- $columnIndex = intval($columnIndex);
+ $columnIndex = (int) $columnIndex;
$this->columnStyles[$columnIndex] = $this->resolveStyle($name);
@@ -174,11 +186,7 @@ class Table
*/
public function getColumnStyle($columnIndex)
{
- if (isset($this->columnStyles[$columnIndex])) {
- return $this->columnStyles[$columnIndex];
- }
-
- return $this->getStyle();
+ return $this->columnStyles[$columnIndex] ?? $this->getStyle();
}
/**
@@ -187,11 +195,11 @@ class Table
* @param int $columnIndex Column index
* @param int $width Minimum column width in characters
*
- * @return Table
+ * @return $this
*/
public function setColumnWidth($columnIndex, $width)
{
- $this->columnWidths[intval($columnIndex)] = intval($width);
+ $this->columnWidths[(int) $columnIndex] = (int) $width;
return $this;
}
@@ -199,13 +207,11 @@ class Table
/**
* Sets the minimum width of all columns.
*
- * @param array $widths
- *
- * @return Table
+ * @return $this
*/
public function setColumnWidths(array $widths)
{
- $this->columnWidths = array();
+ $this->columnWidths = [];
foreach ($widths as $index => $width) {
$this->setColumnWidth($index, $width);
}
@@ -213,11 +219,30 @@ class Table
return $this;
}
+ /**
+ * Sets the maximum width of a column.
+ *
+ * Any cell within this column which contents exceeds the specified width will be wrapped into multiple lines, while
+ * formatted strings are preserved.
+ *
+ * @return $this
+ */
+ public function setColumnMaxWidth(int $columnIndex, int $width): self
+ {
+ if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) {
+ throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, \get_class($this->output->getFormatter())));
+ }
+
+ $this->columnMaxWidths[$columnIndex] = $width;
+
+ return $this;
+ }
+
public function setHeaders(array $headers)
{
$headers = array_values($headers);
- if (!empty($headers) && !is_array($headers[0])) {
- $headers = array($headers);
+ if (!empty($headers) && !\is_array($headers[0])) {
+ $headers = [$headers];
}
$this->headers = $headers;
@@ -227,7 +252,7 @@ class Table
public function setRows(array $rows)
{
- $this->rows = array();
+ $this->rows = [];
return $this->addRows($rows);
}
@@ -249,7 +274,7 @@ class Table
return $this;
}
- if (!is_array($row)) {
+ if (!\is_array($row)) {
throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.');
}
@@ -258,6 +283,25 @@ class Table
return $this;
}
+ /**
+ * Adds a row to the table, and re-renders the table.
+ */
+ public function appendRow($row): self
+ {
+ if (!$this->output instanceof ConsoleSectionOutput) {
+ throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__));
+ }
+
+ if ($this->rendered) {
+ $this->output->clear($this->calculateRowCount());
+ }
+
+ $this->addRow($row);
+ $this->render();
+
+ return $this;
+ }
+
public function setRow($column, array $row)
{
$this->rows[$column] = $row;
@@ -265,65 +309,177 @@ class Table
return $this;
}
+ public function setHeaderTitle(?string $title): self
+ {
+ $this->headerTitle = $title;
+
+ return $this;
+ }
+
+ public function setFooterTitle(?string $title): self
+ {
+ $this->footerTitle = $title;
+
+ return $this;
+ }
+
+ public function setHorizontal(bool $horizontal = true): self
+ {
+ $this->horizontal = $horizontal;
+
+ return $this;
+ }
+
/**
* Renders table to output.
*
* Example:
- * +---------------+-----------------------+------------------+
- * | ISBN | Title | Author |
- * +---------------+-----------------------+------------------+
- * | 99921-58-10-7 | Divine Comedy | Dante Alighieri |
- * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
- * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
- * +---------------+-----------------------+------------------+
+ *
+ * +---------------+-----------------------+------------------+
+ * | ISBN | Title | Author |
+ * +---------------+-----------------------+------------------+
+ * | 99921-58-10-7 | Divine Comedy | Dante Alighieri |
+ * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
+ * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
+ * +---------------+-----------------------+------------------+
*/
public function render()
{
- $this->calculateNumberOfColumns();
- $rows = $this->buildTableRows($this->rows);
- $headers = $this->buildTableRows($this->headers);
-
- $this->calculateColumnsWidth(array_merge($headers, $rows));
-
- $this->renderRowSeparator();
- if (!empty($headers)) {
- foreach ($headers as $header) {
- $this->renderRow($header, $this->style->getCellHeaderFormat());
- $this->renderRowSeparator();
+ $divider = new TableSeparator();
+ if ($this->horizontal) {
+ $rows = [];
+ foreach ($this->headers[0] ?? [] as $i => $header) {
+ $rows[$i] = [$header];
+ foreach ($this->rows as $row) {
+ if ($row instanceof TableSeparator) {
+ continue;
+ }
+ if (isset($row[$i])) {
+ $rows[$i][] = $row[$i];
+ } elseif ($rows[$i][0] instanceof TableCell && $rows[$i][0]->getColspan() >= 2) {
+ // Noop, there is a "title"
+ } else {
+ $rows[$i][] = null;
+ }
+ }
}
+ } else {
+ $rows = array_merge($this->headers, [$divider], $this->rows);
}
- foreach ($rows as $row) {
- if ($row instanceof TableSeparator) {
- $this->renderRowSeparator();
- } else {
- $this->renderRow($row, $this->style->getCellRowFormat());
+
+ $this->calculateNumberOfColumns($rows);
+
+ $rowGroups = $this->buildTableRows($rows);
+ $this->calculateColumnsWidth($rowGroups);
+
+ $isHeader = !$this->horizontal;
+ $isFirstRow = $this->horizontal;
+ $hasTitle = (bool) $this->headerTitle;
+
+ foreach ($rowGroups as $rowGroup) {
+ $isHeaderSeparatorRendered = false;
+
+ foreach ($rowGroup as $row) {
+ if ($divider === $row) {
+ $isHeader = false;
+ $isFirstRow = true;
+
+ continue;
+ }
+
+ if ($row instanceof TableSeparator) {
+ $this->renderRowSeparator();
+
+ continue;
+ }
+
+ if (!$row) {
+ continue;
+ }
+
+ if ($isHeader && !$isHeaderSeparatorRendered) {
+ $this->renderRowSeparator(
+ $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM,
+ $hasTitle ? $this->headerTitle : null,
+ $hasTitle ? $this->style->getHeaderTitleFormat() : null
+ );
+ $hasTitle = false;
+ $isHeaderSeparatorRendered = true;
+ }
+
+ if ($isFirstRow) {
+ $this->renderRowSeparator(
+ $isHeader ? self::SEPARATOR_TOP : self::SEPARATOR_TOP_BOTTOM,
+ $hasTitle ? $this->headerTitle : null,
+ $hasTitle ? $this->style->getHeaderTitleFormat() : null
+ );
+ $isFirstRow = false;
+ $hasTitle = false;
+ }
+
+ if ($this->horizontal) {
+ $this->renderRow($row, $this->style->getCellRowFormat(), $this->style->getCellHeaderFormat());
+ } else {
+ $this->renderRow($row, $isHeader ? $this->style->getCellHeaderFormat() : $this->style->getCellRowFormat());
+ }
}
}
- if (!empty($rows)) {
- $this->renderRowSeparator();
- }
+ $this->renderRowSeparator(self::SEPARATOR_BOTTOM, $this->footerTitle, $this->style->getFooterTitleFormat());
$this->cleanup();
+ $this->rendered = true;
}
/**
* Renders horizontal header separator.
*
- * Example: +-----+-----------+-------+
+ * Example:
+ *
+ * +-----+-----------+-------+
*/
- private function renderRowSeparator()
+ private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null)
{
if (0 === $count = $this->numberOfColumns) {
return;
}
- if (!$this->style->getHorizontalBorderChar() && !$this->style->getCrossingChar()) {
+ $borders = $this->style->getBorderChars();
+ if (!$borders[0] && !$borders[2] && !$this->style->getCrossingChar()) {
return;
}
- $markup = $this->style->getCrossingChar();
+ $crossings = $this->style->getCrossingChars();
+ if (self::SEPARATOR_MID === $type) {
+ [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[2], $crossings[8], $crossings[0], $crossings[4]];
+ } elseif (self::SEPARATOR_TOP === $type) {
+ [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[1], $crossings[2], $crossings[3]];
+ } elseif (self::SEPARATOR_TOP_BOTTOM === $type) {
+ [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[9], $crossings[10], $crossings[11]];
+ } else {
+ [$horizontal, $leftChar, $midChar, $rightChar] = [$borders[0], $crossings[7], $crossings[6], $crossings[5]];
+ }
+
+ $markup = $leftChar;
for ($column = 0; $column < $count; ++$column) {
- $markup .= str_repeat($this->style->getHorizontalBorderChar(), $this->effectiveColumnWidths[$column]).$this->style->getCrossingChar();
+ $markup .= str_repeat($horizontal, $this->effectiveColumnWidths[$column]);
+ $markup .= $column === $count - 1 ? $rightChar : $midChar;
+ }
+
+ if (null !== $title) {
+ $titleLength = Helper::strlenWithoutDecoration($formatter = $this->output->getFormatter(), $formattedTitle = sprintf($titleFormat, $title));
+ $markupLength = Helper::strlen($markup);
+ if ($titleLength > $limit = $markupLength - 4) {
+ $titleLength = $limit;
+ $formatLength = Helper::strlenWithoutDecoration($formatter, sprintf($titleFormat, ''));
+ $formattedTitle = sprintf($titleFormat, Helper::substr($title, 0, $limit - $formatLength - 3).'...');
+ }
+
+ $titleStart = intdiv($markupLength - $titleLength, 2);
+ if (false === mb_detect_encoding($markup, null, true)) {
+ $markup = substr_replace($markup, $formattedTitle, $titleStart, $titleLength);
+ } else {
+ $markup = mb_substr($markup, 0, $titleStart).$formattedTitle.mb_substr($markup, $titleStart + $titleLength);
+ }
}
$this->output->writeln(sprintf($this->style->getBorderFormat(), $markup));
@@ -332,43 +488,42 @@ class Table
/**
* Renders vertical column separator.
*/
- private function renderColumnSeparator()
+ private function renderColumnSeparator(int $type = self::BORDER_OUTSIDE): string
{
- return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar());
+ $borders = $this->style->getBorderChars();
+
+ return sprintf($this->style->getBorderFormat(), self::BORDER_OUTSIDE === $type ? $borders[1] : $borders[3]);
}
/**
* Renders table row.
*
- * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
+ * Example:
*
- * @param array $row
- * @param string $cellFormat
+ * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
*/
- private function renderRow(array $row, $cellFormat)
- {
- if (empty($row)) {
- return;
- }
-
- $rowContent = $this->renderColumnSeparator();
- foreach ($this->getRowColumns($row) as $column) {
- $rowContent .= $this->renderCell($row, $column, $cellFormat);
- $rowContent .= $this->renderColumnSeparator();
+ private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null)
+ {
+ $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE);
+ $columns = $this->getRowColumns($row);
+ $last = \count($columns) - 1;
+ foreach ($columns as $i => $column) {
+ if ($firstCellFormat && 0 === $i) {
+ $rowContent .= $this->renderCell($row, $column, $firstCellFormat);
+ } else {
+ $rowContent .= $this->renderCell($row, $column, $cellFormat);
+ }
+ $rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE);
}
$this->output->writeln($rowContent);
}
/**
* Renders table cell with padding.
- *
- * @param array $row
- * @param int $column
- * @param string $cellFormat
*/
- private function renderCell(array $row, $column, $cellFormat)
+ private function renderCell(array $row, int $column, string $cellFormat): string
{
- $cell = isset($row[$column]) ? $row[$column] : '';
+ $cell = $row[$column] ?? '';
$width = $this->effectiveColumnWidths[$column];
if ($cell instanceof TableCell && $cell->getColspan() > 1) {
// add the width of the following columns(numbers of colspan).
@@ -379,13 +534,13 @@ class Table
// str_pad won't work properly with multi-byte strings, we need to fix the padding
if (false !== $encoding = mb_detect_encoding($cell, null, true)) {
- $width += strlen($cell) - mb_strwidth($cell, $encoding);
+ $width += \strlen($cell) - mb_strwidth($cell, $encoding);
}
$style = $this->getColumnStyle($column);
if ($cell instanceof TableSeparator) {
- return sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width));
+ return sprintf($style->getBorderFormat(), str_repeat($style->getBorderChars()[2], $width));
}
$width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell);
@@ -397,14 +552,10 @@ class Table
/**
* Calculate number of columns for this table.
*/
- private function calculateNumberOfColumns()
+ private function calculateNumberOfColumns(array $rows)
{
- if (null !== $this->numberOfColumns) {
- return;
- }
-
- $columns = array(0);
- foreach (array_merge($this->headers, $this->rows) as $row) {
+ $columns = [0];
+ foreach ($rows as $row) {
if ($row instanceof TableSeparator) {
continue;
}
@@ -415,80 +566,113 @@ class Table
$this->numberOfColumns = max($columns);
}
- private function buildTableRows($rows)
+ private function buildTableRows(array $rows): TableRows
{
- $unmergedRows = array();
- for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) {
+ /** @var WrappableOutputFormatterInterface $formatter */
+ $formatter = $this->output->getFormatter();
+ $unmergedRows = [];
+ for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) {
$rows = $this->fillNextRows($rows, $rowKey);
// Remove any new line breaks and replace it with a new line
foreach ($rows[$rowKey] as $column => $cell) {
- if (!strstr($cell, "\n")) {
+ $colspan = $cell instanceof TableCell ? $cell->getColspan() : 1;
+
+ if (isset($this->columnMaxWidths[$column]) && Helper::strlenWithoutDecoration($formatter, $cell) > $this->columnMaxWidths[$column]) {
+ $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan);
+ }
+ if (!strstr($cell ?? '', "\n")) {
continue;
}
- $lines = explode("\n", $cell);
+ $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell)));
+ $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped;
+ $lines = explode("\n", str_replace("\n", "<fg=default;bg=default></>\n", $cell));
foreach ($lines as $lineKey => $line) {
- if ($cell instanceof TableCell) {
- $line = new TableCell($line, array('colspan' => $cell->getColspan()));
+ if ($colspan > 1) {
+ $line = new TableCell($line, ['colspan' => $colspan]);
}
if (0 === $lineKey) {
$rows[$rowKey][$column] = $line;
} else {
+ if (!\array_key_exists($rowKey, $unmergedRows) || !\array_key_exists($lineKey, $unmergedRows[$rowKey])) {
+ $unmergedRows[$rowKey][$lineKey] = $this->copyRow($rows, $rowKey);
+ }
$unmergedRows[$rowKey][$lineKey][$column] = $line;
}
}
}
}
- $tableRows = array();
- foreach ($rows as $rowKey => $row) {
- $tableRows[] = $this->fillCells($row);
- if (isset($unmergedRows[$rowKey])) {
- $tableRows = array_merge($tableRows, $unmergedRows[$rowKey]);
+ return new TableRows(function () use ($rows, $unmergedRows): \Traversable {
+ foreach ($rows as $rowKey => $row) {
+ $rowGroup = [$row instanceof TableSeparator ? $row : $this->fillCells($row)];
+
+ if (isset($unmergedRows[$rowKey])) {
+ foreach ($unmergedRows[$rowKey] as $row) {
+ $rowGroup[] = $row instanceof TableSeparator ? $row : $this->fillCells($row);
+ }
+ }
+ yield $rowGroup;
}
+ });
+ }
+
+ private function calculateRowCount(): int
+ {
+ $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, [new TableSeparator()], $this->rows))));
+
+ if ($this->headers) {
+ ++$numberOfRows; // Add row for header separator
}
- return $tableRows;
+ if (\count($this->rows) > 0) {
+ ++$numberOfRows; // Add row for footer separator
+ }
+
+ return $numberOfRows;
}
/**
* fill rows that contains rowspan > 1.
*
- * @param array $rows
- * @param int $line
- *
- * @return array
+ * @throws InvalidArgumentException
*/
- private function fillNextRows($rows, $line)
+ private function fillNextRows(array $rows, int $line): array
{
- $unmergedRows = array();
+ $unmergedRows = [];
foreach ($rows[$line] as $column => $cell) {
+ if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) {
+ throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', \gettype($cell)));
+ }
if ($cell instanceof TableCell && $cell->getRowspan() > 1) {
$nbLines = $cell->getRowspan() - 1;
- $lines = array($cell);
+ $lines = [$cell];
if (strstr($cell, "\n")) {
- $lines = explode("\n", $cell);
- $nbLines = count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
+ $lines = explode("\n", str_replace("\n", "<fg=default;bg=default>\n</>", $cell));
+ $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines;
- $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan()));
+ $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan()]);
unset($lines[0]);
}
// create a two dimensional array (rowspan x colspan)
- $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows);
+ $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows);
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
- $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : '';
- $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan()));
+ $value = $lines[$unmergedRowKey - $line] ?? '';
+ $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan()]);
+ if ($nbLines === $unmergedRowKey - $line) {
+ break;
+ }
}
}
}
foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) {
// we need to know if $unmergedRow will be merged or inserted into $rows
- if (isset($rows[$unmergedRowKey]) && is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
+ if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) {
foreach ($unmergedRow as $cellKey => $cell) {
// insert cell into row at cellKey position
- array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell));
+ array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]);
}
} else {
$row = $this->copyRow($rows, $unmergedRowKey - 1);
@@ -497,7 +681,7 @@ class Table
$row[$column] = $unmergedRow[$column];
}
}
- array_splice($rows, $unmergedRowKey, 0, array($row));
+ array_splice($rows, $unmergedRowKey, 0, [$row]);
}
}
@@ -506,14 +690,11 @@ class Table
/**
* fill cells for a row that contains colspan > 1.
- *
- * @param array $row
- *
- * @return array
*/
- private function fillCells($row)
+ private function fillCells(iterable $row)
{
- $newRow = array();
+ $newRow = [];
+
foreach ($row as $column => $cell) {
$newRow[] = $cell;
if ($cell instanceof TableCell && $cell->getColspan() > 1) {
@@ -527,19 +708,13 @@ class Table
return $newRow ?: $row;
}
- /**
- * @param array $rows
- * @param int $line
- *
- * @return array
- */
- private function copyRow($rows, $line)
+ private function copyRow(array $rows, int $line): array
{
$row = $rows[$line];
foreach ($row as $cellKey => $cellValue) {
$row[$cellKey] = '';
if ($cellValue instanceof TableCell) {
- $row[$cellKey] = new TableCell('', array('colspan' => $cellValue->getColspan()));
+ $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]);
}
}
@@ -548,14 +723,10 @@ class Table
/**
* Gets number of columns by row.
- *
- * @param array $row
- *
- * @return int
*/
- private function getNumberOfColumns(array $row)
+ private function getNumberOfColumns(array $row): int
{
- $columns = count($row);
+ $columns = \count($row);
foreach ($row as $column) {
$columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
}
@@ -565,12 +736,8 @@ class Table
/**
* Gets list of columns for the given row.
- *
- * @param array $row
- *
- * @return array
*/
- private function getRowColumns($row)
+ private function getRowColumns(array $row): array
{
$columns = range(0, $this->numberOfColumns - 1);
foreach ($row as $cellKey => $cell) {
@@ -585,56 +752,44 @@ class Table
/**
* Calculates columns widths.
- *
- * @param array $rows
*/
- private function calculateColumnsWidth($rows)
+ private function calculateColumnsWidth(iterable $groups)
{
for ($column = 0; $column < $this->numberOfColumns; ++$column) {
- $lengths = array();
- foreach ($rows as $row) {
- if ($row instanceof TableSeparator) {
- continue;
- }
+ $lengths = [];
+ foreach ($groups as $group) {
+ foreach ($group as $row) {
+ if ($row instanceof TableSeparator) {
+ continue;
+ }
- foreach ($row as $i => $cell) {
- if ($cell instanceof TableCell) {
- $textLength = strlen($cell);
- if ($textLength > 0) {
- $contentColumns = str_split($cell, ceil($textLength / $cell->getColspan()));
- foreach ($contentColumns as $position => $content) {
- $row[$i + $position] = $content;
+ foreach ($row as $i => $cell) {
+ if ($cell instanceof TableCell) {
+ $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell);
+ $textLength = Helper::strlen($textContent);
+ if ($textLength > 0) {
+ $contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan()));
+ foreach ($contentColumns as $position => $content) {
+ $row[$i + $position] = $content;
+ }
}
}
}
- }
- $lengths[] = $this->getCellWidth($row, $column);
+ $lengths[] = $this->getCellWidth($row, $column);
+ }
}
- $this->effectiveColumnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2;
+ $this->effectiveColumnWidths[$column] = max($lengths) + Helper::strlen($this->style->getCellRowContentFormat()) - 2;
}
}
- /**
- * Gets column width.
- *
- * @return int
- */
- private function getColumnSeparatorWidth()
+ private function getColumnSeparatorWidth(): int
{
- return strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()));
+ return Helper::strlen(sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3]));
}
- /**
- * Gets cell width.
- *
- * @param array $row
- * @param int $column
- *
- * @return int
- */
- private function getCellWidth(array $row, $column)
+ private function getCellWidth(array $row, int $column): int
{
$cellWidth = 0;
@@ -643,9 +798,10 @@ class Table
$cellWidth = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell);
}
- $columnWidth = isset($this->columnWidths[$column]) ? $this->columnWidths[$column] : 0;
+ $columnWidth = $this->columnWidths[$column] ?? 0;
+ $cellWidth = max($cellWidth, $columnWidth);
- return max($cellWidth, $columnWidth);
+ return isset($this->columnMaxWidths[$column]) ? min($this->columnMaxWidths[$column], $cellWidth) : $cellWidth;
}
/**
@@ -653,44 +809,58 @@ class Table
*/
private function cleanup()
{
- $this->effectiveColumnWidths = array();
+ $this->effectiveColumnWidths = [];
$this->numberOfColumns = null;
}
- private static function initStyles()
+ private static function initStyles(): array
{
$borderless = new TableStyle();
$borderless
- ->setHorizontalBorderChar('=')
- ->setVerticalBorderChar(' ')
- ->setCrossingChar(' ')
+ ->setHorizontalBorderChars('=')
+ ->setVerticalBorderChars(' ')
+ ->setDefaultCrossingChar(' ')
;
$compact = new TableStyle();
$compact
- ->setHorizontalBorderChar('')
- ->setVerticalBorderChar(' ')
- ->setCrossingChar('')
- ->setCellRowContentFormat('%s')
+ ->setHorizontalBorderChars('')
+ ->setVerticalBorderChars('')
+ ->setDefaultCrossingChar('')
+ ->setCellRowContentFormat('%s ')
;
$styleGuide = new TableStyle();
$styleGuide
- ->setHorizontalBorderChar('-')
- ->setVerticalBorderChar(' ')
- ->setCrossingChar(' ')
+ ->setHorizontalBorderChars('-')
+ ->setVerticalBorderChars(' ')
+ ->setDefaultCrossingChar(' ')
->setCellHeaderFormat('%s')
;
- return array(
+ $box = (new TableStyle())
+ ->setHorizontalBorderChars('─')
+ ->setVerticalBorderChars('│')
+ ->setCrossingChars('┼', '┌', '┬', '┐', '┤', '┘', '┴', '└', '├')
+ ;
+
+ $boxDouble = (new TableStyle())
+ ->setHorizontalBorderChars('═', '─')
+ ->setVerticalBorderChars('║', '│')
+ ->setCrossingChars('┼', '╔', '╤', '╗', '╢', '╝', '╧', '╚', '╟', '╠', '╪', '╣')
+ ;
+
+ return [
'default' => new TableStyle(),
'borderless' => $borderless,
'compact' => $compact,
'symfony-style-guide' => $styleGuide,
- );
+ 'box' => $box,
+ 'box-double' => $boxDouble,
+ ];
}
- private function resolveStyle($name)
+ private function resolveStyle($name): TableStyle
{
if ($name instanceof TableStyle) {
return $name;
diff --git a/vendor/symfony/console/Helper/TableCell.php b/vendor/symfony/console/Helper/TableCell.php
index 69442d4..5b6af4a 100644
--- a/vendor/symfony/console/Helper/TableCell.php
+++ b/vendor/symfony/console/Helper/TableCell.php
@@ -18,24 +18,13 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
*/
class TableCell
{
- /**
- * @var string
- */
private $value;
-
- /**
- * @var array
- */
- private $options = array(
+ private $options = [
'rowspan' => 1,
'colspan' => 1,
- );
+ ];
- /**
- * @param string $value
- * @param array $options
- */
- public function __construct($value = '', array $options = array())
+ public function __construct(string $value = '', array $options = [])
{
$this->value = $value;
diff --git a/vendor/symfony/console/Helper/TableRows.php b/vendor/symfony/console/Helper/TableRows.php
new file mode 100644
index 0000000..16aabb3
--- /dev/null
+++ b/vendor/symfony/console/Helper/TableRows.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Helper;
+
+/**
+ * @internal
+ */
+class TableRows implements \IteratorAggregate
+{
+ private $generator;
+
+ public function __construct(callable $generator)
+ {
+ $this->generator = $generator;
+ }
+
+ public function getIterator(): \Traversable
+ {
+ $g = $this->generator;
+
+ return $g();
+ }
+}
diff --git a/vendor/symfony/console/Helper/TableSeparator.php b/vendor/symfony/console/Helper/TableSeparator.php
index 8cc73e6..e541c53 100644
--- a/vendor/symfony/console/Helper/TableSeparator.php
+++ b/vendor/symfony/console/Helper/TableSeparator.php
@@ -18,10 +18,7 @@ namespace Symfony\Component\Console\Helper;
*/
class TableSeparator extends TableCell
{
- /**
- * @param array $options
- */
- public function __construct(array $options = array())
+ public function __construct(array $options = [])
{
parent::__construct('', $options);
}
diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php
index d7e28ff..a8df59b 100644
--- a/vendor/symfony/console/Helper/TableStyle.php
+++ b/vendor/symfony/console/Helper/TableStyle.php
@@ -19,30 +19,46 @@ use Symfony\Component\Console\Exception\LogicException;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Саша Стаменковић <umpirsky@gmail.com>
+ * @author Dany Maillard <danymaillard93b@gmail.com>
*/
class TableStyle
{
private $paddingChar = ' ';
- private $horizontalBorderChar = '-';
- private $verticalBorderChar = '|';
+ private $horizontalOutsideBorderChar = '-';
+ private $horizontalInsideBorderChar = '-';
+ private $verticalOutsideBorderChar = '|';
+ private $verticalInsideBorderChar = '|';
private $crossingChar = '+';
+ private $crossingTopRightChar = '+';
+ private $crossingTopMidChar = '+';
+ private $crossingTopLeftChar = '+';
+ private $crossingMidRightChar = '+';
+ private $crossingBottomRightChar = '+';
+ private $crossingBottomMidChar = '+';
+ private $crossingBottomLeftChar = '+';
+ private $crossingMidLeftChar = '+';
+ private $crossingTopLeftBottomChar = '+';
+ private $crossingTopMidBottomChar = '+';
+ private $crossingTopRightBottomChar = '+';
+ private $headerTitleFormat = '<fg=black;bg=white;options=bold> %s </>';
+ private $footerTitleFormat = '<fg=black;bg=white;options=bold> %s </>';
private $cellHeaderFormat = '<info>%s</info>';
private $cellRowFormat = '%s';
private $cellRowContentFormat = ' %s ';
private $borderFormat = '%s';
- private $padType = STR_PAD_RIGHT;
+ private $padType = \STR_PAD_RIGHT;
/**
* Sets padding character, used for cell padding.
*
* @param string $paddingChar
*
- * @return TableStyle
+ * @return $this
*/
public function setPaddingChar($paddingChar)
{
if (!$paddingChar) {
- throw new LogicException('The padding char must not be empty');
+ throw new LogicException('The padding char must not be empty.');
}
$this->paddingChar = $paddingChar;
@@ -61,27 +77,84 @@ class TableStyle
}
/**
+ * Sets horizontal border characters.
+ *
+ * <code>
+ * ╔═══════════════╤══════════════════════════╤══════════════════╗
+ * 1 ISBN 2 Title │ Author ║
+ * ╠═══════════════╪══════════════════════════╪══════════════════╣
+ * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
+ * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
+ * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
+ * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
+ * ╚═══════════════╧══════════════════════════╧══════════════════╝
+ * </code>
+ *
+ * @param string $outside Outside border char (see #1 of example)
+ * @param string|null $inside Inside border char (see #2 of example), equals $outside if null
+ */
+ public function setHorizontalBorderChars(string $outside, string $inside = null): self
+ {
+ $this->horizontalOutsideBorderChar = $outside;
+ $this->horizontalInsideBorderChar = $inside ?? $outside;
+
+ return $this;
+ }
+
+ /**
* Sets horizontal border character.
*
* @param string $horizontalBorderChar
*
- * @return TableStyle
+ * @return $this
+ *
+ * @deprecated since Symfony 4.1, use {@link setHorizontalBorderChars()} instead.
*/
public function setHorizontalBorderChar($horizontalBorderChar)
{
- $this->horizontalBorderChar = $horizontalBorderChar;
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED);
- return $this;
+ return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar);
}
/**
* Gets horizontal border character.
*
* @return string
+ *
+ * @deprecated since Symfony 4.1, use {@link getBorderChars()} instead.
*/
public function getHorizontalBorderChar()
{
- return $this->horizontalBorderChar;
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->horizontalOutsideBorderChar;
+ }
+
+ /**
+ * Sets vertical border characters.
+ *
+ * <code>
+ * ╔═══════════════╤══════════════════════════╤══════════════════╗
+ * ║ ISBN │ Title │ Author ║
+ * ╠═══════1═══════╪══════════════════════════╪══════════════════╣
+ * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
+ * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
+ * ╟───────2───────┼──────────────────────────┼──────────────────╢
+ * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
+ * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
+ * ╚═══════════════╧══════════════════════════╧══════════════════╝
+ * </code>
+ *
+ * @param string $outside Outside border char (see #1 of example)
+ * @param string|null $inside Inside border char (see #2 of example), equals $outside if null
+ */
+ public function setVerticalBorderChars(string $outside, string $inside = null): self
+ {
+ $this->verticalOutsideBorderChar = $outside;
+ $this->verticalInsideBorderChar = $inside ?? $outside;
+
+ return $this;
}
/**
@@ -89,23 +162,101 @@ class TableStyle
*
* @param string $verticalBorderChar
*
- * @return TableStyle
+ * @return $this
+ *
+ * @deprecated since Symfony 4.1, use {@link setVerticalBorderChars()} instead.
*/
public function setVerticalBorderChar($verticalBorderChar)
{
- $this->verticalBorderChar = $verticalBorderChar;
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED);
- return $this;
+ return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar);
}
/**
* Gets vertical border character.
*
* @return string
+ *
+ * @deprecated since Symfony 4.1, use {@link getBorderChars()} instead.
*/
public function getVerticalBorderChar()
{
- return $this->verticalBorderChar;
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), \E_USER_DEPRECATED);
+
+ return $this->verticalOutsideBorderChar;
+ }
+
+ /**
+ * Gets border characters.
+ *
+ * @internal
+ */
+ public function getBorderChars(): array
+ {
+ return [
+ $this->horizontalOutsideBorderChar,
+ $this->verticalOutsideBorderChar,
+ $this->horizontalInsideBorderChar,
+ $this->verticalInsideBorderChar,
+ ];
+ }
+
+ /**
+ * Sets crossing characters.
+ *
+ * Example:
+ * <code>
+ * 1═══════════════2══════════════════════════2══════════════════3
+ * ║ ISBN │ Title │ Author ║
+ * 8'══════════════0'═════════════════════════0'═════════════════4'
+ * ║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
+ * ║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
+ * 8───────────────0──────────────────────────0──────────────────4
+ * ║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
+ * ║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
+ * 7═══════════════6══════════════════════════6══════════════════5
+ * </code>
+ *
+ * @param string $cross Crossing char (see #0 of example)
+ * @param string $topLeft Top left char (see #1 of example)
+ * @param string $topMid Top mid char (see #2 of example)
+ * @param string $topRight Top right char (see #3 of example)
+ * @param string $midRight Mid right char (see #4 of example)
+ * @param string $bottomRight Bottom right char (see #5 of example)
+ * @param string $bottomMid Bottom mid char (see #6 of example)
+ * @param string $bottomLeft Bottom left char (see #7 of example)
+ * @param string $midLeft Mid left char (see #8 of example)
+ * @param string|null $topLeftBottom Top left bottom char (see #8' of example), equals to $midLeft if null
+ * @param string|null $topMidBottom Top mid bottom char (see #0' of example), equals to $cross if null
+ * @param string|null $topRightBottom Top right bottom char (see #4' of example), equals to $midRight if null
+ */
+ public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, string $topLeftBottom = null, string $topMidBottom = null, string $topRightBottom = null): self
+ {
+ $this->crossingChar = $cross;
+ $this->crossingTopLeftChar = $topLeft;
+ $this->crossingTopMidChar = $topMid;
+ $this->crossingTopRightChar = $topRight;
+ $this->crossingMidRightChar = $midRight;
+ $this->crossingBottomRightChar = $bottomRight;
+ $this->crossingBottomMidChar = $bottomMid;
+ $this->crossingBottomLeftChar = $bottomLeft;
+ $this->crossingMidLeftChar = $midLeft;
+ $this->crossingTopLeftBottomChar = $topLeftBottom ?? $midLeft;
+ $this->crossingTopMidBottomChar = $topMidBottom ?? $cross;
+ $this->crossingTopRightBottomChar = $topRightBottom ?? $midRight;
+
+ return $this;
+ }
+
+ /**
+ * Sets default crossing character used for each cross.
+ *
+ * @see {@link setCrossingChars()} for setting each crossing individually.
+ */
+ public function setDefaultCrossingChar(string $char): self
+ {
+ return $this->setCrossingChars($char, $char, $char, $char, $char, $char, $char, $char, $char);
}
/**
@@ -113,19 +264,21 @@ class TableStyle
*
* @param string $crossingChar
*
- * @return TableStyle
+ * @return $this
+ *
+ * @deprecated since Symfony 4.1. Use {@link setDefaultCrossingChar()} instead.
*/
public function setCrossingChar($crossingChar)
{
- $this->crossingChar = $crossingChar;
+ @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use setDefaultCrossingChar() instead.', __METHOD__), \E_USER_DEPRECATED);
- return $this;
+ return $this->setDefaultCrossingChar($crossingChar);
}
/**
* Gets crossing character.
*
- * @return string $crossingChar
+ * @return string
*/
public function getCrossingChar()
{
@@ -133,11 +286,34 @@ class TableStyle
}
/**
+ * Gets crossing characters.
+ *
+ * @internal
+ */
+ public function getCrossingChars(): array
+ {
+ return [
+ $this->crossingChar,
+ $this->crossingTopLeftChar,
+ $this->crossingTopMidChar,
+ $this->crossingTopRightChar,
+ $this->crossingMidRightChar,
+ $this->crossingBottomRightChar,
+ $this->crossingBottomMidChar,
+ $this->crossingBottomLeftChar,
+ $this->crossingMidLeftChar,
+ $this->crossingTopLeftBottomChar,
+ $this->crossingTopMidBottomChar,
+ $this->crossingTopRightBottomChar,
+ ];
+ }
+
+ /**
* Sets header cell format.
*
* @param string $cellHeaderFormat
*
- * @return TableStyle
+ * @return $this
*/
public function setCellHeaderFormat($cellHeaderFormat)
{
@@ -161,7 +337,7 @@ class TableStyle
*
* @param string $cellRowFormat
*
- * @return TableStyle
+ * @return $this
*/
public function setCellRowFormat($cellRowFormat)
{
@@ -185,7 +361,7 @@ class TableStyle
*
* @param string $cellRowContentFormat
*
- * @return TableStyle
+ * @return $this
*/
public function setCellRowContentFormat($cellRowContentFormat)
{
@@ -209,7 +385,7 @@ class TableStyle
*
* @param string $borderFormat
*
- * @return TableStyle
+ * @return $this
*/
public function setBorderFormat($borderFormat)
{
@@ -233,11 +409,11 @@ class TableStyle
*
* @param int $padType STR_PAD_*
*
- * @return TableStyle
+ * @return $this
*/
public function setPadType($padType)
{
- if (!in_array($padType, array(STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH), true)) {
+ if (!\in_array($padType, [\STR_PAD_LEFT, \STR_PAD_RIGHT, \STR_PAD_BOTH], true)) {
throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).');
}
@@ -255,4 +431,28 @@ class TableStyle
{
return $this->padType;
}
+
+ public function getHeaderTitleFormat(): string
+ {
+ return $this->headerTitleFormat;
+ }
+
+ public function setHeaderTitleFormat(string $format): self
+ {
+ $this->headerTitleFormat = $format;
+
+ return $this;
+ }
+
+ public function getFooterTitleFormat(): string
+ {
+ return $this->footerTitleFormat;
+ }
+
+ public function setFooterTitleFormat(string $format): self
+ {
+ $this->footerTitleFormat = $format;
+
+ return $this;
+ }
}
diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php
index f626c33..63f40f2 100644
--- a/vendor/symfony/console/Input/ArgvInput.php
+++ b/vendor/symfony/console/Input/ArgvInput.php
@@ -44,16 +44,11 @@ class ArgvInput extends Input
private $parsed;
/**
- * Constructor.
- *
- * @param array|null $argv An array of parameters from the CLI (in the argv format)
- * @param InputDefinition|null $definition A InputDefinition instance
+ * @param array|null $argv An array of parameters from the CLI (in the argv format)
*/
public function __construct(array $argv = null, InputDefinition $definition = null)
{
- if (null === $argv) {
- $argv = $_SERVER['argv'];
- }
+ $argv = $argv ?? $_SERVER['argv'] ?? [];
// strip the application name
array_shift($argv);
@@ -80,7 +75,7 @@ class ArgvInput extends Input
$this->parseArgument($token);
} elseif ($parseOptions && '--' == $token) {
$parseOptions = false;
- } elseif ($parseOptions && 0 === strpos($token, '--')) {
+ } elseif ($parseOptions && str_starts_with($token, '--')) {
$this->parseLongOption($token);
} elseif ($parseOptions && '-' === $token[0] && '-' !== $token) {
$this->parseShortOption($token);
@@ -92,14 +87,12 @@ class ArgvInput extends Input
/**
* Parses a short option.
- *
- * @param string $token The current token
*/
- private function parseShortOption($token)
+ private function parseShortOption(string $token)
{
$name = substr($token, 1);
- if (strlen($name) > 1) {
+ if (\strlen($name) > 1) {
if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) {
// an option with a value (with no space)
$this->addShortOption($name[0], substr($name, 1));
@@ -114,16 +107,15 @@ class ArgvInput extends Input
/**
* Parses a short option set.
*
- * @param string $name The current token
- *
* @throws RuntimeException When option given doesn't exist
*/
- private function parseShortOptionSet($name)
+ private function parseShortOptionSet(string $name)
{
- $len = strlen($name);
+ $len = \strlen($name);
for ($i = 0; $i < $len; ++$i) {
if (!$this->definition->hasShortcut($name[$i])) {
- throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
+ $encoding = mb_detect_encoding($name, null, true);
+ throw new RuntimeException(sprintf('The "-%s" option does not exist.', false === $encoding ? $name[$i] : mb_substr($name, $i, 1, $encoding)));
}
$option = $this->definition->getOptionForShortcut($name[$i]);
@@ -139,16 +131,14 @@ class ArgvInput extends Input
/**
* Parses a long option.
- *
- * @param string $token The current token
*/
- private function parseLongOption($token)
+ private function parseLongOption(string $token)
{
$name = substr($token, 2);
if (false !== $pos = strpos($name, '=')) {
- if (0 === strlen($value = substr($name, $pos + 1))) {
- array_unshift($this->parsed, null);
+ if ('' === $value = substr($name, $pos + 1)) {
+ array_unshift($this->parsed, $value);
}
$this->addLongOption(substr($name, 0, $pos), $value);
} else {
@@ -159,18 +149,16 @@ class ArgvInput extends Input
/**
* Parses an argument.
*
- * @param string $token The current token
- *
* @throws RuntimeException When too many arguments are given
*/
- private function parseArgument($token)
+ private function parseArgument(string $token)
{
- $c = count($this->arguments);
+ $c = \count($this->arguments);
// if input is expecting another argument, add it
if ($this->definition->hasArgument($c)) {
$arg = $this->definition->getArgument($c);
- $this->arguments[$arg->getName()] = $arg->isArray() ? array($token) : $token;
+ $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token;
// if last argument isArray(), append token to last argument
} elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) {
@@ -180,7 +168,7 @@ class ArgvInput extends Input
// unexpected argument
} else {
$all = $this->definition->getArguments();
- if (count($all)) {
+ if (\count($all)) {
throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all))));
}
@@ -191,12 +179,9 @@ class ArgvInput extends Input
/**
* Adds a short option value.
*
- * @param string $shortcut The short option key
- * @param mixed $value The value for the option
- *
* @throws RuntimeException When option given doesn't exist
*/
- private function addShortOption($shortcut, $value)
+ private function addShortOption(string $shortcut, $value)
{
if (!$this->definition->hasShortcut($shortcut)) {
throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut));
@@ -208,12 +193,9 @@ class ArgvInput extends Input
/**
* Adds a long option value.
*
- * @param string $name The long option key
- * @param mixed $value The value for the option
- *
* @throws RuntimeException When option given doesn't exist
*/
- private function addLongOption($name, $value)
+ private function addLongOption(string $name, $value)
{
if (!$this->definition->hasOption($name)) {
throw new RuntimeException(sprintf('The "--%s" option does not exist.', $name));
@@ -221,23 +203,16 @@ class ArgvInput extends Input
$option = $this->definition->getOption($name);
- // Convert empty values to null
- if (!isset($value[0])) {
- $value = null;
- }
-
if (null !== $value && !$option->acceptValue()) {
throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name));
}
- if (null === $value && $option->acceptValue() && count($this->parsed)) {
+ if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) {
// if option accepts an optional or mandatory argument
// let's see if there is one provided
$next = array_shift($this->parsed);
- if (isset($next[0]) && '-' !== $next[0]) {
+ if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) {
$value = $next;
- } elseif (empty($next)) {
- $value = null;
} else {
array_unshift($this->parsed, $next);
}
@@ -248,8 +223,8 @@ class ArgvInput extends Input
throw new RuntimeException(sprintf('The "--%s" option requires a value.', $name));
}
- if (!$option->isArray()) {
- $value = $option->isValueOptional() ? $option->getDefault() : true;
+ if (!$option->isArray() && !$option->isValueOptional()) {
+ $value = true;
}
}
@@ -265,13 +240,34 @@ class ArgvInput extends Input
*/
public function getFirstArgument()
{
- foreach ($this->tokens as $token) {
+ $isOption = false;
+ foreach ($this->tokens as $i => $token) {
if ($token && '-' === $token[0]) {
+ if (str_contains($token, '=') || !isset($this->tokens[$i + 1])) {
+ continue;
+ }
+
+ // If it's a long option, consider that everything after "--" is the option name.
+ // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator)
+ $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1);
+ if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) {
+ // noop
+ } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) {
+ $isOption = true;
+ }
+
+ continue;
+ }
+
+ if ($isOption) {
+ $isOption = false;
continue;
}
return $token;
}
+
+ return null;
}
/**
@@ -282,11 +278,15 @@ class ArgvInput extends Input
$values = (array) $values;
foreach ($this->tokens as $token) {
- if ($onlyParams && $token === '--') {
+ if ($onlyParams && '--' === $token) {
return false;
}
foreach ($values as $value) {
- if ($token === $value || 0 === strpos($token, $value.'=')) {
+ // Options with values:
+ // For long options, test for '--option=' at beginning
+ // For short options, test for '-o' at beginning
+ $leading = str_starts_with($value, '--') ? $value.'=' : $value;
+ if ($token === $value || '' !== $leading && str_starts_with($token, $leading)) {
return true;
}
}
@@ -303,20 +303,23 @@ class ArgvInput extends Input
$values = (array) $values;
$tokens = $this->tokens;
- while (0 < count($tokens)) {
+ while (0 < \count($tokens)) {
$token = array_shift($tokens);
- if ($onlyParams && $token === '--') {
- return false;
+ if ($onlyParams && '--' === $token) {
+ return $default;
}
foreach ($values as $value) {
- if ($token === $value || 0 === strpos($token, $value.'=')) {
- if (false !== $pos = strpos($token, '=')) {
- return substr($token, $pos + 1);
- }
-
+ if ($token === $value) {
return array_shift($tokens);
}
+ // Options with values:
+ // For long options, test for '--option=' at beginning
+ // For short options, test for '-o' at beginning
+ $leading = str_starts_with($value, '--') ? $value.'=' : $value;
+ if ('' !== $leading && str_starts_with($token, $leading)) {
+ return substr($token, \strlen($leading));
+ }
}
}
@@ -335,7 +338,7 @@ class ArgvInput extends Input
return $match[1].$this->escapeToken($match[2]);
}
- if ($token && $token[0] !== '-') {
+ if ($token && '-' !== $token[0]) {
return $this->escapeToken($token);
}
diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php
index a44b6b2..30bd205 100644
--- a/vendor/symfony/console/Input/ArrayInput.php
+++ b/vendor/symfony/console/Input/ArrayInput.php
@@ -19,7 +19,7 @@ use Symfony\Component\Console\Exception\InvalidOptionException;
*
* Usage:
*
- * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar'));
+ * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
*
* @author Fabien Potencier <fabien@symfony.com>
*/
@@ -27,12 +27,6 @@ class ArrayInput extends Input
{
private $parameters;
- /**
- * Constructor.
- *
- * @param array $parameters An array of parameters
- * @param InputDefinition|null $definition A InputDefinition instance
- */
public function __construct(array $parameters, InputDefinition $definition = null)
{
$this->parameters = $parameters;
@@ -45,13 +39,15 @@ class ArrayInput extends Input
*/
public function getFirstArgument()
{
- foreach ($this->parameters as $key => $value) {
- if ($key && '-' === $key[0]) {
+ foreach ($this->parameters as $param => $value) {
+ if ($param && \is_string($param) && '-' === $param[0]) {
continue;
}
return $value;
}
+
+ return null;
}
/**
@@ -62,15 +58,15 @@ class ArrayInput extends Input
$values = (array) $values;
foreach ($this->parameters as $k => $v) {
- if (!is_int($k)) {
+ if (!\is_int($k)) {
$v = $k;
}
- if ($onlyParams && $v === '--') {
+ if ($onlyParams && '--' === $v) {
return false;
}
- if (in_array($v, $values)) {
+ if (\in_array($v, $values)) {
return true;
}
}
@@ -86,15 +82,15 @@ class ArrayInput extends Input
$values = (array) $values;
foreach ($this->parameters as $k => $v) {
- if ($onlyParams && ($k === '--' || (is_int($k) && $v === '--'))) {
- return false;
+ if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) {
+ return $default;
}
- if (is_int($k)) {
- if (in_array($v, $values)) {
+ if (\is_int($k)) {
+ if (\in_array($v, $values)) {
return true;
}
- } elseif (in_array($k, $values)) {
+ } elseif (\in_array($k, $values)) {
return $v;
}
}
@@ -109,12 +105,19 @@ class ArrayInput extends Input
*/
public function __toString()
{
- $params = array();
+ $params = [];
foreach ($this->parameters as $param => $val) {
- if ($param && '-' === $param[0]) {
- $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : '');
+ if ($param && \is_string($param) && '-' === $param[0]) {
+ $glue = ('-' === $param[1]) ? '=' : ' ';
+ if (\is_array($val)) {
+ foreach ($val as $v) {
+ $params[] = $param.('' != $v ? $glue.$this->escapeToken($v) : '');
+ }
+ } else {
+ $params[] = $param.('' != $val ? $glue.$this->escapeToken($val) : '');
+ }
} else {
- $params[] = $this->escapeToken($val);
+ $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val);
}
}
@@ -127,12 +130,12 @@ class ArrayInput extends Input
protected function parse()
{
foreach ($this->parameters as $key => $value) {
- if ($key === '--') {
+ if ('--' === $key) {
return;
}
- if (0 === strpos($key, '--')) {
+ if (str_starts_with($key, '--')) {
$this->addLongOption(substr($key, 2), $value);
- } elseif ('-' === $key[0]) {
+ } elseif (str_starts_with($key, '-')) {
$this->addShortOption(substr($key, 1), $value);
} else {
$this->addArgument($key, $value);
@@ -143,12 +146,9 @@ class ArrayInput extends Input
/**
* Adds a short option value.
*
- * @param string $shortcut The short option key
- * @param mixed $value The value for the option
- *
* @throws InvalidOptionException When option given doesn't exist
*/
- private function addShortOption($shortcut, $value)
+ private function addShortOption(string $shortcut, $value)
{
if (!$this->definition->hasShortcut($shortcut)) {
throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut));
@@ -160,13 +160,10 @@ class ArrayInput extends Input
/**
* Adds a long option value.
*
- * @param string $name The long option key
- * @param mixed $value The value for the option
- *
* @throws InvalidOptionException When option given doesn't exist
* @throws InvalidOptionException When a required value is missing
*/
- private function addLongOption($name, $value)
+ private function addLongOption(string $name, $value)
{
if (!$this->definition->hasOption($name)) {
throw new InvalidOptionException(sprintf('The "--%s" option does not exist.', $name));
@@ -179,7 +176,9 @@ class ArrayInput extends Input
throw new InvalidOptionException(sprintf('The "--%s" option requires a value.', $name));
}
- $value = $option->isValueOptional() ? $option->getDefault() : true;
+ if (!$option->isValueOptional()) {
+ $value = true;
+ }
}
$this->options[$name] = $value;
@@ -188,8 +187,8 @@ class ArrayInput extends Input
/**
* Adds an argument value.
*
- * @param string $name The argument name
- * @param mixed $value The value for the argument
+ * @param string|int $name The argument name
+ * @param mixed $value The value for the argument
*
* @throws InvalidArgumentException When argument given doesn't exist
*/
diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php
index 817292e..d7f2907 100644
--- a/vendor/symfony/console/Input/Input.php
+++ b/vendor/symfony/console/Input/Input.php
@@ -25,21 +25,14 @@ use Symfony\Component\Console\Exception\RuntimeException;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
-abstract class Input implements InputInterface
+abstract class Input implements InputInterface, StreamableInputInterface
{
- /**
- * @var InputDefinition
- */
protected $definition;
- protected $options = array();
- protected $arguments = array();
+ protected $stream;
+ protected $options = [];
+ protected $arguments = [];
protected $interactive = true;
- /**
- * Constructor.
- *
- * @param InputDefinition|null $definition A InputDefinition instance
- */
public function __construct(InputDefinition $definition = null)
{
if (null === $definition) {
@@ -55,8 +48,8 @@ abstract class Input implements InputInterface
*/
public function bind(InputDefinition $definition)
{
- $this->arguments = array();
- $this->options = array();
+ $this->arguments = [];
+ $this->options = [];
$this->definition = $definition;
$this->parse();
@@ -76,10 +69,10 @@ abstract class Input implements InputInterface
$givenArguments = $this->arguments;
$missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) {
- return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
+ return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired();
});
- if (count($missingArguments) > 0) {
+ if (\count($missingArguments) > 0) {
throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments)));
}
}
@@ -113,11 +106,11 @@ abstract class Input implements InputInterface
*/
public function getArgument($name)
{
- if (!$this->definition->hasArgument($name)) {
+ if (!$this->definition->hasArgument((string) $name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
}
- return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)->getDefault();
+ return $this->arguments[$name] ?? $this->definition->getArgument($name)->getDefault();
}
/**
@@ -125,7 +118,7 @@ abstract class Input implements InputInterface
*/
public function setArgument($name, $value)
{
- if (!$this->definition->hasArgument($name)) {
+ if (!$this->definition->hasArgument((string) $name)) {
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
}
@@ -137,7 +130,7 @@ abstract class Input implements InputInterface
*/
public function hasArgument($name)
{
- return $this->definition->hasArgument($name);
+ return $this->definition->hasArgument((string) $name);
}
/**
@@ -157,7 +150,7 @@ abstract class Input implements InputInterface
throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name));
}
- return isset($this->options[$name]) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
+ return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
}
/**
@@ -191,4 +184,20 @@ abstract class Input implements InputInterface
{
return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setStream($stream)
+ {
+ $this->stream = $stream;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getStream()
+ {
+ return $this->stream;
+ }
}
diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php
index 048ee4f..accd4d0 100644
--- a/vendor/symfony/console/Input/InputArgument.php
+++ b/vendor/symfony/console/Input/InputArgument.php
@@ -21,9 +21,9 @@ use Symfony\Component\Console\Exception\LogicException;
*/
class InputArgument
{
- const REQUIRED = 1;
- const OPTIONAL = 2;
- const IS_ARRAY = 4;
+ public const REQUIRED = 1;
+ public const OPTIONAL = 2;
+ public const IS_ARRAY = 4;
private $name;
private $mode;
@@ -31,20 +31,18 @@ class InputArgument
private $description;
/**
- * Constructor.
- *
- * @param string $name The argument name
- * @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL
- * @param string $description A description text
- * @param mixed $default The default value (for self::OPTIONAL mode only)
+ * @param string $name The argument name
+ * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
+ * @param string $description A description text
+ * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only)
*
* @throws InvalidArgumentException When argument mode is not valid
*/
- public function __construct($name, $mode = null, $description = '', $default = null)
+ public function __construct(string $name, int $mode = null, string $description = '', $default = null)
{
if (null === $mode) {
$mode = self::OPTIONAL;
- } elseif (!is_int($mode) || $mode > 7 || $mode < 1) {
+ } elseif ($mode > 7 || $mode < 1) {
throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode));
}
@@ -88,20 +86,20 @@ class InputArgument
/**
* Sets the default value.
*
- * @param mixed $default The default value
+ * @param string|bool|int|float|array|null $default
*
* @throws LogicException When incorrect default value is given
*/
public function setDefault($default = null)
{
- if (self::REQUIRED === $this->mode && null !== $default) {
+ if ($this->isRequired() && null !== $default) {
throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
}
if ($this->isArray()) {
if (null === $default) {
- $default = array();
- } elseif (!is_array($default)) {
+ $default = [];
+ } elseif (!\is_array($default)) {
throw new LogicException('A default value for an array argument must be an array.');
}
}
@@ -112,7 +110,7 @@ class InputArgument
/**
* Returns the default value.
*
- * @return mixed The default value
+ * @return string|bool|int|float|array|null
*/
public function getDefault()
{
diff --git a/vendor/symfony/console/Input/InputAwareInterface.php b/vendor/symfony/console/Input/InputAwareInterface.php
index d0f11e9..5a288de 100644
--- a/vendor/symfony/console/Input/InputAwareInterface.php
+++ b/vendor/symfony/console/Input/InputAwareInterface.php
@@ -21,8 +21,6 @@ interface InputAwareInterface
{
/**
* Sets the Console Input.
- *
- * @param InputInterface
*/
public function setInput(InputInterface $input);
}
diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php
index 85b778b..e2cd6d7 100644
--- a/vendor/symfony/console/Input/InputDefinition.php
+++ b/vendor/symfony/console/Input/InputDefinition.php
@@ -19,10 +19,10 @@ use Symfony\Component\Console\Exception\LogicException;
*
* Usage:
*
- * $definition = new InputDefinition(array(
- * new InputArgument('name', InputArgument::REQUIRED),
- * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
- * ));
+ * $definition = new InputDefinition([
+ * new InputArgument('name', InputArgument::REQUIRED),
+ * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED),
+ * ]);
*
* @author Fabien Potencier <fabien@symfony.com>
*/
@@ -36,24 +36,20 @@ class InputDefinition
private $shortcuts;
/**
- * Constructor.
- *
* @param array $definition An array of InputArgument and InputOption instance
*/
- public function __construct(array $definition = array())
+ public function __construct(array $definition = [])
{
$this->setDefinition($definition);
}
/**
* Sets the definition of the input.
- *
- * @param array $definition The definition array
*/
public function setDefinition(array $definition)
{
- $arguments = array();
- $options = array();
+ $arguments = [];
+ $options = [];
foreach ($definition as $item) {
if ($item instanceof InputOption) {
$options[] = $item;
@@ -71,9 +67,9 @@ class InputDefinition
*
* @param InputArgument[] $arguments An array of InputArgument objects
*/
- public function setArguments($arguments = array())
+ public function setArguments($arguments = [])
{
- $this->arguments = array();
+ $this->arguments = [];
$this->requiredCount = 0;
$this->hasOptional = false;
$this->hasAnArrayArgument = false;
@@ -85,7 +81,7 @@ class InputDefinition
*
* @param InputArgument[] $arguments An array of InputArgument objects
*/
- public function addArguments($arguments = array())
+ public function addArguments($arguments = [])
{
if (null !== $arguments) {
foreach ($arguments as $argument) {
@@ -95,10 +91,6 @@ class InputDefinition
}
/**
- * Adds an InputArgument object.
- *
- * @param InputArgument $argument An InputArgument object
- *
* @throws LogicException When incorrect argument is given
*/
public function addArgument(InputArgument $argument)
@@ -143,7 +135,7 @@ class InputDefinition
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
}
- $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;
+ $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
return $arguments[$name];
}
@@ -157,7 +149,7 @@ class InputDefinition
*/
public function hasArgument($name)
{
- $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;
+ $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
return isset($arguments[$name]);
}
@@ -179,7 +171,7 @@ class InputDefinition
*/
public function getArgumentCount()
{
- return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments);
+ return $this->hasAnArrayArgument ? \PHP_INT_MAX : \count($this->arguments);
}
/**
@@ -193,13 +185,11 @@ class InputDefinition
}
/**
- * Gets the default values.
- *
- * @return array An array of default values
+ * @return array<string|bool|int|float|array|null>
*/
public function getArgumentDefaults()
{
- $values = array();
+ $values = [];
foreach ($this->arguments as $argument) {
$values[$argument->getName()] = $argument->getDefault();
}
@@ -212,10 +202,10 @@ class InputDefinition
*
* @param InputOption[] $options An array of InputOption objects
*/
- public function setOptions($options = array())
+ public function setOptions($options = [])
{
- $this->options = array();
- $this->shortcuts = array();
+ $this->options = [];
+ $this->shortcuts = [];
$this->addOptions($options);
}
@@ -224,7 +214,7 @@ class InputDefinition
*
* @param InputOption[] $options An array of InputOption objects
*/
- public function addOptions($options = array())
+ public function addOptions($options = [])
{
foreach ($options as $option) {
$this->addOption($option);
@@ -232,10 +222,6 @@ class InputDefinition
}
/**
- * Adds an InputOption object.
- *
- * @param InputOption $option An InputOption object
- *
* @throws LogicException When option given already exist
*/
public function addOption(InputOption $option)
@@ -318,7 +304,7 @@ class InputDefinition
/**
* Gets an InputOption by shortcut.
*
- * @param string $shortcut the Shortcut name
+ * @param string $shortcut The Shortcut name
*
* @return InputOption An InputOption object
*/
@@ -328,13 +314,11 @@ class InputDefinition
}
/**
- * Gets an array of default values.
- *
- * @return array An array of all default values
+ * @return array<string|bool|int|float|array|null>
*/
public function getOptionDefaults()
{
- $values = array();
+ $values = [];
foreach ($this->options as $option) {
$values[$option->getName()] = $option->getDefault();
}
@@ -345,13 +329,11 @@ class InputDefinition
/**
* Returns the InputOption name given a shortcut.
*
- * @param string $shortcut The shortcut
- *
- * @return string The InputOption name
- *
* @throws InvalidArgumentException When option given does not exist
+ *
+ * @internal
*/
- private function shortcutToName($shortcut)
+ public function shortcutToName(string $shortcut): string
{
if (!isset($this->shortcuts[$shortcut])) {
throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut));
@@ -369,7 +351,7 @@ class InputDefinition
*/
public function getSynopsis($short = false)
{
- $elements = array();
+ $elements = [];
if ($short && $this->getOptions()) {
$elements[] = '[options]';
@@ -390,25 +372,25 @@ class InputDefinition
}
}
- if (count($elements) && $this->getArguments()) {
+ if (\count($elements) && $this->getArguments()) {
$elements[] = '[--]';
}
+ $tail = '';
foreach ($this->getArguments() as $argument) {
$element = '<'.$argument->getName().'>';
- if (!$argument->isRequired()) {
- $element = '['.$element.']';
- } elseif ($argument->isArray()) {
- $element = $element.' ('.$element.')';
- }
-
if ($argument->isArray()) {
$element .= '...';
}
+ if (!$argument->isRequired()) {
+ $element = '['.$element;
+ $tail .= ']';
+ }
+
$elements[] = $element;
}
- return implode(' ', $elements);
+ return implode(' ', $elements).$tail;
}
}
diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php
index bc66466..8efc623 100644
--- a/vendor/symfony/console/Input/InputInterface.php
+++ b/vendor/symfony/console/Input/InputInterface.php
@@ -24,7 +24,7 @@ interface InputInterface
/**
* Returns the first argument from the raw parameters (not parsed).
*
- * @return string The value of the first argument or null otherwise
+ * @return string|null The value of the first argument or null otherwise
*/
public function getFirstArgument();
@@ -33,6 +33,8 @@ interface InputInterface
*
* This method is to be used to introspect the input parameters
* before they have been validated. It must be used carefully.
+ * Does not necessarily return the correct result for short options
+ * when multiple flags are combined in the same option.
*
* @param string|array $values The values to look for in the raw parameters (can be an array)
* @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
@@ -46,10 +48,12 @@ interface InputInterface
*
* This method is to be used to introspect the input parameters
* before they have been validated. It must be used carefully.
+ * Does not necessarily return the correct result for short options
+ * when multiple flags are combined in the same option.
*
- * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
- * @param mixed $default The default value to return if no result is found
- * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
+ * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
+ * @param string|bool|int|float|array|null $default The default value to return if no result is found
+ * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
*
* @return mixed The option value
*/
@@ -58,7 +62,7 @@ interface InputInterface
/**
* Binds the current Input instance with the given arguments and options.
*
- * @param InputDefinition $definition A InputDefinition instance
+ * @throws RuntimeException
*/
public function bind(InputDefinition $definition);
@@ -72,7 +76,7 @@ interface InputInterface
/**
* Returns all the given arguments merged with the default values.
*
- * @return array
+ * @return array<string|bool|int|float|array|null>
*/
public function getArguments();
@@ -81,7 +85,7 @@ interface InputInterface
*
* @param string $name The argument name
*
- * @return mixed The argument value
+ * @return mixed
*
* @throws InvalidArgumentException When argument given doesn't exist
*/
@@ -91,7 +95,7 @@ interface InputInterface
* Sets an argument value by name.
*
* @param string $name The argument name
- * @param string $value The argument value
+ * @param mixed $value The argument value
*
* @throws InvalidArgumentException When argument given doesn't exist
*/
@@ -100,7 +104,7 @@ interface InputInterface
/**
* Returns true if an InputArgument object exists by name or position.
*
- * @param string|int $name The InputArgument name or position
+ * @param string $name The argument name
*
* @return bool true if the InputArgument object exists, false otherwise
*/
@@ -109,7 +113,7 @@ interface InputInterface
/**
* Returns all the given options merged with the default values.
*
- * @return array
+ * @return array<string|bool|int|float|array|null>
*/
public function getOptions();
@@ -118,7 +122,7 @@ interface InputInterface
*
* @param string $name The option name
*
- * @return mixed The option value
+ * @return mixed
*
* @throws InvalidArgumentException When option given doesn't exist
*/
@@ -127,8 +131,8 @@ interface InputInterface
/**
* Sets an option value by name.
*
- * @param string $name The option name
- * @param string|bool $value The option value
+ * @param string $name The option name
+ * @param mixed $value The option value
*
* @throws InvalidArgumentException When option given doesn't exist
*/
diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php
index f08c5f2..c7729db 100644
--- a/vendor/symfony/console/Input/InputOption.php
+++ b/vendor/symfony/console/Input/InputOption.php
@@ -21,10 +21,25 @@ use Symfony\Component\Console\Exception\LogicException;
*/
class InputOption
{
- const VALUE_NONE = 1;
- const VALUE_REQUIRED = 2;
- const VALUE_OPTIONAL = 4;
- const VALUE_IS_ARRAY = 8;
+ /**
+ * Do not accept input for the option (e.g. --yell). This is the default behavior of options.
+ */
+ public const VALUE_NONE = 1;
+
+ /**
+ * A value must be passed when the option is used (e.g. --iterations=5 or -i5).
+ */
+ public const VALUE_REQUIRED = 2;
+
+ /**
+ * The option may or may not have a value (e.g. --yell or --yell=loud).
+ */
+ public const VALUE_OPTIONAL = 4;
+
+ /**
+ * The option accepts multiple values (e.g. --dir=/foo --dir=/bar).
+ */
+ public const VALUE_IS_ARRAY = 8;
private $name;
private $shortcut;
@@ -33,19 +48,17 @@ class InputOption
private $description;
/**
- * Constructor.
- *
- * @param string $name The option name
- * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int $mode The option mode: One of the VALUE_* constants
- * @param string $description A description text
- * @param mixed $default The default value (must be null for self::VALUE_NONE)
+ * @param string $name The option name
+ * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
+ * @param int|null $mode The option mode: One of the VALUE_* constants
+ * @param string $description A description text
+ * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE)
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*/
- public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null)
+ public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
{
- if (0 === strpos($name, '--')) {
+ if (str_starts_with($name, '--')) {
$name = substr($name, 2);
}
@@ -58,7 +71,7 @@ class InputOption
}
if (null !== $shortcut) {
- if (is_array($shortcut)) {
+ if (\is_array($shortcut)) {
$shortcut = implode('|', $shortcut);
}
$shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-'));
@@ -72,7 +85,7 @@ class InputOption
if (null === $mode) {
$mode = self::VALUE_NONE;
- } elseif (!is_int($mode) || $mode > 15 || $mode < 1) {
+ } elseif ($mode > 15 || $mode < 1) {
throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode));
}
@@ -91,7 +104,7 @@ class InputOption
/**
* Returns the option shortcut.
*
- * @return string The shortcut
+ * @return string|null The shortcut
*/
public function getShortcut()
{
@@ -149,11 +162,7 @@ class InputOption
}
/**
- * Sets the default value.
- *
- * @param mixed $default The default value
- *
- * @throws LogicException When incorrect default value is given
+ * @param string|bool|int|float|array|null $default
*/
public function setDefault($default = null)
{
@@ -163,8 +172,8 @@ class InputOption
if ($this->isArray()) {
if (null === $default) {
- $default = array();
- } elseif (!is_array($default)) {
+ $default = [];
+ } elseif (!\is_array($default)) {
throw new LogicException('A default value for an array option must be an array.');
}
}
@@ -175,7 +184,7 @@ class InputOption
/**
* Returns the default value.
*
- * @return mixed The default value
+ * @return string|bool|int|float|array|null
*/
public function getDefault()
{
@@ -195,11 +204,9 @@ class InputOption
/**
* Checks whether the given option equals this one.
*
- * @param InputOption $option option to compare
- *
* @return bool
*/
- public function equals(InputOption $option)
+ public function equals(self $option)
{
return $option->getName() === $this->getName()
&& $option->getShortcut() === $this->getShortcut()
diff --git a/vendor/symfony/console/Input/StreamableInputInterface.php b/vendor/symfony/console/Input/StreamableInputInterface.php
new file mode 100644
index 0000000..d7e462f
--- /dev/null
+++ b/vendor/symfony/console/Input/StreamableInputInterface.php
@@ -0,0 +1,37 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Input;
+
+/**
+ * StreamableInputInterface is the interface implemented by all input classes
+ * that have an input stream.
+ *
+ * @author Robin Chalas <robin.chalas@gmail.com>
+ */
+interface StreamableInputInterface extends InputInterface
+{
+ /**
+ * Sets the input stream to read from when interacting with the user.
+ *
+ * This is mainly useful for testing purpose.
+ *
+ * @param resource $stream The input stream
+ */
+ public function setStream($stream);
+
+ /**
+ * Returns the input stream.
+ *
+ * @return resource|null
+ */
+ public function getStream();
+}
diff --git a/vendor/symfony/console/Input/StringInput.php b/vendor/symfony/console/Input/StringInput.php
index 9ce0217..56bb66c 100644
--- a/vendor/symfony/console/Input/StringInput.php
+++ b/vendor/symfony/console/Input/StringInput.php
@@ -24,17 +24,16 @@ use Symfony\Component\Console\Exception\InvalidArgumentException;
*/
class StringInput extends ArgvInput
{
- const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
- const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
+ public const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
+ public const REGEX_UNQUOTED_STRING = '([^\s\\\\]+?)';
+ public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
/**
- * Constructor.
- *
- * @param string $input An array of parameters from the CLI (in the argv format)
+ * @param string $input A string representing the parameters from the CLI
*/
- public function __construct($input)
+ public function __construct(string $input)
{
- parent::__construct(array());
+ parent::__construct([]);
$this->setTokens($this->tokenize($input));
}
@@ -42,31 +41,42 @@ class StringInput extends ArgvInput
/**
* Tokenizes a string.
*
- * @param string $input The input to tokenize
- *
- * @return array An array of tokens
- *
* @throws InvalidArgumentException When unable to parse input (should never happen)
*/
- private function tokenize($input)
+ private function tokenize(string $input): array
{
- $tokens = array();
- $length = strlen($input);
+ $tokens = [];
+ $length = \strlen($input);
$cursor = 0;
+ $token = null;
while ($cursor < $length) {
- if (preg_match('/\s+/A', $input, $match, null, $cursor)) {
- } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) {
- $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2)));
- } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) {
- $tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2));
- } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) {
- $tokens[] = stripcslashes($match[1]);
+ if ('\\' === $input[$cursor]) {
+ $token .= $input[++$cursor] ?? '';
+ ++$cursor;
+ continue;
+ }
+
+ if (preg_match('/\s+/A', $input, $match, 0, $cursor)) {
+ if (null !== $token) {
+ $tokens[] = $token;
+ $token = null;
+ }
+ } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, 0, $cursor)) {
+ $token .= $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, -1)));
+ } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
+ $token .= stripcslashes(substr($match[0], 1, -1));
+ } elseif (preg_match('/'.self::REGEX_UNQUOTED_STRING.'/A', $input, $match, 0, $cursor)) {
+ $token .= $match[1];
} else {
// should never happen
- throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10)));
+ throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ...".', substr($input, $cursor, 10)));
}
- $cursor += strlen($match[0]);
+ $cursor += \strlen($match[0]);
+ }
+
+ if (null !== $token) {
+ $tokens[] = $token;
}
return $tokens;
diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE
index 12a7453..88bf75b 100644
--- a/vendor/symfony/console/LICENSE
+++ b/vendor/symfony/console/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2016 Fabien Potencier
+Copyright (c) 2004-2022 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php
index 1f7417e..c9ee035 100644
--- a/vendor/symfony/console/Logger/ConsoleLogger.php
+++ b/vendor/symfony/console/Logger/ConsoleLogger.php
@@ -14,29 +14,23 @@ namespace Symfony\Component\Console\Logger;
use Psr\Log\AbstractLogger;
use Psr\Log\InvalidArgumentException;
use Psr\Log\LogLevel;
-use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
/**
* PSR-3 compliant console logger.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*
- * @link http://www.php-fig.org/psr/psr-3/
+ * @see https://www.php-fig.org/psr/psr-3/
*/
class ConsoleLogger extends AbstractLogger
{
- const INFO = 'info';
- const ERROR = 'error';
+ public const INFO = 'info';
+ public const ERROR = 'error';
- /**
- * @var OutputInterface
- */
private $output;
- /**
- * @var array
- */
- private $verbosityLevelMap = array(
+ private $verbosityLevelMap = [
LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL,
LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL,
LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL,
@@ -45,11 +39,8 @@ class ConsoleLogger extends AbstractLogger
LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE,
LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE,
LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG,
- );
- /**
- * @var array
- */
- private $formatLevelMap = array(
+ ];
+ private $formatLevelMap = [
LogLevel::EMERGENCY => self::ERROR,
LogLevel::ALERT => self::ERROR,
LogLevel::CRITICAL => self::ERROR,
@@ -58,14 +49,10 @@ class ConsoleLogger extends AbstractLogger
LogLevel::NOTICE => self::INFO,
LogLevel::INFO => self::INFO,
LogLevel::DEBUG => self::INFO,
- );
+ ];
+ private $errored = false;
- /**
- * @param OutputInterface $output
- * @param array $verbosityLevelMap
- * @param array $formatLevelMap
- */
- public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array())
+ public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = [])
{
$this->output = $output;
$this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap;
@@ -74,46 +61,66 @@ class ConsoleLogger extends AbstractLogger
/**
* {@inheritdoc}
+ *
+ * @return void
*/
- public function log($level, $message, array $context = array())
+ public function log($level, $message, array $context = [])
{
if (!isset($this->verbosityLevelMap[$level])) {
throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level));
}
+ $output = $this->output;
+
// Write to the error output if necessary and available
- if ($this->formatLevelMap[$level] === self::ERROR && $this->output instanceof ConsoleOutputInterface) {
- $output = $this->output->getErrorOutput();
- } else {
- $output = $this->output;
+ if (self::ERROR === $this->formatLevelMap[$level]) {
+ if ($this->output instanceof ConsoleOutputInterface) {
+ $output = $output->getErrorOutput();
+ }
+ $this->errored = true;
}
+ // the if condition check isn't necessary -- it's the same one that $output will do internally anyway.
+ // We only do it for efficiency here as the message formatting is relatively expensive.
if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) {
- $output->writeln(sprintf('<%1$s>[%2$s] %3$s</%1$s>', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)));
+ $output->writeln(sprintf('<%1$s>[%2$s] %3$s</%1$s>', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context)), $this->verbosityLevelMap[$level]);
}
}
/**
+ * Returns true when any messages have been logged at error levels.
+ *
+ * @return bool
+ */
+ public function hasErrored()
+ {
+ return $this->errored;
+ }
+
+ /**
* Interpolates context values into the message placeholders.
*
* @author PHP Framework Interoperability Group
- *
- * @param string $message
- * @param array $context
- *
- * @return string
*/
- private function interpolate($message, array $context)
+ private function interpolate(string $message, array $context): string
{
- // build a replacement array with braces around the context keys
- $replace = array();
+ if (!str_contains($message, '{')) {
+ return $message;
+ }
+
+ $replacements = [];
foreach ($context as $key => $val) {
- if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) {
- $replace[sprintf('{%s}', $key)] = $val;
+ if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) {
+ $replacements["{{$key}}"] = $val;
+ } elseif ($val instanceof \DateTimeInterface) {
+ $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339);
+ } elseif (\is_object($val)) {
+ $replacements["{{$key}}"] = '[object '.\get_class($val).']';
+ } else {
+ $replacements["{{$key}}"] = '['.\gettype($val).']';
}
}
- // interpolate replacement values into the message and return
- return strtr($message, $replace);
+ return strtr($message, $replacements);
}
}
diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php
index 5682fc2..fefaac2 100644
--- a/vendor/symfony/console/Output/BufferedOutput.php
+++ b/vendor/symfony/console/Output/BufferedOutput.php
@@ -16,9 +16,6 @@ namespace Symfony\Component\Console\Output;
*/
class BufferedOutput extends Output
{
- /**
- * @var string
- */
private $buffer = '';
/**
@@ -42,7 +39,7 @@ class BufferedOutput extends Output
$this->buffer .= $message;
if ($newline) {
- $this->buffer .= "\n";
+ $this->buffer .= \PHP_EOL;
}
}
}
diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php
index 007f3f0..484fcbd 100644
--- a/vendor/symfony/console/Output/ConsoleOutput.php
+++ b/vendor/symfony/console/Output/ConsoleOutput.php
@@ -29,22 +29,25 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
*/
class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
{
- /**
- * @var StreamOutput
- */
private $stderr;
+ private $consoleSectionOutputs = [];
/**
- * Constructor.
- *
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
*/
- public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
+ public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
{
parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter);
+ if (null === $formatter) {
+ // for BC reasons, stdErr has it own Formatter only when user don't inject a specific formatter.
+ $this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated);
+
+ return;
+ }
+
$actualDecorated = $this->isDecorated();
$this->stderr = new StreamOutput($this->openErrorStream(), $verbosity, $decorated, $this->getFormatter());
@@ -54,6 +57,14 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
}
/**
+ * Creates a new output section.
+ */
+ public function section(): ConsoleSectionOutput
+ {
+ return new ConsoleSectionOutput($this->getStream(), $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter());
+ }
+
+ /**
* {@inheritdoc}
*/
public function setDecorated($decorated)
@@ -121,16 +132,14 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
/**
* Checks if current executing environment is IBM iSeries (OS400), which
* doesn't properly convert character-encodings between ASCII to EBCDIC.
- *
- * @return bool
*/
- private function isRunningOS400()
+ private function isRunningOS400(): bool
{
- $checks = array(
- function_exists('php_uname') ? php_uname('s') : '',
+ $checks = [
+ \function_exists('php_uname') ? php_uname('s') : '',
getenv('OSTYPE'),
- PHP_OS,
- );
+ \PHP_OS,
+ ];
return false !== stripos(implode(';', $checks), 'OS400');
}
@@ -144,7 +153,8 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
return fopen('php://output', 'w');
}
- return @fopen('php://stdout', 'w') ?: fopen('php://output', 'w');
+ // Use STDOUT when possible to prevent from opening too many file descriptors
+ return \defined('STDOUT') ? \STDOUT : (@fopen('php://stdout', 'w') ?: fopen('php://output', 'w'));
}
/**
@@ -152,6 +162,11 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
*/
private function openErrorStream()
{
- return fopen($this->hasStderrSupport() ? 'php://stderr' : 'php://output', 'w');
+ if (!$this->hasStderrSupport()) {
+ return fopen('php://output', 'w');
+ }
+
+ // Use STDERR when possible to prevent from opening too many file descriptors
+ return \defined('STDERR') ? \STDERR : (@fopen('php://stderr', 'w') ?: fopen('php://output', 'w'));
}
}
diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php
index 5eb4fc7..f4c2fa6 100644
--- a/vendor/symfony/console/Output/ConsoleOutputInterface.php
+++ b/vendor/symfony/console/Output/ConsoleOutputInterface.php
@@ -13,9 +13,11 @@ namespace Symfony\Component\Console\Output;
/**
* ConsoleOutputInterface is the interface implemented by ConsoleOutput class.
- * This adds information about stderr output stream.
+ * This adds information about stderr and section output stream.
*
* @author Dariusz Górecki <darek.krk@gmail.com>
+ *
+ * @method ConsoleSectionOutput section() Creates a new output section
*/
interface ConsoleOutputInterface extends OutputInterface
{
@@ -26,10 +28,5 @@ interface ConsoleOutputInterface extends OutputInterface
*/
public function getErrorOutput();
- /**
- * Sets the OutputInterface used for errors.
- *
- * @param OutputInterface $error
- */
public function setErrorOutput(OutputInterface $error);
}
diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php
new file mode 100644
index 0000000..c19edbf
--- /dev/null
+++ b/vendor/symfony/console/Output/ConsoleSectionOutput.php
@@ -0,0 +1,143 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Output;
+
+use Symfony\Component\Console\Formatter\OutputFormatterInterface;
+use Symfony\Component\Console\Helper\Helper;
+use Symfony\Component\Console\Terminal;
+
+/**
+ * @author Pierre du Plessis <pdples@gmail.com>
+ * @author Gabriel Ostrolucký <gabriel.ostrolucky@gmail.com>
+ */
+class ConsoleSectionOutput extends StreamOutput
+{
+ private $content = [];
+ private $lines = 0;
+ private $sections;
+ private $terminal;
+
+ /**
+ * @param resource $stream
+ * @param ConsoleSectionOutput[] $sections
+ */
+ public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter)
+ {
+ parent::__construct($stream, $verbosity, $decorated, $formatter);
+ array_unshift($sections, $this);
+ $this->sections = &$sections;
+ $this->terminal = new Terminal();
+ }
+
+ /**
+ * Clears previous output for this section.
+ *
+ * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
+ */
+ public function clear(int $lines = null)
+ {
+ if (empty($this->content) || !$this->isDecorated()) {
+ return;
+ }
+
+ if ($lines) {
+ array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content
+ } else {
+ $lines = $this->lines;
+ $this->content = [];
+ }
+
+ $this->lines -= $lines;
+
+ parent::doWrite($this->popStreamContentUntilCurrentSection($lines), false);
+ }
+
+ /**
+ * Overwrites the previous output with a new message.
+ *
+ * @param array|string $message
+ */
+ public function overwrite($message)
+ {
+ $this->clear();
+ $this->writeln($message);
+ }
+
+ public function getContent(): string
+ {
+ return implode('', $this->content);
+ }
+
+ /**
+ * @internal
+ */
+ public function addContent(string $input)
+ {
+ foreach (explode(\PHP_EOL, $input) as $lineContent) {
+ $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1;
+ $this->content[] = $lineContent;
+ $this->content[] = \PHP_EOL;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doWrite($message, $newline)
+ {
+ if (!$this->isDecorated()) {
+ parent::doWrite($message, $newline);
+
+ return;
+ }
+
+ $erasedContent = $this->popStreamContentUntilCurrentSection();
+
+ $this->addContent($message);
+
+ parent::doWrite($message, true);
+ parent::doWrite($erasedContent, false);
+ }
+
+ /**
+ * At initial stage, cursor is at the end of stream output. This method makes cursor crawl upwards until it hits
+ * current section. Then it erases content it crawled through. Optionally, it erases part of current section too.
+ */
+ private function popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0): string
+ {
+ $numberOfLinesToClear = $numberOfLinesToClearFromCurrentSection;
+ $erasedContent = [];
+
+ foreach ($this->sections as $section) {
+ if ($section === $this) {
+ break;
+ }
+
+ $numberOfLinesToClear += $section->lines;
+ $erasedContent[] = $section->getContent();
+ }
+
+ if ($numberOfLinesToClear > 0) {
+ // move cursor up n lines
+ parent::doWrite(sprintf("\x1b[%dA", $numberOfLinesToClear), false);
+ // erase to end of screen
+ parent::doWrite("\x1b[0J", false);
+ }
+
+ return implode('', array_reverse($erasedContent));
+ }
+
+ private function getDisplayLength(string $text): string
+ {
+ return Helper::strlenWithoutDecoration($this->getFormatter(), str_replace("\t", ' ', $text));
+ }
+}
diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php
index c12015c..fb838f0 100644
--- a/vendor/symfony/console/Output/Output.php
+++ b/vendor/symfony/console/Output/Output.php
@@ -11,8 +11,8 @@
namespace Symfony\Component\Console\Output;
-use Symfony\Component\Console\Formatter\OutputFormatterInterface;
use Symfony\Component\Console\Formatter\OutputFormatter;
+use Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
* Base class for output classes.
@@ -33,16 +33,14 @@ abstract class Output implements OutputInterface
private $formatter;
/**
- * Constructor.
- *
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
* @param bool $decorated Whether to decorate messages
* @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter)
*/
- public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null)
+ public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null)
{
$this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity;
- $this->formatter = $formatter ?: new OutputFormatter();
+ $this->formatter = $formatter ?? new OutputFormatter();
$this->formatter->setDecorated($decorated);
}
@@ -139,7 +137,9 @@ abstract class Output implements OutputInterface
*/
public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL)
{
- $messages = (array) $messages;
+ if (!is_iterable($messages)) {
+ $messages = [$messages];
+ }
$types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN;
$type = $types & $options ?: self::OUTPUT_NORMAL;
@@ -163,7 +163,7 @@ abstract class Output implements OutputInterface
break;
}
- $this->doWrite($message, $newline);
+ $this->doWrite($message ?? '', $newline);
}
}
diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php
index a291ca7..671d5bd 100644
--- a/vendor/symfony/console/Output/OutputInterface.php
+++ b/vendor/symfony/console/Output/OutputInterface.php
@@ -20,30 +20,30 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
*/
interface OutputInterface
{
- const VERBOSITY_QUIET = 16;
- const VERBOSITY_NORMAL = 32;
- const VERBOSITY_VERBOSE = 64;
- const VERBOSITY_VERY_VERBOSE = 128;
- const VERBOSITY_DEBUG = 256;
+ public const VERBOSITY_QUIET = 16;
+ public const VERBOSITY_NORMAL = 32;
+ public const VERBOSITY_VERBOSE = 64;
+ public const VERBOSITY_VERY_VERBOSE = 128;
+ public const VERBOSITY_DEBUG = 256;
- const OUTPUT_NORMAL = 1;
- const OUTPUT_RAW = 2;
- const OUTPUT_PLAIN = 4;
+ public const OUTPUT_NORMAL = 1;
+ public const OUTPUT_RAW = 2;
+ public const OUTPUT_PLAIN = 4;
/**
* Writes a message to the output.
*
- * @param string|array $messages The message as an array of lines or a single string
- * @param bool $newline Whether to add a newline
- * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
+ * @param string|iterable $messages The message as an iterable of strings or a single string
+ * @param bool $newline Whether to add a newline
+ * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
*/
public function write($messages, $newline = false, $options = 0);
/**
* Writes a message to the output and adds a newline at the end.
*
- * @param string|array $messages The message as an array of lines of a single string
- * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
+ * @param string|iterable $messages The message as an iterable of strings or a single string
+ * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
*/
public function writeln($messages, $options = 0);
@@ -103,11 +103,6 @@ interface OutputInterface
*/
public function isDecorated();
- /**
- * Sets output formatter.
- *
- * @param OutputFormatterInterface $formatter
- */
public function setFormatter(OutputFormatterInterface $formatter);
/**
diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php
index 22b29aa..9c22436 100644
--- a/vendor/symfony/console/Output/StreamOutput.php
+++ b/vendor/symfony/console/Output/StreamOutput.php
@@ -12,7 +12,6 @@
namespace Symfony\Component\Console\Output;
use Symfony\Component\Console\Exception\InvalidArgumentException;
-use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
/**
@@ -20,11 +19,11 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface;
*
* Usage:
*
- * $output = new StreamOutput(fopen('php://stdout', 'w'));
+ * $output = new StreamOutput(fopen('php://stdout', 'w'));
*
* As `StreamOutput` can use any stream, you can also use a file:
*
- * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
+ * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
*
* @author Fabien Potencier <fabien@symfony.com>
*/
@@ -33,8 +32,6 @@ class StreamOutput extends Output
private $stream;
/**
- * Constructor.
- *
* @param resource $stream A stream resource
* @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface)
* @param bool|null $decorated Whether to decorate messages (null for auto-guessing)
@@ -42,9 +39,9 @@ class StreamOutput extends Output
*
* @throws InvalidArgumentException When first argument is not a real stream
*/
- public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null)
+ public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
{
- if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
+ if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) {
throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
}
@@ -72,11 +69,12 @@ class StreamOutput extends Output
*/
protected function doWrite($message, $newline)
{
- if (false === @fwrite($this->stream, $message) || ($newline && (false === @fwrite($this->stream, PHP_EOL)))) {
- // should never happen
- throw new RuntimeException('Unable to write output.');
+ if ($newline) {
+ $message .= \PHP_EOL;
}
+ @fwrite($this->stream, $message);
+
fflush($this->stream);
}
@@ -85,21 +83,43 @@ class StreamOutput extends Output
*
* Colorization is disabled if not supported by the stream:
*
- * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty
- * - non tty consoles
+ * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo
+ * terminals via named pipes, so we can only check the environment.
+ *
+ * Reference: Composer\XdebugHandler\Process::supportsColor
+ * https://github.com/composer/xdebug-handler
*
* @return bool true if the stream supports colorization, false otherwise
*/
protected function hasColorSupport()
{
- if (DIRECTORY_SEPARATOR === '\\') {
- return
- '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD
+ // Follow https://no-color.org/
+ if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) {
+ return false;
+ }
+
+ if ('Hyper' === getenv('TERM_PROGRAM')) {
+ return true;
+ }
+
+ if (\DIRECTORY_SEPARATOR === '\\') {
+ return (\function_exists('sapi_windows_vt100_support')
+ && @sapi_windows_vt100_support($this->stream))
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');
}
- return function_exists('posix_isatty') && @posix_isatty($this->stream);
+ if (\function_exists('stream_isatty')) {
+ return @stream_isatty($this->stream);
+ }
+
+ if (\function_exists('posix_isatty')) {
+ return @posix_isatty($this->stream);
+ }
+
+ $stat = @fstat($this->stream);
+ // Check if formatted mode is S_IFCHR
+ return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
}
}
diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php
new file mode 100644
index 0000000..87c04a8
--- /dev/null
+++ b/vendor/symfony/console/Output/TrimmedBufferOutput.php
@@ -0,0 +1,63 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Output;
+
+use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Formatter\OutputFormatterInterface;
+
+/**
+ * A BufferedOutput that keeps only the last N chars.
+ *
+ * @author Jérémy Derussé <jeremy@derusse.com>
+ */
+class TrimmedBufferOutput extends Output
+{
+ private $maxLength;
+ private $buffer = '';
+
+ public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null)
+ {
+ if ($maxLength <= 0) {
+ throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength));
+ }
+
+ parent::__construct($verbosity, $decorated, $formatter);
+ $this->maxLength = $maxLength;
+ }
+
+ /**
+ * Empties buffer and returns its content.
+ *
+ * @return string
+ */
+ public function fetch()
+ {
+ $content = $this->buffer;
+ $this->buffer = '';
+
+ return $content;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doWrite($message, $newline)
+ {
+ $this->buffer .= $message;
+
+ if ($newline) {
+ $this->buffer .= \PHP_EOL;
+ }
+
+ $this->buffer = substr($this->buffer, 0 - $this->maxLength);
+ }
+}
diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php
index 39c4a85..6247ca7 100644
--- a/vendor/symfony/console/Question/ChoiceQuestion.php
+++ b/vendor/symfony/console/Question/ChoiceQuestion.php
@@ -26,14 +26,16 @@ class ChoiceQuestion extends Question
private $errorMessage = 'Value "%s" is invalid';
/**
- * Constructor.
- *
* @param string $question The question to ask to the user
* @param array $choices The list of available choices
* @param mixed $default The default answer to return
*/
- public function __construct($question, array $choices, $default = null)
+ public function __construct(string $question, array $choices, $default = null)
{
+ if (!$choices) {
+ throw new \LogicException('Choice question must have at least 1 choice available.');
+ }
+
parent::__construct($question, $default);
$this->choices = $choices;
@@ -58,7 +60,7 @@ class ChoiceQuestion extends Question
*
* @param bool $multiselect
*
- * @return ChoiceQuestion The current instance
+ * @return $this
*/
public function setMultiselect($multiselect)
{
@@ -93,7 +95,7 @@ class ChoiceQuestion extends Question
*
* @param string $prompt
*
- * @return ChoiceQuestion The current instance
+ * @return $this
*/
public function setPrompt($prompt)
{
@@ -109,7 +111,7 @@ class ChoiceQuestion extends Question
*
* @param string $errorMessage
*
- * @return ChoiceQuestion The current instance
+ * @return $this
*/
public function setErrorMessage($errorMessage)
{
@@ -119,12 +121,7 @@ class ChoiceQuestion extends Question
return $this;
}
- /**
- * Returns the default answer validator.
- *
- * @return callable
- */
- private function getDefaultValidator()
+ private function getDefaultValidator(): callable
{
$choices = $this->choices;
$errorMessage = $this->errorMessage;
@@ -132,30 +129,34 @@ class ChoiceQuestion extends Question
$isAssoc = $this->isAssoc($choices);
return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) {
- // Collapse all spaces.
- $selectedChoices = str_replace(' ', '', $selected);
-
if ($multiselect) {
// Check for a separated comma values
- if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) {
+ if (!preg_match('/^[^,]+(?:,[^,]+)*$/', (string) $selected, $matches)) {
throw new InvalidArgumentException(sprintf($errorMessage, $selected));
}
- $selectedChoices = explode(',', $selectedChoices);
+
+ $selectedChoices = explode(',', (string) $selected);
} else {
- $selectedChoices = array($selected);
+ $selectedChoices = [$selected];
+ }
+
+ if ($this->isTrimmable()) {
+ foreach ($selectedChoices as $k => $v) {
+ $selectedChoices[$k] = trim((string) $v);
+ }
}
- $multiselectChoices = array();
+ $multiselectChoices = [];
foreach ($selectedChoices as $value) {
- $results = array();
+ $results = [];
foreach ($choices as $key => $choice) {
if ($choice === $value) {
$results[] = $key;
}
}
- if (count($results) > 1) {
- throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results)));
+ if (\count($results) > 1) {
+ throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of "%s".', implode('" or "', $results)));
}
$result = array_search($value, $choices);
diff --git a/vendor/symfony/console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Question/ConfirmationQuestion.php
index 29d9887..4228521 100644
--- a/vendor/symfony/console/Question/ConfirmationQuestion.php
+++ b/vendor/symfony/console/Question/ConfirmationQuestion.php
@@ -21,15 +21,13 @@ class ConfirmationQuestion extends Question
private $trueAnswerRegex;
/**
- * Constructor.
- *
* @param string $question The question to ask to the user
* @param bool $default The default answer to return, true or false
* @param string $trueAnswerRegex A regex to match the "yes" answer
*/
- public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i')
+ public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i')
{
- parent::__construct($question, (bool) $default);
+ parent::__construct($question, $default);
$this->trueAnswerRegex = $trueAnswerRegex;
$this->setNormalizer($this->getDefaultNormalizer());
@@ -37,16 +35,14 @@ class ConfirmationQuestion extends Question
/**
* Returns the default answer normalizer.
- *
- * @return callable
*/
- private function getDefaultNormalizer()
+ private function getDefaultNormalizer(): callable
{
$default = $this->getDefault();
$regex = $this->trueAnswerRegex;
return function ($answer) use ($default, $regex) {
- if (is_bool($answer)) {
+ if (\is_bool($answer)) {
return $answer;
}
@@ -55,7 +51,7 @@ class ConfirmationQuestion extends Question
return $answer && $answerIsTrue;
}
- return !$answer || $answerIsTrue;
+ return '' === $answer || $answerIsTrue;
};
}
}
diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php
index 7a69279..cc10801 100644
--- a/vendor/symfony/console/Question/Question.php
+++ b/vendor/symfony/console/Question/Question.php
@@ -25,18 +25,17 @@ class Question
private $attempts;
private $hidden = false;
private $hiddenFallback = true;
- private $autocompleterValues;
+ private $autocompleterCallback;
private $validator;
private $default;
private $normalizer;
+ private $trimmable = true;
/**
- * Constructor.
- *
- * @param string $question The question to ask to the user
- * @param mixed $default The default answer to return if the user enters nothing
+ * @param string $question The question to ask to the user
+ * @param string|bool|int|float|null $default The default answer to return if the user enters nothing
*/
- public function __construct($question, $default = null)
+ public function __construct(string $question, $default = null)
{
$this->question = $question;
$this->default = $default;
@@ -55,7 +54,7 @@ class Question
/**
* Returns the default answer.
*
- * @return mixed
+ * @return string|bool|int|float|null
*/
public function getDefault()
{
@@ -77,13 +76,13 @@ class Question
*
* @param bool $hidden
*
- * @return Question The current instance
+ * @return $this
*
* @throws LogicException In case the autocompleter is also used
*/
public function setHidden($hidden)
{
- if ($this->autocompleterValues) {
+ if ($this->autocompleterCallback) {
throw new LogicException('A hidden question cannot use the autocompleter.');
}
@@ -107,7 +106,7 @@ class Question
*
* @param bool $fallback
*
- * @return Question The current instance
+ * @return $this
*/
public function setHiddenFallback($fallback)
{
@@ -119,40 +118,69 @@ class Question
/**
* Gets values for the autocompleter.
*
- * @return null|array|\Traversable
+ * @return iterable|null
*/
public function getAutocompleterValues()
{
- return $this->autocompleterValues;
+ $callback = $this->getAutocompleterCallback();
+
+ return $callback ? $callback('') : null;
}
/**
* Sets values for the autocompleter.
*
- * @param null|array|\Traversable $values
+ * @param iterable|null $values
*
- * @return Question The current instance
+ * @return $this
*
* @throws InvalidArgumentException
* @throws LogicException
*/
public function setAutocompleterValues($values)
{
- if (is_array($values)) {
+ if (\is_array($values)) {
$values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values);
- }
- if (null !== $values && !is_array($values)) {
- if (!$values instanceof \Traversable || !$values instanceof \Countable) {
- throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.');
- }
+ $callback = static function () use ($values) {
+ return $values;
+ };
+ } elseif ($values instanceof \Traversable) {
+ $valueCache = null;
+ $callback = static function () use ($values, &$valueCache) {
+ return $valueCache ?? $valueCache = iterator_to_array($values, false);
+ };
+ } elseif (null === $values) {
+ $callback = null;
+ } else {
+ throw new InvalidArgumentException('Autocompleter values can be either an array, "null" or a "Traversable" object.');
}
- if ($this->hidden) {
+ return $this->setAutocompleterCallback($callback);
+ }
+
+ /**
+ * Gets the callback function used for the autocompleter.
+ */
+ public function getAutocompleterCallback(): ?callable
+ {
+ return $this->autocompleterCallback;
+ }
+
+ /**
+ * Sets the callback function used for the autocompleter.
+ *
+ * The callback is passed the user input as argument and should return an iterable of corresponding suggestions.
+ *
+ * @return $this
+ */
+ public function setAutocompleterCallback(callable $callback = null): self
+ {
+ if ($this->hidden && null !== $callback) {
throw new LogicException('A hidden question cannot use the autocompleter.');
}
- $this->autocompleterValues = $values;
+ $this->autocompleterCallback = $callback;
return $this;
}
@@ -160,9 +188,7 @@ class Question
/**
* Sets a validator for the question.
*
- * @param null|callable $validator
- *
- * @return Question The current instance
+ * @return $this
*/
public function setValidator(callable $validator = null)
{
@@ -174,7 +200,7 @@ class Question
/**
* Gets the validator for the question.
*
- * @return null|callable
+ * @return callable|null
*/
public function getValidator()
{
@@ -186,16 +212,19 @@ class Question
*
* Null means an unlimited number of attempts.
*
- * @param null|int $attempts
+ * @param int|null $attempts
*
- * @return Question The current instance
+ * @return $this
*
- * @throws InvalidArgumentException In case the number of attempts is invalid.
+ * @throws InvalidArgumentException in case the number of attempts is invalid
*/
public function setMaxAttempts($attempts)
{
- if (null !== $attempts && $attempts < 1) {
- throw new InvalidArgumentException('Maximum number of attempts must be a positive value.');
+ if (null !== $attempts) {
+ $attempts = (int) $attempts;
+ if ($attempts < 1) {
+ throw new InvalidArgumentException('Maximum number of attempts must be a positive value.');
+ }
}
$this->attempts = $attempts;
@@ -208,7 +237,7 @@ class Question
*
* Null means an unlimited number of attempts.
*
- * @return null|int
+ * @return int|null
*/
public function getMaxAttempts()
{
@@ -220,9 +249,7 @@ class Question
*
* The normalizer can be a callable (a string), a closure or a class implementing __invoke.
*
- * @param callable $normalizer
- *
- * @return Question The current instance
+ * @return $this
*/
public function setNormalizer(callable $normalizer)
{
@@ -236,7 +263,7 @@ class Question
*
* The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
*
- * @return callable
+ * @return callable|null
*/
public function getNormalizer()
{
@@ -245,6 +272,21 @@ class Question
protected function isAssoc($array)
{
- return (bool) count(array_filter(array_keys($array), 'is_string'));
+ return (bool) \count(array_filter(array_keys($array), 'is_string'));
+ }
+
+ public function isTrimmable(): bool
+ {
+ return $this->trimmable;
+ }
+
+ /**
+ * @return $this
+ */
+ public function setTrimmable(bool $trimmable): self
+ {
+ $this->trimmable = $trimmable;
+
+ return $this;
}
}
diff --git a/vendor/symfony/console/README.md b/vendor/symfony/console/README.md
index 664a37c..c89b4a1 100644
--- a/vendor/symfony/console/README.md
+++ b/vendor/symfony/console/README.md
@@ -7,11 +7,11 @@ interfaces.
Resources
---------
- * [Documentation](https://symfony.com/doc/current/components/console/index.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
+ * [Documentation](https://symfony.com/doc/current/components/console.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
Credits
-------
diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php
index de7be1e..14d2d60 100644
--- a/vendor/symfony/console/Style/OutputStyle.php
+++ b/vendor/symfony/console/Style/OutputStyle.php
@@ -13,6 +13,7 @@ namespace Symfony\Component\Console\Style;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
use Symfony\Component\Console\Helper\ProgressBar;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
@@ -24,9 +25,6 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
{
private $output;
- /**
- * @param OutputInterface $output
- */
public function __construct(OutputInterface $output)
{
$this->output = $output;
@@ -37,7 +35,7 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
*/
public function newLine($count = 1)
{
- $this->output->write(str_repeat(PHP_EOL, $count));
+ $this->output->write(str_repeat(\PHP_EOL, $count));
}
/**
@@ -145,4 +143,13 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
{
return $this->output->isDebug();
}
+
+ protected function getErrorOutput()
+ {
+ if (!$this->output instanceof ConsoleOutputInterface) {
+ return $this->output;
+ }
+
+ return $this->output->getErrorOutput();
+ }
}
diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php
index 2448547..3b5b8af 100644
--- a/vendor/symfony/console/Style/StyleInterface.php
+++ b/vendor/symfony/console/Style/StyleInterface.php
@@ -34,8 +34,6 @@ interface StyleInterface
/**
* Formats a list.
- *
- * @param array $elements
*/
public function listing(array $elements);
@@ -83,9 +81,6 @@ interface StyleInterface
/**
* Formats a table.
- *
- * @param array $headers
- * @param array $rows
*/
public function table(array $headers, array $rows);
@@ -96,7 +91,7 @@ interface StyleInterface
* @param string|null $default
* @param callable|null $validator
*
- * @return string
+ * @return mixed
*/
public function ask($question, $default = null, $validator = null);
@@ -106,7 +101,7 @@ interface StyleInterface
* @param string $question
* @param callable|null $validator
*
- * @return string
+ * @return mixed
*/
public function askHidden($question, $validator = null);
@@ -124,10 +119,9 @@ interface StyleInterface
* Asks a choice question.
*
* @param string $question
- * @param array $choices
* @param string|int|null $default
*
- * @return string
+ * @return mixed
*/
public function choice($question, array $choices, $default = null);
diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php
index a9c5744..66db3ad 100644
--- a/vendor/symfony/console/Style/SymfonyStyle.php
+++ b/vendor/symfony/console/Style/SymfonyStyle.php
@@ -11,19 +11,22 @@
namespace Symfony\Component\Console\Style;
-use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\Helper;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
use Symfony\Component\Console\Helper\Table;
+use Symfony\Component\Console\Helper\TableCell;
+use Symfony\Component\Console\Helper\TableSeparator;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Output\TrimmedBufferOutput;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Console\Question\Question;
+use Symfony\Component\Console\Terminal;
/**
* Output decorator helpers for the Symfony Style Guide.
@@ -32,7 +35,7 @@ use Symfony\Component\Console\Question\Question;
*/
class SymfonyStyle extends OutputStyle
{
- const MAX_LINE_LENGTH = 120;
+ public const MAX_LINE_LENGTH = 120;
private $input;
private $questionHelper;
@@ -40,16 +43,13 @@ class SymfonyStyle extends OutputStyle
private $lineLength;
private $bufferedOutput;
- /**
- * @param InputInterface $input
- * @param OutputInterface $output
- */
public function __construct(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
- $this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
+ $this->bufferedOutput = new TrimmedBufferOutput(\DIRECTORY_SEPARATOR === '\\' ? 4 : 2, $output->getVerbosity(), false, clone $output->getFormatter());
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
- $this->lineLength = min($this->getTerminalWidth() - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
+ $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
+ $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
parent::__construct($output);
}
@@ -62,13 +62,14 @@ class SymfonyStyle extends OutputStyle
* @param string|null $style The style to apply to the whole block
* @param string $prefix The prefix for the block
* @param bool $padding Whether to add vertical padding
+ * @param bool $escape Whether to escape the message
*/
- public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
+ public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true)
{
- $messages = is_array($messages) ? array_values($messages) : array($messages);
+ $messages = \is_array($messages) ? array_values($messages) : [$messages];
$this->autoPrependBlock();
- $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, true));
+ $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
$this->newLine();
}
@@ -78,10 +79,10 @@ class SymfonyStyle extends OutputStyle
public function title($message)
{
$this->autoPrependBlock();
- $this->writeln(array(
- sprintf('<comment>%s</>', $message),
+ $this->writeln([
+ sprintf('<comment>%s</>', OutputFormatter::escapeTrailingBackslash($message)),
sprintf('<comment>%s</>', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))),
- ));
+ ]);
$this->newLine();
}
@@ -91,10 +92,10 @@ class SymfonyStyle extends OutputStyle
public function section($message)
{
$this->autoPrependBlock();
- $this->writeln(array(
- sprintf('<comment>%s</>', $message),
+ $this->writeln([
+ sprintf('<comment>%s</>', OutputFormatter::escapeTrailingBackslash($message)),
sprintf('<comment>%s</>', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))),
- ));
+ ]);
$this->newLine();
}
@@ -119,7 +120,7 @@ class SymfonyStyle extends OutputStyle
{
$this->autoPrependText();
- $messages = is_array($message) ? array_values($message) : array($message);
+ $messages = \is_array($message) ? array_values($message) : [$message];
foreach ($messages as $message) {
$this->writeln(sprintf(' %s', $message));
}
@@ -132,11 +133,7 @@ class SymfonyStyle extends OutputStyle
*/
public function comment($message)
{
- $messages = is_array($message) ? array_values($message) : array($message);
-
- $this->autoPrependBlock();
- $this->writeln($this->createBlock($messages, null, null, '<fg=default;bg=default> // </>'));
- $this->newLine();
+ $this->block($message, null, null, '<fg=default;bg=default> // </>', false, false);
}
/**
@@ -160,7 +157,7 @@ class SymfonyStyle extends OutputStyle
*/
public function warning($message)
{
- $this->block($message, 'WARNING', 'fg=white;bg=red', ' ', true);
+ $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true);
}
/**
@@ -197,6 +194,69 @@ class SymfonyStyle extends OutputStyle
}
/**
+ * Formats a horizontal table.
+ */
+ public function horizontalTable(array $headers, array $rows)
+ {
+ $style = clone Table::getStyleDefinition('symfony-style-guide');
+ $style->setCellHeaderFormat('<info>%s</info>');
+
+ $table = new Table($this);
+ $table->setHeaders($headers);
+ $table->setRows($rows);
+ $table->setStyle($style);
+ $table->setHorizontal(true);
+
+ $table->render();
+ $this->newLine();
+ }
+
+ /**
+ * Formats a list of key/value horizontally.
+ *
+ * Each row can be one of:
+ * * 'A title'
+ * * ['key' => 'value']
+ * * new TableSeparator()
+ *
+ * @param string|array|TableSeparator ...$list
+ */
+ public function definitionList(...$list)
+ {
+ $style = clone Table::getStyleDefinition('symfony-style-guide');
+ $style->setCellHeaderFormat('<info>%s</info>');
+
+ $table = new Table($this);
+ $headers = [];
+ $row = [];
+ foreach ($list as $value) {
+ if ($value instanceof TableSeparator) {
+ $headers[] = $value;
+ $row[] = $value;
+ continue;
+ }
+ if (\is_string($value)) {
+ $headers[] = new TableCell($value, ['colspan' => 2]);
+ $row[] = null;
+ continue;
+ }
+ if (!\is_array($value)) {
+ throw new InvalidArgumentException('Value should be an array, string, or an instance of TableSeparator.');
+ }
+ $headers[] = key($value);
+ $row[] = current($value);
+ }
+
+ $table->setHeaders($headers);
+ $table->setRows([$row]);
+ $table->setHorizontal();
+ $table->setStyle($style);
+
+ $table->render();
+ $this->newLine();
+ }
+
+ /**
* {@inheritdoc}
*/
public function ask($question, $default = null, $validator = null)
@@ -235,7 +295,7 @@ class SymfonyStyle extends OutputStyle
{
if (null !== $default) {
$values = array_flip($choices);
- $default = $values[$default];
+ $default = $values[$default] ?? $default;
}
return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));
@@ -275,7 +335,7 @@ class SymfonyStyle extends OutputStyle
{
$progressBar = parent::createProgressBar($max);
- if ('\\' !== DIRECTORY_SEPARATOR) {
+ if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
$progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
$progressBar->setProgressCharacter('');
$progressBar->setBarCharacter('▓'); // dark shade character \u2593
@@ -285,9 +345,7 @@ class SymfonyStyle extends OutputStyle
}
/**
- * @param Question $question
- *
- * @return string
+ * @return mixed
*/
public function askQuestion(Question $question)
{
@@ -314,8 +372,14 @@ class SymfonyStyle extends OutputStyle
*/
public function writeln($messages, $type = self::OUTPUT_NORMAL)
{
- parent::writeln($messages, $type);
- $this->bufferedOutput->writeln($this->reduceBuffer($messages), $type);
+ if (!is_iterable($messages)) {
+ $messages = [$messages];
+ }
+
+ foreach ($messages as $message) {
+ parent::writeln($message, $type);
+ $this->writeBuffer($message, true, $type);
+ }
}
/**
@@ -323,8 +387,14 @@ class SymfonyStyle extends OutputStyle
*/
public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
{
- parent::write($messages, $newline, $type);
- $this->bufferedOutput->write($this->reduceBuffer($messages), $newline, $type);
+ if (!is_iterable($messages)) {
+ $messages = [$messages];
+ }
+
+ foreach ($messages as $message) {
+ parent::write($message, $newline, $type);
+ $this->writeBuffer($message, $newline, $type);
+ }
}
/**
@@ -337,9 +407,16 @@ class SymfonyStyle extends OutputStyle
}
/**
- * @return ProgressBar
+ * Returns a new instance which makes use of stderr if available.
+ *
+ * @return self
*/
- private function getProgressBar()
+ public function getErrorStyle()
+ {
+ return new self($this->input, $this->getErrorOutput());
+ }
+
+ private function getProgressBar(): ProgressBar
{
if (!$this->progressBar) {
throw new RuntimeException('The ProgressBar is not started.');
@@ -348,52 +425,43 @@ class SymfonyStyle extends OutputStyle
return $this->progressBar;
}
- private function getTerminalWidth()
+ private function autoPrependBlock(): void
{
- $application = new Application();
- $dimensions = $application->getTerminalDimensions();
-
- return $dimensions[0] ?: self::MAX_LINE_LENGTH;
- }
-
- private function autoPrependBlock()
- {
- $chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
+ $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2);
if (!isset($chars[0])) {
- return $this->newLine(); //empty history, so we should start with a new line.
+ $this->newLine(); //empty history, so we should start with a new line.
+
+ return;
}
//Prepend new line for each non LF chars (This means no blank line was output before)
$this->newLine(2 - substr_count($chars, "\n"));
}
- private function autoPrependText()
+ private function autoPrependText(): void
{
$fetched = $this->bufferedOutput->fetch();
//Prepend new line if last char isn't EOL:
- if ("\n" !== substr($fetched, -1)) {
+ if (!str_ends_with($fetched, "\n")) {
$this->newLine();
}
}
- private function reduceBuffer($messages)
+ private function writeBuffer(string $message, bool $newLine, int $type): void
{
- // We need to know if the two last chars are PHP_EOL
- // Preserve the last 4 chars inserted (PHP_EOL on windows is two chars) in the history buffer
- return array_map(function ($value) {
- return substr($value, -4);
- }, array_merge(array($this->bufferedOutput->fetch()), (array) $messages));
+ // We need to know if the last chars are PHP_EOL
+ $this->bufferedOutput->write($message, $newLine, $type);
}
- private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false)
+ private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
{
$indentLength = 0;
$prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix);
- $lines = array();
+ $lines = [];
if (null !== $type) {
$type = sprintf('[%s] ', $type);
- $indentLength = strlen($type);
+ $indentLength = \strlen($type);
$lineIndentation = str_repeat(' ', $indentLength);
}
@@ -403,9 +471,14 @@ class SymfonyStyle extends OutputStyle
$message = OutputFormatter::escape($message);
}
- $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true)));
+ $decorationLength = Helper::strlen($message) - Helper::strlenWithoutDecoration($this->getFormatter(), $message);
+ $messageLineLength = min($this->lineLength - $prefixLength - $indentLength + $decorationLength, $this->lineLength);
+ $messageLines = explode(\PHP_EOL, wordwrap($message, $messageLineLength, \PHP_EOL, true));
+ foreach ($messageLines as $messageLine) {
+ $lines[] = $messageLine;
+ }
- if (count($messages) > 1 && $key < count($messages) - 1) {
+ if (\count($messages) > 1 && $key < \count($messages) - 1) {
$lines[] = '';
}
}
@@ -423,7 +496,7 @@ class SymfonyStyle extends OutputStyle
}
$line = $prefix.$line;
- $line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line));
+ $line .= str_repeat(' ', max($this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line), 0));
if ($style) {
$line = sprintf('<%s>%s</>', $style, $line);
diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php
new file mode 100644
index 0000000..5e5a3c2
--- /dev/null
+++ b/vendor/symfony/console/Terminal.php
@@ -0,0 +1,174 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console;
+
+class Terminal
+{
+ private static $width;
+ private static $height;
+ private static $stty;
+
+ /**
+ * Gets the terminal width.
+ *
+ * @return int
+ */
+ public function getWidth()
+ {
+ $width = getenv('COLUMNS');
+ if (false !== $width) {
+ return (int) trim($width);
+ }
+
+ if (null === self::$width) {
+ self::initDimensions();
+ }
+
+ return self::$width ?: 80;
+ }
+
+ /**
+ * Gets the terminal height.
+ *
+ * @return int
+ */
+ public function getHeight()
+ {
+ $height = getenv('LINES');
+ if (false !== $height) {
+ return (int) trim($height);
+ }
+
+ if (null === self::$height) {
+ self::initDimensions();
+ }
+
+ return self::$height ?: 50;
+ }
+
+ /**
+ * @internal
+ *
+ * @return bool
+ */
+ public static function hasSttyAvailable()
+ {
+ if (null !== self::$stty) {
+ return self::$stty;
+ }
+
+ // skip check if exec function is disabled
+ if (!\function_exists('exec')) {
+ return false;
+ }
+
+ exec('stty 2>&1', $output, $exitcode);
+
+ return self::$stty = 0 === $exitcode;
+ }
+
+ private static function initDimensions()
+ {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
+ // extract [w, H] from "wxh (WxH)"
+ // or [w, h] from "wxh"
+ self::$width = (int) $matches[1];
+ self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
+ } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) {
+ // only use stty on Windows if the terminal does not support vt100 (e.g. Windows 7 + git-bash)
+ // testing for stty in a Windows 10 vt100-enabled console will implicitly disable vt100 support on STDOUT
+ self::initDimensionsUsingStty();
+ } elseif (null !== $dimensions = self::getConsoleMode()) {
+ // extract [w, h] from "wxh"
+ self::$width = (int) $dimensions[0];
+ self::$height = (int) $dimensions[1];
+ }
+ } else {
+ self::initDimensionsUsingStty();
+ }
+ }
+
+ /**
+ * Returns whether STDOUT has vt100 support (some Windows 10+ configurations).
+ */
+ private static function hasVt100Support(): bool
+ {
+ return \function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'w'));
+ }
+
+ /**
+ * Initializes dimensions using the output of an stty columns line.
+ */
+ private static function initDimensionsUsingStty()
+ {
+ if ($sttyString = self::getSttyColumns()) {
+ if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) {
+ // extract [w, h] from "rows h; columns w;"
+ self::$width = (int) $matches[2];
+ self::$height = (int) $matches[1];
+ } elseif (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) {
+ // extract [w, h] from "; h rows; w columns"
+ self::$width = (int) $matches[2];
+ self::$height = (int) $matches[1];
+ }
+ }
+ }
+
+ /**
+ * Runs and parses mode CON if it's available, suppressing any error output.
+ *
+ * @return int[]|null An array composed of the width and the height or null if it could not be parsed
+ */
+ private static function getConsoleMode(): ?array
+ {
+ $info = self::readFromProcess('mode CON');
+
+ if (null === $info || !preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) {
+ return null;
+ }
+
+ return [(int) $matches[2], (int) $matches[1]];
+ }
+
+ /**
+ * Runs and parses stty -a if it's available, suppressing any error output.
+ */
+ private static function getSttyColumns(): ?string
+ {
+ return self::readFromProcess('stty -a | grep columns');
+ }
+
+ private static function readFromProcess(string $command): ?string
+ {
+ if (!\function_exists('proc_open')) {
+ return null;
+ }
+
+ $descriptorspec = [
+ 1 => ['pipe', 'w'],
+ 2 => ['pipe', 'w'],
+ ];
+
+ $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
+ if (!\is_resource($process)) {
+ return null;
+ }
+
+ $info = stream_get_contents($pipes[1]);
+ fclose($pipes[1]);
+ fclose($pipes[2]);
+ proc_close($process);
+
+ return $info;
+ }
+}
diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php
index c0f8c72..ce4e5c1 100644
--- a/vendor/symfony/console/Tester/ApplicationTester.php
+++ b/vendor/symfony/console/Tester/ApplicationTester.php
@@ -13,10 +13,6 @@ namespace Symfony\Component\Console\Tester;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\ConsoleOutput;
-use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\StreamOutput;
/**
* Eases the testing of console applications.
@@ -30,14 +26,11 @@ use Symfony\Component\Console\Output\StreamOutput;
*/
class ApplicationTester
{
+ use TesterTrait;
+
private $application;
private $input;
private $statusCode;
- /**
- * @var OutputInterface
- */
- private $output;
- private $captureStreamsIndependently = false;
public function __construct(Application $application)
{
@@ -59,118 +52,39 @@ class ApplicationTester
*
* @return int The command exit code
*/
- public function run(array $input, $options = array())
+ public function run(array $input, $options = [])
{
- $this->input = new ArrayInput($input);
- if (isset($options['interactive'])) {
- $this->input->setInteractive($options['interactive']);
- }
+ $prevShellVerbosity = getenv('SHELL_VERBOSITY');
- $this->captureStreamsIndependently = array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately'];
- if (!$this->captureStreamsIndependently) {
- $this->output = new StreamOutput(fopen('php://memory', 'w', false));
- if (isset($options['decorated'])) {
- $this->output->setDecorated($options['decorated']);
+ try {
+ $this->input = new ArrayInput($input);
+ if (isset($options['interactive'])) {
+ $this->input->setInteractive($options['interactive']);
}
- if (isset($options['verbosity'])) {
- $this->output->setVerbosity($options['verbosity']);
- }
- } else {
- $this->output = new ConsoleOutput(
- isset($options['verbosity']) ? $options['verbosity'] : ConsoleOutput::VERBOSITY_NORMAL,
- isset($options['decorated']) ? $options['decorated'] : null
- );
-
- $errorOutput = new StreamOutput(fopen('php://memory', 'w', false));
- $errorOutput->setFormatter($this->output->getFormatter());
- $errorOutput->setVerbosity($this->output->getVerbosity());
- $errorOutput->setDecorated($this->output->isDecorated());
-
- $reflectedOutput = new \ReflectionObject($this->output);
- $strErrProperty = $reflectedOutput->getProperty('stderr');
- $strErrProperty->setAccessible(true);
- $strErrProperty->setValue($this->output, $errorOutput);
-
- $reflectedParent = $reflectedOutput->getParentClass();
- $streamProperty = $reflectedParent->getProperty('stream');
- $streamProperty->setAccessible(true);
- $streamProperty->setValue($this->output, fopen('php://memory', 'w', false));
- }
-
- return $this->statusCode = $this->application->run($this->input, $this->output);
- }
-
- /**
- * Gets the display returned by the last execution of the application.
- *
- * @param bool $normalize Whether to normalize end of lines to \n or not
- *
- * @return string The display
- */
- public function getDisplay($normalize = false)
- {
- rewind($this->output->getStream());
-
- $display = stream_get_contents($this->output->getStream());
-
- if ($normalize) {
- $display = str_replace(PHP_EOL, "\n", $display);
- }
- return $display;
- }
-
- /**
- * Gets the output written to STDERR by the application.
- *
- * @param bool $normalize Whether to normalize end of lines to \n or not
- *
- * @return string
- */
- public function getErrorOutput($normalize = false)
- {
- if (!$this->captureStreamsIndependently) {
- throw new \LogicException('The error output is not available when the tester is run without "capture_stderr_separately" option set.');
- }
-
- rewind($this->output->getErrorOutput()->getStream());
-
- $display = stream_get_contents($this->output->getErrorOutput()->getStream());
+ if ($this->inputs) {
+ $this->input->setStream(self::createStream($this->inputs));
+ }
- if ($normalize) {
- $display = str_replace(PHP_EOL, "\n", $display);
+ $this->initOutput($options);
+
+ return $this->statusCode = $this->application->run($this->input, $this->output);
+ } finally {
+ // SHELL_VERBOSITY is set by Application::configureIO so we need to unset/reset it
+ // to its previous value to avoid one test's verbosity to spread to the following tests
+ if (false === $prevShellVerbosity) {
+ if (\function_exists('putenv')) {
+ @putenv('SHELL_VERBOSITY');
+ }
+ unset($_ENV['SHELL_VERBOSITY']);
+ unset($_SERVER['SHELL_VERBOSITY']);
+ } else {
+ if (\function_exists('putenv')) {
+ @putenv('SHELL_VERBOSITY='.$prevShellVerbosity);
+ }
+ $_ENV['SHELL_VERBOSITY'] = $prevShellVerbosity;
+ $_SERVER['SHELL_VERBOSITY'] = $prevShellVerbosity;
+ }
}
-
- return $display;
- }
-
- /**
- * Gets the input instance used by the last execution of the application.
- *
- * @return InputInterface The current input instance
- */
- public function getInput()
- {
- return $this->input;
- }
-
- /**
- * Gets the output instance used by the last execution of the application.
- *
- * @return OutputInterface The current output instance
- */
- public function getOutput()
- {
- return $this->output;
- }
-
- /**
- * Gets the status code returned by the last execution of the application.
- *
- * @return int The status code
- */
- public function getStatusCode()
- {
- return $this->statusCode;
}
}
diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php
index f95298b..57efc9a 100644
--- a/vendor/symfony/console/Tester/CommandTester.php
+++ b/vendor/symfony/console/Tester/CommandTester.php
@@ -13,27 +13,21 @@ namespace Symfony\Component\Console\Tester;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Output\StreamOutput;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
/**
* Eases the testing of console commands.
*
* @author Fabien Potencier <fabien@symfony.com>
+ * @author Robin Chalas <robin.chalas@gmail.com>
*/
class CommandTester
{
+ use TesterTrait;
+
private $command;
private $input;
- private $output;
private $statusCode;
- /**
- * Constructor.
- *
- * @param Command $command A Command instance to test
- */
public function __construct(Command $command)
{
$this->command = $command;
@@ -44,16 +38,17 @@ class CommandTester
*
* Available execution options:
*
- * * interactive: Sets the input interactive flag
- * * decorated: Sets the output decorated flag
- * * verbosity: Sets the output verbosity flag
+ * * interactive: Sets the input interactive flag
+ * * decorated: Sets the output decorated flag
+ * * verbosity: Sets the output verbosity flag
+ * * capture_stderr_separately: Make output of stdOut and stdErr separately available
*
* @param array $input An array of command arguments and options
* @param array $options An array of execution options
*
* @return int The command exit code
*/
- public function execute(array $input, array $options = array())
+ public function execute(array $input, array $options = [])
{
// set the command name automatically if the application requires
// this argument and no command name was passed
@@ -61,72 +56,23 @@ class CommandTester
&& (null !== $application = $this->command->getApplication())
&& $application->getDefinition()->hasArgument('command')
) {
- $input = array_merge(array('command' => $this->command->getName()), $input);
+ $input = array_merge(['command' => $this->command->getName()], $input);
}
$this->input = new ArrayInput($input);
+ // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN.
+ $this->input->setStream(self::createStream($this->inputs));
+
if (isset($options['interactive'])) {
$this->input->setInteractive($options['interactive']);
}
- $this->output = new StreamOutput(fopen('php://memory', 'w', false));
- if (isset($options['decorated'])) {
- $this->output->setDecorated($options['decorated']);
- }
- if (isset($options['verbosity'])) {
- $this->output->setVerbosity($options['verbosity']);
- }
-
- return $this->statusCode = $this->command->run($this->input, $this->output);
- }
-
- /**
- * Gets the display returned by the last execution of the command.
- *
- * @param bool $normalize Whether to normalize end of lines to \n or not
- *
- * @return string The display
- */
- public function getDisplay($normalize = false)
- {
- rewind($this->output->getStream());
-
- $display = stream_get_contents($this->output->getStream());
-
- if ($normalize) {
- $display = str_replace(PHP_EOL, "\n", $display);
+ if (!isset($options['decorated'])) {
+ $options['decorated'] = false;
}
- return $display;
- }
-
- /**
- * Gets the input instance used by the last execution of the command.
- *
- * @return InputInterface The current input instance
- */
- public function getInput()
- {
- return $this->input;
- }
-
- /**
- * Gets the output instance used by the last execution of the command.
- *
- * @return OutputInterface The current output instance
- */
- public function getOutput()
- {
- return $this->output;
- }
+ $this->initOutput($options);
- /**
- * Gets the status code returned by the last execution of the application.
- *
- * @return int The status code
- */
- public function getStatusCode()
- {
- return $this->statusCode;
+ return $this->statusCode = $this->command->run($this->input, $this->output);
}
}
diff --git a/vendor/symfony/console/Tester/TesterTrait.php b/vendor/symfony/console/Tester/TesterTrait.php
new file mode 100644
index 0000000..27d5985
--- /dev/null
+++ b/vendor/symfony/console/Tester/TesterTrait.php
@@ -0,0 +1,180 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Console\Tester;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\ConsoleOutput;
+use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Output\StreamOutput;
+
+/**
+ * @author Amrouche Hamza <hamza.simperfit@gmail.com>
+ */
+trait TesterTrait
+{
+ /** @var StreamOutput */
+ private $output;
+ private $inputs = [];
+ private $captureStreamsIndependently = false;
+
+ /**
+ * Gets the display returned by the last execution of the command or application.
+ *
+ * @param bool $normalize Whether to normalize end of lines to \n or not
+ *
+ * @return string The display
+ */
+ public function getDisplay($normalize = false)
+ {
+ if (null === $this->output) {
+ throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?');
+ }
+
+ rewind($this->output->getStream());
+
+ $display = stream_get_contents($this->output->getStream());
+
+ if ($normalize) {
+ $display = str_replace(\PHP_EOL, "\n", $display);
+ }
+
+ return $display;
+ }
+
+ /**
+ * Gets the output written to STDERR by the application.
+ *
+ * @param bool $normalize Whether to normalize end of lines to \n or not
+ *
+ * @return string
+ */
+ public function getErrorOutput($normalize = false)
+ {
+ if (!$this->captureStreamsIndependently) {
+ throw new \LogicException('The error output is not available when the tester is run without "capture_stderr_separately" option set.');
+ }
+
+ rewind($this->output->getErrorOutput()->getStream());
+
+ $display = stream_get_contents($this->output->getErrorOutput()->getStream());
+
+ if ($normalize) {
+ $display = str_replace(\PHP_EOL, "\n", $display);
+ }
+
+ return $display;
+ }
+
+ /**
+ * Gets the input instance used by the last execution of the command or application.
+ *
+ * @return InputInterface The current input instance
+ */
+ public function getInput()
+ {
+ return $this->input;
+ }
+
+ /**
+ * Gets the output instance used by the last execution of the command or application.
+ *
+ * @return OutputInterface The current output instance
+ */
+ public function getOutput()
+ {
+ return $this->output;
+ }
+
+ /**
+ * Gets the status code returned by the last execution of the command or application.
+ *
+ * @return int The status code
+ */
+ public function getStatusCode()
+ {
+ return $this->statusCode;
+ }
+
+ /**
+ * Sets the user inputs.
+ *
+ * @param array $inputs An array of strings representing each input
+ * passed to the command input stream
+ *
+ * @return $this
+ */
+ public function setInputs(array $inputs)
+ {
+ $this->inputs = $inputs;
+
+ return $this;
+ }
+
+ /**
+ * Initializes the output property.
+ *
+ * Available options:
+ *
+ * * decorated: Sets the output decorated flag
+ * * verbosity: Sets the output verbosity flag
+ * * capture_stderr_separately: Make output of stdOut and stdErr separately available
+ */
+ private function initOutput(array $options)
+ {
+ $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately'];
+ if (!$this->captureStreamsIndependently) {
+ $this->output = new StreamOutput(fopen('php://memory', 'w', false));
+ if (isset($options['decorated'])) {
+ $this->output->setDecorated($options['decorated']);
+ }
+ if (isset($options['verbosity'])) {
+ $this->output->setVerbosity($options['verbosity']);
+ }
+ } else {
+ $this->output = new ConsoleOutput(
+ $options['verbosity'] ?? ConsoleOutput::VERBOSITY_NORMAL,
+ $options['decorated'] ?? null
+ );
+
+ $errorOutput = new StreamOutput(fopen('php://memory', 'w', false));
+ $errorOutput->setFormatter($this->output->getFormatter());
+ $errorOutput->setVerbosity($this->output->getVerbosity());
+ $errorOutput->setDecorated($this->output->isDecorated());
+
+ $reflectedOutput = new \ReflectionObject($this->output);
+ $strErrProperty = $reflectedOutput->getProperty('stderr');
+ $strErrProperty->setAccessible(true);
+ $strErrProperty->setValue($this->output, $errorOutput);
+
+ $reflectedParent = $reflectedOutput->getParentClass();
+ $streamProperty = $reflectedParent->getProperty('stream');
+ $streamProperty->setAccessible(true);
+ $streamProperty->setValue($this->output, fopen('php://memory', 'w', false));
+ }
+ }
+
+ /**
+ * @return resource
+ */
+ private static function createStream(array $inputs)
+ {
+ $stream = fopen('php://memory', 'r+', false);
+
+ foreach ($inputs as $input) {
+ fwrite($stream, $input.\PHP_EOL);
+ }
+
+ rewind($stream);
+
+ return $stream;
+ }
+}
diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json
index ed02e96..90cbd24 100644
--- a/vendor/symfony/console/composer.json
+++ b/vendor/symfony/console/composer.json
@@ -1,7 +1,7 @@
{
"name": "symfony/console",
"type": "library",
- "description": "Symfony Console Component",
+ "description": "Eases the creation of beautiful and testable command line interfaces",
"keywords": [],
"homepage": "https://symfony.com",
"license": "MIT",
@@ -16,30 +16,42 @@
}
],
"require": {
- "php": ">=5.5.9",
+ "php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/debug": "~2.8|~3.0"
+ "symfony/polyfill-php73": "^1.8",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2"
},
"require-dev": {
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0",
- "psr/log": "~1.0"
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/event-dispatcher": "^4.3",
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^3.4|^4.0|^5.0",
+ "symfony/var-dumper": "^4.3|^5.0",
+ "psr/log": "^1|^2"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
},
"suggest": {
"symfony/event-dispatcher": "",
+ "symfony/lock": "",
"symfony/process": "",
"psr/log": "For using the console logger"
},
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<3.4",
+ "symfony/event-dispatcher": "<4.3|>=5",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<3.3"
+ },
"autoload": {
"psr-4": { "Symfony\\Component\\Console\\": "" },
"exclude-from-classmap": [
"/Tests/"
]
},
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- }
- }
+ "minimum-stability": "dev"
}
diff --git a/vendor/symfony/console/phpunit.xml.dist b/vendor/symfony/console/phpunit.xml.dist
deleted file mode 100644
index 8c09554..0000000
--- a/vendor/symfony/console/phpunit.xml.dist
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
- backupGlobals="false"
- colors="true"
- bootstrap="vendor/autoload.php"
->
- <php>
- <ini name="error_reporting" value="-1" />
- </php>
-
- <testsuites>
- <testsuite name="Symfony Console Component Test Suite">
- <directory>./Tests/</directory>
- </testsuite>
- </testsuites>
-
- <filter>
- <whitelist>
- <directory>./</directory>
- <exclude>
- <directory>./Resources</directory>
- <directory>./Tests</directory>
- <directory>./vendor</directory>
- </exclude>
- </whitelist>
- </filter>
-
- <listeners>
- <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener">
- <arguments>
- <array>
- <element key="time-sensitive"><string>Symfony\Component\Console</string></element>
- </array>
- </arguments>
- </listener>
- </listeners>
-</phpunit>
diff --git a/vendor/symfony/debug/BufferingLogger.php b/vendor/symfony/debug/BufferingLogger.php
deleted file mode 100644
index a2ed75b..0000000
--- a/vendor/symfony/debug/BufferingLogger.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug;
-
-use Psr\Log\AbstractLogger;
-
-/**
- * A buffering logger that stacks logs for later.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class BufferingLogger extends AbstractLogger
-{
- private $logs = array();
-
- public function log($level, $message, array $context = array())
- {
- $this->logs[] = array($level, $message, $context);
- }
-
- public function cleanLogs()
- {
- $logs = $this->logs;
- $this->logs = array();
-
- return $logs;
- }
-}
diff --git a/vendor/symfony/debug/CHANGELOG.md b/vendor/symfony/debug/CHANGELOG.md
deleted file mode 100644
index c81bccf..0000000
--- a/vendor/symfony/debug/CHANGELOG.md
+++ /dev/null
@@ -1,47 +0,0 @@
-CHANGELOG
-=========
-
-3.0.0
------
-
-* removed classes, methods and interfaces deprecated in 2.x
-
-2.8.0
------
-
-* added BufferingLogger for errors that happen before a proper logger is configured
-* allow throwing from `__toString()` with `return trigger_error($e, E_USER_ERROR);`
-* deprecate ExceptionHandler::createResponse
-
-2.7.0
------
-
-* added deprecations checking for parent interfaces/classes to DebugClassLoader
-* added ZTS support to symfony_debug extension
-* added symfony_debug_backtrace() to symfony_debug extension
- to track the backtrace of fatal errors
-
-2.6.0
------
-
-* generalized ErrorHandler and ExceptionHandler,
- with some new methods and others deprecated
-* enhanced error messages for uncaught exceptions
-
-2.5.0
------
-
-* added ExceptionHandler::setHandler()
-* added UndefinedMethodFatalErrorHandler
-* deprecated DummyException
-
-2.4.0
------
-
- * added a DebugClassLoader able to wrap any autoloader providing a findFile method
- * improved error messages for not found classes and functions
-
-2.3.0
------
-
- * added the component
diff --git a/vendor/symfony/debug/Debug.php b/vendor/symfony/debug/Debug.php
deleted file mode 100644
index e3665ae..0000000
--- a/vendor/symfony/debug/Debug.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug;
-
-/**
- * Registers all the debug tools.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class Debug
-{
- private static $enabled = false;
-
- /**
- * Enables the debug tools.
- *
- * This method registers an error handler and an exception handler.
- *
- * If the Symfony ClassLoader component is available, a special
- * class loader is also registered.
- *
- * @param int $errorReportingLevel The level of error reporting you want
- * @param bool $displayErrors Whether to display errors (for development) or just log them (for production)
- */
- public static function enable($errorReportingLevel = E_ALL, $displayErrors = true)
- {
- if (static::$enabled) {
- return;
- }
-
- static::$enabled = true;
-
- if (null !== $errorReportingLevel) {
- error_reporting($errorReportingLevel);
- } else {
- error_reporting(E_ALL);
- }
-
- if ('cli' !== PHP_SAPI) {
- ini_set('display_errors', 0);
- ExceptionHandler::register();
- } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
- // CLI - display errors only if they're not already logged to STDERR
- ini_set('display_errors', 1);
- }
- if ($displayErrors) {
- ErrorHandler::register(new ErrorHandler(new BufferingLogger()));
- } else {
- ErrorHandler::register()->throwAt(0, true);
- }
-
- DebugClassLoader::enable();
- }
-}
diff --git a/vendor/symfony/debug/DebugClassLoader.php b/vendor/symfony/debug/DebugClassLoader.php
deleted file mode 100644
index 9fd6887..0000000
--- a/vendor/symfony/debug/DebugClassLoader.php
+++ /dev/null
@@ -1,314 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug;
-
-/**
- * Autoloader checking if the class is really defined in the file found.
- *
- * The ClassLoader will wrap all registered autoloaders
- * and will throw an exception if a file is found but does
- * not declare the class.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Christophe Coevoet <stof@notk.org>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class DebugClassLoader
-{
- private $classLoader;
- private $isFinder;
- private static $caseCheck;
- private static $deprecated = array();
- private static $php7Reserved = array('int', 'float', 'bool', 'string', 'true', 'false', 'null');
- private static $darwinCache = array('/' => array('/', array()));
-
- /**
- * Constructor.
- *
- * @param callable $classLoader A class loader
- */
- public function __construct(callable $classLoader)
- {
- $this->classLoader = $classLoader;
- $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile');
-
- if (!isset(self::$caseCheck)) {
- $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), DIRECTORY_SEPARATOR);
- $i = strrpos($file, DIRECTORY_SEPARATOR);
- $dir = substr($file, 0, 1 + $i);
- $file = substr($file, 1 + $i);
- $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file);
- $test = realpath($dir.$test);
-
- if (false === $test || false === $i) {
- // filesystem is case sensitive
- self::$caseCheck = 0;
- } elseif (substr($test, -strlen($file)) === $file) {
- // filesystem is case insensitive and realpath() normalizes the case of characters
- self::$caseCheck = 1;
- } elseif (false !== stripos(PHP_OS, 'darwin')) {
- // on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters
- self::$caseCheck = 2;
- } else {
- // filesystem case checks failed, fallback to disabling them
- self::$caseCheck = 0;
- }
- }
- }
-
- /**
- * Gets the wrapped class loader.
- *
- * @return callable The wrapped class loader
- */
- public function getClassLoader()
- {
- return $this->classLoader;
- }
-
- /**
- * Wraps all autoloaders.
- */
- public static function enable()
- {
- // Ensures we don't hit https://bugs.php.net/42098
- class_exists('Symfony\Component\Debug\ErrorHandler');
- class_exists('Psr\Log\LogLevel');
-
- if (!is_array($functions = spl_autoload_functions())) {
- return;
- }
-
- foreach ($functions as $function) {
- spl_autoload_unregister($function);
- }
-
- foreach ($functions as $function) {
- if (!is_array($function) || !$function[0] instanceof self) {
- $function = array(new static($function), 'loadClass');
- }
-
- spl_autoload_register($function);
- }
- }
-
- /**
- * Disables the wrapping.
- */
- public static function disable()
- {
- if (!is_array($functions = spl_autoload_functions())) {
- return;
- }
-
- foreach ($functions as $function) {
- spl_autoload_unregister($function);
- }
-
- foreach ($functions as $function) {
- if (is_array($function) && $function[0] instanceof self) {
- $function = $function[0]->getClassLoader();
- }
-
- spl_autoload_register($function);
- }
- }
-
- /**
- * Loads the given class or interface.
- *
- * @param string $class The name of the class
- *
- * @return bool|null True, if loaded
- *
- * @throws \RuntimeException
- */
- public function loadClass($class)
- {
- ErrorHandler::stackErrors();
-
- try {
- if ($this->isFinder) {
- if ($file = $this->classLoader[0]->findFile($class)) {
- require_once $file;
- }
- } else {
- call_user_func($this->classLoader, $class);
- $file = false;
- }
- } finally {
- ErrorHandler::unstackErrors();
- }
-
- $exists = class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false);
-
- if ('\\' === $class[0]) {
- $class = substr($class, 1);
- }
-
- if ($exists) {
- $refl = new \ReflectionClass($class);
- $name = $refl->getName();
-
- if ($name !== $class && 0 === strcasecmp($name, $class)) {
- throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: %s vs %s', $class, $name));
- }
-
- if (in_array(strtolower($refl->getShortName()), self::$php7Reserved)) {
- @trigger_error(sprintf('%s uses a reserved class name (%s) that will break on PHP 7 and higher', $name, $refl->getShortName()), E_USER_DEPRECATED);
- } elseif (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) {
- self::$deprecated[$name] = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]);
- } else {
- if (2 > $len = 1 + (strpos($name, '\\', 1 + strpos($name, '\\')) ?: strpos($name, '_'))) {
- $len = 0;
- $ns = '';
- } else {
- switch ($ns = substr($name, 0, $len)) {
- case 'Symfony\Bridge\\':
- case 'Symfony\Bundle\\':
- case 'Symfony\Component\\':
- $ns = 'Symfony\\';
- $len = strlen($ns);
- break;
- }
- }
- $parent = get_parent_class($class);
-
- if (!$parent || strncmp($ns, $parent, $len)) {
- if ($parent && isset(self::$deprecated[$parent]) && strncmp($ns, $parent, $len)) {
- @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent, self::$deprecated[$parent]), E_USER_DEPRECATED);
- }
-
- $parentInterfaces = array();
- $deprecatedInterfaces = array();
- if ($parent) {
- foreach (class_implements($parent) as $interface) {
- $parentInterfaces[$interface] = 1;
- }
- }
-
- foreach ($refl->getInterfaceNames() as $interface) {
- if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len)) {
- $deprecatedInterfaces[] = $interface;
- }
- foreach (class_implements($interface) as $interface) {
- $parentInterfaces[$interface] = 1;
- }
- }
-
- foreach ($deprecatedInterfaces as $interface) {
- if (!isset($parentInterfaces[$interface])) {
- @trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED);
- }
- }
- }
- }
- }
-
- if ($file) {
- if (!$exists) {
- if (false !== strpos($class, '/')) {
- throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class));
- }
-
- throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file));
- }
- if (self::$caseCheck) {
- $real = explode('\\', $class.strrchr($file, '.'));
- $tail = explode(DIRECTORY_SEPARATOR, str_replace('/', DIRECTORY_SEPARATOR, $file));
-
- $i = count($tail) - 1;
- $j = count($real) - 1;
-
- while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) {
- --$i;
- --$j;
- }
-
- array_splice($tail, 0, $i + 1);
- }
- if (self::$caseCheck && $tail) {
- $tail = DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $tail);
- $tailLen = strlen($tail);
- $real = $refl->getFileName();
-
- if (2 === self::$caseCheck) {
- // realpath() on MacOSX doesn't normalize the case of characters
-
- $i = 1 + strrpos($real, '/');
- $file = substr($real, $i);
- $real = substr($real, 0, $i);
-
- if (isset(self::$darwinCache[$real])) {
- $kDir = $real;
- } else {
- $kDir = strtolower($real);
-
- if (isset(self::$darwinCache[$kDir])) {
- $real = self::$darwinCache[$kDir][0];
- } else {
- $dir = getcwd();
- chdir($real);
- $real = getcwd().'/';
- chdir($dir);
-
- $dir = $real;
- $k = $kDir;
- $i = strlen($dir) - 1;
- while (!isset(self::$darwinCache[$k])) {
- self::$darwinCache[$k] = array($dir, array());
- self::$darwinCache[$dir] = &self::$darwinCache[$k];
-
- while ('/' !== $dir[--$i]) {
- }
- $k = substr($k, 0, ++$i);
- $dir = substr($dir, 0, $i--);
- }
- }
- }
-
- $dirFiles = self::$darwinCache[$kDir][1];
-
- if (isset($dirFiles[$file])) {
- $kFile = $file;
- } else {
- $kFile = strtolower($file);
-
- if (!isset($dirFiles[$kFile])) {
- foreach (scandir($real, 2) as $f) {
- if ('.' !== $f[0]) {
- $dirFiles[$f] = $f;
- if ($f === $file) {
- $kFile = $k = $file;
- } elseif ($f !== $k = strtolower($f)) {
- $dirFiles[$k] = $f;
- }
- }
- }
- self::$darwinCache[$kDir][1] = $dirFiles;
- }
- }
-
- $real .= $dirFiles[$kFile];
- }
-
- if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true)
- && 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false)
- ) {
- throw new \RuntimeException(sprintf('Case mismatch between class and real file names: %s vs %s in %s', substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)));
- }
- }
-
- return true;
- }
- }
-}
diff --git a/vendor/symfony/debug/ErrorHandler.php b/vendor/symfony/debug/ErrorHandler.php
deleted file mode 100644
index b089737..0000000
--- a/vendor/symfony/debug/ErrorHandler.php
+++ /dev/null
@@ -1,666 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug;
-
-use Psr\Log\LogLevel;
-use Psr\Log\LoggerInterface;
-use Symfony\Component\Debug\Exception\ContextErrorException;
-use Symfony\Component\Debug\Exception\FatalErrorException;
-use Symfony\Component\Debug\Exception\FatalThrowableError;
-use Symfony\Component\Debug\Exception\OutOfMemoryException;
-use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
-use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler;
-use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
-use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface;
-
-/**
- * A generic ErrorHandler for the PHP engine.
- *
- * Provides five bit fields that control how errors are handled:
- * - thrownErrors: errors thrown as \ErrorException
- * - loggedErrors: logged errors, when not @-silenced
- * - scopedErrors: errors thrown or logged with their local context
- * - tracedErrors: errors logged with their stack trace, only once for repeated errors
- * - screamedErrors: never @-silenced errors
- *
- * Each error level can be logged by a dedicated PSR-3 logger object.
- * Screaming only applies to logging.
- * Throwing takes precedence over logging.
- * Uncaught exceptions are logged as E_ERROR.
- * E_DEPRECATED and E_USER_DEPRECATED levels never throw.
- * E_RECOVERABLE_ERROR and E_USER_ERROR levels always throw.
- * Non catchable errors that can be detected at shutdown time are logged when the scream bit field allows so.
- * As errors have a performance cost, repeated errors are all logged, so that the developer
- * can see them and weight them as more important to fix than others of the same level.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ErrorHandler
-{
- private $levels = array(
- E_DEPRECATED => 'Deprecated',
- E_USER_DEPRECATED => 'User Deprecated',
- E_NOTICE => 'Notice',
- E_USER_NOTICE => 'User Notice',
- E_STRICT => 'Runtime Notice',
- E_WARNING => 'Warning',
- E_USER_WARNING => 'User Warning',
- E_COMPILE_WARNING => 'Compile Warning',
- E_CORE_WARNING => 'Core Warning',
- E_USER_ERROR => 'User Error',
- E_RECOVERABLE_ERROR => 'Catchable Fatal Error',
- E_COMPILE_ERROR => 'Compile Error',
- E_PARSE => 'Parse Error',
- E_ERROR => 'Error',
- E_CORE_ERROR => 'Core Error',
- );
-
- private $loggers = array(
- E_DEPRECATED => array(null, LogLevel::INFO),
- E_USER_DEPRECATED => array(null, LogLevel::INFO),
- E_NOTICE => array(null, LogLevel::WARNING),
- E_USER_NOTICE => array(null, LogLevel::WARNING),
- E_STRICT => array(null, LogLevel::WARNING),
- E_WARNING => array(null, LogLevel::WARNING),
- E_USER_WARNING => array(null, LogLevel::WARNING),
- E_COMPILE_WARNING => array(null, LogLevel::WARNING),
- E_CORE_WARNING => array(null, LogLevel::WARNING),
- E_USER_ERROR => array(null, LogLevel::CRITICAL),
- E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL),
- E_COMPILE_ERROR => array(null, LogLevel::CRITICAL),
- E_PARSE => array(null, LogLevel::CRITICAL),
- E_ERROR => array(null, LogLevel::CRITICAL),
- E_CORE_ERROR => array(null, LogLevel::CRITICAL),
- );
-
- private $thrownErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED
- private $scopedErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED
- private $tracedErrors = 0x77FB; // E_ALL - E_STRICT - E_PARSE
- private $screamedErrors = 0x55; // E_ERROR + E_CORE_ERROR + E_COMPILE_ERROR + E_PARSE
- private $loggedErrors = 0;
-
- private $loggedTraces = array();
- private $isRecursive = 0;
- private $isRoot = false;
- private $exceptionHandler;
- private $bootstrappingLogger;
-
- private static $reservedMemory;
- private static $stackedErrors = array();
- private static $stackedErrorLevels = array();
- private static $toStringException = null;
-
- /**
- * Registers the error handler.
- *
- * @param self|null $handler The handler to register
- * @param bool $replace Whether to replace or not any existing handler
- *
- * @return self The registered error handler
- */
- public static function register(self $handler = null, $replace = true)
- {
- if (null === self::$reservedMemory) {
- self::$reservedMemory = str_repeat('x', 10240);
- register_shutdown_function(__CLASS__.'::handleFatalError');
- }
-
- if ($handlerIsNew = null === $handler) {
- $handler = new static();
- }
-
- if (null === $prev = set_error_handler(array($handler, 'handleError'))) {
- restore_error_handler();
- // Specifying the error types earlier would expose us to https://bugs.php.net/63206
- set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors);
- $handler->isRoot = true;
- }
-
- if ($handlerIsNew && is_array($prev) && $prev[0] instanceof self) {
- $handler = $prev[0];
- $replace = false;
- }
- if ($replace || !$prev) {
- $handler->setExceptionHandler(set_exception_handler(array($handler, 'handleException')));
- } else {
- restore_error_handler();
- }
-
- $handler->throwAt(E_ALL & $handler->thrownErrors, true);
-
- return $handler;
- }
-
- public function __construct(BufferingLogger $bootstrappingLogger = null)
- {
- if ($bootstrappingLogger) {
- $this->bootstrappingLogger = $bootstrappingLogger;
- $this->setDefaultLogger($bootstrappingLogger);
- }
- }
-
- /**
- * Sets a logger to non assigned errors levels.
- *
- * @param LoggerInterface $logger A PSR-3 logger to put as default for the given levels
- * @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants
- * @param bool $replace Whether to replace or not any existing logger
- */
- public function setDefaultLogger(LoggerInterface $logger, $levels = E_ALL, $replace = false)
- {
- $loggers = array();
-
- if (is_array($levels)) {
- foreach ($levels as $type => $logLevel) {
- if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) {
- $loggers[$type] = array($logger, $logLevel);
- }
- }
- } else {
- if (null === $levels) {
- $levels = E_ALL;
- }
- foreach ($this->loggers as $type => $log) {
- if (($type & $levels) && (empty($log[0]) || $replace || $log[0] === $this->bootstrappingLogger)) {
- $log[0] = $logger;
- $loggers[$type] = $log;
- }
- }
- }
-
- $this->setLoggers($loggers);
- }
-
- /**
- * Sets a logger for each error level.
- *
- * @param array $loggers Error levels to [LoggerInterface|null, LogLevel::*] map
- *
- * @return array The previous map
- *
- * @throws \InvalidArgumentException
- */
- public function setLoggers(array $loggers)
- {
- $prevLogged = $this->loggedErrors;
- $prev = $this->loggers;
- $flush = array();
-
- foreach ($loggers as $type => $log) {
- if (!isset($prev[$type])) {
- throw new \InvalidArgumentException('Unknown error type: '.$type);
- }
- if (!is_array($log)) {
- $log = array($log);
- } elseif (!array_key_exists(0, $log)) {
- throw new \InvalidArgumentException('No logger provided');
- }
- if (null === $log[0]) {
- $this->loggedErrors &= ~$type;
- } elseif ($log[0] instanceof LoggerInterface) {
- $this->loggedErrors |= $type;
- } else {
- throw new \InvalidArgumentException('Invalid logger provided');
- }
- $this->loggers[$type] = $log + $prev[$type];
-
- if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) {
- $flush[$type] = $type;
- }
- }
- $this->reRegister($prevLogged | $this->thrownErrors);
-
- if ($flush) {
- foreach ($this->bootstrappingLogger->cleanLogs() as $log) {
- $type = $log[2]['type'];
- if (!isset($flush[$type])) {
- $this->bootstrappingLogger->log($log[0], $log[1], $log[2]);
- } elseif ($this->loggers[$type][0]) {
- $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]);
- }
- }
- }
-
- return $prev;
- }
-
- /**
- * Sets a user exception handler.
- *
- * @param callable $handler A handler that will be called on Exception
- *
- * @return callable|null The previous exception handler
- */
- public function setExceptionHandler(callable $handler = null)
- {
- $prev = $this->exceptionHandler;
- $this->exceptionHandler = $handler;
-
- return $prev;
- }
-
- /**
- * Sets the PHP error levels that throw an exception when a PHP error occurs.
- *
- * @param int $levels A bit field of E_* constants for thrown errors
- * @param bool $replace Replace or amend the previous value
- *
- * @return int The previous value
- */
- public function throwAt($levels, $replace = false)
- {
- $prev = $this->thrownErrors;
- $this->thrownErrors = ($levels | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
- if (!$replace) {
- $this->thrownErrors |= $prev;
- }
- $this->reRegister($prev | $this->loggedErrors);
-
- return $prev;
- }
-
- /**
- * Sets the PHP error levels for which local variables are preserved.
- *
- * @param int $levels A bit field of E_* constants for scoped errors
- * @param bool $replace Replace or amend the previous value
- *
- * @return int The previous value
- */
- public function scopeAt($levels, $replace = false)
- {
- $prev = $this->scopedErrors;
- $this->scopedErrors = (int) $levels;
- if (!$replace) {
- $this->scopedErrors |= $prev;
- }
-
- return $prev;
- }
-
- /**
- * Sets the PHP error levels for which the stack trace is preserved.
- *
- * @param int $levels A bit field of E_* constants for traced errors
- * @param bool $replace Replace or amend the previous value
- *
- * @return int The previous value
- */
- public function traceAt($levels, $replace = false)
- {
- $prev = $this->tracedErrors;
- $this->tracedErrors = (int) $levels;
- if (!$replace) {
- $this->tracedErrors |= $prev;
- }
-
- return $prev;
- }
-
- /**
- * Sets the error levels where the @-operator is ignored.
- *
- * @param int $levels A bit field of E_* constants for screamed errors
- * @param bool $replace Replace or amend the previous value
- *
- * @return int The previous value
- */
- public function screamAt($levels, $replace = false)
- {
- $prev = $this->screamedErrors;
- $this->screamedErrors = (int) $levels;
- if (!$replace) {
- $this->screamedErrors |= $prev;
- }
-
- return $prev;
- }
-
- /**
- * Re-registers as a PHP error handler if levels changed.
- */
- private function reRegister($prev)
- {
- if ($prev !== $this->thrownErrors | $this->loggedErrors) {
- $handler = set_error_handler('var_dump');
- $handler = is_array($handler) ? $handler[0] : null;
- restore_error_handler();
- if ($handler === $this) {
- restore_error_handler();
- if ($this->isRoot) {
- set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors);
- } else {
- set_error_handler(array($this, 'handleError'));
- }
- }
- }
- }
-
- /**
- * Handles errors by filtering then logging them according to the configured bit fields.
- *
- * @param int $type One of the E_* constants
- * @param string $message
- * @param string $file
- * @param int $line
- * @param array $context
- * @param array $backtrace
- *
- * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself
- *
- * @throws \ErrorException When $this->thrownErrors requests so
- *
- * @internal
- */
- public function handleError($type, $message, $file, $line, array $context, array $backtrace = null)
- {
- $level = error_reporting() | E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED;
- $log = $this->loggedErrors & $type;
- $throw = $this->thrownErrors & $type & $level;
- $type &= $level | $this->screamedErrors;
-
- if (!$type || (!$log && !$throw)) {
- return $type && $log;
- }
-
- if (null !== $backtrace && $type & E_ERROR) {
- // E_ERROR fatal errors are triggered on HHVM when
- // hhvm.error_handling.call_user_handler_on_fatals=1
- // which is the way to get their backtrace.
- $this->handleFatalError(compact('type', 'message', 'file', 'line', 'backtrace'));
-
- return true;
- }
-
- if ($throw) {
- if (null !== self::$toStringException) {
- $throw = self::$toStringException;
- self::$toStringException = null;
- } elseif (($this->scopedErrors & $type) && class_exists(ContextErrorException::class)) {
- $throw = new ContextErrorException($this->levels[$type].': '.$message, 0, $type, $file, $line, $context);
- } else {
- $throw = new \ErrorException($this->levels[$type].': '.$message, 0, $type, $file, $line);
- }
-
- if (E_USER_ERROR & $type) {
- $backtrace = $backtrace ?: $throw->getTrace();
-
- for ($i = 1; isset($backtrace[$i]); ++$i) {
- if (isset($backtrace[$i]['function'], $backtrace[$i]['type'], $backtrace[$i - 1]['function'])
- && '__toString' === $backtrace[$i]['function']
- && '->' === $backtrace[$i]['type']
- && !isset($backtrace[$i - 1]['class'])
- && ('trigger_error' === $backtrace[$i - 1]['function'] || 'user_error' === $backtrace[$i - 1]['function'])
- ) {
- // Here, we know trigger_error() has been called from __toString().
- // HHVM is fine with throwing from __toString() but PHP triggers a fatal error instead.
- // A small convention allows working around the limitation:
- // given a caught $e exception in __toString(), quitting the method with
- // `return trigger_error($e, E_USER_ERROR);` allows this error handler
- // to make $e get through the __toString() barrier.
-
- foreach ($context as $e) {
- if (($e instanceof \Exception || $e instanceof \Throwable) && $e->__toString() === $message) {
- if (1 === $i) {
- // On HHVM
- $throw = $e;
- break;
- }
- self::$toStringException = $e;
-
- return true;
- }
- }
-
- if (1 < $i) {
- // On PHP (not on HHVM), display the original error message instead of the default one.
- $this->handleException($throw);
-
- // Stop the process by giving back the error to the native handler.
- return false;
- }
- }
- }
- }
-
- throw $throw;
- }
-
- // For duplicated errors, log the trace only once
- $e = md5("{$type}/{$line}/{$file}\x00{$message}", true);
- $trace = true;
-
- if (!($this->tracedErrors & $type) || isset($this->loggedTraces[$e])) {
- $trace = false;
- } else {
- $this->loggedTraces[$e] = 1;
- }
-
- $e = compact('type', 'file', 'line', 'level');
-
- if ($type & $level) {
- if ($this->scopedErrors & $type) {
- $e['scope_vars'] = $context;
- if ($trace) {
- $e['stack'] = $backtrace ?: debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);
- }
- } elseif ($trace) {
- if (null === $backtrace) {
- $e['stack'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
- } else {
- foreach ($backtrace as &$frame) {
- unset($frame['args'], $frame);
- }
- $e['stack'] = $backtrace;
- }
- }
- }
-
- if ($this->isRecursive) {
- $log = 0;
- } elseif (self::$stackedErrorLevels) {
- self::$stackedErrors[] = array($this->loggers[$type][0], ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, $message, $e);
- } else {
- try {
- $this->isRecursive = true;
- $this->loggers[$type][0]->log(($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, $message, $e);
- } finally {
- $this->isRecursive = false;
- }
- }
-
- return $type && $log;
- }
-
- /**
- * Handles an exception by logging then forwarding it to another handler.
- *
- * @param \Exception|\Throwable $exception An exception to handle
- * @param array $error An array as returned by error_get_last()
- *
- * @internal
- */
- public function handleException($exception, array $error = null)
- {
- if (!$exception instanceof \Exception) {
- $exception = new FatalThrowableError($exception);
- }
- $type = $exception instanceof FatalErrorException ? $exception->getSeverity() : E_ERROR;
-
- if (($this->loggedErrors & $type) || $exception instanceof FatalThrowableError) {
- $e = array(
- 'type' => $type,
- 'file' => $exception->getFile(),
- 'line' => $exception->getLine(),
- 'level' => error_reporting(),
- 'stack' => $exception->getTrace(),
- );
- if ($exception instanceof FatalErrorException) {
- if ($exception instanceof FatalThrowableError) {
- $error = array(
- 'type' => $type,
- 'message' => $message = $exception->getMessage(),
- 'file' => $e['file'],
- 'line' => $e['line'],
- );
- } else {
- $message = 'Fatal '.$exception->getMessage();
- }
- } elseif ($exception instanceof \ErrorException) {
- $message = 'Uncaught '.$exception->getMessage();
- if ($exception instanceof ContextErrorException) {
- $e['context'] = $exception->getContext();
- }
- } else {
- $message = 'Uncaught Exception: '.$exception->getMessage();
- }
- }
- if ($this->loggedErrors & $type) {
- $this->loggers[$type][0]->log($this->loggers[$type][1], $message, $e);
- }
- if ($exception instanceof FatalErrorException && !$exception instanceof OutOfMemoryException && $error) {
- foreach ($this->getFatalErrorHandlers() as $handler) {
- if ($e = $handler->handleError($error, $exception)) {
- $exception = $e;
- break;
- }
- }
- }
- if (empty($this->exceptionHandler)) {
- throw $exception; // Give back $exception to the native handler
- }
- try {
- call_user_func($this->exceptionHandler, $exception);
- } catch (\Exception $handlerException) {
- } catch (\Throwable $handlerException) {
- }
- if (isset($handlerException)) {
- $this->exceptionHandler = null;
- $this->handleException($handlerException);
- }
- }
-
- /**
- * Shutdown registered function for handling PHP fatal errors.
- *
- * @param array $error An array as returned by error_get_last()
- *
- * @internal
- */
- public static function handleFatalError(array $error = null)
- {
- if (null === self::$reservedMemory) {
- return;
- }
-
- self::$reservedMemory = null;
-
- $handler = set_error_handler('var_dump');
- $handler = is_array($handler) ? $handler[0] : null;
- restore_error_handler();
-
- if (!$handler instanceof self) {
- return;
- }
-
- if (null === $error) {
- $error = error_get_last();
- }
-
- try {
- while (self::$stackedErrorLevels) {
- static::unstackErrors();
- }
- } catch (\Exception $exception) {
- // Handled below
- } catch (\Throwable $exception) {
- // Handled below
- }
-
- if ($error && $error['type'] &= E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR) {
- // Let's not throw anymore but keep logging
- $handler->throwAt(0, true);
- $trace = isset($error['backtrace']) ? $error['backtrace'] : null;
-
- if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) {
- $exception = new OutOfMemoryException($handler->levels[$error['type']].': '.$error['message'], 0, $error['type'], $error['file'], $error['line'], 2, false, $trace);
- } else {
- $exception = new FatalErrorException($handler->levels[$error['type']].': '.$error['message'], 0, $error['type'], $error['file'], $error['line'], 2, true, $trace);
- }
- } elseif (!isset($exception)) {
- return;
- }
-
- try {
- $handler->handleException($exception, $error);
- } catch (FatalErrorException $e) {
- // Ignore this re-throw
- }
- }
-
- /**
- * Configures the error handler for delayed handling.
- * Ensures also that non-catchable fatal errors are never silenced.
- *
- * As shown by http://bugs.php.net/42098 and http://bugs.php.net/60724
- * PHP has a compile stage where it behaves unusually. To workaround it,
- * we plug an error handler that only stacks errors for later.
- *
- * The most important feature of this is to prevent
- * autoloading until unstackErrors() is called.
- */
- public static function stackErrors()
- {
- self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR);
- }
-
- /**
- * Unstacks stacked errors and forwards to the logger.
- */
- public static function unstackErrors()
- {
- $level = array_pop(self::$stackedErrorLevels);
-
- if (null !== $level) {
- $e = error_reporting($level);
- if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) {
- // If the user changed the error level, do not overwrite it
- error_reporting($e);
- }
- }
-
- if (empty(self::$stackedErrorLevels)) {
- $errors = self::$stackedErrors;
- self::$stackedErrors = array();
-
- foreach ($errors as $e) {
- $e[0]->log($e[1], $e[2], $e[3]);
- }
- }
- }
-
- /**
- * Gets the fatal error handlers.
- *
- * Override this method if you want to define more fatal error handlers.
- *
- * @return FatalErrorHandlerInterface[] An array of FatalErrorHandlerInterface
- */
- protected function getFatalErrorHandlers()
- {
- return array(
- new UndefinedFunctionFatalErrorHandler(),
- new UndefinedMethodFatalErrorHandler(),
- new ClassNotFoundFatalErrorHandler(),
- );
- }
-}
diff --git a/vendor/symfony/debug/Exception/ClassNotFoundException.php b/vendor/symfony/debug/Exception/ClassNotFoundException.php
deleted file mode 100644
index b91bf46..0000000
--- a/vendor/symfony/debug/Exception/ClassNotFoundException.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-/**
- * Class (or Trait or Interface) Not Found Exception.
- *
- * @author Konstanton Myakshin <koc-dp@yandex.ru>
- */
-class ClassNotFoundException extends FatalErrorException
-{
- public function __construct($message, \ErrorException $previous)
- {
- parent::__construct(
- $message,
- $previous->getCode(),
- $previous->getSeverity(),
- $previous->getFile(),
- $previous->getLine(),
- $previous->getPrevious()
- );
- $this->setTrace($previous->getTrace());
- }
-}
diff --git a/vendor/symfony/debug/Exception/ContextErrorException.php b/vendor/symfony/debug/Exception/ContextErrorException.php
deleted file mode 100644
index 54f0198..0000000
--- a/vendor/symfony/debug/Exception/ContextErrorException.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-/**
- * Error Exception with Variable Context.
- *
- * @author Christian Sciberras <uuf6429@gmail.com>
- */
-class ContextErrorException extends \ErrorException
-{
- private $context = array();
-
- public function __construct($message, $code, $severity, $filename, $lineno, $context = array())
- {
- parent::__construct($message, $code, $severity, $filename, $lineno);
- $this->context = $context;
- }
-
- /**
- * @return array Array of variables that existed when the exception occurred
- */
- public function getContext()
- {
- return $this->context;
- }
-}
diff --git a/vendor/symfony/debug/Exception/FatalErrorException.php b/vendor/symfony/debug/Exception/FatalErrorException.php
deleted file mode 100644
index f24a54e..0000000
--- a/vendor/symfony/debug/Exception/FatalErrorException.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-/**
- * Fatal Error Exception.
- *
- * @author Konstanton Myakshin <koc-dp@yandex.ru>
- */
-class FatalErrorException extends \ErrorException
-{
- public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true, array $trace = null)
- {
- parent::__construct($message, $code, $severity, $filename, $lineno);
-
- if (null !== $trace) {
- if (!$traceArgs) {
- foreach ($trace as &$frame) {
- unset($frame['args'], $frame['this'], $frame);
- }
- }
-
- $this->setTrace($trace);
- } elseif (null !== $traceOffset) {
- if (function_exists('xdebug_get_function_stack')) {
- $trace = xdebug_get_function_stack();
- if (0 < $traceOffset) {
- array_splice($trace, -$traceOffset);
- }
-
- foreach ($trace as &$frame) {
- if (!isset($frame['type'])) {
- // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695
- if (isset($frame['class'])) {
- $frame['type'] = '::';
- }
- } elseif ('dynamic' === $frame['type']) {
- $frame['type'] = '->';
- } elseif ('static' === $frame['type']) {
- $frame['type'] = '::';
- }
-
- // XDebug also has a different name for the parameters array
- if (!$traceArgs) {
- unset($frame['params'], $frame['args']);
- } elseif (isset($frame['params']) && !isset($frame['args'])) {
- $frame['args'] = $frame['params'];
- unset($frame['params']);
- }
- }
-
- unset($frame);
- $trace = array_reverse($trace);
- } elseif (function_exists('symfony_debug_backtrace')) {
- $trace = symfony_debug_backtrace();
- if (0 < $traceOffset) {
- array_splice($trace, 0, $traceOffset);
- }
- } else {
- $trace = array();
- }
-
- $this->setTrace($trace);
- }
- }
-
- protected function setTrace($trace)
- {
- $traceReflector = new \ReflectionProperty('Exception', 'trace');
- $traceReflector->setAccessible(true);
- $traceReflector->setValue($this, $trace);
- }
-}
diff --git a/vendor/symfony/debug/Exception/FatalThrowableError.php b/vendor/symfony/debug/Exception/FatalThrowableError.php
deleted file mode 100644
index 34f43b1..0000000
--- a/vendor/symfony/debug/Exception/FatalThrowableError.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-/**
- * Fatal Throwable Error.
- *
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class FatalThrowableError extends FatalErrorException
-{
- public function __construct(\Throwable $e)
- {
- if ($e instanceof \ParseError) {
- $message = 'Parse error: '.$e->getMessage();
- $severity = E_PARSE;
- } elseif ($e instanceof \TypeError) {
- $message = 'Type error: '.$e->getMessage();
- $severity = E_RECOVERABLE_ERROR;
- } else {
- $message = $e->getMessage();
- $severity = E_ERROR;
- }
-
- \ErrorException::__construct(
- $message,
- $e->getCode(),
- $severity,
- $e->getFile(),
- $e->getLine()
- );
-
- $this->setTrace($e->getTrace());
- }
-}
diff --git a/vendor/symfony/debug/Exception/FlattenException.php b/vendor/symfony/debug/Exception/FlattenException.php
deleted file mode 100644
index 7466631..0000000
--- a/vendor/symfony/debug/Exception/FlattenException.php
+++ /dev/null
@@ -1,256 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
-
-/**
- * FlattenException wraps a PHP Exception to be able to serialize it.
- *
- * Basically, this class removes all objects from the trace.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class FlattenException
-{
- private $message;
- private $code;
- private $previous;
- private $trace;
- private $class;
- private $statusCode;
- private $headers;
- private $file;
- private $line;
-
- public static function create(\Exception $exception, $statusCode = null, array $headers = array())
- {
- $e = new static();
- $e->setMessage($exception->getMessage());
- $e->setCode($exception->getCode());
-
- if ($exception instanceof HttpExceptionInterface) {
- $statusCode = $exception->getStatusCode();
- $headers = array_merge($headers, $exception->getHeaders());
- }
-
- if (null === $statusCode) {
- $statusCode = 500;
- }
-
- $e->setStatusCode($statusCode);
- $e->setHeaders($headers);
- $e->setTraceFromException($exception);
- $e->setClass(get_class($exception));
- $e->setFile($exception->getFile());
- $e->setLine($exception->getLine());
-
- $previous = $exception->getPrevious();
-
- if ($previous instanceof \Exception) {
- $e->setPrevious(static::create($previous));
- } elseif ($previous instanceof \Throwable) {
- $e->setPrevious(static::create(new FatalThrowableError($previous)));
- }
-
- return $e;
- }
-
- public function toArray()
- {
- $exceptions = array();
- foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) {
- $exceptions[] = array(
- 'message' => $exception->getMessage(),
- 'class' => $exception->getClass(),
- 'trace' => $exception->getTrace(),
- );
- }
-
- return $exceptions;
- }
-
- public function getStatusCode()
- {
- return $this->statusCode;
- }
-
- public function setStatusCode($code)
- {
- $this->statusCode = $code;
- }
-
- public function getHeaders()
- {
- return $this->headers;
- }
-
- public function setHeaders(array $headers)
- {
- $this->headers = $headers;
- }
-
- public function getClass()
- {
- return $this->class;
- }
-
- public function setClass($class)
- {
- $this->class = $class;
- }
-
- public function getFile()
- {
- return $this->file;
- }
-
- public function setFile($file)
- {
- $this->file = $file;
- }
-
- public function getLine()
- {
- return $this->line;
- }
-
- public function setLine($line)
- {
- $this->line = $line;
- }
-
- public function getMessage()
- {
- return $this->message;
- }
-
- public function setMessage($message)
- {
- $this->message = $message;
- }
-
- public function getCode()
- {
- return $this->code;
- }
-
- public function setCode($code)
- {
- $this->code = $code;
- }
-
- public function getPrevious()
- {
- return $this->previous;
- }
-
- public function setPrevious(FlattenException $previous)
- {
- $this->previous = $previous;
- }
-
- public function getAllPrevious()
- {
- $exceptions = array();
- $e = $this;
- while ($e = $e->getPrevious()) {
- $exceptions[] = $e;
- }
-
- return $exceptions;
- }
-
- public function getTrace()
- {
- return $this->trace;
- }
-
- public function setTraceFromException(\Exception $exception)
- {
- $this->setTrace($exception->getTrace(), $exception->getFile(), $exception->getLine());
- }
-
- public function setTrace($trace, $file, $line)
- {
- $this->trace = array();
- $this->trace[] = array(
- 'namespace' => '',
- 'short_class' => '',
- 'class' => '',
- 'type' => '',
- 'function' => '',
- 'file' => $file,
- 'line' => $line,
- 'args' => array(),
- );
- foreach ($trace as $entry) {
- $class = '';
- $namespace = '';
- if (isset($entry['class'])) {
- $parts = explode('\\', $entry['class']);
- $class = array_pop($parts);
- $namespace = implode('\\', $parts);
- }
-
- $this->trace[] = array(
- 'namespace' => $namespace,
- 'short_class' => $class,
- 'class' => isset($entry['class']) ? $entry['class'] : '',
- 'type' => isset($entry['type']) ? $entry['type'] : '',
- 'function' => isset($entry['function']) ? $entry['function'] : null,
- 'file' => isset($entry['file']) ? $entry['file'] : null,
- 'line' => isset($entry['line']) ? $entry['line'] : null,
- 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : array(),
- );
- }
- }
-
- private function flattenArgs($args, $level = 0, &$count = 0)
- {
- $result = array();
- foreach ($args as $key => $value) {
- if (++$count > 1e4) {
- return array('array', '*SKIPPED over 10000 entries*');
- }
- if ($value instanceof \__PHP_Incomplete_Class) {
- // is_object() returns false on PHP<=7.1
- $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
- } elseif (is_object($value)) {
- $result[$key] = array('object', get_class($value));
- } elseif (is_array($value)) {
- if ($level > 10) {
- $result[$key] = array('array', '*DEEP NESTED ARRAY*');
- } else {
- $result[$key] = array('array', $this->flattenArgs($value, $level + 1, $count));
- }
- } elseif (null === $value) {
- $result[$key] = array('null', null);
- } elseif (is_bool($value)) {
- $result[$key] = array('boolean', $value);
- } elseif (is_resource($value)) {
- $result[$key] = array('resource', get_resource_type($value));
- } else {
- $result[$key] = array('string', (string) $value);
- }
- }
-
- return $result;
- }
-
- private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value)
- {
- $array = new \ArrayObject($value);
-
- return $array['__PHP_Incomplete_Class_Name'];
- }
-}
diff --git a/vendor/symfony/debug/Exception/UndefinedFunctionException.php b/vendor/symfony/debug/Exception/UndefinedFunctionException.php
deleted file mode 100644
index a66ae2a..0000000
--- a/vendor/symfony/debug/Exception/UndefinedFunctionException.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-/**
- * Undefined Function Exception.
- *
- * @author Konstanton Myakshin <koc-dp@yandex.ru>
- */
-class UndefinedFunctionException extends FatalErrorException
-{
- public function __construct($message, \ErrorException $previous)
- {
- parent::__construct(
- $message,
- $previous->getCode(),
- $previous->getSeverity(),
- $previous->getFile(),
- $previous->getLine(),
- $previous->getPrevious()
- );
- $this->setTrace($previous->getTrace());
- }
-}
diff --git a/vendor/symfony/debug/Exception/UndefinedMethodException.php b/vendor/symfony/debug/Exception/UndefinedMethodException.php
deleted file mode 100644
index 350dc31..0000000
--- a/vendor/symfony/debug/Exception/UndefinedMethodException.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\Exception;
-
-/**
- * Undefined Method Exception.
- *
- * @author Grégoire Pineau <lyrixx@lyrixx.info>
- */
-class UndefinedMethodException extends FatalErrorException
-{
- public function __construct($message, \ErrorException $previous)
- {
- parent::__construct(
- $message,
- $previous->getCode(),
- $previous->getSeverity(),
- $previous->getFile(),
- $previous->getLine(),
- $previous->getPrevious()
- );
- $this->setTrace($previous->getTrace());
- }
-}
diff --git a/vendor/symfony/debug/ExceptionHandler.php b/vendor/symfony/debug/ExceptionHandler.php
deleted file mode 100644
index 0e80f2a..0000000
--- a/vendor/symfony/debug/ExceptionHandler.php
+++ /dev/null
@@ -1,415 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug;
-
-use Symfony\Component\Debug\Exception\FlattenException;
-use Symfony\Component\Debug\Exception\OutOfMemoryException;
-
-/**
- * ExceptionHandler converts an exception to a Response object.
- *
- * It is mostly useful in debug mode to replace the default PHP/XDebug
- * output with something prettier and more useful.
- *
- * As this class is mainly used during Kernel boot, where nothing is yet
- * available, the Response content is always HTML.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- * @author Nicolas Grekas <p@tchwork.com>
- */
-class ExceptionHandler
-{
- private $debug;
- private $charset;
- private $handler;
- private $caughtBuffer;
- private $caughtLength;
- private $fileLinkFormat;
-
- public function __construct($debug = true, $charset = null, $fileLinkFormat = null)
- {
- $this->debug = $debug;
- $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8';
- $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
- }
-
- /**
- * Registers the exception handler.
- *
- * @param bool $debug Enable/disable debug mode, where the stack trace is displayed
- * @param string|null $charset The charset used by exception messages
- * @param string|null $fileLinkFormat The IDE link template
- *
- * @return ExceptionHandler The registered exception handler
- */
- public static function register($debug = true, $charset = null, $fileLinkFormat = null)
- {
- $handler = new static($debug, $charset, $fileLinkFormat);
-
- $prev = set_exception_handler(array($handler, 'handle'));
- if (is_array($prev) && $prev[0] instanceof ErrorHandler) {
- restore_exception_handler();
- $prev[0]->setExceptionHandler(array($handler, 'handle'));
- }
-
- return $handler;
- }
-
- /**
- * Sets a user exception handler.
- *
- * @param callable $handler An handler that will be called on Exception
- *
- * @return callable|null The previous exception handler if any
- */
- public function setHandler(callable $handler = null)
- {
- $old = $this->handler;
- $this->handler = $handler;
-
- return $old;
- }
-
- /**
- * Sets the format for links to source files.
- *
- * @param string $format The format for links to source files
- *
- * @return string The previous file link format
- */
- public function setFileLinkFormat($format)
- {
- $old = $this->fileLinkFormat;
- $this->fileLinkFormat = $format;
-
- return $old;
- }
-
- /**
- * Sends a response for the given Exception.
- *
- * To be as fail-safe as possible, the exception is first handled
- * by our simple exception handler, then by the user exception handler.
- * The latter takes precedence and any output from the former is cancelled,
- * if and only if nothing bad happens in this handling path.
- */
- public function handle(\Exception $exception)
- {
- if (null === $this->handler || $exception instanceof OutOfMemoryException) {
- $this->sendPhpResponse($exception);
-
- return;
- }
-
- $caughtLength = $this->caughtLength = 0;
-
- ob_start(function ($buffer) {
- $this->caughtBuffer = $buffer;
-
- return '';
- });
-
- $this->sendPhpResponse($exception);
- while (null === $this->caughtBuffer && ob_end_flush()) {
- // Empty loop, everything is in the condition
- }
- if (isset($this->caughtBuffer[0])) {
- ob_start(function ($buffer) {
- if ($this->caughtLength) {
- // use substr_replace() instead of substr() for mbstring overloading resistance
- $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength);
- if (isset($cleanBuffer[0])) {
- $buffer = $cleanBuffer;
- }
- }
-
- return $buffer;
- });
-
- echo $this->caughtBuffer;
- $caughtLength = ob_get_length();
- }
- $this->caughtBuffer = null;
-
- try {
- call_user_func($this->handler, $exception);
- $this->caughtLength = $caughtLength;
- } catch (\Exception $e) {
- if (!$caughtLength) {
- // All handlers failed. Let PHP handle that now.
- throw $exception;
- }
- }
- }
-
- /**
- * Sends the error associated with the given Exception as a plain PHP response.
- *
- * This method uses plain PHP functions like header() and echo to output
- * the response.
- *
- * @param \Exception|FlattenException $exception An \Exception or FlattenException instance
- */
- public function sendPhpResponse($exception)
- {
- if (!$exception instanceof FlattenException) {
- $exception = FlattenException::create($exception);
- }
-
- if (!headers_sent()) {
- header(sprintf('HTTP/1.0 %s', $exception->getStatusCode()));
- foreach ($exception->getHeaders() as $name => $value) {
- header($name.': '.$value, false);
- }
- header('Content-Type: text/html; charset='.$this->charset);
- }
-
- echo $this->decorate($this->getContent($exception), $this->getStylesheet($exception));
- }
-
- /**
- * Gets the full HTML content associated with the given exception.
- *
- * @param \Exception|FlattenException $exception An \Exception or FlattenException instance
- *
- * @return string The HTML content as a string
- */
- public function getHtml($exception)
- {
- if (!$exception instanceof FlattenException) {
- $exception = FlattenException::create($exception);
- }
-
- return $this->decorate($this->getContent($exception), $this->getStylesheet($exception));
- }
-
- /**
- * Gets the HTML content associated with the given exception.
- *
- * @param FlattenException $exception A FlattenException instance
- *
- * @return string The content as a string
- */
- public function getContent(FlattenException $exception)
- {
- switch ($exception->getStatusCode()) {
- case 404:
- $title = 'Sorry, the page you are looking for could not be found.';
- break;
- default:
- $title = 'Whoops, looks like something went wrong.';
- }
-
- $content = '';
- if ($this->debug) {
- try {
- $count = count($exception->getAllPrevious());
- $total = $count + 1;
- foreach ($exception->toArray() as $position => $e) {
- $ind = $count - $position + 1;
- $class = $this->formatClass($e['class']);
- $message = nl2br($this->escapeHtml($e['message']));
- $content .= sprintf(<<<'EOF'
- <h2 class="block_exception clear_fix">
- <span class="exception_counter">%d/%d</span>
- <span class="exception_title">%s%s:</span>
- <span class="exception_message">%s</span>
- </h2>
- <div class="block">
- <ol class="traces list_exception">
-
-EOF
- , $ind, $total, $class, $this->formatPath($e['trace'][0]['file'], $e['trace'][0]['line']), $message);
- foreach ($e['trace'] as $trace) {
- $content .= ' <li>';
- if ($trace['function']) {
- $content .= sprintf('at %s%s%s(%s)', $this->formatClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args']));
- }
- if (isset($trace['file']) && isset($trace['line'])) {
- $content .= $this->formatPath($trace['file'], $trace['line']);
- }
- $content .= "</li>\n";
- }
-
- $content .= " </ol>\n</div>\n";
- }
- } catch (\Exception $e) {
- // something nasty happened and we cannot throw an exception anymore
- if ($this->debug) {
- $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $this->escapeHtml($e->getMessage()));
- } else {
- $title = 'Whoops, looks like something went wrong.';
- }
- }
- }
-
- return <<<EOF
- <div id="sf-resetcontent" class="sf-reset">
- <h1>$title</h1>
- $content
- </div>
-EOF;
- }
-
- /**
- * Gets the stylesheet associated with the given exception.
- *
- * @param FlattenException $exception A FlattenException instance
- *
- * @return string The stylesheet as a string
- */
- public function getStylesheet(FlattenException $exception)
- {
- return <<<'EOF'
- .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }
- .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }
- .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
- .sf-reset .clear_fix { display:inline-block; }
- .sf-reset * html .clear_fix { height:1%; }
- .sf-reset .clear_fix { display:block; }
- .sf-reset, .sf-reset .block { margin: auto }
- .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }
- .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
- .sf-reset strong { font-weight:bold; }
- .sf-reset a { color:#6c6159; cursor: default; }
- .sf-reset a img { border:none; }
- .sf-reset a:hover { text-decoration:underline; }
- .sf-reset em { font-style:italic; }
- .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }
- .sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; }
- .sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; }
- .sf-reset .exception_message { margin-left: 3em; display: block; }
- .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }
- .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;
- -webkit-border-bottom-right-radius: 16px;
- -webkit-border-bottom-left-radius: 16px;
- -moz-border-radius-bottomright: 16px;
- -moz-border-radius-bottomleft: 16px;
- border-bottom-right-radius: 16px;
- border-bottom-left-radius: 16px;
- border-bottom:1px solid #ccc;
- border-right:1px solid #ccc;
- border-left:1px solid #ccc;
- word-wrap: break-word;
- }
- .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;
- -webkit-border-top-left-radius: 16px;
- -webkit-border-top-right-radius: 16px;
- -moz-border-radius-topleft: 16px;
- -moz-border-radius-topright: 16px;
- border-top-left-radius: 16px;
- border-top-right-radius: 16px;
- border-top:1px solid #ccc;
- border-right:1px solid #ccc;
- border-left:1px solid #ccc;
- overflow: hidden;
- word-wrap: break-word;
- }
- .sf-reset a { background:none; color:#868686; text-decoration:none; }
- .sf-reset a:hover { background:none; color:#313131; text-decoration:underline; }
- .sf-reset ol { padding: 10px 0; }
- .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- border: 1px solid #ccc;
- }
-EOF;
- }
-
- private function decorate($content, $css)
- {
- return <<<EOF
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="{$this->charset}" />
- <meta name="robots" content="noindex,nofollow" />
- <style>
- /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
- html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
-
- html { background: #eee; padding: 10px }
- img { border: 0; }
- #sf-resetcontent { width:970px; margin:0 auto; }
- $css
- </style>
- </head>
- <body>
- $content
- </body>
-</html>
-EOF;
- }
-
- private function formatClass($class)
- {
- $parts = explode('\\', $class);
-
- return sprintf('<abbr title="%s">%s</abbr>', $class, array_pop($parts));
- }
-
- private function formatPath($path, $line)
- {
- $path = $this->escapeHtml($path);
- $file = preg_match('#[^/\\\\]*$#', $path, $file) ? $file[0] : $path;
-
- if ($linkFormat = $this->fileLinkFormat) {
- $link = strtr($this->escapeHtml($linkFormat), array('%f' => $path, '%l' => (int) $line));
-
- return sprintf(' in <a href="%s" title="Go to source">%s line %d</a>', $link, $file, $line);
- }
-
- return sprintf(' in <a title="%s line %3$d" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">%s line %d</a>', $path, $file, $line);
- }
-
- /**
- * Formats an array as a string.
- *
- * @param array $args The argument array
- *
- * @return string
- */
- private function formatArgs(array $args)
- {
- $result = array();
- foreach ($args as $key => $item) {
- if ('object' === $item[0]) {
- $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));
- } elseif ('array' === $item[0]) {
- $formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
- } elseif ('string' === $item[0]) {
- $formattedValue = sprintf("'%s'", $this->escapeHtml($item[1]));
- } elseif ('null' === $item[0]) {
- $formattedValue = '<em>null</em>';
- } elseif ('boolean' === $item[0]) {
- $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';
- } elseif ('resource' === $item[0]) {
- $formattedValue = '<em>resource</em>';
- } else {
- $formattedValue = str_replace("\n", '', var_export($this->escapeHtml((string) $item[1]), true));
- }
-
- $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue);
- }
-
- return implode(', ', $result);
- }
-
- /**
- * HTML-encodes a string.
- */
- private function escapeHtml($str)
- {
- return htmlspecialchars($str, ENT_QUOTES | ENT_SUBSTITUTE, $this->charset);
- }
-}
diff --git a/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php
deleted file mode 100644
index c48d0d3..0000000
--- a/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php
+++ /dev/null
@@ -1,206 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\FatalErrorHandler;
-
-use Symfony\Component\Debug\Exception\ClassNotFoundException;
-use Symfony\Component\Debug\Exception\FatalErrorException;
-use Symfony\Component\Debug\DebugClassLoader;
-use Composer\Autoload\ClassLoader as ComposerClassLoader;
-use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader;
-
-/**
- * ErrorHandler for classes that do not exist.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
-{
- /**
- * {@inheritdoc}
- */
- public function handleError(array $error, FatalErrorException $exception)
- {
- $messageLen = strlen($error['message']);
- $notFoundSuffix = '\' not found';
- $notFoundSuffixLen = strlen($notFoundSuffix);
- if ($notFoundSuffixLen > $messageLen) {
- return;
- }
-
- if (0 !== substr_compare($error['message'], $notFoundSuffix, -$notFoundSuffixLen)) {
- return;
- }
-
- foreach (array('class', 'interface', 'trait') as $typeName) {
- $prefix = ucfirst($typeName).' \'';
- $prefixLen = strlen($prefix);
- if (0 !== strpos($error['message'], $prefix)) {
- continue;
- }
-
- $fullyQualifiedClassName = substr($error['message'], $prefixLen, -$notFoundSuffixLen);
- if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedClassName, '\\')) {
- $className = substr($fullyQualifiedClassName, $namespaceSeparatorIndex + 1);
- $namespacePrefix = substr($fullyQualifiedClassName, 0, $namespaceSeparatorIndex);
- $message = sprintf('Attempted to load %s "%s" from namespace "%s".', $typeName, $className, $namespacePrefix);
- $tail = ' for another namespace?';
- } else {
- $className = $fullyQualifiedClassName;
- $message = sprintf('Attempted to load %s "%s" from the global namespace.', $typeName, $className);
- $tail = '?';
- }
-
- if ($candidates = $this->getClassCandidates($className)) {
- $tail = array_pop($candidates).'"?';
- if ($candidates) {
- $tail = ' for e.g. "'.implode('", "', $candidates).'" or "'.$tail;
- } else {
- $tail = ' for "'.$tail;
- }
- }
- $message .= "\nDid you forget a \"use\" statement".$tail;
-
- return new ClassNotFoundException($message, $exception);
- }
- }
-
- /**
- * Tries to guess the full namespace for a given class name.
- *
- * By default, it looks for PSR-0 and PSR-4 classes registered via a Symfony or a Composer
- * autoloader (that should cover all common cases).
- *
- * @param string $class A class name (without its namespace)
- *
- * @return array An array of possible fully qualified class names
- */
- private function getClassCandidates($class)
- {
- if (!is_array($functions = spl_autoload_functions())) {
- return array();
- }
-
- // find Symfony and Composer autoloaders
- $classes = array();
-
- foreach ($functions as $function) {
- if (!is_array($function)) {
- continue;
- }
- // get class loaders wrapped by DebugClassLoader
- if ($function[0] instanceof DebugClassLoader) {
- $function = $function[0]->getClassLoader();
-
- if (!is_array($function)) {
- continue;
- }
- }
-
- if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) {
- foreach ($function[0]->getPrefixes() as $prefix => $paths) {
- foreach ($paths as $path) {
- $classes = array_merge($classes, $this->findClassInPath($path, $class, $prefix));
- }
- }
- }
- if ($function[0] instanceof ComposerClassLoader) {
- foreach ($function[0]->getPrefixesPsr4() as $prefix => $paths) {
- foreach ($paths as $path) {
- $classes = array_merge($classes, $this->findClassInPath($path, $class, $prefix));
- }
- }
- }
- }
-
- return array_unique($classes);
- }
-
- /**
- * @param string $path
- * @param string $class
- * @param string $prefix
- *
- * @return array
- */
- private function findClassInPath($path, $class, $prefix)
- {
- if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) {
- return array();
- }
-
- $classes = array();
- $filename = $class.'.php';
- foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
- if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) {
- $classes[] = $class;
- }
- }
-
- return $classes;
- }
-
- /**
- * @param string $path
- * @param string $file
- * @param string $prefix
- *
- * @return string|null
- */
- private function convertFileToClass($path, $file, $prefix)
- {
- $candidates = array(
- // namespaced class
- $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file),
- // namespaced class (with target dir)
- $prefix.$namespacedClass,
- // namespaced class (with target dir and separator)
- $prefix.'\\'.$namespacedClass,
- // PEAR class
- str_replace('\\', '_', $namespacedClass),
- // PEAR class (with target dir)
- str_replace('\\', '_', $prefix.$namespacedClass),
- // PEAR class (with target dir and separator)
- str_replace('\\', '_', $prefix.'\\'.$namespacedClass),
- );
-
- if ($prefix) {
- $candidates = array_filter($candidates, function ($candidate) use ($prefix) {return 0 === strpos($candidate, $prefix);});
- }
-
- // We cannot use the autoloader here as most of them use require; but if the class
- // is not found, the new autoloader call will require the file again leading to a
- // "cannot redeclare class" error.
- foreach ($candidates as $candidate) {
- if ($this->classExists($candidate)) {
- return $candidate;
- }
- }
-
- require_once $file;
-
- foreach ($candidates as $candidate) {
- if ($this->classExists($candidate)) {
- return $candidate;
- }
- }
- }
-
- /**
- * @param string $class
- *
- * @return bool
- */
- private function classExists($class)
- {
- return class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false);
- }
-}
diff --git a/vendor/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php b/vendor/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php
deleted file mode 100644
index 6b87eb3..0000000
--- a/vendor/symfony/debug/FatalErrorHandler/FatalErrorHandlerInterface.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\FatalErrorHandler;
-
-use Symfony\Component\Debug\Exception\FatalErrorException;
-
-/**
- * Attempts to convert fatal errors to exceptions.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-interface FatalErrorHandlerInterface
-{
- /**
- * Attempts to convert an error into an exception.
- *
- * @param array $error An array as returned by error_get_last()
- * @param FatalErrorException $exception A FatalErrorException instance
- *
- * @return FatalErrorException|null A FatalErrorException instance if the class is able to convert the error, null otherwise
- */
- public function handleError(array $error, FatalErrorException $exception);
-}
diff --git a/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php
deleted file mode 100644
index c6f391a..0000000
--- a/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\FatalErrorHandler;
-
-use Symfony\Component\Debug\Exception\UndefinedFunctionException;
-use Symfony\Component\Debug\Exception\FatalErrorException;
-
-/**
- * ErrorHandler for undefined functions.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface
-{
- /**
- * {@inheritdoc}
- */
- public function handleError(array $error, FatalErrorException $exception)
- {
- $messageLen = strlen($error['message']);
- $notFoundSuffix = '()';
- $notFoundSuffixLen = strlen($notFoundSuffix);
- if ($notFoundSuffixLen > $messageLen) {
- return;
- }
-
- if (0 !== substr_compare($error['message'], $notFoundSuffix, -$notFoundSuffixLen)) {
- return;
- }
-
- $prefix = 'Call to undefined function ';
- $prefixLen = strlen($prefix);
- if (0 !== strpos($error['message'], $prefix)) {
- return;
- }
-
- $fullyQualifiedFunctionName = substr($error['message'], $prefixLen, -$notFoundSuffixLen);
- if (false !== $namespaceSeparatorIndex = strrpos($fullyQualifiedFunctionName, '\\')) {
- $functionName = substr($fullyQualifiedFunctionName, $namespaceSeparatorIndex + 1);
- $namespacePrefix = substr($fullyQualifiedFunctionName, 0, $namespaceSeparatorIndex);
- $message = sprintf('Attempted to call function "%s" from namespace "%s".', $functionName, $namespacePrefix);
- } else {
- $functionName = $fullyQualifiedFunctionName;
- $message = sprintf('Attempted to call function "%s" from the global namespace.', $functionName);
- }
-
- $candidates = array();
- foreach (get_defined_functions() as $type => $definedFunctionNames) {
- foreach ($definedFunctionNames as $definedFunctionName) {
- if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) {
- $definedFunctionNameBasename = substr($definedFunctionName, $namespaceSeparatorIndex + 1);
- } else {
- $definedFunctionNameBasename = $definedFunctionName;
- }
-
- if ($definedFunctionNameBasename === $functionName) {
- $candidates[] = '\\'.$definedFunctionName;
- }
- }
- }
-
- if ($candidates) {
- sort($candidates);
- $last = array_pop($candidates).'"?';
- if ($candidates) {
- $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last;
- } else {
- $candidates = '"'.$last;
- }
- $message .= "\nDid you mean to call ".$candidates;
- }
-
- return new UndefinedFunctionException($message, $exception);
- }
-}
diff --git a/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php
deleted file mode 100644
index f734d6b..0000000
--- a/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Debug\FatalErrorHandler;
-
-use Symfony\Component\Debug\Exception\FatalErrorException;
-use Symfony\Component\Debug\Exception\UndefinedMethodException;
-
-/**
- * ErrorHandler for undefined methods.
- *
- * @author Grégoire Pineau <lyrixx@lyrixx.info>
- */
-class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface
-{
- /**
- * {@inheritdoc}
- */
- public function handleError(array $error, FatalErrorException $exception)
- {
- preg_match('/^Call to undefined method (.*)::(.*)\(\)$/', $error['message'], $matches);
- if (!$matches) {
- return;
- }
-
- $className = $matches[1];
- $methodName = $matches[2];
-
- $message = sprintf('Attempted to call an undefined method named "%s" of class "%s".', $methodName, $className);
-
- $candidates = array();
- foreach (get_class_methods($className) as $definedMethodName) {
- $lev = levenshtein($methodName, $definedMethodName);
- if ($lev <= strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) {
- $candidates[] = $definedMethodName;
- }
- }
-
- if ($candidates) {
- sort($candidates);
- $last = array_pop($candidates).'"?';
- if ($candidates) {
- $candidates = 'e.g. "'.implode('", "', $candidates).'" or "'.$last;
- } else {
- $candidates = '"'.$last;
- }
- $message .= "\nDid you mean to call ".$candidates;
- }
-
- return new UndefinedMethodException($message, $exception);
- }
-}
diff --git a/vendor/symfony/debug/README.md b/vendor/symfony/debug/README.md
deleted file mode 100644
index a1d1617..0000000
--- a/vendor/symfony/debug/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Debug Component
-===============
-
-The Debug component provides tools to ease debugging PHP code.
-
-Resources
----------
-
- * [Documentation](https://symfony.com/doc/current/components/debug/index.html)
- * [Contributing](https://symfony.com/doc/current/contributing/index.html)
- * [Report issues](https://github.com/symfony/symfony/issues) and
- [send Pull Requests](https://github.com/symfony/symfony/pulls)
- in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/vendor/symfony/debug/Resources/ext/README.md b/vendor/symfony/debug/Resources/ext/README.md
deleted file mode 100644
index 25dccf0..0000000
--- a/vendor/symfony/debug/Resources/ext/README.md
+++ /dev/null
@@ -1,134 +0,0 @@
-Symfony Debug Extension for PHP 5
-=================================
-
-This extension publishes several functions to help building powerful debugging tools.
-It is compatible with PHP 5.3, 5.4, 5.5 and 5.6; with ZTS and non-ZTS modes.
-It is not required thus not provided for PHP 7.
-
-symfony_zval_info()
--------------------
-
-- exposes zval_hash/refcounts, allowing e.g. efficient exploration of arbitrary structures in PHP,
-- does work with references, preventing memory copying.
-
-Its behavior is about the same as:
-
-```php
-<?php
-
-function symfony_zval_info($key, $array, $options = 0)
-{
-
- // $options is currently not used, but could be in future version.
-
- if (!array_key_exists($key, $array)) {
- return null;
- }
-
- $info = array(
- 'type' => gettype($array[$key]),
- 'zval_hash' => /* hashed memory address of $array[$key] */,
- 'zval_refcount' => /* internal zval refcount of $array[$key] */,
- 'zval_isref' => /* is_ref status of $array[$key] */,
- );
-
- switch ($info['type']) {
- case 'object':
- $info += array(
- 'object_class' => get_class($array[$key]),
- 'object_refcount' => /* internal object refcount of $array[$key] */,
- 'object_hash' => spl_object_hash($array[$key]),
- 'object_handle' => /* internal object handle $array[$key] */,
- );
- break;
-
- case 'resource':
- $info += array(
- 'resource_handle' => (int) $array[$key],
- 'resource_type' => get_resource_type($array[$key]),
- 'resource_refcount' => /* internal resource refcount of $array[$key] */,
- );
- break;
-
- case 'array':
- $info += array(
- 'array_count' => count($array[$key]),
- );
- break;
-
- case 'string':
- $info += array(
- 'strlen' => strlen($array[$key]),
- );
- break;
- }
-
- return $info;
-}
-```
-
-symfony_debug_backtrace()
--------------------------
-
-This function works like debug_backtrace(), except that it can fetch the full backtrace in case of fatal errors:
-
-```php
-function foo() { fatal(); }
-function bar() { foo(); }
-
-function sd() { var_dump(symfony_debug_backtrace()); }
-
-register_shutdown_function('sd');
-
-bar();
-
-/* Will output
-Fatal error: Call to undefined function fatal() in foo.php on line 42
-array(3) {
- [0]=>
- array(2) {
- ["function"]=>
- string(2) "sd"
- ["args"]=>
- array(0) {
- }
- }
- [1]=>
- array(4) {
- ["file"]=>
- string(7) "foo.php"
- ["line"]=>
- int(1)
- ["function"]=>
- string(3) "foo"
- ["args"]=>
- array(0) {
- }
- }
- [2]=>
- array(4) {
- ["file"]=>
- string(102) "foo.php"
- ["line"]=>
- int(2)
- ["function"]=>
- string(3) "bar"
- ["args"]=>
- array(0) {
- }
- }
-}
-*/
-```
-
-Usage
------
-
-To enable the extension from source, run:
-
-```
- phpize
- ./configure
- make
- sudo make install
-```
diff --git a/vendor/symfony/debug/Resources/ext/config.m4 b/vendor/symfony/debug/Resources/ext/config.m4
deleted file mode 100644
index 3c56047..0000000
--- a/vendor/symfony/debug/Resources/ext/config.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-dnl $Id$
-dnl config.m4 for extension symfony_debug
-
-dnl Comments in this file start with the string 'dnl'.
-dnl Remove where necessary. This file will not work
-dnl without editing.
-
-dnl If your extension references something external, use with:
-
-dnl PHP_ARG_WITH(symfony_debug, for symfony_debug support,
-dnl Make sure that the comment is aligned:
-dnl [ --with-symfony_debug Include symfony_debug support])
-
-dnl Otherwise use enable:
-
-PHP_ARG_ENABLE(symfony_debug, whether to enable symfony_debug support,
-dnl Make sure that the comment is aligned:
-[ --enable-symfony_debug Enable symfony_debug support])
-
-if test "$PHP_SYMFONY_DEBUG" != "no"; then
- dnl Write more examples of tests here...
-
- dnl # --with-symfony_debug -> check with-path
- dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
- dnl SEARCH_FOR="/include/symfony_debug.h" # you most likely want to change this
- dnl if test -r $PHP_SYMFONY_DEBUG/$SEARCH_FOR; then # path given as parameter
- dnl SYMFONY_DEBUG_DIR=$PHP_SYMFONY_DEBUG
- dnl else # search default path list
- dnl AC_MSG_CHECKING([for symfony_debug files in default path])
- dnl for i in $SEARCH_PATH ; do
- dnl if test -r $i/$SEARCH_FOR; then
- dnl SYMFONY_DEBUG_DIR=$i
- dnl AC_MSG_RESULT(found in $i)
- dnl fi
- dnl done
- dnl fi
- dnl
- dnl if test -z "$SYMFONY_DEBUG_DIR"; then
- dnl AC_MSG_RESULT([not found])
- dnl AC_MSG_ERROR([Please reinstall the symfony_debug distribution])
- dnl fi
-
- dnl # --with-symfony_debug -> add include path
- dnl PHP_ADD_INCLUDE($SYMFONY_DEBUG_DIR/include)
-
- dnl # --with-symfony_debug -> check for lib and symbol presence
- dnl LIBNAME=symfony_debug # you may want to change this
- dnl LIBSYMBOL=symfony_debug # you most likely want to change this
-
- dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
- dnl [
- dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYMFONY_DEBUG_DIR/lib, SYMFONY_DEBUG_SHARED_LIBADD)
- dnl AC_DEFINE(HAVE_SYMFONY_DEBUGLIB,1,[ ])
- dnl ],[
- dnl AC_MSG_ERROR([wrong symfony_debug lib version or lib not found])
- dnl ],[
- dnl -L$SYMFONY_DEBUG_DIR/lib -lm
- dnl ])
- dnl
- dnl PHP_SUBST(SYMFONY_DEBUG_SHARED_LIBADD)
-
- PHP_NEW_EXTENSION(symfony_debug, symfony_debug.c, $ext_shared)
-fi
diff --git a/vendor/symfony/debug/Resources/ext/config.w32 b/vendor/symfony/debug/Resources/ext/config.w32
deleted file mode 100644
index 487e691..0000000
--- a/vendor/symfony/debug/Resources/ext/config.w32
+++ /dev/null
@@ -1,13 +0,0 @@
-// $Id$
-// vim:ft=javascript
-
-// If your extension references something external, use ARG_WITH
-// ARG_WITH("symfony_debug", "for symfony_debug support", "no");
-
-// Otherwise, use ARG_ENABLE
-// ARG_ENABLE("symfony_debug", "enable symfony_debug support", "no");
-
-if (PHP_SYMFONY_DEBUG != "no") {
- EXTENSION("symfony_debug", "symfony_debug.c");
-}
-
diff --git a/vendor/symfony/debug/Resources/ext/php_symfony_debug.h b/vendor/symfony/debug/Resources/ext/php_symfony_debug.h
deleted file mode 100644
index 26d0e8c..0000000
--- a/vendor/symfony/debug/Resources/ext/php_symfony_debug.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-#ifndef PHP_SYMFONY_DEBUG_H
-#define PHP_SYMFONY_DEBUG_H
-
-extern zend_module_entry symfony_debug_module_entry;
-#define phpext_symfony_debug_ptr &symfony_debug_module_entry
-
-#define PHP_SYMFONY_DEBUG_VERSION "2.7"
-
-#ifdef PHP_WIN32
-# define PHP_SYMFONY_DEBUG_API __declspec(dllexport)
-#elif defined(__GNUC__) && __GNUC__ >= 4
-# define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default")))
-#else
-# define PHP_SYMFONY_DEBUG_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-ZEND_BEGIN_MODULE_GLOBALS(symfony_debug)
- intptr_t req_rand_init;
- void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
- zval *debug_bt;
-ZEND_END_MODULE_GLOBALS(symfony_debug)
-
-PHP_MINIT_FUNCTION(symfony_debug);
-PHP_MSHUTDOWN_FUNCTION(symfony_debug);
-PHP_RINIT_FUNCTION(symfony_debug);
-PHP_RSHUTDOWN_FUNCTION(symfony_debug);
-PHP_MINFO_FUNCTION(symfony_debug);
-PHP_GINIT_FUNCTION(symfony_debug);
-PHP_GSHUTDOWN_FUNCTION(symfony_debug);
-
-PHP_FUNCTION(symfony_zval_info);
-PHP_FUNCTION(symfony_debug_backtrace);
-
-static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC);
-static const char *_symfony_debug_zval_type(zval *);
-static const char* _symfony_debug_get_resource_type(long TSRMLS_DC);
-static int _symfony_debug_get_resource_refcount(long TSRMLS_DC);
-
-void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
-
-#ifdef ZTS
-#define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v)
-#else
-#define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v)
-#endif
-
-#endif /* PHP_SYMFONY_DEBUG_H */
diff --git a/vendor/symfony/debug/Resources/ext/symfony_debug.c b/vendor/symfony/debug/Resources/ext/symfony_debug.c
deleted file mode 100644
index 0d7cb60..0000000
--- a/vendor/symfony/debug/Resources/ext/symfony_debug.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "php_symfony_debug.h"
-#include "ext/standard/php_rand.h"
-#include "ext/standard/php_lcg.h"
-#include "ext/spl/php_spl.h"
-#include "Zend/zend_gc.h"
-#include "Zend/zend_builtin_functions.h"
-#include "Zend/zend_extensions.h" /* for ZEND_EXTENSION_API_NO */
-#include "ext/standard/php_array.h"
-#include "Zend/zend_interfaces.h"
-#include "SAPI.h"
-
-#define IS_PHP_53 ZEND_EXTENSION_API_NO == 220090626
-
-ZEND_DECLARE_MODULE_GLOBALS(symfony_debug)
-
-ZEND_BEGIN_ARG_INFO_EX(symfony_zval_arginfo, 0, 0, 2)
- ZEND_ARG_INFO(0, key)
- ZEND_ARG_ARRAY_INFO(0, array, 0)
- ZEND_ARG_INFO(0, options)
-ZEND_END_ARG_INFO()
-
-const zend_function_entry symfony_debug_functions[] = {
- PHP_FE(symfony_zval_info, symfony_zval_arginfo)
- PHP_FE(symfony_debug_backtrace, NULL)
- PHP_FE_END
-};
-
-PHP_FUNCTION(symfony_debug_backtrace)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-#if IS_PHP_53
- zend_fetch_debug_backtrace(return_value, 1, 0 TSRMLS_CC);
-#else
- zend_fetch_debug_backtrace(return_value, 1, 0, 0 TSRMLS_CC);
-#endif
-
- if (!SYMFONY_DEBUG_G(debug_bt)) {
- return;
- }
-
- php_array_merge(Z_ARRVAL_P(return_value), Z_ARRVAL_P(SYMFONY_DEBUG_G(debug_bt)), 0 TSRMLS_CC);
-}
-
-PHP_FUNCTION(symfony_zval_info)
-{
- zval *key = NULL, *arg = NULL;
- zval **data = NULL;
- HashTable *array = NULL;
- long options = 0;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zh|l", &key, &array, &options) == FAILURE) {
- return;
- }
-
- switch (Z_TYPE_P(key)) {
- case IS_STRING:
- if (zend_symtable_find(array, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&data) == FAILURE) {
- return;
- }
- break;
- case IS_LONG:
- if (zend_hash_index_find(array, Z_LVAL_P(key), (void **)&data)) {
- return;
- }
- break;
- }
-
- arg = *data;
-
- array_init(return_value);
-
- add_assoc_string(return_value, "type", (char *)_symfony_debug_zval_type(arg), 1);
- add_assoc_stringl(return_value, "zval_hash", _symfony_debug_memory_address_hash((void *)arg TSRMLS_CC), 16, 0);
- add_assoc_long(return_value, "zval_refcount", Z_REFCOUNT_P(arg));
- add_assoc_bool(return_value, "zval_isref", (zend_bool)Z_ISREF_P(arg));
-
- if (Z_TYPE_P(arg) == IS_OBJECT) {
- char hash[33] = {0};
-
- php_spl_object_hash(arg, (char *)hash TSRMLS_CC);
- add_assoc_stringl(return_value, "object_class", (char *)Z_OBJCE_P(arg)->name, Z_OBJCE_P(arg)->name_length, 1);
- add_assoc_long(return_value, "object_refcount", EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(arg)].bucket.obj.refcount);
- add_assoc_string(return_value, "object_hash", hash, 1);
- add_assoc_long(return_value, "object_handle", Z_OBJ_HANDLE_P(arg));
- } else if (Z_TYPE_P(arg) == IS_ARRAY) {
- add_assoc_long(return_value, "array_count", zend_hash_num_elements(Z_ARRVAL_P(arg)));
- } else if(Z_TYPE_P(arg) == IS_RESOURCE) {
- add_assoc_long(return_value, "resource_handle", Z_LVAL_P(arg));
- add_assoc_string(return_value, "resource_type", (char *)_symfony_debug_get_resource_type(Z_LVAL_P(arg) TSRMLS_CC), 1);
- add_assoc_long(return_value, "resource_refcount", _symfony_debug_get_resource_refcount(Z_LVAL_P(arg) TSRMLS_CC));
- } else if (Z_TYPE_P(arg) == IS_STRING) {
- add_assoc_long(return_value, "strlen", Z_STRLEN_P(arg));
- }
-}
-
-void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
-{
- TSRMLS_FETCH();
- zval *retval;
-
- switch (type) {
- case E_ERROR:
- case E_PARSE:
- case E_CORE_ERROR:
- case E_CORE_WARNING:
- case E_COMPILE_ERROR:
- case E_COMPILE_WARNING:
- ALLOC_INIT_ZVAL(retval);
-#if IS_PHP_53
- zend_fetch_debug_backtrace(retval, 1, 0 TSRMLS_CC);
-#else
- zend_fetch_debug_backtrace(retval, 1, 0, 0 TSRMLS_CC);
-#endif
- SYMFONY_DEBUG_G(debug_bt) = retval;
- }
-
- SYMFONY_DEBUG_G(old_error_cb)(type, error_filename, error_lineno, format, args);
-}
-
-static const char* _symfony_debug_get_resource_type(long rsid TSRMLS_DC)
-{
- const char *res_type;
- res_type = zend_rsrc_list_get_rsrc_type(rsid TSRMLS_CC);
-
- if (!res_type) {
- return "Unknown";
- }
-
- return res_type;
-}
-
-static int _symfony_debug_get_resource_refcount(long rsid TSRMLS_DC)
-{
- zend_rsrc_list_entry *le;
-
- if (zend_hash_index_find(&EG(regular_list), rsid, (void **) &le)==SUCCESS) {
- return le->refcount;
- }
-
- return 0;
-}
-
-static char *_symfony_debug_memory_address_hash(void *address TSRMLS_DC)
-{
- char *result = NULL;
- intptr_t address_rand;
-
- if (!SYMFONY_DEBUG_G(req_rand_init)) {
- if (!BG(mt_rand_is_seeded)) {
- php_mt_srand(GENERATE_SEED() TSRMLS_CC);
- }
- SYMFONY_DEBUG_G(req_rand_init) = (intptr_t)php_mt_rand(TSRMLS_C);
- }
-
- address_rand = (intptr_t)address ^ SYMFONY_DEBUG_G(req_rand_init);
-
- spprintf(&result, 17, "%016zx", address_rand);
-
- return result;
-}
-
-static const char *_symfony_debug_zval_type(zval *zv)
-{
- switch (Z_TYPE_P(zv)) {
- case IS_NULL:
- return "NULL";
- break;
-
- case IS_BOOL:
- return "boolean";
- break;
-
- case IS_LONG:
- return "integer";
- break;
-
- case IS_DOUBLE:
- return "double";
- break;
-
- case IS_STRING:
- return "string";
- break;
-
- case IS_ARRAY:
- return "array";
- break;
-
- case IS_OBJECT:
- return "object";
-
- case IS_RESOURCE:
- return "resource";
-
- default:
- return "unknown type";
- }
-}
-
-zend_module_entry symfony_debug_module_entry = {
- STANDARD_MODULE_HEADER,
- "symfony_debug",
- symfony_debug_functions,
- PHP_MINIT(symfony_debug),
- PHP_MSHUTDOWN(symfony_debug),
- PHP_RINIT(symfony_debug),
- PHP_RSHUTDOWN(symfony_debug),
- PHP_MINFO(symfony_debug),
- PHP_SYMFONY_DEBUG_VERSION,
- PHP_MODULE_GLOBALS(symfony_debug),
- PHP_GINIT(symfony_debug),
- PHP_GSHUTDOWN(symfony_debug),
- NULL,
- STANDARD_MODULE_PROPERTIES_EX
-};
-
-#ifdef COMPILE_DL_SYMFONY_DEBUG
-ZEND_GET_MODULE(symfony_debug)
-#endif
-
-PHP_GINIT_FUNCTION(symfony_debug)
-{
- memset(symfony_debug_globals, 0 , sizeof(*symfony_debug_globals));
-}
-
-PHP_GSHUTDOWN_FUNCTION(symfony_debug)
-{
-
-}
-
-PHP_MINIT_FUNCTION(symfony_debug)
-{
- SYMFONY_DEBUG_G(old_error_cb) = zend_error_cb;
- zend_error_cb = symfony_debug_error_cb;
-
- return SUCCESS;
-}
-
-PHP_MSHUTDOWN_FUNCTION(symfony_debug)
-{
- zend_error_cb = SYMFONY_DEBUG_G(old_error_cb);
-
- return SUCCESS;
-}
-
-PHP_RINIT_FUNCTION(symfony_debug)
-{
- return SUCCESS;
-}
-
-PHP_RSHUTDOWN_FUNCTION(symfony_debug)
-{
- return SUCCESS;
-}
-
-PHP_MINFO_FUNCTION(symfony_debug)
-{
- php_info_print_table_start();
- php_info_print_table_header(2, "Symfony Debug support", "enabled");
- php_info_print_table_header(2, "Symfony Debug version", PHP_SYMFONY_DEBUG_VERSION);
- php_info_print_table_end();
-}
diff --git a/vendor/symfony/debug/Resources/ext/tests/001.phpt b/vendor/symfony/debug/Resources/ext/tests/001.phpt
deleted file mode 100644
index 4d41417..0000000
--- a/vendor/symfony/debug/Resources/ext/tests/001.phpt
+++ /dev/null
@@ -1,151 +0,0 @@
---TEST--
-Test symfony_zval_info API
---SKIPIF--
-<?php if (!extension_loaded("symfony_debug")) print "skip"; ?>
---FILE--
-<?php
-
-$int = 42;
-$float = 42.42;
-$str = "foobar";
-$object = new StdClass;
-$array = array('foo', 'bar');
-$resource = tmpfile();
-$null = null;
-$bool = true;
-
-$anotherint = 42;
-$refcount2 = &$anotherint;
-
-$var = array('int' => $int,
- 'float' => $float,
- 'str' => $str,
- 'object' => $object,
- 'array' => $array,
- 'resource' => $resource,
- 'null' => $null,
- 'bool' => $bool,
- 'refcount' => &$refcount2);
-
-var_dump(symfony_zval_info('int', $var));
-var_dump(symfony_zval_info('float', $var));
-var_dump(symfony_zval_info('str', $var));
-var_dump(symfony_zval_info('object', $var));
-var_dump(symfony_zval_info('array', $var));
-var_dump(symfony_zval_info('resource', $var));
-var_dump(symfony_zval_info('null', $var));
-var_dump(symfony_zval_info('bool', $var));
-
-var_dump(symfony_zval_info('refcount', $var));
-var_dump(symfony_zval_info('not-exist', $var));
-?>
---EXPECTF--
-array(4) {
- ["type"]=>
- string(7) "integer"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
-}
-array(4) {
- ["type"]=>
- string(6) "double"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
-}
-array(5) {
- ["type"]=>
- string(6) "string"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
- ["strlen"]=>
- int(6)
-}
-array(8) {
- ["type"]=>
- string(6) "object"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
- ["object_class"]=>
- string(8) "stdClass"
- ["object_refcount"]=>
- int(1)
- ["object_hash"]=>
- string(32) "%s"
- ["object_handle"]=>
- int(%d)
-}
-array(5) {
- ["type"]=>
- string(5) "array"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
- ["array_count"]=>
- int(2)
-}
-array(7) {
- ["type"]=>
- string(8) "resource"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
- ["resource_handle"]=>
- int(%d)
- ["resource_type"]=>
- string(6) "stream"
- ["resource_refcount"]=>
- int(1)
-}
-array(4) {
- ["type"]=>
- string(4) "NULL"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
-}
-array(4) {
- ["type"]=>
- string(7) "boolean"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(2)
- ["zval_isref"]=>
- bool(false)
-}
-array(4) {
- ["type"]=>
- string(7) "integer"
- ["zval_hash"]=>
- string(16) "%s"
- ["zval_refcount"]=>
- int(3)
- ["zval_isref"]=>
- bool(true)
-}
-NULL
diff --git a/vendor/symfony/debug/Resources/ext/tests/002.phpt b/vendor/symfony/debug/Resources/ext/tests/002.phpt
deleted file mode 100644
index ebe2f32..0000000
--- a/vendor/symfony/debug/Resources/ext/tests/002.phpt
+++ /dev/null
@@ -1,64 +0,0 @@
---TEST--
-Test symfony_debug_backtrace in case of fatal error
---SKIPIF--
-<?php if (!extension_loaded("symfony_debug")) print "skip"; ?>
---FILE--
-<?php
-
-function bar()
-{
- foo();
-}
-
-function foo()
-{
- notexist();
-}
-
-function bt()
-{
- print_r(symfony_debug_backtrace());
-
-}
-
-register_shutdown_function('bt');
-
-bar();
-
-?>
---EXPECTF--
-Fatal error: Call to undefined function notexist() in %s on line %d
-Array
-(
- [0] => Array
- (
- [function] => bt
- [args] => Array
- (
- )
-
- )
-
- [1] => Array
- (
- [file] => %s
- [line] => %d
- [function] => foo
- [args] => Array
- (
- )
-
- )
-
- [2] => Array
- (
- [file] => %s
- [line] => %d
- [function] => bar
- [args] => Array
- (
- )
-
- )
-
-)
diff --git a/vendor/symfony/debug/Resources/ext/tests/002_1.phpt b/vendor/symfony/debug/Resources/ext/tests/002_1.phpt
deleted file mode 100644
index 4d52dbf..0000000
--- a/vendor/symfony/debug/Resources/ext/tests/002_1.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-Test symfony_debug_backtrace in case of non fatal error
---SKIPIF--
-<?php if (!extension_loaded("symfony_debug")) print "skip"; ?>
---FILE--
-<?php
-
-function bar()
-{
- bt();
-}
-
-function bt()
-{
- print_r(symfony_debug_backtrace());
-
-}
-
-bar();
-
-?>
---EXPECTF--
-Array
-(
- [0] => Array
- (
- [file] => %s
- [line] => %d
- [function] => bt
- [args] => Array
- (
- )
-
- )
-
- [1] => Array
- (
- [file] => %s
- [line] => %d
- [function] => bar
- [args] => Array
- (
- )
-
- )
-
-)
diff --git a/vendor/symfony/debug/Resources/ext/tests/003.phpt b/vendor/symfony/debug/Resources/ext/tests/003.phpt
deleted file mode 100644
index a363333..0000000
--- a/vendor/symfony/debug/Resources/ext/tests/003.phpt
+++ /dev/null
@@ -1,85 +0,0 @@
---TEST--
-Test ErrorHandler in case of fatal error
---SKIPIF--
-<?php if (!extension_loaded("symfony_debug")) print "skip"; ?>
---FILE--
-<?php
-
-namespace Psr\Log;
-
-class LogLevel
-{
- const EMERGENCY = 'emergency';
- const ALERT = 'alert';
- const CRITICAL = 'critical';
- const ERROR = 'error';
- const WARNING = 'warning';
- const NOTICE = 'notice';
- const INFO = 'info';
- const DEBUG = 'debug';
-}
-
-namespace Symfony\Component\Debug;
-
-$dir = __DIR__.'/../../../';
-require $dir.'ErrorHandler.php';
-require $dir.'Exception/FatalErrorException.php';
-require $dir.'Exception/UndefinedFunctionException.php';
-require $dir.'FatalErrorHandler/FatalErrorHandlerInterface.php';
-require $dir.'FatalErrorHandler/ClassNotFoundFatalErrorHandler.php';
-require $dir.'FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php';
-require $dir.'FatalErrorHandler/UndefinedMethodFatalErrorHandler.php';
-
-function bar()
-{
- foo();
-}
-
-function foo()
-{
- notexist();
-}
-
-$handler = ErrorHandler::register();
-$handler->setExceptionHandler('print_r');
-
-if (function_exists('xdebug_disable')) {
- xdebug_disable();
-}
-
-bar();
-?>
---EXPECTF--
-Fatal error: Call to undefined function Symfony\Component\Debug\notexist() in %s on line %d
-Symfony\Component\Debug\Exception\UndefinedFunctionException Object
-(
- [message:protected] => Attempted to call function "notexist" from namespace "Symfony\Component\Debug".
- [string:Exception:private] =>
- [code:protected] => 0
- [file:protected] => %s
- [line:protected] => %d
- [trace:Exception:private] => Array
- (
- [0] => Array
- (
-%A [function] => Symfony\Component\Debug\foo
-%A [args] => Array
- (
- )
-
- )
-
- [1] => Array
- (
-%A [function] => Symfony\Component\Debug\bar
-%A [args] => Array
- (
- )
-
- )
-%A
- )
-
- [previous:Exception:private] =>
- [severity:protected] => 1
-)
diff --git a/vendor/symfony/debug/composer.json b/vendor/symfony/debug/composer.json
deleted file mode 100644
index 1f3de3e..0000000
--- a/vendor/symfony/debug/composer.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "symfony/debug",
- "type": "library",
- "description": "Symfony Debug Component",
- "keywords": [],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "require": {
- "php": ">=5.5.9",
- "psr/log": "~1.0"
- },
- "conflict": {
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
- },
- "require-dev": {
- "symfony/class-loader": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0"
- },
- "autoload": {
- "psr-4": { "Symfony\\Component\\Debug\\": "" },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "minimum-stability": "dev",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1-dev"
- }
- }
-}
diff --git a/vendor/symfony/debug/phpunit.xml.dist b/vendor/symfony/debug/phpunit.xml.dist
deleted file mode 100644
index e99c4dd..0000000
--- a/vendor/symfony/debug/phpunit.xml.dist
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
- backupGlobals="false"
- colors="true"
- bootstrap="vendor/autoload.php"
->
- <php>
- <ini name="error_reporting" value="-1" />
- </php>
-
- <testsuites>
- <testsuite name="Symfony Debug Component Test Suite">
- <directory>./Tests/</directory>
- </testsuite>
- <testsuite name="Symfony Debug Extension Test Suite">
- <directory suffix=".phpt">./Resources/ext/tests/</directory>
- </testsuite>
- </testsuites>
-
- <filter>
- <whitelist>
- <directory>./</directory>
- <exclude>
- <directory>./Tests</directory>
- <directory>./vendor</directory>
- </exclude>
- </whitelist>
- </filter>
-</phpunit>
diff --git a/vendor/symfony/console/.gitignore b/vendor/symfony/deprecation-contracts/.gitignore
index c49a5d8..c49a5d8 100644
--- a/vendor/symfony/console/.gitignore
+++ b/vendor/symfony/deprecation-contracts/.gitignore
diff --git a/vendor/symfony/deprecation-contracts/CHANGELOG.md b/vendor/symfony/deprecation-contracts/CHANGELOG.md
new file mode 100644
index 0000000..7932e26
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/CHANGELOG.md
@@ -0,0 +1,5 @@
+CHANGELOG
+=========
+
+The changelog is maintained for all Symfony contracts at the following URL:
+https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/vendor/symfony/debug/LICENSE b/vendor/symfony/deprecation-contracts/LICENSE
index 12a7453..406242f 100644
--- a/vendor/symfony/debug/LICENSE
+++ b/vendor/symfony/deprecation-contracts/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2016 Fabien Potencier
+Copyright (c) 2020-2022 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md
new file mode 100644
index 0000000..4957933
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/README.md
@@ -0,0 +1,26 @@
+Symfony Deprecation Contracts
+=============================
+
+A generic function and convention to trigger deprecation notices.
+
+This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
+
+By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
+the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
+
+The function requires at least 3 arguments:
+ - the name of the Composer package that is triggering the deprecation
+ - the version of the package that introduced the deprecation
+ - the message of the deprecation
+ - more arguments can be provided: they will be inserted in the message using `printf()` formatting
+
+Example:
+```php
+trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
+```
+
+This will generate the following message:
+`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
+
+While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
+`function trigger_deprecation() {}` in your application.
diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json
new file mode 100644
index 0000000..cc7cc12
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "symfony/deprecation-contracts",
+ "type": "library",
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ }
+}
diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php
new file mode 100644
index 0000000..d437150
--- /dev/null
+++ b/vendor/symfony/deprecation-contracts/function.php
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (!function_exists('trigger_deprecation')) {
+ /**
+ * Triggers a silenced deprecation notice.
+ *
+ * @param string $package The name of the Composer package that is triggering the deprecation
+ * @param string $version The version of the package that introduced the deprecation
+ * @param string $message The message of the deprecation
+ * @param mixed ...$args Values to insert in the message using printf() formatting
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+ function trigger_deprecation(string $package, string $version, string $message, ...$args): void
+ {
+ @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
+ }
+}
diff --git a/vendor/symfony/debug/.gitignore b/vendor/symfony/event-dispatcher-contracts/.gitignore
index c49a5d8..c49a5d8 100644
--- a/vendor/symfony/debug/.gitignore
+++ b/vendor/symfony/event-dispatcher-contracts/.gitignore
diff --git a/vendor/symfony/event-dispatcher-contracts/Event.php b/vendor/symfony/event-dispatcher-contracts/Event.php
new file mode 100644
index 0000000..84f60f3
--- /dev/null
+++ b/vendor/symfony/event-dispatcher-contracts/Event.php
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\EventDispatcher;
+
+use Psr\EventDispatcher\StoppableEventInterface;
+
+if (interface_exists(StoppableEventInterface::class)) {
+ /**
+ * Event is the base class for classes containing event data.
+ *
+ * This class contains no event data. It is used by events that do not pass
+ * state information to an event handler when an event is raised.
+ *
+ * You can call the method stopPropagation() to abort the execution of
+ * further listeners in your event listener.
+ *
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+ class Event implements StoppableEventInterface
+ {
+ private $propagationStopped = false;
+
+ /**
+ * Returns whether further event listeners should be triggered.
+ */
+ public function isPropagationStopped(): bool
+ {
+ return $this->propagationStopped;
+ }
+
+ /**
+ * Stops the propagation of the event to further event listeners.
+ *
+ * If multiple event listeners are connected to the same event, no
+ * further event listener will be triggered once any trigger calls
+ * stopPropagation().
+ */
+ public function stopPropagation(): void
+ {
+ $this->propagationStopped = true;
+ }
+ }
+} else {
+ /**
+ * Event is the base class for classes containing event data.
+ *
+ * This class contains no event data. It is used by events that do not pass
+ * state information to an event handler when an event is raised.
+ *
+ * You can call the method stopPropagation() to abort the execution of
+ * further listeners in your event listener.
+ *
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+ class Event
+ {
+ private $propagationStopped = false;
+
+ /**
+ * Returns whether further event listeners should be triggered.
+ */
+ public function isPropagationStopped(): bool
+ {
+ return $this->propagationStopped;
+ }
+
+ /**
+ * Stops the propagation of the event to further event listeners.
+ *
+ * If multiple event listeners are connected to the same event, no
+ * further event listener will be triggered once any trigger calls
+ * stopPropagation().
+ */
+ public function stopPropagation(): void
+ {
+ $this->propagationStopped = true;
+ }
+ }
+}
diff --git a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php
new file mode 100644
index 0000000..2d470af
--- /dev/null
+++ b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php
@@ -0,0 +1,58 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\EventDispatcher;
+
+use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface;
+
+if (interface_exists(PsrEventDispatcherInterface::class)) {
+ /**
+ * Allows providing hooks on domain-specific lifecycles by dispatching events.
+ */
+ interface EventDispatcherInterface extends PsrEventDispatcherInterface
+ {
+ /**
+ * Dispatches an event to all registered listeners.
+ *
+ * For BC with Symfony 4, the $eventName argument is not declared explicitly on the
+ * signature of the method. Implementations that are not bound by this BC constraint
+ * MUST declare it explicitly, as allowed by PHP.
+ *
+ * @param object $event The event to pass to the event handlers/listeners
+ * @param string|null $eventName The name of the event to dispatch. If not supplied,
+ * the class of $event should be used instead.
+ *
+ * @return object The passed $event MUST be returned
+ */
+ public function dispatch($event/*, string $eventName = null*/);
+ }
+} else {
+ /**
+ * Allows providing hooks on domain-specific lifecycles by dispatching events.
+ */
+ interface EventDispatcherInterface
+ {
+ /**
+ * Dispatches an event to all registered listeners.
+ *
+ * For BC with Symfony 4, the $eventName argument is not declared explicitly on the
+ * signature of the method. Implementations that are not bound by this BC constraint
+ * MUST declare it explicitly, as allowed by PHP.
+ *
+ * @param object $event The event to pass to the event handlers/listeners
+ * @param string|null $eventName The name of the event to dispatch. If not supplied,
+ * the class of $event should be used instead.
+ *
+ * @return object The passed $event MUST be returned
+ */
+ public function dispatch($event/*, string $eventName = null*/);
+ }
+}
diff --git a/vendor/symfony/event-dispatcher-contracts/LICENSE b/vendor/symfony/event-dispatcher-contracts/LICENSE
new file mode 100644
index 0000000..74cdc2d
--- /dev/null
+++ b/vendor/symfony/event-dispatcher-contracts/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2018-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/event-dispatcher-contracts/README.md b/vendor/symfony/event-dispatcher-contracts/README.md
new file mode 100644
index 0000000..b1ab4c0
--- /dev/null
+++ b/vendor/symfony/event-dispatcher-contracts/README.md
@@ -0,0 +1,9 @@
+Symfony EventDispatcher Contracts
+=================================
+
+A set of abstractions extracted out of the Symfony components.
+
+Can be used to build on semantics that the Symfony components proved useful - and
+that already have battle tested implementations.
+
+See https://github.com/symfony/contracts/blob/main/README.md for more information.
diff --git a/vendor/symfony/event-dispatcher-contracts/composer.json b/vendor/symfony/event-dispatcher-contracts/composer.json
new file mode 100644
index 0000000..9d4bd7b
--- /dev/null
+++ b/vendor/symfony/event-dispatcher-contracts/composer.json
@@ -0,0 +1,38 @@
+{
+ "name": "symfony/event-dispatcher-contracts",
+ "type": "library",
+ "description": "Generic abstractions related to dispatching event",
+ "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1.3"
+ },
+ "suggest": {
+ "psr/event-dispatcher": "",
+ "symfony/event-dispatcher-implementation": ""
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" }
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.1-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/CHANGELOG.md b/vendor/symfony/event-dispatcher/CHANGELOG.md
new file mode 100644
index 0000000..4a3ea06
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/CHANGELOG.md
@@ -0,0 +1,67 @@
+CHANGELOG
+=========
+
+4.4.0
+-----
+
+ * `AddEventAliasesPass` has been added, allowing applications and bundles to extend the event alias mapping used by `RegisterListenersPass`.
+ * Made the `event` attribute of the `kernel.event_listener` tag optional for FQCN events.
+
+4.3.0
+-----
+
+ * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated
+ * deprecated the `Event` class, use `Symfony\Contracts\EventDispatcher\Event` instead
+
+4.1.0
+-----
+
+ * added support for invokable event listeners tagged with `kernel.event_listener` by default
+ * The `TraceableEventDispatcher::getOrphanedEvents()` method has been added.
+ * The `TraceableEventDispatcherInterface` has been deprecated.
+
+4.0.0
+-----
+
+ * removed the `ContainerAwareEventDispatcher` class
+ * added the `reset()` method to the `TraceableEventDispatcherInterface`
+
+3.4.0
+-----
+
+ * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated.
+
+3.3.0
+-----
+
+ * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead.
+
+3.0.0
+-----
+
+ * The method `getListenerPriority($eventName, $listener)` has been added to the
+ `EventDispatcherInterface`.
+ * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
+ and `Event::getName()` have been removed.
+ The event dispatcher and the event name are passed to the listener call.
+
+2.5.0
+-----
+
+ * added Debug\TraceableEventDispatcher (originally in HttpKernel)
+ * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface
+ * added RegisterListenersPass (originally in HttpKernel)
+
+2.1.0
+-----
+
+ * added TraceableEventDispatcherInterface
+ * added ContainerAwareEventDispatcher
+ * added a reference to the EventDispatcher on the Event
+ * added a reference to the Event name on the event
+ * added fluid interface to the dispatch() method which now returns the Event
+ object
+ * added GenericEvent event class
+ * added the possibility for subscribers to subscribe several times for the
+ same event
+ * added ImmutableEventDispatcher
diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
new file mode 100644
index 0000000..56116cf
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
@@ -0,0 +1,407 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher\Debug;
+
+use Psr\EventDispatcher\StoppableEventInterface;
+use Psr\Log\LoggerInterface;
+use Symfony\Component\EventDispatcher\Event;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
+use Symfony\Component\EventDispatcher\LegacyEventProxy;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\RequestStack;
+use Symfony\Component\Stopwatch\Stopwatch;
+use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
+
+/**
+ * Collects some data about event listeners.
+ *
+ * This event dispatcher delegates the dispatching to another one.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class TraceableEventDispatcher implements TraceableEventDispatcherInterface
+{
+ protected $logger;
+ protected $stopwatch;
+
+ private $callStack;
+ private $dispatcher;
+ private $wrappedListeners;
+ private $orphanedEvents;
+ private $requestStack;
+ private $currentRequestHash = '';
+
+ public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null)
+ {
+ $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
+ $this->stopwatch = $stopwatch;
+ $this->logger = $logger;
+ $this->wrappedListeners = [];
+ $this->orphanedEvents = [];
+ $this->requestStack = $requestStack;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addListener($eventName, $listener, $priority = 0)
+ {
+ $this->dispatcher->addListener($eventName, $listener, $priority);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addSubscriber(EventSubscriberInterface $subscriber)
+ {
+ $this->dispatcher->addSubscriber($subscriber);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeListener($eventName, $listener)
+ {
+ if (isset($this->wrappedListeners[$eventName])) {
+ foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) {
+ if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) {
+ $listener = $wrappedListener;
+ unset($this->wrappedListeners[$eventName][$index]);
+ break;
+ }
+ }
+ }
+
+ return $this->dispatcher->removeListener($eventName, $listener);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeSubscriber(EventSubscriberInterface $subscriber)
+ {
+ return $this->dispatcher->removeSubscriber($subscriber);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListeners($eventName = null)
+ {
+ return $this->dispatcher->getListeners($eventName);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListenerPriority($eventName, $listener)
+ {
+ // we might have wrapped listeners for the event (if called while dispatching)
+ // in that case get the priority by wrapper
+ if (isset($this->wrappedListeners[$eventName])) {
+ foreach ($this->wrappedListeners[$eventName] as $wrappedListener) {
+ if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) {
+ return $this->dispatcher->getListenerPriority($eventName, $wrappedListener);
+ }
+ }
+ }
+
+ return $this->dispatcher->getListenerPriority($eventName, $listener);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasListeners($eventName = null)
+ {
+ return $this->dispatcher->hasListeners($eventName);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @param string|null $eventName
+ */
+ public function dispatch($event/*, string $eventName = null*/)
+ {
+ if (null === $this->callStack) {
+ $this->callStack = new \SplObjectStorage();
+ }
+
+ $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
+ $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
+
+ if (\is_object($event)) {
+ $eventName = $eventName ?? \get_class($event);
+ } else {
+ @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED);
+ $swap = $event;
+ $event = $eventName ?? new Event();
+ $eventName = $swap;
+
+ if (!$event instanceof Event) {
+ throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of "%s", "%s" given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event)));
+ }
+ }
+
+ if (null !== $this->logger && ($event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface) && $event->isPropagationStopped()) {
+ $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName));
+ }
+
+ $this->preProcess($eventName);
+ try {
+ $this->beforeDispatch($eventName, $event);
+ try {
+ $e = $this->stopwatch->start($eventName, 'section');
+ try {
+ $this->dispatcher->dispatch($event, $eventName);
+ } finally {
+ if ($e->isStarted()) {
+ $e->stop();
+ }
+ }
+ } finally {
+ $this->afterDispatch($eventName, $event);
+ }
+ } finally {
+ $this->currentRequestHash = $currentRequestHash;
+ $this->postProcess($eventName);
+ }
+
+ return $event;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @param Request|null $request The request to get listeners for
+ */
+ public function getCalledListeners(/* Request $request = null */)
+ {
+ if (null === $this->callStack) {
+ return [];
+ }
+
+ $hash = 1 <= \func_num_args() && null !== ($request = func_get_arg(0)) ? spl_object_hash($request) : null;
+ $called = [];
+ foreach ($this->callStack as $listener) {
+ [$eventName, $requestHash] = $this->callStack->getInfo();
+ if (null === $hash || $hash === $requestHash) {
+ $called[] = $listener->getInfo($eventName);
+ }
+ }
+
+ return $called;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @param Request|null $request The request to get listeners for
+ */
+ public function getNotCalledListeners(/* Request $request = null */)
+ {
+ try {
+ $allListeners = $this->getListeners();
+ } catch (\Exception $e) {
+ if (null !== $this->logger) {
+ $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]);
+ }
+
+ // unable to retrieve the uncalled listeners
+ return [];
+ }
+
+ $hash = 1 <= \func_num_args() && null !== ($request = func_get_arg(0)) ? spl_object_hash($request) : null;
+ $calledListeners = [];
+
+ if (null !== $this->callStack) {
+ foreach ($this->callStack as $calledListener) {
+ [, $requestHash] = $this->callStack->getInfo();
+
+ if (null === $hash || $hash === $requestHash) {
+ $calledListeners[] = $calledListener->getWrappedListener();
+ }
+ }
+ }
+
+ $notCalled = [];
+ foreach ($allListeners as $eventName => $listeners) {
+ foreach ($listeners as $listener) {
+ if (!\in_array($listener, $calledListeners, true)) {
+ if (!$listener instanceof WrappedListener) {
+ $listener = new WrappedListener($listener, null, $this->stopwatch, $this);
+ }
+ $notCalled[] = $listener->getInfo($eventName);
+ }
+ }
+ }
+
+ uasort($notCalled, [$this, 'sortNotCalledListeners']);
+
+ return $notCalled;
+ }
+
+ /**
+ * @param Request|null $request The request to get orphaned events for
+ */
+ public function getOrphanedEvents(/* Request $request = null */): array
+ {
+ if (1 <= \func_num_args() && null !== $request = func_get_arg(0)) {
+ return $this->orphanedEvents[spl_object_hash($request)] ?? [];
+ }
+
+ if (!$this->orphanedEvents) {
+ return [];
+ }
+
+ return array_merge(...array_values($this->orphanedEvents));
+ }
+
+ public function reset()
+ {
+ $this->callStack = null;
+ $this->orphanedEvents = [];
+ $this->currentRequestHash = '';
+ }
+
+ /**
+ * Proxies all method calls to the original event dispatcher.
+ *
+ * @param string $method The method name
+ * @param array $arguments The method arguments
+ *
+ * @return mixed
+ */
+ public function __call($method, $arguments)
+ {
+ return $this->dispatcher->{$method}(...$arguments);
+ }
+
+ /**
+ * Called before dispatching the event.
+ *
+ * @param object $event
+ */
+ protected function beforeDispatch(string $eventName, $event)
+ {
+ $this->preDispatch($eventName, $event instanceof Event ? $event : new LegacyEventProxy($event));
+ }
+
+ /**
+ * Called after dispatching the event.
+ *
+ * @param object $event
+ */
+ protected function afterDispatch(string $eventName, $event)
+ {
+ $this->postDispatch($eventName, $event instanceof Event ? $event : new LegacyEventProxy($event));
+ }
+
+ /**
+ * @deprecated since Symfony 4.3, will be removed in 5.0, use beforeDispatch instead
+ */
+ protected function preDispatch($eventName, Event $event)
+ {
+ }
+
+ /**
+ * @deprecated since Symfony 4.3, will be removed in 5.0, use afterDispatch instead
+ */
+ protected function postDispatch($eventName, Event $event)
+ {
+ }
+
+ private function preProcess(string $eventName)
+ {
+ if (!$this->dispatcher->hasListeners($eventName)) {
+ $this->orphanedEvents[$this->currentRequestHash][] = $eventName;
+
+ return;
+ }
+
+ foreach ($this->dispatcher->getListeners($eventName) as $listener) {
+ $priority = $this->getListenerPriority($eventName, $listener);
+ $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this);
+ $this->wrappedListeners[$eventName][] = $wrappedListener;
+ $this->dispatcher->removeListener($eventName, $listener);
+ $this->dispatcher->addListener($eventName, $wrappedListener, $priority);
+ $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]);
+ }
+ }
+
+ private function postProcess(string $eventName)
+ {
+ unset($this->wrappedListeners[$eventName]);
+ $skipped = false;
+ foreach ($this->dispatcher->getListeners($eventName) as $listener) {
+ if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch.
+ continue;
+ }
+ // Unwrap listener
+ $priority = $this->getListenerPriority($eventName, $listener);
+ $this->dispatcher->removeListener($eventName, $listener);
+ $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority);
+
+ if (null !== $this->logger) {
+ $context = ['event' => $eventName, 'listener' => $listener->getPretty()];
+ }
+
+ if ($listener->wasCalled()) {
+ if (null !== $this->logger) {
+ $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context);
+ }
+ } else {
+ $this->callStack->detach($listener);
+ }
+
+ if (null !== $this->logger && $skipped) {
+ $this->logger->debug('Listener "{listener}" was not called for event "{event}".', $context);
+ }
+
+ if ($listener->stoppedPropagation()) {
+ if (null !== $this->logger) {
+ $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context);
+ }
+
+ $skipped = true;
+ }
+ }
+ }
+
+ private function sortNotCalledListeners(array $a, array $b)
+ {
+ if (0 !== $cmp = strcmp($a['event'], $b['event'])) {
+ return $cmp;
+ }
+
+ if (\is_int($a['priority']) && !\is_int($b['priority'])) {
+ return 1;
+ }
+
+ if (!\is_int($a['priority']) && \is_int($b['priority'])) {
+ return -1;
+ }
+
+ if ($a['priority'] === $b['priority']) {
+ return 0;
+ }
+
+ if ($a['priority'] > $b['priority']) {
+ return -1;
+ }
+
+ return 1;
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php
new file mode 100644
index 0000000..4fedb9a
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php
@@ -0,0 +1,42 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher\Debug;
+
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Contracts\Service\ResetInterface;
+
+/**
+ * @deprecated since Symfony 4.1
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+interface TraceableEventDispatcherInterface extends EventDispatcherInterface, ResetInterface
+{
+ /**
+ * Gets the called listeners.
+ *
+ * @param Request|null $request The request to get listeners for
+ *
+ * @return array An array of called listeners
+ */
+ public function getCalledListeners(/* Request $request = null */);
+
+ /**
+ * Gets the not called listeners.
+ *
+ * @param Request|null $request The request to get listeners for
+ *
+ * @return array An array of not called listeners
+ */
+ public function getNotCalledListeners(/* Request $request = null */);
+}
diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
new file mode 100644
index 0000000..9b910e6
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php
@@ -0,0 +1,136 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher\Debug;
+
+use Psr\EventDispatcher\StoppableEventInterface;
+use Symfony\Component\EventDispatcher\Event;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\LegacyEventProxy;
+use Symfony\Component\Stopwatch\Stopwatch;
+use Symfony\Component\VarDumper\Caster\ClassStub;
+use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @final since Symfony 4.3: the "Event" type-hint on __invoke() will be replaced by "object" in 5.0
+ */
+class WrappedListener
+{
+ private $listener;
+ private $optimizedListener;
+ private $name;
+ private $called;
+ private $stoppedPropagation;
+ private $stopwatch;
+ private $dispatcher;
+ private $pretty;
+ private $stub;
+ private $priority;
+ private static $hasClassStub;
+
+ public function __construct($listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null)
+ {
+ $this->listener = $listener;
+ $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null);
+ $this->stopwatch = $stopwatch;
+ $this->dispatcher = $dispatcher;
+ $this->called = false;
+ $this->stoppedPropagation = false;
+
+ if (\is_array($listener)) {
+ $this->name = \is_object($listener[0]) ? \get_class($listener[0]) : $listener[0];
+ $this->pretty = $this->name.'::'.$listener[1];
+ } elseif ($listener instanceof \Closure) {
+ $r = new \ReflectionFunction($listener);
+ if (str_contains($r->name, '{closure}')) {
+ $this->pretty = $this->name = 'closure';
+ } elseif ($class = $r->getClosureScopeClass()) {
+ $this->name = $class->name;
+ $this->pretty = $this->name.'::'.$r->name;
+ } else {
+ $this->pretty = $this->name = $r->name;
+ }
+ } elseif (\is_string($listener)) {
+ $this->pretty = $this->name = $listener;
+ } else {
+ $this->name = \get_class($listener);
+ $this->pretty = $this->name.'::__invoke';
+ }
+
+ if (null !== $name) {
+ $this->name = $name;
+ }
+
+ if (null === self::$hasClassStub) {
+ self::$hasClassStub = class_exists(ClassStub::class);
+ }
+ }
+
+ public function getWrappedListener()
+ {
+ return $this->listener;
+ }
+
+ public function wasCalled()
+ {
+ return $this->called;
+ }
+
+ public function stoppedPropagation()
+ {
+ return $this->stoppedPropagation;
+ }
+
+ public function getPretty()
+ {
+ return $this->pretty;
+ }
+
+ public function getInfo($eventName)
+ {
+ if (null === $this->stub) {
+ $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()';
+ }
+
+ return [
+ 'event' => $eventName,
+ 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null),
+ 'pretty' => $this->pretty,
+ 'stub' => $this->stub,
+ ];
+ }
+
+ public function __invoke(Event $event, $eventName, EventDispatcherInterface $dispatcher)
+ {
+ if ($event instanceof LegacyEventProxy) {
+ $event = $event->getEvent();
+ }
+
+ $dispatcher = $this->dispatcher ?: $dispatcher;
+
+ $this->called = true;
+ $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
+
+ $e = $this->stopwatch->start($this->name, 'event_listener');
+
+ ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
+
+ if ($e->isStarted()) {
+ $e->stop();
+ }
+
+ if (($event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface) && $event->isPropagationStopped()) {
+ $this->stoppedPropagation = true;
+ }
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
new file mode 100644
index 0000000..c4ea50f
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php
@@ -0,0 +1,42 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * This pass allows bundles to extend the list of event aliases.
+ *
+ * @author Alexander M. Turek <me@derrabus.de>
+ */
+class AddEventAliasesPass implements CompilerPassInterface
+{
+ private $eventAliases;
+ private $eventAliasesParameter;
+
+ public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases')
+ {
+ $this->eventAliases = $eventAliases;
+ $this->eventAliasesParameter = $eventAliasesParameter;
+ }
+
+ public function process(ContainerBuilder $container): void
+ {
+ $eventAliases = $container->hasParameter($this->eventAliasesParameter) ? $container->getParameter($this->eventAliasesParameter) : [];
+
+ $container->setParameter(
+ $this->eventAliasesParameter,
+ array_merge($eventAliases, $this->eventAliases)
+ );
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
new file mode 100644
index 0000000..1c4e12e
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php
@@ -0,0 +1,178 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\EventDispatcher\Event as LegacyEvent;
+use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Contracts\EventDispatcher\Event;
+
+/**
+ * Compiler pass to register tagged services for an event dispatcher.
+ */
+class RegisterListenersPass implements CompilerPassInterface
+{
+ protected $dispatcherService;
+ protected $listenerTag;
+ protected $subscriberTag;
+ protected $eventAliasesParameter;
+
+ private $hotPathEvents = [];
+ private $hotPathTagName;
+
+ public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases')
+ {
+ $this->dispatcherService = $dispatcherService;
+ $this->listenerTag = $listenerTag;
+ $this->subscriberTag = $subscriberTag;
+ $this->eventAliasesParameter = $eventAliasesParameter;
+ }
+
+ public function setHotPathEvents(array $hotPathEvents, $tagName = 'container.hot_path')
+ {
+ $this->hotPathEvents = array_flip($hotPathEvents);
+ $this->hotPathTagName = $tagName;
+
+ return $this;
+ }
+
+ public function process(ContainerBuilder $container)
+ {
+ if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) {
+ return;
+ }
+
+ $aliases = [];
+
+ if ($container->hasParameter($this->eventAliasesParameter)) {
+ $aliases = $container->getParameter($this->eventAliasesParameter);
+ }
+
+ $definition = $container->findDefinition($this->dispatcherService);
+
+ foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) {
+ foreach ($events as $event) {
+ $priority = $event['priority'] ?? 0;
+
+ if (!isset($event['event'])) {
+ if ($container->getDefinition($id)->hasTag($this->subscriberTag)) {
+ continue;
+ }
+
+ $event['method'] = $event['method'] ?? '__invoke';
+ $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']);
+ }
+
+ $event['event'] = $aliases[$event['event']] ?? $event['event'];
+
+ if (!isset($event['method'])) {
+ $event['method'] = 'on'.preg_replace_callback([
+ '/(?<=\b|_)[a-z]/i',
+ '/[^a-z0-9]/i',
+ ], function ($matches) { return strtoupper($matches[0]); }, $event['event']);
+ $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
+
+ if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) {
+ $event['method'] = '__invoke';
+ }
+ }
+
+ $definition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]);
+
+ if (isset($this->hotPathEvents[$event['event']])) {
+ $container->getDefinition($id)->addTag($this->hotPathTagName);
+ }
+ }
+ }
+
+ $extractingDispatcher = new ExtractingEventDispatcher();
+
+ foreach ($container->findTaggedServiceIds($this->subscriberTag, true) as $id => $attributes) {
+ $def = $container->getDefinition($id);
+
+ // We must assume that the class value has been correctly filled, even if the service is created by a factory
+ $class = $def->getClass();
+
+ if (!$r = $container->getReflectionClass($class)) {
+ throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
+ }
+ if (!$r->isSubclassOf(EventSubscriberInterface::class)) {
+ throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class));
+ }
+ $class = $r->name;
+
+ ExtractingEventDispatcher::$aliases = $aliases;
+ ExtractingEventDispatcher::$subscriber = $class;
+ $extractingDispatcher->addSubscriber($extractingDispatcher);
+ foreach ($extractingDispatcher->listeners as $args) {
+ $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]];
+ $definition->addMethodCall('addListener', $args);
+
+ if (isset($this->hotPathEvents[$args[0]])) {
+ $container->getDefinition($id)->addTag($this->hotPathTagName);
+ }
+ }
+ $extractingDispatcher->listeners = [];
+ ExtractingEventDispatcher::$aliases = [];
+ }
+ }
+
+ private function getEventFromTypeDeclaration(ContainerBuilder $container, string $id, string $method): string
+ {
+ if (
+ null === ($class = $container->getDefinition($id)->getClass())
+ || !($r = $container->getReflectionClass($class, false))
+ || !$r->hasMethod($method)
+ || 1 > ($m = $r->getMethod($method))->getNumberOfParameters()
+ || !($type = $m->getParameters()[0]->getType()) instanceof \ReflectionNamedType
+ || $type->isBuiltin()
+ || Event::class === ($name = $type->getName())
+ || LegacyEvent::class === $name
+ ) {
+ throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag));
+ }
+
+ return $name;
+ }
+}
+
+/**
+ * @internal
+ */
+class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface
+{
+ public $listeners = [];
+
+ public static $aliases = [];
+ public static $subscriber;
+
+ public function addListener($eventName, $listener, $priority = 0)
+ {
+ $this->listeners[] = [$eventName, $listener[1], $priority];
+ }
+
+ public static function getSubscribedEvents(): array
+ {
+ $events = [];
+
+ foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) {
+ $events[self::$aliases[$eventName] ?? $eventName] = $params;
+ }
+
+ return $events;
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/Event.php b/vendor/symfony/event-dispatcher/Event.php
new file mode 100644
index 0000000..307c4be
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/Event.php
@@ -0,0 +1,38 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+/**
+ * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead
+ */
+class Event
+{
+ private $propagationStopped = false;
+
+ /**
+ * @return bool Whether propagation was already stopped for this event
+ *
+ * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead
+ */
+ public function isPropagationStopped()
+ {
+ return $this->propagationStopped;
+ }
+
+ /**
+ * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead
+ */
+ public function stopPropagation()
+ {
+ $this->propagationStopped = true;
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php
new file mode 100644
index 0000000..4a8f6c6
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/EventDispatcher.php
@@ -0,0 +1,314 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+use Psr\EventDispatcher\StoppableEventInterface;
+use Symfony\Component\EventDispatcher\Debug\WrappedListener;
+use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
+
+/**
+ * The EventDispatcherInterface is the central point of Symfony's event listener system.
+ *
+ * Listeners are registered on the manager and events are dispatched through the
+ * manager.
+ *
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @author Jordan Alliot <jordan.alliot@gmail.com>
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+class EventDispatcher implements EventDispatcherInterface
+{
+ private $listeners = [];
+ private $sorted = [];
+ private $optimized;
+
+ public function __construct()
+ {
+ if (__CLASS__ === static::class) {
+ $this->optimized = [];
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @param string|null $eventName
+ */
+ public function dispatch($event/*, string $eventName = null*/)
+ {
+ $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
+
+ if (\is_object($event)) {
+ $eventName = $eventName ?? \get_class($event);
+ } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) {
+ @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED);
+ $swap = $event;
+ $event = $eventName ?? new Event();
+ $eventName = $swap;
+ } else {
+ throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
+ }
+
+ if (null !== $this->optimized && null !== $eventName) {
+ $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName));
+ } else {
+ $listeners = $this->getListeners($eventName);
+ }
+
+ if ($listeners) {
+ $this->callListeners($listeners, $eventName, $event);
+ }
+
+ return $event;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListeners($eventName = null)
+ {
+ if (null !== $eventName) {
+ if (empty($this->listeners[$eventName])) {
+ return [];
+ }
+
+ if (!isset($this->sorted[$eventName])) {
+ $this->sortListeners($eventName);
+ }
+
+ return $this->sorted[$eventName];
+ }
+
+ foreach ($this->listeners as $eventName => $eventListeners) {
+ if (!isset($this->sorted[$eventName])) {
+ $this->sortListeners($eventName);
+ }
+ }
+
+ return array_filter($this->sorted);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListenerPriority($eventName, $listener)
+ {
+ if (empty($this->listeners[$eventName])) {
+ return null;
+ }
+
+ if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
+ $listener[0] = $listener[0]();
+ $listener[1] = $listener[1] ?? '__invoke';
+ }
+
+ foreach ($this->listeners[$eventName] as $priority => &$listeners) {
+ foreach ($listeners as &$v) {
+ if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) {
+ $v[0] = $v[0]();
+ $v[1] = $v[1] ?? '__invoke';
+ }
+ if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) {
+ return $priority;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasListeners($eventName = null)
+ {
+ if (null !== $eventName) {
+ return !empty($this->listeners[$eventName]);
+ }
+
+ foreach ($this->listeners as $eventListeners) {
+ if ($eventListeners) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addListener($eventName, $listener, $priority = 0)
+ {
+ $this->listeners[$eventName][$priority][] = $listener;
+ unset($this->sorted[$eventName], $this->optimized[$eventName]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeListener($eventName, $listener)
+ {
+ if (empty($this->listeners[$eventName])) {
+ return;
+ }
+
+ if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
+ $listener[0] = $listener[0]();
+ $listener[1] = $listener[1] ?? '__invoke';
+ }
+
+ foreach ($this->listeners[$eventName] as $priority => &$listeners) {
+ foreach ($listeners as $k => &$v) {
+ if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) {
+ $v[0] = $v[0]();
+ $v[1] = $v[1] ?? '__invoke';
+ }
+ if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) {
+ unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]);
+ }
+ }
+
+ if (!$listeners) {
+ unset($this->listeners[$eventName][$priority]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addSubscriber(EventSubscriberInterface $subscriber)
+ {
+ foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
+ if (\is_string($params)) {
+ $this->addListener($eventName, [$subscriber, $params]);
+ } elseif (\is_string($params[0])) {
+ $this->addListener($eventName, [$subscriber, $params[0]], $params[1] ?? 0);
+ } else {
+ foreach ($params as $listener) {
+ $this->addListener($eventName, [$subscriber, $listener[0]], $listener[1] ?? 0);
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeSubscriber(EventSubscriberInterface $subscriber)
+ {
+ foreach ($subscriber->getSubscribedEvents() as $eventName => $params) {
+ if (\is_array($params) && \is_array($params[0])) {
+ foreach ($params as $listener) {
+ $this->removeListener($eventName, [$subscriber, $listener[0]]);
+ }
+ } else {
+ $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
+ }
+ }
+ }
+
+ /**
+ * Triggers the listeners of an event.
+ *
+ * This method can be overridden to add functionality that is executed
+ * for each listener.
+ *
+ * @param callable[] $listeners The event listeners
+ * @param string $eventName The name of the event to dispatch
+ * @param object $event The event object to pass to the event handlers/listeners
+ */
+ protected function callListeners(iterable $listeners, string $eventName, $event)
+ {
+ if ($event instanceof Event) {
+ $this->doDispatch($listeners, $eventName, $event);
+
+ return;
+ }
+
+ $stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
+
+ foreach ($listeners as $listener) {
+ if ($stoppable && $event->isPropagationStopped()) {
+ break;
+ }
+ // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
+ $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
+ }
+ }
+
+ /**
+ * @deprecated since Symfony 4.3, use callListeners() instead
+ */
+ protected function doDispatch($listeners, $eventName, Event $event)
+ {
+ foreach ($listeners as $listener) {
+ if ($event->isPropagationStopped()) {
+ break;
+ }
+ $listener($event, $eventName, $this);
+ }
+ }
+
+ /**
+ * Sorts the internal list of listeners for the given event by priority.
+ */
+ private function sortListeners(string $eventName)
+ {
+ krsort($this->listeners[$eventName]);
+ $this->sorted[$eventName] = [];
+
+ foreach ($this->listeners[$eventName] as &$listeners) {
+ foreach ($listeners as $k => &$listener) {
+ if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
+ $listener[0] = $listener[0]();
+ $listener[1] = $listener[1] ?? '__invoke';
+ }
+ $this->sorted[$eventName][] = $listener;
+ }
+ }
+ }
+
+ /**
+ * Optimizes the internal list of listeners for the given event by priority.
+ */
+ private function optimizeListeners(string $eventName): array
+ {
+ krsort($this->listeners[$eventName]);
+ $this->optimized[$eventName] = [];
+
+ foreach ($this->listeners[$eventName] as &$listeners) {
+ foreach ($listeners as &$listener) {
+ $closure = &$this->optimized[$eventName][];
+ if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
+ $closure = static function (...$args) use (&$listener, &$closure) {
+ if ($listener[0] instanceof \Closure) {
+ $listener[0] = $listener[0]();
+ $listener[1] = $listener[1] ?? '__invoke';
+ }
+ ($closure = \Closure::fromCallable($listener))(...$args);
+ };
+ } else {
+ $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener);
+ }
+ }
+ }
+
+ return $this->optimized[$eventName];
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
new file mode 100644
index 0000000..ceaa62a
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php
@@ -0,0 +1,82 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface;
+
+/**
+ * The EventDispatcherInterface is the central point of Symfony's event listener system.
+ * Listeners are registered on the manager and events are dispatched through the
+ * manager.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+interface EventDispatcherInterface extends ContractsEventDispatcherInterface
+{
+ /**
+ * Adds an event listener that listens on the specified events.
+ *
+ * @param string $eventName The event to listen on
+ * @param callable $listener The listener
+ * @param int $priority The higher this value, the earlier an event
+ * listener will be triggered in the chain (defaults to 0)
+ */
+ public function addListener($eventName, $listener, $priority = 0);
+
+ /**
+ * Adds an event subscriber.
+ *
+ * The subscriber is asked for all the events it is
+ * interested in and added as a listener for these events.
+ */
+ public function addSubscriber(EventSubscriberInterface $subscriber);
+
+ /**
+ * Removes an event listener from the specified events.
+ *
+ * @param string $eventName The event to remove a listener from
+ * @param callable $listener The listener to remove
+ */
+ public function removeListener($eventName, $listener);
+
+ public function removeSubscriber(EventSubscriberInterface $subscriber);
+
+ /**
+ * Gets the listeners of a specific event or all listeners sorted by descending priority.
+ *
+ * @param string|null $eventName The name of the event
+ *
+ * @return array The event listeners for the specified event, or all event listeners by event name
+ */
+ public function getListeners($eventName = null);
+
+ /**
+ * Gets the listener priority for a specific event.
+ *
+ * Returns null if the event or the listener does not exist.
+ *
+ * @param string $eventName The name of the event
+ * @param callable $listener The listener
+ *
+ * @return int|null The event listener priority
+ */
+ public function getListenerPriority($eventName, $listener);
+
+ /**
+ * Checks whether an event has any registered listeners.
+ *
+ * @param string|null $eventName The name of the event
+ *
+ * @return bool true if the specified event has any listeners, false otherwise
+ */
+ public function hasListeners($eventName = null);
+}
diff --git a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php
new file mode 100644
index 0000000..a0fc96d
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php
@@ -0,0 +1,49 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+/**
+ * An EventSubscriber knows itself what events it is interested in.
+ * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes
+ * {@link getSubscribedEvents} and registers the subscriber as a listener for all
+ * returned events.
+ *
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+interface EventSubscriberInterface
+{
+ /**
+ * Returns an array of event names this subscriber wants to listen to.
+ *
+ * The array keys are event names and the value can be:
+ *
+ * * The method name to call (priority defaults to 0)
+ * * An array composed of the method name to call and the priority
+ * * An array of arrays composed of the method names to call and respective
+ * priorities, or 0 if unset
+ *
+ * For instance:
+ *
+ * * ['eventName' => 'methodName']
+ * * ['eventName' => ['methodName', $priority]]
+ * * ['eventName' => [['methodName1', $priority], ['methodName2']]]
+ *
+ * The code must not depend on runtime state as it will only be called at compile time.
+ * All logic depending on runtime state must be put into the individual methods handling the events.
+ *
+ * @return array<string, mixed> The event names to listen to
+ */
+ public static function getSubscribedEvents();
+}
diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php
new file mode 100644
index 0000000..23333bc
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/GenericEvent.php
@@ -0,0 +1,184 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+/**
+ * Event encapsulation class.
+ *
+ * Encapsulates events thus decoupling the observer from the subject they encapsulate.
+ *
+ * @author Drak <drak@zikula.org>
+ */
+class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
+{
+ protected $subject;
+ protected $arguments;
+
+ /**
+ * Encapsulate an event with $subject and $args.
+ *
+ * @param mixed $subject The subject of the event, usually an object or a callable
+ * @param array $arguments Arguments to store in the event
+ */
+ public function __construct($subject = null, array $arguments = [])
+ {
+ $this->subject = $subject;
+ $this->arguments = $arguments;
+ }
+
+ /**
+ * Getter for subject property.
+ *
+ * @return mixed The observer subject
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
+
+ /**
+ * Get argument by key.
+ *
+ * @param string $key Key
+ *
+ * @return mixed Contents of array key
+ *
+ * @throws \InvalidArgumentException if key is not found
+ */
+ public function getArgument($key)
+ {
+ if ($this->hasArgument($key)) {
+ return $this->arguments[$key];
+ }
+
+ throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key));
+ }
+
+ /**
+ * Add argument to event.
+ *
+ * @param string $key Argument name
+ * @param mixed $value Value
+ *
+ * @return $this
+ */
+ public function setArgument($key, $value)
+ {
+ $this->arguments[$key] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Getter for all arguments.
+ *
+ * @return array
+ */
+ public function getArguments()
+ {
+ return $this->arguments;
+ }
+
+ /**
+ * Set args property.
+ *
+ * @param array $args Arguments
+ *
+ * @return $this
+ */
+ public function setArguments(array $args = [])
+ {
+ $this->arguments = $args;
+
+ return $this;
+ }
+
+ /**
+ * Has argument.
+ *
+ * @param string $key Key of arguments array
+ *
+ * @return bool
+ */
+ public function hasArgument($key)
+ {
+ return \array_key_exists($key, $this->arguments);
+ }
+
+ /**
+ * ArrayAccess for argument getter.
+ *
+ * @param string $key Array key
+ *
+ * @return mixed
+ *
+ * @throws \InvalidArgumentException if key does not exist in $this->args
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($key)
+ {
+ return $this->getArgument($key);
+ }
+
+ /**
+ * ArrayAccess for argument setter.
+ *
+ * @param string $key Array key to set
+ * @param mixed $value Value
+ *
+ * @return void
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($key, $value)
+ {
+ $this->setArgument($key, $value);
+ }
+
+ /**
+ * ArrayAccess for unset argument.
+ *
+ * @param string $key Array key
+ *
+ * @return void
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($key)
+ {
+ if ($this->hasArgument($key)) {
+ unset($this->arguments[$key]);
+ }
+ }
+
+ /**
+ * ArrayAccess has argument.
+ *
+ * @param string $key Array key
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetExists($key)
+ {
+ return $this->hasArgument($key);
+ }
+
+ /**
+ * IteratorAggregate for iterating over the object like an array.
+ *
+ * @return \ArrayIterator
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator()
+ {
+ return new \ArrayIterator($this->arguments);
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
new file mode 100644
index 0000000..75a7d73
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php
@@ -0,0 +1,102 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+/**
+ * A read-only proxy for an event dispatcher.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class ImmutableEventDispatcher implements EventDispatcherInterface
+{
+ private $dispatcher;
+
+ public function __construct(EventDispatcherInterface $dispatcher)
+ {
+ $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @param string|null $eventName
+ */
+ public function dispatch($event/*, string $eventName = null*/)
+ {
+ $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
+
+ if (is_scalar($event)) {
+ // deprecated
+ $swap = $event;
+ $event = $eventName ?? new Event();
+ $eventName = $swap;
+ }
+
+ return $this->dispatcher->dispatch($event, $eventName);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addListener($eventName, $listener, $priority = 0)
+ {
+ throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addSubscriber(EventSubscriberInterface $subscriber)
+ {
+ throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeListener($eventName, $listener)
+ {
+ throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeSubscriber(EventSubscriberInterface $subscriber)
+ {
+ throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListeners($eventName = null)
+ {
+ return $this->dispatcher->getListeners($eventName);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListenerPriority($eventName, $listener)
+ {
+ return $this->dispatcher->getListenerPriority($eventName, $listener);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasListeners($eventName = null)
+ {
+ return $this->dispatcher->hasListeners($eventName);
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE
new file mode 100644
index 0000000..88bf75b
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php
new file mode 100644
index 0000000..8ee6cba
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php
@@ -0,0 +1,147 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+use Psr\EventDispatcher\StoppableEventInterface;
+use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
+use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface;
+
+/**
+ * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch().
+ *
+ * This class should be deprecated in Symfony 5.1
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+final class LegacyEventDispatcherProxy implements EventDispatcherInterface
+{
+ private $dispatcher;
+
+ public static function decorate(?ContractsEventDispatcherInterface $dispatcher): ?ContractsEventDispatcherInterface
+ {
+ if (null === $dispatcher) {
+ return null;
+ }
+ $r = new \ReflectionMethod($dispatcher, 'dispatch');
+ $param2 = $r->getParameters()[1] ?? null;
+
+ if (!$param2 || !$param2->hasType() || $param2->getType()->isBuiltin()) {
+ return $dispatcher;
+ }
+
+ @trigger_error(sprintf('The signature of the "%s::dispatch()" method should be updated to "dispatch($event, string $eventName = null)", not doing so is deprecated since Symfony 4.3.', $r->class), \E_USER_DEPRECATED);
+
+ $self = new self();
+ $self->dispatcher = $dispatcher;
+
+ return $self;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @param string|null $eventName
+ *
+ * @return object
+ */
+ public function dispatch($event/*, string $eventName = null*/)
+ {
+ $eventName = 1 < \func_num_args() ? func_get_arg(1) : null;
+
+ if (\is_object($event)) {
+ $eventName = $eventName ?? \get_class($event);
+ } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) {
+ @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', ContractsEventDispatcherInterface::class), \E_USER_DEPRECATED);
+ $swap = $event;
+ $event = $eventName ?? new Event();
+ $eventName = $swap;
+ } else {
+ throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', ContractsEventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
+ }
+
+ $listeners = $this->getListeners($eventName);
+ $stoppable = $event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
+
+ foreach ($listeners as $listener) {
+ if ($stoppable && $event->isPropagationStopped()) {
+ break;
+ }
+ $listener($event, $eventName, $this);
+ }
+
+ return $event;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addListener($eventName, $listener, $priority = 0)
+ {
+ return $this->dispatcher->addListener($eventName, $listener, $priority);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addSubscriber(EventSubscriberInterface $subscriber)
+ {
+ return $this->dispatcher->addSubscriber($subscriber);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeListener($eventName, $listener)
+ {
+ return $this->dispatcher->removeListener($eventName, $listener);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function removeSubscriber(EventSubscriberInterface $subscriber)
+ {
+ return $this->dispatcher->removeSubscriber($subscriber);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListeners($eventName = null): array
+ {
+ return $this->dispatcher->getListeners($eventName);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getListenerPriority($eventName, $listener): ?int
+ {
+ return $this->dispatcher->getListenerPriority($eventName, $listener);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasListeners($eventName = null): bool
+ {
+ return $this->dispatcher->hasListeners($eventName);
+ }
+
+ /**
+ * Proxies all method calls to the original event dispatcher.
+ */
+ public function __call($method, $arguments)
+ {
+ return $this->dispatcher->{$method}(...$arguments);
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/LegacyEventProxy.php b/vendor/symfony/event-dispatcher/LegacyEventProxy.php
new file mode 100644
index 0000000..45ee251
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/LegacyEventProxy.php
@@ -0,0 +1,62 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\EventDispatcher;
+
+use Psr\EventDispatcher\StoppableEventInterface;
+use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
+
+/**
+ * @internal to be removed in 5.0.
+ */
+final class LegacyEventProxy extends Event
+{
+ private $event;
+
+ /**
+ * @param object $event
+ */
+ public function __construct($event)
+ {
+ $this->event = $event;
+ }
+
+ /**
+ * @return object $event
+ */
+ public function getEvent()
+ {
+ return $this->event;
+ }
+
+ public function isPropagationStopped(): bool
+ {
+ if (!$this->event instanceof ContractsEvent && !$this->event instanceof StoppableEventInterface) {
+ return false;
+ }
+
+ return $this->event->isPropagationStopped();
+ }
+
+ public function stopPropagation()
+ {
+ if (!$this->event instanceof ContractsEvent) {
+ return;
+ }
+
+ $this->event->stopPropagation();
+ }
+
+ public function __call($name, $args)
+ {
+ return $this->event->{$name}(...$args);
+ }
+}
diff --git a/vendor/symfony/event-dispatcher/README.md b/vendor/symfony/event-dispatcher/README.md
new file mode 100644
index 0000000..dcdb68d
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/README.md
@@ -0,0 +1,15 @@
+EventDispatcher Component
+=========================
+
+The EventDispatcher component provides tools that allow your application
+components to communicate with each other by dispatching events and listening to
+them.
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json
new file mode 100644
index 0000000..55c2716
--- /dev/null
+++ b/vendor/symfony/event-dispatcher/composer.json
@@ -0,0 +1,51 @@
+{
+ "name": "symfony/event-dispatcher",
+ "type": "library",
+ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
+ "keywords": [],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1.3",
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "require-dev": {
+ "symfony/dependency-injection": "^3.4|^4.0|^5.0",
+ "symfony/expression-language": "^3.4|^4.0|^5.0",
+ "symfony/config": "^3.4|^4.0|^5.0",
+ "symfony/error-handler": "~3.4|~4.4",
+ "symfony/http-foundation": "^3.4|^4.0|^5.0",
+ "symfony/service-contracts": "^1.1|^2",
+ "symfony/stopwatch": "^3.4|^4.0|^5.0",
+ "psr/log": "^1|^2|^3"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<3.4"
+ },
+ "provide": {
+ "psr/event-dispatcher-implementation": "1.0",
+ "symfony/event-dispatcher-implementation": "1.1"
+ },
+ "suggest": {
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/vendor/symfony/filesystem/CHANGELOG.md b/vendor/symfony/filesystem/CHANGELOG.md
new file mode 100644
index 0000000..4a0755b
--- /dev/null
+++ b/vendor/symfony/filesystem/CHANGELOG.md
@@ -0,0 +1,76 @@
+CHANGELOG
+=========
+
+5.0.0
+-----
+
+ * `Filesystem::dumpFile()` and `appendToFile()` don't accept arrays anymore
+
+4.4.0
+-----
+
+ * support for passing a `null` value to `Filesystem::isAbsolutePath()` is deprecated and will be removed in 5.0
+ * `tempnam()` now accepts a third argument `$suffix`.
+
+4.3.0
+-----
+
+ * support for passing arrays to `Filesystem::dumpFile()` is deprecated and will be removed in 5.0
+ * support for passing arrays to `Filesystem::appendToFile()` is deprecated and will be removed in 5.0
+
+4.0.0
+-----
+
+ * removed `LockHandler`
+ * Support for passing relative paths to `Filesystem::makePathRelative()` has been removed.
+
+3.4.0
+-----
+
+ * support for passing relative paths to `Filesystem::makePathRelative()` is deprecated and will be removed in 4.0
+
+3.3.0
+-----
+
+ * added `appendToFile()` to append contents to existing files
+
+3.2.0
+-----
+
+ * added `readlink()` as a platform independent method to read links
+
+3.0.0
+-----
+
+ * removed `$mode` argument from `Filesystem::dumpFile()`
+
+2.8.0
+-----
+
+ * added tempnam() a stream aware version of PHP's native tempnam()
+
+2.6.0
+-----
+
+ * added LockHandler
+
+2.3.12
+------
+
+ * deprecated dumpFile() file mode argument.
+
+2.3.0
+-----
+
+ * added the dumpFile() method to atomically write files
+
+2.2.0
+-----
+
+ * added a delete option for the mirror() method
+
+2.1.0
+-----
+
+ * 24eb396 : BC Break : mkdir() function now throws exception in case of failure instead of returning Boolean value
+ * created the component
diff --git a/vendor/symfony/filesystem/Exception/ExceptionInterface.php b/vendor/symfony/filesystem/Exception/ExceptionInterface.php
new file mode 100644
index 0000000..fc438d9
--- /dev/null
+++ b/vendor/symfony/filesystem/Exception/ExceptionInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Filesystem\Exception;
+
+/**
+ * Exception interface for all exceptions thrown by the component.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ */
+interface ExceptionInterface extends \Throwable
+{
+}
diff --git a/vendor/symfony/filesystem/Exception/FileNotFoundException.php b/vendor/symfony/filesystem/Exception/FileNotFoundException.php
new file mode 100644
index 0000000..48b6408
--- /dev/null
+++ b/vendor/symfony/filesystem/Exception/FileNotFoundException.php
@@ -0,0 +1,34 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Filesystem\Exception;
+
+/**
+ * Exception class thrown when a file couldn't be found.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Christian Gärtner <christiangaertner.film@googlemail.com>
+ */
+class FileNotFoundException extends IOException
+{
+ public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null)
+ {
+ if (null === $message) {
+ if (null === $path) {
+ $message = 'File could not be found.';
+ } else {
+ $message = sprintf('File "%s" could not be found.', $path);
+ }
+ }
+
+ parent::__construct($message, $code, $previous, $path);
+ }
+}
diff --git a/vendor/symfony/filesystem/Exception/IOException.php b/vendor/symfony/filesystem/Exception/IOException.php
new file mode 100644
index 0000000..fea26e4
--- /dev/null
+++ b/vendor/symfony/filesystem/Exception/IOException.php
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Filesystem\Exception;
+
+/**
+ * Exception class thrown when a filesystem operation failure happens.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ * @author Christian Gärtner <christiangaertner.film@googlemail.com>
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class IOException extends \RuntimeException implements IOExceptionInterface
+{
+ private $path;
+
+ public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null)
+ {
+ $this->path = $path;
+
+ parent::__construct($message, $code, $previous);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
+}
diff --git a/vendor/symfony/filesystem/Exception/IOExceptionInterface.php b/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
new file mode 100644
index 0000000..f9d4644
--- /dev/null
+++ b/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
@@ -0,0 +1,27 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Filesystem\Exception;
+
+/**
+ * IOException interface for file and input/output stream related exceptions thrown by the component.
+ *
+ * @author Christian Gärtner <christiangaertner.film@googlemail.com>
+ */
+interface IOExceptionInterface extends ExceptionInterface
+{
+ /**
+ * Returns the associated path for the exception.
+ *
+ * @return string|null The path
+ */
+ public function getPath();
+}
diff --git a/vendor/symfony/filesystem/Exception/InvalidArgumentException.php b/vendor/symfony/filesystem/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..abadc20
--- /dev/null
+++ b/vendor/symfony/filesystem/Exception/InvalidArgumentException.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Filesystem\Exception;
+
+/**
+ * @author Christian Flothmann <christian.flothmann@sensiolabs.de>
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/filesystem/Filesystem.php b/vendor/symfony/filesystem/Filesystem.php
new file mode 100644
index 0000000..4e70c32
--- /dev/null
+++ b/vendor/symfony/filesystem/Filesystem.php
@@ -0,0 +1,758 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Filesystem;
+
+use Symfony\Component\Filesystem\Exception\FileNotFoundException;
+use Symfony\Component\Filesystem\Exception\InvalidArgumentException;
+use Symfony\Component\Filesystem\Exception\IOException;
+
+/**
+ * Provides basic utility to manipulate the file system.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Filesystem
+{
+ private static $lastError;
+
+ /**
+ * Copies a file.
+ *
+ * If the target file is older than the origin file, it's always overwritten.
+ * If the target file is newer, it is overwritten only when the
+ * $overwriteNewerFiles option is set to true.
+ *
+ * @throws FileNotFoundException When originFile doesn't exist
+ * @throws IOException When copy fails
+ */
+ public function copy(string $originFile, string $targetFile, bool $overwriteNewerFiles = false)
+ {
+ $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://');
+ if ($originIsLocal && !is_file($originFile)) {
+ throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
+ }
+
+ $this->mkdir(\dirname($targetFile));
+
+ $doCopy = true;
+ if (!$overwriteNewerFiles && null === parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) {
+ $doCopy = filemtime($originFile) > filemtime($targetFile);
+ }
+
+ if ($doCopy) {
+ // https://bugs.php.net/64634
+ if (!$source = self::box('fopen', $originFile, 'r')) {
+ throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile);
+ }
+
+ // Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
+ if (!$target = self::box('fopen', $targetFile, 'w', false, stream_context_create(['ftp' => ['overwrite' => true]]))) {
+ throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile);
+ }
+
+ $bytesCopied = stream_copy_to_stream($source, $target);
+ fclose($source);
+ fclose($target);
+ unset($source, $target);
+
+ if (!is_file($targetFile)) {
+ throw new IOException(sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile);
+ }
+
+ if ($originIsLocal) {
+ // Like `cp`, preserve executable permission bits
+ self::box('chmod', $targetFile, fileperms($targetFile) | (fileperms($originFile) & 0111));
+
+ if ($bytesCopied !== $bytesOrigin = filesize($originFile)) {
+ throw new IOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates a directory recursively.
+ *
+ * @param string|iterable $dirs The directory path
+ *
+ * @throws IOException On any directory creation failure
+ */
+ public function mkdir($dirs, int $mode = 0777)
+ {
+ foreach ($this->toIterable($dirs) as $dir) {
+ if (is_dir($dir)) {
+ continue;
+ }
+
+ if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) {
+ throw new IOException(sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir);
+ }
+ }
+ }
+
+ /**
+ * Checks the existence of files or directories.
+ *
+ * @param string|iterable $files A filename, an array of files, or a \Traversable instance to check
+ *
+ * @return bool true if the file exists, false otherwise
+ */
+ public function exists($files)
+ {
+ $maxPathLength = \PHP_MAXPATHLEN - 2;
+
+ foreach ($this->toIterable($files) as $file) {
+ if (\strlen($file) > $maxPathLength) {
+ throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
+ }
+
+ if (!file_exists($file)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Sets access and modification time of file.
+ *
+ * @param string|iterable $files A filename, an array of files, or a \Traversable instance to create
+ * @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used
+ * @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used
+ *
+ * @throws IOException When touch fails
+ */
+ public function touch($files, int $time = null, int $atime = null)
+ {
+ foreach ($this->toIterable($files) as $file) {
+ if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) {
+ throw new IOException(sprintf('Failed to touch "%s": ', $file).self::$lastError, 0, null, $file);
+ }
+ }
+ }
+
+ /**
+ * Removes files or directories.
+ *
+ * @param string|iterable $files A filename, an array of files, or a \Traversable instance to remove
+ *
+ * @throws IOException When removal fails
+ */
+ public function remove($files)
+ {
+ if ($files instanceof \Traversable) {
+ $files = iterator_to_array($files, false);
+ } elseif (!\is_array($files)) {
+ $files = [$files];
+ }
+
+ self::doRemove($files, false);
+ }
+
+ private static function doRemove(array $files, bool $isRecursive): void
+ {
+ $files = array_reverse($files);
+ foreach ($files as $file) {
+ if (is_link($file)) {
+ // See https://bugs.php.net/52176
+ if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
+ throw new IOException(sprintf('Failed to remove symlink "%s": ', $file).self::$lastError);
+ }
+ } elseif (is_dir($file)) {
+ if (!$isRecursive) {
+ $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-.'));
+
+ if (file_exists($tmpName)) {
+ try {
+ self::doRemove([$tmpName], true);
+ } catch (IOException $e) {
+ }
+ }
+
+ if (!file_exists($tmpName) && self::box('rename', $file, $tmpName)) {
+ $origFile = $file;
+ $file = $tmpName;
+ } else {
+ $origFile = null;
+ }
+ }
+
+ $files = new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS);
+ self::doRemove(iterator_to_array($files, true), true);
+
+ if (!self::box('rmdir', $file) && file_exists($file) && !$isRecursive) {
+ $lastError = self::$lastError;
+
+ if (null !== $origFile && self::box('rename', $file, $origFile)) {
+ $file = $origFile;
+ }
+
+ throw new IOException(sprintf('Failed to remove directory "%s": ', $file).$lastError);
+ }
+ } elseif (!self::box('unlink', $file) && (str_contains(self::$lastError, 'Permission denied') || file_exists($file))) {
+ throw new IOException(sprintf('Failed to remove file "%s": ', $file).self::$lastError);
+ }
+ }
+ }
+
+ /**
+ * Change mode for an array of files or directories.
+ *
+ * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change mode
+ * @param int $mode The new mode (octal)
+ * @param int $umask The mode mask (octal)
+ * @param bool $recursive Whether change the mod recursively or not
+ *
+ * @throws IOException When the change fails
+ */
+ public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false)
+ {
+ foreach ($this->toIterable($files) as $file) {
+ if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && !self::box('chmod', $file, $mode & ~$umask)) {
+ throw new IOException(sprintf('Failed to chmod file "%s": ', $file).self::$lastError, 0, null, $file);
+ }
+ if ($recursive && is_dir($file) && !is_link($file)) {
+ $this->chmod(new \FilesystemIterator($file), $mode, $umask, true);
+ }
+ }
+ }
+
+ /**
+ * Change the owner of an array of files or directories.
+ *
+ * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change owner
+ * @param string|int $user A user name or number
+ * @param bool $recursive Whether change the owner recursively or not
+ *
+ * @throws IOException When the change fails
+ */
+ public function chown($files, $user, bool $recursive = false)
+ {
+ foreach ($this->toIterable($files) as $file) {
+ if ($recursive && is_dir($file) && !is_link($file)) {
+ $this->chown(new \FilesystemIterator($file), $user, true);
+ }
+ if (is_link($file) && \function_exists('lchown')) {
+ if (!self::box('lchown', $file, $user)) {
+ throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file);
+ }
+ } else {
+ if (!self::box('chown', $file, $user)) {
+ throw new IOException(sprintf('Failed to chown file "%s": ', $file).self::$lastError, 0, null, $file);
+ }
+ }
+ }
+ }
+
+ /**
+ * Change the group of an array of files or directories.
+ *
+ * @param string|iterable $files A filename, an array of files, or a \Traversable instance to change group
+ * @param string|int $group A group name or number
+ * @param bool $recursive Whether change the group recursively or not
+ *
+ * @throws IOException When the change fails
+ */
+ public function chgrp($files, $group, bool $recursive = false)
+ {
+ foreach ($this->toIterable($files) as $file) {
+ if ($recursive && is_dir($file) && !is_link($file)) {
+ $this->chgrp(new \FilesystemIterator($file), $group, true);
+ }
+ if (is_link($file) && \function_exists('lchgrp')) {
+ if (!self::box('lchgrp', $file, $group)) {
+ throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file);
+ }
+ } else {
+ if (!self::box('chgrp', $file, $group)) {
+ throw new IOException(sprintf('Failed to chgrp file "%s": ', $file).self::$lastError, 0, null, $file);
+ }
+ }
+ }
+ }
+
+ /**
+ * Renames a file or a directory.
+ *
+ * @throws IOException When target file or directory already exists
+ * @throws IOException When origin cannot be renamed
+ */
+ public function rename(string $origin, string $target, bool $overwrite = false)
+ {
+ // we check that target does not exist
+ if (!$overwrite && $this->isReadable($target)) {
+ throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target);
+ }
+
+ if (!self::box('rename', $origin, $target)) {
+ if (is_dir($origin)) {
+ // See https://bugs.php.net/54097 & https://php.net/rename#113943
+ $this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);
+ $this->remove($origin);
+
+ return;
+ }
+ throw new IOException(sprintf('Cannot rename "%s" to "%s": ', $origin, $target).self::$lastError, 0, null, $target);
+ }
+ }
+
+ /**
+ * Tells whether a file exists and is readable.
+ *
+ * @throws IOException When windows path is longer than 258 characters
+ */
+ private function isReadable(string $filename): bool
+ {
+ $maxPathLength = \PHP_MAXPATHLEN - 2;
+
+ if (\strlen($filename) > $maxPathLength) {
+ throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
+ }
+
+ return is_readable($filename);
+ }
+
+ /**
+ * Creates a symbolic link or copy a directory.
+ *
+ * @throws IOException When symlink fails
+ */
+ public function symlink(string $originDir, string $targetDir, bool $copyOnWindows = false)
+ {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $originDir = strtr($originDir, '/', '\\');
+ $targetDir = strtr($targetDir, '/', '\\');
+
+ if ($copyOnWindows) {
+ $this->mirror($originDir, $targetDir);
+
+ return;
+ }
+ }
+
+ $this->mkdir(\dirname($targetDir));
+
+ if (is_link($targetDir)) {
+ if (readlink($targetDir) === $originDir) {
+ return;
+ }
+ $this->remove($targetDir);
+ }
+
+ if (!self::box('symlink', $originDir, $targetDir)) {
+ $this->linkException($originDir, $targetDir, 'symbolic');
+ }
+ }
+
+ /**
+ * Creates a hard link, or several hard links to a file.
+ *
+ * @param string|string[] $targetFiles The target file(s)
+ *
+ * @throws FileNotFoundException When original file is missing or not a file
+ * @throws IOException When link fails, including if link already exists
+ */
+ public function hardlink(string $originFile, $targetFiles)
+ {
+ if (!$this->exists($originFile)) {
+ throw new FileNotFoundException(null, 0, null, $originFile);
+ }
+
+ if (!is_file($originFile)) {
+ throw new FileNotFoundException(sprintf('Origin file "%s" is not a file.', $originFile));
+ }
+
+ foreach ($this->toIterable($targetFiles) as $targetFile) {
+ if (is_file($targetFile)) {
+ if (fileinode($originFile) === fileinode($targetFile)) {
+ continue;
+ }
+ $this->remove($targetFile);
+ }
+
+ if (!self::box('link', $originFile, $targetFile)) {
+ $this->linkException($originFile, $targetFile, 'hard');
+ }
+ }
+ }
+
+ /**
+ * @param string $linkType Name of the link type, typically 'symbolic' or 'hard'
+ */
+ private function linkException(string $origin, string $target, string $linkType)
+ {
+ if (self::$lastError) {
+ if ('\\' === \DIRECTORY_SEPARATOR && str_contains(self::$lastError, 'error code(1314)')) {
+ throw new IOException(sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
+ }
+ }
+ throw new IOException(sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target);
+ }
+
+ /**
+ * Resolves links in paths.
+ *
+ * With $canonicalize = false (default)
+ * - if $path does not exist or is not a link, returns null
+ * - if $path is a link, returns the next direct target of the link without considering the existence of the target
+ *
+ * With $canonicalize = true
+ * - if $path does not exist, returns null
+ * - if $path exists, returns its absolute fully resolved final version
+ *
+ * @return string|null
+ */
+ public function readlink(string $path, bool $canonicalize = false)
+ {
+ if (!$canonicalize && !is_link($path)) {
+ return null;
+ }
+
+ if ($canonicalize) {
+ if (!$this->exists($path)) {
+ return null;
+ }
+
+ if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70410) {
+ $path = readlink($path);
+ }
+
+ return realpath($path);
+ }
+
+ if ('\\' === \DIRECTORY_SEPARATOR && \PHP_VERSION_ID < 70400) {
+ return realpath($path);
+ }
+
+ return readlink($path);
+ }
+
+ /**
+ * Given an existing path, convert it to a path relative to a given starting path.
+ *
+ * @return string Path of target relative to starting path
+ */
+ public function makePathRelative(string $endPath, string $startPath)
+ {
+ if (!$this->isAbsolutePath($startPath)) {
+ throw new InvalidArgumentException(sprintf('The start path "%s" is not absolute.', $startPath));
+ }
+
+ if (!$this->isAbsolutePath($endPath)) {
+ throw new InvalidArgumentException(sprintf('The end path "%s" is not absolute.', $endPath));
+ }
+
+ // Normalize separators on Windows
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $endPath = str_replace('\\', '/', $endPath);
+ $startPath = str_replace('\\', '/', $startPath);
+ }
+
+ $splitDriveLetter = function ($path) {
+ return (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0]))
+ ? [substr($path, 2), strtoupper($path[0])]
+ : [$path, null];
+ };
+
+ $splitPath = function ($path) {
+ $result = [];
+
+ foreach (explode('/', trim($path, '/')) as $segment) {
+ if ('..' === $segment) {
+ array_pop($result);
+ } elseif ('.' !== $segment && '' !== $segment) {
+ $result[] = $segment;
+ }
+ }
+
+ return $result;
+ };
+
+ [$endPath, $endDriveLetter] = $splitDriveLetter($endPath);
+ [$startPath, $startDriveLetter] = $splitDriveLetter($startPath);
+
+ $startPathArr = $splitPath($startPath);
+ $endPathArr = $splitPath($endPath);
+
+ if ($endDriveLetter && $startDriveLetter && $endDriveLetter != $startDriveLetter) {
+ // End path is on another drive, so no relative path exists
+ return $endDriveLetter.':/'.($endPathArr ? implode('/', $endPathArr).'/' : '');
+ }
+
+ // Find for which directory the common path stops
+ $index = 0;
+ while (isset($startPathArr[$index]) && isset($endPathArr[$index]) && $startPathArr[$index] === $endPathArr[$index]) {
+ ++$index;
+ }
+
+ // Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
+ if (1 === \count($startPathArr) && '' === $startPathArr[0]) {
+ $depth = 0;
+ } else {
+ $depth = \count($startPathArr) - $index;
+ }
+
+ // Repeated "../" for each level need to reach the common path
+ $traverser = str_repeat('../', $depth);
+
+ $endPathRemainder = implode('/', \array_slice($endPathArr, $index));
+
+ // Construct $endPath from traversing to the common path, then to the remaining $endPath
+ $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : '');
+
+ return '' === $relativePath ? './' : $relativePath;
+ }
+
+ /**
+ * Mirrors a directory to another.
+ *
+ * Copies files and directories from the origin directory into the target directory. By default:
+ *
+ * - existing files in the target directory will be overwritten, except if they are newer (see the `override` option)
+ * - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option)
+ *
+ * @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created
+ * @param array $options An array of boolean options
+ * Valid options are:
+ * - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false)
+ * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
+ * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
+ *
+ * @throws IOException When file type is unknown
+ */
+ public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = [])
+ {
+ $targetDir = rtrim($targetDir, '/\\');
+ $originDir = rtrim($originDir, '/\\');
+ $originDirLen = \strlen($originDir);
+
+ if (!$this->exists($originDir)) {
+ throw new IOException(sprintf('The origin directory specified "%s" was not found.', $originDir), 0, null, $originDir);
+ }
+
+ // Iterate in destination folder to remove obsolete entries
+ if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) {
+ $deleteIterator = $iterator;
+ if (null === $deleteIterator) {
+ $flags = \FilesystemIterator::SKIP_DOTS;
+ $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST);
+ }
+ $targetDirLen = \strlen($targetDir);
+ foreach ($deleteIterator as $file) {
+ $origin = $originDir.substr($file->getPathname(), $targetDirLen);
+ if (!$this->exists($origin)) {
+ $this->remove($file);
+ }
+ }
+ }
+
+ $copyOnWindows = $options['copy_on_windows'] ?? false;
+
+ if (null === $iterator) {
+ $flags = $copyOnWindows ? \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS : \FilesystemIterator::SKIP_DOTS;
+ $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($originDir, $flags), \RecursiveIteratorIterator::SELF_FIRST);
+ }
+
+ $this->mkdir($targetDir);
+ $filesCreatedWhileMirroring = [];
+
+ foreach ($iterator as $file) {
+ if ($file->getPathname() === $targetDir || $file->getRealPath() === $targetDir || isset($filesCreatedWhileMirroring[$file->getRealPath()])) {
+ continue;
+ }
+
+ $target = $targetDir.substr($file->getPathname(), $originDirLen);
+ $filesCreatedWhileMirroring[$target] = true;
+
+ if (!$copyOnWindows && is_link($file)) {
+ $this->symlink($file->getLinkTarget(), $target);
+ } elseif (is_dir($file)) {
+ $this->mkdir($target);
+ } elseif (is_file($file)) {
+ $this->copy($file, $target, $options['override'] ?? false);
+ } else {
+ throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file);
+ }
+ }
+ }
+
+ /**
+ * Returns whether the file path is an absolute path.
+ *
+ * @return bool
+ */
+ public function isAbsolutePath(string $file)
+ {
+ return '' !== $file && (strspn($file, '/\\', 0, 1)
+ || (\strlen($file) > 3 && ctype_alpha($file[0])
+ && ':' === $file[1]
+ && strspn($file, '/\\', 2, 1)
+ )
+ || null !== parse_url($file, \PHP_URL_SCHEME)
+ );
+ }
+
+ /**
+ * Creates a temporary file with support for custom stream wrappers.
+ *
+ * @param string $prefix The prefix of the generated temporary filename
+ * Note: Windows uses only the first three characters of prefix
+ * @param string $suffix The suffix of the generated temporary filename
+ *
+ * @return string The new temporary filename (with path), or throw an exception on failure
+ */
+ public function tempnam(string $dir, string $prefix/*, string $suffix = ''*/)
+ {
+ $suffix = \func_num_args() > 2 ? func_get_arg(2) : '';
+ [$scheme, $hierarchy] = $this->getSchemeAndHierarchy($dir);
+
+ // If no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem
+ if ((null === $scheme || 'file' === $scheme || 'gs' === $scheme) && '' === $suffix) {
+ // If tempnam failed or no scheme return the filename otherwise prepend the scheme
+ if ($tmpFile = self::box('tempnam', $hierarchy, $prefix)) {
+ if (null !== $scheme && 'gs' !== $scheme) {
+ return $scheme.'://'.$tmpFile;
+ }
+
+ return $tmpFile;
+ }
+
+ throw new IOException('A temporary file could not be created: '.self::$lastError);
+ }
+
+ // Loop until we create a valid temp file or have reached 10 attempts
+ for ($i = 0; $i < 10; ++$i) {
+ // Create a unique filename
+ $tmpFile = $dir.'/'.$prefix.uniqid(mt_rand(), true).$suffix;
+
+ // Use fopen instead of file_exists as some streams do not support stat
+ // Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability
+ if (!$handle = self::box('fopen', $tmpFile, 'x+')) {
+ continue;
+ }
+
+ // Close the file if it was successfully opened
+ self::box('fclose', $handle);
+
+ return $tmpFile;
+ }
+
+ throw new IOException('A temporary file could not be created: '.self::$lastError);
+ }
+
+ /**
+ * Atomically dumps content into a file.
+ *
+ * @param string|resource $content The data to write into the file
+ *
+ * @throws IOException if the file cannot be written to
+ */
+ public function dumpFile(string $filename, $content)
+ {
+ if (\is_array($content)) {
+ throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
+ }
+
+ $dir = \dirname($filename);
+
+ if (!is_dir($dir)) {
+ $this->mkdir($dir);
+ }
+
+ // Will create a temp file with 0600 access rights
+ // when the filesystem supports chmod.
+ $tmpFile = $this->tempnam($dir, basename($filename));
+
+ try {
+ if (false === self::box('file_put_contents', $tmpFile, $content)) {
+ throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename);
+ }
+
+ self::box('chmod', $tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask());
+
+ $this->rename($tmpFile, $filename, true);
+ } finally {
+ if (file_exists($tmpFile)) {
+ self::box('unlink', $tmpFile);
+ }
+ }
+ }
+
+ /**
+ * Appends content to an existing file.
+ *
+ * @param string|resource $content The content to append
+ *
+ * @throws IOException If the file is not writable
+ */
+ public function appendToFile(string $filename, $content)
+ {
+ if (\is_array($content)) {
+ throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be string or resource, array given.', __METHOD__));
+ }
+
+ $dir = \dirname($filename);
+
+ if (!is_dir($dir)) {
+ $this->mkdir($dir);
+ }
+
+ if (false === self::box('file_put_contents', $filename, $content, \FILE_APPEND)) {
+ throw new IOException(sprintf('Failed to write file "%s": ', $filename).self::$lastError, 0, null, $filename);
+ }
+ }
+
+ private function toIterable($files): iterable
+ {
+ return is_iterable($files) ? $files : [$files];
+ }
+
+ /**
+ * Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]).
+ */
+ private function getSchemeAndHierarchy(string $filename): array
+ {
+ $components = explode('://', $filename, 2);
+
+ return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]];
+ }
+
+ /**
+ * @param mixed ...$args
+ *
+ * @return mixed
+ */
+ private static function box(callable $func, ...$args)
+ {
+ self::$lastError = null;
+ set_error_handler(__CLASS__.'::handleError');
+ try {
+ $result = $func(...$args);
+ restore_error_handler();
+
+ return $result;
+ } catch (\Throwable $e) {
+ }
+ restore_error_handler();
+
+ throw $e;
+ }
+
+ /**
+ * @internal
+ */
+ public static function handleError(int $type, string $msg)
+ {
+ self::$lastError = $msg;
+ }
+}
diff --git a/vendor/symfony/filesystem/LICENSE b/vendor/symfony/filesystem/LICENSE
new file mode 100644
index 0000000..88bf75b
--- /dev/null
+++ b/vendor/symfony/filesystem/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/filesystem/README.md b/vendor/symfony/filesystem/README.md
new file mode 100644
index 0000000..f2f6d45
--- /dev/null
+++ b/vendor/symfony/filesystem/README.md
@@ -0,0 +1,13 @@
+Filesystem Component
+====================
+
+The Filesystem component provides basic utilities for the filesystem.
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/filesystem.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/vendor/symfony/filesystem/composer.json b/vendor/symfony/filesystem/composer.json
new file mode 100644
index 0000000..a6c17a1
--- /dev/null
+++ b/vendor/symfony/filesystem/composer.json
@@ -0,0 +1,30 @@
+{
+ "name": "symfony/filesystem",
+ "type": "library",
+ "description": "Provides basic utilities for the filesystem",
+ "keywords": [],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\Filesystem\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/vendor/symfony/finder/CHANGELOG.md b/vendor/symfony/finder/CHANGELOG.md
new file mode 100644
index 0000000..6a44e87
--- /dev/null
+++ b/vendor/symfony/finder/CHANGELOG.md
@@ -0,0 +1,87 @@
+CHANGELOG
+=========
+
+5.4.0
+-----
+
+ * Deprecate `Comparator::setTarget()` and `Comparator::setOperator()`
+ * Add a constructor to `Comparator` that allows setting target and operator
+ * Finder's iterator has now `Symfony\Component\Finder\SplFileInfo` inner type specified
+ * Add recursive .gitignore files support
+
+5.0.0
+-----
+
+ * added `$useNaturalSort` argument to `Finder::sortByName()`
+
+4.3.0
+-----
+
+ * added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore
+
+4.2.0
+-----
+
+ * added $useNaturalSort option to Finder::sortByName() method
+ * the `Finder::sortByName()` method will have a new `$useNaturalSort`
+ argument in version 5.0, not defining it is deprecated
+ * added `Finder::reverseSorting()` to reverse the sorting
+
+4.0.0
+-----
+
+ * removed `ExceptionInterface`
+ * removed `Symfony\Component\Finder\Iterator\FilterIterator`
+
+3.4.0
+-----
+
+ * deprecated `Symfony\Component\Finder\Iterator\FilterIterator`
+ * added Finder::hasResults() method to check if any results were found
+
+3.3.0
+-----
+
+ * added double-star matching to Glob::toRegex()
+
+3.0.0
+-----
+
+ * removed deprecated classes
+
+2.8.0
+-----
+
+ * deprecated adapters and related classes
+
+2.5.0
+-----
+ * added support for GLOB_BRACE in the paths passed to Finder::in()
+
+2.3.0
+-----
+
+ * added a way to ignore unreadable directories (via Finder::ignoreUnreadableDirs())
+ * unified the way subfolders that are not executable are handled by always throwing an AccessDeniedException exception
+
+2.2.0
+-----
+
+ * added Finder::path() and Finder::notPath() methods
+ * added finder adapters to improve performance on specific platforms
+ * added support for wildcard characters (glob patterns) in the paths passed
+ to Finder::in()
+
+2.1.0
+-----
+
+ * added Finder::sortByAccessedTime(), Finder::sortByChangedTime(), and
+ Finder::sortByModifiedTime()
+ * added Countable to Finder
+ * added support for an array of directories as an argument to
+ Finder::exclude()
+ * added searching based on the file content via Finder::contains() and
+ Finder::notContains()
+ * added support for the != operator in the Comparator
+ * [BC BREAK] filter expressions (used for file name and content) are no more
+ considered as regexps but glob patterns when they are enclosed in '*' or '?'
diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php
new file mode 100644
index 0000000..3af551f
--- /dev/null
+++ b/vendor/symfony/finder/Comparator/Comparator.php
@@ -0,0 +1,117 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Comparator;
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Comparator
+{
+ private $target;
+ private $operator = '==';
+
+ public function __construct(string $target = null, string $operator = '==')
+ {
+ if (null === $target) {
+ trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__);
+ }
+
+ $this->target = $target;
+ $this->doSetOperator($operator);
+ }
+
+ /**
+ * Gets the target value.
+ *
+ * @return string
+ */
+ public function getTarget()
+ {
+ if (null === $this->target) {
+ trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
+ }
+
+ return $this->target;
+ }
+
+ /**
+ * @deprecated set the target via the constructor instead
+ */
+ public function setTarget(string $target)
+ {
+ trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the target via the constructor instead.', __METHOD__);
+
+ $this->target = $target;
+ }
+
+ /**
+ * Gets the comparison operator.
+ *
+ * @return string
+ */
+ public function getOperator()
+ {
+ return $this->operator;
+ }
+
+ /**
+ * Sets the comparison operator.
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @deprecated set the operator via the constructor instead
+ */
+ public function setOperator(string $operator)
+ {
+ trigger_deprecation('symfony/finder', '5.4', '"%s" is deprecated. Set the operator via the constructor instead.', __METHOD__);
+
+ $this->doSetOperator('' === $operator ? '==' : $operator);
+ }
+
+ /**
+ * Tests against the target.
+ *
+ * @param mixed $test A test value
+ *
+ * @return bool
+ */
+ public function test($test)
+ {
+ if (null === $this->target) {
+ trigger_deprecation('symfony/finder', '5.4', 'Calling "%s" without initializing the target is deprecated.', __METHOD__);
+ }
+
+ switch ($this->operator) {
+ case '>':
+ return $test > $this->target;
+ case '>=':
+ return $test >= $this->target;
+ case '<':
+ return $test < $this->target;
+ case '<=':
+ return $test <= $this->target;
+ case '!=':
+ return $test != $this->target;
+ }
+
+ return $test == $this->target;
+ }
+
+ private function doSetOperator(string $operator): void
+ {
+ if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) {
+ throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator));
+ }
+
+ $this->operator = $operator;
+ }
+}
diff --git a/vendor/symfony/finder/Comparator/DateComparator.php b/vendor/symfony/finder/Comparator/DateComparator.php
new file mode 100644
index 0000000..8f651e1
--- /dev/null
+++ b/vendor/symfony/finder/Comparator/DateComparator.php
@@ -0,0 +1,50 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Comparator;
+
+/**
+ * DateCompare compiles date comparisons.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class DateComparator extends Comparator
+{
+ /**
+ * @param string $test A comparison string
+ *
+ * @throws \InvalidArgumentException If the test is not understood
+ */
+ public function __construct(string $test)
+ {
+ if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) {
+ throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test));
+ }
+
+ try {
+ $date = new \DateTime($matches[2]);
+ $target = $date->format('U');
+ } catch (\Exception $e) {
+ throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
+ }
+
+ $operator = $matches[1] ?? '==';
+ if ('since' === $operator || 'after' === $operator) {
+ $operator = '>';
+ }
+
+ if ('until' === $operator || 'before' === $operator) {
+ $operator = '<';
+ }
+
+ parent::__construct($target, $operator);
+ }
+}
diff --git a/vendor/symfony/finder/Comparator/NumberComparator.php b/vendor/symfony/finder/Comparator/NumberComparator.php
new file mode 100644
index 0000000..ff85d96
--- /dev/null
+++ b/vendor/symfony/finder/Comparator/NumberComparator.php
@@ -0,0 +1,78 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Comparator;
+
+/**
+ * NumberComparator compiles a simple comparison to an anonymous
+ * subroutine, which you can call with a value to be tested again.
+ *
+ * Now this would be very pointless, if NumberCompare didn't understand
+ * magnitudes.
+ *
+ * The target value may use magnitudes of kilobytes (k, ki),
+ * megabytes (m, mi), or gigabytes (g, gi). Those suffixed
+ * with an i use the appropriate 2**n version in accordance with the
+ * IEC standard: http://physics.nist.gov/cuu/Units/binary.html
+ *
+ * Based on the Perl Number::Compare module.
+ *
+ * @author Fabien Potencier <fabien@symfony.com> PHP port
+ * @author Richard Clamp <richardc@unixbeard.net> Perl version
+ * @copyright 2004-2005 Fabien Potencier <fabien@symfony.com>
+ * @copyright 2002 Richard Clamp <richardc@unixbeard.net>
+ *
+ * @see http://physics.nist.gov/cuu/Units/binary.html
+ */
+class NumberComparator extends Comparator
+{
+ /**
+ * @param string|int $test A comparison string or an integer
+ *
+ * @throws \InvalidArgumentException If the test is not understood
+ */
+ public function __construct(?string $test)
+ {
+ if (null === $test || !preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) {
+ throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test ?? 'null'));
+ }
+
+ $target = $matches[2];
+ if (!is_numeric($target)) {
+ throw new \InvalidArgumentException(sprintf('Invalid number "%s".', $target));
+ }
+ if (isset($matches[3])) {
+ // magnitude
+ switch (strtolower($matches[3])) {
+ case 'k':
+ $target *= 1000;
+ break;
+ case 'ki':
+ $target *= 1024;
+ break;
+ case 'm':
+ $target *= 1000000;
+ break;
+ case 'mi':
+ $target *= 1024 * 1024;
+ break;
+ case 'g':
+ $target *= 1000000000;
+ break;
+ case 'gi':
+ $target *= 1024 * 1024 * 1024;
+ break;
+ }
+ }
+
+ parent::__construct($target, $matches[1] ?: '==');
+ }
+}
diff --git a/vendor/symfony/finder/Exception/AccessDeniedException.php b/vendor/symfony/finder/Exception/AccessDeniedException.php
new file mode 100644
index 0000000..ee195ea
--- /dev/null
+++ b/vendor/symfony/finder/Exception/AccessDeniedException.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Exception;
+
+/**
+ * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
+ */
+class AccessDeniedException extends \UnexpectedValueException
+{
+}
diff --git a/vendor/symfony/debug/Exception/OutOfMemoryException.php b/vendor/symfony/finder/Exception/DirectoryNotFoundException.php
index fec1979..c6cc0f2 100644
--- a/vendor/symfony/debug/Exception/OutOfMemoryException.php
+++ b/vendor/symfony/finder/Exception/DirectoryNotFoundException.php
@@ -9,13 +9,11 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\Debug\Exception;
+namespace Symfony\Component\Finder\Exception;
/**
- * Out of memory exception.
- *
- * @author Nicolas Grekas <p@tchwork.com>
+ * @author Andreas Erhard <andreas.erhard@i-med.ac.at>
*/
-class OutOfMemoryException extends FatalErrorException
+class DirectoryNotFoundException extends \InvalidArgumentException
{
}
diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php
new file mode 100644
index 0000000..8cc564c
--- /dev/null
+++ b/vendor/symfony/finder/Finder.php
@@ -0,0 +1,806 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder;
+
+use Symfony\Component\Finder\Comparator\DateComparator;
+use Symfony\Component\Finder\Comparator\NumberComparator;
+use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
+use Symfony\Component\Finder\Iterator\CustomFilterIterator;
+use Symfony\Component\Finder\Iterator\DateRangeFilterIterator;
+use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator;
+use Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator;
+use Symfony\Component\Finder\Iterator\FilecontentFilterIterator;
+use Symfony\Component\Finder\Iterator\FilenameFilterIterator;
+use Symfony\Component\Finder\Iterator\LazyIterator;
+use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator;
+use Symfony\Component\Finder\Iterator\SortableIterator;
+
+/**
+ * Finder allows to build rules to find files and directories.
+ *
+ * It is a thin wrapper around several specialized iterator classes.
+ *
+ * All rules may be invoked several times.
+ *
+ * All methods return the current Finder object to allow chaining:
+ *
+ * $finder = Finder::create()->files()->name('*.php')->in(__DIR__);
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @implements \IteratorAggregate<string, SplFileInfo>
+ */
+class Finder implements \IteratorAggregate, \Countable
+{
+ public const IGNORE_VCS_FILES = 1;
+ public const IGNORE_DOT_FILES = 2;
+ public const IGNORE_VCS_IGNORED_FILES = 4;
+
+ private $mode = 0;
+ private $names = [];
+ private $notNames = [];
+ private $exclude = [];
+ private $filters = [];
+ private $depths = [];
+ private $sizes = [];
+ private $followLinks = false;
+ private $reverseSorting = false;
+ private $sort = false;
+ private $ignore = 0;
+ private $dirs = [];
+ private $dates = [];
+ private $iterators = [];
+ private $contains = [];
+ private $notContains = [];
+ private $paths = [];
+ private $notPaths = [];
+ private $ignoreUnreadableDirs = false;
+
+ private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'];
+
+ public function __construct()
+ {
+ $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
+ }
+
+ /**
+ * Creates a new Finder.
+ *
+ * @return static
+ */
+ public static function create()
+ {
+ return new static();
+ }
+
+ /**
+ * Restricts the matching to directories only.
+ *
+ * @return $this
+ */
+ public function directories()
+ {
+ $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES;
+
+ return $this;
+ }
+
+ /**
+ * Restricts the matching to files only.
+ *
+ * @return $this
+ */
+ public function files()
+ {
+ $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES;
+
+ return $this;
+ }
+
+ /**
+ * Adds tests for the directory depth.
+ *
+ * Usage:
+ *
+ * $finder->depth('> 1') // the Finder will start matching at level 1.
+ * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point.
+ * $finder->depth(['>= 1', '< 3'])
+ *
+ * @param string|int|string[]|int[] $levels The depth level expression or an array of depth levels
+ *
+ * @return $this
+ *
+ * @see DepthRangeFilterIterator
+ * @see NumberComparator
+ */
+ public function depth($levels)
+ {
+ foreach ((array) $levels as $level) {
+ $this->depths[] = new Comparator\NumberComparator($level);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds tests for file dates (last modified).
+ *
+ * The date must be something that strtotime() is able to parse:
+ *
+ * $finder->date('since yesterday');
+ * $finder->date('until 2 days ago');
+ * $finder->date('> now - 2 hours');
+ * $finder->date('>= 2005-10-15');
+ * $finder->date(['>= 2005-10-15', '<= 2006-05-27']);
+ *
+ * @param string|string[] $dates A date range string or an array of date ranges
+ *
+ * @return $this
+ *
+ * @see strtotime
+ * @see DateRangeFilterIterator
+ * @see DateComparator
+ */
+ public function date($dates)
+ {
+ foreach ((array) $dates as $date) {
+ $this->dates[] = new Comparator\DateComparator($date);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds rules that files must match.
+ *
+ * You can use patterns (delimited with / sign), globs or simple strings.
+ *
+ * $finder->name('*.php')
+ * $finder->name('/\.php$/') // same as above
+ * $finder->name('test.php')
+ * $finder->name(['test.py', 'test.php'])
+ *
+ * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
+ *
+ * @return $this
+ *
+ * @see FilenameFilterIterator
+ */
+ public function name($patterns)
+ {
+ $this->names = array_merge($this->names, (array) $patterns);
+
+ return $this;
+ }
+
+ /**
+ * Adds rules that files must not match.
+ *
+ * @param string|string[] $patterns A pattern (a regexp, a glob, or a string) or an array of patterns
+ *
+ * @return $this
+ *
+ * @see FilenameFilterIterator
+ */
+ public function notName($patterns)
+ {
+ $this->notNames = array_merge($this->notNames, (array) $patterns);
+
+ return $this;
+ }
+
+ /**
+ * Adds tests that file contents must match.
+ *
+ * Strings or PCRE patterns can be used:
+ *
+ * $finder->contains('Lorem ipsum')
+ * $finder->contains('/Lorem ipsum/i')
+ * $finder->contains(['dolor', '/ipsum/i'])
+ *
+ * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
+ *
+ * @return $this
+ *
+ * @see FilecontentFilterIterator
+ */
+ public function contains($patterns)
+ {
+ $this->contains = array_merge($this->contains, (array) $patterns);
+
+ return $this;
+ }
+
+ /**
+ * Adds tests that file contents must not match.
+ *
+ * Strings or PCRE patterns can be used:
+ *
+ * $finder->notContains('Lorem ipsum')
+ * $finder->notContains('/Lorem ipsum/i')
+ * $finder->notContains(['lorem', '/dolor/i'])
+ *
+ * @param string|string[] $patterns A pattern (string or regexp) or an array of patterns
+ *
+ * @return $this
+ *
+ * @see FilecontentFilterIterator
+ */
+ public function notContains($patterns)
+ {
+ $this->notContains = array_merge($this->notContains, (array) $patterns);
+
+ return $this;
+ }
+
+ /**
+ * Adds rules that filenames must match.
+ *
+ * You can use patterns (delimited with / sign) or simple strings.
+ *
+ * $finder->path('some/special/dir')
+ * $finder->path('/some\/special\/dir/') // same as above
+ * $finder->path(['some dir', 'another/dir'])
+ *
+ * Use only / as dirname separator.
+ *
+ * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
+ *
+ * @return $this
+ *
+ * @see FilenameFilterIterator
+ */
+ public function path($patterns)
+ {
+ $this->paths = array_merge($this->paths, (array) $patterns);
+
+ return $this;
+ }
+
+ /**
+ * Adds rules that filenames must not match.
+ *
+ * You can use patterns (delimited with / sign) or simple strings.
+ *
+ * $finder->notPath('some/special/dir')
+ * $finder->notPath('/some\/special\/dir/') // same as above
+ * $finder->notPath(['some/file.txt', 'another/file.log'])
+ *
+ * Use only / as dirname separator.
+ *
+ * @param string|string[] $patterns A pattern (a regexp or a string) or an array of patterns
+ *
+ * @return $this
+ *
+ * @see FilenameFilterIterator
+ */
+ public function notPath($patterns)
+ {
+ $this->notPaths = array_merge($this->notPaths, (array) $patterns);
+
+ return $this;
+ }
+
+ /**
+ * Adds tests for file sizes.
+ *
+ * $finder->size('> 10K');
+ * $finder->size('<= 1Ki');
+ * $finder->size(4);
+ * $finder->size(['> 10K', '< 20K'])
+ *
+ * @param string|int|string[]|int[] $sizes A size range string or an integer or an array of size ranges
+ *
+ * @return $this
+ *
+ * @see SizeRangeFilterIterator
+ * @see NumberComparator
+ */
+ public function size($sizes)
+ {
+ foreach ((array) $sizes as $size) {
+ $this->sizes[] = new Comparator\NumberComparator($size);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Excludes directories.
+ *
+ * Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
+ *
+ * $finder->in(__DIR__)->exclude('ruby');
+ *
+ * @param string|array $dirs A directory path or an array of directories
+ *
+ * @return $this
+ *
+ * @see ExcludeDirectoryFilterIterator
+ */
+ public function exclude($dirs)
+ {
+ $this->exclude = array_merge($this->exclude, (array) $dirs);
+
+ return $this;
+ }
+
+ /**
+ * Excludes "hidden" directories and files (starting with a dot).
+ *
+ * This option is enabled by default.
+ *
+ * @return $this
+ *
+ * @see ExcludeDirectoryFilterIterator
+ */
+ public function ignoreDotFiles(bool $ignoreDotFiles)
+ {
+ if ($ignoreDotFiles) {
+ $this->ignore |= static::IGNORE_DOT_FILES;
+ } else {
+ $this->ignore &= ~static::IGNORE_DOT_FILES;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Forces the finder to ignore version control directories.
+ *
+ * This option is enabled by default.
+ *
+ * @return $this
+ *
+ * @see ExcludeDirectoryFilterIterator
+ */
+ public function ignoreVCS(bool $ignoreVCS)
+ {
+ if ($ignoreVCS) {
+ $this->ignore |= static::IGNORE_VCS_FILES;
+ } else {
+ $this->ignore &= ~static::IGNORE_VCS_FILES;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Forces Finder to obey .gitignore and ignore files based on rules listed there.
+ *
+ * This option is disabled by default.
+ *
+ * @return $this
+ */
+ public function ignoreVCSIgnored(bool $ignoreVCSIgnored)
+ {
+ if ($ignoreVCSIgnored) {
+ $this->ignore |= static::IGNORE_VCS_IGNORED_FILES;
+ } else {
+ $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds VCS patterns.
+ *
+ * @see ignoreVCS()
+ *
+ * @param string|string[] $pattern VCS patterns to ignore
+ */
+ public static function addVCSPattern($pattern)
+ {
+ foreach ((array) $pattern as $p) {
+ self::$vcsPatterns[] = $p;
+ }
+
+ self::$vcsPatterns = array_unique(self::$vcsPatterns);
+ }
+
+ /**
+ * Sorts files and directories by an anonymous function.
+ *
+ * The anonymous function receives two \SplFileInfo instances to compare.
+ *
+ * This can be slow as all the matching files and directories must be retrieved for comparison.
+ *
+ * @return $this
+ *
+ * @see SortableIterator
+ */
+ public function sort(\Closure $closure)
+ {
+ $this->sort = $closure;
+
+ return $this;
+ }
+
+ /**
+ * Sorts files and directories by name.
+ *
+ * This can be slow as all the matching files and directories must be retrieved for comparison.
+ *
+ * @return $this
+ *
+ * @see SortableIterator
+ */
+ public function sortByName(bool $useNaturalSort = false)
+ {
+ $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME;
+
+ return $this;
+ }
+
+ /**
+ * Sorts files and directories by type (directories before files), then by name.
+ *
+ * This can be slow as all the matching files and directories must be retrieved for comparison.
+ *
+ * @return $this
+ *
+ * @see SortableIterator
+ */
+ public function sortByType()
+ {
+ $this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
+
+ return $this;
+ }
+
+ /**
+ * Sorts files and directories by the last accessed time.
+ *
+ * This is the time that the file was last accessed, read or written to.
+ *
+ * This can be slow as all the matching files and directories must be retrieved for comparison.
+ *
+ * @return $this
+ *
+ * @see SortableIterator
+ */
+ public function sortByAccessedTime()
+ {
+ $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
+
+ return $this;
+ }
+
+ /**
+ * Reverses the sorting.
+ *
+ * @return $this
+ */
+ public function reverseSorting()
+ {
+ $this->reverseSorting = true;
+
+ return $this;
+ }
+
+ /**
+ * Sorts files and directories by the last inode changed time.
+ *
+ * This is the time that the inode information was last modified (permissions, owner, group or other metadata).
+ *
+ * On Windows, since inode is not available, changed time is actually the file creation time.
+ *
+ * This can be slow as all the matching files and directories must be retrieved for comparison.
+ *
+ * @return $this
+ *
+ * @see SortableIterator
+ */
+ public function sortByChangedTime()
+ {
+ $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
+
+ return $this;
+ }
+
+ /**
+ * Sorts files and directories by the last modified time.
+ *
+ * This is the last time the actual contents of the file were last modified.
+ *
+ * This can be slow as all the matching files and directories must be retrieved for comparison.
+ *
+ * @return $this
+ *
+ * @see SortableIterator
+ */
+ public function sortByModifiedTime()
+ {
+ $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
+
+ return $this;
+ }
+
+ /**
+ * Filters the iterator with an anonymous function.
+ *
+ * The anonymous function receives a \SplFileInfo and must return false
+ * to remove files.
+ *
+ * @return $this
+ *
+ * @see CustomFilterIterator
+ */
+ public function filter(\Closure $closure)
+ {
+ $this->filters[] = $closure;
+
+ return $this;
+ }
+
+ /**
+ * Forces the following of symlinks.
+ *
+ * @return $this
+ */
+ public function followLinks()
+ {
+ $this->followLinks = true;
+
+ return $this;
+ }
+
+ /**
+ * Tells finder to ignore unreadable directories.
+ *
+ * By default, scanning unreadable directories content throws an AccessDeniedException.
+ *
+ * @return $this
+ */
+ public function ignoreUnreadableDirs(bool $ignore = true)
+ {
+ $this->ignoreUnreadableDirs = $ignore;
+
+ return $this;
+ }
+
+ /**
+ * Searches files and directories which match defined rules.
+ *
+ * @param string|string[] $dirs A directory path or an array of directories
+ *
+ * @return $this
+ *
+ * @throws DirectoryNotFoundException if one of the directories does not exist
+ */
+ public function in($dirs)
+ {
+ $resolvedDirs = [];
+
+ foreach ((array) $dirs as $dir) {
+ if (is_dir($dir)) {
+ $resolvedDirs[] = [$this->normalizeDir($dir)];
+ } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
+ sort($glob);
+ $resolvedDirs[] = array_map([$this, 'normalizeDir'], $glob);
+ } else {
+ throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
+ }
+ }
+
+ $this->dirs = array_merge($this->dirs, ...$resolvedDirs);
+
+ return $this;
+ }
+
+ /**
+ * Returns an Iterator for the current Finder configuration.
+ *
+ * This method implements the IteratorAggregate interface.
+ *
+ * @return \Iterator<string, SplFileInfo>
+ *
+ * @throws \LogicException if the in() method has not been called
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator()
+ {
+ if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
+ throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
+ }
+
+ if (1 === \count($this->dirs) && 0 === \count($this->iterators)) {
+ $iterator = $this->searchInDirectory($this->dirs[0]);
+
+ if ($this->sort || $this->reverseSorting) {
+ $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
+ }
+
+ return $iterator;
+ }
+
+ $iterator = new \AppendIterator();
+ foreach ($this->dirs as $dir) {
+ $iterator->append(new \IteratorIterator(new LazyIterator(function () use ($dir) {
+ return $this->searchInDirectory($dir);
+ })));
+ }
+
+ foreach ($this->iterators as $it) {
+ $iterator->append($it);
+ }
+
+ if ($this->sort || $this->reverseSorting) {
+ $iterator = (new Iterator\SortableIterator($iterator, $this->sort, $this->reverseSorting))->getIterator();
+ }
+
+ return $iterator;
+ }
+
+ /**
+ * Appends an existing set of files/directories to the finder.
+ *
+ * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
+ *
+ * @return $this
+ *
+ * @throws \InvalidArgumentException when the given argument is not iterable
+ */
+ public function append(iterable $iterator)
+ {
+ if ($iterator instanceof \IteratorAggregate) {
+ $this->iterators[] = $iterator->getIterator();
+ } elseif ($iterator instanceof \Iterator) {
+ $this->iterators[] = $iterator;
+ } elseif (is_iterable($iterator)) {
+ $it = new \ArrayIterator();
+ foreach ($iterator as $file) {
+ $file = $file instanceof \SplFileInfo ? $file : new \SplFileInfo($file);
+ $it[$file->getPathname()] = $file;
+ }
+ $this->iterators[] = $it;
+ } else {
+ throw new \InvalidArgumentException('Finder::append() method wrong argument type.');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Check if any results were found.
+ *
+ * @return bool
+ */
+ public function hasResults()
+ {
+ foreach ($this->getIterator() as $_) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Counts all the results collected by the iterators.
+ *
+ * @return int
+ */
+ #[\ReturnTypeWillChange]
+ public function count()
+ {
+ return iterator_count($this->getIterator());
+ }
+
+ private function searchInDirectory(string $dir): \Iterator
+ {
+ $exclude = $this->exclude;
+ $notPaths = $this->notPaths;
+
+ if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) {
+ $exclude = array_merge($exclude, self::$vcsPatterns);
+ }
+
+ if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) {
+ $notPaths[] = '#(^|/)\..+(/|$)#';
+ }
+
+ $minDepth = 0;
+ $maxDepth = \PHP_INT_MAX;
+
+ foreach ($this->depths as $comparator) {
+ switch ($comparator->getOperator()) {
+ case '>':
+ $minDepth = $comparator->getTarget() + 1;
+ break;
+ case '>=':
+ $minDepth = $comparator->getTarget();
+ break;
+ case '<':
+ $maxDepth = $comparator->getTarget() - 1;
+ break;
+ case '<=':
+ $maxDepth = $comparator->getTarget();
+ break;
+ default:
+ $minDepth = $maxDepth = $comparator->getTarget();
+ }
+ }
+
+ $flags = \RecursiveDirectoryIterator::SKIP_DOTS;
+
+ if ($this->followLinks) {
+ $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS;
+ }
+
+ $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs);
+
+ if ($exclude) {
+ $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude);
+ }
+
+ $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST);
+
+ if ($minDepth > 0 || $maxDepth < \PHP_INT_MAX) {
+ $iterator = new Iterator\DepthRangeFilterIterator($iterator, $minDepth, $maxDepth);
+ }
+
+ if ($this->mode) {
+ $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode);
+ }
+
+ if ($this->names || $this->notNames) {
+ $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames);
+ }
+
+ if ($this->contains || $this->notContains) {
+ $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains);
+ }
+
+ if ($this->sizes) {
+ $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes);
+ }
+
+ if ($this->dates) {
+ $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates);
+ }
+
+ if ($this->filters) {
+ $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters);
+ }
+
+ if ($this->paths || $notPaths) {
+ $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths);
+ }
+
+ if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) {
+ $iterator = new Iterator\VcsIgnoredFilterIterator($iterator, $dir);
+ }
+
+ return $iterator;
+ }
+
+ /**
+ * Normalizes given directory names by removing trailing slashes.
+ *
+ * Excluding: (s)ftp:// or ssh2.(s)ftp:// wrapper
+ */
+ private function normalizeDir(string $dir): string
+ {
+ if ('/' === $dir) {
+ return $dir;
+ }
+
+ $dir = rtrim($dir, '/'.\DIRECTORY_SEPARATOR);
+
+ if (preg_match('#^(ssh2\.)?s?ftp://#', $dir)) {
+ $dir .= '/';
+ }
+
+ return $dir;
+ }
+}
diff --git a/vendor/symfony/finder/Gitignore.php b/vendor/symfony/finder/Gitignore.php
new file mode 100644
index 0000000..d42cca1
--- /dev/null
+++ b/vendor/symfony/finder/Gitignore.php
@@ -0,0 +1,93 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder;
+
+/**
+ * Gitignore matches against text.
+ *
+ * @author Michael Voříšek <vorismi3@fel.cvut.cz>
+ * @author Ahmed Abdou <mail@ahmd.io>
+ */
+class Gitignore
+{
+ /**
+ * Returns a regexp which is the equivalent of the gitignore pattern.
+ *
+ * Format specification: https://git-scm.com/docs/gitignore#_pattern_format
+ */
+ public static function toRegex(string $gitignoreFileContent): string
+ {
+ return self::buildRegex($gitignoreFileContent, false);
+ }
+
+ public static function toRegexMatchingNegatedPatterns(string $gitignoreFileContent): string
+ {
+ return self::buildRegex($gitignoreFileContent, true);
+ }
+
+ private static function buildRegex(string $gitignoreFileContent, bool $inverted): string
+ {
+ $gitignoreFileContent = preg_replace('~(?<!\\\\)#[^\n\r]*~', '', $gitignoreFileContent);
+ $gitignoreLines = preg_split('~\r\n?|\n~', $gitignoreFileContent);
+
+ $res = self::lineToRegex('');
+ foreach ($gitignoreLines as $line) {
+ $line = preg_replace('~(?<!\\\\)[ \t]+$~', '', $line);
+
+ if ('!' === substr($line, 0, 1)) {
+ $line = substr($line, 1);
+ $isNegative = true;
+ } else {
+ $isNegative = false;
+ }
+
+ if ('' !== $line) {
+ if ($isNegative xor $inverted) {
+ $res = '(?!'.self::lineToRegex($line).'$)'.$res;
+ } else {
+ $res = '(?:'.$res.'|'.self::lineToRegex($line).')';
+ }
+ }
+ }
+
+ return '~^(?:'.$res.')~s';
+ }
+
+ private static function lineToRegex(string $gitignoreLine): string
+ {
+ if ('' === $gitignoreLine) {
+ return '$f'; // always false
+ }
+
+ $slashPos = strpos($gitignoreLine, '/');
+ if (false !== $slashPos && \strlen($gitignoreLine) - 1 !== $slashPos) {
+ if (0 === $slashPos) {
+ $gitignoreLine = substr($gitignoreLine, 1);
+ }
+ $isAbsolute = true;
+ } else {
+ $isAbsolute = false;
+ }
+
+ $regex = preg_quote(str_replace('\\', '', $gitignoreLine), '~');
+ $regex = preg_replace_callback('~\\\\\[((?:\\\\!)?)([^\[\]]*)\\\\\]~', function (array $matches): string {
+ return '['.('' !== $matches[1] ? '^' : '').str_replace('\\-', '-', $matches[2]).']';
+ }, $regex);
+ $regex = preg_replace('~(?:(?:\\\\\*){2,}(/?))+~', '(?:(?:(?!//).(?<!//))+$1)?', $regex);
+ $regex = preg_replace('~\\\\\*~', '[^/]*', $regex);
+ $regex = preg_replace('~\\\\\?~', '[^/]', $regex);
+
+ return ($isAbsolute ? '' : '(?:[^/]+/)*')
+ .$regex
+ .(!str_ends_with($gitignoreLine, '/') ? '(?:$|/)' : '');
+ }
+}
diff --git a/vendor/symfony/finder/Glob.php b/vendor/symfony/finder/Glob.php
new file mode 100644
index 0000000..8447932
--- /dev/null
+++ b/vendor/symfony/finder/Glob.php
@@ -0,0 +1,111 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder;
+
+/**
+ * Glob matches globbing patterns against text.
+ *
+ * if match_glob("foo.*", "foo.bar") echo "matched\n";
+ *
+ * // prints foo.bar and foo.baz
+ * $regex = glob_to_regex("foo.*");
+ * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t)
+ * {
+ * if (/$regex/) echo "matched: $car\n";
+ * }
+ *
+ * Glob implements glob(3) style matching that can be used to match
+ * against text, rather than fetching names from a filesystem.
+ *
+ * Based on the Perl Text::Glob module.
+ *
+ * @author Fabien Potencier <fabien@symfony.com> PHP port
+ * @author Richard Clamp <richardc@unixbeard.net> Perl version
+ * @copyright 2004-2005 Fabien Potencier <fabien@symfony.com>
+ * @copyright 2002 Richard Clamp <richardc@unixbeard.net>
+ */
+class Glob
+{
+ /**
+ * Returns a regexp which is the equivalent of the glob pattern.
+ *
+ * @return string
+ */
+ public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#')
+ {
+ $firstByte = true;
+ $escaping = false;
+ $inCurlies = 0;
+ $regex = '';
+ $sizeGlob = \strlen($glob);
+ for ($i = 0; $i < $sizeGlob; ++$i) {
+ $car = $glob[$i];
+ if ($firstByte && $strictLeadingDot && '.' !== $car) {
+ $regex .= '(?=[^\.])';
+ }
+
+ $firstByte = '/' === $car;
+
+ if ($firstByte && $strictWildcardSlash && isset($glob[$i + 2]) && '**' === $glob[$i + 1].$glob[$i + 2] && (!isset($glob[$i + 3]) || '/' === $glob[$i + 3])) {
+ $car = '[^/]++/';
+ if (!isset($glob[$i + 3])) {
+ $car .= '?';
+ }
+
+ if ($strictLeadingDot) {
+ $car = '(?=[^\.])'.$car;
+ }
+
+ $car = '/(?:'.$car.')*';
+ $i += 2 + isset($glob[$i + 3]);
+
+ if ('/' === $delimiter) {
+ $car = str_replace('/', '\\/', $car);
+ }
+ }
+
+ if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
+ $regex .= "\\$car";
+ } elseif ('*' === $car) {
+ $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*');
+ } elseif ('?' === $car) {
+ $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.');
+ } elseif ('{' === $car) {
+ $regex .= $escaping ? '\\{' : '(';
+ if (!$escaping) {
+ ++$inCurlies;
+ }
+ } elseif ('}' === $car && $inCurlies) {
+ $regex .= $escaping ? '}' : ')';
+ if (!$escaping) {
+ --$inCurlies;
+ }
+ } elseif (',' === $car && $inCurlies) {
+ $regex .= $escaping ? ',' : '|';
+ } elseif ('\\' === $car) {
+ if ($escaping) {
+ $regex .= '\\\\';
+ $escaping = false;
+ } else {
+ $escaping = true;
+ }
+
+ continue;
+ } else {
+ $regex .= $car;
+ }
+ $escaping = false;
+ }
+
+ return $delimiter.'^'.$regex.'$'.$delimiter;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Iterator/CustomFilterIterator.php
new file mode 100644
index 0000000..f7bf19b
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/CustomFilterIterator.php
@@ -0,0 +1,64 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * CustomFilterIterator filters files by applying anonymous functions.
+ *
+ * The anonymous function receives a \SplFileInfo and must return false
+ * to remove files.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @extends \FilterIterator<string, \SplFileInfo>
+ */
+class CustomFilterIterator extends \FilterIterator
+{
+ private $filters = [];
+
+ /**
+ * @param \Iterator<string, \SplFileInfo> $iterator The Iterator to filter
+ * @param callable[] $filters An array of PHP callbacks
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct(\Iterator $iterator, array $filters)
+ {
+ foreach ($filters as $filter) {
+ if (!\is_callable($filter)) {
+ throw new \InvalidArgumentException('Invalid PHP callback.');
+ }
+ }
+ $this->filters = $filters;
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ $fileinfo = $this->current();
+
+ foreach ($this->filters as $filter) {
+ if (false === $filter($fileinfo)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
new file mode 100644
index 0000000..f592e19
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php
@@ -0,0 +1,61 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+use Symfony\Component\Finder\Comparator\DateComparator;
+
+/**
+ * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates).
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @extends \FilterIterator<string, \SplFileInfo>
+ */
+class DateRangeFilterIterator extends \FilterIterator
+{
+ private $comparators = [];
+
+ /**
+ * @param \Iterator<string, \SplFileInfo> $iterator
+ * @param DateComparator[] $comparators
+ */
+ public function __construct(\Iterator $iterator, array $comparators)
+ {
+ $this->comparators = $comparators;
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ $fileinfo = $this->current();
+
+ if (!file_exists($fileinfo->getPathname())) {
+ return false;
+ }
+
+ $filedate = $fileinfo->getMTime();
+ foreach ($this->comparators as $compare) {
+ if (!$compare->test($filedate)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
new file mode 100644
index 0000000..f593a3f
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php
@@ -0,0 +1,51 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * DepthRangeFilterIterator limits the directory depth.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @template-covariant TKey
+ * @template-covariant TValue
+ *
+ * @extends \FilterIterator<TKey, TValue>
+ */
+class DepthRangeFilterIterator extends \FilterIterator
+{
+ private $minDepth = 0;
+
+ /**
+ * @param \RecursiveIteratorIterator<\RecursiveIterator<TKey, TValue>> $iterator The Iterator to filter
+ * @param int $minDepth The min depth
+ * @param int $maxDepth The max depth
+ */
+ public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = \PHP_INT_MAX)
+ {
+ $this->minDepth = $minDepth;
+ $iterator->setMaxDepth(\PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ return $this->getInnerIterator()->getDepth() >= $this->minDepth;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
new file mode 100644
index 0000000..d9e182c
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * ExcludeDirectoryFilterIterator filters out directories.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @extends \FilterIterator<string, \SplFileInfo>
+ * @implements \RecursiveIterator<string, \SplFileInfo>
+ */
+class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator
+{
+ private $iterator;
+ private $isRecursive;
+ private $excludedDirs = [];
+ private $excludedPattern;
+
+ /**
+ * @param \Iterator $iterator The Iterator to filter
+ * @param string[] $directories An array of directories to exclude
+ */
+ public function __construct(\Iterator $iterator, array $directories)
+ {
+ $this->iterator = $iterator;
+ $this->isRecursive = $iterator instanceof \RecursiveIterator;
+ $patterns = [];
+ foreach ($directories as $directory) {
+ $directory = rtrim($directory, '/');
+ if (!$this->isRecursive || str_contains($directory, '/')) {
+ $patterns[] = preg_quote($directory, '#');
+ } else {
+ $this->excludedDirs[$directory] = true;
+ }
+ }
+ if ($patterns) {
+ $this->excludedPattern = '#(?:^|/)(?:'.implode('|', $patterns).')(?:/|$)#';
+ }
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
+ return false;
+ }
+
+ if ($this->excludedPattern) {
+ $path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
+ $path = str_replace('\\', '/', $path);
+
+ return !preg_match($this->excludedPattern, $path);
+ }
+
+ return true;
+ }
+
+ /**
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function hasChildren()
+ {
+ return $this->isRecursive && $this->iterator->hasChildren();
+ }
+
+ /**
+ * @return self
+ */
+ #[\ReturnTypeWillChange]
+ public function getChildren()
+ {
+ $children = new self($this->iterator->getChildren(), []);
+ $children->excludedDirs = $this->excludedDirs;
+ $children->excludedPattern = $this->excludedPattern;
+
+ return $children;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
new file mode 100644
index 0000000..793ae35
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php
@@ -0,0 +1,56 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * FileTypeFilterIterator only keeps files, directories, or both.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @extends \FilterIterator<string, \SplFileInfo>
+ */
+class FileTypeFilterIterator extends \FilterIterator
+{
+ public const ONLY_FILES = 1;
+ public const ONLY_DIRECTORIES = 2;
+
+ private $mode;
+
+ /**
+ * @param \Iterator $iterator The Iterator to filter
+ * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
+ */
+ public function __construct(\Iterator $iterator, int $mode)
+ {
+ $this->mode = $mode;
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ $fileinfo = $this->current();
+ if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
+ return false;
+ } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php b/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
new file mode 100644
index 0000000..79f8c29
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php
@@ -0,0 +1,61 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings).
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Włodzimierz Gajda <gajdaw@gajdaw.pl>
+ *
+ * @extends MultiplePcreFilterIterator<string, \SplFileInfo>
+ */
+class FilecontentFilterIterator extends MultiplePcreFilterIterator
+{
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ if (!$this->matchRegexps && !$this->noMatchRegexps) {
+ return true;
+ }
+
+ $fileinfo = $this->current();
+
+ if ($fileinfo->isDir() || !$fileinfo->isReadable()) {
+ return false;
+ }
+
+ $content = $fileinfo->getContents();
+ if (!$content) {
+ return false;
+ }
+
+ return $this->isAccepted($content);
+ }
+
+ /**
+ * Converts string to regexp if necessary.
+ *
+ * @param string $str Pattern: string or regexp
+ *
+ * @return string
+ */
+ protected function toRegex(string $str)
+ {
+ return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/FilenameFilterIterator.php b/vendor/symfony/finder/Iterator/FilenameFilterIterator.php
new file mode 100644
index 0000000..77b3b24
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/FilenameFilterIterator.php
@@ -0,0 +1,50 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+use Symfony\Component\Finder\Glob;
+
+/**
+ * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @extends MultiplePcreFilterIterator<string, \SplFileInfo>
+ */
+class FilenameFilterIterator extends MultiplePcreFilterIterator
+{
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ return $this->isAccepted($this->current()->getFilename());
+ }
+
+ /**
+ * Converts glob to regexp.
+ *
+ * PCRE patterns are left unchanged.
+ * Glob strings are transformed with Glob::toRegex().
+ *
+ * @param string $str Pattern: glob or regexp
+ *
+ * @return string
+ */
+ protected function toRegex(string $str)
+ {
+ return $this->isRegex($str) ? $str : Glob::toRegex($str);
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/LazyIterator.php b/vendor/symfony/finder/Iterator/LazyIterator.php
new file mode 100644
index 0000000..32cc37f
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/LazyIterator.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * @author Jérémy Derussé <jeremy@derusse.com>
+ *
+ * @internal
+ */
+class LazyIterator implements \IteratorAggregate
+{
+ private $iteratorFactory;
+
+ public function __construct(callable $iteratorFactory)
+ {
+ $this->iteratorFactory = $iteratorFactory;
+ }
+
+ public function getIterator(): \Traversable
+ {
+ yield from ($this->iteratorFactory)();
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
new file mode 100644
index 0000000..564765d
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php
@@ -0,0 +1,117 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings).
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @template-covariant TKey
+ * @template-covariant TValue
+ *
+ * @extends \FilterIterator<TKey, TValue>
+ */
+abstract class MultiplePcreFilterIterator extends \FilterIterator
+{
+ protected $matchRegexps = [];
+ protected $noMatchRegexps = [];
+
+ /**
+ * @param \Iterator $iterator The Iterator to filter
+ * @param string[] $matchPatterns An array of patterns that need to match
+ * @param string[] $noMatchPatterns An array of patterns that need to not match
+ */
+ public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
+ {
+ foreach ($matchPatterns as $pattern) {
+ $this->matchRegexps[] = $this->toRegex($pattern);
+ }
+
+ foreach ($noMatchPatterns as $pattern) {
+ $this->noMatchRegexps[] = $this->toRegex($pattern);
+ }
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Checks whether the string is accepted by the regex filters.
+ *
+ * If there is no regexps defined in the class, this method will accept the string.
+ * Such case can be handled by child classes before calling the method if they want to
+ * apply a different behavior.
+ *
+ * @return bool
+ */
+ protected function isAccepted(string $string)
+ {
+ // should at least not match one rule to exclude
+ foreach ($this->noMatchRegexps as $regex) {
+ if (preg_match($regex, $string)) {
+ return false;
+ }
+ }
+
+ // should at least match one rule
+ if ($this->matchRegexps) {
+ foreach ($this->matchRegexps as $regex) {
+ if (preg_match($regex, $string)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // If there is no match rules, the file is accepted
+ return true;
+ }
+
+ /**
+ * Checks whether the string is a regex.
+ *
+ * @return bool
+ */
+ protected function isRegex(string $str)
+ {
+ $availableModifiers = 'imsxuADU';
+
+ if (\PHP_VERSION_ID >= 80200) {
+ $availableModifiers .= 'n';
+ }
+
+ if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) {
+ $start = substr($m[1], 0, 1);
+ $end = substr($m[1], -1);
+
+ if ($start === $end) {
+ return !preg_match('/[*?[:alnum:] \\\\]/', $start);
+ }
+
+ foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) {
+ if ($start === $delimiters[0] && $end === $delimiters[1]) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Converts string into regexp.
+ *
+ * @return string
+ */
+ abstract protected function toRegex(string $str);
+}
diff --git a/vendor/symfony/finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Iterator/PathFilterIterator.php
new file mode 100644
index 0000000..7974c4e
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/PathFilterIterator.php
@@ -0,0 +1,59 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * PathFilterIterator filters files by path patterns (e.g. some/special/dir).
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Włodzimierz Gajda <gajdaw@gajdaw.pl>
+ *
+ * @extends MultiplePcreFilterIterator<string, \SplFileInfo>
+ */
+class PathFilterIterator extends MultiplePcreFilterIterator
+{
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ $filename = $this->current()->getRelativePathname();
+
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $filename = str_replace('\\', '/', $filename);
+ }
+
+ return $this->isAccepted($filename);
+ }
+
+ /**
+ * Converts strings to regexp.
+ *
+ * PCRE patterns are left unchanged.
+ *
+ * Default conversion:
+ * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/'
+ *
+ * Use only / as directory separator (on Windows also).
+ *
+ * @param string $str Pattern: regexp or dirname
+ *
+ * @return string
+ */
+ protected function toRegex(string $str)
+ {
+ return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
new file mode 100644
index 0000000..27589cd
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php
@@ -0,0 +1,168 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+use Symfony\Component\Finder\Exception\AccessDeniedException;
+use Symfony\Component\Finder\SplFileInfo;
+
+/**
+ * Extends the \RecursiveDirectoryIterator to support relative paths.
+ *
+ * @author Victor Berchet <victor@suumit.com>
+ */
+class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
+{
+ /**
+ * @var bool
+ */
+ private $ignoreUnreadableDirs;
+
+ /**
+ * @var bool
+ */
+ private $rewindable;
+
+ // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations
+ private $rootPath;
+ private $subPath;
+ private $directorySeparator = '/';
+
+ /**
+ * @throws \RuntimeException
+ */
+ public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
+ {
+ if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
+ throw new \RuntimeException('This iterator only support returning current as fileinfo.');
+ }
+
+ parent::__construct($path, $flags);
+ $this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
+ $this->rootPath = $path;
+ if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
+ $this->directorySeparator = \DIRECTORY_SEPARATOR;
+ }
+ }
+
+ /**
+ * Return an instance of SplFileInfo with support for relative paths.
+ *
+ * @return SplFileInfo
+ */
+ #[\ReturnTypeWillChange]
+ public function current()
+ {
+ // the logic here avoids redoing the same work in all iterations
+
+ if (null === $subPathname = $this->subPath) {
+ $subPathname = $this->subPath = $this->getSubPath();
+ }
+ if ('' !== $subPathname) {
+ $subPathname .= $this->directorySeparator;
+ }
+ $subPathname .= $this->getFilename();
+
+ if ('/' !== $basePath = $this->rootPath) {
+ $basePath .= $this->directorySeparator;
+ }
+
+ return new SplFileInfo($basePath.$subPathname, $this->subPath, $subPathname);
+ }
+
+ /**
+ * @param bool $allowLinks
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function hasChildren($allowLinks = false)
+ {
+ $hasChildren = parent::hasChildren($allowLinks);
+
+ if (!$hasChildren || !$this->ignoreUnreadableDirs) {
+ return $hasChildren;
+ }
+
+ try {
+ parent::getChildren();
+
+ return true;
+ } catch (\UnexpectedValueException $e) {
+ // If directory is unreadable and finder is set to ignore it, skip children
+ return false;
+ }
+ }
+
+ /**
+ * @return \RecursiveDirectoryIterator
+ *
+ * @throws AccessDeniedException
+ */
+ #[\ReturnTypeWillChange]
+ public function getChildren()
+ {
+ try {
+ $children = parent::getChildren();
+
+ if ($children instanceof self) {
+ // parent method will call the constructor with default arguments, so unreadable dirs won't be ignored anymore
+ $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs;
+
+ // performance optimization to avoid redoing the same work in all children
+ $children->rewindable = &$this->rewindable;
+ $children->rootPath = $this->rootPath;
+ }
+
+ return $children;
+ } catch (\UnexpectedValueException $e) {
+ throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e);
+ }
+ }
+
+ /**
+ * Do nothing for non rewindable stream.
+ *
+ * @return void
+ */
+ #[\ReturnTypeWillChange]
+ public function rewind()
+ {
+ if (false === $this->isRewindable()) {
+ return;
+ }
+
+ parent::rewind();
+ }
+
+ /**
+ * Checks if the stream is rewindable.
+ *
+ * @return bool
+ */
+ public function isRewindable()
+ {
+ if (null !== $this->rewindable) {
+ return $this->rewindable;
+ }
+
+ if (false !== $stream = @opendir($this->getPath())) {
+ $infos = stream_get_meta_data($stream);
+ closedir($stream);
+
+ if ($infos['seekable']) {
+ return $this->rewindable = true;
+ }
+ }
+
+ return $this->rewindable = false;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
new file mode 100644
index 0000000..575bf29
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php
@@ -0,0 +1,60 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+use Symfony\Component\Finder\Comparator\NumberComparator;
+
+/**
+ * SizeRangeFilterIterator filters out files that are not in the given size range.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @extends \FilterIterator<string, \SplFileInfo>
+ */
+class SizeRangeFilterIterator extends \FilterIterator
+{
+ private $comparators = [];
+
+ /**
+ * @param \Iterator<string, \SplFileInfo> $iterator
+ * @param NumberComparator[] $comparators
+ */
+ public function __construct(\Iterator $iterator, array $comparators)
+ {
+ $this->comparators = $comparators;
+
+ parent::__construct($iterator);
+ }
+
+ /**
+ * Filters the iterator values.
+ *
+ * @return bool
+ */
+ #[\ReturnTypeWillChange]
+ public function accept()
+ {
+ $fileinfo = $this->current();
+ if (!$fileinfo->isFile()) {
+ return true;
+ }
+
+ $filesize = $fileinfo->getSize();
+ foreach ($this->comparators as $compare) {
+ if (!$compare->test($filesize)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Iterator/SortableIterator.php
new file mode 100644
index 0000000..9afde5c
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/SortableIterator.php
@@ -0,0 +1,104 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+/**
+ * SortableIterator applies a sort on a given Iterator.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @implements \IteratorAggregate<string, \SplFileInfo>
+ */
+class SortableIterator implements \IteratorAggregate
+{
+ public const SORT_BY_NONE = 0;
+ public const SORT_BY_NAME = 1;
+ public const SORT_BY_TYPE = 2;
+ public const SORT_BY_ACCESSED_TIME = 3;
+ public const SORT_BY_CHANGED_TIME = 4;
+ public const SORT_BY_MODIFIED_TIME = 5;
+ public const SORT_BY_NAME_NATURAL = 6;
+
+ private $iterator;
+ private $sort;
+
+ /**
+ * @param \Traversable<string, \SplFileInfo> $iterator
+ * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct(\Traversable $iterator, $sort, bool $reverseOrder = false)
+ {
+ $this->iterator = $iterator;
+ $order = $reverseOrder ? -1 : 1;
+
+ if (self::SORT_BY_NAME === $sort) {
+ $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
+ return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
+ };
+ } elseif (self::SORT_BY_NAME_NATURAL === $sort) {
+ $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
+ return $order * strnatcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
+ };
+ } elseif (self::SORT_BY_TYPE === $sort) {
+ $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
+ if ($a->isDir() && $b->isFile()) {
+ return -$order;
+ } elseif ($a->isFile() && $b->isDir()) {
+ return $order;
+ }
+
+ return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname());
+ };
+ } elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
+ $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
+ return $order * ($a->getATime() - $b->getATime());
+ };
+ } elseif (self::SORT_BY_CHANGED_TIME === $sort) {
+ $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
+ return $order * ($a->getCTime() - $b->getCTime());
+ };
+ } elseif (self::SORT_BY_MODIFIED_TIME === $sort) {
+ $this->sort = static function (\SplFileInfo $a, \SplFileInfo $b) use ($order) {
+ return $order * ($a->getMTime() - $b->getMTime());
+ };
+ } elseif (self::SORT_BY_NONE === $sort) {
+ $this->sort = $order;
+ } elseif (\is_callable($sort)) {
+ $this->sort = $reverseOrder ? static function (\SplFileInfo $a, \SplFileInfo $b) use ($sort) { return -$sort($a, $b); } : $sort;
+ } else {
+ throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
+ }
+ }
+
+ /**
+ * @return \Traversable<string, \SplFileInfo>
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator()
+ {
+ if (1 === $this->sort) {
+ return $this->iterator;
+ }
+
+ $array = iterator_to_array($this->iterator, true);
+
+ if (-1 === $this->sort) {
+ $array = array_reverse($array);
+ } else {
+ uasort($array, $this->sort);
+ }
+
+ return new \ArrayIterator($array);
+ }
+}
diff --git a/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php b/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php
new file mode 100644
index 0000000..e27158c
--- /dev/null
+++ b/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php
@@ -0,0 +1,151 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder\Iterator;
+
+use Symfony\Component\Finder\Gitignore;
+
+final class VcsIgnoredFilterIterator extends \FilterIterator
+{
+ /**
+ * @var string
+ */
+ private $baseDir;
+
+ /**
+ * @var array<string, array{0: string, 1: string}|null>
+ */
+ private $gitignoreFilesCache = [];
+
+ /**
+ * @var array<string, bool>
+ */
+ private $ignoredPathsCache = [];
+
+ public function __construct(\Iterator $iterator, string $baseDir)
+ {
+ $this->baseDir = $this->normalizePath($baseDir);
+
+ parent::__construct($iterator);
+ }
+
+ public function accept(): bool
+ {
+ $file = $this->current();
+
+ $fileRealPath = $this->normalizePath($file->getRealPath());
+
+ return !$this->isIgnored($fileRealPath);
+ }
+
+ private function isIgnored(string $fileRealPath): bool
+ {
+ if (is_dir($fileRealPath) && !str_ends_with($fileRealPath, '/')) {
+ $fileRealPath .= '/';
+ }
+
+ if (isset($this->ignoredPathsCache[$fileRealPath])) {
+ return $this->ignoredPathsCache[$fileRealPath];
+ }
+
+ $ignored = false;
+
+ foreach ($this->parentsDirectoryDownward($fileRealPath) as $parentDirectory) {
+ if ($this->isIgnored($parentDirectory)) {
+ // rules in ignored directories are ignored, no need to check further.
+ break;
+ }
+
+ $fileRelativePath = substr($fileRealPath, \strlen($parentDirectory) + 1);
+
+ if (null === $regexps = $this->readGitignoreFile("{$parentDirectory}/.gitignore")) {
+ continue;
+ }
+
+ [$exclusionRegex, $inclusionRegex] = $regexps;
+
+ if (preg_match($exclusionRegex, $fileRelativePath)) {
+ $ignored = true;
+
+ continue;
+ }
+
+ if (preg_match($inclusionRegex, $fileRelativePath)) {
+ $ignored = false;
+ }
+ }
+
+ return $this->ignoredPathsCache[$fileRealPath] = $ignored;
+ }
+
+ /**
+ * @return list<string>
+ */
+ private function parentsDirectoryDownward(string $fileRealPath): array
+ {
+ $parentDirectories = [];
+
+ $parentDirectory = $fileRealPath;
+
+ while (true) {
+ $newParentDirectory = \dirname($parentDirectory);
+
+ // dirname('/') = '/'
+ if ($newParentDirectory === $parentDirectory) {
+ break;
+ }
+
+ $parentDirectory = $newParentDirectory;
+
+ if (0 !== strpos($parentDirectory, $this->baseDir)) {
+ break;
+ }
+
+ $parentDirectories[] = $parentDirectory;
+ }
+
+ return array_reverse($parentDirectories);
+ }
+
+ /**
+ * @return array{0: string, 1: string}|null
+ */
+ private function readGitignoreFile(string $path): ?array
+ {
+ if (\array_key_exists($path, $this->gitignoreFilesCache)) {
+ return $this->gitignoreFilesCache[$path];
+ }
+
+ if (!file_exists($path)) {
+ return $this->gitignoreFilesCache[$path] = null;
+ }
+
+ if (!is_file($path) || !is_readable($path)) {
+ throw new \RuntimeException("The \"ignoreVCSIgnored\" option cannot be used by the Finder as the \"{$path}\" file is not readable.");
+ }
+
+ $gitignoreFileContent = file_get_contents($path);
+
+ return $this->gitignoreFilesCache[$path] = [
+ Gitignore::toRegex($gitignoreFileContent),
+ Gitignore::toRegexMatchingNegatedPatterns($gitignoreFileContent),
+ ];
+ }
+
+ private function normalizePath(string $path): string
+ {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ return str_replace('\\', '/', $path);
+ }
+
+ return $path;
+ }
+}
diff --git a/vendor/symfony/finder/LICENSE b/vendor/symfony/finder/LICENSE
new file mode 100644
index 0000000..88bf75b
--- /dev/null
+++ b/vendor/symfony/finder/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/finder/README.md b/vendor/symfony/finder/README.md
new file mode 100644
index 0000000..22bdeb9
--- /dev/null
+++ b/vendor/symfony/finder/README.md
@@ -0,0 +1,14 @@
+Finder Component
+================
+
+The Finder component finds files and directories via an intuitive fluent
+interface.
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/finder.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/vendor/symfony/finder/SplFileInfo.php b/vendor/symfony/finder/SplFileInfo.php
new file mode 100644
index 0000000..11604a2
--- /dev/null
+++ b/vendor/symfony/finder/SplFileInfo.php
@@ -0,0 +1,88 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Finder;
+
+/**
+ * Extends \SplFileInfo to support relative paths.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class SplFileInfo extends \SplFileInfo
+{
+ private $relativePath;
+ private $relativePathname;
+
+ /**
+ * @param string $file The file name
+ * @param string $relativePath The relative path
+ * @param string $relativePathname The relative path name
+ */
+ public function __construct(string $file, string $relativePath, string $relativePathname)
+ {
+ parent::__construct($file);
+ $this->relativePath = $relativePath;
+ $this->relativePathname = $relativePathname;
+ }
+
+ /**
+ * Returns the relative path.
+ *
+ * This path does not contain the file name.
+ *
+ * @return string
+ */
+ public function getRelativePath()
+ {
+ return $this->relativePath;
+ }
+
+ /**
+ * Returns the relative path name.
+ *
+ * This path contains the file name.
+ *
+ * @return string
+ */
+ public function getRelativePathname()
+ {
+ return $this->relativePathname;
+ }
+
+ public function getFilenameWithoutExtension(): string
+ {
+ $filename = $this->getFilename();
+
+ return pathinfo($filename, \PATHINFO_FILENAME);
+ }
+
+ /**
+ * Returns the contents of the file.
+ *
+ * @return string
+ *
+ * @throws \RuntimeException
+ */
+ public function getContents()
+ {
+ set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
+ try {
+ $content = file_get_contents($this->getPathname());
+ } finally {
+ restore_error_handler();
+ }
+ if (false === $content) {
+ throw new \RuntimeException($error);
+ }
+
+ return $content;
+ }
+}
diff --git a/vendor/symfony/finder/composer.json b/vendor/symfony/finder/composer.json
new file mode 100644
index 0000000..ef19911
--- /dev/null
+++ b/vendor/symfony/finder/composer.json
@@ -0,0 +1,30 @@
+{
+ "name": "symfony/finder",
+ "type": "library",
+ "description": "Finds files and directories via an intuitive fluent interface",
+ "keywords": [],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\Finder\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/vendor/symfony/options-resolver/CHANGELOG.md b/vendor/symfony/options-resolver/CHANGELOG.md
new file mode 100644
index 0000000..84c4594
--- /dev/null
+++ b/vendor/symfony/options-resolver/CHANGELOG.md
@@ -0,0 +1,81 @@
+CHANGELOG
+=========
+
+5.3
+---
+
+ * Add prototype definition for nested options
+
+5.1.0
+-----
+
+ * added fluent configuration of options using `OptionResolver::define()`
+ * added `setInfo()` and `getInfo()` methods
+ * updated the signature of method `OptionsResolver::setDeprecated()` to `OptionsResolver::setDeprecation(string $option, string $package, string $version, $message)`
+ * deprecated `OptionsResolverIntrospector::getDeprecationMessage()`, use `OptionsResolverIntrospector::getDeprecation()` instead
+
+5.0.0
+-----
+
+ * added argument `$triggerDeprecation` to `OptionsResolver::offsetGet()`
+
+4.3.0
+-----
+
+ * added `OptionsResolver::addNormalizer` method
+
+4.2.0
+-----
+
+ * added support for nested options definition
+ * added `setDeprecated` and `isDeprecated` methods
+
+3.4.0
+-----
+
+ * added `OptionsResolverIntrospector` to inspect options definitions inside an `OptionsResolver` instance
+ * added array of types support in allowed types (e.g int[])
+
+2.6.0
+-----
+
+ * deprecated OptionsResolverInterface
+ * [BC BREAK] removed "array" type hint from OptionsResolverInterface methods
+ setRequired(), setAllowedValues(), addAllowedValues(), setAllowedTypes() and
+ addAllowedTypes()
+ * added OptionsResolver::setDefault()
+ * added OptionsResolver::hasDefault()
+ * added OptionsResolver::setNormalizer()
+ * added OptionsResolver::isRequired()
+ * added OptionsResolver::getRequiredOptions()
+ * added OptionsResolver::isMissing()
+ * added OptionsResolver::getMissingOptions()
+ * added OptionsResolver::setDefined()
+ * added OptionsResolver::isDefined()
+ * added OptionsResolver::getDefinedOptions()
+ * added OptionsResolver::remove()
+ * added OptionsResolver::clear()
+ * deprecated OptionsResolver::replaceDefaults()
+ * deprecated OptionsResolver::setOptional() in favor of setDefined()
+ * deprecated OptionsResolver::isKnown() in favor of isDefined()
+ * [BC BREAK] OptionsResolver::isRequired() returns true now if a required
+ option has a default value set
+ * [BC BREAK] merged Options into OptionsResolver and turned Options into an
+ interface
+ * deprecated Options::overload() (now in OptionsResolver)
+ * deprecated Options::set() (now in OptionsResolver)
+ * deprecated Options::get() (now in OptionsResolver)
+ * deprecated Options::has() (now in OptionsResolver)
+ * deprecated Options::replace() (now in OptionsResolver)
+ * [BC BREAK] Options::get() (now in OptionsResolver) can only be used within
+ lazy option/normalizer closures now
+ * [BC BREAK] removed Traversable interface from Options since using within
+ lazy option/normalizer closures resulted in exceptions
+ * [BC BREAK] removed Options::all() since using within lazy option/normalizer
+ closures resulted in exceptions
+ * [BC BREAK] OptionDefinitionException now extends LogicException instead of
+ RuntimeException
+ * [BC BREAK] normalizers are not executed anymore for unset options
+ * normalizers are executed after validating the options now
+ * [BC BREAK] an UndefinedOptionsException is now thrown instead of an
+ InvalidOptionsException when non-existing options are passed
diff --git a/vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php b/vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php
new file mode 100644
index 0000000..95909f3
--- /dev/null
+++ b/vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php
@@ -0,0 +1,120 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Debug;
+
+use Symfony\Component\OptionsResolver\Exception\NoConfigurationException;
+use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException;
+use Symfony\Component\OptionsResolver\OptionsResolver;
+
+/**
+ * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
+ *
+ * @final
+ */
+class OptionsResolverIntrospector
+{
+ private $get;
+
+ public function __construct(OptionsResolver $optionsResolver)
+ {
+ $this->get = \Closure::bind(function ($property, $option, $message) {
+ /** @var OptionsResolver $this */
+ if (!$this->isDefined($option)) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist.', $option));
+ }
+
+ if (!\array_key_exists($option, $this->{$property})) {
+ throw new NoConfigurationException($message);
+ }
+
+ return $this->{$property}[$option];
+ }, $optionsResolver, $optionsResolver);
+ }
+
+ /**
+ * @return mixed
+ *
+ * @throws NoConfigurationException on no configured value
+ */
+ public function getDefault(string $option)
+ {
+ return ($this->get)('defaults', $option, sprintf('No default value was set for the "%s" option.', $option));
+ }
+
+ /**
+ * @return \Closure[]
+ *
+ * @throws NoConfigurationException on no configured closures
+ */
+ public function getLazyClosures(string $option): array
+ {
+ return ($this->get)('lazy', $option, sprintf('No lazy closures were set for the "%s" option.', $option));
+ }
+
+ /**
+ * @return string[]
+ *
+ * @throws NoConfigurationException on no configured types
+ */
+ public function getAllowedTypes(string $option): array
+ {
+ return ($this->get)('allowedTypes', $option, sprintf('No allowed types were set for the "%s" option.', $option));
+ }
+
+ /**
+ * @return mixed[]
+ *
+ * @throws NoConfigurationException on no configured values
+ */
+ public function getAllowedValues(string $option): array
+ {
+ return ($this->get)('allowedValues', $option, sprintf('No allowed values were set for the "%s" option.', $option));
+ }
+
+ /**
+ * @throws NoConfigurationException on no configured normalizer
+ */
+ public function getNormalizer(string $option): \Closure
+ {
+ return current($this->getNormalizers($option));
+ }
+
+ /**
+ * @throws NoConfigurationException when no normalizer is configured
+ */
+ public function getNormalizers(string $option): array
+ {
+ return ($this->get)('normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option));
+ }
+
+ /**
+ * @return string|\Closure
+ *
+ * @throws NoConfigurationException on no configured deprecation
+ *
+ * @deprecated since Symfony 5.1, use "getDeprecation()" instead.
+ */
+ public function getDeprecationMessage(string $option)
+ {
+ trigger_deprecation('symfony/options-resolver', '5.1', 'The "%s()" method is deprecated, use "getDeprecation()" instead.', __METHOD__);
+
+ return $this->getDeprecation($option)['message'];
+ }
+
+ /**
+ * @throws NoConfigurationException on no configured deprecation
+ */
+ public function getDeprecation(string $option): array
+ {
+ return ($this->get)('deprecated', $option, sprintf('No deprecation was set for the "%s" option.', $option));
+ }
+}
diff --git a/vendor/symfony/options-resolver/Exception/AccessException.php b/vendor/symfony/options-resolver/Exception/AccessException.php
new file mode 100644
index 0000000..c12b680
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/AccessException.php
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when trying to read an option outside of or write it inside of
+ * {@link \Symfony\Component\OptionsResolver\Options::resolve()}.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class AccessException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/ExceptionInterface.php b/vendor/symfony/options-resolver/Exception/ExceptionInterface.php
new file mode 100644
index 0000000..ea99d05
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/ExceptionInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Marker interface for all exceptions thrown by the OptionsResolver component.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+interface ExceptionInterface extends \Throwable
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php b/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..6d421d6
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/InvalidArgumentException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when an argument is invalid.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php b/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php
new file mode 100644
index 0000000..6fd4f12
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when the value of an option does not match its validation rules.
+ *
+ * You should make sure a valid value is passed to the option.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class InvalidOptionsException extends InvalidArgumentException
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/MissingOptionsException.php b/vendor/symfony/options-resolver/Exception/MissingOptionsException.php
new file mode 100644
index 0000000..faa487f
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/MissingOptionsException.php
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Exception thrown when a required option is missing.
+ *
+ * Add the option to the passed options array.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class MissingOptionsException extends InvalidArgumentException
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/NoConfigurationException.php b/vendor/symfony/options-resolver/Exception/NoConfigurationException.php
new file mode 100644
index 0000000..6693ec1
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/NoConfigurationException.php
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
+
+/**
+ * Thrown when trying to introspect an option definition property
+ * for which no value was configured inside the OptionsResolver instance.
+ *
+ * @see OptionsResolverIntrospector
+ *
+ * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
+ */
+class NoConfigurationException extends \RuntimeException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php b/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php
new file mode 100644
index 0000000..4c3280f
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when trying to read an option that has no value set.
+ *
+ * When accessing optional options from within a lazy option or normalizer you should first
+ * check whether the optional option is set. You can do this with `isset($options['optional'])`.
+ * In contrast to the {@link UndefinedOptionsException}, this is a runtime exception that can
+ * occur when evaluating lazy options.
+ *
+ * @author Tobias Schultze <http://tobion.de>
+ */
+class NoSuchOptionException extends \OutOfBoundsException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php b/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php
new file mode 100644
index 0000000..e8e339d
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/OptionDefinitionException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when two lazy options have a cyclic dependency.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class OptionDefinitionException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php b/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php
new file mode 100644
index 0000000..6ca3fce
--- /dev/null
+++ b/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php
@@ -0,0 +1,24 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Exception thrown when an undefined option is passed.
+ *
+ * You should remove the options in question from your code or define them
+ * beforehand.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class UndefinedOptionsException extends InvalidArgumentException
+{
+}
diff --git a/vendor/symfony/options-resolver/LICENSE b/vendor/symfony/options-resolver/LICENSE
new file mode 100644
index 0000000..88bf75b
--- /dev/null
+++ b/vendor/symfony/options-resolver/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/options-resolver/OptionConfigurator.php b/vendor/symfony/options-resolver/OptionConfigurator.php
new file mode 100644
index 0000000..62f03d0
--- /dev/null
+++ b/vendor/symfony/options-resolver/OptionConfigurator.php
@@ -0,0 +1,139 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver;
+
+use Symfony\Component\OptionsResolver\Exception\AccessException;
+
+final class OptionConfigurator
+{
+ private $name;
+ private $resolver;
+
+ public function __construct(string $name, OptionsResolver $resolver)
+ {
+ $this->name = $name;
+ $this->resolver = $resolver;
+ $this->resolver->setDefined($name);
+ }
+
+ /**
+ * Adds allowed types for this option.
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function allowedTypes(string ...$types): self
+ {
+ $this->resolver->setAllowedTypes($this->name, $types);
+
+ return $this;
+ }
+
+ /**
+ * Sets allowed values for this option.
+ *
+ * @param mixed ...$values One or more acceptable values/closures
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function allowedValues(...$values): self
+ {
+ $this->resolver->setAllowedValues($this->name, $values);
+
+ return $this;
+ }
+
+ /**
+ * Sets the default value for this option.
+ *
+ * @param mixed $value The default value of the option
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function default($value): self
+ {
+ $this->resolver->setDefault($this->name, $value);
+
+ return $this;
+ }
+
+ /**
+ * Defines an option configurator with the given name.
+ */
+ public function define(string $option): self
+ {
+ return $this->resolver->define($option);
+ }
+
+ /**
+ * Marks this option as deprecated.
+ *
+ * @param string $package The name of the composer package that is triggering the deprecation
+ * @param string $version The version of the package that introduced the deprecation
+ * @param string|\Closure $message The deprecation message to use
+ *
+ * @return $this
+ */
+ public function deprecated(string $package, string $version, $message = 'The option "%name%" is deprecated.'): self
+ {
+ $this->resolver->setDeprecated($this->name, $package, $version, $message);
+
+ return $this;
+ }
+
+ /**
+ * Sets the normalizer for this option.
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function normalize(\Closure $normalizer): self
+ {
+ $this->resolver->setNormalizer($this->name, $normalizer);
+
+ return $this;
+ }
+
+ /**
+ * Marks this option as required.
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function required(): self
+ {
+ $this->resolver->setRequired($this->name);
+
+ return $this;
+ }
+
+ /**
+ * Sets an info message for an option.
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function info(string $info): self
+ {
+ $this->resolver->setInfo($this->name, $info);
+
+ return $this;
+ }
+}
diff --git a/vendor/symfony/options-resolver/Options.php b/vendor/symfony/options-resolver/Options.php
new file mode 100644
index 0000000..d444ec4
--- /dev/null
+++ b/vendor/symfony/options-resolver/Options.php
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver;
+
+/**
+ * Contains resolved option values.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ * @author Tobias Schultze <http://tobion.de>
+ */
+interface Options extends \ArrayAccess, \Countable
+{
+}
diff --git a/vendor/symfony/options-resolver/OptionsResolver.php b/vendor/symfony/options-resolver/OptionsResolver.php
new file mode 100644
index 0000000..be80a9a
--- /dev/null
+++ b/vendor/symfony/options-resolver/OptionsResolver.php
@@ -0,0 +1,1347 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver;
+
+use Symfony\Component\OptionsResolver\Exception\AccessException;
+use Symfony\Component\OptionsResolver\Exception\InvalidArgumentException;
+use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
+use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
+use Symfony\Component\OptionsResolver\Exception\NoSuchOptionException;
+use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException;
+use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException;
+
+/**
+ * Validates options and merges them with default values.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ * @author Tobias Schultze <http://tobion.de>
+ */
+class OptionsResolver implements Options
+{
+ private const VALIDATION_FUNCTIONS = [
+ 'bool' => 'is_bool',
+ 'boolean' => 'is_bool',
+ 'int' => 'is_int',
+ 'integer' => 'is_int',
+ 'long' => 'is_int',
+ 'float' => 'is_float',
+ 'double' => 'is_float',
+ 'real' => 'is_float',
+ 'numeric' => 'is_numeric',
+ 'string' => 'is_string',
+ 'scalar' => 'is_scalar',
+ 'array' => 'is_array',
+ 'iterable' => 'is_iterable',
+ 'countable' => 'is_countable',
+ 'callable' => 'is_callable',
+ 'object' => 'is_object',
+ 'resource' => 'is_resource',
+ ];
+
+ /**
+ * The names of all defined options.
+ */
+ private $defined = [];
+
+ /**
+ * The default option values.
+ */
+ private $defaults = [];
+
+ /**
+ * A list of closure for nested options.
+ *
+ * @var \Closure[][]
+ */
+ private $nested = [];
+
+ /**
+ * The names of required options.
+ */
+ private $required = [];
+
+ /**
+ * The resolved option values.
+ */
+ private $resolved = [];
+
+ /**
+ * A list of normalizer closures.
+ *
+ * @var \Closure[][]
+ */
+ private $normalizers = [];
+
+ /**
+ * A list of accepted values for each option.
+ */
+ private $allowedValues = [];
+
+ /**
+ * A list of accepted types for each option.
+ */
+ private $allowedTypes = [];
+
+ /**
+ * A list of info messages for each option.
+ */
+ private $info = [];
+
+ /**
+ * A list of closures for evaluating lazy options.
+ */
+ private $lazy = [];
+
+ /**
+ * A list of lazy options whose closure is currently being called.
+ *
+ * This list helps detecting circular dependencies between lazy options.
+ */
+ private $calling = [];
+
+ /**
+ * A list of deprecated options.
+ */
+ private $deprecated = [];
+
+ /**
+ * The list of options provided by the user.
+ */
+ private $given = [];
+
+ /**
+ * Whether the instance is locked for reading.
+ *
+ * Once locked, the options cannot be changed anymore. This is
+ * necessary in order to avoid inconsistencies during the resolving
+ * process. If any option is changed after being read, all evaluated
+ * lazy options that depend on this option would become invalid.
+ */
+ private $locked = false;
+
+ private $parentsOptions = [];
+
+ /**
+ * Whether the whole options definition is marked as array prototype.
+ */
+ private $prototype;
+
+ /**
+ * The prototype array's index that is being read.
+ */
+ private $prototypeIndex;
+
+ /**
+ * Sets the default value of a given option.
+ *
+ * If the default value should be set based on other options, you can pass
+ * a closure with the following signature:
+ *
+ * function (Options $options) {
+ * // ...
+ * }
+ *
+ * The closure will be evaluated when {@link resolve()} is called. The
+ * closure has access to the resolved values of other options through the
+ * passed {@link Options} instance:
+ *
+ * function (Options $options) {
+ * if (isset($options['port'])) {
+ * // ...
+ * }
+ * }
+ *
+ * If you want to access the previously set default value, add a second
+ * argument to the closure's signature:
+ *
+ * $options->setDefault('name', 'Default Name');
+ *
+ * $options->setDefault('name', function (Options $options, $previousValue) {
+ * // 'Default Name' === $previousValue
+ * });
+ *
+ * This is mostly useful if the configuration of the {@link Options} object
+ * is spread across different locations of your code, such as base and
+ * sub-classes.
+ *
+ * If you want to define nested options, you can pass a closure with the
+ * following signature:
+ *
+ * $options->setDefault('database', function (OptionsResolver $resolver) {
+ * $resolver->setDefined(['dbname', 'host', 'port', 'user', 'pass']);
+ * }
+ *
+ * To get access to the parent options, add a second argument to the closure's
+ * signature:
+ *
+ * function (OptionsResolver $resolver, Options $parent) {
+ * // 'default' === $parent['connection']
+ * }
+ *
+ * @param string $option The name of the option
+ * @param mixed $value The default value of the option
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setDefault(string $option, $value)
+ {
+ // Setting is not possible once resolving starts, because then lazy
+ // options could manipulate the state of the object, leading to
+ // inconsistent results.
+ if ($this->locked) {
+ throw new AccessException('Default values cannot be set from a lazy option or normalizer.');
+ }
+
+ // If an option is a closure that should be evaluated lazily, store it
+ // in the "lazy" property.
+ if ($value instanceof \Closure) {
+ $reflClosure = new \ReflectionFunction($value);
+ $params = $reflClosure->getParameters();
+
+ if (isset($params[0]) && Options::class === $this->getParameterClassName($params[0])) {
+ // Initialize the option if no previous value exists
+ if (!isset($this->defaults[$option])) {
+ $this->defaults[$option] = null;
+ }
+
+ // Ignore previous lazy options if the closure has no second parameter
+ if (!isset($this->lazy[$option]) || !isset($params[1])) {
+ $this->lazy[$option] = [];
+ }
+
+ // Store closure for later evaluation
+ $this->lazy[$option][] = $value;
+ $this->defined[$option] = true;
+
+ // Make sure the option is processed and is not nested anymore
+ unset($this->resolved[$option], $this->nested[$option]);
+
+ return $this;
+ }
+
+ if (isset($params[0]) && null !== ($type = $params[0]->getType()) && self::class === $type->getName() && (!isset($params[1]) || (($type = $params[1]->getType()) instanceof \ReflectionNamedType && Options::class === $type->getName()))) {
+ // Store closure for later evaluation
+ $this->nested[$option][] = $value;
+ $this->defaults[$option] = [];
+ $this->defined[$option] = true;
+
+ // Make sure the option is processed and is not lazy anymore
+ unset($this->resolved[$option], $this->lazy[$option]);
+
+ return $this;
+ }
+ }
+
+ // This option is not lazy nor nested anymore
+ unset($this->lazy[$option], $this->nested[$option]);
+
+ // Yet undefined options can be marked as resolved, because we only need
+ // to resolve options with lazy closures, normalizers or validation
+ // rules, none of which can exist for undefined options
+ // If the option was resolved before, update the resolved value
+ if (!isset($this->defined[$option]) || \array_key_exists($option, $this->resolved)) {
+ $this->resolved[$option] = $value;
+ }
+
+ $this->defaults[$option] = $value;
+ $this->defined[$option] = true;
+
+ return $this;
+ }
+
+ /**
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setDefaults(array $defaults)
+ {
+ foreach ($defaults as $option => $value) {
+ $this->setDefault($option, $value);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns whether a default value is set for an option.
+ *
+ * Returns true if {@link setDefault()} was called for this option.
+ * An option is also considered set if it was set to null.
+ *
+ * @return bool
+ */
+ public function hasDefault(string $option)
+ {
+ return \array_key_exists($option, $this->defaults);
+ }
+
+ /**
+ * Marks one or more options as required.
+ *
+ * @param string|string[] $optionNames One or more option names
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setRequired($optionNames)
+ {
+ if ($this->locked) {
+ throw new AccessException('Options cannot be made required from a lazy option or normalizer.');
+ }
+
+ foreach ((array) $optionNames as $option) {
+ $this->defined[$option] = true;
+ $this->required[$option] = true;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns whether an option is required.
+ *
+ * An option is required if it was passed to {@link setRequired()}.
+ *
+ * @return bool
+ */
+ public function isRequired(string $option)
+ {
+ return isset($this->required[$option]);
+ }
+
+ /**
+ * Returns the names of all required options.
+ *
+ * @return string[]
+ *
+ * @see isRequired()
+ */
+ public function getRequiredOptions()
+ {
+ return array_keys($this->required);
+ }
+
+ /**
+ * Returns whether an option is missing a default value.
+ *
+ * An option is missing if it was passed to {@link setRequired()}, but not
+ * to {@link setDefault()}. This option must be passed explicitly to
+ * {@link resolve()}, otherwise an exception will be thrown.
+ *
+ * @return bool
+ */
+ public function isMissing(string $option)
+ {
+ return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults);
+ }
+
+ /**
+ * Returns the names of all options missing a default value.
+ *
+ * @return string[]
+ */
+ public function getMissingOptions()
+ {
+ return array_keys(array_diff_key($this->required, $this->defaults));
+ }
+
+ /**
+ * Defines a valid option name.
+ *
+ * Defines an option name without setting a default value. The option will
+ * be accepted when passed to {@link resolve()}. When not passed, the
+ * option will not be included in the resolved options.
+ *
+ * @param string|string[] $optionNames One or more option names
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setDefined($optionNames)
+ {
+ if ($this->locked) {
+ throw new AccessException('Options cannot be defined from a lazy option or normalizer.');
+ }
+
+ foreach ((array) $optionNames as $option) {
+ $this->defined[$option] = true;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns whether an option is defined.
+ *
+ * Returns true for any option passed to {@link setDefault()},
+ * {@link setRequired()} or {@link setDefined()}.
+ *
+ * @return bool
+ */
+ public function isDefined(string $option)
+ {
+ return isset($this->defined[$option]);
+ }
+
+ /**
+ * Returns the names of all defined options.
+ *
+ * @return string[]
+ *
+ * @see isDefined()
+ */
+ public function getDefinedOptions()
+ {
+ return array_keys($this->defined);
+ }
+
+ public function isNested(string $option): bool
+ {
+ return isset($this->nested[$option]);
+ }
+
+ /**
+ * Deprecates an option, allowed types or values.
+ *
+ * Instead of passing the message, you may also pass a closure with the
+ * following signature:
+ *
+ * function (Options $options, $value): string {
+ * // ...
+ * }
+ *
+ * The closure receives the value as argument and should return a string.
+ * Return an empty string to ignore the option deprecation.
+ *
+ * The closure is invoked when {@link resolve()} is called. The parameter
+ * passed to the closure is the value of the option after validating it
+ * and before normalizing it.
+ *
+ * @param string $package The name of the composer package that is triggering the deprecation
+ * @param string $version The version of the package that introduced the deprecation
+ * @param string|\Closure $message The deprecation message to use
+ *
+ * @return $this
+ */
+ public function setDeprecated(string $option/*, string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self
+ {
+ if ($this->locked) {
+ throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist, defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ $args = \func_get_args();
+
+ if (\func_num_args() < 3) {
+ trigger_deprecation('symfony/options-resolver', '5.1', 'The signature of method "%s()" requires 2 new arguments: "string $package, string $version", not defining them is deprecated.', __METHOD__);
+
+ $message = $args[1] ?? 'The option "%name%" is deprecated.';
+ $package = $version = '';
+ } else {
+ $package = $args[1];
+ $version = $args[2];
+ $message = $args[3] ?? 'The option "%name%" is deprecated.';
+ }
+
+ if (!\is_string($message) && !$message instanceof \Closure) {
+ throw new InvalidArgumentException(sprintf('Invalid type for deprecation message argument, expected string or \Closure, but got "%s".', get_debug_type($message)));
+ }
+
+ // ignore if empty string
+ if ('' === $message) {
+ return $this;
+ }
+
+ $this->deprecated[$option] = [
+ 'package' => $package,
+ 'version' => $version,
+ 'message' => $message,
+ ];
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ public function isDeprecated(string $option): bool
+ {
+ return isset($this->deprecated[$option]);
+ }
+
+ /**
+ * Sets the normalizer for an option.
+ *
+ * The normalizer should be a closure with the following signature:
+ *
+ * function (Options $options, $value) {
+ * // ...
+ * }
+ *
+ * The closure is invoked when {@link resolve()} is called. The closure
+ * has access to the resolved values of other options through the passed
+ * {@link Options} instance.
+ *
+ * The second parameter passed to the closure is the value of
+ * the option.
+ *
+ * The resolved option value is set to the return value of the closure.
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setNormalizer(string $option, \Closure $normalizer)
+ {
+ if ($this->locked) {
+ throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ $this->normalizers[$option] = [$normalizer];
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ /**
+ * Adds a normalizer for an option.
+ *
+ * The normalizer should be a closure with the following signature:
+ *
+ * function (Options $options, $value): mixed {
+ * // ...
+ * }
+ *
+ * The closure is invoked when {@link resolve()} is called. The closure
+ * has access to the resolved values of other options through the passed
+ * {@link Options} instance.
+ *
+ * The second parameter passed to the closure is the value of
+ * the option.
+ *
+ * The resolved option value is set to the return value of the closure.
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function addNormalizer(string $option, \Closure $normalizer, bool $forcePrepend = false): self
+ {
+ if ($this->locked) {
+ throw new AccessException('Normalizers cannot be set from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ if ($forcePrepend) {
+ $this->normalizers[$option] = $this->normalizers[$option] ?? [];
+ array_unshift($this->normalizers[$option], $normalizer);
+ } else {
+ $this->normalizers[$option][] = $normalizer;
+ }
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ /**
+ * Sets allowed values for an option.
+ *
+ * Instead of passing values, you may also pass a closures with the
+ * following signature:
+ *
+ * function ($value) {
+ * // return true or false
+ * }
+ *
+ * The closure receives the value as argument and should return true to
+ * accept the value and false to reject the value.
+ *
+ * @param string $option The option name
+ * @param mixed $allowedValues One or more acceptable values/closures
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setAllowedValues(string $option, $allowedValues)
+ {
+ if ($this->locked) {
+ throw new AccessException('Allowed values cannot be set from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ $this->allowedValues[$option] = \is_array($allowedValues) ? $allowedValues : [$allowedValues];
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ /**
+ * Adds allowed values for an option.
+ *
+ * The values are merged with the allowed values defined previously.
+ *
+ * Instead of passing values, you may also pass a closures with the
+ * following signature:
+ *
+ * function ($value) {
+ * // return true or false
+ * }
+ *
+ * The closure receives the value as argument and should return true to
+ * accept the value and false to reject the value.
+ *
+ * @param string $option The option name
+ * @param mixed $allowedValues One or more acceptable values/closures
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function addAllowedValues(string $option, $allowedValues)
+ {
+ if ($this->locked) {
+ throw new AccessException('Allowed values cannot be added from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ if (!\is_array($allowedValues)) {
+ $allowedValues = [$allowedValues];
+ }
+
+ if (!isset($this->allowedValues[$option])) {
+ $this->allowedValues[$option] = $allowedValues;
+ } else {
+ $this->allowedValues[$option] = array_merge($this->allowedValues[$option], $allowedValues);
+ }
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ /**
+ * Sets allowed types for an option.
+ *
+ * Any type for which a corresponding is_<type>() function exists is
+ * acceptable. Additionally, fully-qualified class or interface names may
+ * be passed.
+ *
+ * @param string|string[] $allowedTypes One or more accepted types
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setAllowedTypes(string $option, $allowedTypes)
+ {
+ if ($this->locked) {
+ throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ $this->allowedTypes[$option] = (array) $allowedTypes;
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ /**
+ * Adds allowed types for an option.
+ *
+ * The types are merged with the allowed types defined previously.
+ *
+ * Any type for which a corresponding is_<type>() function exists is
+ * acceptable. Additionally, fully-qualified class or interface names may
+ * be passed.
+ *
+ * @param string|string[] $allowedTypes One or more accepted types
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function addAllowedTypes(string $option, $allowedTypes)
+ {
+ if ($this->locked) {
+ throw new AccessException('Allowed types cannot be added from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ if (!isset($this->allowedTypes[$option])) {
+ $this->allowedTypes[$option] = (array) $allowedTypes;
+ } else {
+ $this->allowedTypes[$option] = array_merge($this->allowedTypes[$option], (array) $allowedTypes);
+ }
+
+ // Make sure the option is processed
+ unset($this->resolved[$option]);
+
+ return $this;
+ }
+
+ /**
+ * Defines an option configurator with the given name.
+ */
+ public function define(string $option): OptionConfigurator
+ {
+ if (isset($this->defined[$option])) {
+ throw new OptionDefinitionException(sprintf('The option "%s" is already defined.', $option));
+ }
+
+ return new OptionConfigurator($option, $this);
+ }
+
+ /**
+ * Sets an info message for an option.
+ *
+ * @return $this
+ *
+ * @throws UndefinedOptionsException If the option is undefined
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function setInfo(string $option, string $info): self
+ {
+ if ($this->locked) {
+ throw new AccessException('The Info message cannot be set from a lazy option or normalizer.');
+ }
+
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ $this->info[$option] = $info;
+
+ return $this;
+ }
+
+ /**
+ * Gets the info message for an option.
+ */
+ public function getInfo(string $option): ?string
+ {
+ if (!isset($this->defined[$option])) {
+ throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ return $this->info[$option] ?? null;
+ }
+
+ /**
+ * Marks the whole options definition as array prototype.
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option, a normalizer or a root definition
+ */
+ public function setPrototype(bool $prototype): self
+ {
+ if ($this->locked) {
+ throw new AccessException('The prototype property cannot be set from a lazy option or normalizer.');
+ }
+
+ if (null === $this->prototype && $prototype) {
+ throw new AccessException('The prototype property cannot be set from a root definition.');
+ }
+
+ $this->prototype = $prototype;
+
+ return $this;
+ }
+
+ public function isPrototype(): bool
+ {
+ return $this->prototype ?? false;
+ }
+
+ /**
+ * Removes the option with the given name.
+ *
+ * Undefined options are ignored.
+ *
+ * @param string|string[] $optionNames One or more option names
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function remove($optionNames)
+ {
+ if ($this->locked) {
+ throw new AccessException('Options cannot be removed from a lazy option or normalizer.');
+ }
+
+ foreach ((array) $optionNames as $option) {
+ unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]);
+ unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option], $this->info[$option]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Removes all options.
+ *
+ * @return $this
+ *
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function clear()
+ {
+ if ($this->locked) {
+ throw new AccessException('Options cannot be cleared from a lazy option or normalizer.');
+ }
+
+ $this->defined = [];
+ $this->defaults = [];
+ $this->nested = [];
+ $this->required = [];
+ $this->resolved = [];
+ $this->lazy = [];
+ $this->normalizers = [];
+ $this->allowedTypes = [];
+ $this->allowedValues = [];
+ $this->deprecated = [];
+ $this->info = [];
+
+ return $this;
+ }
+
+ /**
+ * Merges options with the default values stored in the container and
+ * validates them.
+ *
+ * Exceptions are thrown if:
+ *
+ * - Undefined options are passed;
+ * - Required options are missing;
+ * - Options have invalid types;
+ * - Options have invalid values.
+ *
+ * @return array
+ *
+ * @throws UndefinedOptionsException If an option name is undefined
+ * @throws InvalidOptionsException If an option doesn't fulfill the
+ * specified validation rules
+ * @throws MissingOptionsException If a required option is missing
+ * @throws OptionDefinitionException If there is a cyclic dependency between
+ * lazy options and/or normalizers
+ * @throws NoSuchOptionException If a lazy option reads an unavailable option
+ * @throws AccessException If called from a lazy option or normalizer
+ */
+ public function resolve(array $options = [])
+ {
+ if ($this->locked) {
+ throw new AccessException('Options cannot be resolved from a lazy option or normalizer.');
+ }
+
+ // Allow this method to be called multiple times
+ $clone = clone $this;
+
+ // Make sure that no unknown options are passed
+ $diff = array_diff_key($options, $clone->defined);
+
+ if (\count($diff) > 0) {
+ ksort($clone->defined);
+ ksort($diff);
+
+ throw new UndefinedOptionsException(sprintf((\count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".', $this->formatOptions(array_keys($diff)), implode('", "', array_keys($clone->defined))));
+ }
+
+ // Override options set by the user
+ foreach ($options as $option => $value) {
+ $clone->given[$option] = true;
+ $clone->defaults[$option] = $value;
+ unset($clone->resolved[$option], $clone->lazy[$option]);
+ }
+
+ // Check whether any required option is missing
+ $diff = array_diff_key($clone->required, $clone->defaults);
+
+ if (\count($diff) > 0) {
+ ksort($diff);
+
+ throw new MissingOptionsException(sprintf(\count($diff) > 1 ? 'The required options "%s" are missing.' : 'The required option "%s" is missing.', $this->formatOptions(array_keys($diff))));
+ }
+
+ // Lock the container
+ $clone->locked = true;
+
+ // Now process the individual options. Use offsetGet(), which resolves
+ // the option itself and any options that the option depends on
+ foreach ($clone->defaults as $option => $_) {
+ $clone->offsetGet($option);
+ }
+
+ return $clone->resolved;
+ }
+
+ /**
+ * Returns the resolved value of an option.
+ *
+ * @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default)
+ *
+ * @return mixed
+ *
+ * @throws AccessException If accessing this method outside of
+ * {@link resolve()}
+ * @throws NoSuchOptionException If the option is not set
+ * @throws InvalidOptionsException If the option doesn't fulfill the
+ * specified validation rules
+ * @throws OptionDefinitionException If there is a cyclic dependency between
+ * lazy options and/or normalizers
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($option, bool $triggerDeprecation = true)
+ {
+ if (!$this->locked) {
+ throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
+ }
+
+ // Shortcut for resolved options
+ if (isset($this->resolved[$option]) || \array_key_exists($option, $this->resolved)) {
+ if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || $this->calling) && \is_string($this->deprecated[$option]['message'])) {
+ trigger_deprecation($this->deprecated[$option]['package'], $this->deprecated[$option]['version'], strtr($this->deprecated[$option]['message'], ['%name%' => $option]));
+ }
+
+ return $this->resolved[$option];
+ }
+
+ // Check whether the option is set at all
+ if (!isset($this->defaults[$option]) && !\array_key_exists($option, $this->defaults)) {
+ if (!isset($this->defined[$option])) {
+ throw new NoSuchOptionException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $this->formatOptions([$option]), implode('", "', array_keys($this->defined))));
+ }
+
+ throw new NoSuchOptionException(sprintf('The optional option "%s" has no value set. You should make sure it is set with "isset" before reading it.', $this->formatOptions([$option])));
+ }
+
+ $value = $this->defaults[$option];
+
+ // Resolve the option if it is a nested definition
+ if (isset($this->nested[$option])) {
+ // If the closure is already being called, we have a cyclic dependency
+ if (isset($this->calling[$option])) {
+ throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling))));
+ }
+
+ if (!\is_array($value)) {
+ throw new InvalidOptionsException(sprintf('The nested option "%s" with value %s is expected to be of type array, but is of type "%s".', $this->formatOptions([$option]), $this->formatValue($value), get_debug_type($value)));
+ }
+
+ // The following section must be protected from cyclic calls.
+ $this->calling[$option] = true;
+ try {
+ $resolver = new self();
+ $resolver->prototype = false;
+ $resolver->parentsOptions = $this->parentsOptions;
+ $resolver->parentsOptions[] = $option;
+ foreach ($this->nested[$option] as $closure) {
+ $closure($resolver, $this);
+ }
+
+ if ($resolver->prototype) {
+ $values = [];
+ foreach ($value as $index => $prototypeValue) {
+ if (!\is_array($prototypeValue)) {
+ throw new InvalidOptionsException(sprintf('The value of the option "%s" is expected to be of type array of array, but is of type array of "%s".', $this->formatOptions([$option]), get_debug_type($prototypeValue)));
+ }
+
+ $resolver->prototypeIndex = $index;
+ $values[$index] = $resolver->resolve($prototypeValue);
+ }
+ $value = $values;
+ } else {
+ $value = $resolver->resolve($value);
+ }
+ } finally {
+ $resolver->prototypeIndex = null;
+ unset($this->calling[$option]);
+ }
+ }
+
+ // Resolve the option if the default value is lazily evaluated
+ if (isset($this->lazy[$option])) {
+ // If the closure is already being called, we have a cyclic
+ // dependency
+ if (isset($this->calling[$option])) {
+ throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling))));
+ }
+
+ // The following section must be protected from cyclic
+ // calls. Set $calling for the current $option to detect a cyclic
+ // dependency
+ // BEGIN
+ $this->calling[$option] = true;
+ try {
+ foreach ($this->lazy[$option] as $closure) {
+ $value = $closure($this, $value);
+ }
+ } finally {
+ unset($this->calling[$option]);
+ }
+ // END
+ }
+
+ // Validate the type of the resolved option
+ if (isset($this->allowedTypes[$option])) {
+ $valid = true;
+ $invalidTypes = [];
+
+ foreach ($this->allowedTypes[$option] as $type) {
+ if ($valid = $this->verifyTypes($type, $value, $invalidTypes)) {
+ break;
+ }
+ }
+
+ if (!$valid) {
+ $fmtActualValue = $this->formatValue($value);
+ $fmtAllowedTypes = implode('" or "', $this->allowedTypes[$option]);
+ $fmtProvidedTypes = implode('|', array_keys($invalidTypes));
+ $allowedContainsArrayType = \count(array_filter($this->allowedTypes[$option], static function ($item) {
+ return str_ends_with($item, '[]');
+ })) > 0;
+
+ if (\is_array($value) && $allowedContainsArrayType) {
+ throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but one of the elements is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes));
+ }
+
+ throw new InvalidOptionsException(sprintf('The option "%s" with value %s is expected to be of type "%s", but is of type "%s".', $this->formatOptions([$option]), $fmtActualValue, $fmtAllowedTypes, $fmtProvidedTypes));
+ }
+ }
+
+ // Validate the value of the resolved option
+ if (isset($this->allowedValues[$option])) {
+ $success = false;
+ $printableAllowedValues = [];
+
+ foreach ($this->allowedValues[$option] as $allowedValue) {
+ if ($allowedValue instanceof \Closure) {
+ if ($allowedValue($value)) {
+ $success = true;
+ break;
+ }
+
+ // Don't include closures in the exception message
+ continue;
+ }
+
+ if ($value === $allowedValue) {
+ $success = true;
+ break;
+ }
+
+ $printableAllowedValues[] = $allowedValue;
+ }
+
+ if (!$success) {
+ $message = sprintf(
+ 'The option "%s" with value %s is invalid.',
+ $option,
+ $this->formatValue($value)
+ );
+
+ if (\count($printableAllowedValues) > 0) {
+ $message .= sprintf(
+ ' Accepted values are: %s.',
+ $this->formatValues($printableAllowedValues)
+ );
+ }
+
+ if (isset($this->info[$option])) {
+ $message .= sprintf(' Info: %s.', $this->info[$option]);
+ }
+
+ throw new InvalidOptionsException($message);
+ }
+ }
+
+ // Check whether the option is deprecated
+ // and it is provided by the user or is being called from a lazy evaluation
+ if ($triggerDeprecation && isset($this->deprecated[$option]) && (isset($this->given[$option]) || ($this->calling && \is_string($this->deprecated[$option]['message'])))) {
+ $deprecation = $this->deprecated[$option];
+ $message = $this->deprecated[$option]['message'];
+
+ if ($message instanceof \Closure) {
+ // If the closure is already being called, we have a cyclic dependency
+ if (isset($this->calling[$option])) {
+ throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling))));
+ }
+
+ $this->calling[$option] = true;
+ try {
+ if (!\is_string($message = $message($this, $value))) {
+ throw new InvalidOptionsException(sprintf('Invalid type for deprecation message, expected string but got "%s", return an empty string to ignore.', get_debug_type($message)));
+ }
+ } finally {
+ unset($this->calling[$option]);
+ }
+ }
+
+ if ('' !== $message) {
+ trigger_deprecation($deprecation['package'], $deprecation['version'], strtr($message, ['%name%' => $option]));
+ }
+ }
+
+ // Normalize the validated option
+ if (isset($this->normalizers[$option])) {
+ // If the closure is already being called, we have a cyclic
+ // dependency
+ if (isset($this->calling[$option])) {
+ throw new OptionDefinitionException(sprintf('The options "%s" have a cyclic dependency.', $this->formatOptions(array_keys($this->calling))));
+ }
+
+ // The following section must be protected from cyclic
+ // calls. Set $calling for the current $option to detect a cyclic
+ // dependency
+ // BEGIN
+ $this->calling[$option] = true;
+ try {
+ foreach ($this->normalizers[$option] as $normalizer) {
+ $value = $normalizer($this, $value);
+ }
+ } finally {
+ unset($this->calling[$option]);
+ }
+ // END
+ }
+
+ // Mark as resolved
+ $this->resolved[$option] = $value;
+
+ return $value;
+ }
+
+ private function verifyTypes(string $type, $value, array &$invalidTypes, int $level = 0): bool
+ {
+ if (\is_array($value) && '[]' === substr($type, -2)) {
+ $type = substr($type, 0, -2);
+ $valid = true;
+
+ foreach ($value as $val) {
+ if (!$this->verifyTypes($type, $val, $invalidTypes, $level + 1)) {
+ $valid = false;
+ }
+ }
+
+ return $valid;
+ }
+
+ if (('null' === $type && null === $value) || (isset(self::VALIDATION_FUNCTIONS[$type]) ? self::VALIDATION_FUNCTIONS[$type]($value) : $value instanceof $type)) {
+ return true;
+ }
+
+ if (!$invalidTypes || $level > 0) {
+ $invalidTypes[get_debug_type($value)] = true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns whether a resolved option with the given name exists.
+ *
+ * @param string $option The option name
+ *
+ * @return bool
+ *
+ * @throws AccessException If accessing this method outside of {@link resolve()}
+ *
+ * @see \ArrayAccess::offsetExists()
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetExists($option)
+ {
+ if (!$this->locked) {
+ throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
+ }
+
+ return \array_key_exists($option, $this->defaults);
+ }
+
+ /**
+ * Not supported.
+ *
+ * @return void
+ *
+ * @throws AccessException
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetSet($option, $value)
+ {
+ throw new AccessException('Setting options via array access is not supported. Use setDefault() instead.');
+ }
+
+ /**
+ * Not supported.
+ *
+ * @return void
+ *
+ * @throws AccessException
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetUnset($option)
+ {
+ throw new AccessException('Removing options via array access is not supported. Use remove() instead.');
+ }
+
+ /**
+ * Returns the number of set options.
+ *
+ * This may be only a subset of the defined options.
+ *
+ * @return int
+ *
+ * @throws AccessException If accessing this method outside of {@link resolve()}
+ *
+ * @see \Countable::count()
+ */
+ #[\ReturnTypeWillChange]
+ public function count()
+ {
+ if (!$this->locked) {
+ throw new AccessException('Counting is only supported within closures of lazy options and normalizers.');
+ }
+
+ return \count($this->defaults);
+ }
+
+ /**
+ * Returns a string representation of the value.
+ *
+ * This method returns the equivalent PHP tokens for most scalar types
+ * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped
+ * in double quotes (").
+ *
+ * @param mixed $value The value to format as string
+ */
+ private function formatValue($value): string
+ {
+ if (\is_object($value)) {
+ return \get_class($value);
+ }
+
+ if (\is_array($value)) {
+ return 'array';
+ }
+
+ if (\is_string($value)) {
+ return '"'.$value.'"';
+ }
+
+ if (\is_resource($value)) {
+ return 'resource';
+ }
+
+ if (null === $value) {
+ return 'null';
+ }
+
+ if (false === $value) {
+ return 'false';
+ }
+
+ if (true === $value) {
+ return 'true';
+ }
+
+ return (string) $value;
+ }
+
+ /**
+ * Returns a string representation of a list of values.
+ *
+ * Each of the values is converted to a string using
+ * {@link formatValue()}. The values are then concatenated with commas.
+ *
+ * @see formatValue()
+ */
+ private function formatValues(array $values): string
+ {
+ foreach ($values as $key => $value) {
+ $values[$key] = $this->formatValue($value);
+ }
+
+ return implode(', ', $values);
+ }
+
+ private function formatOptions(array $options): string
+ {
+ if ($this->parentsOptions) {
+ $prefix = array_shift($this->parentsOptions);
+ if ($this->parentsOptions) {
+ $prefix .= sprintf('[%s]', implode('][', $this->parentsOptions));
+ }
+
+ if ($this->prototype && null !== $this->prototypeIndex) {
+ $prefix .= sprintf('[%s]', $this->prototypeIndex);
+ }
+
+ $options = array_map(static function (string $option) use ($prefix): string {
+ return sprintf('%s[%s]', $prefix, $option);
+ }, $options);
+ }
+
+ return implode('", "', $options);
+ }
+
+ private function getParameterClassName(\ReflectionParameter $parameter): ?string
+ {
+ if (!($type = $parameter->getType()) instanceof \ReflectionNamedType || $type->isBuiltin()) {
+ return null;
+ }
+
+ return $type->getName();
+ }
+}
diff --git a/vendor/symfony/options-resolver/README.md b/vendor/symfony/options-resolver/README.md
new file mode 100644
index 0000000..c63b900
--- /dev/null
+++ b/vendor/symfony/options-resolver/README.md
@@ -0,0 +1,15 @@
+OptionsResolver Component
+=========================
+
+The OptionsResolver component is `array_replace` on steroids. It allows you to
+create an options system with required options, defaults, validation (type,
+value), normalization and more.
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/options_resolver.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/vendor/symfony/options-resolver/composer.json b/vendor/symfony/options-resolver/composer.json
new file mode 100644
index 0000000..a38d1bd
--- /dev/null
+++ b/vendor/symfony/options-resolver/composer.json
@@ -0,0 +1,31 @@
+{
+ "name": "symfony/options-resolver",
+ "type": "library",
+ "description": "Provides an improved replacement for the array_replace PHP function",
+ "keywords": ["options", "config", "configuration"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-php73": "~1.0",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/vendor/symfony/polyfill-ctype/Ctype.php b/vendor/symfony/polyfill-ctype/Ctype.php
new file mode 100644
index 0000000..ba75a2c
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/Ctype.php
@@ -0,0 +1,232 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Ctype;
+
+/**
+ * Ctype implementation through regex.
+ *
+ * @internal
+ *
+ * @author Gert de Pagter <BackEndTea@gmail.com>
+ */
+final class Ctype
+{
+ /**
+ * Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.
+ *
+ * @see https://php.net/ctype-alnum
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_alnum($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is a letter, FALSE otherwise.
+ *
+ * @see https://php.net/ctype-alpha
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_alpha($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
+ *
+ * @see https://php.net/ctype-cntrl
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_cntrl($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
+ *
+ * @see https://php.net/ctype-digit
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_digit($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
+ *
+ * @see https://php.net/ctype-graph
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_graph($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is a lowercase letter.
+ *
+ * @see https://php.net/ctype-lower
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_lower($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
+ *
+ * @see https://php.net/ctype-print
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_print($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
+ *
+ * @see https://php.net/ctype-punct
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_punct($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
+ *
+ * @see https://php.net/ctype-space
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_space($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is an uppercase letter.
+ *
+ * @see https://php.net/ctype-upper
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_upper($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
+ }
+
+ /**
+ * Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
+ *
+ * @see https://php.net/ctype-xdigit
+ *
+ * @param mixed $text
+ *
+ * @return bool
+ */
+ public static function ctype_xdigit($text)
+ {
+ $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
+
+ return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
+ }
+
+ /**
+ * Converts integers to their char versions according to normal ctype behaviour, if needed.
+ *
+ * If an integer between -128 and 255 inclusive is provided,
+ * it is interpreted as the ASCII value of a single character
+ * (negative values have 256 added in order to allow characters in the Extended ASCII range).
+ * Any other integer is interpreted as a string containing the decimal digits of the integer.
+ *
+ * @param mixed $int
+ * @param string $function
+ *
+ * @return mixed
+ */
+ private static function convert_int_to_char_for_ctype($int, $function)
+ {
+ if (!\is_int($int)) {
+ return $int;
+ }
+
+ if ($int < -128 || $int > 255) {
+ return (string) $int;
+ }
+
+ if (\PHP_VERSION_ID >= 80100) {
+ @trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
+ }
+
+ if ($int < 0) {
+ $int += 256;
+ }
+
+ return \chr($int);
+ }
+}
diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/symfony/polyfill-ctype/LICENSE
new file mode 100644
index 0000000..3f853aa
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2018-2019 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-ctype/README.md b/vendor/symfony/polyfill-ctype/README.md
new file mode 100644
index 0000000..b144d03
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/README.md
@@ -0,0 +1,12 @@
+Symfony Polyfill / Ctype
+========================
+
+This component provides `ctype_*` functions to users who run php versions without the ctype extension.
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-ctype/bootstrap.php b/vendor/symfony/polyfill-ctype/bootstrap.php
new file mode 100644
index 0000000..d54524b
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/bootstrap.php
@@ -0,0 +1,50 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Ctype as p;
+
+if (\PHP_VERSION_ID >= 80000) {
+ return require __DIR__.'/bootstrap80.php';
+}
+
+if (!function_exists('ctype_alnum')) {
+ function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
+}
+if (!function_exists('ctype_alpha')) {
+ function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
+}
+if (!function_exists('ctype_cntrl')) {
+ function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
+}
+if (!function_exists('ctype_digit')) {
+ function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
+}
+if (!function_exists('ctype_graph')) {
+ function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
+}
+if (!function_exists('ctype_lower')) {
+ function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
+}
+if (!function_exists('ctype_print')) {
+ function ctype_print($text) { return p\Ctype::ctype_print($text); }
+}
+if (!function_exists('ctype_punct')) {
+ function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
+}
+if (!function_exists('ctype_space')) {
+ function ctype_space($text) { return p\Ctype::ctype_space($text); }
+}
+if (!function_exists('ctype_upper')) {
+ function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
+}
+if (!function_exists('ctype_xdigit')) {
+ function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
+}
diff --git a/vendor/symfony/polyfill-ctype/bootstrap80.php b/vendor/symfony/polyfill-ctype/bootstrap80.php
new file mode 100644
index 0000000..ab2f861
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/bootstrap80.php
@@ -0,0 +1,46 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Ctype as p;
+
+if (!function_exists('ctype_alnum')) {
+ function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); }
+}
+if (!function_exists('ctype_alpha')) {
+ function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); }
+}
+if (!function_exists('ctype_cntrl')) {
+ function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); }
+}
+if (!function_exists('ctype_digit')) {
+ function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); }
+}
+if (!function_exists('ctype_graph')) {
+ function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); }
+}
+if (!function_exists('ctype_lower')) {
+ function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); }
+}
+if (!function_exists('ctype_print')) {
+ function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); }
+}
+if (!function_exists('ctype_punct')) {
+ function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); }
+}
+if (!function_exists('ctype_space')) {
+ function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); }
+}
+if (!function_exists('ctype_upper')) {
+ function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); }
+}
+if (!function_exists('ctype_xdigit')) {
+ function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); }
+}
diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json
new file mode 100644
index 0000000..ee5c931
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/composer.json
@@ -0,0 +1,41 @@
+{
+ "name": "symfony/polyfill-ctype",
+ "type": "library",
+ "description": "Symfony polyfill for ctype functions",
+ "keywords": ["polyfill", "compatibility", "portable", "ctype"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-ctype": "*"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
+ "files": [ "bootstrap.php" ]
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php72/LICENSE b/vendor/symfony/polyfill-php72/LICENSE
new file mode 100644
index 0000000..4cd8bdd
--- /dev/null
+++ b/vendor/symfony/polyfill-php72/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015-2019 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php
new file mode 100644
index 0000000..5e20d5b
--- /dev/null
+++ b/vendor/symfony/polyfill-php72/Php72.php
@@ -0,0 +1,217 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php72;
+
+/**
+ * @author Nicolas Grekas <p@tchwork.com>
+ * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
+ *
+ * @internal
+ */
+final class Php72
+{
+ private static $hashMask;
+
+ public static function utf8_encode($s)
+ {
+ $s .= $s;
+ $len = \strlen($s);
+
+ for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) {
+ switch (true) {
+ case $s[$i] < "\x80": $s[$j] = $s[$i]; break;
+ case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break;
+ default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break;
+ }
+ }
+
+ return substr($s, 0, $j);
+ }
+
+ public static function utf8_decode($s)
+ {
+ $s = (string) $s;
+ $len = \strlen($s);
+
+ for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {
+ switch ($s[$i] & "\xF0") {
+ case "\xC0":
+ case "\xD0":
+ $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F");
+ $s[$j] = $c < 256 ? \chr($c) : '?';
+ break;
+
+ case "\xF0":
+ ++$i;
+ // no break
+
+ case "\xE0":
+ $s[$j] = '?';
+ $i += 2;
+ break;
+
+ default:
+ $s[$j] = $s[$i];
+ }
+ }
+
+ return substr($s, 0, $j);
+ }
+
+ public static function php_os_family()
+ {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ return 'Windows';
+ }
+
+ $map = [
+ 'Darwin' => 'Darwin',
+ 'DragonFly' => 'BSD',
+ 'FreeBSD' => 'BSD',
+ 'NetBSD' => 'BSD',
+ 'OpenBSD' => 'BSD',
+ 'Linux' => 'Linux',
+ 'SunOS' => 'Solaris',
+ ];
+
+ return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown';
+ }
+
+ public static function spl_object_id($object)
+ {
+ if (null === self::$hashMask) {
+ self::initHashMask();
+ }
+ if (null === $hash = spl_object_hash($object)) {
+ return;
+ }
+
+ // On 32-bit systems, PHP_INT_SIZE is 4,
+ return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1)));
+ }
+
+ public static function sapi_windows_vt100_support($stream, $enable = null)
+ {
+ if (!\is_resource($stream)) {
+ trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
+
+ return false;
+ }
+
+ $meta = stream_get_meta_data($stream);
+
+ if ('STDIO' !== $meta['stream_type']) {
+ trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING);
+
+ return false;
+ }
+
+ // We cannot actually disable vt100 support if it is set
+ if (false === $enable || !self::stream_isatty($stream)) {
+ return false;
+ }
+
+ // The native function does not apply to stdin
+ $meta = array_map('strtolower', $meta);
+ $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri'];
+
+ return !$stdin
+ && (false !== getenv('ANSICON')
+ || 'ON' === getenv('ConEmuANSI')
+ || 'xterm' === getenv('TERM')
+ || 'Hyper' === getenv('TERM_PROGRAM'));
+ }
+
+ public static function stream_isatty($stream)
+ {
+ if (!\is_resource($stream)) {
+ trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING);
+
+ return false;
+ }
+
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $stat = @fstat($stream);
+ // Check if formatted mode is S_IFCHR
+ return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
+ }
+
+ return \function_exists('posix_isatty') && @posix_isatty($stream);
+ }
+
+ private static function initHashMask()
+ {
+ $obj = (object) [];
+ self::$hashMask = -1;
+
+ // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
+ $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'];
+ foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) {
+ if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) {
+ $frame['line'] = 0;
+ break;
+ }
+ }
+ if (!empty($frame['line'])) {
+ ob_start();
+ debug_zval_dump($obj);
+ self::$hashMask = (int) substr(ob_get_clean(), 17);
+ }
+
+ self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1)));
+ }
+
+ public static function mb_chr($code, $encoding = null)
+ {
+ if (0x80 > $code %= 0x200000) {
+ $s = \chr($code);
+ } elseif (0x800 > $code) {
+ $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
+ } elseif (0x10000 > $code) {
+ $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
+ } else {
+ $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
+ }
+
+ if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) {
+ $s = mb_convert_encoding($s, $encoding, 'UTF-8');
+ }
+
+ return $s;
+ }
+
+ public static function mb_ord($s, $encoding = null)
+ {
+ if (null === $encoding) {
+ $s = mb_convert_encoding($s, 'UTF-8');
+ } elseif ('UTF-8' !== $encoding) {
+ $s = mb_convert_encoding($s, 'UTF-8', $encoding);
+ }
+
+ if (1 === \strlen($s)) {
+ return \ord($s);
+ }
+
+ $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
+ if (0xF0 <= $code) {
+ return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
+ }
+ if (0xE0 <= $code) {
+ return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
+ }
+ if (0xC0 <= $code) {
+ return (($code - 0xC0) << 6) + $s[2] - 0x80;
+ }
+
+ return $code;
+ }
+}
diff --git a/vendor/symfony/polyfill-php72/README.md b/vendor/symfony/polyfill-php72/README.md
new file mode 100644
index 0000000..ed19050
--- /dev/null
+++ b/vendor/symfony/polyfill-php72/README.md
@@ -0,0 +1,35 @@
+Symfony Polyfill / Php72
+========================
+
+This component provides functions added to PHP 7.2 core:
+
+- [`spl_object_id`](https://php.net/spl_object_id)
+- [`stream_isatty`](https://php.net/stream_isatty)
+
+And also functions added to PHP 7.2 mbstring:
+
+- [`mb_ord`](https://php.net/mb_ord)
+- [`mb_chr`](https://php.net/mb_chr)
+- [`mb_scrub`](https://php.net/mb_scrub)
+
+On Windows only:
+
+- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support)
+
+Moved to core since 7.2 (was in the optional XML extension earlier):
+
+- [`utf8_encode`](https://php.net/utf8_encode)
+- [`utf8_decode`](https://php.net/utf8_decode)
+
+Also, it provides constants added to PHP 7.2:
+
+- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig)
+- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family)
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-php72/bootstrap.php b/vendor/symfony/polyfill-php72/bootstrap.php
new file mode 100644
index 0000000..b5c92d4
--- /dev/null
+++ b/vendor/symfony/polyfill-php72/bootstrap.php
@@ -0,0 +1,57 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php72 as p;
+
+if (\PHP_VERSION_ID >= 70200) {
+ return;
+}
+
+if (!defined('PHP_FLOAT_DIG')) {
+ define('PHP_FLOAT_DIG', 15);
+}
+if (!defined('PHP_FLOAT_EPSILON')) {
+ define('PHP_FLOAT_EPSILON', 2.2204460492503E-16);
+}
+if (!defined('PHP_FLOAT_MIN')) {
+ define('PHP_FLOAT_MIN', 2.2250738585072E-308);
+}
+if (!defined('PHP_FLOAT_MAX')) {
+ define('PHP_FLOAT_MAX', 1.7976931348623157E+308);
+}
+if (!defined('PHP_OS_FAMILY')) {
+ define('PHP_OS_FAMILY', p\Php72::php_os_family());
+}
+
+if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) {
+ function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); }
+}
+if (!function_exists('stream_isatty')) {
+ function stream_isatty($stream) { return p\Php72::stream_isatty($stream); }
+}
+if (!function_exists('utf8_encode')) {
+ function utf8_encode($string) { return p\Php72::utf8_encode($string); }
+}
+if (!function_exists('utf8_decode')) {
+ function utf8_decode($string) { return p\Php72::utf8_decode($string); }
+}
+if (!function_exists('spl_object_id')) {
+ function spl_object_id($object) { return p\Php72::spl_object_id($object); }
+}
+if (!function_exists('mb_ord')) {
+ function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); }
+}
+if (!function_exists('mb_chr')) {
+ function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); }
+}
+if (!function_exists('mb_scrub')) {
+ function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); }
+}
diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json
new file mode 100644
index 0000000..4eac690
--- /dev/null
+++ b/vendor/symfony/polyfill-php72/composer.json
@@ -0,0 +1,35 @@
+{
+ "name": "symfony/polyfill-php72",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php72\\": "" },
+ "files": [ "bootstrap.php" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php73/LICENSE b/vendor/symfony/polyfill-php73/LICENSE
new file mode 100644
index 0000000..3f853aa
--- /dev/null
+++ b/vendor/symfony/polyfill-php73/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2018-2019 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-php73/Php73.php b/vendor/symfony/polyfill-php73/Php73.php
new file mode 100644
index 0000000..65c35a6
--- /dev/null
+++ b/vendor/symfony/polyfill-php73/Php73.php
@@ -0,0 +1,43 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php73;
+
+/**
+ * @author Gabriel Caruso <carusogabriel34@gmail.com>
+ * @author Ion Bazan <ion.bazan@gmail.com>
+ *
+ * @internal
+ */
+final class Php73
+{
+ public static $startAt = 1533462603;
+
+ /**
+ * @param bool $asNum
+ *
+ * @return array|float|int
+ */
+ public static function hrtime($asNum = false)
+ {
+ $ns = microtime(false);
+ $s = substr($ns, 11) - self::$startAt;
+ $ns = 1E9 * (float) $ns;
+
+ if ($asNum) {
+ $ns += $s * 1E9;
+
+ return \PHP_INT_SIZE === 4 ? $ns : (int) $ns;
+ }
+
+ return [$s, (int) $ns];
+ }
+}
diff --git a/vendor/symfony/polyfill-php73/README.md b/vendor/symfony/polyfill-php73/README.md
new file mode 100644
index 0000000..032fafb
--- /dev/null
+++ b/vendor/symfony/polyfill-php73/README.md
@@ -0,0 +1,18 @@
+Symfony Polyfill / Php73
+========================
+
+This component provides functions added to PHP 7.3 core:
+
+- [`array_key_first`](https://php.net/array_key_first)
+- [`array_key_last`](https://php.net/array_key_last)
+- [`hrtime`](https://php.net/function.hrtime)
+- [`is_countable`](https://php.net/is_countable)
+- [`JsonException`](https://php.net/JsonException)
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php b/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php
new file mode 100644
index 0000000..f06d6c2
--- /dev/null
+++ b/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+if (\PHP_VERSION_ID < 70300) {
+ class JsonException extends Exception
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php73/bootstrap.php b/vendor/symfony/polyfill-php73/bootstrap.php
new file mode 100644
index 0000000..d6b2153
--- /dev/null
+++ b/vendor/symfony/polyfill-php73/bootstrap.php
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php73 as p;
+
+if (\PHP_VERSION_ID >= 70300) {
+ return;
+}
+
+if (!function_exists('is_countable')) {
+ function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; }
+}
+if (!function_exists('hrtime')) {
+ require_once __DIR__.'/Php73.php';
+ p\Php73::$startAt = (int) microtime(true);
+ function hrtime($as_number = false) { return p\Php73::hrtime($as_number); }
+}
+if (!function_exists('array_key_first')) {
+ function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
+}
+if (!function_exists('array_key_last')) {
+ function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); }
+}
diff --git a/vendor/symfony/polyfill-php73/composer.json b/vendor/symfony/polyfill-php73/composer.json
new file mode 100644
index 0000000..af0cf42
--- /dev/null
+++ b/vendor/symfony/polyfill-php73/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "symfony/polyfill-php73",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php73\\": "" },
+ "files": [ "bootstrap.php" ],
+ "classmap": [ "Resources/stubs" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/LICENSE b/vendor/symfony/polyfill-php80/LICENSE
new file mode 100644
index 0000000..5593b1d
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2020 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-php80/Php80.php b/vendor/symfony/polyfill-php80/Php80.php
new file mode 100644
index 0000000..362dd1a
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Php80.php
@@ -0,0 +1,115 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php80;
+
+/**
+ * @author Ion Bazan <ion.bazan@gmail.com>
+ * @author Nico Oelgart <nicoswd@gmail.com>
+ * @author Nicolas Grekas <p@tchwork.com>
+ *
+ * @internal
+ */
+final class Php80
+{
+ public static function fdiv(float $dividend, float $divisor): float
+ {
+ return @($dividend / $divisor);
+ }
+
+ public static function get_debug_type($value): string
+ {
+ switch (true) {
+ case null === $value: return 'null';
+ case \is_bool($value): return 'bool';
+ case \is_string($value): return 'string';
+ case \is_array($value): return 'array';
+ case \is_int($value): return 'int';
+ case \is_float($value): return 'float';
+ case \is_object($value): break;
+ case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class';
+ default:
+ if (null === $type = @get_resource_type($value)) {
+ return 'unknown';
+ }
+
+ if ('Unknown' === $type) {
+ $type = 'closed';
+ }
+
+ return "resource ($type)";
+ }
+
+ $class = \get_class($value);
+
+ if (false === strpos($class, '@')) {
+ return $class;
+ }
+
+ return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous';
+ }
+
+ public static function get_resource_id($res): int
+ {
+ if (!\is_resource($res) && null === @get_resource_type($res)) {
+ throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res)));
+ }
+
+ return (int) $res;
+ }
+
+ public static function preg_last_error_msg(): string
+ {
+ switch (preg_last_error()) {
+ case \PREG_INTERNAL_ERROR:
+ return 'Internal error';
+ case \PREG_BAD_UTF8_ERROR:
+ return 'Malformed UTF-8 characters, possibly incorrectly encoded';
+ case \PREG_BAD_UTF8_OFFSET_ERROR:
+ return 'The offset did not correspond to the beginning of a valid UTF-8 code point';
+ case \PREG_BACKTRACK_LIMIT_ERROR:
+ return 'Backtrack limit exhausted';
+ case \PREG_RECURSION_LIMIT_ERROR:
+ return 'Recursion limit exhausted';
+ case \PREG_JIT_STACKLIMIT_ERROR:
+ return 'JIT stack limit exhausted';
+ case \PREG_NO_ERROR:
+ return 'No error';
+ default:
+ return 'Unknown error';
+ }
+ }
+
+ public static function str_contains(string $haystack, string $needle): bool
+ {
+ return '' === $needle || false !== strpos($haystack, $needle);
+ }
+
+ public static function str_starts_with(string $haystack, string $needle): bool
+ {
+ return 0 === strncmp($haystack, $needle, \strlen($needle));
+ }
+
+ public static function str_ends_with(string $haystack, string $needle): bool
+ {
+ if ('' === $needle || $needle === $haystack) {
+ return true;
+ }
+
+ if ('' === $haystack) {
+ return false;
+ }
+
+ $needleLength = \strlen($needle);
+
+ return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength);
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/PhpToken.php b/vendor/symfony/polyfill-php80/PhpToken.php
new file mode 100644
index 0000000..fe6e691
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/PhpToken.php
@@ -0,0 +1,103 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php80;
+
+/**
+ * @author Fedonyuk Anton <info@ensostudio.ru>
+ *
+ * @internal
+ */
+class PhpToken implements \Stringable
+{
+ /**
+ * @var int
+ */
+ public $id;
+
+ /**
+ * @var string
+ */
+ public $text;
+
+ /**
+ * @var int
+ */
+ public $line;
+
+ /**
+ * @var int
+ */
+ public $pos;
+
+ public function __construct(int $id, string $text, int $line = -1, int $position = -1)
+ {
+ $this->id = $id;
+ $this->text = $text;
+ $this->line = $line;
+ $this->pos = $position;
+ }
+
+ public function getTokenName(): ?string
+ {
+ if ('UNKNOWN' === $name = token_name($this->id)) {
+ $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;
+ }
+
+ return $name;
+ }
+
+ /**
+ * @param int|string|array $kind
+ */
+ public function is($kind): bool
+ {
+ foreach ((array) $kind as $value) {
+ if (\in_array($value, [$this->id, $this->text], true)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function isIgnorable(): bool
+ {
+ return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true);
+ }
+
+ public function __toString(): string
+ {
+ return (string) $this->text;
+ }
+
+ /**
+ * @return static[]
+ */
+ public static function tokenize(string $code, int $flags = 0): array
+ {
+ $line = 1;
+ $position = 0;
+ $tokens = token_get_all($code, $flags);
+ foreach ($tokens as $index => $token) {
+ if (\is_string($token)) {
+ $id = \ord($token);
+ $text = $token;
+ } else {
+ [$id, $text, $line] = $token;
+ }
+ $tokens[$index] = new static($id, $text, $line, $position);
+ $position += \strlen($text);
+ }
+
+ return $tokens;
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/README.md b/vendor/symfony/polyfill-php80/README.md
new file mode 100644
index 0000000..3816c55
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/README.md
@@ -0,0 +1,25 @@
+Symfony Polyfill / Php80
+========================
+
+This component provides features added to PHP 8.0 core:
+
+- [`Stringable`](https://php.net/stringable) interface
+- [`fdiv`](https://php.net/fdiv)
+- [`ValueError`](https://php.net/valueerror) class
+- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class
+- `FILTER_VALIDATE_BOOL` constant
+- [`get_debug_type`](https://php.net/get_debug_type)
+- [`PhpToken`](https://php.net/phptoken) class
+- [`preg_last_error_msg`](https://php.net/preg_last_error_msg)
+- [`str_contains`](https://php.net/str_contains)
+- [`str_starts_with`](https://php.net/str_starts_with)
+- [`str_ends_with`](https://php.net/str_ends_with)
+- [`get_resource_id`](https://php.net/get_resource_id)
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
new file mode 100644
index 0000000..7ea6d27
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php
@@ -0,0 +1,22 @@
+<?php
+
+#[Attribute(Attribute::TARGET_CLASS)]
+final class Attribute
+{
+ public const TARGET_CLASS = 1;
+ public const TARGET_FUNCTION = 2;
+ public const TARGET_METHOD = 4;
+ public const TARGET_PROPERTY = 8;
+ public const TARGET_CLASS_CONSTANT = 16;
+ public const TARGET_PARAMETER = 32;
+ public const TARGET_ALL = 63;
+ public const IS_REPEATABLE = 64;
+
+ /** @var int */
+ public $flags;
+
+ public function __construct(int $flags = self::TARGET_ALL)
+ {
+ $this->flags = $flags;
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
new file mode 100644
index 0000000..72f1081
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php
@@ -0,0 +1,7 @@
+<?php
+
+if (\PHP_VERSION_ID < 80000 && \extension_loaded('tokenizer')) {
+ class PhpToken extends Symfony\Polyfill\Php80\PhpToken
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
new file mode 100644
index 0000000..77e037c
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php
@@ -0,0 +1,11 @@
+<?php
+
+if (\PHP_VERSION_ID < 80000) {
+ interface Stringable
+ {
+ /**
+ * @return string
+ */
+ public function __toString();
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
new file mode 100644
index 0000000..37937cb
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
@@ -0,0 +1,7 @@
+<?php
+
+if (\PHP_VERSION_ID < 80000) {
+ class UnhandledMatchError extends Error
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
new file mode 100644
index 0000000..a3a9b88
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php
@@ -0,0 +1,7 @@
+<?php
+
+if (\PHP_VERSION_ID < 80000) {
+ class ValueError extends Error
+ {
+ }
+}
diff --git a/vendor/symfony/polyfill-php80/bootstrap.php b/vendor/symfony/polyfill-php80/bootstrap.php
new file mode 100644
index 0000000..e5f7dbc
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/bootstrap.php
@@ -0,0 +1,42 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php80 as p;
+
+if (\PHP_VERSION_ID >= 80000) {
+ return;
+}
+
+if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) {
+ define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN);
+}
+
+if (!function_exists('fdiv')) {
+ function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); }
+}
+if (!function_exists('preg_last_error_msg')) {
+ function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
+}
+if (!function_exists('str_contains')) {
+ function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
+}
+if (!function_exists('str_starts_with')) {
+ function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
+}
+if (!function_exists('str_ends_with')) {
+ function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
+}
+if (!function_exists('get_debug_type')) {
+ function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
+}
+if (!function_exists('get_resource_id')) {
+ function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); }
+}
diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json
new file mode 100644
index 0000000..cd3e9b6
--- /dev/null
+++ b/vendor/symfony/polyfill-php80/composer.json
@@ -0,0 +1,40 @@
+{
+ "name": "symfony/polyfill-php80",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php80\\": "" },
+ "files": [ "bootstrap.php" ],
+ "classmap": [ "Resources/stubs" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/LICENSE b/vendor/symfony/polyfill-php81/LICENSE
new file mode 100644
index 0000000..efb17f9
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2021 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/polyfill-php81/Php81.php b/vendor/symfony/polyfill-php81/Php81.php
new file mode 100644
index 0000000..f0507b7
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/Php81.php
@@ -0,0 +1,37 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Polyfill\Php81;
+
+/**
+ * @author Nicolas Grekas <p@tchwork.com>
+ *
+ * @internal
+ */
+final class Php81
+{
+ public static function array_is_list(array $array): bool
+ {
+ if ([] === $array || $array === array_values($array)) {
+ return true;
+ }
+
+ $nextKey = -1;
+
+ foreach ($array as $k => $v) {
+ if ($k !== ++$nextKey) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/README.md b/vendor/symfony/polyfill-php81/README.md
new file mode 100644
index 0000000..7d8dd19
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/README.md
@@ -0,0 +1,17 @@
+Symfony Polyfill / Php81
+========================
+
+This component provides features added to PHP 8.1 core:
+
+- [`array_is_list`](https://php.net/array_is_list)
+- [`enum_exists`](https://php.net/enum-exists)
+- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
+- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
+
+More information can be found in the
+[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
+
+License
+=======
+
+This library is released under the [MIT license](LICENSE).
diff --git a/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
new file mode 100644
index 0000000..f4cad34
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php
@@ -0,0 +1,11 @@
+<?php
+
+if (\PHP_VERSION_ID < 80100) {
+ #[Attribute(Attribute::TARGET_METHOD)]
+ final class ReturnTypeWillChange
+ {
+ public function __construct()
+ {
+ }
+ }
+}
diff --git a/vendor/symfony/polyfill-php81/bootstrap.php b/vendor/symfony/polyfill-php81/bootstrap.php
new file mode 100644
index 0000000..9f872e0
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/bootstrap.php
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+use Symfony\Polyfill\Php81 as p;
+
+if (\PHP_VERSION_ID >= 80100) {
+ return;
+}
+
+if (defined('MYSQLI_REFRESH_SLAVE') && !defined('MYSQLI_REFRESH_REPLICA')) {
+ define('MYSQLI_REFRESH_REPLICA', 64);
+}
+
+if (!function_exists('array_is_list')) {
+ function array_is_list(array $array): bool { return p\Php81::array_is_list($array); }
+}
+
+if (!function_exists('enum_exists')) {
+ function enum_exists(string $enum, bool $autoload = true): bool { return $autoload && class_exists($enum) && false; }
+}
diff --git a/vendor/symfony/polyfill-php81/composer.json b/vendor/symfony/polyfill-php81/composer.json
new file mode 100644
index 0000000..014da78
--- /dev/null
+++ b/vendor/symfony/polyfill-php81/composer.json
@@ -0,0 +1,36 @@
+{
+ "name": "symfony/polyfill-php81",
+ "type": "library",
+ "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
+ "keywords": ["polyfill", "shim", "compatibility", "portable"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.1"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Polyfill\\Php81\\": "" },
+ "files": [ "bootstrap.php" ],
+ "classmap": [ "Resources/stubs" ]
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.26-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ }
+}
diff --git a/vendor/symfony/process/CHANGELOG.md b/vendor/symfony/process/CHANGELOG.md
new file mode 100644
index 0000000..31b9ee6
--- /dev/null
+++ b/vendor/symfony/process/CHANGELOG.md
@@ -0,0 +1,116 @@
+CHANGELOG
+=========
+
+5.2.0
+-----
+
+ * added `Process::setOptions()` to set `Process` specific options
+ * added option `create_new_console` to allow a subprocess to continue
+ to run after the main script exited, both on Linux and on Windows
+
+5.1.0
+-----
+
+ * added `Process::getStartTime()` to retrieve the start time of the process as float
+
+5.0.0
+-----
+
+ * removed `Process::inheritEnvironmentVariables()`
+ * removed `PhpProcess::setPhpBinary()`
+ * `Process` must be instantiated with a command array, use `Process::fromShellCommandline()` when the command should be parsed by the shell
+ * removed `Process::setCommandLine()`
+
+4.4.0
+-----
+
+ * deprecated `Process::inheritEnvironmentVariables()`: env variables are always inherited.
+ * added `Process::getLastOutputTime()` method
+
+4.2.0
+-----
+
+ * added the `Process::fromShellCommandline()` to run commands in a shell wrapper
+ * deprecated passing a command as string when creating a `Process` instance
+ * deprecated the `Process::setCommandline()` and the `PhpProcess::setPhpBinary()` methods
+ * added the `Process::waitUntil()` method to wait for the process only for a
+ specific output, then continue the normal execution of your application
+
+4.1.0
+-----
+
+ * added the `Process::isTtySupported()` method that allows to check for TTY support
+ * made `PhpExecutableFinder` look for the `PHP_BINARY` env var when searching the php binary
+ * added the `ProcessSignaledException` class to properly catch signaled process errors
+
+4.0.0
+-----
+
+ * environment variables will always be inherited
+ * added a second `array $env = []` argument to the `start()`, `run()`,
+ `mustRun()`, and `restart()` methods of the `Process` class
+ * added a second `array $env = []` argument to the `start()` method of the
+ `PhpProcess` class
+ * the `ProcessUtils::escapeArgument()` method has been removed
+ * the `areEnvironmentVariablesInherited()`, `getOptions()`, and `setOptions()`
+ methods of the `Process` class have been removed
+ * support for passing `proc_open()` options has been removed
+ * removed the `ProcessBuilder` class, use the `Process` class instead
+ * removed the `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class
+ * passing a not existing working directory to the constructor of the `Symfony\Component\Process\Process` class is not
+ supported anymore
+
+3.4.0
+-----
+
+ * deprecated the ProcessBuilder class
+ * deprecated calling `Process::start()` without setting a valid working directory beforehand (via `setWorkingDirectory()` or constructor)
+
+3.3.0
+-----
+
+ * added command line arrays in the `Process` class
+ * added `$env` argument to `Process::start()`, `run()`, `mustRun()` and `restart()` methods
+ * deprecated the `ProcessUtils::escapeArgument()` method
+ * deprecated not inheriting environment variables
+ * deprecated configuring `proc_open()` options
+ * deprecated configuring enhanced Windows compatibility
+ * deprecated configuring enhanced sigchild compatibility
+
+2.5.0
+-----
+
+ * added support for PTY mode
+ * added the convenience method "mustRun"
+ * deprecation: Process::setStdin() is deprecated in favor of Process::setInput()
+ * deprecation: Process::getStdin() is deprecated in favor of Process::getInput()
+ * deprecation: Process::setInput() and ProcessBuilder::setInput() do not accept non-scalar types
+
+2.4.0
+-----
+
+ * added the ability to define an idle timeout
+
+2.3.0
+-----
+
+ * added ProcessUtils::escapeArgument() to fix the bug in escapeshellarg() function on Windows
+ * added Process::signal()
+ * added Process::getPid()
+ * added support for a TTY mode
+
+2.2.0
+-----
+
+ * added ProcessBuilder::setArguments() to reset the arguments on a builder
+ * added a way to retrieve the standard and error output incrementally
+ * added Process:restart()
+
+2.1.0
+-----
+
+ * added support for non-blocking processes (start(), wait(), isRunning(), stop())
+ * enhanced Windows compatibility
+ * added Process::getExitCodeText() that returns a string representation for
+ the exit code returned by the process
+ * added ProcessBuilder
diff --git a/vendor/symfony/process/Exception/ExceptionInterface.php b/vendor/symfony/process/Exception/ExceptionInterface.php
new file mode 100644
index 0000000..bd4a604
--- /dev/null
+++ b/vendor/symfony/process/Exception/ExceptionInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+/**
+ * Marker Interface for the Process Component.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+interface ExceptionInterface extends \Throwable
+{
+}
diff --git a/vendor/symfony/process/Exception/InvalidArgumentException.php b/vendor/symfony/process/Exception/InvalidArgumentException.php
new file mode 100644
index 0000000..926ee21
--- /dev/null
+++ b/vendor/symfony/process/Exception/InvalidArgumentException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+/**
+ * InvalidArgumentException for the Process Component.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/process/Exception/LogicException.php b/vendor/symfony/process/Exception/LogicException.php
new file mode 100644
index 0000000..be3d490
--- /dev/null
+++ b/vendor/symfony/process/Exception/LogicException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+/**
+ * LogicException for the Process Component.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ */
+class LogicException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/process/Exception/ProcessFailedException.php b/vendor/symfony/process/Exception/ProcessFailedException.php
new file mode 100644
index 0000000..328acfd
--- /dev/null
+++ b/vendor/symfony/process/Exception/ProcessFailedException.php
@@ -0,0 +1,54 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+use Symfony\Component\Process\Process;
+
+/**
+ * Exception for failed processes.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class ProcessFailedException extends RuntimeException
+{
+ private $process;
+
+ public function __construct(Process $process)
+ {
+ if ($process->isSuccessful()) {
+ throw new InvalidArgumentException('Expected a failed process, but the given process was successful.');
+ }
+
+ $error = sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s",
+ $process->getCommandLine(),
+ $process->getExitCode(),
+ $process->getExitCodeText(),
+ $process->getWorkingDirectory()
+ );
+
+ if (!$process->isOutputDisabled()) {
+ $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s",
+ $process->getOutput(),
+ $process->getErrorOutput()
+ );
+ }
+
+ parent::__construct($error);
+
+ $this->process = $process;
+ }
+
+ public function getProcess()
+ {
+ return $this->process;
+ }
+}
diff --git a/vendor/symfony/process/Exception/ProcessSignaledException.php b/vendor/symfony/process/Exception/ProcessSignaledException.php
new file mode 100644
index 0000000..d4d3227
--- /dev/null
+++ b/vendor/symfony/process/Exception/ProcessSignaledException.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+use Symfony\Component\Process\Process;
+
+/**
+ * Exception that is thrown when a process has been signaled.
+ *
+ * @author Sullivan Senechal <soullivaneuh@gmail.com>
+ */
+final class ProcessSignaledException extends RuntimeException
+{
+ private $process;
+
+ public function __construct(Process $process)
+ {
+ $this->process = $process;
+
+ parent::__construct(sprintf('The process has been signaled with signal "%s".', $process->getTermSignal()));
+ }
+
+ public function getProcess(): Process
+ {
+ return $this->process;
+ }
+
+ public function getSignal(): int
+ {
+ return $this->getProcess()->getTermSignal();
+ }
+}
diff --git a/vendor/symfony/process/Exception/ProcessTimedOutException.php b/vendor/symfony/process/Exception/ProcessTimedOutException.php
new file mode 100644
index 0000000..94391a4
--- /dev/null
+++ b/vendor/symfony/process/Exception/ProcessTimedOutException.php
@@ -0,0 +1,69 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+use Symfony\Component\Process\Process;
+
+/**
+ * Exception that is thrown when a process times out.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class ProcessTimedOutException extends RuntimeException
+{
+ public const TYPE_GENERAL = 1;
+ public const TYPE_IDLE = 2;
+
+ private $process;
+ private $timeoutType;
+
+ public function __construct(Process $process, int $timeoutType)
+ {
+ $this->process = $process;
+ $this->timeoutType = $timeoutType;
+
+ parent::__construct(sprintf(
+ 'The process "%s" exceeded the timeout of %s seconds.',
+ $process->getCommandLine(),
+ $this->getExceededTimeout()
+ ));
+ }
+
+ public function getProcess()
+ {
+ return $this->process;
+ }
+
+ public function isGeneralTimeout()
+ {
+ return self::TYPE_GENERAL === $this->timeoutType;
+ }
+
+ public function isIdleTimeout()
+ {
+ return self::TYPE_IDLE === $this->timeoutType;
+ }
+
+ public function getExceededTimeout()
+ {
+ switch ($this->timeoutType) {
+ case self::TYPE_GENERAL:
+ return $this->process->getTimeout();
+
+ case self::TYPE_IDLE:
+ return $this->process->getIdleTimeout();
+
+ default:
+ throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType));
+ }
+ }
+}
diff --git a/vendor/symfony/process/Exception/RuntimeException.php b/vendor/symfony/process/Exception/RuntimeException.php
new file mode 100644
index 0000000..adead25
--- /dev/null
+++ b/vendor/symfony/process/Exception/RuntimeException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Exception;
+
+/**
+ * RuntimeException for the Process Component.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php
new file mode 100644
index 0000000..5914b4c
--- /dev/null
+++ b/vendor/symfony/process/ExecutableFinder.php
@@ -0,0 +1,86 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process;
+
+/**
+ * Generic executable finder.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class ExecutableFinder
+{
+ private $suffixes = ['.exe', '.bat', '.cmd', '.com'];
+
+ /**
+ * Replaces default suffixes of executable.
+ */
+ public function setSuffixes(array $suffixes)
+ {
+ $this->suffixes = $suffixes;
+ }
+
+ /**
+ * Adds new possible suffix to check for executable.
+ */
+ public function addSuffix(string $suffix)
+ {
+ $this->suffixes[] = $suffix;
+ }
+
+ /**
+ * Finds an executable by name.
+ *
+ * @param string $name The executable name (without the extension)
+ * @param string|null $default The default to return if no executable is found
+ * @param array $extraDirs Additional dirs to check into
+ *
+ * @return string|null
+ */
+ public function find(string $name, string $default = null, array $extraDirs = [])
+ {
+ if (ini_get('open_basedir')) {
+ $searchPath = array_merge(explode(\PATH_SEPARATOR, ini_get('open_basedir')), $extraDirs);
+ $dirs = [];
+ foreach ($searchPath as $path) {
+ // Silencing against https://bugs.php.net/69240
+ if (@is_dir($path)) {
+ $dirs[] = $path;
+ } else {
+ if (basename($path) == $name && @is_executable($path)) {
+ return $path;
+ }
+ }
+ }
+ } else {
+ $dirs = array_merge(
+ explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')),
+ $extraDirs
+ );
+ }
+
+ $suffixes = [''];
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $pathExt = getenv('PATHEXT');
+ $suffixes = array_merge($pathExt ? explode(\PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes);
+ }
+ foreach ($suffixes as $suffix) {
+ foreach ($dirs as $dir) {
+ if (@is_file($file = $dir.\DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === \DIRECTORY_SEPARATOR || @is_executable($file))) {
+ return $file;
+ }
+ }
+ }
+
+ return $default;
+ }
+}
diff --git a/vendor/symfony/process/InputStream.php b/vendor/symfony/process/InputStream.php
new file mode 100644
index 0000000..240665f
--- /dev/null
+++ b/vendor/symfony/process/InputStream.php
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process;
+
+use Symfony\Component\Process\Exception\RuntimeException;
+
+/**
+ * Provides a way to continuously write to the input of a Process until the InputStream is closed.
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ *
+ * @implements \IteratorAggregate<int, string>
+ */
+class InputStream implements \IteratorAggregate
+{
+ /** @var callable|null */
+ private $onEmpty = null;
+ private $input = [];
+ private $open = true;
+
+ /**
+ * Sets a callback that is called when the write buffer becomes empty.
+ */
+ public function onEmpty(callable $onEmpty = null)
+ {
+ $this->onEmpty = $onEmpty;
+ }
+
+ /**
+ * Appends an input to the write buffer.
+ *
+ * @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar,
+ * stream resource or \Traversable
+ */
+ public function write($input)
+ {
+ if (null === $input) {
+ return;
+ }
+ if ($this->isClosed()) {
+ throw new RuntimeException(sprintf('"%s" is closed.', static::class));
+ }
+ $this->input[] = ProcessUtils::validateInput(__METHOD__, $input);
+ }
+
+ /**
+ * Closes the write buffer.
+ */
+ public function close()
+ {
+ $this->open = false;
+ }
+
+ /**
+ * Tells whether the write buffer is closed or not.
+ */
+ public function isClosed()
+ {
+ return !$this->open;
+ }
+
+ /**
+ * @return \Traversable<int, string>
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator()
+ {
+ $this->open = true;
+
+ while ($this->open || $this->input) {
+ if (!$this->input) {
+ yield '';
+ continue;
+ }
+ $current = array_shift($this->input);
+
+ if ($current instanceof \Iterator) {
+ yield from $current;
+ } else {
+ yield $current;
+ }
+ if (!$this->input && $this->open && null !== $onEmpty = $this->onEmpty) {
+ $this->write($onEmpty($this));
+ }
+ }
+ }
+}
diff --git a/vendor/symfony/process/LICENSE b/vendor/symfony/process/LICENSE
new file mode 100644
index 0000000..88bf75b
--- /dev/null
+++ b/vendor/symfony/process/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/process/PhpExecutableFinder.php b/vendor/symfony/process/PhpExecutableFinder.php
new file mode 100644
index 0000000..998808b
--- /dev/null
+++ b/vendor/symfony/process/PhpExecutableFinder.php
@@ -0,0 +1,103 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process;
+
+/**
+ * An executable finder specifically designed for the PHP executable.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+class PhpExecutableFinder
+{
+ private $executableFinder;
+
+ public function __construct()
+ {
+ $this->executableFinder = new ExecutableFinder();
+ }
+
+ /**
+ * Finds The PHP executable.
+ *
+ * @return string|false
+ */
+ public function find(bool $includeArgs = true)
+ {
+ if ($php = getenv('PHP_BINARY')) {
+ if (!is_executable($php)) {
+ $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v';
+ if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) {
+ if (!is_executable($php)) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ if (@is_dir($php)) {
+ return false;
+ }
+
+ return $php;
+ }
+
+ $args = $this->findArguments();
+ $args = $includeArgs && $args ? ' '.implode(' ', $args) : '';
+
+ // PHP_BINARY return the current sapi executable
+ if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) {
+ return \PHP_BINARY.$args;
+ }
+
+ if ($php = getenv('PHP_PATH')) {
+ if (!@is_executable($php) || @is_dir($php)) {
+ return false;
+ }
+
+ return $php;
+ }
+
+ if ($php = getenv('PHP_PEAR_PHP_BIN')) {
+ if (@is_executable($php) && !@is_dir($php)) {
+ return $php;
+ }
+ }
+
+ if (@is_executable($php = \PHP_BINDIR.('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php')) && !@is_dir($php)) {
+ return $php;
+ }
+
+ $dirs = [\PHP_BINDIR];
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $dirs[] = 'C:\xampp\php\\';
+ }
+
+ return $this->executableFinder->find('php', false, $dirs);
+ }
+
+ /**
+ * Finds the PHP executable arguments.
+ *
+ * @return array
+ */
+ public function findArguments()
+ {
+ $arguments = [];
+ if ('phpdbg' === \PHP_SAPI) {
+ $arguments[] = '-qrr';
+ }
+
+ return $arguments;
+ }
+}
diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php
new file mode 100644
index 0000000..2bc338e
--- /dev/null
+++ b/vendor/symfony/process/PhpProcess.php
@@ -0,0 +1,72 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process;
+
+use Symfony\Component\Process\Exception\LogicException;
+use Symfony\Component\Process\Exception\RuntimeException;
+
+/**
+ * PhpProcess runs a PHP script in an independent process.
+ *
+ * $p = new PhpProcess('<?php echo "foo"; ?>');
+ * $p->run();
+ * print $p->getOutput()."\n";
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class PhpProcess extends Process
+{
+ /**
+ * @param string $script The PHP script to run (as a string)
+ * @param string|null $cwd The working directory or null to use the working dir of the current PHP process
+ * @param array|null $env The environment variables or null to use the same environment as the current PHP process
+ * @param int $timeout The timeout in seconds
+ * @param array|null $php Path to the PHP binary to use with any additional arguments
+ */
+ public function __construct(string $script, string $cwd = null, array $env = null, int $timeout = 60, array $php = null)
+ {
+ if (null === $php) {
+ $executableFinder = new PhpExecutableFinder();
+ $php = $executableFinder->find(false);
+ $php = false === $php ? null : array_merge([$php], $executableFinder->findArguments());
+ }
+ if ('phpdbg' === \PHP_SAPI) {
+ $file = tempnam(sys_get_temp_dir(), 'dbg');
+ file_put_contents($file, $script);
+ register_shutdown_function('unlink', $file);
+ $php[] = $file;
+ $script = null;
+ }
+
+ parent::__construct($php, $cwd, $env, $script, $timeout);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
+ {
+ throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function start(callable $callback = null, array $env = [])
+ {
+ if (null === $this->getCommandLine()) {
+ throw new RuntimeException('Unable to find the PHP executable.');
+ }
+
+ parent::start($callback, $env);
+ }
+}
diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php
new file mode 100644
index 0000000..0105100
--- /dev/null
+++ b/vendor/symfony/process/Pipes/AbstractPipes.php
@@ -0,0 +1,180 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Pipes;
+
+use Symfony\Component\Process\Exception\InvalidArgumentException;
+
+/**
+ * @author Romain Neutron <imprec@gmail.com>
+ *
+ * @internal
+ */
+abstract class AbstractPipes implements PipesInterface
+{
+ public $pipes = [];
+
+ private $inputBuffer = '';
+ private $input;
+ private $blocked = true;
+ private $lastError;
+
+ /**
+ * @param resource|string|int|float|bool|\Iterator|null $input
+ */
+ public function __construct($input)
+ {
+ if (\is_resource($input) || $input instanceof \Iterator) {
+ $this->input = $input;
+ } elseif (\is_string($input)) {
+ $this->inputBuffer = $input;
+ } else {
+ $this->inputBuffer = (string) $input;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function close()
+ {
+ foreach ($this->pipes as $pipe) {
+ if (\is_resource($pipe)) {
+ fclose($pipe);
+ }
+ }
+ $this->pipes = [];
+ }
+
+ /**
+ * Returns true if a system call has been interrupted.
+ */
+ protected function hasSystemCallBeenInterrupted(): bool
+ {
+ $lastError = $this->lastError;
+ $this->lastError = null;
+
+ // stream_select returns false when the `select` system call is interrupted by an incoming signal
+ return null !== $lastError && false !== stripos($lastError, 'interrupted system call');
+ }
+
+ /**
+ * Unblocks streams.
+ */
+ protected function unblock()
+ {
+ if (!$this->blocked) {
+ return;
+ }
+
+ foreach ($this->pipes as $pipe) {
+ stream_set_blocking($pipe, 0);
+ }
+ if (\is_resource($this->input)) {
+ stream_set_blocking($this->input, 0);
+ }
+
+ $this->blocked = false;
+ }
+
+ /**
+ * Writes input to stdin.
+ *
+ * @throws InvalidArgumentException When an input iterator yields a non supported value
+ */
+ protected function write(): ?array
+ {
+ if (!isset($this->pipes[0])) {
+ return null;
+ }
+ $input = $this->input;
+
+ if ($input instanceof \Iterator) {
+ if (!$input->valid()) {
+ $input = null;
+ } elseif (\is_resource($input = $input->current())) {
+ stream_set_blocking($input, 0);
+ } elseif (!isset($this->inputBuffer[0])) {
+ if (!\is_string($input)) {
+ if (!is_scalar($input)) {
+ throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', get_debug_type($this->input), get_debug_type($input)));
+ }
+ $input = (string) $input;
+ }
+ $this->inputBuffer = $input;
+ $this->input->next();
+ $input = null;
+ } else {
+ $input = null;
+ }
+ }
+
+ $r = $e = [];
+ $w = [$this->pipes[0]];
+
+ // let's have a look if something changed in streams
+ if (false === @stream_select($r, $w, $e, 0, 0)) {
+ return null;
+ }
+
+ foreach ($w as $stdin) {
+ if (isset($this->inputBuffer[0])) {
+ $written = fwrite($stdin, $this->inputBuffer);
+ $this->inputBuffer = substr($this->inputBuffer, $written);
+ if (isset($this->inputBuffer[0])) {
+ return [$this->pipes[0]];
+ }
+ }
+
+ if ($input) {
+ while (true) {
+ $data = fread($input, self::CHUNK_SIZE);
+ if (!isset($data[0])) {
+ break;
+ }
+ $written = fwrite($stdin, $data);
+ $data = substr($data, $written);
+ if (isset($data[0])) {
+ $this->inputBuffer = $data;
+
+ return [$this->pipes[0]];
+ }
+ }
+ if (feof($input)) {
+ if ($this->input instanceof \Iterator) {
+ $this->input->next();
+ } else {
+ $this->input = null;
+ }
+ }
+ }
+ }
+
+ // no input to read on resource, buffer is empty
+ if (!isset($this->inputBuffer[0]) && !($this->input instanceof \Iterator ? $this->input->valid() : $this->input)) {
+ $this->input = null;
+ fclose($this->pipes[0]);
+ unset($this->pipes[0]);
+ } elseif (!$w) {
+ return [$this->pipes[0]];
+ }
+
+ return null;
+ }
+
+ /**
+ * @internal
+ */
+ public function handleError(int $type, string $msg)
+ {
+ $this->lastError = $msg;
+ }
+}
diff --git a/vendor/symfony/process/Pipes/PipesInterface.php b/vendor/symfony/process/Pipes/PipesInterface.php
new file mode 100644
index 0000000..50eb5c4
--- /dev/null
+++ b/vendor/symfony/process/Pipes/PipesInterface.php
@@ -0,0 +1,61 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Pipes;
+
+/**
+ * PipesInterface manages descriptors and pipes for the use of proc_open.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ *
+ * @internal
+ */
+interface PipesInterface
+{
+ public const CHUNK_SIZE = 16384;
+
+ /**
+ * Returns an array of descriptors for the use of proc_open.
+ */
+ public function getDescriptors(): array;
+
+ /**
+ * Returns an array of filenames indexed by their related stream in case these pipes use temporary files.
+ *
+ * @return string[]
+ */
+ public function getFiles(): array;
+
+ /**
+ * Reads data in file handles and pipes.
+ *
+ * @param bool $blocking Whether to use blocking calls or not
+ * @param bool $close Whether to close pipes if they've reached EOF
+ *
+ * @return string[] An array of read data indexed by their fd
+ */
+ public function readAndWrite(bool $blocking, bool $close = false): array;
+
+ /**
+ * Returns if the current state has open file handles or pipes.
+ */
+ public function areOpen(): bool;
+
+ /**
+ * Returns if pipes are able to read output.
+ */
+ public function haveReadSupport(): bool;
+
+ /**
+ * Closes file handles and pipes.
+ */
+ public function close();
+}
diff --git a/vendor/symfony/process/Pipes/UnixPipes.php b/vendor/symfony/process/Pipes/UnixPipes.php
new file mode 100644
index 0000000..5a0e9d4
--- /dev/null
+++ b/vendor/symfony/process/Pipes/UnixPipes.php
@@ -0,0 +1,163 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Pipes;
+
+use Symfony\Component\Process\Process;
+
+/**
+ * UnixPipes implementation uses unix pipes as handles.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ *
+ * @internal
+ */
+class UnixPipes extends AbstractPipes
+{
+ private $ttyMode;
+ private $ptyMode;
+ private $haveReadSupport;
+
+ public function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveReadSupport)
+ {
+ $this->ttyMode = $ttyMode;
+ $this->ptyMode = $ptyMode;
+ $this->haveReadSupport = $haveReadSupport;
+
+ parent::__construct($input);
+ }
+
+ public function __sleep(): array
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ public function __wakeup()
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ public function __destruct()
+ {
+ $this->close();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDescriptors(): array
+ {
+ if (!$this->haveReadSupport) {
+ $nullstream = fopen('/dev/null', 'c');
+
+ return [
+ ['pipe', 'r'],
+ $nullstream,
+ $nullstream,
+ ];
+ }
+
+ if ($this->ttyMode) {
+ return [
+ ['file', '/dev/tty', 'r'],
+ ['file', '/dev/tty', 'w'],
+ ['file', '/dev/tty', 'w'],
+ ];
+ }
+
+ if ($this->ptyMode && Process::isPtySupported()) {
+ return [
+ ['pty'],
+ ['pty'],
+ ['pty'],
+ ];
+ }
+
+ return [
+ ['pipe', 'r'],
+ ['pipe', 'w'], // stdout
+ ['pipe', 'w'], // stderr
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getFiles(): array
+ {
+ return [];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function readAndWrite(bool $blocking, bool $close = false): array
+ {
+ $this->unblock();
+ $w = $this->write();
+
+ $read = $e = [];
+ $r = $this->pipes;
+ unset($r[0]);
+
+ // let's have a look if something changed in streams
+ set_error_handler([$this, 'handleError']);
+ if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) {
+ restore_error_handler();
+ // if a system call has been interrupted, forget about it, let's try again
+ // otherwise, an error occurred, let's reset pipes
+ if (!$this->hasSystemCallBeenInterrupted()) {
+ $this->pipes = [];
+ }
+
+ return $read;
+ }
+ restore_error_handler();
+
+ foreach ($r as $pipe) {
+ // prior PHP 5.4 the array passed to stream_select is modified and
+ // lose key association, we have to find back the key
+ $read[$type = array_search($pipe, $this->pipes, true)] = '';
+
+ do {
+ $data = @fread($pipe, self::CHUNK_SIZE);
+ $read[$type] .= $data;
+ } while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1])));
+
+ if (!isset($read[$type][0])) {
+ unset($read[$type]);
+ }
+
+ if ($close && feof($pipe)) {
+ fclose($pipe);
+ unset($this->pipes[$type]);
+ }
+ }
+
+ return $read;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function haveReadSupport(): bool
+ {
+ return $this->haveReadSupport;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function areOpen(): bool
+ {
+ return (bool) $this->pipes;
+ }
+}
diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php
new file mode 100644
index 0000000..bca84f5
--- /dev/null
+++ b/vendor/symfony/process/Pipes/WindowsPipes.php
@@ -0,0 +1,204 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Pipes;
+
+use Symfony\Component\Process\Exception\RuntimeException;
+use Symfony\Component\Process\Process;
+
+/**
+ * WindowsPipes implementation uses temporary files as handles.
+ *
+ * @see https://bugs.php.net/51800
+ * @see https://bugs.php.net/65650
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ *
+ * @internal
+ */
+class WindowsPipes extends AbstractPipes
+{
+ private $files = [];
+ private $fileHandles = [];
+ private $lockHandles = [];
+ private $readBytes = [
+ Process::STDOUT => 0,
+ Process::STDERR => 0,
+ ];
+ private $haveReadSupport;
+
+ public function __construct($input, bool $haveReadSupport)
+ {
+ $this->haveReadSupport = $haveReadSupport;
+
+ if ($this->haveReadSupport) {
+ // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
+ // Workaround for this problem is to use temporary files instead of pipes on Windows platform.
+ //
+ // @see https://bugs.php.net/51800
+ $pipes = [
+ Process::STDOUT => Process::OUT,
+ Process::STDERR => Process::ERR,
+ ];
+ $tmpDir = sys_get_temp_dir();
+ $lastError = 'unknown reason';
+ set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; });
+ for ($i = 0;; ++$i) {
+ foreach ($pipes as $pipe => $name) {
+ $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name);
+
+ if (!$h = fopen($file.'.lock', 'w')) {
+ if (file_exists($file.'.lock')) {
+ continue 2;
+ }
+ restore_error_handler();
+ throw new RuntimeException('A temporary file could not be opened to write the process output: '.$lastError);
+ }
+ if (!flock($h, \LOCK_EX | \LOCK_NB)) {
+ continue 2;
+ }
+ if (isset($this->lockHandles[$pipe])) {
+ flock($this->lockHandles[$pipe], \LOCK_UN);
+ fclose($this->lockHandles[$pipe]);
+ }
+ $this->lockHandles[$pipe] = $h;
+
+ if (!($h = fopen($file, 'w')) || !fclose($h) || !$h = fopen($file, 'r')) {
+ flock($this->lockHandles[$pipe], \LOCK_UN);
+ fclose($this->lockHandles[$pipe]);
+ unset($this->lockHandles[$pipe]);
+ continue 2;
+ }
+ $this->fileHandles[$pipe] = $h;
+ $this->files[$pipe] = $file;
+ }
+ break;
+ }
+ restore_error_handler();
+ }
+
+ parent::__construct($input);
+ }
+
+ public function __sleep(): array
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ public function __wakeup()
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ public function __destruct()
+ {
+ $this->close();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDescriptors(): array
+ {
+ if (!$this->haveReadSupport) {
+ $nullstream = fopen('NUL', 'c');
+
+ return [
+ ['pipe', 'r'],
+ $nullstream,
+ $nullstream,
+ ];
+ }
+
+ // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/51800)
+ // We're not using file handles as it can produce corrupted output https://bugs.php.net/65650
+ // So we redirect output within the commandline and pass the nul device to the process
+ return [
+ ['pipe', 'r'],
+ ['file', 'NUL', 'w'],
+ ['file', 'NUL', 'w'],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getFiles(): array
+ {
+ return $this->files;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function readAndWrite(bool $blocking, bool $close = false): array
+ {
+ $this->unblock();
+ $w = $this->write();
+ $read = $r = $e = [];
+
+ if ($blocking) {
+ if ($w) {
+ @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6);
+ } elseif ($this->fileHandles) {
+ usleep(Process::TIMEOUT_PRECISION * 1E6);
+ }
+ }
+ foreach ($this->fileHandles as $type => $fileHandle) {
+ $data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]);
+
+ if (isset($data[0])) {
+ $this->readBytes[$type] += \strlen($data);
+ $read[$type] = $data;
+ }
+ if ($close) {
+ ftruncate($fileHandle, 0);
+ fclose($fileHandle);
+ flock($this->lockHandles[$type], \LOCK_UN);
+ fclose($this->lockHandles[$type]);
+ unset($this->fileHandles[$type], $this->lockHandles[$type]);
+ }
+ }
+
+ return $read;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function haveReadSupport(): bool
+ {
+ return $this->haveReadSupport;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function areOpen(): bool
+ {
+ return $this->pipes && $this->fileHandles;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function close()
+ {
+ parent::close();
+ foreach ($this->fileHandles as $type => $handle) {
+ ftruncate($handle, 0);
+ fclose($handle);
+ flock($this->lockHandles[$type], \LOCK_UN);
+ fclose($this->lockHandles[$type]);
+ }
+ $this->fileHandles = $this->lockHandles = [];
+ }
+}
diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php
new file mode 100644
index 0000000..14e1777
--- /dev/null
+++ b/vendor/symfony/process/Process.php
@@ -0,0 +1,1652 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process;
+
+use Symfony\Component\Process\Exception\InvalidArgumentException;
+use Symfony\Component\Process\Exception\LogicException;
+use Symfony\Component\Process\Exception\ProcessFailedException;
+use Symfony\Component\Process\Exception\ProcessSignaledException;
+use Symfony\Component\Process\Exception\ProcessTimedOutException;
+use Symfony\Component\Process\Exception\RuntimeException;
+use Symfony\Component\Process\Pipes\PipesInterface;
+use Symfony\Component\Process\Pipes\UnixPipes;
+use Symfony\Component\Process\Pipes\WindowsPipes;
+
+/**
+ * Process is a thin wrapper around proc_* functions to easily
+ * start independent PHP processes.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Romain Neutron <imprec@gmail.com>
+ *
+ * @implements \IteratorAggregate<string, string>
+ */
+class Process implements \IteratorAggregate
+{
+ public const ERR = 'err';
+ public const OUT = 'out';
+
+ public const STATUS_READY = 'ready';
+ public const STATUS_STARTED = 'started';
+ public const STATUS_TERMINATED = 'terminated';
+
+ public const STDIN = 0;
+ public const STDOUT = 1;
+ public const STDERR = 2;
+
+ // Timeout Precision in seconds.
+ public const TIMEOUT_PRECISION = 0.2;
+
+ public const ITER_NON_BLOCKING = 1; // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking
+ public const ITER_KEEP_OUTPUT = 2; // By default, outputs are cleared while iterating, use this flag to keep them in memory
+ public const ITER_SKIP_OUT = 4; // Use this flag to skip STDOUT while iterating
+ public const ITER_SKIP_ERR = 8; // Use this flag to skip STDERR while iterating
+
+ private $callback;
+ private $hasCallback = false;
+ private $commandline;
+ private $cwd;
+ private $env = [];
+ private $input;
+ private $starttime;
+ private $lastOutputTime;
+ private $timeout;
+ private $idleTimeout;
+ private $exitcode;
+ private $fallbackStatus = [];
+ private $processInformation;
+ private $outputDisabled = false;
+ private $stdout;
+ private $stderr;
+ private $process;
+ private $status = self::STATUS_READY;
+ private $incrementalOutputOffset = 0;
+ private $incrementalErrorOutputOffset = 0;
+ private $tty = false;
+ private $pty;
+ private $options = ['suppress_errors' => true, 'bypass_shell' => true];
+
+ private $useFileHandles = false;
+ /** @var PipesInterface */
+ private $processPipes;
+
+ private $latestSignal;
+
+ private static $sigchild;
+
+ /**
+ * Exit codes translation table.
+ *
+ * User-defined errors must use exit codes in the 64-113 range.
+ */
+ public static $exitCodes = [
+ 0 => 'OK',
+ 1 => 'General error',
+ 2 => 'Misuse of shell builtins',
+
+ 126 => 'Invoked command cannot execute',
+ 127 => 'Command not found',
+ 128 => 'Invalid exit argument',
+
+ // signals
+ 129 => 'Hangup',
+ 130 => 'Interrupt',
+ 131 => 'Quit and dump core',
+ 132 => 'Illegal instruction',
+ 133 => 'Trace/breakpoint trap',
+ 134 => 'Process aborted',
+ 135 => 'Bus error: "access to undefined portion of memory object"',
+ 136 => 'Floating point exception: "erroneous arithmetic operation"',
+ 137 => 'Kill (terminate immediately)',
+ 138 => 'User-defined 1',
+ 139 => 'Segmentation violation',
+ 140 => 'User-defined 2',
+ 141 => 'Write to pipe with no one reading',
+ 142 => 'Signal raised by alarm',
+ 143 => 'Termination (request to terminate)',
+ // 144 - not defined
+ 145 => 'Child process terminated, stopped (or continued*)',
+ 146 => 'Continue if stopped',
+ 147 => 'Stop executing temporarily',
+ 148 => 'Terminal stop signal',
+ 149 => 'Background process attempting to read from tty ("in")',
+ 150 => 'Background process attempting to write to tty ("out")',
+ 151 => 'Urgent data available on socket',
+ 152 => 'CPU time limit exceeded',
+ 153 => 'File size limit exceeded',
+ 154 => 'Signal raised by timer counting virtual time: "virtual timer expired"',
+ 155 => 'Profiling timer expired',
+ // 156 - not defined
+ 157 => 'Pollable event',
+ // 158 - not defined
+ 159 => 'Bad syscall',
+ ];
+
+ /**
+ * @param array $command The command to run and its arguments listed as separate entries
+ * @param string|null $cwd The working directory or null to use the working dir of the current PHP process
+ * @param array|null $env The environment variables or null to use the same environment as the current PHP process
+ * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
+ * @param int|float|null $timeout The timeout in seconds or null to disable
+ *
+ * @throws LogicException When proc_open is not installed
+ */
+ public function __construct(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
+ {
+ if (!\function_exists('proc_open')) {
+ throw new LogicException('The Process class relies on proc_open, which is not available on your PHP installation.');
+ }
+
+ $this->commandline = $command;
+ $this->cwd = $cwd;
+
+ // on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started
+ // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected
+ // @see : https://bugs.php.net/51800
+ // @see : https://bugs.php.net/50524
+ if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) {
+ $this->cwd = getcwd();
+ }
+ if (null !== $env) {
+ $this->setEnv($env);
+ }
+
+ $this->setInput($input);
+ $this->setTimeout($timeout);
+ $this->useFileHandles = '\\' === \DIRECTORY_SEPARATOR;
+ $this->pty = false;
+ }
+
+ /**
+ * Creates a Process instance as a command-line to be run in a shell wrapper.
+ *
+ * Command-lines are parsed by the shell of your OS (/bin/sh on Unix-like, cmd.exe on Windows.)
+ * This allows using e.g. pipes or conditional execution. In this mode, signals are sent to the
+ * shell wrapper and not to your commands.
+ *
+ * In order to inject dynamic values into command-lines, we strongly recommend using placeholders.
+ * This will save escaping values, which is not portable nor secure anyway:
+ *
+ * $process = Process::fromShellCommandline('my_command "${:MY_VAR}"');
+ * $process->run(null, ['MY_VAR' => $theValue]);
+ *
+ * @param string $command The command line to pass to the shell of the OS
+ * @param string|null $cwd The working directory or null to use the working dir of the current PHP process
+ * @param array|null $env The environment variables or null to use the same environment as the current PHP process
+ * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input
+ * @param int|float|null $timeout The timeout in seconds or null to disable
+ *
+ * @return static
+ *
+ * @throws LogicException When proc_open is not installed
+ */
+ public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
+ {
+ $process = new static([], $cwd, $env, $input, $timeout);
+ $process->commandline = $command;
+
+ return $process;
+ }
+
+ /**
+ * @return array
+ */
+ public function __sleep()
+ {
+ throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
+ }
+
+ public function __wakeup()
+ {
+ throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
+ }
+
+ public function __destruct()
+ {
+ if ($this->options['create_new_console'] ?? false) {
+ $this->processPipes->close();
+ } else {
+ $this->stop(0);
+ }
+ }
+
+ public function __clone()
+ {
+ $this->resetProcessData();
+ }
+
+ /**
+ * Runs the process.
+ *
+ * The callback receives the type of output (out or err) and
+ * some bytes from the output in real-time. It allows to have feedback
+ * from the independent process during execution.
+ *
+ * The STDOUT and STDERR are also available after the process is finished
+ * via the getOutput() and getErrorOutput() methods.
+ *
+ * @param callable|null $callback A PHP callback to run whenever there is some
+ * output available on STDOUT or STDERR
+ *
+ * @return int The exit status code
+ *
+ * @throws RuntimeException When process can't be launched
+ * @throws RuntimeException When process is already running
+ * @throws ProcessTimedOutException When process timed out
+ * @throws ProcessSignaledException When process stopped after receiving signal
+ * @throws LogicException In case a callback is provided and output has been disabled
+ *
+ * @final
+ */
+ public function run(callable $callback = null, array $env = []): int
+ {
+ $this->start($callback, $env);
+
+ return $this->wait();
+ }
+
+ /**
+ * Runs the process.
+ *
+ * This is identical to run() except that an exception is thrown if the process
+ * exits with a non-zero exit code.
+ *
+ * @return $this
+ *
+ * @throws ProcessFailedException if the process didn't terminate successfully
+ *
+ * @final
+ */
+ public function mustRun(callable $callback = null, array $env = []): self
+ {
+ if (0 !== $this->run($callback, $env)) {
+ throw new ProcessFailedException($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Starts the process and returns after writing the input to STDIN.
+ *
+ * This method blocks until all STDIN data is sent to the process then it
+ * returns while the process runs in the background.
+ *
+ * The termination of the process can be awaited with wait().
+ *
+ * The callback receives the type of output (out or err) and some bytes from
+ * the output in real-time while writing the standard input to the process.
+ * It allows to have feedback from the independent process during execution.
+ *
+ * @param callable|null $callback A PHP callback to run whenever there is some
+ * output available on STDOUT or STDERR
+ *
+ * @throws RuntimeException When process can't be launched
+ * @throws RuntimeException When process is already running
+ * @throws LogicException In case a callback is provided and output has been disabled
+ */
+ public function start(callable $callback = null, array $env = [])
+ {
+ if ($this->isRunning()) {
+ throw new RuntimeException('Process is already running.');
+ }
+
+ $this->resetProcessData();
+ $this->starttime = $this->lastOutputTime = microtime(true);
+ $this->callback = $this->buildCallback($callback);
+ $this->hasCallback = null !== $callback;
+ $descriptors = $this->getDescriptors();
+
+ if ($this->env) {
+ $env += '\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($this->env, $env, 'strcasecmp') : $this->env;
+ }
+
+ $env += '\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($this->getDefaultEnv(), $env, 'strcasecmp') : $this->getDefaultEnv();
+
+ if (\is_array($commandline = $this->commandline)) {
+ $commandline = implode(' ', array_map([$this, 'escapeArgument'], $commandline));
+
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
+ // exec is mandatory to deal with sending a signal to the process
+ $commandline = 'exec '.$commandline;
+ }
+ } else {
+ $commandline = $this->replacePlaceholders($commandline, $env);
+ }
+
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $commandline = $this->prepareWindowsCommandLine($commandline, $env);
+ } elseif (!$this->useFileHandles && $this->isSigchildEnabled()) {
+ // last exit code is output on the fourth pipe and caught to work around --enable-sigchild
+ $descriptors[3] = ['pipe', 'w'];
+
+ // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
+ $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;';
+ $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code';
+
+ // Workaround for the bug, when PTS functionality is enabled.
+ // @see : https://bugs.php.net/69442
+ $ptsWorkaround = fopen(__FILE__, 'r');
+ }
+
+ $envPairs = [];
+ foreach ($env as $k => $v) {
+ if (false !== $v && false === \in_array($k, ['argc', 'argv', 'ARGC', 'ARGV'], true)) {
+ $envPairs[] = $k.'='.$v;
+ }
+ }
+
+ if (!is_dir($this->cwd)) {
+ throw new RuntimeException(sprintf('The provided cwd "%s" does not exist.', $this->cwd));
+ }
+
+ $this->process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);
+
+ if (!\is_resource($this->process)) {
+ throw new RuntimeException('Unable to launch a new process.');
+ }
+ $this->status = self::STATUS_STARTED;
+
+ if (isset($descriptors[3])) {
+ $this->fallbackStatus['pid'] = (int) fgets($this->processPipes->pipes[3]);
+ }
+
+ if ($this->tty) {
+ return;
+ }
+
+ $this->updateStatus(false);
+ $this->checkTimeout();
+ }
+
+ /**
+ * Restarts the process.
+ *
+ * Be warned that the process is cloned before being started.
+ *
+ * @param callable|null $callback A PHP callback to run whenever there is some
+ * output available on STDOUT or STDERR
+ *
+ * @return static
+ *
+ * @throws RuntimeException When process can't be launched
+ * @throws RuntimeException When process is already running
+ *
+ * @see start()
+ *
+ * @final
+ */
+ public function restart(callable $callback = null, array $env = []): self
+ {
+ if ($this->isRunning()) {
+ throw new RuntimeException('Process is already running.');
+ }
+
+ $process = clone $this;
+ $process->start($callback, $env);
+
+ return $process;
+ }
+
+ /**
+ * Waits for the process to terminate.
+ *
+ * The callback receives the type of output (out or err) and some bytes
+ * from the output in real-time while writing the standard input to the process.
+ * It allows to have feedback from the independent process during execution.
+ *
+ * @param callable|null $callback A valid PHP callback
+ *
+ * @return int The exitcode of the process
+ *
+ * @throws ProcessTimedOutException When process timed out
+ * @throws ProcessSignaledException When process stopped after receiving signal
+ * @throws LogicException When process is not yet started
+ */
+ public function wait(callable $callback = null)
+ {
+ $this->requireProcessIsStarted(__FUNCTION__);
+
+ $this->updateStatus(false);
+
+ if (null !== $callback) {
+ if (!$this->processPipes->haveReadSupport()) {
+ $this->stop(0);
+ throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::wait".');
+ }
+ $this->callback = $this->buildCallback($callback);
+ }
+
+ do {
+ $this->checkTimeout();
+ $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
+ $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
+ } while ($running);
+
+ while ($this->isRunning()) {
+ $this->checkTimeout();
+ usleep(1000);
+ }
+
+ if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) {
+ throw new ProcessSignaledException($this);
+ }
+
+ return $this->exitcode;
+ }
+
+ /**
+ * Waits until the callback returns true.
+ *
+ * The callback receives the type of output (out or err) and some bytes
+ * from the output in real-time while writing the standard input to the process.
+ * It allows to have feedback from the independent process during execution.
+ *
+ * @throws RuntimeException When process timed out
+ * @throws LogicException When process is not yet started
+ * @throws ProcessTimedOutException In case the timeout was reached
+ */
+ public function waitUntil(callable $callback): bool
+ {
+ $this->requireProcessIsStarted(__FUNCTION__);
+ $this->updateStatus(false);
+
+ if (!$this->processPipes->haveReadSupport()) {
+ $this->stop(0);
+ throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::waitUntil".');
+ }
+ $callback = $this->buildCallback($callback);
+
+ $ready = false;
+ while (true) {
+ $this->checkTimeout();
+ $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
+ $output = $this->processPipes->readAndWrite($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
+
+ foreach ($output as $type => $data) {
+ if (3 !== $type) {
+ $ready = $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data) || $ready;
+ } elseif (!isset($this->fallbackStatus['signaled'])) {
+ $this->fallbackStatus['exitcode'] = (int) $data;
+ }
+ }
+ if ($ready) {
+ return true;
+ }
+ if (!$running) {
+ return false;
+ }
+
+ usleep(1000);
+ }
+ }
+
+ /**
+ * Returns the Pid (process identifier), if applicable.
+ *
+ * @return int|null The process id if running, null otherwise
+ */
+ public function getPid()
+ {
+ return $this->isRunning() ? $this->processInformation['pid'] : null;
+ }
+
+ /**
+ * Sends a POSIX signal to the process.
+ *
+ * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants)
+ *
+ * @return $this
+ *
+ * @throws LogicException In case the process is not running
+ * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
+ * @throws RuntimeException In case of failure
+ */
+ public function signal(int $signal)
+ {
+ $this->doSignal($signal, true);
+
+ return $this;
+ }
+
+ /**
+ * Disables fetching output and error output from the underlying process.
+ *
+ * @return $this
+ *
+ * @throws RuntimeException In case the process is already running
+ * @throws LogicException if an idle timeout is set
+ */
+ public function disableOutput()
+ {
+ if ($this->isRunning()) {
+ throw new RuntimeException('Disabling output while the process is running is not possible.');
+ }
+ if (null !== $this->idleTimeout) {
+ throw new LogicException('Output cannot be disabled while an idle timeout is set.');
+ }
+
+ $this->outputDisabled = true;
+
+ return $this;
+ }
+
+ /**
+ * Enables fetching output and error output from the underlying process.
+ *
+ * @return $this
+ *
+ * @throws RuntimeException In case the process is already running
+ */
+ public function enableOutput()
+ {
+ if ($this->isRunning()) {
+ throw new RuntimeException('Enabling output while the process is running is not possible.');
+ }
+
+ $this->outputDisabled = false;
+
+ return $this;
+ }
+
+ /**
+ * Returns true in case the output is disabled, false otherwise.
+ *
+ * @return bool
+ */
+ public function isOutputDisabled()
+ {
+ return $this->outputDisabled;
+ }
+
+ /**
+ * Returns the current output of the process (STDOUT).
+ *
+ * @return string
+ *
+ * @throws LogicException in case the output has been disabled
+ * @throws LogicException In case the process is not started
+ */
+ public function getOutput()
+ {
+ $this->readPipesForOutput(__FUNCTION__);
+
+ if (false === $ret = stream_get_contents($this->stdout, -1, 0)) {
+ return '';
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Returns the output incrementally.
+ *
+ * In comparison with the getOutput method which always return the whole
+ * output, this one returns the new output since the last call.
+ *
+ * @return string
+ *
+ * @throws LogicException in case the output has been disabled
+ * @throws LogicException In case the process is not started
+ */
+ public function getIncrementalOutput()
+ {
+ $this->readPipesForOutput(__FUNCTION__);
+
+ $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset);
+ $this->incrementalOutputOffset = ftell($this->stdout);
+
+ if (false === $latest) {
+ return '';
+ }
+
+ return $latest;
+ }
+
+ /**
+ * Returns an iterator to the output of the process, with the output type as keys (Process::OUT/ERR).
+ *
+ * @param int $flags A bit field of Process::ITER_* flags
+ *
+ * @throws LogicException in case the output has been disabled
+ * @throws LogicException In case the process is not started
+ *
+ * @return \Generator<string, string>
+ */
+ #[\ReturnTypeWillChange]
+ public function getIterator(int $flags = 0)
+ {
+ $this->readPipesForOutput(__FUNCTION__, false);
+
+ $clearOutput = !(self::ITER_KEEP_OUTPUT & $flags);
+ $blocking = !(self::ITER_NON_BLOCKING & $flags);
+ $yieldOut = !(self::ITER_SKIP_OUT & $flags);
+ $yieldErr = !(self::ITER_SKIP_ERR & $flags);
+
+ while (null !== $this->callback || ($yieldOut && !feof($this->stdout)) || ($yieldErr && !feof($this->stderr))) {
+ if ($yieldOut) {
+ $out = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset);
+
+ if (isset($out[0])) {
+ if ($clearOutput) {
+ $this->clearOutput();
+ } else {
+ $this->incrementalOutputOffset = ftell($this->stdout);
+ }
+
+ yield self::OUT => $out;
+ }
+ }
+
+ if ($yieldErr) {
+ $err = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset);
+
+ if (isset($err[0])) {
+ if ($clearOutput) {
+ $this->clearErrorOutput();
+ } else {
+ $this->incrementalErrorOutputOffset = ftell($this->stderr);
+ }
+
+ yield self::ERR => $err;
+ }
+ }
+
+ if (!$blocking && !isset($out[0]) && !isset($err[0])) {
+ yield self::OUT => '';
+ }
+
+ $this->checkTimeout();
+ $this->readPipesForOutput(__FUNCTION__, $blocking);
+ }
+ }
+
+ /**
+ * Clears the process output.
+ *
+ * @return $this
+ */
+ public function clearOutput()
+ {
+ ftruncate($this->stdout, 0);
+ fseek($this->stdout, 0);
+ $this->incrementalOutputOffset = 0;
+
+ return $this;
+ }
+
+ /**
+ * Returns the current error output of the process (STDERR).
+ *
+ * @return string
+ *
+ * @throws LogicException in case the output has been disabled
+ * @throws LogicException In case the process is not started
+ */
+ public function getErrorOutput()
+ {
+ $this->readPipesForOutput(__FUNCTION__);
+
+ if (false === $ret = stream_get_contents($this->stderr, -1, 0)) {
+ return '';
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Returns the errorOutput incrementally.
+ *
+ * In comparison with the getErrorOutput method which always return the
+ * whole error output, this one returns the new error output since the last
+ * call.
+ *
+ * @return string
+ *
+ * @throws LogicException in case the output has been disabled
+ * @throws LogicException In case the process is not started
+ */
+ public function getIncrementalErrorOutput()
+ {
+ $this->readPipesForOutput(__FUNCTION__);
+
+ $latest = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset);
+ $this->incrementalErrorOutputOffset = ftell($this->stderr);
+
+ if (false === $latest) {
+ return '';
+ }
+
+ return $latest;
+ }
+
+ /**
+ * Clears the process output.
+ *
+ * @return $this
+ */
+ public function clearErrorOutput()
+ {
+ ftruncate($this->stderr, 0);
+ fseek($this->stderr, 0);
+ $this->incrementalErrorOutputOffset = 0;
+
+ return $this;
+ }
+
+ /**
+ * Returns the exit code returned by the process.
+ *
+ * @return int|null The exit status code, null if the Process is not terminated
+ */
+ public function getExitCode()
+ {
+ $this->updateStatus(false);
+
+ return $this->exitcode;
+ }
+
+ /**
+ * Returns a string representation for the exit code returned by the process.
+ *
+ * This method relies on the Unix exit code status standardization
+ * and might not be relevant for other operating systems.
+ *
+ * @return string|null A string representation for the exit status code, null if the Process is not terminated
+ *
+ * @see http://tldp.org/LDP/abs/html/exitcodes.html
+ * @see http://en.wikipedia.org/wiki/Unix_signal
+ */
+ public function getExitCodeText()
+ {
+ if (null === $exitcode = $this->getExitCode()) {
+ return null;
+ }
+
+ return self::$exitCodes[$exitcode] ?? 'Unknown error';
+ }
+
+ /**
+ * Checks if the process ended successfully.
+ *
+ * @return bool
+ */
+ public function isSuccessful()
+ {
+ return 0 === $this->getExitCode();
+ }
+
+ /**
+ * Returns true if the child process has been terminated by an uncaught signal.
+ *
+ * It always returns false on Windows.
+ *
+ * @return bool
+ *
+ * @throws LogicException In case the process is not terminated
+ */
+ public function hasBeenSignaled()
+ {
+ $this->requireProcessIsTerminated(__FUNCTION__);
+
+ return $this->processInformation['signaled'];
+ }
+
+ /**
+ * Returns the number of the signal that caused the child process to terminate its execution.
+ *
+ * It is only meaningful if hasBeenSignaled() returns true.
+ *
+ * @return int
+ *
+ * @throws RuntimeException In case --enable-sigchild is activated
+ * @throws LogicException In case the process is not terminated
+ */
+ public function getTermSignal()
+ {
+ $this->requireProcessIsTerminated(__FUNCTION__);
+
+ if ($this->isSigchildEnabled() && -1 === $this->processInformation['termsig']) {
+ throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal cannot be retrieved.');
+ }
+
+ return $this->processInformation['termsig'];
+ }
+
+ /**
+ * Returns true if the child process has been stopped by a signal.
+ *
+ * It always returns false on Windows.
+ *
+ * @return bool
+ *
+ * @throws LogicException In case the process is not terminated
+ */
+ public function hasBeenStopped()
+ {
+ $this->requireProcessIsTerminated(__FUNCTION__);
+
+ return $this->processInformation['stopped'];
+ }
+
+ /**
+ * Returns the number of the signal that caused the child process to stop its execution.
+ *
+ * It is only meaningful if hasBeenStopped() returns true.
+ *
+ * @return int
+ *
+ * @throws LogicException In case the process is not terminated
+ */
+ public function getStopSignal()
+ {
+ $this->requireProcessIsTerminated(__FUNCTION__);
+
+ return $this->processInformation['stopsig'];
+ }
+
+ /**
+ * Checks if the process is currently running.
+ *
+ * @return bool
+ */
+ public function isRunning()
+ {
+ if (self::STATUS_STARTED !== $this->status) {
+ return false;
+ }
+
+ $this->updateStatus(false);
+
+ return $this->processInformation['running'];
+ }
+
+ /**
+ * Checks if the process has been started with no regard to the current state.
+ *
+ * @return bool
+ */
+ public function isStarted()
+ {
+ return self::STATUS_READY != $this->status;
+ }
+
+ /**
+ * Checks if the process is terminated.
+ *
+ * @return bool
+ */
+ public function isTerminated()
+ {
+ $this->updateStatus(false);
+
+ return self::STATUS_TERMINATED == $this->status;
+ }
+
+ /**
+ * Gets the process status.
+ *
+ * The status is one of: ready, started, terminated.
+ *
+ * @return string
+ */
+ public function getStatus()
+ {
+ $this->updateStatus(false);
+
+ return $this->status;
+ }
+
+ /**
+ * Stops the process.
+ *
+ * @param int|float $timeout The timeout in seconds
+ * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9)
+ *
+ * @return int|null The exit-code of the process or null if it's not running
+ */
+ public function stop(float $timeout = 10, int $signal = null)
+ {
+ $timeoutMicro = microtime(true) + $timeout;
+ if ($this->isRunning()) {
+ // given SIGTERM may not be defined and that "proc_terminate" uses the constant value and not the constant itself, we use the same here
+ $this->doSignal(15, false);
+ do {
+ usleep(1000);
+ } while ($this->isRunning() && microtime(true) < $timeoutMicro);
+
+ if ($this->isRunning()) {
+ // Avoid exception here: process is supposed to be running, but it might have stopped just
+ // after this line. In any case, let's silently discard the error, we cannot do anything.
+ $this->doSignal($signal ?: 9, false);
+ }
+ }
+
+ if ($this->isRunning()) {
+ if (isset($this->fallbackStatus['pid'])) {
+ unset($this->fallbackStatus['pid']);
+
+ return $this->stop(0, $signal);
+ }
+ $this->close();
+ }
+
+ return $this->exitcode;
+ }
+
+ /**
+ * Adds a line to the STDOUT stream.
+ *
+ * @internal
+ */
+ public function addOutput(string $line)
+ {
+ $this->lastOutputTime = microtime(true);
+
+ fseek($this->stdout, 0, \SEEK_END);
+ fwrite($this->stdout, $line);
+ fseek($this->stdout, $this->incrementalOutputOffset);
+ }
+
+ /**
+ * Adds a line to the STDERR stream.
+ *
+ * @internal
+ */
+ public function addErrorOutput(string $line)
+ {
+ $this->lastOutputTime = microtime(true);
+
+ fseek($this->stderr, 0, \SEEK_END);
+ fwrite($this->stderr, $line);
+ fseek($this->stderr, $this->incrementalErrorOutputOffset);
+ }
+
+ /**
+ * Gets the last output time in seconds.
+ */
+ public function getLastOutputTime(): ?float
+ {
+ return $this->lastOutputTime;
+ }
+
+ /**
+ * Gets the command line to be executed.
+ *
+ * @return string
+ */
+ public function getCommandLine()
+ {
+ return \is_array($this->commandline) ? implode(' ', array_map([$this, 'escapeArgument'], $this->commandline)) : $this->commandline;
+ }
+
+ /**
+ * Gets the process timeout in seconds (max. runtime).
+ *
+ * @return float|null
+ */
+ public function getTimeout()
+ {
+ return $this->timeout;
+ }
+
+ /**
+ * Gets the process idle timeout in seconds (max. time since last output).
+ *
+ * @return float|null
+ */
+ public function getIdleTimeout()
+ {
+ return $this->idleTimeout;
+ }
+
+ /**
+ * Sets the process timeout (max. runtime) in seconds.
+ *
+ * To disable the timeout, set this value to null.
+ *
+ * @return $this
+ *
+ * @throws InvalidArgumentException if the timeout is negative
+ */
+ public function setTimeout(?float $timeout)
+ {
+ $this->timeout = $this->validateTimeout($timeout);
+
+ return $this;
+ }
+
+ /**
+ * Sets the process idle timeout (max. time since last output) in seconds.
+ *
+ * To disable the timeout, set this value to null.
+ *
+ * @return $this
+ *
+ * @throws LogicException if the output is disabled
+ * @throws InvalidArgumentException if the timeout is negative
+ */
+ public function setIdleTimeout(?float $timeout)
+ {
+ if (null !== $timeout && $this->outputDisabled) {
+ throw new LogicException('Idle timeout cannot be set while the output is disabled.');
+ }
+
+ $this->idleTimeout = $this->validateTimeout($timeout);
+
+ return $this;
+ }
+
+ /**
+ * Enables or disables the TTY mode.
+ *
+ * @return $this
+ *
+ * @throws RuntimeException In case the TTY mode is not supported
+ */
+ public function setTty(bool $tty)
+ {
+ if ('\\' === \DIRECTORY_SEPARATOR && $tty) {
+ throw new RuntimeException('TTY mode is not supported on Windows platform.');
+ }
+
+ if ($tty && !self::isTtySupported()) {
+ throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.');
+ }
+
+ $this->tty = $tty;
+
+ return $this;
+ }
+
+ /**
+ * Checks if the TTY mode is enabled.
+ *
+ * @return bool
+ */
+ public function isTty()
+ {
+ return $this->tty;
+ }
+
+ /**
+ * Sets PTY mode.
+ *
+ * @return $this
+ */
+ public function setPty(bool $bool)
+ {
+ $this->pty = $bool;
+
+ return $this;
+ }
+
+ /**
+ * Returns PTY state.
+ *
+ * @return bool
+ */
+ public function isPty()
+ {
+ return $this->pty;
+ }
+
+ /**
+ * Gets the working directory.
+ *
+ * @return string|null
+ */
+ public function getWorkingDirectory()
+ {
+ if (null === $this->cwd) {
+ // getcwd() will return false if any one of the parent directories does not have
+ // the readable or search mode set, even if the current directory does
+ return getcwd() ?: null;
+ }
+
+ return $this->cwd;
+ }
+
+ /**
+ * Sets the current working directory.
+ *
+ * @return $this
+ */
+ public function setWorkingDirectory(string $cwd)
+ {
+ $this->cwd = $cwd;
+
+ return $this;
+ }
+
+ /**
+ * Gets the environment variables.
+ *
+ * @return array
+ */
+ public function getEnv()
+ {
+ return $this->env;
+ }
+
+ /**
+ * Sets the environment variables.
+ *
+ * @param array<string|\Stringable> $env The new environment variables
+ *
+ * @return $this
+ */
+ public function setEnv(array $env)
+ {
+ $this->env = $env;
+
+ return $this;
+ }
+
+ /**
+ * Gets the Process input.
+ *
+ * @return resource|string|\Iterator|null
+ */
+ public function getInput()
+ {
+ return $this->input;
+ }
+
+ /**
+ * Sets the input.
+ *
+ * This content will be passed to the underlying process standard input.
+ *
+ * @param string|int|float|bool|resource|\Traversable|null $input The content
+ *
+ * @return $this
+ *
+ * @throws LogicException In case the process is running
+ */
+ public function setInput($input)
+ {
+ if ($this->isRunning()) {
+ throw new LogicException('Input cannot be set while the process is running.');
+ }
+
+ $this->input = ProcessUtils::validateInput(__METHOD__, $input);
+
+ return $this;
+ }
+
+ /**
+ * Performs a check between the timeout definition and the time the process started.
+ *
+ * In case you run a background process (with the start method), you should
+ * trigger this method regularly to ensure the process timeout
+ *
+ * @throws ProcessTimedOutException In case the timeout was reached
+ */
+ public function checkTimeout()
+ {
+ if (self::STATUS_STARTED !== $this->status) {
+ return;
+ }
+
+ if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
+ $this->stop(0);
+
+ throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL);
+ }
+
+ if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) {
+ $this->stop(0);
+
+ throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE);
+ }
+ }
+
+ /**
+ * @throws LogicException in case process is not started
+ */
+ public function getStartTime(): float
+ {
+ if (!$this->isStarted()) {
+ throw new LogicException('Start time is only available after process start.');
+ }
+
+ return $this->starttime;
+ }
+
+ /**
+ * Defines options to pass to the underlying proc_open().
+ *
+ * @see https://php.net/proc_open for the options supported by PHP.
+ *
+ * Enabling the "create_new_console" option allows a subprocess to continue
+ * to run after the main process exited, on both Windows and *nix
+ */
+ public function setOptions(array $options)
+ {
+ if ($this->isRunning()) {
+ throw new RuntimeException('Setting options while the process is running is not possible.');
+ }
+
+ $defaultOptions = $this->options;
+ $existingOptions = ['blocking_pipes', 'create_process_group', 'create_new_console'];
+
+ foreach ($options as $key => $value) {
+ if (!\in_array($key, $existingOptions)) {
+ $this->options = $defaultOptions;
+ throw new LogicException(sprintf('Invalid option "%s" passed to "%s()". Supported options are "%s".', $key, __METHOD__, implode('", "', $existingOptions)));
+ }
+ $this->options[$key] = $value;
+ }
+ }
+
+ /**
+ * Returns whether TTY is supported on the current operating system.
+ */
+ public static function isTtySupported(): bool
+ {
+ static $isTtySupported;
+
+ if (null === $isTtySupported) {
+ $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes);
+ }
+
+ return $isTtySupported;
+ }
+
+ /**
+ * Returns whether PTY is supported on the current operating system.
+ *
+ * @return bool
+ */
+ public static function isPtySupported()
+ {
+ static $result;
+
+ if (null !== $result) {
+ return $result;
+ }
+
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ return $result = false;
+ }
+
+ return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes);
+ }
+
+ /**
+ * Creates the descriptors needed by the proc_open.
+ */
+ private function getDescriptors(): array
+ {
+ if ($this->input instanceof \Iterator) {
+ $this->input->rewind();
+ }
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback);
+ } else {
+ $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback);
+ }
+
+ return $this->processPipes->getDescriptors();
+ }
+
+ /**
+ * Builds up the callback used by wait().
+ *
+ * The callbacks adds all occurred output to the specific buffer and calls
+ * the user callback (if present) with the received output.
+ *
+ * @param callable|null $callback The user defined PHP callback
+ *
+ * @return \Closure
+ */
+ protected function buildCallback(callable $callback = null)
+ {
+ if ($this->outputDisabled) {
+ return function ($type, $data) use ($callback): bool {
+ return null !== $callback && $callback($type, $data);
+ };
+ }
+
+ $out = self::OUT;
+
+ return function ($type, $data) use ($callback, $out): bool {
+ if ($out == $type) {
+ $this->addOutput($data);
+ } else {
+ $this->addErrorOutput($data);
+ }
+
+ return null !== $callback && $callback($type, $data);
+ };
+ }
+
+ /**
+ * Updates the status of the process, reads pipes.
+ *
+ * @param bool $blocking Whether to use a blocking read call
+ */
+ protected function updateStatus(bool $blocking)
+ {
+ if (self::STATUS_STARTED !== $this->status) {
+ return;
+ }
+
+ $this->processInformation = proc_get_status($this->process);
+ $running = $this->processInformation['running'];
+
+ $this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running);
+
+ if ($this->fallbackStatus && $this->isSigchildEnabled()) {
+ $this->processInformation = $this->fallbackStatus + $this->processInformation;
+ }
+
+ if (!$running) {
+ $this->close();
+ }
+ }
+
+ /**
+ * Returns whether PHP has been compiled with the '--enable-sigchild' option or not.
+ *
+ * @return bool
+ */
+ protected function isSigchildEnabled()
+ {
+ if (null !== self::$sigchild) {
+ return self::$sigchild;
+ }
+
+ if (!\function_exists('phpinfo')) {
+ return self::$sigchild = false;
+ }
+
+ ob_start();
+ phpinfo(\INFO_GENERAL);
+
+ return self::$sigchild = str_contains(ob_get_clean(), '--enable-sigchild');
+ }
+
+ /**
+ * Reads pipes for the freshest output.
+ *
+ * @param string $caller The name of the method that needs fresh outputs
+ * @param bool $blocking Whether to use blocking calls or not
+ *
+ * @throws LogicException in case output has been disabled or process is not started
+ */
+ private function readPipesForOutput(string $caller, bool $blocking = false)
+ {
+ if ($this->outputDisabled) {
+ throw new LogicException('Output has been disabled.');
+ }
+
+ $this->requireProcessIsStarted($caller);
+
+ $this->updateStatus($blocking);
+ }
+
+ /**
+ * Validates and returns the filtered timeout.
+ *
+ * @throws InvalidArgumentException if the given timeout is a negative number
+ */
+ private function validateTimeout(?float $timeout): ?float
+ {
+ $timeout = (float) $timeout;
+
+ if (0.0 === $timeout) {
+ $timeout = null;
+ } elseif ($timeout < 0) {
+ throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.');
+ }
+
+ return $timeout;
+ }
+
+ /**
+ * Reads pipes, executes callback.
+ *
+ * @param bool $blocking Whether to use blocking calls or not
+ * @param bool $close Whether to close file handles or not
+ */
+ private function readPipes(bool $blocking, bool $close)
+ {
+ $result = $this->processPipes->readAndWrite($blocking, $close);
+
+ $callback = $this->callback;
+ foreach ($result as $type => $data) {
+ if (3 !== $type) {
+ $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data);
+ } elseif (!isset($this->fallbackStatus['signaled'])) {
+ $this->fallbackStatus['exitcode'] = (int) $data;
+ }
+ }
+ }
+
+ /**
+ * Closes process resource, closes file handles, sets the exitcode.
+ *
+ * @return int The exitcode
+ */
+ private function close(): int
+ {
+ $this->processPipes->close();
+ if (\is_resource($this->process)) {
+ proc_close($this->process);
+ }
+ $this->exitcode = $this->processInformation['exitcode'];
+ $this->status = self::STATUS_TERMINATED;
+
+ if (-1 === $this->exitcode) {
+ if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) {
+ // if process has been signaled, no exitcode but a valid termsig, apply Unix convention
+ $this->exitcode = 128 + $this->processInformation['termsig'];
+ } elseif ($this->isSigchildEnabled()) {
+ $this->processInformation['signaled'] = true;
+ $this->processInformation['termsig'] = -1;
+ }
+ }
+
+ // Free memory from self-reference callback created by buildCallback
+ // Doing so in other contexts like __destruct or by garbage collector is ineffective
+ // Now pipes are closed, so the callback is no longer necessary
+ $this->callback = null;
+
+ return $this->exitcode;
+ }
+
+ /**
+ * Resets data related to the latest run of the process.
+ */
+ private function resetProcessData()
+ {
+ $this->starttime = null;
+ $this->callback = null;
+ $this->exitcode = null;
+ $this->fallbackStatus = [];
+ $this->processInformation = null;
+ $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+');
+ $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+');
+ $this->process = null;
+ $this->latestSignal = null;
+ $this->status = self::STATUS_READY;
+ $this->incrementalOutputOffset = 0;
+ $this->incrementalErrorOutputOffset = 0;
+ }
+
+ /**
+ * Sends a POSIX signal to the process.
+ *
+ * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants)
+ * @param bool $throwException Whether to throw exception in case signal failed
+ *
+ * @throws LogicException In case the process is not running
+ * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed
+ * @throws RuntimeException In case of failure
+ */
+ private function doSignal(int $signal, bool $throwException): bool
+ {
+ if (null === $pid = $this->getPid()) {
+ if ($throwException) {
+ throw new LogicException('Cannot send signal on a non running process.');
+ }
+
+ return false;
+ }
+
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode);
+ if ($exitCode && $this->isRunning()) {
+ if ($throwException) {
+ throw new RuntimeException(sprintf('Unable to kill the process (%s).', implode(' ', $output)));
+ }
+
+ return false;
+ }
+ } else {
+ if (!$this->isSigchildEnabled()) {
+ $ok = @proc_terminate($this->process, $signal);
+ } elseif (\function_exists('posix_kill')) {
+ $ok = @posix_kill($pid, $signal);
+ } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), [2 => ['pipe', 'w']], $pipes)) {
+ $ok = false === fgets($pipes[2]);
+ }
+ if (!$ok) {
+ if ($throwException) {
+ throw new RuntimeException(sprintf('Error while sending signal "%s".', $signal));
+ }
+
+ return false;
+ }
+ }
+
+ $this->latestSignal = $signal;
+ $this->fallbackStatus['signaled'] = true;
+ $this->fallbackStatus['exitcode'] = -1;
+ $this->fallbackStatus['termsig'] = $this->latestSignal;
+
+ return true;
+ }
+
+ private function prepareWindowsCommandLine(string $cmd, array &$env): string
+ {
+ $uid = uniqid('', true);
+ $varCount = 0;
+ $varCache = [];
+ $cmd = preg_replace_callback(
+ '/"(?:(
+ [^"%!^]*+
+ (?:
+ (?: !LF! | "(?:\^[%!^])?+" )
+ [^"%!^]*+
+ )++
+ ) | [^"]*+ )"/x',
+ function ($m) use (&$env, &$varCache, &$varCount, $uid) {
+ if (!isset($m[1])) {
+ return $m[0];
+ }
+ if (isset($varCache[$m[0]])) {
+ return $varCache[$m[0]];
+ }
+ if (str_contains($value = $m[1], "\0")) {
+ $value = str_replace("\0", '?', $value);
+ }
+ if (false === strpbrk($value, "\"%!\n")) {
+ return '"'.$value.'"';
+ }
+
+ $value = str_replace(['!LF!', '"^!"', '"^%"', '"^^"', '""'], ["\n", '!', '%', '^', '"'], $value);
+ $value = '"'.preg_replace('/(\\\\*)"/', '$1$1\\"', $value).'"';
+ $var = $uid.++$varCount;
+
+ $env[$var] = $value;
+
+ return $varCache[$m[0]] = '!'.$var.'!';
+ },
+ $cmd
+ );
+
+ $cmd = 'cmd /V:ON /E:ON /D /C ('.str_replace("\n", ' ', $cmd).')';
+ foreach ($this->processPipes->getFiles() as $offset => $filename) {
+ $cmd .= ' '.$offset.'>"'.$filename.'"';
+ }
+
+ return $cmd;
+ }
+
+ /**
+ * Ensures the process is running or terminated, throws a LogicException if the process has a not started.
+ *
+ * @throws LogicException if the process has not run
+ */
+ private function requireProcessIsStarted(string $functionName)
+ {
+ if (!$this->isStarted()) {
+ throw new LogicException(sprintf('Process must be started before calling "%s()".', $functionName));
+ }
+ }
+
+ /**
+ * Ensures the process is terminated, throws a LogicException if the process has a status different than "terminated".
+ *
+ * @throws LogicException if the process is not yet terminated
+ */
+ private function requireProcessIsTerminated(string $functionName)
+ {
+ if (!$this->isTerminated()) {
+ throw new LogicException(sprintf('Process must be terminated before calling "%s()".', $functionName));
+ }
+ }
+
+ /**
+ * Escapes a string to be used as a shell argument.
+ */
+ private function escapeArgument(?string $argument): string
+ {
+ if ('' === $argument || null === $argument) {
+ return '""';
+ }
+ if ('\\' !== \DIRECTORY_SEPARATOR) {
+ return "'".str_replace("'", "'\\''", $argument)."'";
+ }
+ if (str_contains($argument, "\0")) {
+ $argument = str_replace("\0", '?', $argument);
+ }
+ if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) {
+ return $argument;
+ }
+ $argument = preg_replace('/(\\\\+)$/', '$1$1', $argument);
+
+ return '"'.str_replace(['"', '^', '%', '!', "\n"], ['""', '"^^"', '"^%"', '"^!"', '!LF!'], $argument).'"';
+ }
+
+ private function replacePlaceholders(string $commandline, array $env)
+ {
+ return preg_replace_callback('/"\$\{:([_a-zA-Z]++[_a-zA-Z0-9]*+)\}"/', function ($matches) use ($commandline, $env) {
+ if (!isset($env[$matches[1]]) || false === $env[$matches[1]]) {
+ throw new InvalidArgumentException(sprintf('Command line is missing a value for parameter "%s": ', $matches[1]).$commandline);
+ }
+
+ return $this->escapeArgument($env[$matches[1]]);
+ }, $commandline);
+ }
+
+ private function getDefaultEnv(): array
+ {
+ $env = getenv();
+ $env = ('\\' === \DIRECTORY_SEPARATOR ? array_intersect_ukey($env, $_SERVER, 'strcasecmp') : array_intersect_key($env, $_SERVER)) ?: $env;
+
+ return $_ENV + ('\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($env, $_ENV, 'strcasecmp') : $env);
+ }
+}
diff --git a/vendor/symfony/process/ProcessUtils.php b/vendor/symfony/process/ProcessUtils.php
new file mode 100644
index 0000000..6cc7a61
--- /dev/null
+++ b/vendor/symfony/process/ProcessUtils.php
@@ -0,0 +1,69 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process;
+
+use Symfony\Component\Process\Exception\InvalidArgumentException;
+
+/**
+ * ProcessUtils is a bunch of utility methods.
+ *
+ * This class contains static methods only and is not meant to be instantiated.
+ *
+ * @author Martin Hasoň <martin.hason@gmail.com>
+ */
+class ProcessUtils
+{
+ /**
+ * This class should not be instantiated.
+ */
+ private function __construct()
+ {
+ }
+
+ /**
+ * Validates and normalizes a Process input.
+ *
+ * @param string $caller The name of method call that validates the input
+ * @param mixed $input The input to validate
+ *
+ * @return mixed
+ *
+ * @throws InvalidArgumentException In case the input is not valid
+ */
+ public static function validateInput(string $caller, $input)
+ {
+ if (null !== $input) {
+ if (\is_resource($input)) {
+ return $input;
+ }
+ if (\is_string($input)) {
+ return $input;
+ }
+ if (is_scalar($input)) {
+ return (string) $input;
+ }
+ if ($input instanceof Process) {
+ return $input->getIterator($input::ITER_SKIP_ERR);
+ }
+ if ($input instanceof \Iterator) {
+ return $input;
+ }
+ if ($input instanceof \Traversable) {
+ return new \IteratorIterator($input);
+ }
+
+ throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller));
+ }
+
+ return $input;
+ }
+}
diff --git a/vendor/symfony/process/README.md b/vendor/symfony/process/README.md
new file mode 100644
index 0000000..8777de4
--- /dev/null
+++ b/vendor/symfony/process/README.md
@@ -0,0 +1,28 @@
+Process Component
+=================
+
+The Process component executes commands in sub-processes.
+
+Sponsor
+-------
+
+The Process component for Symfony 5.4/6.0 is [backed][1] by [SensioLabs][2].
+
+As the creator of Symfony, SensioLabs supports companies using Symfony, with an
+offering encompassing consultancy, expertise, services, training, and technical
+assistance to ensure the success of web application development projects.
+
+Help Symfony by [sponsoring][3] its development!
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/process.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
+
+[1]: https://symfony.com/backers
+[2]: https://sensiolabs.com
+[3]: https://symfony.com/sponsor
diff --git a/vendor/symfony/process/composer.json b/vendor/symfony/process/composer.json
new file mode 100644
index 0000000..1669eba
--- /dev/null
+++ b/vendor/symfony/process/composer.json
@@ -0,0 +1,29 @@
+{
+ "name": "symfony/process",
+ "type": "library",
+ "description": "Executes commands in sub-processes",
+ "keywords": [],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\Process\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/vendor/symfony/service-contracts/.gitignore b/vendor/symfony/service-contracts/.gitignore
new file mode 100644
index 0000000..c49a5d8
--- /dev/null
+++ b/vendor/symfony/service-contracts/.gitignore
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
diff --git a/vendor/symfony/service-contracts/Attribute/Required.php b/vendor/symfony/service-contracts/Attribute/Required.php
new file mode 100644
index 0000000..9df8511
--- /dev/null
+++ b/vendor/symfony/service-contracts/Attribute/Required.php
@@ -0,0 +1,25 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service\Attribute;
+
+/**
+ * A required dependency.
+ *
+ * This attribute indicates that a property holds a required dependency. The annotated property or method should be
+ * considered during the instantiation process of the containing class.
+ *
+ * @author Alexander M. Turek <me@derrabus.de>
+ */
+#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)]
+final class Required
+{
+}
diff --git a/vendor/symfony/service-contracts/Attribute/SubscribedService.php b/vendor/symfony/service-contracts/Attribute/SubscribedService.php
new file mode 100644
index 0000000..10d1bc3
--- /dev/null
+++ b/vendor/symfony/service-contracts/Attribute/SubscribedService.php
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service\Attribute;
+
+use Symfony\Contracts\Service\ServiceSubscriberTrait;
+
+/**
+ * Use with {@see ServiceSubscriberTrait} to mark a method's return type
+ * as a subscribed service.
+ *
+ * @author Kevin Bond <kevinbond@gmail.com>
+ */
+#[\Attribute(\Attribute::TARGET_METHOD)]
+final class SubscribedService
+{
+ /**
+ * @param string|null $key The key to use for the service
+ * If null, use "ClassName::methodName"
+ */
+ public function __construct(
+ public ?string $key = null
+ ) {
+ }
+}
diff --git a/vendor/symfony/service-contracts/CHANGELOG.md b/vendor/symfony/service-contracts/CHANGELOG.md
new file mode 100644
index 0000000..7932e26
--- /dev/null
+++ b/vendor/symfony/service-contracts/CHANGELOG.md
@@ -0,0 +1,5 @@
+CHANGELOG
+=========
+
+The changelog is maintained for all Symfony contracts at the following URL:
+https://github.com/symfony/contracts/blob/main/CHANGELOG.md
diff --git a/vendor/symfony/service-contracts/LICENSE b/vendor/symfony/service-contracts/LICENSE
new file mode 100644
index 0000000..74cdc2d
--- /dev/null
+++ b/vendor/symfony/service-contracts/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2018-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/service-contracts/README.md b/vendor/symfony/service-contracts/README.md
new file mode 100644
index 0000000..41e054a
--- /dev/null
+++ b/vendor/symfony/service-contracts/README.md
@@ -0,0 +1,9 @@
+Symfony Service Contracts
+=========================
+
+A set of abstractions extracted out of the Symfony components.
+
+Can be used to build on semantics that the Symfony components proved useful - and
+that already have battle tested implementations.
+
+See https://github.com/symfony/contracts/blob/main/README.md for more information.
diff --git a/vendor/symfony/service-contracts/ResetInterface.php b/vendor/symfony/service-contracts/ResetInterface.php
new file mode 100644
index 0000000..1af1075
--- /dev/null
+++ b/vendor/symfony/service-contracts/ResetInterface.php
@@ -0,0 +1,30 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service;
+
+/**
+ * Provides a way to reset an object to its initial state.
+ *
+ * When calling the "reset()" method on an object, it should be put back to its
+ * initial state. This usually means clearing any internal buffers and forwarding
+ * the call to internal dependencies. All properties of the object should be put
+ * back to the same state it had when it was first ready to use.
+ *
+ * This method could be called, for example, to recycle objects that are used as
+ * services, so that they can be used to handle several requests in the same
+ * process loop (note that we advise making your services stateless instead of
+ * implementing this interface when possible.)
+ */
+interface ResetInterface
+{
+ public function reset();
+}
diff --git a/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/vendor/symfony/service-contracts/ServiceLocatorTrait.php
new file mode 100644
index 0000000..74dfa43
--- /dev/null
+++ b/vendor/symfony/service-contracts/ServiceLocatorTrait.php
@@ -0,0 +1,128 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service;
+
+use Psr\Container\ContainerExceptionInterface;
+use Psr\Container\NotFoundExceptionInterface;
+
+// Help opcache.preload discover always-needed symbols
+class_exists(ContainerExceptionInterface::class);
+class_exists(NotFoundExceptionInterface::class);
+
+/**
+ * A trait to help implement ServiceProviderInterface.
+ *
+ * @author Robin Chalas <robin.chalas@gmail.com>
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+trait ServiceLocatorTrait
+{
+ private $factories;
+ private $loading = [];
+ private $providedTypes;
+
+ /**
+ * @param callable[] $factories
+ */
+ public function __construct(array $factories)
+ {
+ $this->factories = $factories;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return bool
+ */
+ public function has(string $id)
+ {
+ return isset($this->factories[$id]);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return mixed
+ */
+ public function get(string $id)
+ {
+ if (!isset($this->factories[$id])) {
+ throw $this->createNotFoundException($id);
+ }
+
+ if (isset($this->loading[$id])) {
+ $ids = array_values($this->loading);
+ $ids = \array_slice($this->loading, array_search($id, $ids));
+ $ids[] = $id;
+
+ throw $this->createCircularReferenceException($id, $ids);
+ }
+
+ $this->loading[$id] = $id;
+ try {
+ return $this->factories[$id]($this);
+ } finally {
+ unset($this->loading[$id]);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getProvidedServices(): array
+ {
+ if (null === $this->providedTypes) {
+ $this->providedTypes = [];
+
+ foreach ($this->factories as $name => $factory) {
+ if (!\is_callable($factory)) {
+ $this->providedTypes[$name] = '?';
+ } else {
+ $type = (new \ReflectionFunction($factory))->getReturnType();
+
+ $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?';
+ }
+ }
+ }
+
+ return $this->providedTypes;
+ }
+
+ private function createNotFoundException(string $id): NotFoundExceptionInterface
+ {
+ if (!$alternatives = array_keys($this->factories)) {
+ $message = 'is empty...';
+ } else {
+ $last = array_pop($alternatives);
+ if ($alternatives) {
+ $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last);
+ } else {
+ $message = sprintf('only knows about the "%s" service.', $last);
+ }
+ }
+
+ if ($this->loading) {
+ $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message);
+ } else {
+ $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message);
+ }
+
+ return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface {
+ };
+ }
+
+ private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface
+ {
+ return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface {
+ };
+ }
+}
diff --git a/vendor/symfony/service-contracts/ServiceProviderInterface.php b/vendor/symfony/service-contracts/ServiceProviderInterface.php
new file mode 100644
index 0000000..c60ad0b
--- /dev/null
+++ b/vendor/symfony/service-contracts/ServiceProviderInterface.php
@@ -0,0 +1,36 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service;
+
+use Psr\Container\ContainerInterface;
+
+/**
+ * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container.
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ * @author Mateusz Sip <mateusz.sip@gmail.com>
+ */
+interface ServiceProviderInterface extends ContainerInterface
+{
+ /**
+ * Returns an associative array of service types keyed by the identifiers provided by the current container.
+ *
+ * Examples:
+ *
+ * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface
+ * * ['foo' => '?'] means the container provides service name "foo" of unspecified type
+ * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null
+ *
+ * @return string[] The provided service types, keyed by service names
+ */
+ public function getProvidedServices(): array;
+}
diff --git a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/vendor/symfony/service-contracts/ServiceSubscriberInterface.php
new file mode 100644
index 0000000..098ab90
--- /dev/null
+++ b/vendor/symfony/service-contracts/ServiceSubscriberInterface.php
@@ -0,0 +1,53 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service;
+
+/**
+ * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method.
+ *
+ * The getSubscribedServices method returns an array of service types required by such instances,
+ * optionally keyed by the service names used internally. Service types that start with an interrogation
+ * mark "?" are optional, while the other ones are mandatory service dependencies.
+ *
+ * The injected service locators SHOULD NOT allow access to any other services not specified by the method.
+ *
+ * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally.
+ * This interface does not dictate any injection method for these service locators, although constructor
+ * injection is recommended.
+ *
+ * @author Nicolas Grekas <p@tchwork.com>
+ */
+interface ServiceSubscriberInterface
+{
+ /**
+ * Returns an array of service types required by such instances, optionally keyed by the service names used internally.
+ *
+ * For mandatory dependencies:
+ *
+ * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name
+ * internally to fetch a service which must implement Psr\Log\LoggerInterface.
+ * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name
+ * internally to fetch an iterable of Psr\Log\LoggerInterface instances.
+ * * ['Psr\Log\LoggerInterface'] is a shortcut for
+ * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface']
+ *
+ * otherwise:
+ *
+ * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency
+ * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency
+ * * ['?Psr\Log\LoggerInterface'] is a shortcut for
+ * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface']
+ *
+ * @return string[] The required service types, optionally keyed by service names
+ */
+ public static function getSubscribedServices();
+}
diff --git a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php
new file mode 100644
index 0000000..16e3eb2
--- /dev/null
+++ b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php
@@ -0,0 +1,109 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service;
+
+use Psr\Container\ContainerInterface;
+use Symfony\Contracts\Service\Attribute\SubscribedService;
+
+/**
+ * Implementation of ServiceSubscriberInterface that determines subscribed services from
+ * method return types. Service ids are available as "ClassName::methodName".
+ *
+ * @author Kevin Bond <kevinbond@gmail.com>
+ */
+trait ServiceSubscriberTrait
+{
+ /** @var ContainerInterface */
+ protected $container;
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getSubscribedServices(): array
+ {
+ $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : [];
+ $attributeOptIn = false;
+
+ if (\PHP_VERSION_ID >= 80000) {
+ foreach ((new \ReflectionClass(self::class))->getMethods() as $method) {
+ if (self::class !== $method->getDeclaringClass()->name) {
+ continue;
+ }
+
+ if (!$attribute = $method->getAttributes(SubscribedService::class)[0] ?? null) {
+ continue;
+ }
+
+ if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
+ throw new \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name));
+ }
+
+ if (!$returnType = $method->getReturnType()) {
+ throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class));
+ }
+
+ $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
+
+ if ($returnType->allowsNull()) {
+ $serviceId = '?'.$serviceId;
+ }
+
+ $services[$attribute->newInstance()->key ?? self::class.'::'.$method->name] = $serviceId;
+ $attributeOptIn = true;
+ }
+ }
+
+ if (!$attributeOptIn) {
+ foreach ((new \ReflectionClass(self::class))->getMethods() as $method) {
+ if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) {
+ continue;
+ }
+
+ if (self::class !== $method->getDeclaringClass()->name) {
+ continue;
+ }
+
+ if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) {
+ continue;
+ }
+
+ if ($returnType->isBuiltin()) {
+ continue;
+ }
+
+ if (\PHP_VERSION_ID >= 80000) {
+ trigger_deprecation('symfony/service-contracts', '2.5', 'Using "%s" in "%s" without using the "%s" attribute on any method is deprecated.', ServiceSubscriberTrait::class, self::class, SubscribedService::class);
+ }
+
+ $services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType);
+ }
+ }
+
+ return $services;
+ }
+
+ /**
+ * @required
+ *
+ * @return ContainerInterface|null
+ */
+ public function setContainer(ContainerInterface $container)
+ {
+ $this->container = $container;
+
+ if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) {
+ return parent::setContainer($container);
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php
new file mode 100644
index 0000000..2a1b565
--- /dev/null
+++ b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php
@@ -0,0 +1,95 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Contracts\Service\Test;
+
+use PHPUnit\Framework\TestCase;
+use Psr\Container\ContainerInterface;
+use Symfony\Contracts\Service\ServiceLocatorTrait;
+
+abstract class ServiceLocatorTest extends TestCase
+{
+ /**
+ * @return ContainerInterface
+ */
+ protected function getServiceLocator(array $factories)
+ {
+ return new class($factories) implements ContainerInterface {
+ use ServiceLocatorTrait;
+ };
+ }
+
+ public function testHas()
+ {
+ $locator = $this->getServiceLocator([
+ 'foo' => function () { return 'bar'; },
+ 'bar' => function () { return 'baz'; },
+ function () { return 'dummy'; },
+ ]);
+
+ $this->assertTrue($locator->has('foo'));
+ $this->assertTrue($locator->has('bar'));
+ $this->assertFalse($locator->has('dummy'));
+ }
+
+ public function testGet()
+ {
+ $locator = $this->getServiceLocator([
+ 'foo' => function () { return 'bar'; },
+ 'bar' => function () { return 'baz'; },
+ ]);
+
+ $this->assertSame('bar', $locator->get('foo'));
+ $this->assertSame('baz', $locator->get('bar'));
+ }
+
+ public function testGetDoesNotMemoize()
+ {
+ $i = 0;
+ $locator = $this->getServiceLocator([
+ 'foo' => function () use (&$i) {
+ ++$i;
+
+ return 'bar';
+ },
+ ]);
+
+ $this->assertSame('bar', $locator->get('foo'));
+ $this->assertSame('bar', $locator->get('foo'));
+ $this->assertSame(2, $i);
+ }
+
+ public function testThrowsOnUndefinedInternalService()
+ {
+ if (!$this->getExpectedException()) {
+ $this->expectException(\Psr\Container\NotFoundExceptionInterface::class);
+ $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
+ }
+ $locator = $this->getServiceLocator([
+ 'foo' => function () use (&$locator) { return $locator->get('bar'); },
+ ]);
+
+ $locator->get('foo');
+ }
+
+ public function testThrowsOnCircularReference()
+ {
+ $this->expectException(\Psr\Container\ContainerExceptionInterface::class);
+ $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
+ $locator = $this->getServiceLocator([
+ 'foo' => function () use (&$locator) { return $locator->get('bar'); },
+ 'bar' => function () use (&$locator) { return $locator->get('baz'); },
+ 'baz' => function () use (&$locator) { return $locator->get('bar'); },
+ ]);
+
+ $locator->get('foo');
+ }
+}
diff --git a/vendor/symfony/service-contracts/composer.json b/vendor/symfony/service-contracts/composer.json
new file mode 100644
index 0000000..f058637
--- /dev/null
+++ b/vendor/symfony/service-contracts/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "symfony/service-contracts",
+ "type": "library",
+ "description": "Generic abstractions related to writing services",
+ "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.1",
+ "symfony/deprecation-contracts": "^2.1|^3"
+ },
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Contracts\\Service\\": "" }
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ }
+}
diff --git a/vendor/symfony/stopwatch/CHANGELOG.md b/vendor/symfony/stopwatch/CHANGELOG.md
new file mode 100644
index 0000000..f2fd7d0
--- /dev/null
+++ b/vendor/symfony/stopwatch/CHANGELOG.md
@@ -0,0 +1,24 @@
+CHANGELOG
+=========
+
+5.2
+---
+
+ * Add `name` argument to the `StopWatchEvent` constructor, accessible via a new `StopwatchEvent::getName()`
+
+5.0.0
+-----
+
+ * Removed support for passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead.
+
+4.4.0
+-----
+
+ * Deprecated passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead.
+
+3.4.0
+-----
+
+ * added the `Stopwatch::reset()` method
+ * allowed to measure sub-millisecond times by introducing an argument to the
+ constructor of `Stopwatch`
diff --git a/vendor/symfony/stopwatch/LICENSE b/vendor/symfony/stopwatch/LICENSE
new file mode 100644
index 0000000..88bf75b
--- /dev/null
+++ b/vendor/symfony/stopwatch/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2022 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/symfony/stopwatch/README.md b/vendor/symfony/stopwatch/README.md
new file mode 100644
index 0000000..13a9dfa
--- /dev/null
+++ b/vendor/symfony/stopwatch/README.md
@@ -0,0 +1,42 @@
+Stopwatch Component
+===================
+
+The Stopwatch component provides a way to profile code.
+
+Getting Started
+---------------
+
+```
+$ composer require symfony/stopwatch
+```
+
+```php
+use Symfony\Component\Stopwatch\Stopwatch;
+
+$stopwatch = new Stopwatch();
+
+// optionally group events into sections (e.g. phases of the execution)
+$stopwatch->openSection();
+
+// starts event named 'eventName'
+$stopwatch->start('eventName');
+
+// ... run your code here
+
+// optionally, start a new "lap" time
+$stopwatch->lap('foo');
+
+// ... run your code here
+
+$event = $stopwatch->stop('eventName');
+
+$stopwatch->stopSection('phase_1');
+```
+
+Resources
+---------
+
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/vendor/symfony/stopwatch/Section.php b/vendor/symfony/stopwatch/Section.php
new file mode 100644
index 0000000..56cdc6f
--- /dev/null
+++ b/vendor/symfony/stopwatch/Section.php
@@ -0,0 +1,185 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Stopwatch;
+
+/**
+ * Stopwatch section.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Section
+{
+ /**
+ * @var StopwatchEvent[]
+ */
+ private $events = [];
+
+ /**
+ * @var float|null
+ */
+ private $origin;
+
+ /**
+ * @var bool
+ */
+ private $morePrecision;
+
+ /**
+ * @var string
+ */
+ private $id;
+
+ /**
+ * @var Section[]
+ */
+ private $children = [];
+
+ /**
+ * @param float|null $origin Set the origin of the events in this section, use null to set their origin to their start time
+ * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
+ */
+ public function __construct(float $origin = null, bool $morePrecision = false)
+ {
+ $this->origin = $origin;
+ $this->morePrecision = $morePrecision;
+ }
+
+ /**
+ * Returns the child section.
+ *
+ * @return self|null
+ */
+ public function get(string $id)
+ {
+ foreach ($this->children as $child) {
+ if ($id === $child->getId()) {
+ return $child;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Creates or re-opens a child section.
+ *
+ * @param string|null $id Null to create a new section, the identifier to re-open an existing one
+ *
+ * @return self
+ */
+ public function open(?string $id)
+ {
+ if (null === $id || null === $session = $this->get($id)) {
+ $session = $this->children[] = new self(microtime(true) * 1000, $this->morePrecision);
+ }
+
+ return $session;
+ }
+
+ /**
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * Sets the session identifier.
+ *
+ * @return $this
+ */
+ public function setId(string $id)
+ {
+ $this->id = $id;
+
+ return $this;
+ }
+
+ /**
+ * Starts an event.
+ *
+ * @return StopwatchEvent
+ */
+ public function startEvent(string $name, ?string $category)
+ {
+ if (!isset($this->events[$name])) {
+ $this->events[$name] = new StopwatchEvent($this->origin ?: microtime(true) * 1000, $category, $this->morePrecision, $name);
+ }
+
+ return $this->events[$name]->start();
+ }
+
+ /**
+ * Checks if the event was started.
+ *
+ * @return bool
+ */
+ public function isEventStarted(string $name)
+ {
+ return isset($this->events[$name]) && $this->events[$name]->isStarted();
+ }
+
+ /**
+ * Stops an event.
+ *
+ * @return StopwatchEvent
+ *
+ * @throws \LogicException When the event has not been started
+ */
+ public function stopEvent(string $name)
+ {
+ if (!isset($this->events[$name])) {
+ throw new \LogicException(sprintf('Event "%s" is not started.', $name));
+ }
+
+ return $this->events[$name]->stop();
+ }
+
+ /**
+ * Stops then restarts an event.
+ *
+ * @return StopwatchEvent
+ *
+ * @throws \LogicException When the event has not been started
+ */
+ public function lap(string $name)
+ {
+ return $this->stopEvent($name)->start();
+ }
+
+ /**
+ * Returns a specific event by name.
+ *
+ * @return StopwatchEvent
+ *
+ * @throws \LogicException When the event is not known
+ */
+ public function getEvent(string $name)
+ {
+ if (!isset($this->events[$name])) {
+ throw new \LogicException(sprintf('Event "%s" is not known.', $name));
+ }
+
+ return $this->events[$name];
+ }
+
+ /**
+ * Returns the events from this section.
+ *
+ * @return StopwatchEvent[]
+ */
+ public function getEvents()
+ {
+ return $this->events;
+ }
+}
diff --git a/vendor/symfony/stopwatch/Stopwatch.php b/vendor/symfony/stopwatch/Stopwatch.php
new file mode 100644
index 0000000..2f46c59
--- /dev/null
+++ b/vendor/symfony/stopwatch/Stopwatch.php
@@ -0,0 +1,166 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Stopwatch;
+
+use Symfony\Contracts\Service\ResetInterface;
+
+// Help opcache.preload discover always-needed symbols
+class_exists(Section::class);
+
+/**
+ * Stopwatch provides a way to profile code.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Stopwatch implements ResetInterface
+{
+ /**
+ * @var bool
+ */
+ private $morePrecision;
+
+ /**
+ * @var Section[]
+ */
+ private $sections;
+
+ /**
+ * @var Section[]
+ */
+ private $activeSections;
+
+ /**
+ * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
+ */
+ public function __construct(bool $morePrecision = false)
+ {
+ $this->morePrecision = $morePrecision;
+ $this->reset();
+ }
+
+ /**
+ * @return Section[]
+ */
+ public function getSections()
+ {
+ return $this->sections;
+ }
+
+ /**
+ * Creates a new section or re-opens an existing section.
+ *
+ * @param string|null $id The id of the session to re-open, null to create a new one
+ *
+ * @throws \LogicException When the section to re-open is not reachable
+ */
+ public function openSection(string $id = null)
+ {
+ $current = end($this->activeSections);
+
+ if (null !== $id && null === $current->get($id)) {
+ throw new \LogicException(sprintf('The section "%s" has been started at an other level and cannot be opened.', $id));
+ }
+
+ $this->start('__section__.child', 'section');
+ $this->activeSections[] = $current->open($id);
+ $this->start('__section__');
+ }
+
+ /**
+ * Stops the last started section.
+ *
+ * The id parameter is used to retrieve the events from this section.
+ *
+ * @see getSectionEvents()
+ *
+ * @throws \LogicException When there's no started section to be stopped
+ */
+ public function stopSection(string $id)
+ {
+ $this->stop('__section__');
+
+ if (1 == \count($this->activeSections)) {
+ throw new \LogicException('There is no started section to stop.');
+ }
+
+ $this->sections[$id] = array_pop($this->activeSections)->setId($id);
+ $this->stop('__section__.child');
+ }
+
+ /**
+ * Starts an event.
+ *
+ * @return StopwatchEvent
+ */
+ public function start(string $name, string $category = null)
+ {
+ return end($this->activeSections)->startEvent($name, $category);
+ }
+
+ /**
+ * Checks if the event was started.
+ *
+ * @return bool
+ */
+ public function isStarted(string $name)
+ {
+ return end($this->activeSections)->isEventStarted($name);
+ }
+
+ /**
+ * Stops an event.
+ *
+ * @return StopwatchEvent
+ */
+ public function stop(string $name)
+ {
+ return end($this->activeSections)->stopEvent($name);
+ }
+
+ /**
+ * Stops then restarts an event.
+ *
+ * @return StopwatchEvent
+ */
+ public function lap(string $name)
+ {
+ return end($this->activeSections)->stopEvent($name)->start();
+ }
+
+ /**
+ * Returns a specific event by name.
+ *
+ * @return StopwatchEvent
+ */
+ public function getEvent(string $name)
+ {
+ return end($this->activeSections)->getEvent($name);
+ }
+
+ /**
+ * Gets all events for a given section.
+ *
+ * @return StopwatchEvent[]
+ */
+ public function getSectionEvents(string $id)
+ {
+ return isset($this->sections[$id]) ? $this->sections[$id]->getEvents() : [];
+ }
+
+ /**
+ * Resets the stopwatch to its original state.
+ */
+ public function reset()
+ {
+ $this->sections = $this->activeSections = ['__root__' => new Section(null, $this->morePrecision)];
+ }
+}
diff --git a/vendor/symfony/stopwatch/StopwatchEvent.php b/vendor/symfony/stopwatch/StopwatchEvent.php
new file mode 100644
index 0000000..945bc70
--- /dev/null
+++ b/vendor/symfony/stopwatch/StopwatchEvent.php
@@ -0,0 +1,258 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Stopwatch;
+
+/**
+ * Represents an Event managed by Stopwatch.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class StopwatchEvent
+{
+ /**
+ * @var StopwatchPeriod[]
+ */
+ private $periods = [];
+
+ /**
+ * @var float
+ */
+ private $origin;
+
+ /**
+ * @var string
+ */
+ private $category;
+
+ /**
+ * @var bool
+ */
+ private $morePrecision;
+
+ /**
+ * @var float[]
+ */
+ private $started = [];
+
+ /**
+ * @var string
+ */
+ private $name;
+
+ /**
+ * @param float $origin The origin time in milliseconds
+ * @param string|null $category The event category or null to use the default
+ * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
+ * @param string|null $name The event name or null to define the name as default
+ *
+ * @throws \InvalidArgumentException When the raw time is not valid
+ */
+ public function __construct(float $origin, string $category = null, bool $morePrecision = false, string $name = null)
+ {
+ $this->origin = $this->formatTime($origin);
+ $this->category = \is_string($category) ? $category : 'default';
+ $this->morePrecision = $morePrecision;
+ $this->name = $name ?? 'default';
+ }
+
+ /**
+ * Gets the category.
+ *
+ * @return string
+ */
+ public function getCategory()
+ {
+ return $this->category;
+ }
+
+ /**
+ * Gets the origin in milliseconds.
+ *
+ * @return float
+ */
+ public function getOrigin()
+ {
+ return $this->origin;
+ }
+
+ /**
+ * Starts a new event period.
+ *
+ * @return $this
+ */
+ public function start()
+ {
+ $this->started[] = $this->getNow();
+
+ return $this;
+ }
+
+ /**
+ * Stops the last started event period.
+ *
+ * @return $this
+ *
+ * @throws \LogicException When stop() is called without a matching call to start()
+ */
+ public function stop()
+ {
+ if (!\count($this->started)) {
+ throw new \LogicException('stop() called but start() has not been called before.');
+ }
+
+ $this->periods[] = new StopwatchPeriod(array_pop($this->started), $this->getNow(), $this->morePrecision);
+
+ return $this;
+ }
+
+ /**
+ * Checks if the event was started.
+ *
+ * @return bool
+ */
+ public function isStarted()
+ {
+ return !empty($this->started);
+ }
+
+ /**
+ * Stops the current period and then starts a new one.
+ *
+ * @return $this
+ */
+ public function lap()
+ {
+ return $this->stop()->start();
+ }
+
+ /**
+ * Stops all non already stopped periods.
+ */
+ public function ensureStopped()
+ {
+ while (\count($this->started)) {
+ $this->stop();
+ }
+ }
+
+ /**
+ * Gets all event periods.
+ *
+ * @return StopwatchPeriod[]
+ */
+ public function getPeriods()
+ {
+ return $this->periods;
+ }
+
+ /**
+ * Gets the relative time of the start of the first period in milliseconds.
+ *
+ * @return int|float
+ */
+ public function getStartTime()
+ {
+ if (isset($this->periods[0])) {
+ return $this->periods[0]->getStartTime();
+ }
+
+ if ($this->started) {
+ return $this->started[0];
+ }
+
+ return 0;
+ }
+
+ /**
+ * Gets the relative time of the end of the last period in milliseconds.
+ *
+ * @return int|float
+ */
+ public function getEndTime()
+ {
+ $count = \count($this->periods);
+
+ return $count ? $this->periods[$count - 1]->getEndTime() : 0;
+ }
+
+ /**
+ * Gets the duration of the events in milliseconds (including all periods).
+ *
+ * @return int|float
+ */
+ public function getDuration()
+ {
+ $periods = $this->periods;
+ $left = \count($this->started);
+
+ for ($i = $left - 1; $i >= 0; --$i) {
+ $periods[] = new StopwatchPeriod($this->started[$i], $this->getNow(), $this->morePrecision);
+ }
+
+ $total = 0;
+ foreach ($periods as $period) {
+ $total += $period->getDuration();
+ }
+
+ return $total;
+ }
+
+ /**
+ * Gets the max memory usage of all periods in bytes.
+ *
+ * @return int
+ */
+ public function getMemory()
+ {
+ $memory = 0;
+ foreach ($this->periods as $period) {
+ if ($period->getMemory() > $memory) {
+ $memory = $period->getMemory();
+ }
+ }
+
+ return $memory;
+ }
+
+ /**
+ * Return the current time relative to origin in milliseconds.
+ *
+ * @return float
+ */
+ protected function getNow()
+ {
+ return $this->formatTime(microtime(true) * 1000 - $this->origin);
+ }
+
+ /**
+ * Formats a time.
+ *
+ * @throws \InvalidArgumentException When the raw time is not valid
+ */
+ private function formatTime(float $time): float
+ {
+ return round($time, 1);
+ }
+
+ /**
+ * Gets the event name.
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function __toString(): string
+ {
+ return sprintf('%s/%s: %.2F MiB - %d ms', $this->getCategory(), $this->getName(), $this->getMemory() / 1024 / 1024, $this->getDuration());
+ }
+}
diff --git a/vendor/symfony/stopwatch/StopwatchPeriod.php b/vendor/symfony/stopwatch/StopwatchPeriod.php
new file mode 100644
index 0000000..7a7ae1a
--- /dev/null
+++ b/vendor/symfony/stopwatch/StopwatchPeriod.php
@@ -0,0 +1,81 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Stopwatch;
+
+/**
+ * Represents an Period for an Event.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class StopwatchPeriod
+{
+ private $start;
+ private $end;
+ private $memory;
+
+ /**
+ * @param int|float $start The relative time of the start of the period (in milliseconds)
+ * @param int|float $end The relative time of the end of the period (in milliseconds)
+ * @param bool $morePrecision If true, time is stored as float to keep the original microsecond precision
+ */
+ public function __construct($start, $end, bool $morePrecision = false)
+ {
+ $this->start = $morePrecision ? (float) $start : (int) $start;
+ $this->end = $morePrecision ? (float) $end : (int) $end;
+ $this->memory = memory_get_usage(true);
+ }
+
+ /**
+ * Gets the relative time of the start of the period in milliseconds.
+ *
+ * @return int|float
+ */
+ public function getStartTime()
+ {
+ return $this->start;
+ }
+
+ /**
+ * Gets the relative time of the end of the period in milliseconds.
+ *
+ * @return int|float
+ */
+ public function getEndTime()
+ {
+ return $this->end;
+ }
+
+ /**
+ * Gets the time spent in this period in milliseconds.
+ *
+ * @return int|float
+ */
+ public function getDuration()
+ {
+ return $this->end - $this->start;
+ }
+
+ /**
+ * Gets the memory usage in bytes.
+ *
+ * @return int
+ */
+ public function getMemory()
+ {
+ return $this->memory;
+ }
+
+ public function __toString(): string
+ {
+ return sprintf('%.2F MiB - %d ms', $this->getMemory() / 1024 / 1024, $this->getDuration());
+ }
+}
diff --git a/vendor/symfony/stopwatch/composer.json b/vendor/symfony/stopwatch/composer.json
new file mode 100644
index 0000000..ed918d3
--- /dev/null
+++ b/vendor/symfony/stopwatch/composer.json
@@ -0,0 +1,29 @@
+{
+ "name": "symfony/stopwatch",
+ "type": "library",
+ "description": "Provides a way to profile code",
+ "keywords": [],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/service-contracts": "^1|^2|^3"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\Stopwatch\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}