Passed
Push — master ( 2f3799...59abca )
by Mihail
06:06
created
Apps/Controller/Front/Content/ActionMy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         }*/
42 42
 
43 43
         // prepare query
44
-        $page = (int)$this->request->query->get('page', 0);
44
+        $page = (int) $this->request->query->get('page', 0);
45 45
         $offset = $page * 10;
46 46
         $query = ContentRecord::where('author_id', App::$User->identity()->getId());
47 47
 
Please login to merge, or discard this patch.
Apps/Controller/Front/Content/ActionRead.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $model = new EntityContentRead($categoryRecord, $contentRecord->first());
70 70
         $search = null;
71 71
         // check if similar search is enabled for item category
72
-        if ((bool)$model->getCategory()->getProperty('showSimilar') && !$trash) {
72
+        if ((bool) $model->getCategory()->getProperty('showSimilar') && !$trash) {
73 73
             $search = new EntityContentSearch($model->title, $model->id, $model->getCategory()->id);
74 74
         }
75 75
 
Please login to merge, or discard this patch.
Apps/View/Front/default/widgets/newcontent/default.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@
 block discarded – undo
11 11
     }
12 12
     $title = Text::snippet($title, 50);
13 13
     $date = Date::humanize($record->created_at);
14
-    $categoryUrl = \App::$Alias->baseUrl . '/content/list/' . $record->cpath;
15
-    $categoryLink = '<a href="' . $categoryUrl . '">' . \App::$Translate->getLocaleText($record->ctitle) . '</a>';
16
-    $newsLink = \App::$Alias->baseUrl . '/content/read/' . $record->cpath;
17
-    $newsLink = rtrim($newsLink, '/') . '/' . $record->path;
14
+    $categoryUrl = \App::$Alias->baseUrl.'/content/list/'.$record->cpath;
15
+    $categoryLink = '<a href="'.$categoryUrl.'">'.\App::$Translate->getLocaleText($record->ctitle).'</a>';
16
+    $newsLink = \App::$Alias->baseUrl.'/content/read/'.$record->cpath;
17
+    $newsLink = rtrim($newsLink, '/').'/'.$record->path;
18 18
 
19 19
     echo '<div class="row"><div class="col-md-12">';
20
-    echo '<a href="' . $newsLink . '">&rarr; ' . $title . '</a><br />';
21
-    echo '<small class="float-left">' . $categoryLink . '</small>';
22
-    echo '<small class="float-right text-secondary">' . $date . '</small>';
20
+    echo '<a href="'.$newsLink.'">&rarr; '.$title.'</a><br />';
21
+    echo '<small class="float-left">'.$categoryLink.'</small>';
22
+    echo '<small class="float-right text-secondary">'.$date.'</small>';
23 23
     echo '</div></div>';
24 24
     echo '<hr class="pretty" />';
25 25
 }
Please login to merge, or discard this patch.
Apps/Model/Front/Feedback/FormAnswerAdd.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@
 block discarded – undo
99 99
 
100 100
         // add notification msg
101 101
         $targetId = $this->_post->user_id;
102
-        if ($targetId !== null && (int)$targetId > 0 && $targetId !== $this->_userId) {
102
+        if ($targetId !== null && (int) $targetId > 0 && $targetId !== $this->_userId) {
103 103
             $notify = new EntityAddNotification($targetId);
104
-            $uri = '/feedback/read/' . $this->_post->id . '/' . $this->_post->hash . '#feedback-answer-' . $record->id;
104
+            $uri = '/feedback/read/'.$this->_post->id.'/'.$this->_post->hash.'#feedback-answer-'.$record->id;
105 105
             $notify->add($uri, EntityAddNotification::MSG_ADD_FEEDBACKANSWER, [
106 106
                 'snippet' => Text::snippet($this->message, 50),
107 107
                 'post' => Text::snippet($this->_post->message, 50)
Please login to merge, or discard this patch.
Apps/View/Front/default/feedback/create.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,9 +18,12 @@
 block discarded – undo
18 18
 <h1><?= __('Feedback') ?></h1>
19 19
 <?php if (\App::$User->isAuth()): ?>
20 20
     <?= $this->insert('feedback/_authTabs') ?>
21
-<?php else: ?>
21
+<?php else {
22
+    : ?>
22 23
     <hr />
23
-<?php endif; ?>
24
+<?php endif;
25
+}
26
+?>
24 27
 
25 28
 <?php $form = $this->form($model) ?>
26 29
 <?= $form->start() ?>
Please login to merge, or discard this patch.
Apps/View/Front/default/feedback/list.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,9 +46,8 @@
 block discarded – undo
46 46
         ['text' => $item->id],
47 47
         ['text' => Url::a(['feedback/read', [$item->id, $item->hash]], Text::cut($item->message, 0, 40)), 'html' => true],
48 48
         ['text' =>
49
-            (int)$item->closed === 1 ?
50
-                '<span class="badge badge-danger">' . __('Closed') . '</span>' :
51
-                '<span class="badge badge-success">' . __('Opened') . '</span>',
49
+            (int) $item->closed === 1 ?
50
+                '<span class="badge badge-danger">'.__('Closed').'</span>' : '<span class="badge badge-success">'.__('Opened').'</span>',
52 51
             'html' => true, '!secure' => true],
53 52
         ['text' => $item->answers()->count()],
54 53
         ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)],
Please login to merge, or discard this patch.
Apps/View/Front/default/feedback/read.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 if (!(bool)$post->closed && \App::$User->isAuth()) {
31 31
     $user = App::$User->identity();
32 32
     if ((int)$user->getId() === (int)$post->user_id) {
33
-       echo Url::a(['feedback/close', [$post->id, $post->hash]], __('Close request'), ['class' => 'btn btn-danger']);
33
+        echo Url::a(['feedback/close', [$post->id, $post->hash]], __('Close request'), ['class' => 'btn btn-danger']);
34 34
     }
35 35
 }
36 36
 ?>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 <?php endif; ?>
28 28
 
29 29
 <?php
30
-if (!(bool)$post->closed && \App::$User->isAuth()) {
30
+if (!(bool) $post->closed && \App::$User->isAuth()) {
31 31
     $user = App::$User->identity();
32
-    if ((int)$user->getId() === (int)$post->user_id) {
32
+    if ((int) $user->getId() === (int) $post->user_id) {
33 33
        echo Url::a(['feedback/close', [$post->id, $post->hash]], __('Close request'), ['class' => 'btn btn-danger']);
34 34
     }
35 35
 }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 </div>
51 51
 <h3><?= __('Answers') ?></h3>
52 52
 <hr />
53
-<?php if (!(bool)$post->readed && (!$answers || $answers->count() < 1)): ?>
53
+<?php if (!(bool) $post->readed && (!$answers || $answers->count() < 1)): ?>
54 54
     <?= $this->bootstrap()->alert('warning', __('This message is not properly readed by website administrators')) ?>
55 55
 <?php endif; ?>
56 56
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         <div class="row" id="feedback-answer-<?= $answer->id ?>">
60 60
             <div class="col-md-12">
61 61
                 <div class="card">
62
-                    <div class="card-header<?= (bool)$answer->is_admin ? ' bg-success' : null ?>">
62
+                    <div class="card-header<?= (bool) $answer->is_admin ? ' bg-success' : null ?>">
63 63
                         <strong><?= $answer->name ?> (<?= $answer->email ?>)</strong>,
64 64
                         <?= Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?>
65 65
                     </div>
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 <?php endif; ?>
74 74
 
75 75
 <br />
76
-<?php if (!(bool)$post->closed && $model): ?>
76
+<?php if (!(bool) $post->closed && $model): ?>
77 77
     <h3><?= __('Add answer') ?></h3>
78 78
     <?php $form = $this->form($model) ?>
79 79
     <?= $form->start() ?>
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,9 +22,12 @@  discard block
 block discarded – undo
22 22
 <h1><?= __('Feedback message #%id%', ['id' => $post->id]) ?></h1>
23 23
 <?php if (\App::$User->isAuth()): ?>
24 24
     <?= $this->insert('feedback/_authTabs') ?>
25
-<?php else: ?>
25
+<?php else {
26
+    : ?>
26 27
     <hr />
27
-<?php endif; ?>
28
+<?php endif;
29
+}
30
+?>
28 31
 
29 32
 <?php
30 33
 if (!(bool)$post->closed && \App::$User->isAuth()) {
@@ -85,8 +88,11 @@  discard block
 block discarded – undo
85 88
     <?= $form->button()->submit(__('Add'), ['class' => 'btn btn-primary']) ?>
86 89
 
87 90
     <?= $form->stop() ?>
88
-<?php else: ?>
91
+<?php else {
92
+    : ?>
89 93
     <?= $this->bootstrap()->alert('danger', __('This request is closed! No answers is allowed')) ?>
90
-<?php endif; ?>
94
+<?php endif;
95
+}
96
+?>
91 97
 
92 98
 <?php $this->stop() ?>
Please login to merge, or discard this patch.
Apps/View/Front/default/feedback/_mail/created.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 <tbody>
34 34
                 <tr>
35 35
                     <td align="left" style="font-family:Helvetica Neue,Arial,Helvetica,sans-serif;padding-left:9px;font-size:14px;">
36
-                        <a href="<?= \App::$Alias->scriptUrl ?>/feedback/read/<?= $record->id . '/' . $record->hash ?>">
36
+                        <a href="<?= \App::$Alias->scriptUrl ?>/feedback/read/<?= $record->id.'/'.$record->hash ?>">
37 37
                             <?= __('View request') ?>
38 38
                         </a>
39 39
                     </td>
Please login to merge, or discard this patch.
Apps/View/Front/default/widgets/contenttag/default.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 ?>
8 8
 
9 9
 <?php foreach ($records as $row) {
10
-    echo Url::a(['content/tag', [$row['tag']]], $row['tag'], ['class' => 'badge badge-secondary']) . ' ';
10
+    echo Url::a(['content/tag', [$row['tag']]], $row['tag'], ['class' => 'badge badge-secondary']).' ';
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.