Reminder   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 34
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A index() 0 5 1
A check_reminder() 0 8 2
1
<?php
2
3
/**
4
 * Reminder Controller for running via Cron
5
 */
6
class Reminder extends MY_Controller {
7
8
	/**
9
	 * Constructor
10
	 */
11
	public function __construct()
12
	{
13
		parent::__construct();
14
		$this->load->library('email');
15
		$this->load->model('mail_model');
16
17
	}
18
19
	/**
20
	 * Redirect for snoops
21
	 */
22
	public function index()
23
	{
24
		//303 Redirect
25
		$this->todo->redirect_303('task/list');
26
	}
27
28
	/**
29
	 * Check the database for reminder status
30
	 */
31
	public function check_reminder()
32
	{
33
		if(!defined('CRON'))
34
			$this->todo->redirect_303('task/list');
35
			
36
		//Do all the fun stuff
37
		$this->output->set_output($this->mail_model->check_db());
38
	}
39
}
40
// End of controllers/reminder.php