Completed
Push — master ( 25576f...77f108 )
by Jean-Christophe
02:06
created

Admin   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 6 2
A opCacheReset() 0 3 1
1
<?php
2
namespace micro\controllers;
3
4
use micro\cache\CacheManager;
5
use controllers\ControllerBase;
6
use micro\utils\JArray;
7
8
/**
9
 * @route("/admin")
10
 */
11
class Admin extends ControllerBase{
12
	/**
13
	 * @route("/routes")
14
	 */
15
	public function index(){
16
		$routes=CacheManager::getRoutes();
17
		foreach ($routes as $path=>$infosroute){
18
			echo $path."=>".JArray::asPhpArray($infosroute);
19
		}
20
	}
21
22
	/**
23
	 * @route("/reset/cache")
24
	 */
25
	public function opCacheReset(){
26
		\opcache_reset();
27
	}
28
}
29