Passed
Push — master ( fa3542...0a3787 )
by Mihail
05:11
created
Apps/View/Admin/default/sitemap/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 <h1><?= __('Sitemap') ?></h1>
21 21
 
22 22
 <p><?= __('Sitemap its a special application to generate sitemap as xml file over sitemap standart for search engines.') ?></p>
23
-<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl . '/sitemap' ?>" target="_blank">/sitemap</a></p>
23
+<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl.'/sitemap' ?>" target="_blank">/sitemap</a></p>
24 24
 <h3><?= __('Sitemap files') ?></h3>
25 25
 <?php
26 26
 $items = [];
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 
33 33
 $list = $this->listing('ul');
34 34
 
35
-foreach($model->files as $file) {
36
-    $list->li(['type' => 'link', 'link' => \Ffcms\Core\App::$Alias->scriptUrl . $file, 'text' => $file, 'linkProperties' => ['target' => '_blank']]);
35
+foreach ($model->files as $file) {
36
+    $list->li(['type' => 'link', 'link' => \Ffcms\Core\App::$Alias->scriptUrl.$file, 'text' => $file, 'linkProperties' => ['target' => '_blank']]);
37 37
 }
38 38
 echo $list->display();
39 39
 ?>
Please login to merge, or discard this patch.
Apps/Model/Front/Sitemap/EntityBuildMap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
                 $this->data[$lang][] = [
56 56
                     'uri' => Url::stringUrl($uri, $lang),
57 57
                     'lastmod' => Date::convertToDatetime($lastmod, 'c'),
58
-                    'freq' => (string)$freq,
59
-                    'priority' => (float)$priority
58
+                    'freq' => (string) $freq,
59
+                    'priority' => (float) $priority
60 60
                 ];
61 61
             }
62 62
         } else { // only one language, multilanguage is disabled
63 63
             $this->data[App::$Properties->get('singleLanguage')][] = [
64 64
                 'uri' => Url::stringUrl($uri),
65 65
                 'lastmod' => Date::convertToDatetime($lastmod, 'c'),
66
-                'freq' => (string)$freq,
67
-                'priority' => (float)$priority
66
+                'freq' => (string) $freq,
67
+                'priority' => (float) $priority
68 68
             ];
69 69
         }
70 70
     }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 'items' => $items
88 88
             ]);
89 89
             
90
-            File::write(EntityIndexList::INDEX_PATH . '/' . $uniqueName . '.' . $lang . '.xml', $xml);
90
+            File::write(EntityIndexList::INDEX_PATH.'/'.$uniqueName.'.'.$lang.'.xml', $xml);
91 91
         }
92 92
         return true;
93 93
     }
Please login to merge, or discard this patch.
Apps/Controller/Admin/Content/ActionUpdate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $record = ContentEntity::withTrashed()
31 31
             ->findOrNew($id);
32 32
         $isNew = $record->id === null;
33
-        $cloneId = (int)$this->request->query->get('from', 0);
33
+        $cloneId = (int) $this->request->query->get('from', 0);
34 34
 
35 35
         // init model
36 36
         $model = new FormContentUpdate($record, $cloneId);
