Passed
Push — master ( 4ee628...7be946 )
by Travis
02:08
created

AbstractResourceRuleSet::provideUpdateRules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Telkins\Validation;
4
5
use Telkins\Validation\Contracts\ResourceRuleSetContract;
6
7
abstract class AbstractResourceRuleSet implements ResourceRuleSetContract
8
{
9
    public function rules() : array
10
    {
11
        return $this->provideRules();
12
    }
13
14
    public function creationRules() : array
15
    {
16
        return array_merge_recursive(
17
            $this->provideRules(),
18
            $this->provideCreationRules()
19
        );
20
    }
21
22
    public function updateRules() : array
23
    {
24
        return array_merge_recursive(
25
            $this->provideRules(),
26
            $this->provideUpdateRules()
27
        );
28
    }
29
30
    protected function provideRules() : array
31
    {
32
        return [];
33
    }
34
35
    protected function provideCreationRules() : array
36
    {
37
        return [];
38
    }
39
40
    protected function provideUpdateRules() : array
41
    {
42
        return [];
43
    }
44
}
45