Total Complexity | 6 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
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 |
||
43 | } |
||
44 | } |
||
45 |