Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public static function fromContent($content) |
||
24 | { |
||
25 | $target = new static(); |
||
26 | $target->content = $content; |
||
27 | |||
28 | if ( |
||
29 | stripos($content, 'Phar::mapPhar(') !== false |
||
30 | && preg_match('#Phar\:\:mapPhar\(([^)]+)\)#', $content, $matches) |
||
31 | ) { |
||
32 | // remove spaces, single & double quotes |
||
33 | // @todo `'my' . 'alias' . '.phar'` is not evaluated here |
||
34 | $target->mappedAlias = trim($matches[1], ' \'"'); |
||
35 | } |
||
36 | |||
37 | return $target; |
||
38 | } |
||
66 |