File tree Expand file tree Collapse file tree 3 files changed +755
-720
lines changed Expand file tree Collapse file tree 3 files changed +755
-720
lines changed Original file line number Diff line number Diff line change 2
2
===========================
3
3
4
4
5
+ Version 0.14.8
6
+ --------------
7
+ * Issue #92 : checkWhiteSpaceBefore "{", unless it's in ${var}
8
+ * Issue #89 : False error "The function parameters must match those in its docblock @param" when using local variable tag
9
+
5
10
Version 0.14.7
6
11
--------------
7
12
* Issue #81 : Fail to detect private functions with spaces after function (thanks to Hans-Christian Halfbrodt)
Original file line number Diff line number Diff line change @@ -3730,6 +3730,7 @@ private function _checkVariableVariable($token) {
3730
3730
/**
3731
3731
* Check the use of a complex variable ${.
3732
3732
*
3733
+ * Skip the analysis inside the variable.
3733
3734
* Should be the token T_DOLLAR_OPEN_CURLY_BRACES but can also be T_DOLLAR + T_BRACES_OPEN
3734
3735
*
3735
3736
* Called when the current token is a single $.
@@ -3738,17 +3739,14 @@ private function _checkVariableVariable($token) {
3738
3739
*/
3739
3740
private function _checkComplexVariable ($ token ) {
3740
3741
if ($ this ->tokenizer ->checkNextToken (T_BRACES_OPEN )) {
3741
- // We skip the T_BRACES_OPEN and T_BRACES_CLOSE analysis to avoid the creation of a new statement level.
3742
- $ valueToken = $ this ->tokenizer ->peekNextValidToken ($ token ->position + 2 );
3743
- $ closeToken = $ this ->tokenizer ->peekNextValidToken ($ valueToken ->position + 1 );
3744
3742
3745
- if ($ closeToken ->id === T_BRACES_CLOSE ) {
3743
+ // Detect the end of the complexe variable
3744
+ $ closePos = $ this ->tokenizer ->findNextTokenPosition (T_BRACES_CLOSE );
3746
3745
3747
- $ this -> tokenizer -> setCurrentPosition ( $ valueToken -> position );
3746
+ if ( $ closePos !== null ) {
3748
3747
3749
- $ this ->_processVariable ($ valueToken ->text );
3750
-
3751
- $ this ->tokenizer ->setCurrentPosition ($ closeToken ->position + 1 );
3748
+ // Skip the analysis of the content of the variable.
3749
+ $ this ->tokenizer ->setCurrentPosition ($ closePos + 1 );
3752
3750
}
3753
3751
}
3754
3752
}
You can’t perform that action at this time.
0 commit comments