Coding style compliance
parent
46776c8e23
commit
17278999ba
|
@ -629,13 +629,13 @@ FOOTER;
|
||||||
|
|
||||||
$computing = array();
|
$computing = array();
|
||||||
$computed = array();
|
$computed = array();
|
||||||
$compute_importance = function($name) use(&$compute_importance, &$computing, &$computed, $usageList) {
|
$computeImportance = function($name) use(&$computeImportance, &$computing, &$computed, $usageList) {
|
||||||
# reusing computed importance
|
// reusing computed importance
|
||||||
if (isset($computed[$name])) {
|
if (isset($computed[$name])) {
|
||||||
return $computed[$name];
|
return $computed[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
# canceling circular dependency
|
// canceling circular dependency
|
||||||
if (isset($computing[$name])) {
|
if (isset($computing[$name])) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -645,7 +645,7 @@ FOOTER;
|
||||||
|
|
||||||
if (isset($usageList[$name])) {
|
if (isset($usageList[$name])) {
|
||||||
foreach ($usageList[$name] as $user) {
|
foreach ($usageList[$name] as $user) {
|
||||||
$weight -= 1 - $compute_importance($user);
|
$weight -= 1 - $computeImportance($user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ FOOTER;
|
||||||
$weightList = array();
|
$weightList = array();
|
||||||
|
|
||||||
foreach ($packages as $name => $package) {
|
foreach ($packages as $name => $package) {
|
||||||
$weight = $compute_importance($name);
|
$weight = $computeImportance($name);
|
||||||
$weightList[$name] = $weight;
|
$weightList[$name] = $weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue