Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Diagnostics/Diagnostic/DiagnosticResult.php')
-rw-r--r--plugins/Diagnostics/Diagnostic/DiagnosticResult.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/Diagnostics/Diagnostic/DiagnosticResult.php b/plugins/Diagnostics/Diagnostic/DiagnosticResult.php
index 6e60db812d..f95407d40a 100644
--- a/plugins/Diagnostics/Diagnostic/DiagnosticResult.php
+++ b/plugins/Diagnostics/Diagnostic/DiagnosticResult.php
@@ -18,6 +18,7 @@ class DiagnosticResult
const STATUS_ERROR = 'error';
const STATUS_WARNING = 'warning';
const STATUS_OK = 'ok';
+ const STATUS_INFORMATIONAL = 'informational';
/**
* @var string
@@ -53,6 +54,24 @@ class DiagnosticResult
}
/**
+ * @param string $label
+ * @param string $status
+ * @param string $comment
+ * @return DiagnosticResult
+ */
+ public static function informationalResult($label, $comment = '')
+ {
+ if ($comment === true) {
+ $comment = '1';
+ } elseif ($comment === false) {
+ $comment = '0';
+ }
+ $result = new self($label);
+ $result->addItem(new DiagnosticResultItem(self::STATUS_INFORMATIONAL, $comment));
+ return $result;
+ }
+
+ /**
* @return string
*/
public function getLabel()