N°8796 - Add PHP code style validation in iTop and extensions - format whole code base

This commit is contained in:
odain
2025-11-07 20:39:38 +01:00
parent 7681c157ec
commit b0a792afab
369 changed files with 22041 additions and 26866 deletions

View File

@@ -1,10 +1,9 @@
<?php
SetupWebPage::AddModule(
__FILE__,
'itop-tickets/3.3.0',
array(
[
// Identification
//
'label' => 'Tickets Management',
@@ -12,24 +11,24 @@ SetupWebPage::AddModule(
// Setup
//
'dependencies' => array(
'dependencies' => [
'itop-structure/2.7.1',
),
],
'mandatory' => false,
'visible' => true,
'installer' => 'TicketsInstaller',
// Components
//
'datamodel' => array(
'datamodel' => [
'main.itop-tickets.php',
),
'data.struct' => array(
],
'data.struct' => [
// 'data.struct.ta-actions.xml',
),
'data.sample' => array(
),
],
'data.sample' => [
],
// Documentation
//
'doc.manual_setup' => '',
@@ -37,9 +36,9 @@ SetupWebPage::AddModule(
// Default settings
//
'settings' => array(
),
)
'settings' => [
],
]
);
// Module installation handler
@@ -52,17 +51,12 @@ class TicketsInstaller extends ModuleInstallerAPI
CMDBObject::SetTrackInfo('Uninstallation');
$oSearch = new DBObjectSearch('TriggerOnObject');
$oSet = new DBObjectSet($oSearch);
while($oTrigger = $oSet->Fetch())
{
try
{
if (!MetaModel::IsValidClass($oTrigger->Get('target_class')))
{
while ($oTrigger = $oSet->Fetch()) {
try {
if (!MetaModel::IsValidClass($oTrigger->Get('target_class'))) {
$oTrigger->DBDelete();
}
}
catch(Exception $e)
{
} catch (Exception $e) {
utils::EnrichRaisedException($oTrigger, $e);
}
}