Skip to content
Snippets Groups Projects
Commit 675e7bf9 authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

FEATURE: Use symfony finder factory

parent 56d125b8
No related merge requests found
......@@ -21,6 +21,7 @@ namespace Higidi\ComposerPhpCSStandardsPlugin\PHPCodeSniffer;
* 02110-1301, USA.
*/
use Higidi\ComposerPhpCSStandardsPlugin\Symfony\Finder\Factory as FinderFactory;
use Symfony\Component\Finder\Finder as SymfonyFinder;
use Symfony\Component\Finder\SplFileInfo;
......@@ -29,6 +30,10 @@ use Symfony\Component\Finder\SplFileInfo;
*/
class Finder
{
/**
* @var FinderFactory
*/
protected $finderFactory;
/**
* @var StandardsFactory
......@@ -36,10 +41,12 @@ class Finder
protected $factory;
/**
* @param FinderFactory|null $finderFactory
* @param StandardsFactory|null $factory
*/
public function __construct(StandardsFactory $factory = null)
public function __construct(FinderFactory $finderFactory = null, StandardsFactory $factory = null)
{
$this->finderFactory = $finderFactory ?: new FinderFactory();
$this->factory = $factory ?: new StandardsFactory();
}
......@@ -73,7 +80,7 @@ class Finder
*/
protected function getSymfonyFinder()
{
return SymfonyFinder::create();
return $this->finderFactory->create();
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment