Codestyle fixes.

This commit is contained in:
Mikolaj Gogula 2017-10-17 11:33:11 +02:00
parent 16a2349d86
commit 08d18b1dc1
2 changed files with 11 additions and 9 deletions

View file

@ -46,17 +46,23 @@ class UrlShortener implements UrlShortenerInterface
* @param ClientInterface $httpClient * @param ClientInterface $httpClient
* @param EntityManagerInterface $em * @param EntityManagerInterface $em
* @param Cache $cache * @param Cache $cache
* @param string $chars
* @param bool $isUrlExistsValidation * @param bool $isUrlExistsValidation
* @param string $chars
* *
* @Inject({"httpClient", "em", Cache::class, "config.url_shortener.shortcode_chars", "config.url_shortener.validate_url"}) * @Inject({
* "httpClient",
* "em",
* Cache::class,
* "config.url_shortener.validate_url",
* "config.url_shortener.shortcode_chars"
* })
*/ */
public function __construct( public function __construct(
ClientInterface $httpClient, ClientInterface $httpClient,
EntityManagerInterface $em, EntityManagerInterface $em,
Cache $cache, Cache $cache,
$chars = self::DEFAULT_CHARS, $isUrlExistsValidation,
$isUrlExistsValidation $chars = self::DEFAULT_CHARS
) { ) {
$this->httpClient = $httpClient; $this->httpClient = $httpClient;
$this->em = $em; $this->em = $em;

View file

@ -67,11 +67,7 @@ class UrlShortenerTest extends TestCase
public function setUrlShortener($isUrlValidationExists) public function setUrlShortener($isUrlValidationExists)
{ {
$this->urlShortener = new UrlShortener( $this->urlShortener = new UrlShortener(
$this->httpClient->reveal(), $this->httpClient->reveal(), $this->em->reveal(), $this->cache, $isUrlValidationExists, UrlShortener::DEFAULT_CHARS
$this->em->reveal(),
$this->cache,
UrlShortener::DEFAULT_CHARS,
$isUrlValidationExists
); );
} }