Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 54... Zeile 54...
54
        } catch (RuntimeException $exception) {
54
        } catch (RuntimeException $exception) {
55
            return [];
55
            return [];
56
        }
56
        }
57
    }
57
    }
Zeile -... Zeile 58...
-
 
58
 
-
 
59
    public function getAsString(string $fileName): string
-
 
60
    {
-
 
61
        $snippet = $this->get($fileName);
-
 
62
 
-
 
63
        $snippetStrings = array_map(function (string $line, string $number) {
-
 
64
            return "{$number} {$line}";
-
 
65
        }, $snippet, array_keys($snippet));
-
 
66
 
-
 
67
        return implode(PHP_EOL, $snippetStrings);
-
 
68
    }
58
 
69
 
59
    protected function getBounds(int $totalNumberOfLineInFile): array
70
    protected function getBounds(int $totalNumberOfLineInFile): array
60
    {
71
    {
Zeile 61... Zeile 72...
61
        $startLine = max($this->surroundingLine - floor($this->snippetLineCount / 2), 1);
72
        $startLine = max($this->surroundingLine - floor($this->snippetLineCount / 2), 1);