Test Failed
Push — master ( b91d24...4aac7f )
by Mihail
06:00
created
Apps/Controller/Admin/Main/ActionFiles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function files(): ?string
25 25
     {
26 26
         return $this->view->render('main/files', [
27
-            'connector' => App::$Alias->scriptUrl . '/api/main/files?lang=' . $this->request->getLanguage()
27
+            'connector' => App::$Alias->scriptUrl.'/api/main/files?lang='.$this->request->getLanguage()
28 28
         ]);
29 29
     }
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Controller/Admin/Widget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $search = \Apps\ActiveRecord\App::getItem('widget', $controller);
83 83
 
84 84
         // check what we got
85
-        if (!$search || (int)$search->id < 1) {
85
+        if (!$search || (int) $search->id < 1) {
86 86
             throw new NotFoundException('Widget is not founded');
87 87
         }
88 88
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             ->first();
118 118
 
119 119
         // check if widget admin controller exists
120
-        if (!$record || (int)$record->id < 1) {
120
+        if (!$record || (int) $record->id < 1) {
121 121
             throw new ForbiddenException('Widget is not founded');
122 122
         }
123 123
 
Please login to merge, or discard this patch.
Apps/Controller/Admin/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $search = \Apps\ActiveRecord\App::getItem('app', $controller);
85 85
 
86 86
         // check what we got
87
-        if (!$search || (int)$search->id < 1) {
87
+        if (!$search || (int) $search->id < 1) {
88 88
             throw new NotFoundException('App is not founded');
89 89
         }
90 90
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $search = \Apps\ActiveRecord\App::where('sys_name', $controllerName)
117 117
             ->where('type', 'app')
118 118
             ->first();
119
-        if (!$search || (int)$search->id < 1) {
119
+        if (!$search || (int) $search->id < 1) {
120 120
             throw new ForbiddenException('App is not founded');
121 121
         }
122 122
 
Please login to merge, or discard this patch.
Apps/View/Front/default/content/read.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 }
31 31
 // don't use breadcrumbs on injected pathway rule
32 32
 $breadcrumbs = null;
33
-if (!\App::$Request->isPathInjected() && (bool)$model->getCategory()->getProperty('showCategory')) {
33
+if (!\App::$Request->isPathInjected() && (bool) $model->getCategory()->getProperty('showCategory')) {
34 34
     $breadcrumbs = [
35 35
         Url::to('/') => __('Home')
36 36
     ];
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                 $breadcrumbs[Url::to('content/list', [$cat['path']])] = $cat['name'];
43 43
             }
44 44
         }
45
-        $breadcrumbs[] = __('Content') . ': ' . Str::sub($title, 0, 40);
45
+        $breadcrumbs[] = __('Content').': '.Str::sub($title, 0, 40);
46 46
     }
47 47
 }
48 48
 
@@ -55,15 +55,15 @@  discard block
 block discarded – undo
55 55
 ]);
56 56
 
57 57
 $properties = [
58
-    'date' => (bool)$model->getCategory()->getProperty('showDate'),
59
-    'author' => (bool)$model->getCategory()->getProperty('showAuthor'),
60
-    'views' => (bool)$model->getCategory()->getProperty('showViews'),
61
-    'category' => (bool)$model->getCategory()->getProperty('showCategory'),
62
-    'rating' => (bool)$model->getCategory()->getProperty('showRating'),
63
-    'tags' => (bool)$model->getCategory()->getProperty('showTags')
58
+    'date' => (bool) $model->getCategory()->getProperty('showDate'),
59
+    'author' => (bool) $model->getCategory()->getProperty('showAuthor'),
60
+    'views' => (bool) $model->getCategory()->getProperty('showViews'),
61
+    'category' => (bool) $model->getCategory()->getProperty('showCategory'),
62
+    'rating' => (bool) $model->getCategory()->getProperty('showRating'),
63
+    'tags' => (bool) $model->getCategory()->getProperty('showTags')
64 64
 ];
65
-$showComments = (bool)$model->getCategory()->getProperty('showComments');
66
-$showPoster = (bool)$model->getCategory()->getProperty('showPoster');
65
+$showComments = (bool) $model->getCategory()->getProperty('showComments');
66
+$showPoster = (bool) $model->getCategory()->getProperty('showPoster');
67 67
 ?>
68 68
 
69 69
 <?php $this->push('css') ?>
@@ -75,24 +75,24 @@  discard block
 block discarded – undo
75 75
         <h1><?= $model->title ?></h1>
76 76
         <?php if (Arr::in(true, $properties)): ?>
77 77
             <div class="meta">
78
-                <?php if ((bool)$properties['category']): ?>
78
+                <?php if ((bool) $properties['category']): ?>
79 79
                     <span class="spaced"><i class="fa fa-list"></i> <?= Url::a(['content/list', [$model->catPath]], $model->catName, ['itemprop' => 'genre']) ?></span>
80 80
                 <?php endif; ?>
81
-                <?php if ((bool)$properties['date']): ?>
81
+                <?php if ((bool) $properties['date']): ?>
82 82
                     <span class="spaced"><i class="fa fa-calendar"></i> <time datetime="<?= date('c', Date::convertToTimestamp($model->getRecord()->created_at)) ?> itemprop="datePublished"><?= $model->createDate ?></time></span>
83 83
                 <?php endif; ?>
84
-                <?php if ((bool)$properties['author']): ?>
84
+                <?php if ((bool) $properties['author']): ?>
85 85
                     <?php if ($model->authorId && $model->authorId > 0): ?>
86 86
                         <span class="spaced"><i class="fa fa-user"></i> <?= Url::a(['profile/show', [$model->authorId]], $model->authorName, ['itemprop' => 'author']) ?></span>
87 87
                     <?php else: ?>
88 88
                         <span class="spaced"><i class="fa fa-user"></i> <s><?= $model->authorName ?></s></span>
89 89
                     <?php endif; ?>
90 90
                 <?php endif; ?>
91
-                <?php if ((bool)$properties['views']): ?>
91
+                <?php if ((bool) $properties['views']): ?>
92 92
                     <span class="spaced"><i class="fa fa-eye"></i> <?= $model->views ?></span>
93 93
                 <?php endif ?>
94 94
                 <?php if (\App::$User->isAuth() && \App::$User->identity()->role->can('Admin/Content/Update')): ?>
95
-                    <span class="float-right"><a href="<?= \App::$Alias->scriptUrl . '/admin/content/update/' . $model->id ?>" target="_blank"><i class="fa fa-pencil" style="color: #ff0000;"></i></a></span>
95
+                    <span class="float-right"><a href="<?= \App::$Alias->scriptUrl.'/admin/content/update/'.$model->id ?>" target="_blank"><i class="fa fa-pencil" style="color: #ff0000;"></i></a></span>
96 96
                 <?php endif; ?>
97 97
             </div>
98 98
         <?php else: ?>
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
                 <div id="content-text">
110 110
                     <?php if ($showPoster === true && $model->posterFull && $model->posterThumb): ?>
111 111
                         <a href="<?= $model->posterFull ?>" data-fancybox="image">
112
-                            <img alt="<?= __('Poster for') ?>: <?= Str::lowerCase($model->title) ?>" src="<?= \App::$Alias->scriptUrl . $model->posterThumb ?>" class="image_poster img-thumbnail" />
112
+                            <img alt="<?= __('Poster for') ?>: <?= Str::lowerCase($model->title) ?>" src="<?= \App::$Alias->scriptUrl.$model->posterThumb ?>" class="image_poster img-thumbnail" />
113 113
                         </a>
114
-                    <?php endif ;?>
114
+                    <?php endif; ?>
115 115
                     <?= $model->text ?>
116 116
                 </div>
117 117
             </div>
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
                 <?php foreach ($model->galleryItems as $thumb => $full): ?>
122 122
                 <div class="col-6 col-lg-4 mt-2">
123 123
                     <figure>
