From 297c88c334f07f71955acfd74b336245c1fec8e6 Mon Sep 17 00:00:00 2001 From: Mikolaj Gogula Date: Tue, 17 Oct 2017 11:44:30 +0200 Subject: [PATCH] Change variable name for validation enabled. --- module/Core/src/Service/UrlShortener.php | 10 +++++----- module/Core/test/Service/UrlShortenerTest.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/Core/src/Service/UrlShortener.php b/module/Core/src/Service/UrlShortener.php index 1d652e07..b6008276 100644 --- a/module/Core/src/Service/UrlShortener.php +++ b/module/Core/src/Service/UrlShortener.php @@ -39,14 +39,14 @@ class UrlShortener implements UrlShortenerInterface /** * @var bool */ - private $isUrlExistsValidation; + private $urlValidationEnabled; /** * UrlShortener constructor. * @param ClientInterface $httpClient * @param EntityManagerInterface $em * @param Cache $cache - * @param bool $isUrlExistsValidation + * @param bool $urlValidationEnabled * @param string $chars * * @Inject({ @@ -61,14 +61,14 @@ class UrlShortener implements UrlShortenerInterface ClientInterface $httpClient, EntityManagerInterface $em, Cache $cache, - $isUrlExistsValidation, + $urlValidationEnabled, $chars = self::DEFAULT_CHARS ) { $this->httpClient = $httpClient; $this->em = $em; $this->chars = empty($chars) ? self::DEFAULT_CHARS : $chars; $this->cache = $cache; - $this->isUrlExistsValidation = $isUrlExistsValidation; + $this->urlValidationEnabled = $urlValidationEnabled; } /** @@ -91,7 +91,7 @@ class UrlShortener implements UrlShortenerInterface } // Check if the validation of url is enabled in the config - if (true === $this->isUrlExistsValidation) { + if (true === $this->urlValidationEnabled) { // Check that the URL exists $this->checkUrlExists($url); } diff --git a/module/Core/test/Service/UrlShortenerTest.php b/module/Core/test/Service/UrlShortenerTest.php index 4e7c9547..494a45f6 100644 --- a/module/Core/test/Service/UrlShortenerTest.php +++ b/module/Core/test/Service/UrlShortenerTest.php @@ -62,15 +62,15 @@ class UrlShortenerTest extends TestCase } /** - * @param bool $isUrlValidationExists + * @param bool $urlValidationEnabled */ - public function setUrlShortener($isUrlValidationExists) + public function setUrlShortener($urlValidationEnabled) { $this->urlShortener = new UrlShortener( $this->httpClient->reveal(), $this->em->reveal(), $this->cache, - $isUrlValidationExists, + $urlValidationEnabled, UrlShortener::DEFAULT_CHARS ); }