@@ -36,7 +36,7 @@ public function writeLegend( array $legend ) : void
36
36
$ legendStrings [] = "{$ output } {$ status }" ;
37
37
}
38
38
39
- $ this ->writeToFile ( "%s \n\n" , implode ( ' | ' , $ legendStrings ) );
39
+ $ this ->write ( "%s \n\n" , implode ( ' | ' , $ legendStrings ) );
40
40
}
41
41
42
42
/**
@@ -45,7 +45,7 @@ public function writeLegend( array $legend ) : void
45
45
*
46
46
* @throws RuntimeException
47
47
*/
48
- private function writeToFile ( string $ formatOrContents , ...$ contextValues ) : void
48
+ public function write ( string $ formatOrContents , ...$ contextValues ) : void
49
49
{
50
50
fwrite (
51
51
$ this ->getFileHandle (),
@@ -80,7 +80,7 @@ private function getFileHandle()
80
80
*/
81
81
public function writeHeadline ( string $ title , int $ level ) : void
82
82
{
83
- $ this ->writeToFile ( "%s %s \n\n" , str_repeat ( '# ' , $ level ), $ title );
83
+ $ this ->write ( "%s %s \n\n" , str_repeat ( '# ' , $ level ), $ title );
84
84
}
85
85
86
86
/**
@@ -110,7 +110,7 @@ private function writeListing( array $elements, int $indentLevel, string $lineCh
110
110
111
111
$ indent = str_repeat ( ' ' , $ indentLevel * 2 );
112
112
113
- $ this ->writeToFile (
113
+ $ this ->write (
114
114
"%s%s %s \n\n" ,
115
115
$ indent ,
116
116
$ lineChar ,
@@ -137,7 +137,7 @@ public function writeBlockQuoteListing( array $elements, int $indentLevel = 0 )
137
137
*/
138
138
public function writeCheckbox ( string $ label , bool $ ticked ) : void
139
139
{
140
- $ this ->writeToFile (
140
+ $ this ->write (
141
141
"- [%s] %s \n" ,
142
142
$ ticked ? 'x ' : ' ' ,
143
143
$ label
@@ -149,7 +149,7 @@ public function writeCheckbox( string $label, bool $ticked ) : void
149
149
*/
150
150
public function writeHorizontalRule () : void
151
151
{
152
- $ this ->writeToFile ( "\n--- \n\n" );
152
+ $ this ->write ( "\n--- \n\n" );
153
153
}
154
154
155
155
public function getFilePath () : string
0 commit comments