From a7982621505f10e2ba7b600bea38d47f896db198 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Wed, 31 Oct 2018 18:43:42 +0100 Subject: [PATCH] Added __toString to entities for easier debuging --- application/src/Entity/AbstractEntity.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/src/Entity/AbstractEntity.php b/application/src/Entity/AbstractEntity.php index 9590092..dec8020 100644 --- a/application/src/Entity/AbstractEntity.php +++ b/application/src/Entity/AbstractEntity.php @@ -32,4 +32,9 @@ abstract class AbstractEntity implements EntityInterface public function __construct() { } + + public function __toString(): string + { + return __CLASS__.':'.spl_object_hash($this); + } }