!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/3ros/PHP_CodeSniffer/CodeSniffer/Standards/   drwxr-xr-x
Free 14.56 GB of 61.93 GB (23.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AbstractVariableSniff.php (7.2 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * A class to find T_VARIABLE tokens.
 *
 * PHP version 5
 *
 * @category  PHP
 * @package   PHP_CodeSniffer
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @author    Marc McIntyre <mmcintyre@squiz.net>
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
 * @version   CVS: $Id: AbstractVariableSniff.php,v 1.14 2008/05/08 03:58:12 squiz Exp $
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */

if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff'true) === false) {
    
$error 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
    throw new 
PHP_CodeSniffer_Exception($error);
}

/**
 * A class to find T_VARIABLE tokens.
 *
 * This class can distingush between normal T_VARIABLE tokens, and those tokens
 * that represent class members. If a class member is encountered, then then
 * processMemberVar method is called so the extending class can process it. If
 * the token is found to be a normal T_VARIABLE token, then processVariable is
 * called.
 *
 * @category  PHP
 * @package   PHP_CodeSniffer
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @author    Marc McIntyre <mmcintyre@squiz.net>
 * @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
 * @version   Release: 1.1.0
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */
abstract class PHP_CodeSniffer_Standards_AbstractVariableSniff extends PHP_CodeSniffer_Standards_AbstractScopeSniff
{

    
/**
     * The end token of the current function that we are in.
     *
     * @var int
     */
    
private $_endFunction = -1;

    
/**
     * true if a function is currently open.
     *
     * @var boolean
     */
    
private $_functionOpen false;

    
/**
     * The current PHP_CodeSniffer file that we are processing.
     *
     * @var PHP_CodeSniffer_File
     */
    
protected $currentFile null;


    
/**
     * Constructs an AbstractVariableTest.
     */
    
public function __construct()
    {
        
$listen = array(
                   
T_CLASS,
                   
T_INTERFACE,
                  );

        
$scopes = array(
                   
T_FUNCTION,
                   
T_VARIABLE,
                   
T_DOUBLE_QUOTED_STRING,
                  );

        
parent::__construct($listen$scopestrue);

    }
//end __construct()


    /**
     * Processes the token in the specified PHP_CodeSniffer_File.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
     *                                        token was found.
     * @param int                  $stackPtr  The position where the token was found.
     * @param array                $currScope The current scope opener token.
     *
     * @return void
     */
    
protected final function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile$stackPtr$currScope)
    {
        if (
$this->currentFile !== $phpcsFile) {
            
$this->currentFile   $phpcsFile;
            
$this->_functionOpen false;
            
$this->_endFunction  = -1;
        }

        
$tokens $phpcsFile->getTokens();

        if (
$stackPtr $this->_endFunction) {
            
$this->_functionOpen false;
        }

        if (
$tokens[$stackPtr]['code'] === T_FUNCTION && $this->_functionOpen === false) {

            
$this->_functionOpen true;

            
$methodProps $phpcsFile->getMethodProperties($stackPtr);

            
// If the function is abstract, or is in an interface,
            // then set the end of the function to it's closing semicolon.
            
if ($methodProps['is_abstract'] === true || $tokens[$currScope]['code'] === T_INTERFACE) {
                
$this->_endFunction $phpcsFile->findNext(array(T_SEMICOLON), $stackPtr);
            } else {
                if (isset(
$tokens[$stackPtr]['scope_closer']) === false) {
                    
$error 'Possible parse error: non-abstract method defined as abstract';
                    
$phpcsFile->addWarning($error$stackPtr);
                    return;
                }

                
$this->_endFunction $tokens[$stackPtr]['scope_closer'];
            }

        }

        if (
$this->_functionOpen === true) {
            if (
$tokens[$stackPtr]['code'] === T_VARIABLE) {
                
$this->processVariable($phpcsFile$stackPtr);
            } else if (
$tokens[$stackPtr]['code'] === T_DOUBLE_QUOTED_STRING) {
                
// Check to see if this string has a variable in it.
                
$pattern '|[^\\\]\$[a-zA-Z0-9_]+|';
                if (
preg_match($pattern$tokens[$stackPtr]['content']) !== 0) {
                    
$this->processVariableInString($phpcsFile$stackPtr);
                }
            }

            return;
        } else {
            
// What if we assign a member variable to another?
            // ie. private $_count = $this->_otherCount + 1;.
            
$this->processMemberVar($phpcsFile$stackPtr);
        }

    }
//end processTokenWithinScope()


    /**
     * Processes the token outside the scope in the file.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
     *                                        token was found.
     * @param int                  $stackPtr  The position where the token was found.
     *
     * @return void
     */
    
protected final function processTokenOutsideScope(PHP_CodeSniffer_File $phpcsFile$stackPtr)
    {
        
$tokens $phpcsFile->getTokens();
        
// These variables are not member vars.
        
if ($tokens[$stackPtr]['code'] === T_VARIABLE) {
            
$this->processVariable($phpcsFile$stackPtr);
        } else {
            
$this->processVariableInString($phpcsFile$stackPtr);
        }

    }
//end processTokenOutsideScope()


    /**
     * Called to process class member vars.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
     *                                        token was found.
     * @param int                  $stackPtr  The position where the token was found.
     *
     * @return void
     */
    
abstract protected function processMemberVar(PHP_CodeSniffer_File $phpcsFile$stackPtr);


    
/**
     * Called to process normal member vars.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
     *                                        token was found.
     * @param int                  $stackPtr  The position where the token was found.
     *
     * @return void
     */
    
abstract protected function processVariable(PHP_CodeSniffer_File $phpcsFile$stackPtr);


    
/**
     * Called to process variables found in duoble quoted strings.
     *
     * Note that there may be more than one variable in the string, which will
     * result only in one call for the string.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where this
     *                                        token was found.
     * @param int                  $stackPtr  The position where the double quoted
     *                                        string was found.
     *
     * @return void
     */
    
abstract protected function processVariableInString(PHP_CodeSniffer_File $phpcsFile$stackPtr);


}
//end class

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.6112 ]--