Skip to content

Commit

Permalink
Merge pull request #9 from cs278/fixes
Browse files Browse the repository at this point in the history
Prevent class redeclaration errors
  • Loading branch information
cs278 authored Nov 17, 2020
2 parents c197ec4 + 16d46f7 commit 980292a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ComposerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace Cs278\ComposerAudit;

if (\PHP_VERSION_ID >= 70100) {
require __DIR__.'/ComposerPlugin.real.php';
} else {
require __DIR__.'/ComposerPlugin.fake.php';
if (!class_exists(__NAMESPACE__.'\\ComposerPlugin', false)) {
if (\PHP_VERSION_ID >= 70100) {
require __DIR__.'/ComposerPlugin.real.php';
} else {
require __DIR__.'/ComposerPlugin.fake.php';
}
}

0 comments on commit 980292a

Please sign in to comment.