Introduce::getImplementation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * \AppserverIo\Psr\MetaobjectProtocol\Aop\Annotations\Introduce
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Bernhard Wick <[email protected]>
15
 * @copyright 2015 TechDivision GmbH - <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/appserver-io-psr/mop
18
 * @link      http://www.appserver.io/
19
 */
20
21
namespace AppserverIo\Psr\MetaobjectProtocol\Aop\Annotations;
22
23
use AppserverIo\Lang\Reflection\ReflectionAnnotation;
24
25
/**
26
 * Annotation class which is used to introduce new characteristics into a class.
27
 * Will result in a trait-supported implementation of a specified interface
28
 *
29
 * @author    Bernhard Wick <[email protected]>
30
 * @copyright 2015 TechDivision GmbH - <[email protected]>
31
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
 * @link      https://github.com/appserver-io-psr/mop
33
 * @link      http://www.appserver.io/
34
 *
35
 * @Annotation
36
 * @Target({"CLASS"})
37
 */
38
class Introduce extends ReflectionAnnotation
39
{
40
    /**
41
     * The annotation which identifies this annotation class
42
     *
43
     * @var string
44
     */
45
    const ANNOTATION = 'Introduce';
46
47
    /**
48
     * This method returns the class name as a string
49
     *
50
     * @return string
51
     */
52
    public static function __getClass()
53
    {
54
        return __CLASS__;
55
    }
56
57
    /**
58
     * Returns the value of the interface attribute.
59
     *
60
     * @return string The annotations interface attribute
61
     */
62 1
    public function getInterface()
63
    {
64 1
        return $this->values[AnnotationKeys::INTRODUCTION_INTERFACE];
65
    }
66
67
    /**
68
     * Returns the value of the implementation attribute.
69
     *
70
     * @return string The annotations implementation attribute
71
     */
72 1
    public function getImplementation()
73
    {
74 1
        return $this->values[AnnotationKeys::IMPLEMENTATION];
75
    }
76
}
77