1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Type annotations

This commit is contained in:
Jordi Boggiano 2021-10-17 14:21:19 +02:00
parent 98f1465610
commit b209816056
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
15 changed files with 216 additions and 3 deletions

View file

@ -40,6 +40,9 @@ class SolverProblemsException extends \RuntimeException
parent::__construct('Failed resolving dependencies with '.count($problems).' problems, call getPrettyString to get formatted details', self::ERROR_DEPENDENCY_RESOLUTION_FAILED);
}
/**
* @return string
*/
public function getPrettyString(RepositorySet $repositorySet, Request $request, Pool $pool, $isVerbose, $isDevExtraction = false)
{
$installedMap = $request->getPresentMap(true);
@ -54,7 +57,7 @@ class SolverProblemsException extends \RuntimeException
$hasExtensionProblems = true;
}
$isCausedByLock |= $problem->isCausedByLock($repositorySet, $request, $pool);
$isCausedByLock = $isCausedByLock || $problem->isCausedByLock($repositorySet, $request, $pool);
}
$i = 1;
@ -93,11 +96,17 @@ class SolverProblemsException extends \RuntimeException
return $text;
}
/**
* @return Problem[]
*/
public function getProblems()
{
return $this->problems;
}
/**
* @return string
*/
private function createExtensionHint()
{
$paths = IniHelper::getAll();
@ -113,6 +122,9 @@ class SolverProblemsException extends \RuntimeException
return $text;
}
/**
* @return bool
*/
private function hasExtensionProblems(array $reasonSets)
{
foreach ($reasonSets as $reasonSet) {