Completed
Push — master ( f82663...d42560 )
by Peter
17:08
created

ManganelMeta   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 84.62%

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 5
c 4
b 0
f 0
lcom 0
cbo 2
dl 0
loc 48
ccs 11
cts 13
cp 0.8462
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A field() 0 4 1
A method() 0 4 1
A create() 0 8 2
A type() 0 4 1
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL, Commercial` license[s].
5
 *
6
 * @package maslosoft/manganel
7
 * @license AGPL, Commercial
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 * @link http://maslosoft.com/manganel/
11
 */
12
13
namespace Maslosoft\Manganel\Meta;
14
15
use Maslosoft\Addendum\Collections\Meta;
16
use Maslosoft\Addendum\Interfaces\AnnotatedInterface;
17
use Maslosoft\Addendum\Options\MetaOptions;
18
use Maslosoft\Manganel\Options\ManganelMetaOptions;
19
20
/**
21
 * Manganel metadata container class
22
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
23
 */
24
class ManganelMeta extends Meta
25
{
26
27
	/**
28
	 * Create instance of Metadata specifically designed for Manganel
29
	 * @param string|object|AnnotatedInterface $model
30
	 * @param MetaOptions $options
31
	 * @return ManganelMeta
32
	 */
33 26
	public static function create($model, MetaOptions $options = null)
34
	{
35 26
		if (null === $options)
36 26
		{
37 26
			$options = new ManganelMetaOptions();
38 26
		}
39 26
		return parent::create($model, $options);
40
	}
41
42
	/**
43
	 * Get field by name
44
	 * @param string $name
45
	 * @return DocumentPropertyMeta
46
	 */
47 24
	public function field($name)
48
	{
49 24
		return parent::field($name);
50
	}
51
52
	/**
53
	 * Get document type meta
54
	 * @return DocumentTypeMeta
55
	 */
56 25
	public function type()
57
	{
58 25
		return parent::type();
59 1
	}
60
61
	/**
62
	 * Get method meta data
63
	 * @param type $name
64
	 * @return DocumentMethodMeta
65
	 */
66
	public function method($name)
67
	{
68
		return parent::method($name);
69
	}
70
71
}
72