!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/local/wp/vendor/wp-coding-standards/wpcs/WordPress/Helpers/   drwxr-xr-x
Free 710.79 GB of 879.6 GB (80.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     DeprecationHelper.php (2.62 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * WordPress Coding Standard.
 *
 * @package WPCS\WordPressCodingStandards
 * @link    https://github.com/WordPress/WordPress-Coding-Standards
 * @license https://opensource.org/licenses/MIT MIT
 */

namespace WordPressCS\WordPress\Helpers;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util\Tokens;

/**
 * Helper utilities for checking whether something has been marked as deprecated.
 *
 * ---------------------------------------------------------------------------------------------
 * This class is only intended for internal use by WordPressCS and is not part of the public API.
 * This also means that it has no promise of backward compatibility. Use at your own risk.
 * ---------------------------------------------------------------------------------------------
 *
 * {@internal The functionality in this class will likely be replaced at some point in
 * the future by functions from PHPCSUtils.}
 *
 * @internal
 *
 * @since 3.0.0 The method in this class was previously contained in the
 *              `WordPressCS\WordPress\Sniff` class and has been moved here.
 */
final class DeprecationHelper {

    /**
     * Check whether a function has been marked as deprecated via a @deprecated tag
     * in the function docblock.
     *
     * @since 2.2.0
     * @since 3.0.0 Moved from the Sniff class to this class.
     *
     * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
     * @param int                         $stackPtr  The position of a T_FUNCTION
     *                                               token in the stack.
     *
     * @return bool
     */
    public static function is_function_deprecated( File $phpcsFile, $stackPtr ) {
        $tokens = $phpcsFile->getTokens();
        if ( isset( $tokens[ $stackPtr ] ) === false ) {
            return false;
        }

        $ignore                  = Tokens::$methodPrefixes;
        $ignore[ \T_WHITESPACE ] = \T_WHITESPACE;

        for ( $comment_end = ( $stackPtr - 1 ); $comment_end >= 0; $comment_end-- ) {
            if ( isset( $ignore[ $tokens[ $comment_end ]['code'] ] ) === true ) {
                continue;
            }

            if ( \T_ATTRIBUTE_END === $tokens[ $comment_end ]['code']
                && isset( $tokens[ $comment_end ]['attribute_opener'] ) === true
            ) {
                $comment_end = $tokens[ $comment_end ]['attribute_opener'];
                continue;
            }

            break;
        }

        if ( \T_DOC_COMMENT_CLOSE_TAG !== $tokens[ $comment_end ]['code'] ) {
            // Function doesn't have a doc comment or is using the wrong type of comment.
            return false;
        }

        $comment_start = $tokens[ $comment_end ]['comment_opener'];
        foreach ( $tokens[ $comment_start ]['comment_tags'] as $tag ) {
            if ( '@deprecated' === $tokens[ $tag ]['content'] ) {
                return true;
            }
        }

        return false;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0366 ]--