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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/myclabs/php-enum/src/PHPUnit/   drwxr-xr-x
Free 13.22 GB of 57.97 GB (22.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace MyCLabs\Enum\PHPUnit;

use 
MyCLabs\Enum\Enum;
use 
SebastianBergmann\Comparator\ComparisonFailure;

/**
 * Use this Comparator to get nice output when using PHPUnit assertEquals() with Enums.
 *
 * Add this to your PHPUnit bootstrap PHP file:
 *
 * \SebastianBergmann\Comparator\Factory::getInstance()->register(new \MyCLabs\Enum\PHPUnit\Comparator());
 */
final class Comparator extends \SebastianBergmann\Comparator\Comparator
{
    public function 
accepts($expected$actual)
    {
        return 
$expected instanceof Enum && (
                
$actual instanceof Enum || $actual === null
            
);
    }

    
/**
     * @param Enum $expected
     * @param Enum|null $actual
     *
     * @return void
     */
    
public function assertEquals($expected$actual$delta 0.0$canonicalize false$ignoreCase false)
    {
        if (
$expected->equals($actual)) {
            return;
        }

        throw new 
ComparisonFailure(
            
$expected,
            
$actual,
            
$this->formatEnum($expected),
            
$this->formatEnum($actual),
            
false,
            
'Failed asserting that two Enums are equal.'
        
);
    }

    private function 
formatEnum(Enum $enum null)
    {
        if (
$enum === null) {
            return 
"null";
        }

        return 
get_class($enum)."::{$enum->getKey()}()";
    }
}

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