Revert "Remove getCode usage as it is not type safe apparently, see https://github.com/phpstan/phpstan-src/pull/795"
This reverts commit 84f8fda0c6
.
And other issues fixed by PHPStan 1.3.2
pull/10432/head
parent
65c8daa969
commit
508ac051ec
|
@ -348,7 +348,7 @@ class Application extends BaseApplication
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} catch (ScriptExecutionException $e) {
|
} catch (ScriptExecutionException $e) {
|
||||||
return (int) $e->getCode();
|
return $e->getCode();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$ghe = new GithubActionError($this->io);
|
$ghe = new GithubActionError($this->io);
|
||||||
$ghe->emit($e->getMessage());
|
$ghe->emit($e->getMessage());
|
||||||
|
|
|
@ -39,14 +39,6 @@ class SolverProblemsException extends \RuntimeException
|
||||||
parent::__construct('Failed resolving dependencies with '.count($problems).' problems, call getPrettyString to get formatted details', self::ERROR_DEPENDENCY_RESOLUTION_FAILED);
|
parent::__construct('Failed resolving dependencies with '.count($problems).' problems, call getPrettyString to get formatted details', self::ERROR_DEPENDENCY_RESOLUTION_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return self::ERROR_DEPENDENCY_RESOLUTION_FAILED
|
|
||||||
*/
|
|
||||||
public function getExitCode()
|
|
||||||
{
|
|
||||||
return self::ERROR_DEPENDENCY_RESOLUTION_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $isVerbose
|
* @param bool $isVerbose
|
||||||
* @param bool $isDevExtraction
|
* @param bool $isDevExtraction
|
||||||
|
|
|
@ -455,7 +455,7 @@ class Installer
|
||||||
$ghe = new GithubActionError($this->io);
|
$ghe = new GithubActionError($this->io);
|
||||||
$ghe->emit($err."\n".$prettyProblem);
|
$ghe->emit($err."\n".$prettyProblem);
|
||||||
|
|
||||||
return max(self::ERROR_GENERIC_FAILURE, $e->getExitCode());
|
return max(self::ERROR_GENERIC_FAILURE, $e->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE);
|
$this->io->writeError("Analyzed ".count($pool)." packages to resolve dependencies", true, IOInterface::VERBOSE);
|
||||||
|
@ -633,7 +633,7 @@ class Installer
|
||||||
$ghe = new GithubActionError($this->io);
|
$ghe = new GithubActionError($this->io);
|
||||||
$ghe->emit($err."\n".$prettyProblem);
|
$ghe->emit($err."\n".$prettyProblem);
|
||||||
|
|
||||||
return max(self::ERROR_GENERIC_FAILURE, $e->getExitCode());
|
return max(self::ERROR_GENERIC_FAILURE, $e->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$lockTransaction->setNonDevPackages($nonDevLockTransaction);
|
$lockTransaction->setNonDevPackages($nonDevLockTransaction);
|
||||||
|
@ -703,7 +703,7 @@ class Installer
|
||||||
$ghe = new GithubActionError($this->io);
|
$ghe = new GithubActionError($this->io);
|
||||||
$ghe->emit($err."\n".$prettyProblem);
|
$ghe->emit($err."\n".$prettyProblem);
|
||||||
|
|
||||||
return max(self::ERROR_GENERIC_FAILURE, $e->getExitCode());
|
return max(self::ERROR_GENERIC_FAILURE, $e->getCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue