Skip to content

Commit

Permalink
Make the check methods extendable
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvandemaele authored Jan 29, 2020
1 parent f55d76e commit 1ce4671
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/Skeleton/Transaction/Web/Module/Monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function display() {
/**
* Check database connection
*
* @access private
* @access protected
*/
private function check_database($check) {
protected function check_database($check) {
if (!$check['result']) {
return 500;
}
Expand All @@ -55,9 +55,9 @@ private function check_database($check) {
/**
* Check database connection
*
* @access private
* @access protected
*/
private function check_recurring($check) {
protected function check_recurring($check) {
if ($check['result'] > 0) {
return 400;
}
Expand All @@ -66,9 +66,9 @@ private function check_recurring($check) {
/**
* Check database connection
*
* @access private
* @access protected
*/
private function check_last_update($check) {
protected function check_last_update($check) {
$last_update = strtotime($check['result']);
if ($last_update === false) {
return 500;
Expand All @@ -82,9 +82,9 @@ private function check_last_update($check) {
/**
* Check runnable
*
* @access private
* @access protected
*/
private function check_runnable($check) {
protected function check_runnable($check) {
if ($check['result'] > 500) {
return 400;
}
Expand All @@ -93,9 +93,9 @@ private function check_runnable($check) {
/**
* Check last successful
*
* @access private
* @access protected
*/
private function check_last_successful($check) {
protected function check_last_successful($check) {
$last_successful = strtotime($check['result']);
if ($last_successful === false) {
return 400;
Expand Down

0 comments on commit 1ce4671

Please sign in to comment.