protected function checkFiles(InputInterface $input, array $files): int
    {
        $filesPerLine = TypeCast::castInt($input->getOption('files-per-line'));
        $totalFiles = count($files);

        /** @var SplFileInfo[] $chunkFiles */
        $chunkFiles = array_chunk($files, $filesPerLine);

        $this->processFiles($chunkFiles, $filesPerLine, $totalFiles);

        return $totalFiles;
    }