From 070055a8b96dfe7987638355956c71eee895ae67 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 21 Oct 2017 11:59:31 +0200 Subject: [PATCH] Fixed type hints --- module/Core/src/Entity/ShortUrl.php | 2 +- module/Core/src/Service/UrlShortener.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Core/src/Entity/ShortUrl.php b/module/Core/src/Entity/ShortUrl.php index 38fc5911..0f7ea621 100644 --- a/module/Core/src/Entity/ShortUrl.php +++ b/module/Core/src/Entity/ShortUrl.php @@ -90,7 +90,7 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable */ public function setOriginalUrl(string $originalUrl) { - $this->originalUrl = (string) $originalUrl; + $this->originalUrl = $originalUrl; return $this; } diff --git a/module/Core/src/Service/UrlShortener.php b/module/Core/src/Service/UrlShortener.php index 4aecade9..a14665e4 100644 --- a/module/Core/src/Service/UrlShortener.php +++ b/module/Core/src/Service/UrlShortener.php @@ -80,7 +80,7 @@ class UrlShortener implements UrlShortenerInterface // First, create the short URL with an empty short code $shortUrl = new ShortUrl(); - $shortUrl->setOriginalUrl($url); + $shortUrl->setOriginalUrl((string) $url); $this->em->persist($shortUrl); $this->em->flush();