Please login to merge, or discard this patch.
Apps/Controller/Admin/Comments/ActionDelete.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function delete(string $type, ?string $id = null): ?string
34 34
     {
35 35
         // sounds like a multiply delete definition
36
-        if (!$id || (int)$id < 1) {
36
+        if (!$id || (int) $id < 1) {
37 37
             $ids = $this->request->query->get('selected');
38 38
             if (!Any::isArray($ids) || !Arr::onlyNumericValues($ids)) {
39 39
                 throw new NotFoundException('Bad conditions');
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         if ($model->send() && $model->validate()) {
69 69
             $model->make();
70 70
             App::$Session->getFlashBag()->add('success', __('Comments or answers are successful deleted!'));
71
-            $this->response->redirect('comments/' . ($type === self::TYPE_ANSWER ? 'answerlist' : 'index'));
71
+            $this->response->redirect('comments/'.($type === self::TYPE_ANSWER ? 'answerlist' : 'index'));
72 72
         }
73 73
 
74 74
         // render view
Please login to merge, or discard this patch.
Apps/Controller/Admin/Comments/ActionIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function index(): ?string
24 24
     {
25 25
         // set current page and offset
26
-        $page = (int)$this->request->query->get('page');
26
+        $page = (int) $this->request->query->get('page');
27 27
         $offset = $page * self::ITEM_PER_PAGE;
28 28
 
29 29
         // get result as active records object with offset
Please login to merge, or discard this patch.
Apps/Controller/Admin/Comments/ActionPublish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function publish(string $type, ?string $id = null): ?string
33 33
     {
34 34
         // check if it multiple accept ids
35
-        if (!$id || (int)$id < 1) {
35
+        if (!$id || (int) $id < 1) {
36 36
             $ids = $this->request->query->get('selected');
37 37
             if (!Any::isArray($ids) || !Arr::onlyNumericValues($ids)) {
38 38
                 throw new NotFoundException('Bad conditions');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         if ($model->send()) {
66 66
             $model->make();
67 67
             App::$Session->getFlashBag()->add('success', __('Comments or answers are successful published'));
68
-            $this->response->redirect('comments/' . ($type === 'answer' ? 'answerlist' : 'index'));
68
+            $this->response->redirect('comments/'.($type === 'answer' ? 'answerlist' : 'index'));
69 69
         }
70 70
 
71 71
         return $this->view->render('comments/publish', [
Please login to merge, or discard this patch.
Apps/Controller/Admin/Comments/ActionAnswerList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function answerList(): ?string
24 24
     {
25 25
         // set current page and offset
26
-        $page = (int)$this->request->query->get('page');
26
+        $page = (int) $this->request->query->get('page');
27 27
         $offset = $page * self::ITEM_PER_PAGE;
28 28
 
29 29
         // get result as active records object with offset
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 foreach ($records as $item) {
47 47
     $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75);
48 48
 
49
-    $moderate = (bool)$item->moderate;
49
+    $moderate = (bool) $item->moderate;
50 50
     // if even one moderate item is found - change global flag to true
51 51
     if ($moderate) {
52 52
         $moderateIsFound = true;
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     $table->row([
67 67
         ['text' => $item->id],
68 68
         ['text' => Url::a(['comments/read', [$item->id]], $message), 'html' => true],
69
-        ['text' => '<span class="badge badge-light">' . $item->getAnswerCount() . '</span>', 'html' => true],
70
-        ['text' => Simplify::parseUserLink((int)$item->user_id, $item->guest_name, 'user/update'), 'html' => true],
71
-        ['text' => '<a href="'.Url::stringUrl($item->app_name . '/comments/' . $item->app_relation_id).'" target="_blank">' . $item->app_name . '/' . $item->app_relation_id . '</a>', 'html' => true],
69
+        ['text' => '<span class="badge badge-light">'.$item->getAnswerCount().'</span>', 'html' => true],
70
+        ['text' => Simplify::parseUserLink((int) $item->user_id, $item->guest_name, 'user/update'), 'html' => true],
71
+        ['text' => '<a href="'.Url::stringUrl($item->app_name.'/comments/'.$item->app_relation_id).'" target="_blank">'.$item->app_name.'/'.$item->app_relation_id.'</a>', 'html' => true],
72 72
         ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)],
73 73
         ['text' => $btngrp->display(), 'html' => true
74 74
         ],
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/answer_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 foreach ($records as $item) {
46 46
     /** @var \Apps\ActiveRecord\CommentAnswer $item */
47 47
     $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75);
48
-    $moderate = (bool)$item->moderate;
48
+    $moderate = (bool) $item->moderate;
49 49
     if ($moderate) {
50 50
         $moderateIsFound = true;
51 51
     }
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 
62 62
     $table->row([
63 63
         ['text' => $item->id],
64
-        ['text' => '<div>' . Url::a(['comments/read', [$item->comment_id]], $message) . '</div><small class="text-muted">&rarr;' . Text::snippet(\App::$Security->strip_tags($item->post->message), 50) . '</small>' , 'html' => true],
65
-        ['text' => Simplify::parseUserLink((int)$item->user_id, $item->guest_name, 'user/update'), 'html' => true],
64
+        ['text' => '<div>'.Url::a(['comments/read', [$item->comment_id]], $message).'</div><small class="text-muted">&rarr;'.Text::snippet(\App::$Security->strip_tags($item->post->message), 50).'</small>', 'html' => true],
65
+        ['text' => Simplify::parseUserLink((int) $item->user_id, $item->guest_name, 'user/update'), 'html' => true],
66 66
         ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)],
67 67
         ['text' => $btngrp->display(), 'html' => true
68 68
         ]
Please login to merge, or discard this patch.