- 26 Sep, 2022 1 commit
-
-
Greg Sherwood authored
-
- 22 Sep, 2022 3 commits
-
-
Greg Sherwood authored
-
Greg Sherwood authored
Merge branch 'feature/3668-psr12-classinstantiation-fix-regression' of https://github.com/jrfnl/PHP_CodeSniffer
-
Greg Sherwood authored
Merge branch 'feature/squiz-operatorbracket-fix-regression-parent' of https://github.com/jrfnl/PHP_CodeSniffer
-
- 20 Sep, 2022 3 commits
-
-
jrfnl authored
Related to 3546 which fixed an inconsistency after 3484. The change of the tokenization from `T_STRING` to `T_PARENT` for the `parent` keyword caused a regression in the `Squiz.Formatting.OperatorBracket` sniff. Fixed now. Includes unit tests.
-
jrfnl authored
Related to 3546 which fixed an inconsistency after 3484. The change of the tokenization from `T_STRING` to `T_PARENT` for the `parent` keyword in `new parent` caused a regression in the `Generic.Functions.FunctionCallArgumentSpacing` sniff. Fixed now. Includes unit tests.
-
jrfnl authored
Related to 3546 which fixed an inconsistency after 3484. The change of the tokenization from `T_STRING` to `T_PARENT` for the `parent` keyword in `new parent` caused a regression in the `PSR12.Classes.ClassInstantiation` sniff. Fixed now. Includes unit tests.
-
- 19 Sep, 2022 1 commit
-
-
Greg Sherwood authored
Fixed bug #3666 : PEAR.Functions.FunctionCallSignature incorrect indent fix when checking mixed HTML/PHP files
-
- 15 Sep, 2022 5 commits
-
-
Greg Sherwood authored
-
Greg Sherwood authored
Merge branch 'feature/tokenizer-php-bug-fix-short-list-in-non-braced-control-structure' of https://github.com/jrfnl/PHP_CodeSniffer
-
Greg Sherwood authored
-
Greg Sherwood authored
-
-
- 10 Sep, 2022 6 commits
-
-
Greg Sherwood authored
-
Greg Sherwood authored
-
-
Greg Sherwood authored
-
Gary Jones authored
As per https://getcomposer.org/doc/04-schema.md#keywords by including "static analysis" as a keyword in the `composer.json` file, Composer 2.4.0-RC1 and later will prompt users if the package is installed with `composer require` instead of `composer require --dev`. See https://github.com/composer/composer/pull/10960 for more info.
-
Greg Sherwood authored
-
- 09 Sep, 2022 1 commit
-
-
jrfnl authored
PHP 7.4 arrow functions were not yet being taken into account for this sniff. Fixed now. Includes unit tests.
-
- 24 Aug, 2022 1 commit
-
-
Jaroslav Hanslík authored
-
- 13 Aug, 2022 2 commits
-
-
Greg Sherwood authored
-
Greg Sherwood authored
-
- 09 Aug, 2022 1 commit
-
-
enl authored
When a child process fails, e.g. with a FatalError, it might still return empty list of errors. Although, child process failure is definitely not a thing we want to ignore. Therefore, we check exit status of each child process and make sure parent process fails (and returns non-zero status code) as well.
-
- 14 Jul, 2022 1 commit
-
-
jrfnl authored
Originally reported in sirbrillig/phpcs-variable-analysis 263. When the short list syntax would be used as the first contents within a control structure without braces, the square brackets would be tokenized as plain square brackets, not as short array brackets. ```php if ( true ) [ $a ] = [ 'hi' ]; // The first `[` in this line was tokenized incorrectly. return $a ?? ''; ``` Fixed now by checking whether the preceding parenthesis closer has an owner and if that owner could be a scope owner. Includes unit tests. Includes updating the data providers to use named data sets to allow for easier debugging.
-
- 10 Jul, 2022 1 commit
-
-
jrfnl authored
As discussed in 3621, this PR adds a new function to show a "friendly" error message if/when PHPCS runs out of memory. This functionality can't be tested via the unit/integration test suite as the PHP shutdown can't be mocked. To test the functionality, I used a test run of PHPCS over its own code base with the following command: ```bash phpcs -d memory_limit 32M ``` Fixes 3621 Co-authored-by:
Alain Schlesser <alain.schlesser@gmail.com>
-
- 27 Jun, 2022 5 commits
-
-
Greg Sherwood authored
-
Greg Sherwood authored
Merge branch 'feature/3618-generic-arbitrary-parentheses-bugfix' of https://github.com/jrfnl/PHP_CodeSniffer
-
Greg Sherwood authored
-
Greg Sherwood authored
-
jrfnl authored
Fixes 3616 Note: I've changed the `findNext()` call from an exhaustive call to the end of the statement to a faster check for the first non-empty token, which I believe was the actual _intention_ of the function call. As no tests are failing, I'm fairly certain my suspicion is correct ;-)
-
- 23 Jun, 2022 1 commit
-
-
jrfnl authored
Follow up to PR 3546, which changed how the `parent` keyword in a `new parent` snippet was tokenized from `T_STRING` to `T_PARENT`. The `T_PARENT` keyword token, however, was not included in the `Tokens::$functionNameTokens` array, which was the underlying cause for the bug reported in 3618. Fixed now. Tested by adding additional tests to the `Generic.WhiteSpace.ArbitraryParenthesesSpacing` sniff. These tests passed in PHPCS 3.6.2 and started failing in PHPCS 3.7.0. Once this fix has been merged, the tests will pass again.
-
- 18 Jun, 2022 1 commit
-
-
Greg Sherwood authored
-
- 13 Jun, 2022 7 commits
-
-
Greg Sherwood authored
-
Greg Sherwood authored
-
Greg Sherwood authored
Merge branch 'feature/3609-bugfix-context-sensitive-keyword-empty' of https://github.com/jrfnl/PHP_CodeSniffer
-
jrfnl authored
As reported in 3609, the `empty` keyword, as well as the `isset` and `unset` keywords, was not included in the list of context sensitive keyword. This is a regression compared to PHPCS 3.6.2. Fixed now, including unit tests. Note: I've now done a full comparison with the [reserved keyword list as per the PHP manual](https://www.php.net/manual/en/reserved.keywords.php). This should hopefully fix the remaining stranglers. Fixes 3609
-
Greg Sherwood authored
-
Greg Sherwood authored
-
Greg Sherwood authored
Merge branch 'feature/tokenizer-php-bugfix-double-quoted-strings' of https://github.com/jrfnl/PHP_CodeSniffer
-