Reminder::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
ccs 0
cts 4
cp 0
crap 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