Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add rule for space after cast and space after Not #76

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

Merged
gmazzap merged 5 commits into version/2 from feature/55
Nov 17, 2023
Merged

Conversation

@antonioeatgoat
Copy link
Contributor

@antonioeatgoat antonioeatgoat commented Oct 27, 2023

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce?
New feature.

What is the current behavior?
There are no checks on spaces after cast or spaces after Not operator. All the following lines pass the test:

  • (string) $variable
  • (string)$variable
  • $variable = !$variable
  • $variable = ! $variable
  • if (!$variable)
  • if (! $variable)

What is the new behavior?
The space after cast and Not operator is mandatory. These are the only accepted cases:

  • (string) $variable
  • $variable = ! $variable
  • if (! $variable)

Does this PR introduce a breaking change?
No

Other information:
Both of the changes are addressable by phpcbf script.

@antonioeatgoat antonioeatgoat linked an issue Oct 27, 2023 that may be closed by this pull request
1 task
Copy link
Contributor

gmazzap commented Nov 15, 2023

@antonioeatgoat Thank you for the PR.
Can we split the space after the cast from the space after the "not" operator?

tyrann0us reacted with thumbs up emoji

Copy link
Contributor Author

@gmazzap done 👍

gmazzap reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gmazzap gmazzap gmazzap approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add check for whitespace after type casting

AltStyle によって変換されたページ (->オリジナル) /