Completed
Push — master ( 135fa8...4a5eb0 )
by Alexey
09:51 queued 04:36
created
system/modules/Migrations/appAdminControllers/content/Map/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 $form->begin('Карта миграции');
5 5
 function drawPath($path, $form, $models, $objects)
6 6
 {
7
-    $form->input('select', 'type[' . $path->id . ']', $path->item, [
7
+    $form->input('select', 'type['.$path->id.']', $path->item, [
8 8
         'values' => [
9 9
     '' => 'Выберите',
10 10
     'continue' => 'Пропустить',
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     'object' => [
13 13
         'text' => 'Объект',
14 14
         'input' => [
15
-            'name' => 'typeOptions[' . $path->id . ']',
15
+            'name' => 'typeOptions['.$path->id.']',
16 16
             'type' => 'select',
17 17
             'source' => 'array',
18 18
             'sourceArray' => $models
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     if (empty($objectsCols[$param->object_id])) {
50 50
         $modelName = $param->object->model;
51 51
         foreach (array_keys($modelName::$cols) as $colName) {
52
-            $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName])?$modelName::$labels[$colName]:$colName;
52
+            $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName;
53 53
         }
54 54
     }
55 55
     $modelName = $param->object->model;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $relations[$relName] = $relName;
59 59
     }
60 60
     if ($parent) {
61
-        $parserName = '\Migrations\Parser\Object\\' . ucfirst($parent->type);
61
+        $parserName = '\Migrations\Parser\Object\\'.ucfirst($parent->type);
62 62
         $parser = new $parserName;
63 63
         $parser->param = $parent;
64 64
         $values = $parser->editor();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             'value' => [
73 73
                 'text' => 'Значение',
74 74
                 'input' => [
75
-                    'name' => 'paramOptions[' . $param->id . ']',
75
+                    'name' => 'paramOptions['.$param->id.']',
76 76
                     'type' => 'select',
77 77
                     'source' => 'array',
78 78
                     'sourceArray' => $objectsCols[$param->object_id],
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             'relation' => [
85 85
                 'text' => 'Зависимость',
86 86
                 'input' => [
87
-                    'name' => 'paramOptions[' . $param->id . ']',
87
+                    'name' => 'paramOptions['.$param->id.']',
88 88
                     'type' => 'select',
89 89
                     'source' => 'array',
90 90
                     'sourceArray' => $relations,
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             'object' => [
97 97
                 'text' => 'Объект',
98 98
                 'input' => [
99
-                    'name' => 'paramOptions[' . $param->id . ']',
99
+                    'name' => 'paramOptions['.$param->id.']',
100 100
                     'type' => 'select',
101 101
                     'source' => 'array',
102 102
                     'sourceArray' => $selectArrays[$param->object->migration_id],
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             'objectLink' => [
109 109
                 'text' => 'Ссылка на объект',
110 110
                 'input' => [
111
-                    'name' => 'paramOptions[' . $param->id . ']',
111
+                    'name' => 'paramOptions['.$param->id.']',
112 112
                     'type' => 'select',
113 113
                     'source' => 'array',
114 114
                     'sourceArray' => $selectArrays[$param->object->migration_id],
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             'newObject' => [
121 121
                 'text' => 'Новый объект',
122 122
                 'input' => [
123
-                    'name' => 'paramOptions[' . $param->id . ']',
123
+                    'name' => 'paramOptions['.$param->id.']',
124 124
                     'type' => 'select',
125 125
                     'source' => 'array',
126 126
                     'sourceArray' => $models,
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             'custom' => [
133 133
                 'text' => 'Свой класс обработки',
134 134
                 'input' => [
135
-                    'name' => 'paramOptions[' . $param->id . ']',
135
+                    'name' => 'paramOptions['.$param->id.']',
136 136
                     'type' => 'text',
137 137
                     'options' => [
138 138
                         'value' => $param->value
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             ]
142 142
         ];
143 143
     }
144
-    $form->input('select', 'param[' . $param->id . ']', $param->code, ['values' => $values,
144
+    $form->input('select', 'param['.$param->id.']', $param->code, ['values' => $values,
145 145
         'value' => $param->type
146 146
     ]);
147 147
     foreach ($param->childs as $child) {
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Walker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                     $walker->migration = $this->migration;
34 34
                     $walker->map = $this->map;
35 35
                     $walker->data = &$this->data[$path->item];
36
-                    $walker->curPath = $this->curPath . $path->item . '/';
36
+                    $walker->curPath = $this->curPath.$path->item.'/';
37 37
                     $walker->mapPath = $path;
38 38
                     $walker->mapPathParent = $this->mapPath;
39 39
                     $walker->migtarionLog = $this->migtarionLog;
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Parser/Object/ParamsList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 if ($param->type == 'custom') {
26 26
                     $parserName = $param->value;
27 27
                 } else {
28
-                    $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type);
28
+                    $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type);
29 29
                 }
30 30
                 if (!\Tools::isAssoc($this->data)) {
31 31
                     foreach ($this->data as $data) {
Please login to merge, or discard this patch.
system/modules/Notifications/install_script.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
     App::$cur->db->createTable('notifications_notification', [
5 5
         'notification_id' => 'pk',
6 6
         'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL',
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
         'subscriber_device_subscriber_id' => 'int(11) UNSIGNED NOT NULL',
30 30
         'subscriber_device_date_last_check' => 'timestamp NOT NULL DEFAULT 0',
31 31
         'subscriber_device_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
32
-    ],[
33
-        'UNIQUE INDEX ' . App::$cur->db->table_prefix . 'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)'
32
+    ], [
33
+        'UNIQUE INDEX '.App::$cur->db->table_prefix.'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)'
34 34
     ]);
35 35
     App::$cur->db->createTable('notifications_subscribe', [
36 36
         'subscribe_id' => 'pk',
Please login to merge, or discard this patch.
system/modules/Apps/appSetupControllers/AppsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
         $app = new App();
17 17
         $app->name = $appOptions->name;
18 18
         $app->system = true;
19
-        $app->staticPath = "/" . $appOptions->dir . "/static";
20
-        $app->templatesPath = "/" . $appOptions->dir . "/static/templates";
21
-        $app->path = INJI_PROGRAM_DIR . '/' . $appOptions->dir;
19
+        $app->staticPath = "/".$appOptions->dir."/static";
20
+        $app->templatesPath = "/".$appOptions->dir."/static/templates";
21
+        $app->path = INJI_PROGRAM_DIR.'/'.$appOptions->dir;
22 22
         $app->type = 'app';
23 23
         $app->installed = true;
24 24
         $app->params = [];
Please login to merge, or discard this patch.
system/modules/Ui/Controllers/UiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,17 +38,17 @@
 block discarded – undo
38 38
             $return = new Server\Result();
39 39
             ob_start();
40 40
             $form->checkRequest($params, true);
41
-            $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : '');
42
-            $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($_GET);
41
+            $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : '');
42
+            $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($_GET);
43 43
             $form->draw($params, true);
44 44
             $return->content = ob_get_contents();
45 45
             ob_end_clean();
46 46
             $return->send();
47 47
         } else {
48 48
             $form->checkRequest($params);
49
-            $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : '');
50
-            $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($_GET);
51
-            $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ') . $form->header);
49
+            $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : '');
50
+            $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($_GET);
51
+            $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ').$form->header);
52 52
             $this->view->page(['content' => 'form', 'data' => compact('form', 'params')]);
53 53
         }
54 54
     }
Please login to merge, or discard this patch.
system/modules/Ui/Controllers/ActiveFormController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
             foreach ($inputs[$inputName]['cols'] as $col) {
59 59
                 $part = trim($part);
60 60
                 if ($part && strlen($part) > 2) {
61
-                    $colWhere[] = [$col, '%' . $part . '%', 'LIKE', $first ? 'AND' : 'OR'];
61
+                    $colWhere[] = [$col, '%'.$part.'%', 'LIKE', $first ? 'AND' : 'OR'];
62 62
                     $first = false;
63 63
                 }
64 64
             }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/select.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     }
13 13
     if (
14 14
             (!is_array($primaryValue) && ($key === $primaryValue || (isset($form->userDataTree[$name]) && $form->userDataTree[$name] === $key))) ||
15
-            (is_array($primaryValue) && (in_array($key,$primaryValue) || (isset($form->userDataTree[$name]) && in_array($key,$form->userDataTree[$name]))))
15
+            (is_array($primaryValue) && (in_array($key, $primaryValue) || (isset($form->userDataTree[$name]) && in_array($key, $form->userDataTree[$name]))))
16 16
             ) {
17 17
         $selected = ' selected="selected"';
18 18
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             $showedInput = count($aditionalInputs) - 1;
23 23
             $aditionValue = !empty($options['aditionalValue']) ? $options['aditionalValue'] : '';
24 24
         }
25
-        $optionsHtml .= "<option data-aditionalInput='" . ( count($aditionalInputs) - 1) . "' value ='{$key}'{$selected}>{$value['text']}</option>";
25
+        $optionsHtml .= "<option data-aditionalInput='".(count($aditionalInputs) - 1)."' value ='{$key}'{$selected}>{$value['text']}</option>";
26 26
     } else {
27 27
         $optionsHtml .= "<option value ='{$key}'{$selected}>{$value}</option>";
28 28
     }
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 
40 40
     if ($key !== $showedInput) {
41 41
         $input['options']['disabled'] = true;
42
-        $input['options']['class'] = !empty($input['options']['class']) ? $input['options']['class'] . ' hidden' : 'hidden';
42
+        $input['options']['class'] = !empty($input['options']['class']) ? $input['options']['class'].' hidden' : 'hidden';
43 43
     } else {
44 44
         $input['options']['value'] = empty($input['options']['value']) ? $aditionValue : $input['options']['value'];
45 45
     }
46 46
     if ($input['type'] == 'select') {
47 47
         $input['options']['values'] = \Ui\ActiveForm::getOptionsList($input);
48 48
     }
49
-    $form->input($input['type'], empty($input['name']) ? $name . '[aditional]' : $input['name'], false, $input['options']);
49
+    $form->input($input['type'], empty($input['name']) ? $name.'[aditional]' : $input['name'], false, $input['options']);
50 50
 }
51 51
 ?>
52 52
 <?= empty($options['noContainer']) ? '</div>' : ''; ?>
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/dynamicList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                                 echo '<td>';
35 35
                                 $col['options']['noContainer'] = true;
36 36
                                 $col['options']['value'] = $row[$colName];
37
-                                $form->input($col['type'], $name . '[' . ($i) . '][' . $colName . ']', false, $col['options']);
37
+                                $form->input($col['type'], $name.'['.($i).']['.$colName.']', false, $col['options']);
38 38
                                 echo '</td>';
39 39
                             }
40 40
                             echo '<td class="actionTd"><a class="btn btn-danger btn-xs" onclick="inji.Ui.forms.delRowFromList(this);"><i class="glyphicon glyphicon-remove"></i></a></td>';
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     foreach ($options['cols'] as $colName => $col) {
64 64
         echo '<td>';
65 65
         $col['options']['noContainer'] = true;
66
-        $form->input($col['type'], $name . '[counterPlaceholder][' . $colName . ']', false, $col['options']);
66
+        $form->input($col['type'], $name.'[counterPlaceholder]['.$colName.']', false, $col['options']);
67 67
         echo '</td>';
68 68
     }
69 69
     ?>
Please login to merge, or discard this patch.