Conditions | 9 |
Paths | 9 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 9 |
Changes | 0 |
1 | <?php |
||
18 | 8 | public static function openWith($editor = 'subl') |
|
19 | { |
||
20 | 8 | switch (strtolower($editor)) { |
|
21 | 8 | case 'phpstorm': |
|
22 | 1 | return 'phpstorm://open?file=%file&line=%line'; |
|
23 | |||
24 | 7 | case 'vscode': |
|
25 | 2 | return 'vscode://file/%file:%line'; |
|
26 | |||
27 | 5 | case 'mvim': |
|
28 | 5 | case 'macvim': |
|
29 | 1 | return 'mvim://open/?url=file://%file&line=%line'; |
|
30 | |||
31 | 4 | case 'txmt': |
|
32 | 4 | case 'textmate': |
|
33 | 1 | return 'txmt://open/?url=file://%file&line=%line'; |
|
34 | |||
35 | 3 | case 'subl': |
|
36 | 2 | case 'sublime': |
|
37 | 2 | return 'subl://open?url=file://%file&line=%line'; |
|
38 | } |
||
39 | |||
40 | 1 | return 'editor://open/?file=%file&line=%line'; |
|
41 | } |
||
42 | } |
||
43 |