Passed
Push — master ( 7d2b7a...0ea348 )
by Jean-Christophe
02:57
created

Display::semanticMenu()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 2
dl 0
loc 8
ccs 7
cts 7
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ubiquity\core\postinstall;
4
5
use Ubiquity\core\Framework;
6
7
class Display {
8
9 1
	public static function semanticMenu($id, $semantic) {
10 1
		$menu=$semantic->htmlMenu($id, [ "Ubiquity website","Guide","Doc API","GitHub" ]);
11 1
		$menu->asLinks([ "https://ubiquity.kobject.net","https://micro-framework.readthedocs.io/en/latest/?badge=latest","https://api.kobject.net/ubiquity/","https://github.com/phpMv/ubiquity" ], 'new');
12 1
		$menu->setSecondary();
13 1
		if (Framework::hasAdmin()) {
14 1
			$menu->addItem(new \Ajax\semantic\html\elements\html5\HtmlLink("", "Admin", "UbiquityMyAdmin", "admin"));
15
		}
16 1
		return $menu;
17
	}
18
}
19
20