Passed
Push — master ( d2190f...e6812d )
by Mihail
05:34
created
Private/Config/Permissions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3
-return array (
3
+return array(
4 4
   0 => 'global/write',
5 5
   1 => 'global/modify',
6 6
   2 => 'global/file',
Please login to merge, or discard this patch.
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,69 +1,69 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return array (
4
-  0 => 'global/write',
5
-  1 => 'global/modify',
6
-  2 => 'global/file',
7
-  3 => 'global/all',
8
-  4 => 'Admin/Application/Index',
9
-  5 => 'Admin/Application/Install',
10
-  6 => 'Admin/Application/Update',
11
-  7 => 'Admin/Application/Turn',
12
-  8 => 'Admin/Comments/Index',
13
-  9 => 'Admin/Comments/Read',
14
-  10 => 'Admin/Comments/Edit',
15
-  11 => 'Admin/Comments/Delete',
16
-  12 => 'Admin/Comments/Publish',
17
-  13 => 'Admin/Comments/Answerlist',
18
-  14 => 'Admin/Comments/Settings',
19
-  15 => 'Admin/Content/Index',
20
-  16 => 'Admin/Content/Update',
21
-  17 => 'Admin/Content/Delete',
22
-  18 => 'Admin/Content/Restore',
23
-  19 => 'Admin/Content/Clear',
24
-  20 => 'Admin/Content/Categories',
25
-  21 => 'Admin/Content/Categorydelete',
26
-  22 => 'Admin/Content/Categoryupdate',
27
-  23 => 'Admin/Content/Globdelete',
28
-  24 => 'Admin/Content/Publish',
29
-  25 => 'Admin/Content/Settings',
30
-  26 => 'Admin/Contenttag/Index',
31
-  27 => 'Admin/Feedback/Index',
32
-  28 => 'Admin/Feedback/Read',
33
-  29 => 'Admin/Feedback/Update',
34
-  30 => 'Admin/Feedback/Turn',
35
-  31 => 'Admin/Feedback/Delete',
36
-  32 => 'Admin/Feedback/Settings',
37
-  33 => 'Admin/Main/Index',
38
-  34 => 'Admin/Main/Settings',
39
-  35 => 'Admin/Main/Files',
40
-  36 => 'Admin/Main/Antivirus',
41
-  37 => 'Admin/Main/Debugcookie',
42
-  38 => 'Admin/Main/Routing',
43
-  39 => 'Admin/Main/Addroute',
44
-  40 => 'Admin/Main/Deleteroute',
45
-  41 => 'Admin/Main/Cache',
46
-  42 => 'Admin/Main/Sessions',
47
-  43 => 'Admin/Newcomment/Index',
48
-  44 => 'Admin/Newcontent/Index',
49
-  45 => 'Admin/Profile/Index',
50
-  46 => 'Admin/Profile/Delete',
51
-  47 => 'Admin/Profile/Update',
52
-  48 => 'Admin/Profile/Fieldlist',
53
-  49 => 'Admin/Profile/Fieldupdate',
54
-  50 => 'Admin/Profile/Fielddelete',
55
-  51 => 'Admin/Profile/Settings',
56
-  52 => 'Admin/Search/Index',
57
-  53 => 'Admin/Sitemap/Index',
58
-  54 => 'Admin/User/Index',
59
-  55 => 'Admin/User/Update',
60
-  56 => 'Admin/User/Delete',
61
-  57 => 'Admin/User/Grouplist',
62
-  58 => 'Admin/User/GroupUpdate',
63
-  59 => 'Admin/User/Settings',
64
-  60 => 'Admin/User/Invite',
65
-  61 => 'Admin/Widget/Index',
66
-  62 => 'Admin/Widget/Install',
67
-  63 => 'Admin/Widget/Update',
68
-  64 => 'Admin/Widget/Turn',
4
+    0 => 'global/write',
5
+    1 => 'global/modify',
6
+    2 => 'global/file',
7
+    3 => 'global/all',
8
+    4 => 'Admin/Application/Index',
9
+    5 => 'Admin/Application/Install',
10
+    6 => 'Admin/Application/Update',
11
+    7 => 'Admin/Application/Turn',
12
+    8 => 'Admin/Comments/Index',
13
+    9 => 'Admin/Comments/Read',
14
+    10 => 'Admin/Comments/Edit',
15
+    11 => 'Admin/Comments/Delete',
16
+    12 => 'Admin/Comments/Publish',
17
+    13 => 'Admin/Comments/Answerlist',
18
+    14 => 'Admin/Comments/Settings',
19
+    15 => 'Admin/Content/Index',
20
+    16 => 'Admin/Content/Update',
21
+    17 => 'Admin/Content/Delete',
22
+    18 => 'Admin/Content/Restore',
23
+    19 => 'Admin/Content/Clear',
24
+    20 => 'Admin/Content/Categories',
25
+    21 => 'Admin/Content/Categorydelete',
26
+    22 => 'Admin/Content/Categoryupdate',
27
+    23 => 'Admin/Content/Globdelete',
28
+    24 => 'Admin/Content/Publish',
29
+    25 => 'Admin/Content/Settings',
30
+    26 => 'Admin/Contenttag/Index',
31
+    27 => 'Admin/Feedback/Index',
32
+    28 => 'Admin/Feedback/Read',
33
+    29 => 'Admin/Feedback/Update',
34
+    30 => 'Admin/Feedback/Turn',
35
+    31 => 'Admin/Feedback/Delete',
36
+    32 => 'Admin/Feedback/Settings',
37
+    33 => 'Admin/Main/Index',
38
+    34 => 'Admin/Main/Settings',
39
+    35 => 'Admin/Main/Files',
40
+    36 => 'Admin/Main/Antivirus',
41
+    37 => 'Admin/Main/Debugcookie',
42
+    38 => 'Admin/Main/Routing',
43
+    39 => 'Admin/Main/Addroute',
44
+    40 => 'Admin/Main/Deleteroute',
45
+    41 => 'Admin/Main/Cache',
46
+    42 => 'Admin/Main/Sessions',
47
+    43 => 'Admin/Newcomment/Index',
48
+    44 => 'Admin/Newcontent/Index',
49
+    45 => 'Admin/Profile/Index',
50
+    46 => 'Admin/Profile/Delete',
51
+    47 => 'Admin/Profile/Update',
52
+    48 => 'Admin/Profile/Fieldlist',
53
+    49 => 'Admin/Profile/Fieldupdate',
54
+    50 => 'Admin/Profile/Fielddelete',
55
+    51 => 'Admin/Profile/Settings',
56
+    52 => 'Admin/Search/Index',
57
+    53 => 'Admin/Sitemap/Index',
58
+    54 => 'Admin/User/Index',
59
+    55 => 'Admin/User/Update',
60
+    56 => 'Admin/User/Delete',
61
+    57 => 'Admin/User/Grouplist',
62
+    58 => 'Admin/User/GroupUpdate',
63
+    59 => 'Admin/User/Settings',
64
+    60 => 'Admin/User/Invite',
65
+    61 => 'Admin/Widget/Index',
66
+    62 => 'Admin/Widget/Install',
67
+    63 => 'Admin/Widget/Update',
68
+    64 => 'Admin/Widget/Turn',
69 69
 );
70 70
\ No newline at end of file
Please login to merge, or discard this patch.
Widgets/Front/Test/Widget.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 
15 15
     public function init()
16 16
     {
17
-        if ($this->message === null)
18
-            $this->message = 'Hello, world';
17
+        if ($this->message === null) {
18
+                    $this->message = 'Hello, world';
19
+        }
19 20
     }
20 21
 
21 22
     public function display()
Please login to merge, or discard this patch.
Apps/Model/Admin/Content/FormCategoryUpdate.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Ffcms\Core\App;
6 6
 use Ffcms\Core\Arch\Model;
7
-use Ffcms\Core\Helper\Type\Obj;
8 7
 use Ffcms\Core\Helper\Type\Str;
9 8
 use Ffcms\Core\Interfaces\iUser;
10 9
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         ];
108 108
 
109 109
         // general category
110
-        if ($this->_new === false && (int)$this->_record->id === 1) {
110
+        if ($this->_new === false && (int) $this->_record->id === 1) {
111 111
             $rules[] = ['path', 'used'];
112 112
         } else {
113 113
             $rules[] = ['path', 'required'];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $rules[] = ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'];
117 117
         }
118 118
 
119
-        $rules[] = ['title.' . App::$Request->getLanguage(), 'required'];
119
+        $rules[] = ['title.'.App::$Request->getLanguage(), 'required'];
120 120
 
121 121
 
122 122
         return $rules;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $this->_record->title = Serialize::encode(App::$Security->strip_tags($this->title));
131 131
         $this->_record->description = Serialize::encode(App::$Security->strip_tags($this->description));
132
-        $savePath = trim($this->_pathNested . '/' . $this->path, '/');
132
+        $savePath = trim($this->_pathNested.'/'.$this->path, '/');
133 133
         $this->_record->path = $savePath;
134 134
         $this->_record->configs = Serialize::encode($this->configs);
135 135
         $this->_record->save();
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         // build path with owner category
165 165
         $this->_pathNested = $owner->path;
166 166
         if (Str::length($this->_pathNested) > 0) {
167
-            $path = $this->_pathNested . '/' . $path;
167
+            $path = $this->_pathNested.'/'.$path;
168 168
         }
169 169
 
170 170
         // make select for check
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/profile/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Front/default/content/list.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,8 @@  discard block
 block discarded – undo
59 59
                 </a>
60 60
             </div>
61 61
         </div>
62
-        <?php else: ?>
62
+        <?php else {
63
+    : ?>
63 64
         <div class="row">
64 65
             <div class="col-md-8" style="padding-right: 0;">
65 66
                 <a href="javascript:void(0);" class="btn btn-block <?= $rateClass ?>">
@@ -76,7 +77,9 @@  discard block
 block discarded – undo
76 77
                 <a href="javascript:void(0);" class="btn btn-block btn-danger" id="reduceRating">-</a>
77 78
             </div>
78 79
         </div>
79
-        <?php endif; ?>
80
+        <?php endif;
81
+}
82
+?>
80 83
         <?php endif; ?>
81 84
         <?php
82 85
         $userMenu = null;
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -100,12 +100,12 @@
 block discarded – undo
100 100
         </div>
101 101
         <div class="meta">
102 102
         	<?php if ((int)$catConfigs['showRating'] === 1) {
103
-        	    echo \App::$View->render('content/_rate', [
104
-        	        'id' => $item['id'],
105
-        	        'canRate' => $item['canRate'],
106
-        	        'rating' => $item['rating']
107
-        	    ]);
108
-        	} ?>
103
+                echo \App::$View->render('content/_rate', [
104
+                    'id' => $item['id'],
105
+                    'canRate' => $item['canRate'],
106
+                    'rating' => $item['rating']
107
+                ]);
108
+            } ?>
109 109
         	
110 110
         	<span class="spaced hidden-xs"><i class="fa fa-comments"></i>
111 111
                 <a href="#"><?= __('Comments') ?>: <span itemprop="commentCount">0</span></a>
Please login to merge, or discard this 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)$catConfigs['showTags'] === 1 && $item['tags'] !== null && Obj::isArray($item['tags'])): ?>
135
+            <?php if ((int) $catConfigs['showTags'] === 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.
Apps/Model/Install/Main/FormInstall.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Apps\ActiveRecord\Profile;
6 6
 use Apps\ActiveRecord\User;
7
-use Apps\Controller\Console\Db;
8 7
 use Ffcms\Core\App;
9 8
 use Ffcms\Core\Arch\Model;
10 9
 use Ffcms\Core\Helper\FileSystem\File;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,14 +71,14 @@
 block discarded – undo
71 71
         $cfg['database'] = $this->db;
72 72
         $cfg['adminEmail'] = $this->email;
73 73
         $cfg['singleLanguage'] = $this->singleLanguage;
74
-        $cfg['multiLanguage'] = (bool)$this->multiLanguage;
75
-        $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$';
76
-        $cfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(4, 16));
74
+        $cfg['multiLanguage'] = (bool) $this->multiLanguage;
75
+        $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$';
76
+        $cfg['debug']['cookie']['key'] = 'fdebug_'.Str::randomLatinNumeric(mt_rand(4, 16));
77 77
         $cfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128));
