RequestValidation::yourRequestShouldBeValid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 3
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
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
     * @return \Imanghafoori\HeyMan\Reactions\Validator
16
     */
17
    public function yourRequestShouldBeValid($rules, array $messages = [], array $customAttributes = [])
18 12
    {
19
        return new Validator([$rules, $messages, $customAttributes]);
20 12
    }
21
}
22