1. 26 Sep, 2022 1 commit
  2. 22 Sep, 2022 3 commits
  3. 20 Sep, 2022 3 commits
    • jrfnl's avatar
      Squiz/OperatorBracket: fix regression for `new parent` · 37ead6e6
      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.
      37ead6e6
    • jrfnl's avatar
      Generic/FunctionCallArgumentSpacing: fix regression for `new parent` · 13921de7
      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.
      13921de7
    • jrfnl's avatar
      PSR12/ClassInstantiation: fix regression for `new parent` · 8d52a604
      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.
      8d52a604
  4. 19 Sep, 2022 1 commit
  5. 15 Sep, 2022 5 commits
  6. 10 Sep, 2022 6 commits
  7. 09 Sep, 2022 1 commit
  8. 24 Aug, 2022 1 commit
  9. 13 Aug, 2022 2 commits
  10. 09 Aug, 2022 1 commit
    • enl's avatar
      Handle child process failing · 9f7cbd9d
      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.
      9f7cbd9d
  11. 14 Jul, 2022 1 commit
    • jrfnl's avatar
      Tokenizer/PHP: bug fix for short list tokens in control structures without braces · 382ad27f
      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.
      382ad27f
  12. 10 Jul, 2022 1 commit
    • jrfnl's avatar
      Runner: show actionable information when PHPCS runs out of memory · 50fa77e2
      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: default avatarAlain Schlesser <alain.schlesser@gmail.com>
      50fa77e2
  13. 27 Jun, 2022 5 commits
  14. 23 Jun, 2022 1 commit
    • jrfnl's avatar
      Tokens::$functionNameTokens: include the `parent` keyword · 760990b6
      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.
      760990b6
  15. 18 Jun, 2022 1 commit
  16. 13 Jun, 2022 7 commits