RequestValidation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 13
ccs 1
cts 1
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A yourRequestShouldBeValid() 0 3 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
     * @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