Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Comodojo\Installer\Parser; |
||
32 | public static function parse(PackageInterface $package) { |
||
33 | |||
34 | $type = $package->getType(); |
||
35 | |||
36 | $extra = $package->getExtra(); |
||
37 | |||
38 | $map = array(); |
||
39 | |||
40 | foreach (SupportedTypes::getActions($type) as $field => $action) { |
||
41 | |||
42 | if ( isset($extra[$field]) ) $map[$action] = $extra[$field]; |
||
43 | |||
44 | } |
||
45 | |||
46 | return $map; |
||
47 | |||
48 | } |
||
49 | |||
51 |