| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 18 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php  | 
            ||
| 21 | public static function getopts($options)  | 
            ||
| 22 |     { | 
            ||
| 23 |         $opts = getopt(implode('', array_keys($options)), $options); | 
            ||
| 24 | |||
| 25 | $result = array();  | 
            ||
| 26 |         foreach ($options as $short => $long) { | 
            ||
| 27 | $short = trim($short, ':');  | 
            ||
| 28 | $long = trim($long, ':');  | 
            ||
| 29 | |||
| 30 |             if (isset($opts[$short])) { | 
            ||
| 31 | $result[$long] = $opts[$short];  | 
            ||
| 32 |             } elseif (isset($opts[$long])) { | 
            ||
| 33 | $result[$long] = $opts[$long];  | 
            ||
| 34 | }  | 
            ||
| 35 | }  | 
            ||
| 36 | |||
| 37 | return $result;  | 
            ||
| 38 | }  | 
            ||
| 39 | }  | 
            ||
| 40 |