Passed
Push — master ( 29baaf...069627 )
by Mihail
06:51
created
Apps/Model/Front/Content/EntityCategoryRead.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         ];
58 58
 
59 59
         // check if this category is hidden
60
-        if ((int)$this->categoryData['configs']['showCategory'] !== 1) {
60
+        if ((int) $this->categoryData['configs']['showCategory'] !== 1) {
61 61
             throw new ForbiddenException();
62 62
         }
63 63
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 // find first paragraph ending
83 83
                 $breakPosition = mb_strpos($text, '</p>', null, 'UTF-8');
84 84
                 // cut text from position caret before </p> (+4 symbols to save item as valid)
85
-                $text = Str::sub($text, 0, $breakPosition+4);
85
+                $text = Str::sub($text, 0, $breakPosition + 4);
86 86
             }
87 87
 
88 88
             $itemPath = $this->_allCategories[$row->category_id]['path'];
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
                 'author' => $owner,
136 136
                 'poster' => $poster,
137 137
                 'thumb' => $thumb,
138
-                'views' => (int)$row->views,
139
-                'rating' => (int)$row->rating,
138
+                'views' => (int) $row->views,
139
+                'rating' => (int) $row->rating,
140 140
                 'category' => $this->_allCategories[$row->category_id],
141 141
                 'uri' => '/content/read/' . $itemPath,
142 142
                 'tags' => $tags
Please login to merge, or discard this patch.
Apps/ActiveRecord/App.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
             return false;
128 128
         }
129 129
 
130
-        return (float)constant($class.'::VERSION') === (float)$this->version;
130
+        return (float) constant($class . '::VERSION') === (float) $this->version;
131 131
     }
132 132
 
133 133
 }
134 134
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/application/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     $route = $app->sys_name . '/index';
30 30
     $icoStatus = null;
31 31
     $actions = \App::$View->render('macro/app_actions', ['controller' => $app->sys_name]);
32
-    if ((int)$app->disabled !== 0) {
32
+    if ((int) $app->disabled !== 0) {
33 33
         $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>';
34 34
     } elseif ($app->checkVersion() !== true) {
35 35
         $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>';
Please login to merge, or discard this patch.
Apps/Model/Admin/Application/FormInstall.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function before()
40 40
     {
41 41
         foreach ($this->_apps as $app) {
42
-            $this->_definedControllers[] = (string)$app->sys_name;
42
+            $this->_definedControllers[] = (string) $app->sys_name;
43 43
         }
44 44
 
45 45
         parent::before();
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         // get ext version
80
-        $cVersion = (float)constant($cPath . '::VERSION');
80
+        $cVersion = (float) constant($cPath . '::VERSION');
81 81
         if ($cVersion < 0.1) {
82 82
             $cVersion = 0.1;
83 83
         }
Please login to merge, or discard this patch.
Apps/Controller/Api/Content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
         parent::before();
28 28
         $configs = AppRecord::getConfigs('app', 'Content');
29 29
         // prevent null-type config data
30
-        if ((int)$configs['gallerySize'] > 0) {
31
-            $this->maxSize = (int)$configs['gallerySize'] * 1024;
30
+        if ((int) $configs['gallerySize'] > 0) {
31
+            $this->maxSize = (int) $configs['gallerySize'] * 1024;
32 32
         }
33 33
 
34
-        if ((int)$configs['galleryResize'] > 0) {
35
-            $this->maxResize = (int)$configs['galleryResize'];
34
+        if ((int) $configs['galleryResize'] > 0) {
35
+            $this->maxResize = (int) $configs['galleryResize'];
36 36
         }
37 37
     }
38 38
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         // check file size
72 72
         if ($file->getSize() < 1 || $file->getSize() > $this->maxSize) {
73
-            throw new JsonException(__('File size is too big. Max size: %size%kb', ['size' => intval($this->maxSize/1024)]));
73
+            throw new JsonException(__('File size is too big. Max size: %size%kb', ['size' => intval($this->maxSize / 1024)]));
74 74
         }
75 75
 
76 76
         // check file extension
Please login to merge, or discard this patch.
Extend/Core/Arch/AdminController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
      */
140 140
     public function getConfigs()
141 141
     {
142
-        return $this->type === 'widget' ? (array)Serialize::decode($this->widget->config) : (array)Serialize::decode($this->application->configs);
142
+        return $this->type === 'widget' ? (array) Serialize::decode($this->widget->config) : (array) Serialize::decode($this->application->configs);
143 143
     }
144 144
 
145 145
     /**
Please login to merge, or discard this patch.
Apps/Controller/Admin/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $search = \Apps\ActiveRecord\App::getItem('app', $controller);
72 72
 
73 73
         // check what we got
74
-        if ($search === null || (int)$search->id < 1) {
74
+        if ($search === null || (int) $search->id < 1) {
75 75
             throw new ForbiddenException('App is not founded');
76 76
         }
77 77
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
         $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'app')->first();
98 98
 
99
-        if ($search === null || (int)$search->id < 1) {
99
+        if ($search === null || (int) $search->id < 1) {
100 100
             throw new ForbiddenException('App is not founded');
101 101
         }
102 102
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/layout/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
                         if ($item->type === 'app') {
160 160
                             $appControllers[] = $item->sys_name;
161 161
                             $appMenuItems[] = $menuItem;
162
-                        } elseif($item->type === 'widget') {
162
+                        } elseif ($item->type === 'widget') {
163 163
                             $widgetControllers[] = $item->sys_name;
164 164
                             $widgetMenuItems[] = $menuItem;
165 165
                         }
Please login to merge, or discard this patch.
Apps/View/Admin/default/widget/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     $route = $widget->sys_name . '/index';
27 27
     $icoStatus = null;
28 28
     $actions = $this->render('macro/widget_actions', ['controller' => $widget->sys_name]);
29
-    if ((int)$widget->disabled !== 0) {
29
+    if ((int) $widget->disabled !== 0) {
30 30
         $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>';
31 31
     } elseif ($widget->checkVersion() !== true) {
32 32
         $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>';
Please login to merge, or discard this patch.