1
0
Fork 0

Remove silly default values of false on Installer class, refs #9204

pull/9279/head
Jordi Boggiano 2020-10-13 12:33:43 +02:00
parent 24abd233ec
commit badd1f2146
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 7 additions and 7 deletions

View File

@ -234,7 +234,7 @@ EOT
->setApcuAutoloader($config->get('apcu-autoloader')); ->setApcuAutoloader($config->get('apcu-autoloader'));
if (!$composer->getLocker()->isLocked()) { if (!$composer->getLocker()->isLocked()) {
$installer->setUpdate(); $installer->setUpdate(true);
} }
if ($disablePlugins) { if ($disablePlugins) {

View File

@ -991,7 +991,7 @@ class Installer
* @param bool $optimizeAutoloader * @param bool $optimizeAutoloader
* @return Installer * @return Installer
*/ */
public function setOptimizeAutoloader($optimizeAutoloader = false) public function setOptimizeAutoloader($optimizeAutoloader)
{ {
$this->optimizeAutoloader = (bool) $optimizeAutoloader; $this->optimizeAutoloader = (bool) $optimizeAutoloader;
if (!$this->optimizeAutoloader) { if (!$this->optimizeAutoloader) {
@ -1010,7 +1010,7 @@ class Installer
* @param bool $classMapAuthoritative * @param bool $classMapAuthoritative
* @return Installer * @return Installer
*/ */
public function setClassMapAuthoritative($classMapAuthoritative = false) public function setClassMapAuthoritative($classMapAuthoritative)
{ {
$this->classMapAuthoritative = (bool) $classMapAuthoritative; $this->classMapAuthoritative = (bool) $classMapAuthoritative;
if ($this->classMapAuthoritative) { if ($this->classMapAuthoritative) {
@ -1028,7 +1028,7 @@ class Installer
* @param string|null $apcuAutoloaderPrefix * @param string|null $apcuAutoloaderPrefix
* @return Installer * @return Installer
*/ */
public function setApcuAutoloader($apcuAutoloader = false, $apcuAutoloaderPrefix = null) public function setApcuAutoloader($apcuAutoloader, $apcuAutoloaderPrefix = null)
{ {
$this->apcuAutoloader = $apcuAutoloader; $this->apcuAutoloader = $apcuAutoloader;
$this->apcuAutoloaderPrefix = $apcuAutoloaderPrefix; $this->apcuAutoloaderPrefix = $apcuAutoloaderPrefix;
@ -1042,7 +1042,7 @@ class Installer
* @param bool $update * @param bool $update
* @return Installer * @return Installer
*/ */
public function setUpdate($update = true) public function setUpdate($update)
{ {
$this->update = (bool) $update; $this->update = (bool) $update;
@ -1055,7 +1055,7 @@ class Installer
* @param bool $install * @param bool $install
* @return Installer * @return Installer
*/ */
public function setInstall($install = true) public function setInstall($install)
{ {
$this->install = (bool) $install; $this->install = (bool) $install;
@ -1151,7 +1151,7 @@ class Installer
* @param bool|array $ignorePlatformReqs * @param bool|array $ignorePlatformReqs
* @return Installer * @return Installer
*/ */
public function setIgnorePlatformRequirements($ignorePlatformReqs = false) public function setIgnorePlatformRequirements($ignorePlatformReqs)
{ {
if (is_array($ignorePlatformReqs)) { if (is_array($ignorePlatformReqs)) {
$this->ignorePlatformReqs = array_filter($ignorePlatformReqs, function ($req) { $this->ignorePlatformReqs = array_filter($ignorePlatformReqs, function ($req) {