From 6bb087beb4606b11171619aa6796789c6f93097e Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Tue, 15 Mar 2016 16:31:13 +0100 Subject: [PATCH] Changed target type to integer from string --- Entity/Log.php | 6 +++--- Event/TrackableEventInterface.php | 3 +++ Resources/config/doctrine/Log.orm.yml | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Entity/Log.php b/Entity/Log.php index fc297d5..8ded45d 100644 --- a/Entity/Log.php +++ b/Entity/Log.php @@ -15,7 +15,7 @@ class Log protected $time; /** - * @var mixed targetId + * @var int targetId */ protected $target; @@ -80,7 +80,7 @@ public function getId() } /** - * @param mixed $target + * @param int $target * * @return $this */ @@ -92,7 +92,7 @@ public function setTarget($target) } /** - * @return mixed + * @return int */ public function getTarget() { diff --git a/Event/TrackableEventInterface.php b/Event/TrackableEventInterface.php index 982938b..fc1765d 100644 --- a/Event/TrackableEventInterface.php +++ b/Event/TrackableEventInterface.php @@ -7,5 +7,8 @@ */ interface TrackableEventInterface { + /** + * @return int + */ public function getTargetIdentifier(); } diff --git a/Resources/config/doctrine/Log.orm.yml b/Resources/config/doctrine/Log.orm.yml index 7c49b1a..2abecbd 100644 --- a/Resources/config/doctrine/Log.orm.yml +++ b/Resources/config/doctrine/Log.orm.yml @@ -16,8 +16,7 @@ Happyr\EventTrackerBundle\Entity\Log: generator: {strategy: AUTO} fields: target: - type: string - length: 255 + type: integer action: type: string length: 50