HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/eleo.komma.nl/vendor/phpbench/phpbench/lib/Assertion/Ast/Comparison.php
<?php

namespace PhpBench\Assertion\Ast;

class Comparison implements Assertion
{
    /**
     * @var Value
     */
    private $value1;
    /**
     * @var string
     */
    private $operator;
    /**
     * @var Value
     */
    private $value2;

    /**
     * @var Value
     */
    private $tolerance;

    public function __construct(Value $value1, string $operator, Value $value2, ?Value $tolerance = null)
    {
        $this->value1 = $value1;
        $this->operator = $operator;
        $this->value2 = $value2;
        $this->tolerance = $tolerance ?: new ZeroValue();
    }

    public function operator(): string
    {
        return $this->operator;
    }

    public function value2(): Value
    {
        return $this->value2;
    }

    public function value1(): Value
    {
        return $this->value1;
    }

    public function tolerance(): Value
    {
        return $this->tolerance;
    }
}