Completed
Push — master ( b5312b...652ee3 )
by Nazar
04:24
created
core/functions.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 	cs\Text,
21 21
 	cs\User;
22 22
 /**
23
- * Auto Loading of classes
24
- */
23
+	 * Auto Loading of classes
24
+	 */
25 25
 spl_autoload_register(function ($class) {
26 26
 	static $cache;
27 27
 	if (!isset($cache)) {
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 	return false;
58 58
 }, true, true);
59 59
 /**
60
- * Clean cache of classes autoload and customization
61
- */
60
+	 * Clean cache of classes autoload and customization
61
+	 */
62 62
 function clean_classes_cache () {
63 63
 	if (file_exists(CACHE.'/classes/autoload')) {
64 64
 		unlink(CACHE.'/classes/autoload');
@@ -114,38 +114,38 @@  discard block
 block discarded – undo
114 114
 	User::instance(true)->__finish();
115 115
 }
116 116
 /**
117
- * Enable of errors processing
118
- */
117
+	 * Enable of errors processing
118
+	 */
119 119
 function errors_on () {
120 120
 	error_reporting(defined('DEBUG') && DEBUG ? E_ALL : E_ERROR | E_WARNING | E_PARSE);
121 121
 }
122 122
 /**
123
- * Disabling of errors processing
124
- */
123
+	 * Disabling of errors processing
124
+	 */
125 125
 function errors_off () {
126 126
 	error_reporting(0);
127 127
 }
128 128
 /**
129
- * Enabling of page interface
130
- */
129
+	 * Enabling of page interface
130
+	 */
131 131
 function interface_on () {
132 132
 	Page::instance()->interface	= true;
133 133
 }
134 134
 /**
135
- * Disabling of page interface
136
- */
135
+	 * Disabling of page interface
136
+	 */
137 137
 function interface_off () {
138 138
 	Page::instance()->interface	= false;
139 139
 }
140 140
 /**
141
- * Easy getting of translations
142
- *
143
- * @param string $item
144
- * @param mixed  $arguments There can be any necessary number of arguments here
145
- * @param mixed  $_
146
- *
147
- * @return string
148
- */
141
+	 * Easy getting of translations
142
+	 *
143
+	 * @param string $item
144
+	 * @param mixed  $arguments There can be any necessary number of arguments here
145
+	 * @param mixed  $_
146
+	 *
147
+	 * @return string
148
+	 */
149 149
 function __ ($item, $arguments = null, $_ = null) {
150 150
 	$L = Language::instance();
151 151
 	if (func_num_args() > 1) {
@@ -155,12 +155,12 @@  discard block
 block discarded – undo
155 155
 	}
156 156
 }
157 157
 /**
158
- * Get file url by it's destination in file system
159
- *
160
- * @param string		$source
161
- *
162
- * @return false|string
163
- */
158
+	 * Get file url by it's destination in file system
159
+	 *
160
+	 * @param string		$source
161
+	 *
162
+	 * @return false|string
163
+	 */
164 164
 function url_by_source ($source) {
165 165
 	$Config	= Config::instance(true);
166 166
 	if (!$Config) {
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
 	return false;
174 174
 }
175 175
 /**
176
- * Get file destination in file system by it's url
177
- *
178
- * @param string		$url
179
- *
180
- * @return false|string
181
- */
176
+	 * Get file destination in file system by it's url
177
+	 *
178
+	 * @param string		$url
179
+	 *
180
+	 * @return false|string
181
+	 */
182 182
 function source_by_url ($url) {
183 183
 	$Config	= Config::instance(true);
184 184
 	if (!$Config) {
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
 	return false;
191 191
 }
192 192
 /**
193
- * Public cache cleaning
194
- *
195
- * @return bool
196
- */
193
+	 * Public cache cleaning
194
+	 *
195
+	 * @return bool
196
+	 */
197 197
 function clean_pcache () {
198 198
 	$ok = true;
199 199
 	$list = get_files_list(PUBLIC_CACHE, false, 'fd', true, true, 'name|desc');
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
 	return $ok;
209 209
 }
210 210
 /**
211
- * Formatting of time in seconds to human-readable form
212
- *
213
- * @param int		$time	Time in seconds
214
- *
215
- * @return string
216
- */
211
+	 * Formatting of time in seconds to human-readable form
212
+	 *
213
+	 * @param int		$time	Time in seconds
214
+	 *
215
+	 * @return string
216
+	 */
217 217
 function format_time ($time) {
218 218
 	if (!is_numeric($time)) {
219 219
 		return $time;
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
 	return implode(' ', $res);
252 252
 }
253 253
 /**
254
- * Formatting of data size in bytes to human-readable form
255
- *
256
- * @param int		$size
257
- * @param bool|int	$round
258
- *
259
- * @return float|string
260
- */
254
+	 * Formatting of data size in bytes to human-readable form
255
+	 *
256
+	 * @param int		$size
257
+	 * @param bool|int	$round
258
+	 *
259
+	 * @return float|string
260
+	 */
261 261
 function format_filesize ($size, $round = false) {
262 262
 	if (!is_numeric($size)) {
263 263
 		return $size;
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 	return $round ? round($size, $round).$unit : $size.$unit;
283 283
 }
284 284
 /**
285
- * Get list of timezones
286
- *
287
- * @return array
288
- */
285
+	 * Get list of timezones
286
+	 *
287
+	 * @return array
288
+	 */
289 289
 function get_timezones_list () {
290 290
 	if (
291 291
 		!class_exists('\\cs\\Cache', false) ||
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
 	return $timezones;
322 322
 }
323 323
 /**
324
- * Get multilingual value from $Config->core array
325
- *
326
- * @param string $item
327
- *
328
- * @return false|string
329
- */
324
+	 * Get multilingual value from $Config->core array
325
+	 *
326
+	 * @param string $item
327
+	 *
328
+	 * @return false|string
329
+	 */
330 330
 function get_core_ml_text ($item) {
331 331
 	$Config	= Config::instance(true);
332 332
 	if (!$Config) {
Please login to merge, or discard this patch.
install.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 }
13 13
 $cli = PHP_SAPI == 'cli';
14 14
 /**
15
- * Path to installer dir
16
- */
15
+	 * Path to installer dir
16
+	 */
17 17
 if ($cli) {
18 18
 	define('DIR', 'phar://cleverstyle_cms.phar');
19 19
 } else {
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 define('ROOT', getcwd());    //Path to site root
24 24
 $fs = json_decode(file_get_contents(DIR.'/fs.json'), true);
25 25
 /**
26
- * Special autoloader for installer
27
- */
26
+	 * Special autoloader for installer
27
+	 */
28 28
 spl_autoload_register(
29 29
 	function ($class) use ($fs) {
30 30
 		$prepared_class_name = ltrim($class, '\\');
Please login to merge, or discard this patch.