78 78
 
79 79
         // import database tables
80 80
         $connectName = 'install';
81
-        include(root . '/Private/Database/install.php');
81
+        include(root.'/Private/Database/install.php');
82 82
 
83 83
         // insert admin user
84 84
         $user = new User();
Please login to merge, or discard this patch.
Apps/Model/Install/Main/EntityCheck.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
     public $chmodCheck = [];
21 21
 
22 22
     /**
23
-    * Get default server information and prepare chmod info
24
-    */
23
+     * Get default server information and prepare chmod info
24
+     */
25 25
     public function before()
26 26
     {
27 27
         $this->phpVersion = phpversion();
Please login to merge, or discard this patch.
Apps/View/Install/default/main/index.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 ]);
55 55
 ?>
56 56
 
57
-<?php if($model->checkAll()): ?>
57
+<?php if ($model->checkAll()): ?>
58 58
     <?= \Ffcms\Core\Helper\Url::link('main/install', __('Start install'), ['class' => 'btn btn-success btn-block']) ?>
59 59
 <?php else: ?>
60 60
     <?= \Ffcms\Core\Helper\Url::link('main/index', __('Check again'), ['class' => 'btn btn-warning btn-block']) ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,10 @@
 block discarded – undo
56 56
 
57 57
 <?php if($model->checkAll()): ?>
58 58
     <?= \Ffcms\Core\Helper\Url::link('main/install', __('Start install'), ['class' => 'btn btn-success btn-block']) ?>
59
-<?php else: ?>
59
+<?php else {
60
+    : ?>
60 61
     <?= \Ffcms\Core\Helper\Url::link('main/index', __('Check again'), ['class' => 'btn btn-warning btn-block']) ?>
61
-<?php endif; ?>
62
+<?php endif;
63
+}
64
+?>
62 65
 
Please login to merge, or discard this patch.