Passed
Push — main ( aa68b0...40dc38 )
by Dimitri
03:05
created

Rule::__callStatic()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 10
1
<?php
2
3
namespace BlitzPHP\Validation;
4
5
use BlitzPHP\Utilities\String\Text;
6
use Dimtrovich\Validation\Rule as DimtrovichRule;
7
8
9
/**
10
 * {@inheritDoc}
11
 *
12
 * @method static \BlitzPHP\Validation\Rules\Unique unique(string $table, ?string $column = null, mixed $except = null)
13
 */
14
abstract class Rule extends DimtrovichRule
15
{
16
    public static function __callStatic(string $name, array $arguments = [])
17
    {
18
        $name = Text::snake($name);
19
20
        return Validator::rule($name, ...$arguments);
21
    }
22
}
23