Compare
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 3
c 1
b 0
f 0
ccs 0
cts 0
cp 0
wmc 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Rule;
6
7
use Attribute;
8
9
/**
10
 * Defines validation options to compare the specified value with "target" value provided directly
11
 * ({@see GreaterThanOrEqual::$targetValue}) or within an attribute ({@see GreaterThanOrEqual::$targetAttribute}).
12
 *
13
 * The default comparison is based on number values (including float values). It's also possible to compare values as
14
 * strings byte by byte and compare original values as is. See {@see GreaterThanOrEqual::$type} for all possible
15
 * options.
16
 *
17
 * It supports different comparison operators, specified via the {@see Compare::$operator}.
18
 *
19
 * There are shortcut classes to use instead of specifying operator manually:
20
 *
21
 * - {@see Equal} is a shortcut for `new Compare(operator: '==')` and `new Compare(operator: '===')`.
22
 * - {@see NotEqual} is a shortcut for `new Compare(operator: '!=')` and `new Compare(operator: '!==')`.
23
 * - {@see GreaterThan} is a shortcut for `new Compare(operator: '>')`.
24
 * - {@see GreaterThanOrEqual} is a shortcut for `new Compare(operator: '>=')`.
25
 * - {@see LessThan} is a shortcut for `new Compare(operator: '<')`.
26
 * - {@see LessThanOrEqual} is a shortcut for `new Compare(operator: '<=')`.
27
 *
28
 * @see CompareHandler
29
 */
30
#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)]
31
final class Compare extends AbstractCompare
32
{
33
}
34