src/Standards/BestIt/CodeSniffer/Helper/PropertyHelper.php
public function isProperty(int $variablePtr): bool
    {
        $tokens = $this->file->getTokens();

        $propertyPointer = $this->file->findPrevious(
            [T_STATIC, T_WHITESPACE, T_COMMENT],
            $variablePtr - 1,
            null,
            true
        );
        $propertyToken = $tokens[$propertyPointer];
        $propertyCode = $propertyToken['code'];

        return in_array(
            $propertyCode,
            [
                T_PRIVATE,
                T_PROTECTED,
                T_PUBLIC,
                T_VAR
            ],
            true
        );
    }
public function isProperty(int $variablePtr): bool
    {
        $tokens = $this->file->getTokens();

        $propertyPointer = $this->file->findPrevious(
            [T_STATIC, T_WHITESPACE, T_COMMENT],
            $variablePtr - 1,
            null,
            true
        );
        $propertyToken = $tokens[$propertyPointer];
        $propertyCode = $propertyToken['code'];

        return in_array(
            $propertyCode,
            [
                T_PRIVATE,
                T_PROTECTED,
                T_PUBLIC,
                T_VAR
            ],
            true
        );
    }
public function isProperty ( int $ variablePtr ) : bool { $ tokens = $ this -> file -> getTokens ( ) ; $ propertyPointer = $ this -> file -> findPrevious ( [ T_STATIC , T_WHITESPACE , T_COMMENT ] , $ variablePtr - 1 , null , true ) ; $ propertyToken = $ tokens [ $ propertyPointer ] ; $ propertyCode = $ propertyToken [ 'code' ] ; return in_array ( $ propertyCode , [ T_PRIVATE , T_PROTECTED , T_PUBLIC , T_VAR ] , true ) ; }
Determines if the given variable is a property of a class.

@param int $variablePtr Pointer to the current variable

@return bool Indicator if the current T_VARIABLE is a property of a class
Determines if the given variable is a property of a class .