Completed
Push — master ( 78e2d5...d1a1bd )
by Nazar
04:12
created
core/functions_global.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 /**
9
- * Base system functions, do not edit this file, or make it very carefully
10
- * otherwise system workability may be broken
11
- *
12
- * This particular file contains functions that work with global state (cookies, headers, status codes, etc.)
13
- */
9
+	 * Base system functions, do not edit this file, or make it very carefully
10
+	 * otherwise system workability may be broken
11
+	 *
12
+	 * This particular file contains functions that work with global state (cookies, headers, status codes, etc.)
13
+	 */
14 14
 use
15 15
 	cs\Config,
16 16
 	cs\Route;
17 17
 /**
18
- * Function for setting cookies on all mirrors and taking into account cookies prefix. Parameters like in system function, but $path, $domain and $secure
19
- * are skipped, they are detected automatically, and $api parameter added in the end.
20
- *
21
- * @param string $name
22
- * @param string $value
23
- * @param int    $expire
24
- * @param bool   $httponly
25
- *
26
- * @return bool
27
- */
18
+	 * Function for setting cookies on all mirrors and taking into account cookies prefix. Parameters like in system function, but $path, $domain and $secure
19
+	 * are skipped, they are detected automatically, and $api parameter added in the end.
20
+	 *
21
+	 * @param string $name
22
+	 * @param string $value
23
+	 * @param int    $expire
24
+	 * @param bool   $httponly
25
+	 *
26
+	 * @return bool
27
+	 */
28 28
 function _setcookie ($name, $value, $expire = 0, $httponly = false) {
29 29
 	static $domain, $prefix, $secure;
30 30
 	if (!isset($prefix)) {
Please login to merge, or discard this patch.
core/loader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @license   MIT License, see license.txt
7 7
  */
8 8
 namespace cs;
9
-require __DIR__.'/loader_base.php';      //Inclusion of loader base
9
+require __DIR__.'/loader_base.php'; //Inclusion of loader base
10 10
 require __DIR__.'/functions_global.php'; //Inclusion of functions that work with global state
11 11
 /**
12 12
  * Wrapper around default `$_SERVER` superglobal
Please login to merge, or discard this patch.
core/loader_base.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
  * @copyright Copyright (c) 2011-2015, Nazar Mokrynskyi
6 6
  * @license   MIT License, see license.txt
7 7
  */
8
-require DIR.'/core/thirdparty/upf.php';           //Inclusion of Useful PHP Functions
8
+require DIR.'/core/thirdparty/upf.php'; //Inclusion of Useful PHP Functions
9 9
 _require_once(DIR.'/vendor/autoload.php', false); //Inclusion of composer's autoloader.php with user's dependencies
10
-require DIR.'/core/functions.php';                //Inclusion of general system functions and system autoloader
10
+require DIR.'/core/functions.php'; //Inclusion of general system functions and system autoloader
11 11
 
12 12
 error_reporting(E_ALL);
13 13
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2011-2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2011-2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\User;
9 9
 use
10 10
 	cs\Cache,
Please login to merge, or discard this patch.
core/traits/CRUD.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 				)",
59 59
 			$prepared_arguments
60 60
 		);
61
-		$id      = $insert_id !== false ? $insert_id : $this->db_prime()->id();
61
+		$id = $insert_id !== false ? $insert_id : $this->db_prime()->id();
62 62
 		/**
63 63
 		 * Id might be 0 if insertion failed or if we insert duplicate entry (which is fine since we use 'INSERT IGNORE'
64 64
 		 */
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 			}
156 156
 			return $id;
157 157
 		}
158
-		$columns      = array_filter(
158
+		$columns = array_filter(
159 159
 			$data_model,
160 160
 			function ($column) {
161 161
 				return !is_array($column) || !isset($column['data_model']);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 				$id
224 224
 			]
225 225
 		) ?: [];
226
-		$language_field           = isset($model['language_field']) ? $model['language_field'] : null;
226
+		$language_field = isset($model['language_field']) ? $model['language_field'] : null;
227 227
 		/**
228 228
 		 * If no rows found for current language - find another language that should contain some rows
229 229
 		 */
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 			$data_before = $this->read_internal($table, $data_model, $id);
295 295
 		}
