protected function findFiles()
    {
        // Add php files.
        $finder = new Finder();
        $finder
            ->files()
            // Ignore version control system folder.
            ->ignoreVCS(true)
            // Do not add tests folders.
            ->exclude('Tests')
            ->exclude('tests')
            // Do not add composer backup folder.
            ->exclude('composer.bak');

        if (!empty($this->excludeFiles)) {
            foreach ($this->excludeFiles as $file) {
                $finder->notPath($file);
            }
        }

        return $finder;
    }