Opened 3 years ago
Closed 3 years ago
#55692 closed enhancement (fixed)
Extra space at the time of initialization of value
Reported by: | rajeshraval786 | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | coding-standards | Cc: |
Description
There has been extra space in the initialization of value in the admin-ajax.php file which should be removed as per coding standards.
Attachments (1)
Change History (4)
#1
@
3 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
- Version trunk deleted
Hi @rajeshraval786, welcome to Trac and thanks for working to ensure that WordPress Core adheres to the coding standard!
This equals sign is aligned with the equals sign in the assignment above it, so it's actually in accordance with the coding standard. Phew!
If you have ran composer install
on your checkout of the repository, you can run this in your terminal to check this file (or any file) against the coding standard:
# From /path/to/wordpress-develop/ vendor/bin/phpcs src/wp-admin/admin-ajax.php
- Before the patch, all will be fine.
- After the patch, this is the result:
156 | WARNING | [x] Equals sign not aligned with surrounding assignments; expected 12 spaces but found 1 space
I'll close this ticket as invalid
as this is the expected alignment.
#2
@
3 years ago
- Milestone set to 6.1
- Resolution invalid deleted
- Status changed from closed to reopened
Hi there, welcome to WordPress Trac! Thanks for the ticket.
As noted above, 55692.patch is not quite correct, as the assignment needs to be aligned with the previous one.
However, we can both remove the extra space and avoid a WPCS warning by adding an empty line between the line in the patch and the assignment above, which should also make the block a bit more readable.
attached patch file with changes in admin-ajax.php file.