N°9167 Fix code style

This commit is contained in:
Timmy38
2026-05-18 14:11:13 +02:00
parent 52e65f3104
commit 918b4568ca
4 changed files with 3 additions and 6 deletions

View File

@@ -447,8 +447,6 @@ class iTopExtensionsMap
return $aRes; return $aRes;
} }
/** /**
* Mark the given extension as chosen * Mark the given extension as chosen
* @param string $sExtensionCode The code of the extension (code without version number) * @param string $sExtensionCode The code of the extension (code without version number)

View File

@@ -142,7 +142,8 @@ class iTopExtension
return true; return true;
} }
public function GetExtensionSourceLabel(): string { public function GetExtensionSourceLabel(): string
{
return match ($this->sSource) { return match ($this->sSource) {
iTopExtension::SOURCE_MANUAL => 'Local extensions folder', iTopExtension::SOURCE_MANUAL => 'Local extensions folder',
iTopExtension::SOURCE_REMOTE => (ITOP_APPLICATION == 'iTop') ? 'iTop Hub' : 'ITSM Designer', iTopExtension::SOURCE_REMOTE => (ITOP_APPLICATION == 'iTop') ? 'iTop Hub' : 'ITSM Designer',

View File

@@ -33,8 +33,7 @@ class ExtensionDetailsUIBlockFactory extends AbstractUIBlockFactory
if ($bMissingFromDisk) { if ($bMissingFromDisk) {
$oExtensionDetails->GetToggler()->SetIsToggled(false); $oExtensionDetails->GetToggler()->SetIsToggled(false);
$oExtensionDetails->GetToggler()->SetIsDisabled(true); $oExtensionDetails->GetToggler()->SetIsDisabled(true);
} } elseif (!$bUninstallable) {
else if (!$bUninstallable) {
$oExtensionDetails->AllowForceUninstall(); $oExtensionDetails->AllowForceUninstall();
$oExtensionDetails->GetToggler()->SetIsDisabled(true); $oExtensionDetails->GetToggler()->SetIsDisabled(true);
} }

View File

@@ -642,7 +642,6 @@ $oColumnLeft->AddSubBlock($oExtensionDetailInstalledFromFactory);
$oExtensionDetailInstalledFromFactory = ExtensionDetailsUIBlockFactory::MakeInstalled('itop-not-uninstallable', 'You cannot uninstall me', 'Click force uninstall to uninstall me', ['v9.9.9', 'Void', '12/12/2012'], ['uninstallable' => false,'missing' => false]); $oExtensionDetailInstalledFromFactory = ExtensionDetailsUIBlockFactory::MakeInstalled('itop-not-uninstallable', 'You cannot uninstall me', 'Click force uninstall to uninstall me', ['v9.9.9', 'Void', '12/12/2012'], ['uninstallable' => false,'missing' => false]);
$oColumnLeft->AddSubBlock($oExtensionDetailInstalledFromFactory); $oColumnLeft->AddSubBlock($oExtensionDetailInstalledFromFactory);
$oExtensionDetailInstalledWithLongTitle = ExtensionDetailsUIBlockFactory::MakeNotInstalled('itop-sample', 'My extension with a very long title', 'This is for test only', ['v1.1.1', 'Designer', '12/12/2012'], ['uninstallable' => false]); $oExtensionDetailInstalledWithLongTitle = ExtensionDetailsUIBlockFactory::MakeNotInstalled('itop-sample', 'My extension with a very long title', 'This is for test only', ['v1.1.1', 'Designer', '12/12/2012'], ['uninstallable' => false]);
$oColumnRight->AddSubBlock($oExtensionDetailInstalledWithLongTitle); $oColumnRight->AddSubBlock($oExtensionDetailInstalledWithLongTitle);
$oPage->add('<hr id="page_bottom"/>'); $oPage->add('<hr id="page_bottom"/>');