Completed
Push — master ( 83dd26...e508a1 )
by Nazar
04:18
created

optimization   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A optimization_clean_cache() 0 4 1
A optimization_clean_pcache() 0 4 1
1
<?php
2
/**
3
 * @package    CleverStyle CMS
4
 * @subpackage System module
5
 * @category   modules
6
 * @author     Nazar Mokrynskyi <[email protected]>
7
 * @copyright  Copyright (c) 2016, Nazar Mokrynskyi
8
 * @license    MIT License, see license.txt
9
 */
10
namespace cs\modules\System\cli\Controller;
11
use
12
	cs\modules\System\api\Controller as Api_controller;
13
use function
14
	cli\line;
15
16
trait optimization {
17
	/**
18
	 * Clean cache
19
	 *
20
	 * @param \cs\Request $Request
21
	 *
22
	 * @throws \cs\ExitException
23
	 */
24
	static function optimization_clean_cache ($Request) {
25
		Api_controller::admin_optimization_clean_cache($Request);
26
		line('%gOK%n');
27
	}
28
	/**
29
	 * Clean public cache (CSS/JS/HTML)
30
	 *
31
	 * @throws \cs\ExitException
32
	 */
33
	static function optimization_clean_pcache () {
34
		Api_controller::admin_optimization_clean_pcache();
35
		line('%gOK%n');
36
	}
37
}
38