!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\nuevo\php\pear\PHP\CodeSniffer\Standards\Generic\Sniffs\Classes\   drwxrwxrwx
Free 1012.7 MB of 239.26 GB (0.41%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     DuplicateClassNameSniff.php (3.62 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Reports errors if the same class or interface name is used in multiple files.
 *
 * PHP version 5
 *
 * @category  PHP
 * @package   PHP_CodeSniffer
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @copyright 2006-2011 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */

/**
 * Reports errors if the same class or interface name is used in multiple files.
 *
 * @category  PHP
 * @package   PHP_CodeSniffer
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @copyright 2006-2011 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
 * @version   Release: 1.3.3
 * @link      http://pear.php.net/package/PHP_CodeSniffer
 */
class Generic_Sniffs_Classes_DuplicateClassNameSniff implements PHP_CodeSniffer_MultiFileSniff
{


    
/**
     * Called once per script run to allow for processing of this sniff.
     *
     * @param array(PHP_CodeSniffer_File) $files The PHP_CodeSniffer files processed
     *                                           during the script run.
     *
     * @return void
     */
    
public function process(array $files)
    {
        
$foundClasses = array();

        foreach (
$files as $phpcsFile) {
            
$tokens $phpcsFile->getTokens();

            
$namespace '';
            
$stackPtr  $phpcsFile->findNext(array(T_CLASST_INTERFACET_NAMESPACE), 0);
            while (
$stackPtr !== false) {
                
// Keep track of what namespace we are in.
                
if ($tokens[$stackPtr]['code'] === T_NAMESPACE) {
                    
$nsEnd $phpcsFile->findNext(
                        array(
T_NS_SEPARATORT_STRINGT_WHITESPACE),
                        (
$stackPtr 1),
                        
null,
                        
true
                    
);

                    
$namespace trim($phpcsFile->getTokensAsString(($stackPtr 1), ($nsEnd $stackPtr 1)));
                    
$stackPtr  $nsEnd;
                } else {
                    
$nameToken $phpcsFile->findNext(T_STRING$stackPtr);
                    
$name      $tokens[$nameToken]['content'];
                    if (
$namespace !== '') {
                        
$name $namespace.'\\'.$name;
                    }

                    
$compareName strtolower($name);
                    if (isset(
$foundClasses[$compareName]) === true) {
                        
$type  strtolower($tokens[$stackPtr]['content']);
                        
$file  $foundClasses[$compareName]['file'];
                        
$line  $foundClasses[$compareName]['line'];
                        
$error 'Duplicate %s name "%s" found; first defined in %s on line %s';
                        
$data  = array(
                                  
$type,
                                  
$name,
                                  
$file,
                                  
$line,
                                 );
                        
$phpcsFile->addWarning($error$stackPtr'Found'$data);
                    } else {
                        
$foundClasses[$compareName] = array(
                                                            
'file' => $phpcsFile->getFilename(),
                                                            
'line' => $tokens[$stackPtr]['line'],
                                                           );
                    }
                }

                
$stackPtr $phpcsFile->findNext(array(T_CLASST_INTERFACET_NAMESPACE), ($stackPtr 1));
            }
//end while

        
}//end foreach

    
}//end process()


}//end class

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]--