- Fixes code style

This commit is contained in:
Vlad
2016-07-21 10:52:23 -04:00
parent 067b3ff3e6
commit 41ad86ba1f
2 changed files with 30 additions and 39 deletions

View File

@ -25,13 +25,10 @@ class TaskScheduler {
switch($this->method) {
case self::METHOD_MAILPOET:
return $this->configureMailpoetScheduler();
break;
case self::METHOD_WORDPRESS:
return $this->configureWordpressScheduler();
break;
default:
throw new \Exception(__("Task scheduler is not configured"));
break;
};
} catch(\Exception $e) {
// ignore exceptions as they should not prevent the rest of the site from loading
@ -41,7 +38,6 @@ class TaskScheduler {
function configureMailpoetScheduler() {
$supervisor = new Supervisor();
$supervisor->checkDaemon();
return;
}
function configureWordpressScheduler() {
@ -60,7 +56,6 @@ class TaskScheduler {
if($cron_daemon) {
CronHelper::deleteDaemon();
}
return;
}
static function getAvailableMethods() {

View File

@ -66,7 +66,7 @@ class MailChimp {
$connection = @fopen($url, 'r');
if(!$connection) {
return $this->processError('connection');
} else {
}
$i = 0;
$header = array();
while(!feof($connection)) {
@ -90,20 +90,16 @@ class MailChimp {
}
$i++;
}
$bytes_fetched += strlen($buffer);
if($bytes_fetched > $this->max_post_size) {
return $this->processError('size');
}
}
fclose($connection);
}
}
if(!count($subscribers)) {
return $this->processError('subscribers');
}
return array(