-
Notifications
You must be signed in to change notification settings - Fork 148
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
[CLEANUP] Autoformat the code #749
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure PHP-Fixer added the spaces after cast operators (somewhat against my taste). So we shouldn't be removing them again.
There's a string with arbitrary whitespace that needs manual post-reformatting to make it readable again.
Shouldn't the autoformat be done first on main
?
', | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The leading and trailing whitespace is arbitrary, and for readability. So the string content and closing quote should now be futher indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tests/Value/ValueTest.php
Outdated
@@ -39,7 +39,7 @@ public function parsesArithmeticInFunctions($operator) | |||
{ | |||
$subject = Value::parseValue(new ParserState('max(300px, 50vh ' . $operator . ' 10px);', Settings::create())); | |||
|
|||
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', (string) $subject); | |||
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', (string)$subject); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This surely contradicts PHP-Fixer, which added spaces after casts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
7353634
to
e6c77d7
Compare
Yes: #748 I'll mark this PR here as draft for now and do the corresponding changes there. |
1d5e320
to
7745173
Compare
This is the v8.x backport of #748.
7745173
to
287d536
Compare
…into fix/malformed-identifier * 'v8.x' of https://github.com/MyIntervals/PHP-CSS-Parser: (46 commits) [CLEANUP] Autoformat the code (MyIntervals#749) [TASK] Prepare the 8.7.0 release (MyIntervals#742) [BUGFIX] Fix another implictly nullable parameter (MyIntervals#751) [CLEANUP] Autoformat the changelog (MyIntervals#750) [TASK] Configure PHPUnit to be more strict (MyIntervals#744) [BUGFIX] Avoid implicit nullable parameters (MyIntervals#746) [BUGFIX] Revert broken support for multiple comments (MyIntervals#741) [TASK] Add some more tests for parsing comments (MyIntervals#739) [TASK] Use fixed PHPUnit versions (MyIntervals#726) [TASK] Update PHPUnit (MyIntervals#725) [TASK] State since which version code is `@internal`/`@deprecated` (MyIntervals#723) [TASK] Deprecate the expansion of shorthand properties (MyIntervals#719) [TASK] Mark parsing-internal classes and methods as `@internal` (MyIntervals#711) [TASK] Deprecate `Parser::setCharset()` and `Parser::getCharset()` (MyIntervals#703) [FEATURE] Run the tests on CI with PHP 8.4 as well (MyIntervals#701) [TASK] Run the tests with PHP versions up to 8.3 (MyIntervals#697) [TASK] Also allow higher versions of PHPUnit (MyIntervals#682) [BUGFIX] Fix type errors in PHP strict mode (MyIntervals#695) [TASK] Block installations on unsupported higher PHP versions (MyIntervals#692) [BUGFIX] Avoid using `setUp()` in testcases (MyIntervals#683) ...
This is the v8.x backport of #748.