diff --git a/application/views/helpers/RenderStateBadges.php b/application/views/helpers/RenderStateBadges.php
index 14db762..7a4d708 100644
--- a/application/views/helpers/RenderStateBadges.php
+++ b/application/views/helpers/RenderStateBadges.php
@@ -1,15 +1,23 @@
$cnt) {
- if ($cnt === 0) continue;
- if ($state === 'OK') continue;
- if ($state === 'UP') continue;
+ if ($cnt === 0
+ || $state === 'OK'
+ ||$ state === 'UP'
+ ) {
+ continue;
+ }
+
$html .= ''
. $cnt . '';
diff --git a/library/Businessprocess/Storage/LegacyStorage.php b/library/Businessprocess/Storage/LegacyStorage.php
index 5e1e533..7309948 100644
--- a/library/Businessprocess/Storage/LegacyStorage.php
+++ b/library/Businessprocess/Storage/LegacyStorage.php
@@ -67,7 +67,10 @@ class LegacyStorage extends Storage
$files = array();
foreach (new DirectoryIterator($this->getConfigDir()) as $file) {
- if($file->isDot()) continue;
+ if ($file->isDot()) {
+ continue;
+ }
+
$filename = $file->getFilename();
if (substr($filename, -5) === '.conf') {
$name = substr($filename, 0, -5);
@@ -94,8 +97,7 @@ class LegacyStorage extends Storage
return true;
}
- if (
- $header['Allowed users'] === null
+ if ($header['Allowed users'] === null
&& $header['Allowed groups'] === null
&& $header['Allowed roles'] === null
) {
@@ -336,18 +338,21 @@ class LegacyStorage extends Storage
$op_name = $op;
if ($op === '+') {
- if (! preg_match('~^(\d+)\s*of:\s*(.+?)$~', $value, $m)) {
+ if (! preg_match('~^(\d+)(?::(\d+))?\s*of:\s*(.+?)$~', $value, $m)) {
$this->parseError('syntax: = of: + [+ ]*');
}
$op_name = $m[1];
- $value = $m[2];
+ // New feature: $minWarn = $m[2];
+ $value = $m[3];
}
$cmps = preg_split('~\s*\\' . $op . '\s*~', $value, -1, PREG_SPLIT_NO_EMPTY);
$childNames = array();
foreach ($cmps as $val) {
if (strpos($val, ';') !== false) {
- if ($bp->hasNode($val)) continue;
+ if ($bp->hasNode($val)) {
+ continue;
+ }
list($host, $service) = preg_split('~;~', $val, 2);
if ($service === 'Hoststatus') {
diff --git a/library/Businessprocess/Web/Component/ActionBar.php b/library/Businessprocess/Web/Component/ActionBar.php
index 0a71df0..887e06f 100644
--- a/library/Businessprocess/Web/Component/ActionBar.php
+++ b/library/Businessprocess/Web/Component/ActionBar.php
@@ -7,4 +7,4 @@ class ActionBar extends Container
protected $separator = ' ';
protected $attributes = array('class' => 'action-bar');
-}
\ No newline at end of file
+}
diff --git a/library/Businessprocess/Web/Component/Attributes.php b/library/Businessprocess/Web/Component/Attributes.php
index 1c073b7..c0c8039 100644
--- a/library/Businessprocess/Web/Component/Attributes.php
+++ b/library/Businessprocess/Web/Component/Attributes.php
@@ -110,7 +110,7 @@ class Attributes extends Component
}
return $this;
- } else if ($attribute instanceof Attribute) {
+ } elseif ($attribute instanceof Attribute) {
return $this->setAttribute($attribute);
} else {
return $this->setAttribute(new Attribute($attribute, $value));
@@ -155,4 +155,4 @@ class Attributes extends Component
return ' ' . implode(' ', $this->attributes);
}
-}
\ No newline at end of file
+}
diff --git a/library/Businessprocess/Web/Component/Component.php b/library/Businessprocess/Web/Component/Component.php
index fb7d873..3830e06 100644
--- a/library/Businessprocess/Web/Component/Component.php
+++ b/library/Businessprocess/Web/Component/Component.php
@@ -56,7 +56,7 @@ abstract class Component
/**
* @return string
*/
- abstract function render();
+ abstract public function render();
public function wantHtml($any, $separator = '')
{
@@ -131,4 +131,4 @@ abstract class Component
return $this->renderError($e);
}
}
-}
\ No newline at end of file
+}
diff --git a/library/Businessprocess/Web/Component/Container.php b/library/Businessprocess/Web/Component/Container.php
index b4d90d4..69cce5a 100644
--- a/library/Businessprocess/Web/Component/Container.php
+++ b/library/Businessprocess/Web/Component/Container.php
@@ -141,4 +141,4 @@ class Container extends Component
$this->tag
);
}
-}
\ No newline at end of file
+}
diff --git a/library/Businessprocess/Web/Component/Link.php b/library/Businessprocess/Web/Component/Link.php
index fa9e2fc..525694c 100644
--- a/library/Businessprocess/Web/Component/Link.php
+++ b/library/Businessprocess/Web/Component/Link.php
@@ -73,4 +73,4 @@ class Link extends Component
$this->getRenderedText()
);
}
-}
\ No newline at end of file
+}