Passed
Push — master ( f52af3...89df9c )
by Mihail
05:09
created
Widgets/Front/Contenttag/Contenttag.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -10,18 +10,18 @@  discard block
 block discarded – undo
10 10
 
11 11
 class Contenttag extends AbstractWidget
12 12
 {
13
-	use ClassTools;
13
+    use ClassTools;
14 14
 
15
-	public $count;
16
-	public $cache;
15
+    public $count;
16
+    public $cache;
17 17
 
18
-	public $tpl = 'widgets/contenttag/default';
18
+    public $tpl = 'widgets/contenttag/default';
19 19
 
20
-	/**
21
-	 * Set default configurations if not defined
22
-	 * {@inheritDoc}
23
-	 * @see \Ffcms\Core\Arch\Widget::init()
24
-	 */
20
+    /**
21
+     * Set default configurations if not defined
22
+     * {@inheritDoc}
23
+     * @see \Ffcms\Core\Arch\Widget::init()
24
+     */
25 25
     public function init()
26 26
     {
27 27
         $cfg = $this->getConfigs();
@@ -43,29 +43,29 @@  discard block
 block discarded – undo
43 43
     public function display()
44 44
     {
45 45
         // get special properties hash
46
-    	$classHash = $this->createStringClassSnapshotHash();
46
+        $classHash = $this->createStringClassSnapshotHash();
47 47
 
48
-    	// get records rows from cache or directly from db
49
-    	$records = null;
50
-    	if ($this->cache === 0) {
51
-    	    $records = $this->makeQuery();
52
-    	} else {
53
-    	    $records = App::$Cache->get('widget.contenttag.' . $classHash);
54
-    	    if ($records === null) {
55
-    	        $records = $this->makeQuery();
56
-    	        App::$Cache->set('widget.contenttag' . $classHash, $records, $this->cache);
57
-    	    }
58
-    	}
48
+        // get records rows from cache or directly from db
49
+        $records = null;
50
+        if ($this->cache === 0) {
51
+            $records = $this->makeQuery();
52
+        } else {
53
+            $records = App::$Cache->get('widget.contenttag.' . $classHash);
54
+            if ($records === null) {
55
+                $records = $this->makeQuery();
56
+                App::$Cache->set('widget.contenttag' . $classHash, $records, $this->cache);
57
+            }
58
+        }
59 59
 
60
-    	// check if result is not empty
60
+        // check if result is not empty
61 61
         if ($records === null || $records->count() < 1) {
62 62
             return __('Content tags is not found');
63 63
         }
64 64
 
65 65
         // render view
66
-    	return App::$View->render($this->tpl, [
67
-    	    'records' => $records
68
-    	]);
66
+        return App::$View->render($this->tpl, [
67
+            'records' => $records
68
+        ]);
69 69
     }
70 70
 
71 71
     /**
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
     private function makeQuery()
76 76
     {
77 77
         return TagRecord::select([
78
-    	    App::$Database->getConnection()->raw('SQL_CALC_FOUND_ROWS tag'),
79
-    	    App::$Database->getConnection()->raw('COUNT(*) AS count')
80
-    	])->groupBy('tag')
81
-        	->orderBy('count', 'DESC')
82
-        	->take($this->count)
83
-        	->get();
78
+            App::$Database->getConnection()->raw('SQL_CALC_FOUND_ROWS tag'),
79
+            App::$Database->getConnection()->raw('COUNT(*) AS count')
80
+        ])->groupBy('tag')
81
+            ->orderBy('count', 'DESC')
82
+            ->take($this->count)
83
+            ->get();
84 84
     }
85 85
 }
86 86
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Admin/Main/FormSettings.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
     public $trustedProxy;
43 43
 
44 44
     /**
45
-    * Set property values from configurations
46
-    */
45
+     * Set property values from configurations
46
+     */
47 47
     public function before()
48 48
     {
49 49
         // set default values
Please login to merge, or discard this patch.
Private/Config/Default.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@
 block discarded – undo
1 1
 <?php return [
2
-	'baseProto' => 'http',
3
-	'baseDomain' => 'ffcms.app',
4
-	'basePath' => '/',
5
-	'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$',
6
-	'timezone' => 'Europe/Moscow',
7
-	'debug' => [
8
-		'all' => false,
9
-		'cookie' => [
10
-			'key' => 'fdebug_jepP2',
11
-			'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA'
12
-		]
13
-	],
14
-	'theme' => [
15
-		'Front' => 'default',
16
-		'Admin' => 'default'
17
-	],
18
-	'database' => [
19
-		'driver' => 'mysql',
20
-		'host' => '127.0.0.1',
21
-		'username' => 'mysql',
22
-		'password' => 'mysql',
23
-		'database' => 'ffcms',
24
-		'prefix' => 'ffcms_',
25
-		'charset' => 'utf8',
26
-		'collation' => 'utf8_unicode_ci'
27
-	],
28
-	'adminEmail' => '[email protected]',
29
-	'baseLanguage' => 'en',
30
-	'multiLanguage' => true,
31
-	'singleLanguage' => 'en',
32
-	'languages' => [
33
-		'en',
34
-		'ru'
35
-	],
36
-	'languageDomainAlias' => false,
37
-	'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com',
38
-	'gaTrackId' => false,
39
-	'trustedProxy' => false
2
+    'baseProto' => 'http',
3
+    'baseDomain' => 'ffcms.app',
4
+    'basePath' => '/',
5
+    'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$',
6
+    'timezone' => 'Europe/Moscow',
7
+    'debug' => [
8
+        'all' => false,
9
+        'cookie' => [
10
+            'key' => 'fdebug_jepP2',
11
+            'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA'
12
+        ]
13
+    ],
14
+    'theme' => [
15
+        'Front' => 'default',
16
+        'Admin' => 'default'
17
+    ],
18
+    'database' => [
19
+        'driver' => 'mysql',
20
+        'host' => '127.0.0.1',
21
+        'username' => 'mysql',
22
+        'password' => 'mysql',
23
+        'database' => 'ffcms',
24
+        'prefix' => 'ffcms_',
25
+        'charset' => 'utf8',
26
+        'collation' => 'utf8_unicode_ci'
27
+    ],
28
+    'adminEmail' => '[email protected]',
29
+    'baseLanguage' => 'en',
30
+    'multiLanguage' => true,
31
+    'singleLanguage' => 'en',
32
+    'languages' => [
33
+        'en',
34
+        'ru'
35
+    ],
36
+    'languageDomainAlias' => false,
37
+    'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com',
38
+    'gaTrackId' => false,
39
+    'trustedProxy' => false
40 40
 ];
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
Private/Config/Cron.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php return [
2
-	'instances' => [
3
-		'Apps\Controller\Front\Content::buildSitemapSchedule' => 10800,
4
-		'Apps\Controller\Front\Profile::buildSitemapSchedule' => 10800
5
-	]
2
+    'instances' => [
3
+        'Apps\Controller\Front\Content::buildSitemapSchedule' => 10800,
4
+        'Apps\Controller\Front\Profile::buildSitemapSchedule' => 10800
5
+    ]
6 6
 ];
7 7
\ No newline at end of file
Please login to merge, or discard this patch.