Passed
Push — master ( 1dbfa0...aaaee4 )
by Mihail
07:38
created
Apps/View/Front/default/widgets/comments/show.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /** @var array $configs */
3
-<!-- Note! You can change this structures any way you like. JS operations based ONLY on ID and "hidden" class -->
4
-<!-- comments general line -->
5
-<div class="row">
6
-    <div class="col-md-12">
7
-        <div class="page-comment">
8
-            <ul class="comments" id="comment-list">
9
-                <li class="hidden" id="load-comments"></li>
10
-            </ul>
11
-        </div>
12
-        <div id="comment-show-more" class="hidden">
13
-            <button class="btn btn-block btn-info">Load more (<span id="comment-left-count">0</span> left)</button>
14
-        </div>
15
-    </div>
16
-</div>
3
+<!-- Note!You can change this structures any way you like . JS operations based ONLY on ID and "hidden" class-- >
4
+<!-- comments general line-- >
5
+<div class = "row" >
6
+    <div class = "col-md-12" >
7
+        <div class = "page-comment" >
8
+            <ul class = "comments" id = "comment-list" >
9
+                <li class = "hidden" id = "load-comments" > < / li >
10
+            < / ul >
11
+        < / div >
12
+        <div id = "comment-show-more" class = "hidden" >
13
+            <button class = "btn btn-block btn-info" > Load more( < span id = "comment-left-count" > 0 < /span > left) < /button >
14
+        < / div >
15
+    < / div >
16
+< / div >
17 17
 
18
-<!-- Comment post item structure. -->
19
-<li class="clearfix hidden" id="comment-structure">
20
-    <img id="comment-user-avatar" src="<?= \App::$Alias->scriptUrl ?>/upload/user/avatar/small/default.jpg" class="avatar" alt="Avatar">
21
-    <div class="post-comments">
22
-        <div class="meta">
23
-            <span id="comment-date">01.01.2016</span> <span id="comment-user-nick"><?= __('Unknown') ?></span>:
18
+<!-- Comment post item structure . -- >
19
+<li class = "clearfix hidden" id = "comment-structure" >
20
+    <img id = "comment-user-avatar" src = "<?= \App::$Alias->scriptUrl ?>/upload/user/avatar/small/default.jpg" class = "avatar" alt = "Avatar" >
21
+    <div class = "post-comments" >
22
+        <div class = "meta" >
23
+            <span id = "comment-date" > 01.01.2016 < /span > <span id = "comment-user-nick" > < ? = __('Unknown') ?></span>:
24 24
             <i class="pull-right">
25 25
                 <a href="#" class="show-comment-answers">
26 26
                     <small><?= __('Answers') ?> (<span id="comment-answer-count">0</span>)</small>
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     </li>
56 56
 </ul>
57 57
 
58
-<?php if ((int)$configs['guestAdd'] === 1 || \App::$User->isAuth()): ?>
58
+<?php if ((int) $configs['guestAdd'] === 1 || \App::$User->isAuth()): ?>
59 59
 <!-- comment form -->
60 60
 <form name="comment-add-form" action="" method="post" style="padding-top: 15px;" class="form-horizontal">
61 61
     <input type="hidden" name="replay-to" value="0" />
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/comment_read.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
     <div class="panel-heading">
55 55
         <?php
56 56
         $answerAuthor = Simplify::parseUserNick($answer->user_id, $answer->guest_name);
57
-        if ((int)$answer->user_id > 0) {
57
+        if ((int) $answer->user_id > 0) {
58 58
             $answerAuthor = Url::link(['user/update', $answer->user_id], $answerAuthor);
59 59
         }
60 60
         ?>
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/Controller/Api/Profile.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             $answerTime = Date::convertToTimestamp($lastAnswer->created_at);
150 150
             $cfgs = \Apps\ActiveRecord\App::getConfigs('app', 'Profile');
151 151
             // hmm, maybe past less then delay required?
152
-            if ($now - (int)$cfgs['delayBetweenPost'] < $answerTime) {
152
+            if ($now - (int) $cfgs['delayBetweenPost'] < $answerTime) {
153 153
                 throw new JsonException('Delay between answers not pass');
154 154
             }
155 155
         }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $postInfo = $findAnswer->getWallPost();
197 197
 
198 198
         // if not a target user of answer and not answer owner - lets throw exception
199
-        if($postInfo->target_id !== $viewer->id && $findAnswer->user_id !== $viewer->id) {
199
+        if ($postInfo->target_id !== $viewer->id && $findAnswer->user_id !== $viewer->id) {
200 200
             throw new JsonException('Access declined!');
201 201
         }
202 202
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             // sender is not myself? then i'm - target (remote user is sender user->to_me)
257 257
             if ($row->sender_id !== $user->id) {
258 258
                 $userList[] = $row->sender_id;
259
-                if ((int)$row->tread === 0) {
259
+                if ((int) $row->tread === 0) {
260 260
                     $unreadList[] = $row->sender_id;
261 261
                 }
262 262
             }
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
         // get special types for this action
326 326
         $queryType = App::$Request->get('type');
327
-        $queryId = (int)App::$Request->get('id');
327
+        $queryId = (int) App::$Request->get('id');
328 328
         // get current user object
329 329
         $user = App::$User->identity();
330 330
 
@@ -340,11 +340,11 @@  discard block
 block discarded – undo
340 340
         switch ($queryType) {
341 341
             case 'after':
342 342
                 $messages = Message::where('id', '>', $queryId)
343
-                    ->where(function ($query) use ($cor_id, $user) {
344
-                        $query->where(function ($q) use ($cor_id, $user){
343
+                    ->where(function($query) use ($cor_id, $user) {
344
+                        $query->where(function($q) use ($cor_id, $user){
345 345
                             $q->where('target_id', '=', $user->getId())
346 346
                                 ->where('sender_id', '=', $cor_id);
347
-                        })->orWhere(function ($q) use ($cor_id, $user){
347
+                        })->orWhere(function($q) use ($cor_id, $user){
348 348
                             $q->where('target_id', '=', $cor_id)
349 349
                                 ->where('sender_id', '=', $user->getId());
350 350
                         });
@@ -352,11 +352,11 @@  discard block
 block discarded – undo
352 352
                 break;
353 353
             case 'before':
354 354
                 $messages = Message::where('id', '<', $queryId)
355
-                    ->where(function ($query) use ($cor_id, $user) {
356
-                        $query->where(function ($q) use ($cor_id, $user){
355
+                    ->where(function($query) use ($cor_id, $user) {
356
+                        $query->where(function($q) use ($cor_id, $user){
357 357
                             $q->where('target_id', '=', $user->getId())
358 358
                                 ->where('sender_id', '=', $cor_id);
359
-                        })->orWhere(function ($q) use ($cor_id, $user){
359
+                        })->orWhere(function($q) use ($cor_id, $user){
360 360
                             $q->where('target_id', '=', $cor_id)
361 361
                                 ->where('sender_id', '=', $user->getId());
362 362
                         });
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
         $this->setJsonHeader();
456 456
 
457 457
         // get operation type and target user id
458
-        $target_id = (int)App::$Request->get('target');
458
+        $target_id = (int) App::$Request->get('target');
459 459
         $type = App::$Request->get('type');
460 460
 
461 461
         // check type of query
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 
471 471
         $cfg = \Apps\ActiveRecord\App::getConfigs('app', 'Profile');
472 472
         // check if rating is enabled for website
473
-        if ((int)$cfg['rating'] !== 1) {
473
+        if ((int) $cfg['rating'] !== 1) {
474 474
             throw new JsonException('Rating is disabled');
475 475
         }
476 476
 
Please login to merge, or discard this patch.