Passed
Branch master (25273e)
by Mihail
04:42
created
Apps/ActiveRecord/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         $scriptVersion = $this->getScriptVersion();
126 126
 
127
-        return $scriptVersion === (float)$this->version;
127
+        return $scriptVersion === (float) $this->version;
128 128
     }
129 129
 
130 130
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             return false;
143 143
         }
144 144
 
145
-        return (float)constant($class . '::VERSION');
145
+        return (float) constant($class . '::VERSION');
146 146
     }
147 147
 
148 148
 }
149 149
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Controller/Front/Content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $path = App::$Request->getPathWithoutControllerAction();
48 48
         $configs = $this->getConfigs();
49
-        $page = (int)App::$Request->query->get('page');
50
-        $itemCount = (int)$configs['itemPerCategory'];
49
+        $page = (int) App::$Request->query->get('page');
50
+        $itemCount = (int) $configs['itemPerCategory'];
51 51
 
52 52
         // build special model with content list and category list information
53 53
         $model = new EntityCategoryList($path, $configs, $page);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $model = new EntityContentRead($categoryRecord, $contentRecord->first());
117 117
         $search = null;
118 118
         // check if similar search is enabled for item category
119
-        if ((int)$model->getCategory()->getProperty('showSimilar') === 1 && $trash === false) {
119
+        if ((int) $model->getCategory()->getProperty('showSimilar') === 1 && $trash === false) {
120 120
             $search = new EntityContentSearch($model->title, $model->id);
121 121
         }
122 122
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $configs = $this->getConfigs();
141 141
         // check if tags is enabled
142
-        if ((int)$configs['keywordsAsTags'] !== 1) {
142
+        if ((int) $configs['keywordsAsTags'] !== 1) {
143 143
             throw new NotFoundException(__('Tag system is disabled'));
144 144
         }
145 145
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $this->layout = null;
182 182
 
183 183
         // check if rss display allowed for this category
184
-        if ((int)$model->category['configs']['showRss'] !== 1) {
184
+        if ((int) $model->category['configs']['showRss'] !== 1) {
185 185
             throw new ForbiddenException(__('Rss feed is disabled for this category'));
186 186
         }
187 187
 
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
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
      */
145 145
     public function getConfigs()
146 146
     {
147
-        return $this->type === 'widget' ? (array)Serialize::decode($this->widget->configs) : (array)Serialize::decode($this->application->configs);
147
+        return $this->type === 'widget' ? (array) Serialize::decode($this->widget->configs) : (array) Serialize::decode($this->application->configs);
148 148
     }
149 149
 
150 150
     /**
Please login to merge, or discard this patch.
Apps/View/Front/default/widgets/comments/show.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     </li>
55 55
 </ul>
56 56
 
57
-<?php if ((int)$configs['guestAdd'] === 1 || \App::$User->isAuth()): ?>
57
+<?php if ((int) $configs['guestAdd'] === 1 || \App::$User->isAuth()): ?>
58 58
 <!-- comment form -->
59 59
 <form name="comment-add-form" action="" method="post" style="padding-top: 15px;" class="form-horizontal">
60 60
     <input type="hidden" name="replay-to" value="0" />
Please login to merge, or discard this patch.
Apps/Model/Api/Comments/CommentPostAdd.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function check()
57 57
     {
58 58
         // check if user is auth'd or guest name is defined
59
-        if (!App::$User->isAuth() && ((int)$this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) {
59
+        if (!App::$User->isAuth() && ((int) $this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) {
60 60
             throw new JsonException(__('Guest name is not defined'));
61 61
         }
62 62
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         // check if message length is correct
69
-        if (Str::length($this->message) < (int)$this->_configs['minLength'] || Str::length($this->message) > (int)$this->_configs['maxLength']) {
69
+        if (Str::length($this->message) < (int) $this->_configs['minLength'] || Str::length($this->message) > (int) $this->_configs['maxLength']) {
70 70
             throw new JsonException(__('Message length is incorrect. Current: %cur% , min - %min%, max - %max%', [
71 71
                 'cur' => Str::length($this->message),
72 72
                 'min' => $this->_configs['minLength'],
Please login to merge, or discard this patch.
Apps/Model/Api/Comments/CommentAnswerAdd.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function check()
57 57
     {
58 58
         // check if user is auth'd or guest name is defined
59
-        if (!App::$User->isAuth() && ((int)$this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) {
59
+        if (!App::$User->isAuth() && ((int) $this->_configs['guestAdd'] !== 1 || Str::length($this->guestName) < 2)) {
60 60
             throw new JsonException(__('Guest name is not defined'));
61 61
         }
62 62
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         // check if message length is correct
69
-        if (Str::length($this->message) < (int)$this->_configs['minLength'] || Str::length($this->message) > (int)$this->_configs['maxLength']) {
69
+        if (Str::length($this->message) < (int) $this->_configs['minLength'] || Str::length($this->message) > (int) $this->_configs['maxLength']) {
70 70
             throw new JsonException(__('Message length is incorrect. Current: %cur% , min - %min%, max - %max%', [
71 71
                 'cur' => Str::length($this->message),
72 72
                 'min' => $this->_configs['minLength'],
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 foreach ($records as $item) {
32 32
     $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75);
33 33
     $userArr = [];
34
-    if ((int)$item->user_id > 0 && \App::$User->isExist($item->user_id)) {
34
+    if ((int) $item->user_id > 0 && \App::$User->isExist($item->user_id)) {
35 35
         $userName = \App::$User->identity($item->user_id)->getProfile()->getNickname();
36 36
         $userArr = ['text' => Url::link(['user/update', $item->user_id], $userName), 'html' => true];
37 37
     }
Please login to merge, or discard this patch.
Apps/Controller/Admin/Feedback.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function actionIndex()
33 33
     {
34 34
         // set current page and offset
35
-        $page = (int)App::$Request->query->get('page');
35
+        $page = (int) App::$Request->query->get('page');
36 36
         $offset = $page * self::ITEM_PER_PAGE;
37 37
 
38 38
         // get feedback posts AR table
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         // initialize model with answer add if thread is not closed
75 75
         $model = null;
76
-        if ((int)$record->closed !== 1) {
76
+        if ((int) $record->closed !== 1) {
77 77
             $model = new FormAnswerAdd($record, App::$User->identity()->getId());
78 78
             if ($model->send()) {
79 79
                 if ($model->validate()) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             case 'answer':
105 105
                 $record = FeedbackAnswer::find($id);
106 106
                 if ($record !== null && $record !== false) {
107
-                    $postId = (int)$record->getFeedbackPost()->id;
107
+                    $postId = (int) $record->getFeedbackPost()->id;
108 108
                 }
109 109
                 break;
110 110
         }
Please login to merge, or discard this patch.