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
8
Issue boards
Milestones
Code
Merge requests
2
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 Hürtgen
composer-phpcodesniffer-standards-plugin
Commits
ee308009
Commit
ee308009
authored
7 years ago
by
Daniel Hürtgen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #20 from higidi/feature/17-write-status-messages-to-stdout
Feature/17 write status messages to stdout
parents
f64a0f97
75e55841
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!21
Release 0.3.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Installer.php
+6
-0
6 additions, 0 deletions
src/Installer.php
with
6 additions
and
0 deletions
src/Installer.php
+
6
−
0
View file @
ee308009
...
@@ -103,11 +103,14 @@ class Installer extends LibraryInstaller
...
@@ -103,11 +103,14 @@ class Installer extends LibraryInstaller
$filesystem
=
new
SymfonyFilesystem
();
$filesystem
=
new
SymfonyFilesystem
();
$sourceStandards
=
$this
->
getSourceStandards
(
$package
);
$sourceStandards
=
$this
->
getSourceStandards
(
$package
);
$destStandardsBasePath
=
$this
->
getPHPCodeSnifferStandardsBasePath
(
$repo
);
$destStandardsBasePath
=
$this
->
getPHPCodeSnifferStandardsBasePath
(
$repo
);
$this
->
io
->
writeError
(
' Installing PHP-CodeSniffer Standards:'
,
false
);
foreach
(
$sourceStandards
as
$sourceStandard
)
{
foreach
(
$sourceStandards
as
$sourceStandard
)
{
$this
->
io
->
writeError
(
sprintf
(
' <info>%s</info>'
,
$sourceStandard
->
getName
()));
$sourcePath
=
$sourceStandard
->
getPath
();
$sourcePath
=
$sourceStandard
->
getPath
();
$destPath
=
$destStandardsBasePath
.
DIRECTORY_SEPARATOR
.
$sourceStandard
->
getName
();
$destPath
=
$destStandardsBasePath
.
DIRECTORY_SEPARATOR
.
$sourceStandard
->
getName
();
$filesystem
->
mirror
(
$sourcePath
,
$destPath
,
null
,
array
(
'override'
=>
$override
));
$filesystem
->
mirror
(
$sourcePath
,
$destPath
,
null
,
array
(
'override'
=>
$override
));
}
}
$this
->
io
->
writeError
(
''
);
}
}
/**
/**
...
@@ -119,14 +122,17 @@ class Installer extends LibraryInstaller
...
@@ -119,14 +122,17 @@ class Installer extends LibraryInstaller
{
{
$sourceStandards
=
$this
->
getSourceStandards
(
$package
);
$sourceStandards
=
$this
->
getSourceStandards
(
$package
);
$destinationStandards
=
$this
->
getDestinationStandards
(
$repo
);
$destinationStandards
=
$this
->
getDestinationStandards
(
$repo
);
$this
->
io
->
writeError
(
' Removing PHP-CodeSniffer Standards:'
,
false
);
foreach
(
$sourceStandards
as
$sourceStandard
)
{
foreach
(
$sourceStandards
as
$sourceStandard
)
{
if
(
!
$destinationStandards
->
hasStandard
(
$sourceStandard
))
{
if
(
!
$destinationStandards
->
hasStandard
(
$sourceStandard
))
{
continue
;
continue
;
}
}
$this
->
io
->
writeError
(
sprintf
(
' <info>%s</info>'
,
$sourceStandard
->
getName
()));
$destinationStandard
=
$destinationStandards
->
getStandard
(
$sourceStandard
);
$destinationStandard
=
$destinationStandards
->
getStandard
(
$sourceStandard
);
$this
->
filesystem
->
removeDirectory
(
$destinationStandard
->
getPath
());
$this
->
filesystem
->
removeDirectory
(
$destinationStandard
->
getPath
());
}
}
$this
->
io
->
writeError
(
''
);
}
}
/**
/**
...
...
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