@@ -83,6 +83,6 @@ |
||
| 83 | 83 | public static function toFile($string, $file = null) |
| 84 | 84 | { |
| 85 | 85 | null === $file && $file = './Base64_toFile_' . date('YmdHis') . '.txt'; |
| 86 | - return (bool) file_put_contents($file, base64_decode($string)); |
|
| 86 | + return (bool)file_put_contents($file, base64_decode($string)); |
|
| 87 | 87 | } |
| 88 | 88 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public static function ul($array) |
| 141 | 141 | { |
| 142 | - return implode(PHP_EOL, array_map(function ($row) { |
|
| 142 | + return implode(PHP_EOL, array_map(function($row) { |
|
| 143 | 143 | return '- ' . self::__text($row); |
| 144 | 144 | }, $array)); |
| 145 | 145 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public static function ol($array) |
| 157 | 157 | { |
| 158 | - return implode(PHP_EOL, array_map(function ($row) { |
|
| 158 | + return implode(PHP_EOL, array_map(function($row) { |
|
| 159 | 159 | static $i = 1; |
| 160 | 160 | return ($i++) . '. ' . self::__text($row); |
| 161 | 161 | }, $array)); |
@@ -210,8 +210,8 @@ discard block |
||
| 210 | 210 | $title = array_shift($array); |
| 211 | 211 | $rows = $array; |
| 212 | 212 | } |
| 213 | - $lineFunc = function ($arr) { |
|
| 214 | - return '|' . implode('|', array_map(function ($line) { |
|
| 213 | + $lineFunc = function($arr) { |
|
| 214 | + return '|' . implode('|', array_map(function($line) { |
|
| 215 | 215 | return ' ' . self::__text($line) . ' '; |
| 216 | 216 | }, $arr)) . '|'; |
| 217 | 217 | }; |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | public static function create() |
| 118 | 118 | { |
| 119 | - if (!static::$_instance instanceof static ) { |
|
| 119 | + if (!static::$_instance instanceof static) { |
|
| 120 | 120 | static::$_instance = new static(); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function __construct($image) |
| 28 | 28 | { |
| 29 | 29 | $attributes = $this->__parseImage($image); |
| 30 | - array_map(function ($value, $key) { |
|
| 30 | + array_map(function($value, $key) { |
|
| 31 | 31 | $this->_attributes[$key] = $value; |
| 32 | 32 | }, array_values($attributes), array_keys($attributes)); |
| 33 | 33 | $this->_imageIn = $this->_attributes['object']; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $zoomWidth *= $this->_attributes['width']; |
| 151 | 151 | $zoomHeight *= $this->_attributes['height']; |
| 152 | 152 | } else { |
| 153 | - $zoom = (int) $zoom; |
|
| 153 | + $zoom = (int)$zoom; |
|
| 154 | 154 | $zoomWidth = $zoom * $this->_attributes['width']; |
| 155 | 155 | $zoomHeight = $zoom * $this->_attributes['height']; |
| 156 | 156 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | public static function create($config = []) |
| 52 | 52 | { |
| 53 | - if (!static::$_instance instanceof static ) { |
|
| 53 | + if (!static::$_instance instanceof static) { |
|
| 54 | 54 | static::$_instance = new static(); |
| 55 | 55 | static::$_instance->__formName = I::get($config, 'formName', 'file'); |
| 56 | 56 | static::$_instance->__sizeLimit = static::$_instance->__getSizeLimit(I::get($config, 'sizeLimit', 0)); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function getCurrentClassMethods($callback = null) |
| 59 | 59 | { |
| 60 | - $callback = null === $callback ? function () { |
|
| 60 | + $callback = null === $callback ? function() { |
|
| 61 | 61 | return true; |
| 62 | 62 | } : $callback; |
| 63 | 63 | $currentClass = $this->__reflector->getName(); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | public static function stripTags($html, $allowTags = []) |
| 58 | 58 | { |
| 59 | 59 | $allowTags = array_map('strtolower', $allowTags); |
| 60 | - return preg_replace_callback('/<\/?([^>\s]+)[^>]*>/i', function ($matches) use (&$allowTags) { |
|
| 60 | + return preg_replace_callback('/<\/?([^>\s]+)[^>]*>/i', function($matches) use (&$allowTags) { |
|
| 61 | 61 | return in_array(strtolower($matches[1]), $allowTags) ? $matches[0] : ''; |
| 62 | 62 | }, $html); |
| 63 | 63 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | { |
| 51 | 51 | $delta = 0.0; |
| 52 | 52 | if (isset(static::$_timers[$name])) { |
| 53 | - $delta = microtime(true)-static::$_timers[$name]; |
|
| 53 | + $delta = microtime(true) - static::$_timers[$name]; |
|
| 54 | 54 | unset(static::$_timers[$name]); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | @ftp_chmod($this->_conn, $mode, $subFile); |
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | - return (boolean) @ftp_chmod($this->_conn, $mode, $file); |
|
| 204 | + return (boolean)@ftp_chmod($this->_conn, $mode, $file); |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |