Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quoting in exception message #5507

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Fix quoting in exception message #5507

merged 1 commit into from
Mar 1, 2021

Conversation

gquemener
Copy link
Contributor

This PR improves consistency by quote-wrapping a list within an exception message.
I believe that this was a typo, as all the presented lists are wrapped in quote in the codebase:

src/Cache/Cache.php|120| implode('", "', $missingKeys)
src/Fixer/FunctionNotation/NativeFunctionInvocationFixer.php|250| throw new InvalidOptionsException(sprintf('Unknown set "%s", known sets are "%s".', $functionName, implode('", "', $sets)));
src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php|156| implode('", "', array_keys($default))
src/Fixer/Phpdoc/PhpdocReturnSelfReferenceFixer.php|164| implode('", "', self::$toTypes)
src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php|365| implode('", "', array_keys($thisFixer->staticMethods)),
src/Fixer/PhpUnit/PhpUnitTestCaseStaticMethodCallsFixer.php|376| implode('", "', array_keys($thisFixer->allowedValues)),
src/Fixer/Import/OrderedImportsFixer.php|259| implode('", "', $missing)
src/Fixer/Import/OrderedImportsFixer.php|268| implode('", "', $unknown)
src/Fixer/Operator/BinaryOperatorSpacesFixer.php|292| implode('", "', self::$supportedOperators),
src/Fixer/Operator/BinaryOperatorSpacesFixer.php|303| implode('", "', self::$allowedValues),
src/Fixer/ClassNotation/FinalInternalClassFixer.php|48| throw new InvalidFixerConfigurationException($this->getName(), sprintf('Annotation cannot be used in both the include and exclude list, got duplicates: "%s".', implode('", "', array_keys($intersect))));
src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php|216| implode('", "', self::SUPPORTED_TYPES),
src/Fixer/ClassNotation/ClassAttributesSeparationFixer.php|227| implode('", "', self::SUPPORTED_SPACINGS),
src/Console/ConfigurationResolver.php|299| implode('", "', array_keys($mapper)),
src/Console/ConfigurationResolver.php|359| 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)));
src/Console/ConfigurationResolver.php|446| implode('", "', $progressTypes)
src/Console/ConfigurationResolver.php|484| throw new InvalidConfigurationException(sprintf('The format "%s" is not defined, supported are "%s".', $format, implode('", "', $formats)));
src/Console/ConfigurationResolver.php|821| implode('", "', $modes)
src/FixerFactory.php|250| $message .= sprintf("\n- \"%s\" with \"%s\"", $fixer, implode('", "', $report[$fixer]));

Thanks!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.929% when pulling 1860853 on gquemener:exception-message-formatting into dd2e3d6 on FriendsOfPHP:2.18.

@keradus keradus added this to the 2.18.3 milestone Mar 1, 2021
@keradus
Copy link
Member

keradus commented Mar 1, 2021

Thank you @gquemener.

@keradus keradus merged commit 44f7ac8 into PHP-CS-Fixer:2.18 Mar 1, 2021
This was referenced Mar 11, 2021
This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants