Completed
Push — master ( 20656b...04c2f3 )
by Nazar
04:13
created
core/traits/CRUD.php 3 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.
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/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.
core/traits/Permission/Any.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 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\Permission;
9 9
 use
10 10
 	cs\Cache;
11 11
 /**
12
- * Class Any with common methods for User and Group classes
13
- *
14
- * @property Cache $cache
15
- *
16
- * @method \cs\DB\_Abstract db()
17
- * @method \cs\DB\_Abstract db_prime()
18
- */
12
+	 * Class Any with common methods for User and Group classes
13
+	 *
14
+	 * @property Cache $cache
15
+	 *
16
+	 * @method \cs\DB\_Abstract db()
17
+	 * @method \cs\DB\_Abstract db_prime()
18
+	 */
19 19
 trait Any {
20 20
 	/**
21 21
 	 * @param int    $id
Please login to merge, or discard this patch.
core/traits/Singleton.php 1 patch
Indentation   +7 added lines, -7 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) 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;
9 9
 use
10 10
 	cs\Singleton\Base;
11 11
 /**
12
- * @inheritdoc
13
- */
12
+	 * @inheritdoc
13
+	 */
14 14
 trait Singleton {
15 15
 	use Base;
16 16
 }
Please login to merge, or discard this patch.
core/traits/Singleton/Base.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 				'aliases'     => &$aliases,
61 61
 				'final_class' => &$next_alias
62 62
 			];
63
-			$classes                  = glob(CUSTOM.'/classes/'.substr($class, 2).'_*.php');
63
+			$classes = glob(CUSTOM.'/classes/'.substr($class, 2).'_*.php');
64 64
 			foreach ($classes as $custom_class) {
65 65
 				// Path to file with customized class
66 66
 				$custom_class = str_replace(CUSTOM.'/classes/', '', substr($custom_class, 0, -4));
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 					'alias'    => "cs\\custom\\$_custom_class",
74 74
 					'path'     => $custom_class
75 75
 				];
76
-				$next_alias      = "cs\\custom\\$custom_class";
76
+				$next_alias = "cs\\custom\\$custom_class";
77 77
 			}
78 78
 			if (!is_dir(CACHE.'/classes')) {
79 79
 				@mkdir(CACHE.'/classes', 0770, true);
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
 use
10 10
 	cs\False_class;
11 11
 /**
12
- * Singleton trait
13
- *
14
- * Provides Singleton pattern implementation
15
- */
12
+	 * Singleton trait
13
+	 *
14
+	 * Provides Singleton pattern implementation
15
+	 */
16 16
 trait Base {
17 17
 	final protected function __construct () {
18 18
 	}
Please login to merge, or discard this patch.