src/CLI/InitCommand.php
protected function getConfiguration(InputInterface $input)
    {
        $file = $input->getArgument('file');
        Assertion::file($file, 'You must provide a valid file name');

        $configurationString = file_get_contents($file);
        Assertion::isJsonString($configurationString, 'The file must be a valid JSON');

        $configuration = @json_decode($configurationString, true);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \InvalidArgumentException('Invalid json : ' . json_last_error_msg());
        }

        self::checkConfiguration($configuration);

        return $configuration;
    }
protected function getConfiguration(InputInterface $input)
    {
        $file = $input->getArgument('file');
        Assertion::file($file, 'You must provide a valid file name');

        $configurationString = file_get_contents($file);
        Assertion::isJsonString($configurationString, 'The file must be a valid JSON');

        $configuration = @json_decode($configurationString, true);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new \InvalidArgumentException('Invalid json : ' . json_last_error_msg());
        }

        self::checkConfiguration($configuration);

        return $configuration;
    }
@param InputInterface $input

@return array

@throws \InvalidArgumentException
@throws AssertionFailedException
@throws InvalidArgumentException