!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 712 GB of 879.6 GB (80.95%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     RulesetPropertyHelper.php (2.48 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;

/**
 * Helper utilities for working with user provided property values.
 *
 * ---------------------------------------------------------------------------------------------
 * 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
 *
 * @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 RulesetPropertyHelper {

    /**
     * Merge a pre-set array with a ruleset provided array.
     *
     * - By default flips custom lists to allow for using `isset()` instead
     *   of `in_array()`.
     * - When `$flip` is true:
     *   * Presumes the base array is in a `'value' => true` format.
     *   * Any custom items will be given the value `false` to be able to
     *     distinguish them from pre-set (base array) values.
     *   * Will filter previously added custom items out from the base array
     *     before merging/returning to allow for resetting to the base array.
     *
     * {@internal Function is static as it doesn't use any of the properties or others
     * methods anyway.}
     *
     * @since 0.11.0
     * @since 2.0.0  No longer supports custom array properties which were incorrectly
     *               passed as a string.
     * @since 3.0.0  Moved from the Sniff class to this class.
     *
     * @param array $custom Custom list as provided via a ruleset.
     * @param array $base   Optional. Base list. Defaults to an empty array.
     *                      Expects `value => true` format when `$flip` is true.
     * @param bool  $flip   Optional. Whether or not to flip the custom list.
     *                      Defaults to true.
     * @return array
     */
    public static function merge_custom_array( $custom, array $base = array(), $flip = true ) {
        if ( true === $flip ) {
            $base = array_filter( $base );
        }

        if ( empty( $custom ) || ! \is_array( $custom ) ) {
            return $base;
        }

        if ( true === $flip ) {
            $custom = array_fill_keys( $custom, false );
        }

        if ( empty( $base ) ) {
            return $custom;
        }

        return array_merge( $base, $custom );
    }
}

:: 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.0504 ]--