-
CS fixer version: latest 2.16
Original code and expected result:
```
class CrudHelper
{
public function makeCrudFromModel($model): MyCrud
{
// set model options
if ($…
-
Use-case: sniffs in generic sniff collections - like the `Generic` set in PHPCS - can be freely used by other standards, but shouldn't ever be included in a custom ruleset like `` as they may (and oft…
jrfnl updated
12 months ago
-
### Describe the bug
There is an error when running `phpcs` with the current release of `wpcs` which is `v2.3.0`. The error which occurs for `PHP 8.0` only is as under:
```
PHP Fatal error: Unca…
-
**Describe the bug**
A line that violates the `PSR1.Files.SideEffects.FoundWithSymbols` rule still generates a warning about it even when preceded with `// phpcs:ignore`
**Code sample**
```php
-
## Describe the bug
This is a re-creation of https://github.com/squizlabs/PHP_CodeSniffer/pull/3924:
> When using `-s` along with a large `--report-width`, some lines are still wrapped despite…
-
- VSCode Version: 1.18.1
- OS Version: Windows 10 FU
### Explain:
There are certain extensions that play well together, and it would be useful to be able to set a config file to enable and dis…
-
When standard executed using PHP_CodeSniffer 3.5.7 using PHP 7.4, then I got this Fatal Error:
```
phpcs: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CodingStandard…
-
**Describe the bug**
Line indenting should be correct but is not correct for PHPCS. PHPCS says that PHPCBF can fix it:
23 | ERROR | [x] Multi-line function declaration not indented correctly; exp…
-
## Describe the bug
When `basepath` is set in a custom ruleset AND PHPCS is subsequently run from within a subdirectory of the project AND the `Gitblame` report is requested, a fatal error happens.…
jrfnl updated
11 months ago
-
**Describe the bug**
The [throw expression](https://wiki.php.net/rfc/throw_expression) added in PHP 8 is not supported by the `Squiz.PHP.NonExecutableCode` rule.
**Code sample**
```php
…