Passed
Push — master ( d39c61...1595e0 )
by Iman
02:47
created

RequestValidation::yourRequestShouldBeValid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\Plugins\Conditions;
4
5
use Imanghafoori\HeyMan\Reactions\Validator;
6
7
class RequestValidation
8
{
9
    /**
10
     * Validate the given request with the given rules.
11
     *
12
     * @param array|callable $rules
13
     * @param array $messages
14
     * @param array $customAttributes
15
     *
16
     * @return \Imanghafoori\HeyMan\Reactions\Validator
17
     */
18 9
    public function yourRequestShouldBeValid($rules, array $messages = [], array $customAttributes = [])
19
    {
20 9
        return new Validator([$rules, $messages, $customAttributes]);
21
    }
22
}
23