Add space between if and ‘(‘

[MAILPOET-1791]
This commit is contained in:
Ján Mikláš
2019-02-13 13:08:49 +01:00
committed by M. Shull
parent a935b091d3
commit 3ee58aea10
333 changed files with 4001 additions and 4001 deletions

View File

@ -4,7 +4,7 @@ namespace MailPoet\Config;
use MailPoet\Util\Helpers;
use MailPoet\WP\Notice as WPNotice;
if(!defined('ABSPATH')) exit;
if (!defined('ABSPATH')) exit;
class RequirementsChecker {
const TEST_FOLDER_PERMISSIONS = 'TempAndCacheFolderCreation';
@ -60,7 +60,7 @@ class RequirementsChecker {
'temp_path' => Env::$temp_path,
'cache_path' => Env::$cache_path
);
if(!is_dir($paths['cache_path']) && !wp_mkdir_p($paths['cache_path'])) {
if (!is_dir($paths['cache_path']) && !wp_mkdir_p($paths['cache_path'])) {
$error = Helpers::replaceLinkTags(
__('MailPoet requires write permissions inside the /wp-content/uploads folder. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
'//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#folder_permissions',
@ -70,7 +70,7 @@ class RequirementsChecker {
}
foreach ($paths as $path) {
$index_file = $path . '/index.php';
if(!file_exists($index_file)) {
if (!file_exists($index_file)) {
file_put_contents(
$path . '/index.php',
str_replace('\n', PHP_EOL, '<?php\n\n// Silence is golden')
@ -81,7 +81,7 @@ class RequirementsChecker {
}
function checkPDOExtension() {
if(extension_loaded('pdo') && extension_loaded('pdo_mysql')) return true;
if (extension_loaded('pdo') && extension_loaded('pdo_mysql')) return true;
$error = Helpers::replaceLinkTags(
__('MailPoet requires a PDO_MYSQL PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
'//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension',
@ -91,14 +91,14 @@ class RequirementsChecker {
}
function checkMbstringExtension() {
if(!extension_loaded('mbstring')) {
if (!extension_loaded('mbstring')) {
require_once Env::$util_path .'/Polyfills.php';
}
return true;
}
function checkXmlExtension() {
if(extension_loaded('xml')) return true;
if (extension_loaded('xml')) return true;
$error = Helpers::replaceLinkTags(
__('MailPoet requires an XML PHP extension. Please read our [link]instructions[/link] on how to resolve this issue.', 'mailpoet'),
'//beta.docs.mailpoet.com/article/152-minimum-requirements-for-mailpoet-3#php_extension',
@ -110,7 +110,7 @@ class RequirementsChecker {
function checkVendorSource() {
foreach ($this->vendor_classes as $dependency) {
$dependency_path = $this->getDependencyPath($dependency);
if(!$dependency_path) {
if (!$dependency_path) {
$error = sprintf(
__('A MailPoet dependency (%s) does not appear to be loaded correctly, thus MailPoet will not work correctly. Please reinstall the plugin.', 'mailpoet'),
$dependency
@ -121,7 +121,7 @@ class RequirementsChecker {
$pattern = '#' . preg_quote(Env::$path) . '[\\\/]#';
$is_loaded_by_plugin = preg_match($pattern, $dependency_path);
if(!$is_loaded_by_plugin) {
if (!$is_loaded_by_plugin) {
$error = sprintf(
__('MailPoet has detected a dependency conflict (%s) with another plugin (%s), which may cause unexpected behavior. Please disable the offending plugin to fix this issue.', 'mailpoet'),
$dependency,
@ -131,11 +131,11 @@ class RequirementsChecker {
$return_error = true;
// if a Twig dependency is loaded by another plugin, check for valid version
if(strpos($dependency, '\Twig_') === 0) {
if (strpos($dependency, '\Twig_') === 0) {
$return_error = ($this->isValidTwigVersion()) ? false : $return_error;
}
if($return_error) return $this->processError($error);
if ($return_error) return $this->processError($error);
}
}
@ -162,7 +162,7 @@ class RequirementsChecker {
}
function processError($error) {
if($this->display_error_notice) {
if ($this->display_error_notice) {
WPNotice::displayError($error);
}
return false;