Completed
Push — v2 ( d685ea )
by Peter
11:43
created

SignalsMeta   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0
ccs 0
cts 16
cp 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 2
A field() 0 4 1
A type() 0 4 1
1
<?php
2
3
/*
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
namespace Maslosoft\Signals\Meta;
10
11
use Maslosoft\Addendum\Collections\Meta;
12
use Maslosoft\Addendum\Interfaces\AnnotatedInterface;
13
use Maslosoft\Addendum\Options\MetaOptions;
14
15
/**
16
 * Signals metadata container class
17
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
18
 */
19
class SignalsMeta extends Meta
20
{
21
22
	/**
23
	 * Create instance of Metadata specifically designed for Manganel
24
	 * @param AnnotatedInterface $component
25
	 * @param MetaOptions $options
26
	 * @return static
27
	 */
28
	public static function create(AnnotatedInterface $component, MetaOptions $options = null)
29
	{
30
		if (null === $options)
31
		{
32
			$options = new SignalsMetaOptions();
33
		}
34
		return parent::create($component, $options);
35
	}
36
37
	/**
38
	 * Get field by name
39
	 * @param string $name
40
	 * @return DocumentPropertyMeta
41
	 */
42
	public function field($name)
43
	{
44
		return parent::field($name);
45
	}
46
47
	/**
48
	 * Get document type meta
49
	 * @return DocumentTypeMeta
50
	 */
51
	public function type()
52
	{
53
		return parent::type();
54
	}
55
56
}
57