magento-ecg / coding-standard

Magento PHP_CodeSniffer Coding Standard
MIT License
308 stars 99 forks source link

Fixed undefined array key "parenthesis_opener" #72

Closed fballiano closed 2 weeks ago

fballiano commented 6 months ago

Running phpcs on openmage generates:

FILE: /Users/fab/Projects/openmage/lib/Varien/Filter/Template/Tokenizer/Variable.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | An error occurred during processing; checking has been aborted. The error message was: Undefined array key "parenthesis_opener" in
   |       | /Users/fab/Projects/openmage/vendor/magento-ecg/coding-standard/Ecg/Sniffs/Performance/LoopSniff.php on line 73
   |       | The error originated in the Ecg.Performance.Loop sniff on line 73. (Internal.Exception)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(it actually generates many of the same error lines).

This PR fixes it.

Fixes https://github.com/magento-ecg/coding-standard/issues/70

fballiano commented 6 months ago

@alexkaranda could you check this one please? in openmage we can't use ECG in workflows because of this error. thank you!