Completed
Push — master ( 19d624...b41397 )
by Peter
16:57 queued 13:06
created

SignalsMeta::field()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
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
use Maslosoft\Signals\Options\SignalsMetaOptions;
15
16
/**
17
 * Signals metadata container class
18
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
19
 */
20
class SignalsMeta extends Meta
21
{
22
23
	/**
24
	 * Create instance of Metadata specifically designed for Signals
25
	 * @param string|object|AnnotatedInterface $model
26
	 * @param MetaOptions $options
27
	 * @return static
28
	 */
29
	public static function create($model, MetaOptions $options = null)
30
	{
31
		if (null === $options)
32
		{
33
			$options = new SignalsMetaOptions();
34
		}
35
		return parent::create($model, $options);
36
	}
37
38
	/**
39
	 * Get field by name
40
	 * @param string $name
41
	 * @return DocumentPropertyMeta
42
	 */
43
	public function field($name)
44
	{
45
		return parent::field($name);
46
	}
47
48
	/**
49
	 * Get document type meta
50
	 * @return DocumentTypeMeta
51
	 */
52
	public function type()
53
	{
54
		return parent::type();
55
	}
56
57
}
58