Passed
Push — master ( b56763...f5ccad )
by Mihail
05:39
created
Apps/Model/Front/Search/EntitySearchMain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function make()
31 31
     {
32
-        $itemCount = (int)$this->_configs['itemPerApp'];
32
+        $itemCount = (int) $this->_configs['itemPerApp'];
33 33
         // search content items
34 34
         $content = new SearchContent($this->query, $itemCount);
35 35
         $this->results['Content'] = $content->getResult();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 /** @var AbstractSearchResult $item */
56 56
                 // build unique relevance. Problem: returned relevance from query is integer
57 57
                 // and can be duplicated. So, we add random complex float value and make it string to sort in feature
58
-                $uniqueRelevance = (string)($item->getRelevance() + (mt_rand(0, 999)/10000));
58
+                $uniqueRelevance = (string) ($item->getRelevance() + (mt_rand(0, 999) / 10000));
59 59
                 // build response
60 60
                 $result[$uniqueRelevance] = [
61 61
                     'title' => $item->getTitle(),
Please login to merge, or discard this patch.
Apps/Model/Front/Search/SearchComments.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
     public function __construct($query, $limit = 10)
27 27
     {
28 28
         $this->query = $query;
29
-        $this->limit = (int)$limit;
29
+        $this->limit = (int) $limit;
30 30
         if ($this->limit < 1) {
31 31
             $this->limit = 1;
32 32
         }
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
             $instance = new AbstractSearchResult();
62 62
             $instance->setTitle(App::$Translate->get('Search', 'Comment on the page'));
63 63
             $instance->setSnippet($snippet);
64
-            $instance->setUri($item->pathway . '#comments-list');
64
+            $instance->setUri($item->pathway.'#comments-list');
65 65
             $instance->setDate($item->created_at);
66
-            $instance->setRelevance((int)$item->relevance);
66
+            $instance->setRelevance((int) $item->relevance);
67 67
 
68 68
             // add instance to result set
69 69
             $result[] = $instance;
Please login to merge, or discard this patch.
Apps/View/Front/default/content/list.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 $catConfigs = [];
17 17
 foreach ($model->category['configs'] as $key=>$value) {
18
-    $catConfigs[$key] = (int)$value === 1;
18
+    $catConfigs[$key] = (int) $value === 1;
19 19
 }
20 20
 
21 21
 $catMeta = [
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 <?php foreach ($model->items as $item): ?>
69 69
     <article class="article-item" itemscope="itemscope" itemtype="https://schema.org/NewsArticle">
70 70
         <h2 itemprop="name">
71
-            <a href="<?= \App::$Alias->baseUrl . $item['uri'] ?>">
71
+            <a href="<?= \App::$Alias->baseUrl.$item['uri'] ?>">
72 72
                 <?= $item['title'] ?>
73 73
             </a>
74 74
         </h2>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 <?php
96 96
                 $ownerNick = $item['author']->getProfile()->getNickname();
97 97
                 if ($item['author']->getId() < 1) {
98
-                    echo '<s>' . $ownerNick . '</s>';
98
+                    echo '<s>'.$ownerNick.'</s>';
99 99
                 } else {
100 100
                     echo Url::link(['profile/show', $item['author']->getId()], $ownerNick, ['itemprop' => 'author']);
101 101
                 }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         <div class="row">
113 113
             <div class="col-md-12">
114 114
                 <?php if ($catConfigs['showPoster'] === true && $item['thumb'] !== null): ?>
115
-                <img src="<?= \App::$Alias->scriptUrl . $item['thumb'] ?>" class="image_poster img-thumbnail hidden-xs" alt="<?= __('Poster for') ?>: <?= Str::lowerCase($item['title']) ?>" />
115
+                <img src="<?= \App::$Alias->scriptUrl.$item['thumb'] ?>" class="image_poster img-thumbnail hidden-xs" alt="<?= __('Poster for') ?>: <?= Str::lowerCase($item['title']) ?>" />
116 116
                 <?php endif; ?>
117 117
                 <div itemprop="text articleBody">
118 118
                     <?= $item['text'] ?>
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             </div>
121 121
         </div>
122 122
         <div class="meta">
123
-        	<?php if ((int)$catConfigs['showRating'] === 1) {
123
+        	<?php if ((int) $catConfigs['showRating'] === 1) {
124 124
         	    echo \App::$View->render('content/_rate', [
125 125
         	        'id' => $item['id'],
126 126
         	        'canRate' => $item['canRate'],
@@ -129,15 +129,15 @@  discard block
 block discarded – undo
129 129
         	} ?>
130 130
 
131 131
         	<span class="spaced hidden-xs"><i class="fa fa-comments"></i>
132
-                <a href="<?= \App::$Alias->baseUrl . $item['uri'] ?>#comments-list"><?= __('Comments') ?>: <span itemprop="commentCount" id="comment-count-<?= $item['id'] ?>">0</span></a>
132
+                <a href="<?= \App::$Alias->baseUrl.$item['uri'] ?>#comments-list"><?= __('Comments') ?>: <span itemprop="commentCount" id="comment-count-<?= $item['id'] ?>">0</span></a>
133 133
             </span>
134 134
             <span class="pull-right">
135
-            <?php if ((int)$configs['keywordsAsTags'] === 1 && $item['tags'] !== null && Obj::isArray($item['tags'])): ?>
135
+            <?php if ((int) $configs['keywordsAsTags'] === 1 && $item['tags'] !== null && Obj::isArray($item['tags'])): ?>
136 136
                 <span class="spaced"><i class="fa fa-tags hidden-xs"></i>
137 137
                 <?php
138 138
                     foreach ($item['tags'] as $tag) {
139 139
                         $tag = \App::$Security->strip_tags(trim($tag));
140
-                        echo Url::link(['content/tag', $tag], $tag, ['class' => 'label label-default']) . "&nbsp;";
140
+                        echo Url::link(['content/tag', $tag], $tag, ['class' => 'label label-default'])."&nbsp;";
141 141
                     }
142 142
                 ?>
143 143
                 </span>
Please login to merge, or discard this patch.