-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from wmde/psr4
Make Diff PSR-4 compliant
- Loading branch information
Showing
43 changed files
with
412 additions
and
270 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?php | ||
|
||
// This is a IDE helper to understand class aliasing. | ||
// It should not be included anywhere. | ||
// Actual aliasing happens in the entry point using class_alias. | ||
|
||
namespace { throw new Exception( 'This code is not meant to be executed' ); } | ||
|
||
namespace Diff { | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class CallbackListDiffer extends Differ\CallbackListDiffer {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base interface instead. | ||
*/ | ||
interface Differ extends Differ\Differ {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class ListDiffer extends Differ\ListDiffer {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class MapDiffer extends Differ\MapDiffer {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class OrderedListDiffer extends Differ\OrderedListDiffer {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class ListPatcher extends Patcher\ListPatcher {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class MapPatcher extends Patcher\MapPatcher {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base interface instead. | ||
*/ | ||
interface Patcher extends Patcher\Patcher {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class PatcherException extends Patcher\PatcherException {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base interface instead. | ||
*/ | ||
interface PreviewablePatcher extends Patcher\PreviewablePatcher {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
abstract class ThrowingPatcher extends Patcher\ThrowingPatcher {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class Diff extends DiffOp\Diff\Diff {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class ListDiff extends DiffOp\Diff\ListDiff {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class MapDiff extends DiffOp\Diff\MapDiff {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
abstract class AtomicDiffOp extends DiffOp\AtomicDiffOp {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base interface instead. | ||
*/ | ||
interface DiffOp extends DiffOp\DiffOp {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class DiffOpAdd extends DiffOp\DiffOpAdd {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class DiffOpChange extends DiffOp\DiffOpChange {} | ||
|
||
/** | ||
* @deprecated since 1.0, use the base class instead. | ||
*/ | ||
class DiffOpRemove extends DiffOp\DiffOpRemove {} | ||
|
||
} |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Diff; | ||
namespace Diff\DiffOp; | ||
|
||
/** | ||
* Base class for diff operations. A diff operation | ||
|
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<?php | ||
|
||
namespace Diff; | ||
namespace Diff\DiffOp\Diff; | ||
|
||
use Diff\DiffOp\DiffOp; | ||
use Diff\DiffOp\DiffOpAdd; | ||
use Diff\DiffOp\DiffOpChange; | ||
use Diff\DiffOp\DiffOpRemove; | ||
use InvalidArgumentException; | ||
|
||
/** | ||
|
@@ -14,7 +18,7 @@ | |
* @author Jeroen De Dauw < [email protected] > | ||
* @author Daniel Kinzler | ||
*/ | ||
class Diff extends \ArrayObject implements IDiff { | ||
class Diff extends \ArrayObject implements DiffOp { | ||
|
||
/** | ||
* @since 0.4 | ||
|
@@ -47,8 +51,6 @@ class Diff extends \ArrayObject implements IDiff { | |
protected $indexOffset = 0; | ||
|
||
/** | ||
* @see Diff::__construct | ||
* | ||
* @since 0.1 | ||
* | ||
* @param DiffOp[] $operations | ||
|
@@ -82,7 +84,7 @@ public function __construct( array $operations = array(), $isAssociative = null | |
* @return string | ||
*/ | ||
private function getObjectType() { | ||
return '\Diff\DiffOp'; | ||
return '\Diff\DiffOp\DiffOp'; | ||
} | ||
|
||
/** | ||
|
@@ -194,8 +196,6 @@ public function unserialize( $serialization ) { | |
} | ||
|
||
/** | ||
* Returns the add operations. | ||
* | ||
* @since 0.1 | ||
* | ||
* @return DiffOpAdd[] | ||
|
@@ -205,8 +205,6 @@ public function getAdditions() { | |
} | ||
|
||
/** | ||
* Returns the remove operations. | ||
* | ||
* @since 0.1 | ||
* | ||
* @return DiffOpRemove[] | ||
|
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Diff; | ||
namespace Diff\DiffOp; | ||
|
||
/** | ||
* Represents an addition. | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Diff; | ||
namespace Diff\DiffOp; | ||
|
||
/** | ||
* Represents a change. | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Diff; | ||
namespace Diff\DiffOp; | ||
|
||
/** | ||
* Represents a removal. | ||
|
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
3 changes: 2 additions & 1 deletion
3
src/differ/CallbackListDiffer.php → src/Differ/CallbackListDiffer.php
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
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
Oops, something went wrong.