Passed
Push — master ( 004834...f22cf7 )
by Mihail
04:58
created
Apps/View/Admin/default/feedback/_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/View/Front/default/feedback/read.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,6 +66,9 @@
 block discarded – undo
66 66
     ]
67 67
 ]);
68 68
     ?>
69
-<?php else: ?>
69
+<?php else {
70
+    : ?>
70 71
     <p>No additional fields is added!</p>
71
-<?php endif; ?>
72 72
\ No newline at end of file
73
+<?php endif;
74
+}
75
+?>
73 76
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 ?>
28 28
 
29 29
 <?php
30
-if ((int)$post->closed === 0 && \App::$User->isAuth()) {
30
+if ((int) $post->closed === 0 && \App::$User->isAuth()) {
31 31
     $user = App::$User->identity();
32
-    if ($user->getId() === (int)$post->user_id) {
33
-        echo '<div class="pull-right">' .
34
-            Url::link(['feedback/close', $post->id, $post->hash], __('Close request'), ['class' => 'btn btn-danger']) .
32
+    if ($user->getId() === (int) $post->user_id) {
33
+        echo '<div class="pull-right">'.
34
+            Url::link(['feedback/close', $post->id, $post->hash], __('Close request'), ['class' => 'btn btn-danger']).
35 35
             '</div>';
36 36
     }
37 37
 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 </div>
53 53
 <h3><?= __('Answers') ?></h3>
54 54
 <hr />
55
-<?php if ((int)$post->readed === 0 && ($answers === null || $answers->count() < 1)): ?>
55
+<?php if ((int) $post->readed === 0 && ($answers === null || $answers->count() < 1)): ?>
56 56
     <p class="alert alert-warning"><?= __('This message is not properly readed by website administrators') ?></p>
57 57
 <?php endif; ?>
58 58
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     <?php foreach ($answers as $answer): ?>
61 61
         <div class="row">
62 62
             <div class="col-md-12">
63
-                <div class="panel <?= (int)$answer->is_admin === 1 ? 'panel-success' : 'panel-default' ?>">
63
+                <div class="panel <?= (int) $answer->is_admin === 1 ? 'panel-success' : 'panel-default' ?>">
64 64
                     <div class="panel-heading">
65 65
                         <strong><?= $answer->name ?> (<?= $answer->email ?>)</strong>,
66 66
                         <?= Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?>
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 <?php endif; ?>
76 76
 
77 77
 <br />
78
-<?php if ((int)$post->closed === 0 && $model !== null): ?>
78
+<?php if ((int) $post->closed === 0 && $model !== null): ?>
79 79
     <h3><?= __('Add answer') ?></h3>
80 80
     <?php $form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']) ?>
81 81
     <?= $form->start() ?>
Please login to merge, or discard this patch.
Apps/ActiveRecord/User.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
     /**
164 164
      * Get user person like a object via email
165 165
      * @param string $email
166
-     * @return null|static
166
+     * @return null|ActiveModel
167 167
      */
168 168
     public static function getIdentityViaEmail($email)
169 169
     {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
         }
38 38
 
39 39
         // convert id to real integer
40
-        $user_id = (int)$user_id;
40
+        $user_id = (int) $user_id;
41 41
 
42 42
         if (!Obj::isInt($user_id) || $user_id < 1) {
43 43
             return null;
44 44
         }
45 45
 
46 46
         // check in memory cache object
47
-        if (MainApp::$Memory->get('user.object.cache.' . $user_id) !== null) {
48
-            return MainApp::$Memory->get('user.object.cache.' . $user_id);
47
+        if (MainApp::$Memory->get('user.object.cache.'.$user_id) !== null) {
48
+            return MainApp::$Memory->get('user.object.cache.'.$user_id);
49 49
         }
50 50
         // not founded in memory? lets make query
51 51
         $user = self::find($user_id);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         // store cache and return object
58
-        MainApp::$Memory->set('user.object.cache.' . $user->id, $user);
58
+        MainApp::$Memory->set('user.object.cache.'.$user->id, $user);
59 59
         return $user;
60 60
     }
61 61
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getId()
67 67
     {
68
-        return (int)$this->id;
68
+        return (int) $this->id;
69 69
     }
70 70
 
71 71
     /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         // get data from session
89 89
         $session_token = MainApp::$Session->get('ff_user_token', null);
90
-        $session_id = (int)MainApp::$Session->get('ff_user_id', 0);
90
+        $session_id = (int) MainApp::$Session->get('ff_user_id', 0);
91 91
 
92 92
         // validate session data
93 93
         if (null === $session_token || $session_id < 1 || Str::length($session_token) < 64) {
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
         }
122 122
 
123 123
         // convert id to real integer
124
-        $id = (int)$id;
124
+        $id = (int) $id;
125 125
 
126
-        $find = MainApp::$Memory->get('user.counter.cache.' . $id);
126
+        $find = MainApp::$Memory->get('user.counter.cache.'.$id);
127 127
         if ($find === null) {
128 128
             $find = self::where('id', '=', $id)->count();
129
-            MainApp::$Memory->set('user.counter.cache.' . $id, $find);
129
+            MainApp::$Memory->set('user.counter.cache.'.$id, $find);
130 130
         }
131 131
 
132 132
         return $find === 1;
Please login to merge, or discard this patch.
Apps/Controller/Front/User.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             App::$Session->getFlashBag()->add('error', __('User is never exist or password is incorrect!'));
54 54
             // initialize fail event
55 55
             App::$Event->run(static::EVENT_USER_LOGIN_FAIL, [
56
-               'model' => $loginForm 
56
+                'model' => $loginForm 
57 57
             ]);
58 58
         }
59 59
 
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
             if ($registerForm->tryRegister($configs['registrationType'] === 1)) {
114 114
                 // initialize succes signup event
115 115
                 App::$Event->run(static::EVENT_USER_REGISTER_SUCCESS, [
116
-                   'model' => $registerForm 
116
+                    'model' => $registerForm 
117 117
                 ]);
118 118
                 // send notification of successful registering
119 119
                 App::$Session->getFlashBag()->add('success', __('Your account is registered. You must confirm account via email'));
120 120
             } else {
121 121
                 // init fail signup event
122 122
                 App::$Event->run(static::EVENT_USER_REGISTER_FAIL, [
123
-                   'model' => $registerForm 
123
+                    'model' => $registerForm 
124 124
                 ]);
125 125
                 App::$Session->getFlashBag()->add('error', __('Login or email is always used on website'));
126 126
             }
Please login to merge, or discard this patch.
Apps/Model/Admin/Comments/FormCommentUpdate.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     
16 16
     /**
17 17
      * FormCommentUpdate constructor. Pass record inside the model.
18
-     * @param Apps\ActiveRecord\CommentPost|Apps\ActiveRecord\CommentAnswer $record
18
+     * @param \Ffcms\Core\Arch\ActiveModel $record
19 19
      */
20 20
     public function __construct($record, $type = 'comment')
21 21
     {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     }
25 25
     
26 26
     /**
27
-    * Set default values from active record data
28
-    */
27
+     * Set default values from active record data
28
+     */
29 29
     public function before()
30 30
     {
31 31
         $this->message = $this->_record->message;
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-    * Labels to display in view
37
-    */
36
+     * Labels to display in view
37
+     */
38 38
     public function labels()
39 39
     {
40 40
         return [
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
     }
45 45
 
46 46
     /**
47
-    * Validation rules for comment body
48
-    */
47
+     * Validation rules for comment body
48
+     */
49 49
     public function rules()
50 50
     {
51 51
         return [
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/delete.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
 foreach ($records as $item) {
33 33
     $message = Str::sub(\App::$Security->strip_tags($item->message), 0, 50);
34 34
     $author = Simplify::parseUserNick($item->user_id, $item->guest_name);
35
-    if ((int)$item->user_id > 0) {
36
-        $author = Url::link(['user/update', (int)$item->user_id], $author);
35
+    if ((int) $item->user_id > 0) {
36
+        $author = Url::link(['user/update', (int) $item->user_id], $author);
37 37
     }
38 38
     
39 39
     
Please login to merge, or discard this patch.
Apps/Model/Api/Content/ContentRatingChange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         App::$Session->set('content.rate.ignore', $ignored);
65 65
         
66 66
         // save rating changes to database
67
-        switch($this->_type) {
67
+        switch ($this->_type) {
68 68
             case 'plus':
69 69
                 $this->_content->rating += 1;
70 70
                 break;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $this->_content->save();
77 77
         
78 78
         // update content author rating
79
-        $authorId = (int)$this->_content->author_id;
79
+        $authorId = (int) $this->_content->author_id;
80 80
         if ($authorId > 0 && App::$User->isExist($authorId)) {
81 81
             $authorObject = App::$User->identity($authorId);
82 82
             if ($authorObject !== null) {
Please login to merge, or discard this patch.
tests/_support/_generated/UnitTesterActions.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 // @codingStandardsIgnoreFile
7 7
 
8 8
 use Codeception\Module\Asserts;
9
-use Helper\Unit;
10 9
 
11 10
 trait UnitTesterActions
12 11
 {
Please login to merge, or discard this patch.
tests/_support/_generated/WebGuyActions.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 // @codingStandardsIgnoreFile
7 7
 
8 8
 use Codeception\Module\PhpBrowser;
9
-use Helper\Acceptance;
10 9
 
11 10
 trait WebGuyActions
12 11
 {
Please login to merge, or discard this patch.