Remove unused parameters & variabeles, fix calls with wrong number of args

This commit is contained in:
Jan Jakeš
2018-11-15 08:09:48 +01:00
committed by Pavel Dohnal
parent aac7744dee
commit 60a5fe2732
5 changed files with 5 additions and 5 deletions

View File

@ -325,7 +325,7 @@ class Menu {
}
function migration() {
$mp2_migrator = new MP2Migrator($this->access_control);
$mp2_migrator = new MP2Migrator();
$mp2_migrator->init();
$data = array(
'log_file_url' => $mp2_migrator->log_file_url,

View File

@ -318,7 +318,7 @@ class Populator {
private function rowExists($table, $columns) {
global $wpdb;
$conditions = array_map(function($key) use ($columns) {
$conditions = array_map(function($key) {
return $key . '=%s';
}, array_keys($columns));

View File

@ -11,7 +11,7 @@ class Renderer {
public $posts;
public $ALC;
function __construct(array $newsletter, $preview) {
function __construct(array $newsletter) {
$this->newsletter = $newsletter;
$this->posts = array();
$newer_than_timestamp = false;

View File

@ -21,7 +21,7 @@ class Renderer {
function __construct($newsletter, $preview = false) {
$this->newsletter = (is_object($newsletter)) ? $newsletter->asArray() : $newsletter;
$this->preview = $preview;
$this->blocks_renderer = new Blocks\Renderer($this->newsletter, $this->preview);
$this->blocks_renderer = new Blocks\Renderer($this->newsletter);
$this->columns_renderer = new Columns\Renderer();
$this->DOM_parser = new pQuery();
$this->CSS_inliner = new \MailPoet\Util\CSS();

View File

@ -10,7 +10,7 @@ class MailChimp {
public $export_url;
const API_KEY_REGEX = '/[a-zA-Z0-9]{32}-[a-zA-Z0-9]{2,4}$/';
function __construct($api_key, $lists = false) {
function __construct($api_key) {
$this->api_key = $this->getAPIKey($api_key);
$this->max_post_size = Helpers::getMaxPostSize('bytes');
$this->data_center = $this->getDataCenter($this->api_key);