Completed
Push — master ( 6af785...cbc83f )
by Iman
05:36
created

RequestValidation   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A yourRequestShouldBeValid() 0 3 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\Conditions;
4
5
use Imanghafoori\HeyMan\Reactions\Validator;
6
7
trait RequestValidation
8
{
9
    /**
10
     * Validate the given request with the given rules.
11
     *
12
     * @param array $rules
13
     * @param array $messages
14
     * @param array $customAttributes
15
     *
16
     * @return \Imanghafoori\HeyMan\Reactions\Validator
17
     */
18
    public function yourRequestShouldBeValid($rules, array $messages = [], array $customAttributes = []): Validator
19
    {
20
        return new Validator([$rules, $messages, $customAttributes]);
21
    }
22
}