PHPCSExtra icon indicating copy to clipboard operation
PHPCSExtra copied to clipboard

A collection of code standards for use with PHP_CodeSniffer

Results 14 PHPCSExtra issues
Sort by recently updated
recently updated
newest added

Report from https://github.com/squizlabs/PHP_CodeSniffer/issues/3465: > A new security advisory and associated article have recently been published about an attack vector called "Trojan Source" and someone already suggested to me to write...

Type: enhancement

Repost from https://github.com/squizlabs/PHP_CodeSniffer/issues/2259: > Inspired by [this Twitter thread](https://twitter.com/Rarst/status/1067354731293614080) and [this article](https://github.com/dseguy/clearPHP/blob/master/rules/no-unnecessary-string-concatenation.md). > > Using concatenation exponentially increases the memory PHP uses. While in a lot of cases, there is...

Type: enhancement
Feature: Universal

## Is your feature request related to a problem? Simplistic example: ``` $text = 'The product is free'; $price = '$0.5'; echo preg_replace( '/is free/', 'costs ' . $price, $text...

Type: enhancement
Feature: Universal

## Is your feature request related to a problem? PHP has tried to deprecate the use of `is_a()` a couple of times already, so it is probably a good idea...

Type: enhancement
Feature: Modernize

## Is your feature request related to a problem? It would be nice to have a sniff which could check that an alias name provided in import `use` statements and...

Type: enhancement
Feature: Universal

## Is your feature request related to a problem? It would be nice to have a sniff which could check that the name in a namespace declarations complies with certain...

Type: enhancement
Feature: Universal

This sniff will check the `declare` statements for a specific coding style. By default, the style of the `declare` statement is without braces and will be applied for all the...

Type: enhancement
Feature: Universal

Originally created in the [WPCS repo](https://github.com/WordPress/WordPress-Coding-Standards/issues/1382) ### Motivation The motivation behind the sniff was that I got errors in my php code, and I couldn't see where the errors were...

Type: enhancement
Status: awaiting feedback

Originally suggested in https://github.com/WordPress/WordPress-Coding-Standards/issues/1371: > I'd like to suggest adding two new sniffs around the usage of [`preg_quote()`](http://php.net/manual/en/function.preg-quote.php). > > * Verify the `$regex` parameter of any PCRE function calls...

Type: enhancement
Feature: Universal

## Is your feature request related to a problem? A sniff creation was underway here: https://github.com/WordPress/WordPress-Coding-Standards/pull/1771 but it makes no sense to have it in WPCS. I'll create a PR...

Type: enhancement
Feature: Universal