124
-                        <a class="d-block mb-4" data-fancybox="images" href="<?= \App::$Alias->scriptUrl . $full ?>">
125
-                            <img class="img-fluid" src="<?= \App::$Alias->scriptUrl . $thumb ?>" alt="gallery image">
124
+                        <a class="d-block mb-4" data-fancybox="images" href="<?= \App::$Alias->scriptUrl.$full ?>">
125
+                            <img class="img-fluid" src="<?= \App::$Alias->scriptUrl.$thumb ?>" alt="gallery image">
126 126
                         </a>
127 127
                     </figure>
128 128
                 </div>
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     </div>
145 145
                     <div id="similar-collapse-<?= $item['id'] ?>" class="collapse" aria-labelledby="similar-heading-<?= $item['id'] ?>" data-parent="#accordion-similar-group">
146 146
                         <div class="card-body">
147
-                            <a href="<?= \App::$Alias->baseUrl . $item['uri'] ?>">
147
+                            <a href="<?= \App::$Alias->baseUrl.$item['uri'] ?>">
148 148
                                 <?= $item['snippet'] ?>
149 149
                             </a>
150 150
                         </div>
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                                 echo '<i class="fa fa-tags"></i> ';
176 176
                                 foreach ($model->metaKeywords as $tag) {
177 177
                                     $tag = trim($tag);
178
-                                    echo Url::a(['content/tag', [urlencode($tag)]], $tag, ['class' => 'badge badge-secondary']) . "&nbsp;";
178
+                                    echo Url::a(['content/tag', [urlencode($tag)]], $tag, ['class' => 'badge badge-secondary'])."&nbsp;";
179 179
                                 }
180 180
                             }
181 181
                             ?>
Please login to merge, or discard this patch.
Apps/View/Admin/default/feedback/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 <h1><?= __('Feedback list') ?></h1>
26 26
 <?php
27 27
 if (!$records || $records->count() < 1) {
28
-    echo '<p class="alert alert-warning">' . __('Feedback requests is empty now!') . '</p>';
28
+    echo '<p class="alert alert-warning">'.__('Feedback requests is empty now!').'</p>';
29 29
     $this->stop();
30 30
     return;
31 31
 }
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 foreach ($records as $item) {
46 46
     /** @var \Apps\ActiveRecord\FeedbackPost $item*/
47 47
     $table->row([
48
-        ['text' => $item->id . (!$item->readed ? ' <i class="fa fa-bell alert-info"></i>'  : null) . ($item->closed ? ' <i class="fa fa-eye-slash alert-danger"></i>' : null), 'html' => true],
48
+        ['text' => $item->id.(!$item->readed ? ' <i class="fa fa-bell alert-info"></i>' : null).($item->closed ? ' <i class="fa fa-eye-slash alert-danger"></i>' : null), 'html' => true],
49 49
         ['text' => Url::a(['feedback/read', [$item->id]], Text::snippet($item->message, 40)), 'html' => true],
50
-        ['text' => '<span class="badge badge-light">' . $item->answers->count() . '</span>', 'html' => true],
50
+        ['text' => '<span class="badge badge-light">'.$item->answers->count().'</span>', 'html' => true],
51 51
         ['text' => $item->email],
52
-        ['text' => (bool)$item->closed ? '<span class="badge badge-danger">' . __('Closed') . '</span>' : '<span class="label label-success">' . __('Opened') . '</span>', 'html' => true, '!secure' => true],
52
+        ['text' => (bool) $item->closed ? '<span class="badge badge-danger">'.__('Closed').'</span>' : '<span class="label label-success">'.__('Opened').'</span>', 'html' => true, '!secure' => true],
53 53
         ['text' => Date::convertToDatetime($item->updated_at, Date::FORMAT_TO_HOUR)],
54 54
         ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm', 'role' => 'group'])
55 55
             ->add('<i class="fa fa-feed"></i>', ['feedback/read', [$item->id]], ['class' => 'btn btn-light', 'html' => true])
Please login to merge, or discard this patch.
Apps/View/Admin/default/user/user_update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             <div class="text-right"><strong><?= __('Profile preview') ?></strong></div>
38 38
         </div>
39 39
         <div class="col-md-9">
40
-            <a href="<?= \App::$Alias->scriptUrl . '/profile/show/' . $model->_user->id ?>" target="_blank"><?= __('View profile on website') ?></a>
40
+            <a href="<?= \App::$Alias->scriptUrl.'/profile/show/'.$model->_user->id ?>" target="_blank"><?= __('View profile on website') ?></a>
41 41
         </div>
42 42
     </div>
43 43
     <div class="row mt-3 mb-3">
Please login to merge, or discard this patch.
Apps/Model/Front/Content/EntityContentSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
         $index = implode('-', $this->_skip);
63 63
         // try to get this slow query from cache
64
-        $cache = App::$Cache->getItem('entity.content.search.index.' . $index);
64
+        $cache = App::$Cache->getItem('entity.content.search.index.'.$index);
65 65
         if (!$cache->isHit()) {
66 66
             $cache->set($this->makeSearch());
67 67
             $cache->expiresAfter(static::CACHE_TIME);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 'id' => $item->id,
96 96
                 'title' => $item->getLocaled('title'),
97 97
                 'snippet' => Text::snippet($text),
98
-                'uri' => '/content/read/' . $item->getPath(),
98
+                'uri' => '/content/read/'.$item->getPath(),
99 99
                 'thumb' => $item->getPosterThumbUri()
100 100
             ];
101 101
         }
Please login to merge, or discard this patch.
Apps/View/Admin/default/user/user_clear.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             ['text' => $model->getUser()->id],
35 35
             ['text' => $model->getUser()->email],
36 36
             ['text' => $model->getUser()->login],
37
-            ['text' => $model->getUser()->profile->nick ?? 'id' . $model->getUser()->id],
37
+            ['text' => $model->getUser()->profile->nick ?? 'id'.$model->getUser()->id],
38 38
             ['text' => Date::convertToDatetime($model->getUser()->created_at, Date::FORMAT_TO_HOUR)],
39 39
         ])->display() ?>
