ArchiveMetaManager::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GeminiLabs\Pollux\MetaBox;
4
5
use GeminiLabs\Pollux\MetaBox\SiteMetaManager;
6
use GeminiLabs\Pollux\PostType\Archive;
7
8
/**
9
 * ArchiveMeta::all();
10
 * ArchiveMeta::group();
11
 * ArchiveMeta::group('option','fallback');
12
 * ArchiveMeta::get('group');
13
 * ArchiveMeta::get('group','option','fallback');
14
 */
15
class ArchiveMetaManager extends SiteMetaManager
16
{
17
	public function __construct()
18
	{
19
		$this->options = get_option( Archive::id(), [] );
20
	}
21
22
	/**
23
	 * @return string
24
	 */
25
	protected function getDefaultGroup()
26
	{
27
		return get_post_type();
28
	}
29
}
30