mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-19 00:39:55 +03:00
Merge pull request #1131 from acelaya-forks/feature/clean-workarounds-from-fix
Removed hardcoded dependency
This commit is contained in:
commit
969fcccc1f
2 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,6 @@
|
||||||
"endroid/qr-code": "^4.0",
|
"endroid/qr-code": "^4.0",
|
||||||
"geoip2/geoip2": "^2.9",
|
"geoip2/geoip2": "^2.9",
|
||||||
"guzzlehttp/guzzle": "^7.0",
|
"guzzlehttp/guzzle": "^7.0",
|
||||||
"guzzlehttp/psr7": "^1.7",
|
|
||||||
"happyr/doctrine-specification": "^2.0",
|
"happyr/doctrine-specification": "^2.0",
|
||||||
"jaybizzle/crawler-detect": "^1.2",
|
"jaybizzle/crawler-detect": "^1.2",
|
||||||
"laminas/laminas-config": "^3.3",
|
"laminas/laminas-config": "^3.3",
|
||||||
|
|
|
@ -32,7 +32,11 @@ final class ShortUrlIdentifier
|
||||||
|
|
||||||
public static function fromCli(InputInterface $input): self
|
public static function fromCli(InputInterface $input): self
|
||||||
{
|
{
|
||||||
|
// Using getArguments and getOptions instead of getArgument(...) and getOption(...) because
|
||||||
|
// the later throw an exception if requested options are not defined
|
||||||
|
/** @var string $shortCode */
|
||||||
$shortCode = $input->getArguments()['shortCode'] ?? '';
|
$shortCode = $input->getArguments()['shortCode'] ?? '';
|
||||||
|
/** @var string|null $domain */
|
||||||
$domain = $input->getOptions()['domain'] ?? null;
|
$domain = $input->getOptions()['domain'] ?? null;
|
||||||
|
|
||||||
return new self($shortCode, $domain);
|
return new self($shortCode, $domain);
|
||||||
|
|
Loading…
Add table
Reference in a new issue