-
Since PHP 7.3 it's possible to use reference assignment with `list()`.
Code like
```php
$array = array( 1, 2 );
list( $a, &$b ) = $array;
```
Won't throw `Fatal error: [] and list() assign…
-
## Bug Description
Using PHP 8.1 I get the following error dla all tested files:
```
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | E…
-
## Bug Description
Installing fails with `composer create-project wp-coding-standards/wpcs`.
And would seem to work, but throws Fatal Error with standalone installatation.
System: Ubuntu 20.04.4 …
-
## Bug Description
When testing with PHP 8 and wpcs 2.3.0 I get the following error message:
```
PHP Fatal error: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, str…
-
## Bug Description
When setting `posts_per_page` to a function, wpcs logs "Detected high pagination limit, `posts_per_page` is set to..." warning.
It should [be treated like `-1`](https://gi…
-
Third-party libraries like the DOM implementation included with PHP currently trigger the snake_case sniff. For example, the following code
```
function get_ancestors( \DOMNode $node ) {
$node =…
-
## Rationale
WPCS includes a number of sniffs which examine function declarations.
Functions can be declared with or without body:
```php
// Standard, with body:
function something( $param ) {
…
-
## Bug Description
## Minimal Code Snippet
The issue happens when running phpcs with this config:
```xml
error.php
```
... over a file containing this code:
```php
-
In the README it says you can add WordPress-Coding-Standards to a project with:
`composer create-project wp-coding-standards/wpcs --no-dev`
But on a machine where there is only PHP 8+ that comma…
-
## Bug Description
It's getting false positives in line indents.
## Minimal Code Snippet
```
echo do_shortcode( '[my_subcatboxes]' );
echo do_shortcode( '[my_sticky_posts]' );
```
For b…