-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maksims Sļotovs
committed
Jul 19, 2021
1 parent
8822c7b
commit 4058322
Showing
52 changed files
with
227 additions
and
217 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
interface ArrayComparer { | ||
interface ArrayComparerInterface { | ||
|
||
/** | ||
* Returns an array containing all the entries from arrayOne that are not present in arrayTwo. | ||
|
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 |
---|---|---|
|
@@ -12,10 +12,10 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class NativeArrayComparer implements ArrayComparer { | ||
class NativeArrayComparer implements ArrayComparerInterface { | ||
|
||
/** | ||
* @see ArrayComparer::diffArrays | ||
* @see ArrayComparerInterface::diffArrays | ||
* | ||
* Uses @see array_diff. | ||
* | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
namespace Diff\ArrayComparer; | ||
|
||
use Diff\Comparer\ValueComparer; | ||
use Diff\Comparer\ValueComparerInterface; | ||
|
||
/** | ||
* Computes the difference between two ordered arrays by comparing elements with | ||
|
@@ -19,16 +19,16 @@ | |
* @author Jeroen De Dauw < [email protected] > | ||
* @author Tobias Gritschacher < [email protected] > | ||
*/ | ||
class OrderedArrayComparer implements ArrayComparer { | ||
class OrderedArrayComparer implements ArrayComparerInterface { | ||
|
||
private $valueComparer; | ||
|
||
public function __construct( ValueComparer $valueComparer ) { | ||
public function __construct( ValueComparerInterface $valueComparer ) { | ||
$this->valueComparer = $valueComparer; | ||
} | ||
|
||
/** | ||
* @see ArrayComparer::diffArrays | ||
* @see ArrayComparerInterface::diffArrays | ||
* | ||
* @since 0.9 | ||
* | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
namespace Diff\ArrayComparer; | ||
|
||
use Diff\Comparer\ValueComparer; | ||
use Diff\Comparer\ValueComparerInterface; | ||
|
||
/** | ||
* Computes the difference between two arrays by comparing elements with | ||
|
@@ -17,16 +17,16 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class StrategicArrayComparer implements ArrayComparer { | ||
class StrategicArrayComparer implements ArrayComparerInterface { | ||
|
||
private $valueComparer; | ||
|
||
public function __construct( ValueComparer $valueComparer ) { | ||
public function __construct( ValueComparerInterface $valueComparer ) { | ||
$this->valueComparer = $valueComparer; | ||
} | ||
|
||
/** | ||
* @see ArrayComparer::diffArrays | ||
* @see ArrayComparerInterface::diffArrays | ||
* | ||
* @since 0.8 | ||
* | ||
|
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 |
---|---|---|
|
@@ -20,10 +20,10 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class StrictArrayComparer implements ArrayComparer { | ||
class StrictArrayComparer implements ArrayComparerInterface { | ||
|
||
/** | ||
* @see ArrayComparer::diffArrays | ||
* @see ArrayComparerInterface::diffArrays | ||
* | ||
* @since 0.8 | ||
* | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class CallbackComparer implements ValueComparer { | ||
class CallbackComparer implements ValueComparerInterface { | ||
|
||
private $callback; | ||
|
||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class ComparableComparer implements ValueComparer { | ||
class ComparableComparer implements ValueComparerInterface { | ||
|
||
public function valuesAreEqual( $firstValue, $secondValue ): bool { | ||
if ( $firstValue && method_exists( $firstValue, 'equals' ) ) { | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class StrictComparer implements ValueComparer { | ||
class StrictComparer implements ValueComparerInterface { | ||
|
||
/** | ||
* @param mixed $firstValue | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
interface ValueComparer { | ||
interface ValueComparerInterface { | ||
|
||
/** | ||
* @since 0.6 | ||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @author Jeroen De Dauw < [email protected] > | ||
* @author Daniel Kinzler | ||
*/ | ||
abstract class AtomicDiffOp implements DiffOp { | ||
abstract class AbstractAtomicDiffOp implements DiffOpInterface { | ||
|
||
/** | ||
* @see Countable::count | ||
|
@@ -28,7 +28,7 @@ public function count(): int { | |
} | ||
|
||
/** | ||
* @see DiffOp::isAtomic | ||
* @see DiffOpInterface::isAtomic | ||
* | ||
* @since 0.1 | ||
* | ||
|
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 |
---|---|---|
|
@@ -13,12 +13,12 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class DiffOpAdd extends AtomicDiffOp { | ||
class DiffOpAdd extends AbstractAtomicDiffOp { | ||
|
||
private $newValue; | ||
|
||
/** | ||
* @see DiffOp::getType | ||
* @see DiffOpInterface::getType | ||
* | ||
* @since 0.1 | ||
* | ||
|
@@ -69,7 +69,7 @@ public function unserialize( $serialization ) { | |
} | ||
|
||
/** | ||
* @see DiffOp::toArray | ||
* @see DiffOpInterface::toArray | ||
* | ||
* @since 0.5 | ||
* | ||
|
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 |
---|---|---|
|
@@ -13,13 +13,13 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
class DiffOpChange extends AtomicDiffOp { | ||
class DiffOpChange extends AbstractAtomicDiffOp { | ||
|
||
private $newValue; | ||
private $oldValue; | ||
|
||
/** | ||
* @see DiffOp::getType | ||
* @see DiffOpInterface::getType | ||
* | ||
* @since 0.1 | ||
* | ||
|
@@ -81,7 +81,7 @@ public function unserialize( $serialization ) { | |
} | ||
|
||
/** | ||
* @see DiffOp::toArray | ||
* @see DiffOpInterface::toArray | ||
* | ||
* @since 0.5 | ||
* | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @license BSD-3-Clause | ||
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
interface DiffOp extends Serializable, Countable { | ||
interface DiffOpInterface extends Serializable, Countable { | ||
|
||
/** | ||
* Returns a string identifier for the operation type. | ||
|
Oops, something went wrong.