We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c619310 commit fc1fab0Copy full SHA for fc1fab0
lib/Command/RemoveLegacyTags.php
@@ -39,7 +39,11 @@ protected function configure() {
39
*/
40
protected function execute(InputInterface $input, OutputInterface $output): int {
41
try {
42
- $tagNames = \Safe\json_decode(file_get_contents(__DIR__ . '/../../src/things.json'), true);
+ /** @var list<string> $tagNames */
43
+ $tagNames = \json_decode(file_get_contents(__DIR__ . '/../../src/things.json'), true);
44
+ if (JSON_ERROR_NONE !== json_last_error()) {
45
+ throw new \Exception('JSON error');
46
+ }
47
$tagNames = array_map(fn ($tagName) => strtolower($tagName), $tagNames);
48
$this->tagManager->removeTags($tagNames);
49
} catch (\Exception $ex) {
0 commit comments