mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
code style fix
This commit is contained in:
@@ -81,11 +81,11 @@ class MFException extends Exception
|
||||
public function __construct($message = null, $code = 0, $oNode, $sXPath = null, $sExtraInfo = '', $oParentFallbackNode = null)
|
||||
{
|
||||
$iSourceLineNumber = ModelFactory::GetXMLLineNumber($oNode);
|
||||
if ($iSourceLineNumber==0 && ! is_null($oParentFallbackNode)){
|
||||
if ($iSourceLineNumber == 0 && ! is_null($oParentFallbackNode)) {
|
||||
$iSourceLineNumber = ModelFactory::GetXMLLineNumber($oParentFallbackNode);
|
||||
}
|
||||
|
||||
if (is_null($sXPath)){
|
||||
if (is_null($sXPath)) {
|
||||
$sXPath = DesignDocument::GetItopNodePath($oNode);
|
||||
}
|
||||
|
||||
@@ -2139,7 +2139,7 @@ EOF;
|
||||
* @throws MFException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function RedefineChildNode(MFElement $oNode, $sSearchId = null, $oParentFallbackNode=null)
|
||||
public function RedefineChildNode(MFElement $oNode, $sSearchId = null, $oParentFallbackNode = null)
|
||||
{
|
||||
// First: cleanup any flag behind the new node, and eventually add trace data
|
||||
$oNode->ApplyChanges();
|
||||
|
||||
@@ -215,10 +215,8 @@ class ModuleDiscovery
|
||||
ksort($aDependencies);
|
||||
$aOrderedModules = [];
|
||||
$iLoopCount = 0;
|
||||
while(($iLoopCount < count($aModules)) && (count($aDependencies) > 0) )
|
||||
{
|
||||
foreach($aDependencies as $sId => $aRemainingDeps)
|
||||
{
|
||||
while (($iLoopCount < count($aModules)) && (count($aDependencies) > 0)) {
|
||||
foreach ($aDependencies as $sId => $aRemainingDeps) {
|
||||
$bDependenciesSolved = true;
|
||||
foreach ($aRemainingDeps as $sDepId) {
|
||||
if (!self::DependencyIsResolved($sDepId, $aOrderedModules, $aSelectedModules)) {
|
||||
@@ -278,8 +276,7 @@ class ModuleDiscovery
|
||||
$bResult = false;
|
||||
$aModuleVersions = [];
|
||||
// Separate the module names from their version for an easier comparison later
|
||||
foreach($aOrderedModules as $sModuleId)
|
||||
{
|
||||
foreach ($aOrderedModules as $sModuleId) {
|
||||
list($sModuleName, $sVersion) = self::GetModuleName($sModuleId);
|
||||
$aModuleVersions[$sModuleName] = $sVersion;
|
||||
}
|
||||
@@ -395,12 +392,10 @@ class ModuleDiscovery
|
||||
if (preg_match('!^(.*)/(.*)$!', $sModuleId, $aMatches)) {
|
||||
$sName = $aMatches[1];
|
||||
$sVersion = $aMatches[2];
|
||||
if ($sVersion === ""){
|
||||
if ($sVersion === "") {
|
||||
$sVersion = "1.0.0";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sName = $sModuleId;
|
||||
$sVersion = "1.0.0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user