40 40
 </div>
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/content_update.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
             $langMenu->menu([
52 52
                 'text' => Str::upperCase($lang),
53 53
                 'tab' => function() use ($form, $lang) {
54
-                    return $form->fieldset()->text('title.' . $lang, null, __('Fill the title of the content for current language locale')) .
55
-                        '<strong>' . __('Content text') . '</strong><br />' .
56
-                        $form->field()->textarea('text.' . $lang, ['class' => 'form-control wysiwyg', 'rows' => 7]);
54
+                    return $form->fieldset()->text('title.'.$lang, null, __('Fill the title of the content for current language locale')).
55
+                        '<strong>'.__('Content text').'</strong><br />'.
56
+                        $form->field()->textarea('text.'.$lang, ['class' => 'form-control wysiwyg', 'rows' => 7]);
57 57
                 },
58 58
                 'tabActive' => $lang === \App::$Request->getLanguage()
59 59
             ]);
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
             $langMenu->menu([
73 73
                 'text' => Str::upperCase($lang),
74 74
                 'tab' => function() use ($form, $lang) {
75
-                    return $form->fieldset()->text('metaTitle.' . $lang, null, __('Set meta title for content page (displayed in browser head). Recommended length: 50-70 chars')).
76
-                        $form->fieldset()->text('metaKeywords.' . $lang, ['class' => 'tag-selectize'], __('Set meta keywords for this content (for search engine crawlers) separated by comma')).
77
-                        $form->fieldset()->text('metaTitle.' . $lang, null, __('Set meta description for this content (for search engine crawlers). Recommended length: 200-250 chars'));
75
+                    return $form->fieldset()->text('metaTitle.'.$lang, null, __('Set meta title for content page (displayed in browser head). Recommended length: 50-70 chars')).
76
+                        $form->fieldset()->text('metaKeywords.'.$lang, ['class' => 'tag-selectize'], __('Set meta keywords for this content (for search engine crawlers) separated by comma')).
77
+                        $form->fieldset()->text('metaTitle.'.$lang, null, __('Set meta description for this content (for search engine crawlers). Recommended length: 200-250 chars'));
78 78
                 },
79 79
                 'tabActive' => $lang === \App::$Request->getLanguage()
80 80
             ]);
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
             <div class="dropzone dropzone-previews" id="ffcms-dropzone"></div>
