From b15174f23827158b117cbcd3d6a89a550cb076ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baptiste=20Clavi=C3=A9?= Date: Tue, 10 Jun 2014 16:02:44 +0200 Subject: [PATCH] Fixes #17 : Add a ChangeInterface --- src/AbstractChange.php | 2 +- src/ChangeInterface.php | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/ChangeInterface.php diff --git a/src/AbstractChange.php b/src/AbstractChange.php index 11f676a..2bb850a 100644 --- a/src/AbstractChange.php +++ b/src/AbstractChange.php @@ -17,7 +17,7 @@ * @author Baptiste Clavié * @author Rémy Gazelot */ -abstract class AbstractChange +abstract class AbstractChange implements ChangeInterface { /** old state */ private $old; diff --git a/src/ChangeInterface.php b/src/ChangeInterface.php new file mode 100644 index 0000000..f40e3cd --- /dev/null +++ b/src/ChangeInterface.php @@ -0,0 +1,27 @@ + + * @license http://www.opensource.org/licenses/MIT-License MIT License + */ + +namespace Totem; + +/** + * Represent a change in a data, with both values (before and after it was modified) + * + * @author Baptiste Clavié + */ +interface ChangeInterface +{ + /** @return mixed the data before it was changed */ + public function getOld(); + + /** @return mixed the data after it was changed */ + public function getNew(); +} +