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
9456a09c
There was an error fetching the commit references. Please try again later.
Commit
9456a09c
authored
7 years ago
by
Daniel Hürtgen
Browse files
Options
Downloads
Patches
Plain Diff
TASK: Shorten several soruce & destination variable names
parent
ee279de1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Installer.php
+19
-19
19 additions, 19 deletions
src/Installer.php
with
19 additions
and
19 deletions
src/Installer.php
+
19
−
19
View file @
9456a09c
...
@@ -66,12 +66,12 @@ class Installer extends LibraryInstaller
...
@@ -66,12 +66,12 @@ class Installer extends LibraryInstaller
if
(
!
parent
::
isInstalled
(
$repo
,
$package
))
{
if
(
!
parent
::
isInstalled
(
$repo
,
$package
))
{
return
false
;
return
false
;
}
}
$s
ou
rc
e
Standards
=
$this
->
getSourceStandards
(
$package
);
$srcStandards
=
$this
->
getSourceStandards
(
$package
);
$d
e
st
ination
Standards
=
$this
->
getDestinationStandards
(
$repo
);
$dstStandards
=
$this
->
getDestinationStandards
(
$repo
);
foreach
(
$s
ou
rc
e
Standards
as
$s
ou
rc
e
Standard
)
{
foreach
(
$srcStandards
as
$srcStandard
)
{
if
(
!
$d
e
st
ination
Standards
->
hasStandard
(
$s
ou
rc
e
Standard
)
if
(
!
$dstStandards
->
hasStandard
(
$srcStandard
)
||
!
$this
->
compareStandards
(
$s
ou
rc
e
Standard
,
$d
e
st
ination
Standards
->
getStandard
(
$s
ou
rc
e
Standard
))
||
!
$this
->
compareStandards
(
$srcStandard
,
$dstStandards
->
getStandard
(
$srcStandard
))
)
{
)
{
return
false
;
return
false
;
}
}
...
@@ -122,14 +122,14 @@ class Installer extends LibraryInstaller
...
@@ -122,14 +122,14 @@ class Installer extends LibraryInstaller
$override
=
false
$override
=
false
)
{
)
{
$filesystem
=
new
SymfonyFilesystem
();
$filesystem
=
new
SymfonyFilesystem
();
$s
ou
rc
e
Standards
=
$this
->
getSourceStandards
(
$package
);
$srcStandards
=
$this
->
getSourceStandards
(
$package
);
$d
e
stSt
andards
BasePath
=
$this
->
getPHPCodeSnifferStandardsBasePath
(
$repo
);
$dstSt
d
BasePath
=
$this
->
getPHPCodeSnifferStandardsBasePath
(
$repo
);
$this
->
io
->
writeError
(
' Installing PHP-CodeSniffer Standards:'
,
false
);
$this
->
io
->
writeError
(
' Installing PHP-CodeSniffer Standards:'
,
false
);
foreach
(
$s
ou
rc
e
Standards
as
$s
ou
rc
e
Standard
)
{
foreach
(
$srcStandards
as
$srcStandard
)
{
$this
->
io
->
writeError
(
sprintf
(
' <info>%s</info>'
,
$s
ou
rc
e
Standard
->
getName
()));
$this
->
io
->
writeError
(
sprintf
(
' <info>%s</info>'
,
$srcStandard
->
getName
()));
$s
ou
rc
e
Path
=
$s
ou
rc
e
Standard
->
getPath
();
$srcPath
=
$srcStandard
->
getPath
();
$d
e
stPath
=
$d
e
stSt
andards
BasePath
.
DIRECTORY_SEPARATOR
.
$s
ou
rc
e
Standard
->
getName
();
$dstPath
=
$dstSt
d
BasePath
.
DIRECTORY_SEPARATOR
.
$srcStandard
->
getName
();
$filesystem
->
mirror
(
$s
ou
rc
e
Path
,
$d
e
stPath
,
null
,
array
(
'override'
=>
$override
));
$filesystem
->
mirror
(
$srcPath
,
$dstPath
,
null
,
array
(
'override'
=>
$override
));
}
}
}
}
...
@@ -140,17 +140,17 @@ class Installer extends LibraryInstaller
...
@@ -140,17 +140,17 @@ class Installer extends LibraryInstaller
*/
*/
protected
function
removeStandards
(
InstalledRepositoryInterface
$repo
,
PackageInterface
$package
)
protected
function
removeStandards
(
InstalledRepositoryInterface
$repo
,
PackageInterface
$package
)
{
{
$s
ou
rc
e
Standards
=
$this
->
getSourceStandards
(
$package
);
$srcStandards
=
$this
->
getSourceStandards
(
$package
);
$d
e
st
ination
Standards
=
$this
->
getDestinationStandards
(
$repo
);
$dstStandards
=
$this
->
getDestinationStandards
(
$repo
);
$this
->
io
->
writeError
(
' Removing PHP-CodeSniffer Standards:'
,
false
);
$this
->
io
->
writeError
(
' Removing PHP-CodeSniffer Standards:'
,
false
);
foreach
(
$s
ou
rc
e
Standards
as
$s
ou
rc
e
Standard
)
{
foreach
(
$srcStandards
as
$srcStandard
)
{
if
(
!
$d
e
st
ination
Standards
->
hasStandard
(
$s
ou
rc
e
Standard
))
{
if
(
!
$dstStandards
->
hasStandard
(
$srcStandard
))
{
continue
;
continue
;
}
}
$this
->
io
->
writeError
(
sprintf
(
' <info>%s</info>'
,
$s
ou
rc
e
Standard
->
getName
()));
$this
->
io
->
writeError
(
sprintf
(
' <info>%s</info>'
,
$srcStandard
->
getName
()));
$d
e
st
ination
Standard
=
$d
e
st
ination
Standards
->
getStandard
(
$s
ou
rc
e
Standard
);
$dstStandard
=
$dstStandards
->
getStandard
(
$srcStandard
);
$this
->
filesystem
->
removeDirectory
(
$d
e
st
ination
Standard
->
getPath
());
$this
->
filesystem
->
removeDirectory
(
$dstStandard
->
getPath
());
}
}
}
}
...
...
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