Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | final class EloquentSituations extends BaseSituation |
||
8 | { |
||
9 | const methods = [ |
||
10 | 'whenYouFetch' => 'retrieved', |
||
11 | 'whenYouCreate' => 'creating', |
||
12 | 'whenYouUpdate' => 'updating', |
||
13 | 'whenYouSave' => 'saving', |
||
14 | 'whenYouDelete' => 'deleting', |
||
15 | ]; |
||
16 | |||
17 | public function hasMethod($method) |
||
18 | { |
||
19 | return array_key_exists($method, self::methods); |
||
20 | } |
||
21 | |||
22 | public function __call($method, $model) |
||
25 | } |
||
26 | } |
||
27 |