Skip to content

Commit 5095bdc

Browse files
djmattyg007sebastianbergmann
authored andcommitted
Move setting into constructor
1 parent eb9ed6d commit 5095bdc

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/Differ.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,15 @@ class Differ
2727
/**
2828
* @var bool
2929
*/
30-
private $showNonDiffLines = true;
30+
private $showNonDiffLines;
3131

3232
/**
3333
* @param string $header
3434
*/
35-
public function __construct($header = "--- Original\n+++ New\n")
35+
public function __construct($header = "--- Original\n+++ New\n", $showNonDiffLines = true)
3636
{
3737
$this->header = $header;
38-
}
39-
40-
/**
41-
* @param bool $show
42-
*/
43-
public function setShowNonDiffLines($show)
44-
{
45-
$this->showNonDiffLines = $show;
38+
$this->showNonDiffLines = $showNonDiffLines;
4639
}
4740

4841
/**

0 commit comments

Comments
 (0)