mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°8796 - Add PHP code style validation in iTop and extensions - format whole code base
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -71,7 +72,7 @@ class LinksBulkDataPostProcessor implements iDataPostProcessor
|
||||
|
||||
// Group by links attached to object selection
|
||||
$oFieldExp = new FieldExpression($sTargetField, 'lnk');
|
||||
$sQuery = $oDbObjectSearch->MakeGroupByQuery([$sTargetField], array('grouped_by_1' => $oFieldExp), true);
|
||||
$sQuery = $oDbObjectSearch->MakeGroupByQuery([$sTargetField], ['grouped_by_1' => $oFieldExp], true);
|
||||
$aGroupResult = CMDBSource::QueryToArray($sQuery, MYSQLI_ASSOC);
|
||||
|
||||
// Iterate throw result...
|
||||
@@ -109,8 +110,7 @@ class LinksBulkDataPostProcessor implements iDataPostProcessor
|
||||
|
||||
// Order items
|
||||
usort($aResult, [self::class, "CompareItems"]);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
|
||||
ExceptionLog::LogException($e);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ class LinksBulkDataPostProcessor implements iDataPostProcessor
|
||||
*
|
||||
* @return array|int
|
||||
*/
|
||||
static private function CompareItems($aItemA, $aItemB): int
|
||||
private static function CompareItems($aItemA, $aItemB): int
|
||||
{
|
||||
if ($aItemA['occurrence'] === $aItemB['occurrence']) {
|
||||
return 0;
|
||||
@@ -136,4 +136,4 @@ class LinksBulkDataPostProcessor implements iDataPostProcessor
|
||||
|
||||
return ($aItemA['occurrence'] > $aItemB['occurrence']) ? -1 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user