Last active
September 6, 2018 16:28
-
-
Save iRynoh/8a5df9e4e05538a5d65b89726b8eab67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function verify() { | |
$statistic = $this->getStatistic(); | |
if ($statistic) { | |
if ($statistic->getTotalCount() === 0) { | |
$incident = IncidentFactory::CtIncident(); | |
$incident->registerIncident(); | |
} else { | |
$failurePercentage = $statistic->getFailCount() / $statistic->getTotalCount() * 100; | |
if ($failurePercentage > 40) { | |
$incident = IncidentFactory::CtIncident(); | |
$incident->registerIncident(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome! Thank you so much!