Passed
Branch master (25273e)
by Mihail
04:42
created
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.
Private/Config/Object.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 date_default_timezone_set('Europe/Moscow');
12 12
 
13 13
 return [
14
-    'Database' => function () {
14
+    'Database' => function() {
15 15
         $capsule = new Capsule;
16 16
         if (env_name !== 'Install') {
17 17
             try {
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 
46 46
         return new Session($storage);
47 47
     },
48
-    'User' => function () {
48
+    'User' => function() {
49 49
         return new Apps\ActiveRecord\User();
50 50
     },
51
-    'Mailer' => function () {
51
+    'Mailer' => function() {
52 52
         $swiftTransport = Swift_MailTransport::newInstance();
53 53
         return Swift_Mailer::newInstance($swiftTransport);
54 54
     },
55
-    'Captcha' => function () {
55
+    'Captcha' => function() {
56 56
         return new Extend\Core\Captcha\Gregwar();
57 57
     },
58
-    'Cache' => function () {
58
+    'Cache' => function() {
59 59
         phpFastCache::setup('path', root . '/Private/Cache');
60 60
         return \phpFastCache();
61 61
     }
Please login to merge, or discard this patch.
Private/Database/Tables/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 Illuminate\Database\Capsule\Manager::schema($connectName)->create('sessions', function($table) {
4
-    $table->string('sess_id', 128)->index()->primary()  ;
4
+    $table->string('sess_id', 128)->index()->primary();
5 5
     $table->binary('sess_data');
6 6
     $table->string('sess_lifetime', 16); // shutout to laravel, if i make it like "integer" it automaticlly add "primary" key for it, hate this!!!
7 7
     $table->string('sess_time', 16);
Please login to merge, or discard this patch.
Apps/View/Front/default/content/read.php 3 patches
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,17 +67,23 @@
 block discarded – undo
67 67
         <?php if ($properties['author'] === true): ?>
68 68
             <?php if ($model->authorId !== null && $model->authorId > 0): ?>
69 69
                 <span><i class="fa fa-user"></i><?= Url::link(['profile/show', $model->authorId], $model->authorName, ['itemprop' => 'author']) ?></span>
70
-            <?php else: ?>
70
+            <?php else {
71
+    : ?>
71 72
                 <span><i class="fa fa-user"></i><s><?= $model->authorName ?></s></span>
72
-            <?php endif; ?>
73
+            <?php endif;
74
+}
75
+?>
73 76
         <?php endif; ?>
74 77
         <?php if ($properties['views'] === true): ?>
75 78
         <span><i class="fa fa-eye"></i><?= $model->views ?></span>
76 79
         <?php endif ?>
77 80
     </div>
78
-    <?php else: ?>
81
+    <?php else {
82
+    : ?>
79 83
     <hr />
80
-    <?php endif; ?>
84
+    <?php endif;
85
+}
86
+?>
81 87
     <?php if ($trash): ?>
82 88
     <p class="alert alert-danger"><i class="fa fa-trash-o"></i> <?= __('This content is placed in trash') ?></p>
83 89
     <?php endif; ?>
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -159,12 +159,12 @@
 block discarded – undo
159 159
     	<div class="col-md-12">
160 160
     		<div class="pull-left">
161 161
         	<?php if ($properties['rating']) {
162
-        	    echo \App::$View->render('content/_rate', [
163
-        	        'id' => $model->id,
164
-        	        'rating' => $model->rating,
165
-        	        'canRate' => $model->canRate
166
-        	    ]);
167
-        	} ?>
162
+                echo \App::$View->render('content/_rate', [
163
+                    'id' => $model->id,
164
+                    'rating' => $model->rating,
165
+                    'canRate' => $model->canRate
166
+                ]);
167
+            } ?>
168 168
         	<?= \App::$View->render('content/_rateJs') ?>
169 169
     		</div>
170 170
     		<div class="pull-right">
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 }
43 43
 
44 44
 $properties = [
45
-    'date' => (int)$model->getCategory()->getProperty('showDate') === 1,
46
-    'author' => (int)$model->getCategory()->getProperty('showAuthor') === 1,
47
-    'views' => (int)$model->getCategory()->getProperty('showViews') === 1,
48
-    'category' => (int)$model->getCategory()->getProperty('showCategory') === 1,
49
-    'rating' => (int)$model->getCategory()->getProperty('showRating') === 1
45
+    'date' => (int) $model->getCategory()->getProperty('showDate') === 1,
46
+    'author' => (int) $model->getCategory()->getProperty('showAuthor') === 1,
47
+    'views' => (int) $model->getCategory()->getProperty('showViews') === 1,
48
+    'category' => (int) $model->getCategory()->getProperty('showCategory') === 1,
49
+    'rating' => (int) $model->getCategory()->getProperty('showRating') === 1
50 50
 ];
51
-$showComments = (int)$model->getCategory()->getProperty('showComments') === 1;
52
-$showPoster = (int)$model->getCategory()->getProperty('showPoster') === 1;
51
+$showComments = (int) $model->getCategory()->getProperty('showComments') === 1;
52
+$showPoster = (int) $model->getCategory()->getProperty('showPoster') === 1;
53 53
 
54 54
 \App::$Cache->set('test.me.baby.1', ['key' => 'value']);
55 55
 ?>
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                     </div>
105 105
                 </div>
106 106
             </div>
107
-        <?php endif ;?>
107
+        <?php endif; ?>
108 108
         <?= $model->text ?>
109 109
     </div>
110 110
     <?php if ($model->galleryItems !== null && Obj::isArray($model->galleryItems)): ?>
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         	<?= \App::$View->render('content/_rateJs') ?>
169 169
     		</div>
170 170
     		<div class="pull-right">
171
-    		    <?php if ((int)$configs['keywordsAsTags'] === 1): ?>
171
+    		    <?php if ((int) $configs['keywordsAsTags'] === 1): ?>
172 172
                 <div id="content-tags">
173 173
                     <?php
174 174
                     if (Obj::isArray($model->metaKeywords) && count($model->metaKeywords) > 0 && Str::length($model->metaKeywords[0]) > 0) {
Please login to merge, or discard this patch.
Widgets/Basic/LanguageSwitcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         foreach (App::$Translate->getAvailableLangs() as $lang) {
27 27
             $items[] = [
28 28
                 'type' => 'text',
29
-                'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-'.$lang.'" />',
29
+                'text' => '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="flag flag-' . $lang . '" />',
30 30
                 'html' => true,
31 31
                 '!secure' => true
32 32
             ];
Please login to merge, or discard this patch.
Apps/View/Admin/default/application/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     $route = $app->sys_name . '/index';
30 30
     $icoStatus = null;
31 31
     $actions = \App::$View->render('macro/app_actions', ['controller' => $app->sys_name]);
32
-    if ((int)$app->disabled !== 0) {
32
+    if ((int) $app->disabled !== 0) {
33 33
         $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>';
34 34
     } elseif ($app->checkVersion() !== true) {
35 35
         $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>';
Please login to merge, or discard this patch.
Apps/Model/Admin/Application/FormInstall.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-    * Validation rules
37
-    */
36
+     * Validation rules
37
+     */
38 38
     public function rules()
39 39
     {
40 40
         return [
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function before()
40 40
     {
41 41
         foreach ($this->_apps as $app) {
42
-            $this->_definedControllers[] = (string)$app->sys_name;
42
+            $this->_definedControllers[] = (string) $app->sys_name;
43 43
         }
44 44
 
45 45
         parent::before();
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         // get ext version
80
-        $cVersion = (float)constant($cPath . '::VERSION');
80
+        $cVersion = (float) constant($cPath . '::VERSION');
81 81
         if ($cVersion < 0.1) {
82 82
             $cVersion = 0.1;
83 83
         }
Please login to merge, or discard this patch.
Extend/Core/Arch/AdminController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
     /**
124 124
      * Get current extension active record
125 125
      * @param string|null $type
126
-     * @return mixed
126
+     * @return AppRecord
127 127
      */
128 128
     public function getTypeItem($type = null)
129 129
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
      */
145 145
     public function getConfigs()
146 146
     {
147
-        return $this->type === 'widget' ? (array)Serialize::decode($this->widget->configs) : (array)Serialize::decode($this->application->configs);
147
+        return $this->type === 'widget' ? (array) Serialize::decode($this->widget->configs) : (array) Serialize::decode($this->application->configs);
148 148
     }
149 149
 
150 150
     /**
Please login to merge, or discard this patch.
Apps/View/Front/default/profile/unblock.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Ffcms\Core\Helper\Date;
4 3
 use Ffcms\Core\Helper\HTML\Form;
5 4
 use Ffcms\Core\Helper\Type\Str;
6 5
 use Ffcms\Core\Helper\Url;
Please login to merge, or discard this patch.