Special thanks to @jrf_nl for maintaining upstream #PHPCS - Coder would not be possible without her!

Are there any @phpcs sniffs available (maybe in third-party packages) that check for PER-CS 3.0 style?

I’m trying to avoid errors due to the abbreviated constructor (`{}`). So, if there’s a sniff just for that, I’d be happy. I’d prefer not to ignore all Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore errors.

#PHP #phpcs

I converted the procedural #Drupal hooks in a contrib module to OO in about 15 minutes (and a lot of that was making notes for the blog post). #Rector and #PHPCS make it quick and easy! https://www.noreiko.com/blog/converting-hooks-oo-methods-made-easy
Converting hooks to OO methods made easy | Joachim's blog

#phpcs rocks! Has anyone ever tried to write a custom sniff that forbids the usage of a specific function inside other functions (other functions by name pattern)?@phpcs eventually?

Or is that just a crazy idea? I couldn't find any documentation (too uncommon, I guess). And no similar existing sniff (as far as I can see).

So any hint is welcome. And boosts might also help. 🙏 #PHP

WPCS Vs VIP Coding Standards: What’s The Difference? — Mehul Gohil

At first glance, WPCS vs VIP Coding Standards may feel like a dry technical distinction. After all, code is code, right? As long as it works, why bother with

Mehul Gohil
Listening to @jrf_nl talk about #PHPCS at #PHPAmersfoort

Hey, #OpenSource and #PHP friends!

@jrf_nl, maintainer of #PHP_CodeSniffer is live-streaming the upgrade to the 4.0 branch of #PHPCS this week!

Such a fun idea! Come along and watch #FOSS in action!

https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/924

PHPCS 4.0: Open invitation to join live stream April 14, 15, 17 and 18, 2025 · Issue #924 · PHPCSStandards/PHP_CodeSniffer

As previously announced in #120, to have confidence in the PHPCS 4.0 release, I have been working behind the scenes to recreate the 4.0 branch as a fresh, improved branch with atomic and comprehens...

GitHub
How come there is no sniff for #phpcs that enforces $snake_case variables. By whatever reason it is, I need this and I can't find how to do it...

TIP: If you want to know how to integrate an existing PHPCS configuration into Tomas Votruba's excellent easy-coding-standard linting tool -> here you go : https://github.com/lgersman/docker-ecs-xdebug/blob/develop/ecs-config.php

The repo features a xdebug+vscode ready configuration for ecs including a custom WordPress Coding Standard derivate consumed by ecs.

#wordpress #ecs #easy-coding-standard #phpcs #lint

docker-ecs-xdebug/ecs-config.php at develop · lgersman/docker-ecs-xdebug

Evaluating wordpress coding standard PHPCS rules into easy coding standard. featuring dockerized php+xdebug - lgersman/docker-ecs-xdebug

GitHub

Maybe it's because I started writing vanilla HTML first before adding #PHP, and I was meticulous with code formatting before I was introduced to #PHPCS, but my brain still thinks about indentation in PHP as separate from HTML indentation.

I have yet to find a coding standard or sniff for this.