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

@@ -6,13 +6,13 @@ class Helpers {
const LINK_TAG = 'link';
static function isJson($string) {
if(!is_string($string)) return false;
if (!is_string($string)) return false;
json_decode($string);
return json_last_error() == JSON_ERROR_NONE;
}
static function replaceLinkTags($source, $link = false, $attributes = array(), $link_tag = false) {
if(!$link) return $source;
if (!$link) return $source;
$link_tag = ($link_tag) ? $link_tag : self::LINK_TAG;
$attributes = array_map(function($key) use ($attributes) {
return sprintf('%s="%s"', $key, $attributes[$key]);
@@ -32,7 +32,7 @@ class Helpers {
static function getMaxPostSize($bytes = false) {
$maxPostSize = ini_get('post_max_size');
if(!$bytes) return $maxPostSize;
if (!$bytes) return $maxPostSize;
switch (substr($maxPostSize, -1)) {
case 'M':
case 'm':
@@ -49,7 +49,7 @@ class Helpers {
}
static function flattenArray($array) {
if(!$array) return;
if (!$array) return;
$flattened_array = array();
array_walk_recursive($array, function ($a) use (&$flattened_array) {
$flattened_array[] = $a;
@@ -58,7 +58,7 @@ class Helpers {
}
static function underscoreToCamelCase($str, $capitalise_first_char = false) {
if($capitalise_first_char) {
if ($capitalise_first_char) {
$str[0] = strtoupper($str[0]);
}
return preg_replace_callback('/_([a-z])/', function ($c) {
@@ -88,9 +88,9 @@ class Helpers {
}
static function recursiveTrim($value) {
if(is_array($value))
if (is_array($value))
return array_map([__CLASS__, 'recursiveTrim'], $value);
if(is_string($value))
if (is_string($value))
return trim($value);
return $value;
}