diff --git a/tests/Composer/Test/Mock/InstallationManagerMock.php b/tests/Composer/Test/Mock/InstallationManagerMock.php index 6271d3da6..c1db581b0 100644 --- a/tests/Composer/Test/Mock/InstallationManagerMock.php +++ b/tests/Composer/Test/Mock/InstallationManagerMock.php @@ -122,21 +122,25 @@ class InstallationManagerMock extends InstallationManager parent::markAliasUninstalled($repo, $operation); } + /** @return string[] */ public function getTrace() { return $this->trace; } + /** @return PackageInterface[] */ public function getInstalledPackages() { return $this->installed; } + /** @return PackageInterface[][] */ public function getUpdatedPackages() { return $this->updated; } + /** @return PackageInterface[] */ public function getUninstalledPackages() { return $this->uninstalled; @@ -147,6 +151,7 @@ class InstallationManagerMock extends InstallationManager // noop } + /** @return PackageInterface[] */ public function getInstalledPackagesByType() { return $this->installed; diff --git a/tests/Composer/Test/Mock/ProcessExecutorMock.php b/tests/Composer/Test/Mock/ProcessExecutorMock.php index 3f516eb13..3c09fdbb6 100644 --- a/tests/Composer/Test/Mock/ProcessExecutorMock.php +++ b/tests/Composer/Test/Mock/ProcessExecutorMock.php @@ -45,6 +45,8 @@ class ProcessExecutorMock extends ProcessExecutor * @param array $expectations * @param bool $strict set to true if you want to provide *all* expected commands, and not just a subset you are interested in testing * @param array{return: int, stdout?: string, stderr?: string} $defaultHandler default command handler for undefined commands if not in strict mode + * + * @return void */ public function expects(array $expectations, $strict = false, array $defaultHandler = array('return' => 0, 'stdout' => '', 'stderr' => '')) { @@ -62,6 +64,7 @@ class ProcessExecutorMock extends ProcessExecutor $this->defaultHandler = array_merge($this->defaultHandler, $defaultHandler); } + /** @return void */ public function assertComplete(TestCase $testCase) { if ($this->expectations) { @@ -96,6 +99,14 @@ class ProcessExecutorMock extends ProcessExecutor return $this->doExecute($command, $cwd, false); } + /** + * + * @param string $command + * @param string $cwd + * @param bool $tty + * @param callable $output + * @return mixed + */ private function doExecute($command, $cwd, $tty, &$output = null) { $this->captureOutput = func_num_args() > 3;