Passed
Push — master ( 4af99e...4a867a )
by Mihail
16:55 queued 03:08
created
Apps/View/Admin/default/user/user_delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 <?php
58 58
     $form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post', 'action' => '']);
59 59
     echo $form->start();
60
-    echo $form->submitButton(__('Delete'), ['class' => 'btn btn-danger']) . "&nbsp;";
60
+    echo $form->submitButton(__('Delete'), ['class' => 'btn btn-danger'])."&nbsp;";
61 61
     echo Url::link(['user/index'], __('Cancel'), ['class' => 'btn btn-default']);
62 62
     echo $form->finish();
63 63
 ?>
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Controller/Admin/Feedback.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function actionIndex()
34 34
     {
35 35
         // set current page and offset
36
-        $page = (int)$this->request->query->get('page');
36
+        $page = (int) $this->request->query->get('page');
37 37
         $offset = $page * self::ITEM_PER_PAGE;
38 38
 
39 39
         // get feedback posts AR table
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         // initialize model with answer add if thread is not closed
77 77
         $model = null;
78
-        if ((int)$record->closed !== 1) {
78
+        if ((int) $record->closed !== 1) {
79 79
             $model = new FormAnswerAdd($record, App::$User->identity()->getId());
80 80
             if ($model->send()) {
81 81
                 if ($model->validate()) {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             case 'answer':
116 116
                 $record = FeedbackAnswer::find($id);
117 117
                 if ($record !== null && $record !== false) {
118
-                    $postId = (int)$record->getFeedbackPost()->id;
118
+                    $postId = (int) $record->getFeedbackPost()->id;
119 119
                 }
120 120
                 break;
121 121
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             if ($model->validate()) {
132 132
                 $model->make();
133 133
                 App::$Session->getFlashBag()->add('success', __('Feedback item are successful changed'));
134
-                $this->response->redirect('feedback/read/' . $postId);
134
+                $this->response->redirect('feedback/read/'.$postId);
135 135
             } else {
136 136
                 App::$Session->getFlashBag()->add('danger', __('Updating is failed'));
137 137
             }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         App::$Session->getFlashBag()->add('success', __('Feedback request is changed!'));
182 182
 
183 183
         // redirect to feedback post read
184
-        $this->response->redirect('feedback/read/' . $id);
184
+        $this->response->redirect('feedback/read/'.$id);
185 185
         return null;
186 186
     }
187 187
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                 // its a answer, lets remove it and redirect back in post
227 227
                 $postId = $record->feedback_id;
228 228
                 $record->delete();
229
-                $this->response->redirect('feedback/read/' . $postId);
229
+                $this->response->redirect('feedback/read/'.$postId);
230 230
             }
231 231
         }
232 232
 
Please login to merge, or discard this patch.
Apps/ActiveRecord/Role.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public static function all($columns = ['*'])
28 28
     {
29
-        $cacheName = 'activerecords.role.all.' . implode('.', $columns);
29
+        $cacheName = 'activerecords.role.all.'.implode('.', $columns);
30 30
         $records = MemoryObject::instance()->get($cacheName);
31 31
         if ($records === null) {
32 32
             $records = parent::all($columns);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public static function get($role_id)
45 45
     {
46
-        $role = MainApp::$Memory->get('user.role.cache.' . $role_id);
46
+        $role = MainApp::$Memory->get('user.role.cache.'.$role_id);
47 47
 
48 48
         // not founded in cache
49 49
         if ($role === null) {
50 50
             $role = self::find($role_id);
51
-            MainApp::$Memory->set('user.role.cache.' . $role_id, $role);
51
+            MainApp::$Memory->set('user.role.cache.'.$role_id, $role);
52 52
         }
53 53
         return $role;
54 54
     }
Please login to merge, or discard this patch.
Apps/ActiveRecord/ProfileField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public static function all($columns = ['*'])
30 30
     {
31
-        $cacheName = 'activerecord.profilefield.all.' . implode('.', $columns);
31
+        $cacheName = 'activerecord.profilefield.all.'.implode('.', $columns);
32 32
         $records = MemoryObject::instance()->get($cacheName);
33 33
         if ($records === null) {
34 34
             $records = parent::all($columns);
Please login to merge, or discard this patch.
Apps/Controller/Admin/Widget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $search = \Apps\ActiveRecord\App::getItem('widget', $controller);
88 88
 
89 89
         // check what we got
90
-        if ($search === null || (int)$search->id < 1) {
90
+        if ($search === null || (int) $search->id < 1) {
91 91
             throw new NotFoundException('Widget is not founded');
92 92
         }
93 93
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $record = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'widget')->first();
122 122
 
123 123
         // check if widget admin controller exists
124
-        if ($record === null || (int)$record->id < 1) {
124
+        if ($record === null || (int) $record->id < 1) {
125 125
             throw new ForbiddenException('Widget is not founded');
126 126
         }
127 127
 
Please login to merge, or discard this patch.
Apps/Model/Admin/Feedback/FormAnswerAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         $record->save();
38 38
 
39 39
         // add user notification
40
-        if ((int)$this->_post->user_id > 0 && $this->_userId !== (int)$this->_post->user_id) {
41
-            $notify = new EntityAddNotification((int)$this->_post->user_id);
42
-            $uri = '/feedback/read/' . $this->_post->id . '/' . $this->_post->hash . '#feedback-answer-' . $record->id;
40
+        if ((int) $this->_post->user_id > 0 && $this->_userId !== (int) $this->_post->user_id) {
41
+            $notify = new EntityAddNotification((int) $this->_post->user_id);
42
+            $uri = '/feedback/read/'.$this->_post->id.'/'.$this->_post->hash.'#feedback-answer-'.$record->id;
43 43
 
44 44
             $notify->add($uri, EntityAddNotification::MSG_ADD_FEEDBACKANSWER, [
45 45
                 'snippet' => Text::snippet($this->message, 50),
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormContentClear.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         // remove gallery files if exists
45 45
         foreach ($this->_records->get() as $record) {
46
-            $galleryPath = '/upload/gallery/' . (int)$record->id;
46
+            $galleryPath = '/upload/gallery/'.(int) $record->id;
47 47
             if (Directory::exist($galleryPath)) {
48 48
                 Directory::remove($galleryPath);
49 49
             }
Please login to merge, or discard this patch.
Apps/Model/Front/User/FormLogin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     {
71 71
         $password = App::$Security->password_hash($this->password);
72 72
 
73
-        $search = App::$User->where('password', '=', $password)->where(function ($query) {
73
+        $search = App::$User->where('password', '=', $password)->where(function($query) {
74 74
             $query->where('login', '=', $this->login)
75 75
                 ->orWhere('email', '=', $this->login);
76 76
         });
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormSettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         // labels for custom fields
73 73
         foreach (ProfileField::all() as $custom) {
74
-            $labels['custom_data.' . $custom->id] = $custom->getLocaled('name');
74
+            $labels['custom_data.'.$custom->id] = $custom->getLocaled('name');
75 75
         }
76 76
 
77 77
         return $labels;
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
         // custom profile fields
98 98
         foreach (ProfileField::all() as $custom) {
99 99
             $rules[] = [
100
-                'custom_data.' . $custom->id,
100
+                'custom_data.'.$custom->id,
101 101
                 'used'
102 102
             ];
103 103
             $rules[] = [
104
-                'custom_data.' . $custom->id,
105
-                (int)$custom->reg_cond === 1 ? 'direct_match' : 'reverse_match',
104
+                'custom_data.'.$custom->id,
105
+                (int) $custom->reg_cond === 1 ? 'direct_match' : 'reverse_match',
106 106
                 $custom->reg_exp
107 107
             ];
108 108
         }
Please login to merge, or discard this patch.