for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Fractal\SemVer;
/**
* Class Operator
*
* @author Mikhail Shtanko <[email protected]>
*/
final class Operator
{
* Greater than operator.
* @const string
public const GREATER = '>';
* Greater than or equal to operator.
public const GREATER_OR_EQUAL = '>=';
* Less than operator.
public const LESS = '<';
* Less than or equal to operator.
public const LESS_OR_EQUAL = '<=';
* Equal to operator.
public const EQUAL = '=';
* Not equal to operator.
public const NOT_EQUAL = '<>';
* Available operators
* @var array
protected static $operators = [
self::GREATER,
self::GREATER_OR_EQUAL,
self::LESS,
self::LESS_OR_EQUAL,
self::EQUAL,
self::NOT_EQUAL,
];
* Checks operator for availability
* @param string $operator
* @return bool
public static function has(string $operator): bool
return \in_array($operator, static::$operators, true);
}