public function inClassScope(File $phpcsFile, $stackPtr, $strict = true)
    {
        $validScopes = array(\T_CLASS);
        if (\defined('T_ANON_CLASS') === true) {
            $validScopes[] = \T_ANON_CLASS;
        }

        if ($strict === false) {
            $validScopes[] = \T_INTERFACE;
            $validScopes[] = \T_TRAIT;
        }

        return $phpcsFile->hasCondition($stackPtr, $validScopes);
    }