Skip to content

Commit 92e13b5

Browse files
committed
Code style fix...
1 parent 181b75f commit 92e13b5

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

setup/extensionsmap.class.inc.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,7 @@ protected function CheckDependencies($sFromEnvironment)
404404

405405
try {
406406
$aAllModules = ModuleDiscovery::GetAvailableModules($aSearchDirs, true);
407-
}
408-
catch (MissingDependencyException $e) {
407+
} catch (MissingDependencyException $e) {
409408
// Some modules have missing dependencies
410409
// Let's check what is the impact at the "extensions" level
411410
foreach ($this->aExtensions as $sKey => $oExtension) {
@@ -507,7 +506,7 @@ public function LoadChoicesFromDatabase(Config $oConfig)
507506

508507
$aInstalledExtensions = $this->GetInstalledExtensionsFromDatabase($oConfig);
509508

510-
foreach($aInstalledExtensions as $aDBInfo) {
509+
foreach ($aInstalledExtensions as $aDBInfo) {
511510
$this->MarkAsChosen($aDBInfo['code']);
512511
$this->SetInstalledVersion($aDBInfo['code'], $aDBInfo['version']);
513512
}
@@ -528,7 +527,6 @@ public function GetInstalledExtensionsFromDatabase(Config $oConfig): array|false
528527
}
529528
}
530529

531-
532530
/**
533531
* Tells if the given module name is "chosen" since it is part of a "chosen" extension (in the specified source dir)
534532
* @param string $sModuleNameToFind

setup/moduleinstallation.class.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function Init()
8989
MetaModel::Init_AddAttribute(new AttributeString("source", ["allowed_values" => null, "sql" => "source", "default_value" => null, "is_null_allowed" => false, "depends_on" => []]));
9090
MetaModel::Init_AddAttribute(new AttributeEnum("uninstallable", ["allowed_values" => new ValueSetEnum('yes,no,maybe'), "sql" => "uninstallable", "default_value" => 'yes', "is_null_allowed" => false, "depends_on" => []]));
9191
MetaModel::Init_AddAttribute(new AttributeDateTime("installed", ["allowed_values" => null, "sql" => "installed", "default_value" => 'NOW()', "is_null_allowed" => false, "depends_on" => []]));
92-
MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
92+
MetaModel::Init_AddAttribute(new AttributeText("description", ["allowed_values" => null, "sql" => "description", "default_value" => null, "is_null_allowed" => true, "depends_on" => []]));
9393

9494
// Display lists
9595
MetaModel::Init_SetZListItems('details', ['code', 'label', 'version', 'installed', 'source']); // Attributes to be displayed for the complete details

setup/wizardsteps.class.inc.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ public function JSCanMoveForward()
13101310
*/
13111311
class WizStepModulesChoice extends WizardStep
13121312
{
1313-
static protected string $SEP = '_';
1313+
protected static string $SEP = '_';
13141314
protected bool $bUpgrade = false;
13151315
protected bool $bCanMoveForward = true;
13161316
protected ?Config $oConfig = null;
@@ -1890,10 +1890,10 @@ protected function GetStepInfo($idx = null)
18901890
}
18911891
//Listing previously installed extension missing from disk
18921892
if (!is_null($this->oConfig) && ($aPreviouslyInstalled = $this->oExtensionsMap->GetInstalledExtensionsFromDatabase($this->oConfig))) {
1893-
foreach($aPreviouslyInstalled as $aExtension) {
1893+
foreach ($aPreviouslyInstalled as $aExtension) {
18941894
if (!$this->oExtensionsMap->Get($aExtension['code'])) {
18951895
$bUninstallable = $aExtension['uninstallable'] === 'yes';
1896-
$aStepDefinition['options'][] = array(
1896+
$aStepDefinition['options'][] = [
18971897
'extension_code' => $aExtension['code'],
18981898
'title' => $aExtension['label'],
18991899
'description' => $aExtension['description'] ?? '',
@@ -1904,7 +1904,7 @@ protected function GetStepInfo($idx = null)
19041904
'source_label' => $this->GetExtensionSourceLabel($aExtension['source']),
19051905
'uninstallable' => $bUninstallable,
19061906
'missing' => true,
1907-
);
1907+
];
19081908
} else {
19091909
$this->oExtensionsMap->Get($aExtension['code'])->bInstalled = true;
19101910
}
@@ -1986,7 +1986,8 @@ protected function DisplayOptions($oPage, $aStepInfo, $aSelectedComponents, $aDe
19861986
$oITopExtension = $this->oExtensionsMap->Get($aChoice['extension_code']);
19871987
$bCanBeUninstalled = isset($aChoice['uninstallable']) ? $aChoice['uninstallable'] : $oITopExtension->CanBeUninstalled();
19881988
$bSelected = isset($aSelectedComponents[$sChoiceId]) && ($aSelectedComponents[$sChoiceId] == $sChoiceId);
1989-
$bMandatory = (isset($aChoice['mandatory']) && $aChoice['mandatory']) || $this->bUpgrade && $bIsDefault && !$bCanBeUninstalled && !$bDisableUninstallCheck;;
1989+
$bMandatory = (isset($aChoice['mandatory']) && $aChoice['mandatory']) || $this->bUpgrade && $bIsDefault && !$bCanBeUninstalled && !$bDisableUninstallCheck;
1990+
;
19901991
$bMissingFromDisk = isset($aChoice['missing']) && $aChoice['missing'] === true;
19911992
$bInstalled = $bMissingFromDisk || $oITopExtension->bInstalled;
19921993
$bDisabled = $bMandatory || $bAllDisabled || $bMissingFromDisk;
@@ -2083,7 +2084,6 @@ protected function DisplayChoice($oPage, $aChoice, $aSelectedComponents, $aDefau
20832084
$sSourceLabel = $aChoice['source_label'] ?? '';
20842085
$sId = utils::EscapeHtml($aChoice['extension_code']);
20852086

2086-
20872087
$oPage->add('<label class="setup--wizard-choice--label" for="'.$sId.'">'.$sSourceLabel.'<b>'.utils::EscapeHtml($aChoice['title']).'</b>'.'&nbsp;'.$sTooltip.'</label> '.$sMoreInfo.'');
20882088
$sDescription = isset($aChoice['description']) ? utils::EscapeHtml($aChoice['description']) : '';
20892089
$oPage->add('<div class="setup--wizard-choice--description description">'.$sDescription.'<span id="sub_choices'.$sId.'">');
@@ -2110,7 +2110,6 @@ public function JSCanMoveForward()
21102110
return $this->bCanMoveForward ? 'return true;' : 'return false;';
21112111
}
21122112

2113-
21142113
public function GetNextButtonLabel()
21152114
{
21162115
return $this->bCanMoveForward ? 'Next' : 'Non-uninstallatble extension missing';

0 commit comments

Comments
 (0)