Skip to content

Commit 7c9ca86

Browse files
committed
update doc strings in mock of composer's runtime API
1 parent 41f8ecb commit 7c9ca86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/integration/autoloader/autoload-with-composer/vendor/composer/InstalledVersions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@
1212
namespace Composer;
1313
class InstalledVersions
1414
{
15+
// Mocked data: installed packages and their versions
1516
private static $installed = [
1617
'vendor1/package1' => '1.1.3',
1718
'vendor2/package2' => '2.1.5'
1819
];
1920

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

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

0 commit comments

Comments
 (0)