Skip to content

Commit 20c312c

Browse files
committed
Optimise function imports in ScrapeCommand
1 parent fbb767a commit 20c312c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: src/ScrapeCommand.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
use Symfony\Component\Console\Input\InputOption;
1010
use Symfony\Component\Console\Output\OutputInterface;
1111
use Symfony\Component\Console\Question\ConfirmationQuestion;
12+
use function count;
13+
use function GuzzleHttp\json_decode;
14+
use function in_array;
15+
use function is_dir;
16+
use function mkdir;
17+
use function sprintf;
1218

1319
/**
1420
* Class RunCommand
@@ -189,7 +195,7 @@ private function parseInput(InputInterface $input): void
189195
$this->outputDirectory = $input->getOption('output');
190196
$this->quality = $input->getOption('quality');
191197

192-
if (!in_array($this->quality, self::ALLOWED_QUALITIES)) {
198+
if (!in_array($this->quality, self::ALLOWED_QUALITIES, true)) {
193199
throw new \ErrorException('Invalid quality specified.');
194200
}
195201

@@ -231,7 +237,7 @@ private function getJson(string $url, array $options = null): array
231237
$this->guzzle = new Client();
232238
}
233239

234-
return \GuzzleHttp\json_decode(
240+
return json_decode(
235241
$this->guzzle->get($url, $options)
236242
->getBody()
237243
->getContents(),

0 commit comments

Comments
 (0)