Fixed type hints

This commit is contained in:
Alejandro Celaya 2017-10-21 11:59:31 +02:00
parent a3bbd06fe3
commit 070055a8b9
2 changed files with 2 additions and 2 deletions

View file

@ -90,7 +90,7 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable
*/ */
public function setOriginalUrl(string $originalUrl) public function setOriginalUrl(string $originalUrl)
{ {
$this->originalUrl = (string) $originalUrl; $this->originalUrl = $originalUrl;
return $this; return $this;
} }

View file

@ -80,7 +80,7 @@ class UrlShortener implements UrlShortenerInterface
// First, create the short URL with an empty short code // First, create the short URL with an empty short code
$shortUrl = new ShortUrl(); $shortUrl = new ShortUrl();
$shortUrl->setOriginalUrl($url); $shortUrl->setOriginalUrl((string) $url);
$this->em->persist($shortUrl); $this->em->persist($shortUrl);
$this->em->flush(); $this->em->flush();