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
bc1baf09
Commit
bc1baf09
authored
7 years ago
by
Daniel Hürtgen
Browse files
Options
Downloads
Patches
Plain Diff
TASK: Sort standards search by finder by name
parent
ce2c94c4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/PHPCodeSniffer/Finder.php
+2
-1
2 additions, 1 deletion
src/PHPCodeSniffer/Finder.php
tests/src/Unit/PHPCodeSniffer/FinderTest.php
+1
-1
1 addition, 1 deletion
tests/src/Unit/PHPCodeSniffer/FinderTest.php
with
3 additions
and
2 deletions
src/PHPCodeSniffer/Finder.php
+
2
−
1
View file @
bc1baf09
...
@@ -61,7 +61,8 @@ class Finder
...
@@ -61,7 +61,8 @@ class Finder
$finder
=
$this
->
getSymfonyFinder
()
$finder
=
$this
->
getSymfonyFinder
()
->
in
(
$path
)
->
in
(
$path
)
->
files
()
->
files
()
->
name
(
'ruleset.xml'
);
->
name
(
'ruleset.xml'
)
->
sortByName
();
$paths
=
iterator_to_array
(
$finder
,
false
);
$paths
=
iterator_to_array
(
$finder
,
false
);
$paths
=
array_map
(
$paths
=
array_map
(
function
(
SplFileInfo
$file
)
{
function
(
SplFileInfo
$file
)
{
...
...
This diff is collapsed.
Click to expand it.
tests/src/Unit/PHPCodeSniffer/FinderTest.php
+
1
−
1
View file @
bc1baf09
...
@@ -85,7 +85,7 @@ class FinderTest extends \PHPUnit_Framework_TestCase
...
@@ -85,7 +85,7 @@ class FinderTest extends \PHPUnit_Framework_TestCase
$path
.
DIRECTORY_SEPARATOR
.
'Standard1'
,
$path
.
DIRECTORY_SEPARATOR
.
'Standard1'
,
);
);
$fluentMethods
=
array
(
'in'
,
'files'
,
'name'
);
$fluentMethods
=
array
(
'in'
,
'files'
,
'name'
,
'sortByName'
);
foreach
(
$fluentMethods
as
$fluentMethod
)
{
foreach
(
$fluentMethods
as
$fluentMethod
)
{
$this
->
symfonyFinderMock
$this
->
symfonyFinderMock
->
method
(
$fluentMethod
)
->
method
(
$fluentMethod
)
...
...
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