src/Standards/BestIt/Sniffs/NamingConventions/CamelCaseVariableSniff.php
protected function areRequirementsMet(): bool
    {
        $var = $this->token['content'];

        // We need to check everything != $this.
        if ($return = $var !== '$this') {
            $nextPos = (int) TokenHelper::findNextEffective($this->file->getBaseFile(), $this->stackPos + 1);

            if ($nextPos > 0) {
                $isProperty = PropertyHelper::isProperty($this->file->getBaseFile(), $this->stackPos);
                $nextTokenCode = $this->tokens[$nextPos]['code'];

                // The var should be followed by an "=" or can be followed by a semicolon if its a property.
                $return = ($nextTokenCode === T_EQUAL) || ($nextTokenCode === T_SEMICOLON && $isProperty);
            }
        }

        return $return;
    }
protected function areRequirementsMet(): bool
    {
        $var = $this->token['content'];

        // We need to check everything != $this.
        if ($return = $var !== '$this') {
            $nextPos = (int) TokenHelper::findNextEffective($this->file->getBaseFile(), $this->stackPos + 1);

            if ($nextPos > 0) {
                $isProperty = PropertyHelper::isProperty($this->file->getBaseFile(), $this->stackPos);
                $nextTokenCode = $this->tokens[$nextPos]['code'];

                // The var should be followed by an "=" or can be followed by a semicolon if its a property.
                $return = ($nextTokenCode === T_EQUAL) || ($nextTokenCode === T_SEMICOLON && $isProperty);
            }
        }

        return $return;
    }
protected function areRequirementsMet ( ) : bool { $ var = $ this -> token [ 'content' ] ; // We need to check everything != $this. if ( $ return = $ var !== '$this' ) { $ nextPos = ( int ) TokenHelper :: findNextEffective ( $ this -> file -> getBaseFile ( ) , $ this -> stackPos + 1 ) ; if ( $ nextPos > 0 ) { $ isProperty = PropertyHelper :: isProperty ( $ this -> file -> getBaseFile ( ) , $ this -> stackPos ) ; $ nextTokenCode = $ this -> tokens [ $ nextPos ] [ 'code' ] ; // The var should be followed by an "=" or can be followed by a semicolon if its a property. $ return = ( $ nextTokenCode === T_EQUAL ) || ( $ nextTokenCode === T_SEMICOLON && $ isProperty ) ; } } return $ return ; }
Returns true if there is a value assignment or a property declaration, but which can be without an assignment.

@return bool
Returns true if there is a value assignment or a property declaration but which can be without an assignment .