| @@ 28-34 (lines=7) @@ | ||
| 25 | * |
|
| 26 | * @return string a file content without comments |
|
| 27 | */ |
|
| 28 | public static function deleteComments($config = '') |
|
| 29 | { |
|
| 30 | $config = preg_replace('/^\s*#.*/m', '', $config); |
|
| 31 | $config = preg_replace('/^([^#]+)#.*/m', '$1', $config); |
|
| 32 | ||
| 33 | return $config; |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * Sets starting and endind directives in a line. |
|
| @@ 45-51 (lines=7) @@ | ||
| 42 | * |
|
| 43 | * @return string a file content without comments |
|
| 44 | */ |
|
| 45 | public static function bracesPlacedOnePerLine($config = '') |
|
| 46 | { |
|
| 47 | $config = preg_replace('/\{\n?/m', "{\n", $config); |
|
| 48 | $config = preg_replace('/\n?\}/m', "\n}", $config); |
|
| 49 | ||
| 50 | return $config; |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||