296 296
 		list($prepared_arguments, $joined_tables) = self::crud_arguments_preparation(array_slice($data_model, 1), $prepared_arguments, $id);
297
-		$columns              = implode(
297
+		$columns = implode(
298 298
 			',',
299 299
 			array_map(
300 300
 				function ($column) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		$first_column = array_keys($data_model)[0];
166 166
 		$data         = $this->db()->qf(
167 167
 			[
168
-				"SELECT $columns
168
+				"select $columns
169 169
 				FROM `$table`
170 170
 				WHERE `$first_column` = '%s'
171 171
 				LIMIT 1",
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		$fields                   = '`'.implode('`,`', array_keys($model['data_model'])).'`';
216 216
 		$rows                     = $this->db_prime()->qfa(
217 217
 			[
218
-				"SELECT $fields
218
+				"select $fields
219 219
 				FROM `{$this->table}_$table`
220 220
 				WHERE
221 221
 						`$id_field`	= '%s'
Please login to merge, or discard this patch.
core/traits/CRUD/Data_model_processing.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\CRUD;
9 9
 use
10 10
 	cs\Event,
Please login to merge, or discard this patch.
core/traits/CRUD_helpers.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs;
9 9
 /**
10
- * CRUD trait extended with useful additional methods, for example, for searching
11
- *
12
- * Might me used instead of regular CRUD trait
13
- */
10
+	 * CRUD trait extended with useful additional methods, for example, for searching
11
+	 *
12
+	 * Might me used instead of regular CRUD trait
13
+	 */
14 14
 trait CRUD_helpers {
15 15
 	use
16 16
 		CRUD;
Please login to merge, or discard this patch.
core/traits/DB/Accessor.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2013-2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\DB;
9 9
 use
10 10
 	cs\DB;
11 11
 /**
12
- * Accessor trait
13
- *
14
- * Provides db() and db_prime() methods for simplified for with DB
15
- */
12
+	 * Accessor trait
13
+	 *
14
+	 * Provides db() and db_prime() methods for simplified for with DB
15
+	 */
16 16
 trait Accessor {
17 17
 	/**
18 18
 	 * Link to db object
Please login to merge, or discard this patch.
core/traits/Index/Router.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\Index;
9 9
 use cs\ExitException;
10 10
 /**
11
- * @property bool     $module          Name of current module
12
- * @property bool     $in_api          Whether current page is api
13
- * @property bool     $in_admin        Whether current page is administration and user is admin
14
- * @property string   $request_method
15
- * @property string   $working_directory
16
- * @property string[] $path            Reference to Route::instance()->path
17
- * @property string[] $ids             Reference to Route::instance()->ids
18
- * @property string[] $controller_path Path that will be used by controller to render page
19
- */
11
+	 * @property bool     $module          Name of current module
12
+	 * @property bool     $in_api          Whether current page is api
13
+	 * @property bool     $in_admin        Whether current page is administration and user is admin
14
+	 * @property string   $request_method
15
+	 * @property string   $working_directory
16
+	 * @property string[] $path            Reference to Route::instance()->path
17
+	 * @property string[] $ids             Reference to Route::instance()->ids
18
+	 * @property string[] $controller_path Path that will be used by controller to render page
19
+	 */
20 20
 trait Router {
21 21
 	/**
22 22
 	 * Execute router
Please login to merge, or discard this patch.
core/traits/Page/Includes.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package   CleverStyle CMS
4
- * @author    Nazar Mokrynskyi <[email protected]>
5
- * @copyright Copyright (c) 2014-2015, Nazar Mokrynskyi
6
- * @license   MIT License, see license.txt
7
- */
3
+	 * @package   CleverStyle CMS
4
+	 * @author    Nazar Mokrynskyi <[email protected]>
5
+	 * @copyright Copyright (c) 2014-2015, Nazar Mokrynskyi
6
+	 * @license   MIT License, see license.txt
7
+	 */
8 8
 namespace cs\Page;
9 9
 use
10 10
 	cs\Core,
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -370,7 +370,7 @@
 block discarded – undo
370 370
 	 * @return array
371 371
 	 */
372 372
 	protected function get_includes_prepare ($dependencies, $separator) {
373
-		$includes              = [
373
+		$includes = [
374 374
 			'css'  => [],
375 375
 			'js'   => [],
376 376
 			'html' => []
Please login to merge, or discard this patch.