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
e25ee915
There was an error fetching the commit references. Please try again later.
Commit
e25ee915
authored
7 years ago
by
Daniel Hürtgen
Browse files
Options
Downloads
Patches
Plain Diff
TASK: Apply PSR-2 CSG
parent
51890ddb
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Installer.php
+8
-5
8 additions, 5 deletions
src/Installer.php
src/PHPCodeSniffer/Standards.php
+2
-1
2 additions, 1 deletion
src/PHPCodeSniffer/Standards.php
src/Plugin.php
+1
-1
1 addition, 1 deletion
src/Plugin.php
with
11 additions
and
7 deletions
src/Installer.php
+
8
−
5
View file @
e25ee915
...
...
@@ -9,10 +9,10 @@ use Composer\IO\IOInterface;
use
Composer\Package\PackageInterface
;
use
Composer\Repository\InstalledRepositoryInterface
;
use
Composer\Util\Filesystem
;
use
Symfony\Component\Finder\Finder
;
use
Symfony\Component\Filesystem\Filesystem
as
SymfonyFilesystem
;
use
Higidi\ComposerPhpCSStandardsPlugin\PHPCodeSniffer\Standard
;
use
Higidi\ComposerPhpCSStandardsPlugin\PHPCodeSniffer\Standards
;
use
Symfony\Component\Filesystem\Filesystem
as
SymfonyFilesystem
;
use
Symfony\Component\Finder\Finder
;
class
Installer
extends
LibraryInstaller
{
...
...
@@ -86,7 +86,7 @@ class Installer extends LibraryInstaller
public
function
uninstall
(
InstalledRepositoryInterface
$repo
,
PackageInterface
$package
)
{
if
(
!
$repo
->
hasPackage
(
$package
))
{
throw
new
\InvalidArgumentException
(
'Package is not installed: '
.
$package
);
throw
new
\InvalidArgumentException
(
'Package is not installed: '
.
$package
);
}
$this
->
removeStandards
(
$repo
,
$package
);
parent
::
uninstall
(
$repo
,
$package
);
...
...
@@ -98,8 +98,11 @@ class Installer extends LibraryInstaller
* @param bool $override
* @return void
*/
protected
function
installStandards
(
InstalledRepositoryInterface
$repo
,
PackageInterface
$package
,
$override
=
false
)
{
protected
function
installStandards
(
InstalledRepositoryInterface
$repo
,
PackageInterface
$package
,
$override
=
false
)
{
$filesystem
=
new
SymfonyFilesystem
();
$sourceStandards
=
$this
->
getSourceStandards
(
$package
);
$destStandardsBasePath
=
$this
->
getPHPCodeSnifferStandardsBasePath
(
$repo
);
...
...
This diff is collapsed.
Click to expand it.
src/PHPCodeSniffer/Standards.php
+
2
−
1
View file @
e25ee915
...
...
@@ -78,7 +78,8 @@ class Standards implements \Iterator
* @param string|Standard $standard
* @return string
*/
protected
function
getStandardName
(
$standard
)
{
protected
function
getStandardName
(
$standard
)
{
if
(
$standard
instanceof
Standard
)
{
$standard
=
$standard
->
getName
();
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/Plugin.php
+
1
−
1
View file @
e25ee915
...
...
@@ -9,7 +9,7 @@ use Composer\Plugin\PluginInterface;
class
Plugin
implements
PluginInterface
{
/**
* @param Composer
$composer
* @param Composer $composer
* @param IOInterface $io
*
* @return void
...
...
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