Completed
Push — master ( 308a3c...ebb499 )
by Alexey
08:08
created
system/modules/Migrations/objects/Parser/Object/Param.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@  discard block
 block discarded – undo
22 22
             foreach ($this->data as &$data) {
23 23
                 $this->parseData($data, $params);
24 24
             }
25
-        } else {
25
+        }
26
+        else {
26 27
             $this->parseData($this->data, $params);
27 28
         }
28 29
     }
@@ -44,7 +45,8 @@  discard block
 block discarded – undo
44 45
                             $valueObject->param_id = $param->id;
45 46
                             $valueObject->original = (string) $objectParam;
46 47
                             $valueObject->save();
47
-                        } else {
48
+                        }
49
+                        else {
48 50
                             $objectParamValue['col'] = $col->replace;
49 51
                         }
50 52
                         break;
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Walker.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@  discard block
 block discarded – undo
27 27
         //walk know pathes
28 28
         foreach ($this->map->paths(['where' => ['path', $this->curPath]]) as $path) {
29 29
             if (isset($this->data[$path->item])) {
30
-                if ($path->type == 'container') { //create walker for container
30
+                if ($path->type == 'container') {
31
+//create walker for container
31 32
                     $walker = new Walker();
32 33
                     $walker->migration = $this->migration;
33 34
                     $walker->map = $this->map;
@@ -37,7 +38,9 @@  discard block
 block discarded – undo
37 38
                     $walker->mapPathParent = $this->mapPath;
38 39
                     $walker->migtarionLog = $this->migtarionLog;
39 40
                     $walker->walk();
40
-                } elseif ($path->type == 'object') { //start parse path data
41
+                }
42
+                elseif ($path->type == 'object') {
43
+//start parse path data
41 44
                     $this->startObjectParse($path->object_id, $this->data[$path->item]);
42 45
                 }
43 46
             }
@@ -54,9 +57,12 @@  discard block
 block discarded – undo
54 57
                         ['code', $key],
55 58
                         ['migration_id', $this->migration->id]
56 59
             ]);
57
-            if ($object) { //parse as object
60
+            if ($object) {
61
+//parse as object
58 62
                 $this->startObjectParse($object, $data);
59
-            } else { //create new map path for configure unknown path
63
+            }
64
+            else {
65
+//create new map path for configure unknown path
60 66
                 $this->mapPath = new Migration\Map\Path();
61 67
                 $this->mapPath->parent_id = $this->mapPathParent ? $this->mapPathParent->id : 0;
62 68
                 $this->mapPath->path = $this->curPath;
@@ -79,7 +85,8 @@  discard block
 block discarded – undo
79 85
             $where = json_decode($objectParser->object->clear, true);
80 86
             if (!$where) {
81 87
                 $where = [];
82
-            } else {
88
+            }
89
+            else {
83 90
                 $where = [[$where]];
84 91
             }
85 92
             if ($ids) {
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Reader.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 
14 14
 class Reader extends \Object {
15 15
 
16
-    public $data = NULL;
16
+    public $data = null;
17 17
     public $source = '';
18 18
 
19 19
     public function loadData($source = '') {
20 20
         $this->source = $source;
21
-        return FALSE;
21
+        return false;
22 22
     }
23 23
 
24 24
     public function readPath($path = '/') {
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Item/Offer/WarehouseSum.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
                 \Ecommerce\Warehouse::index() => $warehouse->id,
34 34
                 'count' => $count
35 35
             ]);
36
-        } else {
36
+        }
37
+        else {
37 38
             $warehouseOffer->count = $count;
38 39
         }
39 40
         $warehouseOffer->save();
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Item/Offer/Warehouse.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
                             'count' => $count
29 29
                         ]);
30 30
                         $warehouse->save();
31
-                    } else {
31
+                    }
32
+                    else {
32 33
                         if ($warehouse->count != $count) {
33 34
                             $warehouse->count = $count;
34 35
                             $warehouse->save();
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Item/Images.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@  discard block
 block discarded – undo
39 39
                 $md5File = '';
40 40
                 if ($file->md5) {
41 41
                     $md5File = $file->md5;
42
-                } elseif (file_exists($file->getRealPath())) {
42
+                }
43
+                elseif (file_exists($file->getRealPath())) {
43 44
                     $md5File = $file->md5 = md5_file($file->getRealPath());
44 45
                     $file->save();
45 46
                 }
@@ -60,7 +61,8 @@  discard block
 block discarded – undo
60 61
                     $image->save();
61 62
                     $ids[] = $image->id;
62 63
                 }
63
-            } else {
64
+            }
65
+            else {
64 66
                 $image->weight = $key;
65 67
             }
