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
875315fc
Commit
875315fc
authored
7 years ago
by
Daniel Hürtgen
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/refactor-code' into 'develop'
Feature/refactor code See merge request
!30
parents
4b195f1a
3d36a8fa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Installer.php
+5
-8
5 additions, 8 deletions
src/Installer.php
src/PHPCodeSniffer/Standards.php
+2
-4
2 additions, 4 deletions
src/PHPCodeSniffer/Standards.php
with
7 additions
and
12 deletions
src/Installer.php
+
5
−
8
View file @
875315fc
...
...
@@ -3,9 +3,9 @@
namespace
Higidi\ComposerPhpCSStandardsPlugin
;
use
Composer\Composer
;
use
Composer\IO\IOInterface
;
use
Composer\Installer\BinaryInstaller
;
use
Composer\Installer\LibraryInstaller
;
use
Composer\IO\IOInterface
;
use
Composer\Package\PackageInterface
;
use
Composer\Repository\InstalledRepositoryInterface
;
use
Composer\Util\Filesystem
;
...
...
@@ -42,9 +42,8 @@ class Installer extends LibraryInstaller
*/
public
function
isInstalled
(
InstalledRepositoryInterface
$repo
,
PackageInterface
$package
)
{
$isInstalled
=
parent
::
isInstalled
(
$repo
,
$package
);
if
(
!
$isInstalled
)
{
return
$isInstalled
;
if
(
!
parent
::
isInstalled
(
$repo
,
$package
))
{
return
false
;
}
$sourceStandards
=
$this
->
getSourceStandards
(
$package
);
$destinationStandards
=
$this
->
getDestinationStandards
(
$repo
);
...
...
@@ -53,12 +52,11 @@ class Installer extends LibraryInstaller
if
(
!
$destinationStandards
->
hasStandard
(
$sourceStandard
)
||
!
$this
->
compareStandards
(
$sourceStandard
,
$destinationStandards
->
getStandard
(
$sourceStandard
))
)
{
$isInstalled
=
false
;
break
;
return
false
;
}
}
return
$isInstalled
;
return
true
;
}
/**
...
...
@@ -79,7 +77,6 @@ class Installer extends LibraryInstaller
$this
->
installStandards
(
$repo
,
$target
,
$initial
?
false
:
true
);
}
/**
* {@inheritDoc}
*/
...
...
This diff is collapsed.
Click to expand it.
src/PHPCodeSniffer/Standards.php
+
2
−
4
View file @
875315fc
...
...
@@ -80,12 +80,10 @@ class Standards implements \Iterator
*/
protected
function
getStandardName
(
$standard
)
{
if
(
$standard
instanceof
Standard
)
{
$standard
=
$standard
->
getName
();
}
else
{
$standard
=
(
string
)
$standard
;
return
$standard
->
getName
();
}
return
$standard
;
return
(
string
)
$standard
;
}
/**
...
...
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