Passed
Push — develop ( 37b65a...9b346b )
by Paul
03:39
created

ArchiveMetaManager::getOption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
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::post();
11
 * ArchiveMeta::post('title','fallback');
12
 * ArchiveMeta::get('title');
13
 * ArchiveMeta::get('title','fallback','post');
14
 */
15
class ArchiveMetaManager extends SiteMetaManager
16
{
17
	public function __construct()
18
	{
19
		$this->options = get_option( Archive::id(), [] );
20
	}
21
22
	/**
23
	 * @param string|null $key
24
	 * @param mixed $fallback
25
	 * @param string $type
0 ignored issues
show
Bug introduced by
There is no parameter named $type. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
26
	 * @return mixed
27
	 */
28
	public function get( $key = '', $fallback = null, $group = '' )
29
	{
30
		return parent::get( $group, $key, $fallback );
31
	}
32
33
	/**
34
	 * @return string
35
	 */
36
	protected function getDefaultGroup()
37
	{
38
		return get_post_type();
39
	}
40
}
41