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

[CLEANUP] Autoformat the code #749

Draft
wants to merge 1 commit into
base: v8.x
Choose a base branch
from
Draft

Conversation

oliverklee
Copy link
Contributor

This is the v8.x backport of #748.

Copy link
Contributor

@JakeQZ JakeQZ left a 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?

Comment on lines +47 to +48
',
],
Copy link
Contributor

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.

@@ -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);
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@oliverklee
Copy link
Contributor Author

Shouldn't the autoformat be done first on main?

Yes: #748

I'll mark this PR here as draft for now and do the corresponding changes there.

@oliverklee oliverklee marked this pull request as draft October 27, 2024 08:01
This is the v8.x backport of #748.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants