Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
composer-phpcodesniffer-standards-plugin
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Daniel Siepmann
composer-phpcodesniffer-standards-plugin
Commits
675e7bf9
There was an error fetching the commit references. Please try again later.
Commit
675e7bf9
authored
7 years ago
by
Daniel Hürtgen
Browse files
Options
Downloads
Patches
Plain Diff
FEATURE: Use symfony finder factory
parent
56d125b8
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PHPCodeSniffer/Finder.php
+9
-2
9 additions, 2 deletions
src/PHPCodeSniffer/Finder.php
with
9 additions
and
2 deletions
src/PHPCodeSniffer/Finder.php
+
9
−
2
View file @
675e7bf9
...
...
@@ -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
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment