Skip to content
Snippets Groups Projects
Commit e25ee915 authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

TASK: Apply PSR-2 CSG

parent 51890ddb
No related merge requests found
......@@ -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);
......
......@@ -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 {
......
......@@ -9,7 +9,7 @@ use Composer\Plugin\PluginInterface;
class Plugin implements PluginInterface
{
/**
* @param Composer $composer
* @param Composer $composer
* @param IOInterface $io
*
* @return void
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment