Skip to content

Commit

Permalink
update doc strings in mock of composer's runtime API
Browse files Browse the repository at this point in the history
  • Loading branch information
lavarou committed Sep 12, 2024
1 parent 3de4410 commit 0ed35f1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
namespace Composer;
class InstalledVersions
{
// Mocked data: installed packages and their versions
private static $installed = [
'vendor1/package1' => '1.1.3',
'vendor2/package2' => '2.1.5'
];

// This Composer's runtime API method is used by the agent to get the installed version of a package:
public static function getVersion(string $packageName)
{
return self::$installed[$packageName];
}

// This Composer's runtime API method is used by the agent to get the list of installed packages:
public static function getInstalledPackages()
{
// Return the package names
Expand Down

0 comments on commit 0ed35f1

Please sign in to comment.