categories   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 41
c 2
b 0
f 0
dl 0
loc 60
ccs 53
cts 53
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 53 1
1
<?php
2
declare(strict_types = 1);
3
namespace hexydec\agentzero;
4
5
class categories {
6
7
	/**
8
	 * Generates a configuration array for matching categories
9
	 * 
10
	 * @return array<string,props> An array with keys representing the string to match, and values a props object defining how to generate the match and which properties to set
11
	 */
12 1
	public static function get() : array {
13 1
		return [
14 1
			'VR' => new props('exact', [
15 1
				'type' => 'human',
16 1
				'category' => 'vr'
17 1
			]),
18 1
			'Mobile' => new props('exact', [
19 1
				'type' => 'human',
20 1
				'category' => 'mobile'
21 1
			]),
22 1
			'Phone' => new props('any', [
23 1
				'type' => 'human',
24 1
				'category' => 'mobile'
25 1
			]),
26 1
			'PDA' => new props('exact', [
27 1
				'type' => 'human',
28 1
				'category' => 'mobile'
29 1
			]),
30 1
			'Tablet' => new props('exact', [
31 1
				'type' => 'human',
32 1
				'category' => 'tablet'
33 1
			]),
34 1
			'TAB ' => new props('start', [
35 1
				'type' => 'human',
36 1
				'category' => 'tablet'
37 1
			]),
38 1
			'TAB_' => new props('start', [
39 1
				'type' => 'human',
40 1
				'category' => 'tablet'
41 1
			]),
42 1
			'Large Screen' => new props('exact', [
43 1
				'type' => 'human',
44 1
				'category' => 'tv'
45 1
			]),
46 1
			'TV' => new props('exact', [
47 1
				'type' => 'human',
48 1
				'category' => 'tv'
49 1
			]),
50 1
			'Smart TV' => new props('exact', [
51 1
				'type' => 'human',
52 1
				'category' => 'tv'
53 1
			]),
54 1
			'SmartTV' => new props('exact', [
55 1
				'type' => 'human',
56 1
				'category' => 'tv'
57 1
			]),
58 1
			'SMART-TV' => new props('exact', [
59 1
				'type' => 'human',
60 1
				'category' => 'tv'
61 1
			]),
62 1
			'DTV' => new props('exact', [
63 1
				'type' => 'human',
64 1
				'category' => 'tv'
65 1
			])
66 1
		];
67
	}
68
}