66 68
             if ($image && !$this->model->image_file_id) {
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Item/Options.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@  discard block
 block discarded – undo
29 29
             if (isset(Options::$options[$optionId]) && Options::$options[$optionId]->type == 'select') {
30 30
                 if (empty($options[$optionId])) {
31 31
                     $options[$optionId] = [];
32
-                } else {
32
+                }
33
+                else {
33 34
                     if (!Options::$options[$optionId]->advance) {
34 35
                         Options::$options[$optionId]->advance = ['multi' => true];
35 36
                         Options::$options[$optionId]->save();
@@ -38,7 +39,8 @@  discard block
 block discarded – undo
38 39
                 if ($opt['Значение'] && isset(\App::$cur->migrations->ids['parseIds']['Ecommerce\Item\Option\Item'][$opt['Значение']])) {
39 40
                     $options[$optionId][] = \App::$cur->migrations->ids['parseIds']['Ecommerce\Item\Option\Item'][$opt['Значение']]->object_id;
40 41
                 }
41
-            } else {
42
+            }
43
+            else {
42 44
                 $options[$optionId] = $opt['Значение'];
43 45
             }
44 46
         }
@@ -50,13 +52,16 @@  discard block
 block discarded – undo
50 52
             if (isset(Options::$options[$itemParam->item_option_id]) && Options::$options[$itemParam->item_option_id]->type == 'select') {
51 53
                 if (empty($options[$itemParam->item_option_id]) || !in_array($itemParam->value, $options[$itemParam->item_option_id])) {
52 54
                     $itemParam->delete();
53
-                } else {
55
+                }
56
+                else {
54 57
                     unset($options[$itemParam->item_option_id][array_search($itemParam->value, $options[$itemParam->item_option_id])]);
55 58
                 }
56
-            } else {
59
+            }
60
+            else {
57 61
                 if (empty($options[$itemParam->item_option_id])) {
58 62
                     $itemParam->delete();
59
-                } else {
63
+                }
64
+                else {
60 65
                     $itemParam->value = $options[$itemParam->item_option_id];
61 66
                     $itemParam->save();
62 67
                     unset($options[$itemParam->item_option_id]);
@@ -73,7 +78,8 @@  discard block
 block discarded – undo
73 78
                     ]);
74 79
                     $itemParam->save();
75 80
                 }
76
-            } else {
81
+            }
82
+            else {
77 83
                 $itemParam = new \Ecommerce\Item\Param([
78 84
                     'item_option_id' => $optionId,
79 85
                     'item_id' => $this->model->id,
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Query.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,8 @@
 block discarded – undo
156 156
             addToXml($xml, $req, 'Наименование', 'Метод оплаты');
157 157
             if ($cart->payType) {
158 158
                 addToXml($xml, $req, 'Значение', $cart->payType->name);
159
-            } else {
159
+            }
160
+            else {
160 161
                 addToXml($xml, $req, 'Значение', 'Наличный расчет');
161 162
             }
162 163
 
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Init.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             $query->table = \Exchange1c\Exchange\File::table();
26 26
             $query->cols = \Exchange1c\Exchange\File::colPrefix() . 'id';
27 27
             $queryArr = $query->buildQuery();
28
-            $queryArr['query'].=' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND  `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval'];
28
+            $queryArr['query'] .= ' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND  `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval'];
29 29
             try {
30 30
                 $ids = array_keys($query->query($queryArr)->getArray(\Exchange1c\Exchange\File::colPrefix() . 'id'));
31 31
             } catch (\PDOException $exc) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
             } catch (\PDOException $exc) {
32 32
                 if ($exc->getCode() == '42S02') {
33 33
                     \Exchange1c\Exchange\File::createTable();
34
-                } elseif ($exc->getCode() == '42S22') {
34
+                }
35
+                elseif ($exc->getCode() == '42S22') {
35 36
                     $cols = \Exchange1c\Exchange\File::cols();
36 37
                     foreach (\Exchange1c\Exchange\File::$cols as $colName => $params) {
37 38
                         if (!isset($cols[\Exchange1c\Exchange\File::colPrefix() . $colName])) {
Please login to merge, or discard this patch.