Problem/Motivation

Found a formatting issue not being caught with PHPCS by adding multiple spaces between final and public.

Steps to reproduce

Add final to a public function with multiple spaces. Example:

  final      public static function create(ContainerInterface $container) {

Proposed resolution

Update appropriate standards.

Comments

michalsen created an issue. See original summary.

klausi’s picture

Thanks for reporting! Created upstream fix: https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/604

Not sure if we should fork this into Coder in the meantime.

fredden’s picture

> Not sure if we should fork this into Coder in the meantime.

This shouldn't be necessary since PHP_CodeSniffer is being actively maintained again now. I don't see any reason this fix couldn't make it into the next minor / feature release.

  • klausi authored 0cf8f8ea on 8.3.x
    fix(phpcs): Update to 3.12 to detect spaces after final and abstract...
klausi’s picture

Version: 8.x-3.8 » 8.3.x-dev
Status: Active » Fixed

PHPCS 3.12 was released that contains my fix, I bumped the version in Coder's composer file.

Status: Fixed » Closed (fixed)

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