Skip to content

Commit

Permalink
Merge branch 'master' into docs/issue-16
Browse files Browse the repository at this point in the history
  • Loading branch information
Potherca authored Mar 29, 2017
2 parents f94f42f + 526b9c8 commit 219a209
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ private function updateInstalledPaths()
$finder->files()
->ignoreVCS(true)
->in($packageInstallPath)
->depth('> 1')
->depth('>= 1')
->depth('< 4')
->name('ruleset.xml');
foreach ($finder as $ruleset) {
Expand All @@ -287,6 +287,9 @@ private function updateInstalledPaths()
/**
* Iterates through Composers' local repository looking for valid Coding
* Standard packages.
*
* If the package is the RootPackage (the one the plugin is installed into),
* the package is ignored for now since it needs a different install path logic.
*
* @return array Composer packages containing coding standard(s)
*/
Expand All @@ -302,7 +305,7 @@ function (PackageInterface $package) {
}
);

if ($this->composer->getPackage()->getType() === self::PACKAGE_TYPE) {
if (!$this->composer->getPackage() instanceof \Composer\Package\RootpackageInterface && $this->composer->getPackage()->getType() === self::PACKAGE_TYPE) {
$codingStandardPackages[] = $this->composer->getPackage();
}

Expand Down

0 comments on commit 219a209

Please sign in to comment.