Skip to content

Commit

Permalink
Added constructor argument to SecurityChecker for multi user support
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasderoo4 committed Mar 3, 2021
1 parent a0914d1 commit a38f8c4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/SecurityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 4,17 @@

class SecurityChecker
{

/**
* @var string
*/
private $tempDir;

public function __construct($tempDir = null)
{
$this->tempDir = $tempDir;
}

/**
* @param string $composerLockPath
* @param false $excludeDev
Expand All @@ -12,7 23,7 @@ class SecurityChecker
*/
public function check($composerLockPath, $excludeDev = false)
{
$parser = new AdvisoryParser((new AdvisoryFetcher)->fetchAdvisories());
$parser = new AdvisoryParser((new AdvisoryFetcher($this->tempDir))->fetchAdvisories());

$dependencies = (new Composer)->getDependencies($composerLockPath, $excludeDev);

Expand Down

0 comments on commit a38f8c4

Please sign in to comment.