File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,12 @@ public function append(...$values)
67
67
/**
68
68
* Append a new line to the string.
69
69
*
70
+ * @param int $count
70
71
* @return $this
71
72
*/
72
- public function newLine ()
73
+ public function newLine ($ count = 1 )
73
74
{
74
- return $ this ->append (PHP_EOL );
75
+ return $ this ->append (str_repeat ( PHP_EOL , $ count ) );
75
76
}
76
77
77
78
/**
Original file line number Diff line number Diff line change @@ -422,6 +422,7 @@ public function testAscii()
422
422
public function testNewLine ()
423
423
{
424
424
$ this ->assertSame ('Laravel ' .PHP_EOL , (string ) $ this ->stringable ('Laravel ' )->newLine ());
425
+ $ this ->assertSame ('foo ' .PHP_EOL .PHP_EOL .'bar ' , (string ) $ this ->stringable ('foo ' )->newLine (2 )->append ('bar ' ));
425
426
}
426
427
427
428
public function testAsciiWithSpecificLocale ()
You can’t perform that action at this time.
0 commit comments