Add space between if and ‘(‘
[MAILPOET-1791]
This commit is contained in:
@@ -4,9 +4,9 @@ namespace MailPoet\Util;
|
||||
|
||||
use MailPoet\Config\Env;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
if(!class_exists('ProgressBar', false)) {
|
||||
if (!class_exists('ProgressBar', false)) {
|
||||
|
||||
/**
|
||||
* The Progress Bar class
|
||||
@@ -28,17 +28,17 @@ if(!class_exists('ProgressBar', false)) {
|
||||
$this->filename = Env::$temp_path . '/' . $filename;
|
||||
$this->url = Env::$temp_url . '/' . $filename;
|
||||
$counters = $this->readProgress();
|
||||
if(isset($counters->total)) {
|
||||
if (isset($counters->total)) {
|
||||
$this->total_count = $counters->total;
|
||||
}
|
||||
if(isset($counters->current)) {
|
||||
if (isset($counters->current)) {
|
||||
$this->current_count = $counters->current;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the progress file URL
|
||||
*
|
||||
*
|
||||
* @return string Progress file URL
|
||||
*/
|
||||
public function getUrl() {
|
||||
@@ -47,11 +47,11 @@ if(!class_exists('ProgressBar', false)) {
|
||||
|
||||
/**
|
||||
* Read the progress counters
|
||||
*
|
||||
*
|
||||
* @return array|false Array of counters
|
||||
*/
|
||||
private function readProgress() {
|
||||
if(file_exists($this->filename)) {
|
||||
if (file_exists($this->filename)) {
|
||||
$json_content = file_get_contents($this->filename);
|
||||
return json_decode($json_content);
|
||||
} else {
|
||||
@@ -61,11 +61,11 @@ if(!class_exists('ProgressBar', false)) {
|
||||
|
||||
/**
|
||||
* Set the total count
|
||||
*
|
||||
*
|
||||
* @param int $count Count
|
||||
*/
|
||||
public function setTotalCount($count) {
|
||||
if(($count != $this->total_count) || ($count == 0)) {
|
||||
if (($count != $this->total_count) || ($count == 0)) {
|
||||
$this->total_count = $count;
|
||||
$this->current_count = 0;
|
||||
$this->saveProgress();
|
||||
@@ -74,7 +74,7 @@ if(!class_exists('ProgressBar', false)) {
|
||||
|
||||
/**
|
||||
* Increment the current count
|
||||
*
|
||||
*
|
||||
* @param int $count Count
|
||||
*/
|
||||
public function incrementCurrentCount($count) {
|
||||
@@ -84,7 +84,7 @@ if(!class_exists('ProgressBar', false)) {
|
||||
|
||||
/**
|
||||
* Save the progress counters
|
||||
*
|
||||
*
|
||||
*/
|
||||
private function saveProgress() {
|
||||
file_put_contents($this->filename, json_encode(array(
|
||||
@@ -95,7 +95,7 @@ if(!class_exists('ProgressBar', false)) {
|
||||
|
||||
/**
|
||||
* Delete the progress file
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function deleteProgressFile() {
|
||||
unlink($this->filename);
|
||||
|
Reference in New Issue
Block a user