MaillistFetchIMAP::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
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 6
rs 10
c 0
b 0
f 0
ccs 0
cts 4
cp 0
crap 2
1
<?php
2
3
/**
4
 * Fetch emails from an imap box and process them
5
 *
6
 * @package   ElkArte Forum
7
 * @copyright ElkArte Forum contributors
8
 * @license   BSD http://opensource.org/licenses/BSD-3-Clause (see accompanying LICENSE.txt file)
9
 *
10
 * @version 2.0 dev
11
 *
12
 */
13
14
namespace ElkArte\ScheduledTasks\Tasks;
15
16
/**
17
 * Class Maillist_Fetch_IMAP - Fetch emails from an imap box and process them
18
 *
19
 * - If we can't run this via cron, run it as a task instead
20
 *
21
 * @package ScheduledTasks
22
 */
23
class MaillistFetchIMAP implements ScheduledTaskInterface
24
{
25
	/**
26
	 * Run the pseudo cron for IMAP email collection
27
	 *
28
	 * @return bool
29
	 */
30
	public function run()
31
	{
32
		// Only should be run if the user can't set up a proper cron job and can not pipe emails
33
		require_once(BOARDDIR . '/email_imap_cron.php');
34
35
		return true;
36
	}
37
}
38