Passed
Push — master ( 3a195a...0456bd )
by Mihail
06:35
created
Widgets/Front/Newcontent/Newcontent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
 
34 34
         // check cache is defined
35 35
         if (!$this->cache || !Any::isInt($this->cache)) {
36
-            $this->cache = (int)$cfg['cache'];
36
+            $this->cache = (int) $cfg['cache'];
37 37
         }
38 38
 
39 39
         // check item count is defined
40
-        if (!$this->count|| !Any::isInt($this->count)) {
41
-            $this->count = (int)$cfg['count'];
40
+        if (!$this->count || !Any::isInt($this->count)) {
41
+            $this->count = (int) $cfg['count'];
42 42
         }
43 43
 
44
-        $this->_cacheName = 'widget.newcontent.' . $this->createStringClassSnapshotHash();
44
+        $this->_cacheName = 'widget.newcontent.'.$this->createStringClassSnapshotHash();
45 45
     }
46 46
 
47 47
     /**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             // try get query result from cache
59 59
             $cache = App::$Cache->getItem($this->_cacheName);
60 60
             if (!$cache->isHit()) {
61
-                $cache->set($this->makeQuery())->expiresAfter((int)$this->cache);
61
+                $cache->set($this->makeQuery())->expiresAfter((int) $this->cache);
62 62
                 App::$Cache->save($cache);
63 63
             }
64 64
 
Please login to merge, or discard this patch.
Widgets/Front/Contenttag/Contenttag.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $cfg = $this->getConfigs();
35 35
         // check cache is defined
36
-        if (!$this->cache|| !Any::isInt($this->cache)) {
37
-            $this->cache = (int)$cfg['cache'];
36
+        if (!$this->cache || !Any::isInt($this->cache)) {
37
+            $this->cache = (int) $cfg['cache'];
38 38
         }
39 39
 
40 40
         // check tag count is defined
41 41
         if (!$this->count || !Any::isInt($this->count)) {
42
-            $this->count = (int)$cfg['count'];
42
+            $this->count = (int) $cfg['count'];
43 43
         }
44 44
 
45 45
         $this->_lang = App::$Request->getLanguage();
46
-        $this->_cacheName = 'widget.contenttag.' . $this->createStringClassSnapshotHash();
46
+        $this->_cacheName = 'widget.contenttag.'.$this->createStringClassSnapshotHash();
47 47
     }
48 48
 
49 49
     /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         } else {
61 61
             $cache = App::$Cache->getItem($this->_cacheName);
62 62
             if (!$cache->isHit()) {
63
-                $cache->set($this->makeQuery())->expiresAfter((int)$this->cache);
63
+                $cache->set($this->makeQuery())->expiresAfter((int) $this->cache);
64 64
                 App::$Cache->save($cache);
65 65
             }
66 66
             $records = $cache->get();
Please login to merge, or discard this patch.
Extend/Core/Arch/AdminController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
         $user = App::$User->identity();
93 93
         // user is not authed ?
94 94
         if (!$user || !App::$User->isAuth()) {
95
-            $redirectUrl = App::$Alias->scriptUrl . '/user/login';
95
+            $redirectUrl = App::$Alias->scriptUrl.'/user/login';
96 96
             App::$Response->redirect($redirectUrl, true);
97 97
             exit();
98 98
         }
99 99
 
100
-        $permission = env_name . '/' . App::$Request->getController() . '/' . App::$Request->getAction();
100
+        $permission = env_name.'/'.App::$Request->getController().'/'.App::$Request->getAction();
101 101
         // doesn't have permission? get the f*ck out
102 102
         if (!$user->role->can($permission)) {
103 103
             throw new ForbiddenException(__('You got no access rights to this page'));
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function getConfigs(): ?array
149 149
     {
150
-        $configs = $this->type === 'widget' ? (array)$this->widget->configs : (array)$this->application->configs;
150
+        $configs = $this->type === 'widget' ? (array) $this->widget->configs : (array) $this->application->configs;
151 151
         foreach ($configs as $cfg => $value) {
152 152
             if (Any::isInt($value)) {
153 153
                 $configs[$cfg] = $value;
Please login to merge, or discard this patch.
Apps/Controller/Admin/Main/ActionDeleteRoute.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
      */
26 26
     public function deleteRoute(): ?string
27 27
     {
28
-        $type = (string)$this->request->query->get('type');
29
-        $loader = (string)$this->request->query->get('loader');
30
-        $source = Str::lowerCase((string)$this->request->query->get('path'));
28
+        $type = (string) $this->request->query->get('type');
29
+        $loader = (string) $this->request->query->get('loader');
30
+        $source = Str::lowerCase((string) $this->request->query->get('path'));
31 31
 
32 32
         $model = new EntityDeleteRoute($type, $loader, $source);
33 33
         if ($model->send() && $model->validate()) {
Please login to merge, or discard this patch.
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.