93 93
         </div>
94 94
         <div class="col-md-4">
95
-        ' . $form->fieldset()->select('poster', ['options' => [__('Not selected...')]], __("Select image from gallery as a poster for this content")) . '
95
+        ' . $form->fieldset()->select('poster', ['options' => [__('Not selected...')]], __("Select image from gallery as a poster for this content")).'
96 96
         </div>
97 97
     </div><br/><br/>';
98 98
     }])
99 99
     ->menu(['text' => __('Other'), 'tab' => function() use ($form, $model) {
100
-        return $form->fieldset()->boolean('display', null, __('Can users view this content or only available for administrators?')) .
101
-            $form->fieldset()->boolean('important', null, __('Make this material important and stack it on top of all news?')) .
102
-            $form->fieldset()->text('createdAt', ['class' => 'form-control datepick'], __('Set the date of creation or leave empty for current date')) .
103
-            $form->fieldset()->select('authorId', ['options' => $model->getUserIdName(), 'optionsKey' => true, 'class' => 'selectize-option'], __('Enter author user_id or leave empty to set current user as author')) .
104
-            $form->fieldset()->text('source', null, __('Set source URL if this content is copied from another website')) .
100
+        return $form->fieldset()->boolean('display', null, __('Can users view this content or only available for administrators?')).
101
+            $form->fieldset()->boolean('important', null, __('Make this material important and stack it on top of all news?')).
102
+            $form->fieldset()->text('createdAt', ['class' => 'form-control datepick'], __('Set the date of creation or leave empty for current date')).
103
+            $form->fieldset()->select('authorId', ['options' => $model->getUserIdName(), 'optionsKey' => true, 'class' => 'selectize-option'], __('Enter author user_id or leave empty to set current user as author')).
104
+            $form->fieldset()->text('source', null, __('Set source URL if this content is copied from another website')).
105 105
             $form->fieldset()->text('addRating', null, __('Add or reduce this content rating. Example: 5 gives +5 to total rating, -5 gives -5 to total'));
106 106
     }]);
107 107
 
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
                 ['text' => $comment->id],
129 129
                 ['text' => Text::snippet(\App::$Security->strip_tags($comment->message), 100)],
130 130
                 ['text' => $comment->getAnswerCount()],
131
-                ['text' => Url::a(['user/update', [$comment->user_id]], ($comment->user->profile->nick ?? 'id' . $comment->user->id)), 'html' => true],
131
+                ['text' => Url::a(['user/update', [$comment->user_id]], ($comment->user->profile->nick ?? 'id'.$comment->user->id)), 'html' => true],
132 132
                 ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm'])
133 133
                     ->add('<i class="fa fa-pencil"></i>', ['comments/read', [$comment->id]], ['html' => true, 'class' => 'btn btn-primary', 'target' => '_blank'])
134 134
                     ->add('<i class="fa fa-trash-o"></i>', ['comments/delete', ['comment', $comment->id]], ['html' => true, 'class' => 'btn btn-danger', 'target' => '_blank'])
135
-                    ->display(),'properties' => ['class' => 'text-center'], 'html' => true
135
+                    ->display(), 'properties' => ['class' => 'text-center'], 'html' => true
136 136
                 ]
137 137
             ]);
138 138
         }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     var DropzoneFiles = [];
239 239
     $('#ffcms-dropzone').dropzone({
240 240
         url: script_url + '/api/content/galleryupload/<?= $model->galleryFreeId ?>?lang=' + script_lang,
241
-        dictDefaultMessage: '<?= __('Drop files here to upload in gallery') . '<br />' . __('(or click here)') ?>',
241
+        dictDefaultMessage: '<?= __('Drop files here to upload in gallery').'<br />'.__('(or click here)') ?>',
242 242
         acceptedFiles: ".jpeg,.jpg,.png,.gif,.webp",
243 243
         addRemoveLinks: true,
244 244
         removedfile: function (file) { // file remove click, lets try to remove file from server & make visual changes
Please login to merge, or discard this patch.