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

RequestValidation   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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
     *
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