1 | <?php |
||
17 | class LineHelper |
||
18 | { |
||
19 | /** |
||
20 | * The used file. |
||
21 | * |
||
22 | * @var File |
||
23 | */ |
||
24 | private $file; |
||
25 | |||
26 | /** |
||
27 | * Dou you want to reuse a fixer? |
||
28 | * |
||
29 | * @var Fixer |
||
30 | */ |
||
31 | private $fixer; |
||
32 | |||
33 | /** |
||
34 | * LineHelper constructor. |
||
35 | * |
||
36 | * @param File $file The used file. |
||
37 | * @param Fixer|null $fixer Dou you want to reuse a fixer? |
||
38 | */ |
||
39 | public function __construct(File $file, ?Fixer $fixer = null) |
||
49 | |||
50 | /** |
||
51 | * Removes the given line. |
||
52 | * |
||
53 | * @param int $line The line which is to be removed |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | public function removeLine(int $line): void |
||
71 | |||
72 | /** |
||
73 | * Removes lines by given start and end. |
||
74 | * |
||
75 | * @param int $startLine The first line which is to be removed |
||
76 | * @param int $endLine The last line which is to be removed |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function removeLines(int $startLine, int $endLine): void |
||
86 | } |
||
87 |