Problem/Motivation

Delete double ";;"

Proposed resolution

Enable the Generic.CodeAnalysis.EmptyPHPStatement PHPCS sniff for this

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Generic.CodeAnalysis.EmptyPHPStatement enabled in phpcs.xml to prevent empty PHP statements.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pifagor created an issue. See original summary.

pifagor’s picture

Assigned: Unassigned » pifagor
pifagor’s picture

Assigned: pifagor » Unassigned
Status: Active » Needs review
FileSize
12.53 KB
voleger’s picture

Status: Needs review » Reviewed & tested by the community

Interesting. Looks good for me.
Wondering can we add the codesniffer rule for such a situation for Drupal coder?

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

There is a code sniffer thing for this already.

alexpott’s picture

Version: 8.8.x-dev » 8.7.x-dev
Status: Needs work » Needs review
FileSize
5.32 KB
16.62 KB

As a coding standard rule change targeting 8.7.x beta.

alexpott’s picture

Title: Delete double ";;" » Add Generic.CodeAnalysis.EmptyPHPStatement to phpcs rules to prevent empty PHP statements
pifagor’s picture

Status: Needs review » Reviewed & tested by the community

Looks good for me.

alexpott’s picture

Issue summary: View changes

  • catch committed f2eaf01 on 8.8.x
    Issue #3041985 by alexpott, pifagor: Add Generic.CodeAnalysis....

  • catch committed 0188838 on 8.7.x
    Issue #3041985 by alexpott, pifagor: Add Generic.CodeAnalysis....
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.8.x and cherry-picked to 8.7.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.