Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public static function run($abouts, $file) |
||
14 | { |
||
15 | |||
16 | $groupType = false; |
||
17 | foreach ($abouts as $about) { |
||
18 | $groupType = EloquentGroup::discoverType($about, true); |
||
19 | } |
||
20 | |||
21 | if (!$groupType) { |
||
22 | return false; |
||
23 | } |
||
24 | |||
25 | $name = explode('-', $file); |
||
26 | |||
27 | return call_user_func( |
||
28 | $groupType.'::discoverModel', |
||
29 | $name[0] |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | } |