]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/blocks.php
bracket spacing for if/else/for/foreach/while/switch according to PSR2 standard
[nominatim.git] / utils / blocks.php
index 7388d2f4eb8e3fa72532e39d002cf40093523349..46b5ad05315e7590e97d74cf05cd1222d16203ea 100755 (executable)
@@ -17,14 +17,12 @@ $aCMDOptions = array(
 getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true);
 
 $m = getBucketMemcache();
-    if (!$m)
-{
+if (!$m) {
     echo "ERROR: Bucket memcache is not configured\n";
     exit;
 }
 
-if ($aResult['list'])
-{
+if ($aResult['list']) {
     $iCurrentSleeping = $m->get('sleepCounter');
     echo "\n Sleeping blocks count: $iCurrentSleeping\n";
 
@@ -32,8 +30,7 @@ if ($aResult['list'])
     echo "\n";
     printf(" %-40s | %12s | %7s | %13s | %31s | %8s\n", "Key", "Total Blocks", "Current", "Still Blocked", "Last Block Time", "Sleeping");
     printf(" %'--40s-|-%'-12s-|-%'-7s-|-%'-13s-|-%'-31s-|-%'-8s\n", "", "", "", "", "", "");
-    foreach($aBlocks as $sKey => $aDetails)
-    {
+    foreach ($aBlocks as $sKey => $aDetails) {
         printf(" %-40s | %12s | %7s | %13s | %31s | %8s\n", $sKey, $aDetails['totalBlocks'], 
             (int)$aDetails['currentBucketSize'], $aDetails['currentlyBlocked']?'Y':'N', 
             date("r", $aDetails['lastBlockTimestamp']), $aDetails['isSleeping']?'Y':'N');
@@ -41,13 +38,11 @@ if ($aResult['list'])
     echo "\n";
 }
 
-if ($aResult['delete'])
-{
+if ($aResult['delete']) {
     $m->set('sleepCounter', 0);
     clearBucketBlocks();
 }
 
-if ($aResult['flush'])
-{
+if ($aResult['flush']) {
     $m->flush();
 }