Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced setComparisonCallback with constructor argument
Fixes #76
- Loading branch information
1 parent
a5bd072
commit 79fd2bb
Showing
4 changed files
with
39 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare( strict_types = 1 ); | ||
|
||
namespace Diff\Comparer; | ||
|
||
/** | ||
* @since 3.0 | ||
* | ||
* @license GPL-2.0+ | ||
* @author Jeroen De Dauw < jeroendedauw@gmail.com > | ||
*/ | ||
class StubValueComparer implements ValueComparer { | ||
|
||
private $returnValue; | ||
|
||
public function __construct( bool $returnValue ) { | ||
$this->returnValue = $returnValue; | ||
} | ||
|
||
// @codingStandardsIgnoreStart | ||
public function valuesAreEqual( $firstValue, $secondValue ): bool { | ||
// @codingStandardsIgnoreEnd | ||
return $this->returnValue; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters