Code Duplication    Length = 4-4 lines in 2 locations

src/Console/Commands/FileCommand.php 1 location

@@ 50-53 (lines=4) @@
47
    protected function execute(InputInterface $input, OutputInterface $output)
48
    {
49
        $file = $input->getArgument('target');
50
        if (!is_file($file) || !is_readable($file)) {
51
            throw new \InvalidArgumentException(sprintf('The target argument with value "%s" is not a valid file.',
52
                $file));
53
        }
54
55
        $output->writeln(sprintf('<info>Running analysis for "%s"</info>', $this->formatOutputPath(realpath($file))));
56

src/InformationProvider/LibraryInformation.php 1 location

@@ 65-68 (lines=4) @@
62
     */
63
    public static function createFromFile($source)
64
    {
65
        if (!is_file($source) || !is_readable($source)) {
66
            throw new \InvalidArgumentException(sprintf('The file "%s" does not exist or is not readable',
67
                $source));
68
        }
69
70
        return new static(include $source);
71
    }