Skip to content
This repository was archived by the owner on Mar 6, 2022. It is now read-only.

Commit 0e1e693

Browse files
committed
REmoves dead code
1 parent 8212653 commit 0e1e693

File tree

4 files changed

+0
-179
lines changed

4 files changed

+0
-179
lines changed

lib/Util/TextEditRenderer.php

Lines changed: 0 additions & 66 deletions
This file was deleted.

lib/Util/TextFormat.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Phpactor\CodeBuilder\Util;
44

5-
use RuntimeException;
6-
75
class TextFormat
86
{
97
/**
@@ -37,29 +35,8 @@ public function indentRemove(string $text): string
3735
return preg_replace("/^[ \t]+/m", "", $text);
3836
}
3937

40-
public function implodeLines(array $newLines): string
41-
{
42-
return implode($this->newLineChar, $newLines);
43-
}
44-
4538
public function indentReplace($text, int $level): string
4639
{
4740
return $this->indent($this->indentRemove($text), $level);
4841
}
49-
50-
public function newLineChar(): string
51-
{
52-
return $this->newLineChar;
53-
}
54-
55-
public function indentation(int $level): string
56-
{
57-
if ($level < 0) {
58-
throw new RuntimeException(sprintf(
59-
'Indentation level must be equal to or greater than 0, got "%s"',
60-
$level
61-
));
62-
}
63-
return str_repeat($this->indentation, $level);
64-
}
6542
}

lib/Util/TextUtil.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,4 @@ public static function lines(string $text): array
88
{
99
return preg_split("{(\r\n|\n|\r)}", $text);
1010
}
11-
12-
public static function lineIndentation(string $line): string
13-
{
14-
if (!preg_match('{^([\t ]*)}', $line, $matches)) {
15-
return '';
16-
}
17-
18-
return $matches[1];
19-
}
20-
21-
public static function hasDocblock(string $line): bool
22-
{
23-
return (bool)preg_match('{^\s*\*}m', $line);
24-
}
2511
}

tests/Unit/Util/TextUtilTest.php

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)