| Code Coverage | ||||||||||
| Classes and Traits | Functions and Methods | Lines | ||||||||
| Total |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | CRAP |  | 0.00% | 0 / 9 | 
| TaskHelper |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 12 |  | 0.00% | 0 / 9 | 
| isOverdue |  | 0.00% | 0 / 1 | 12 |  | 0.00% | 0 / 9 | |||
| <?php | |
| /* | |
| * To change this license header, choose License Headers in Project Properties. | |
| * To change this template file, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| namespace humhub\modules\tasks\components; | |
| use DateTime; | |
| use humhub\modules\tasks\models\Task; | |
| /** | |
| * Description of TaskHelper | |
| * | |
| * @author Luke | |
| */ | |
| class TaskHelper | |
| { | |
| public static function isOverdue(Task $task) | |
| { | |
| if (!$task->hasDeadline()) { | |
| return false; | |
| } | |
| if (new DateTime($task->deadline) > new DateTime()) { | |
| return false; | |
| } | |
| return true; | |
| } | |
| } |