Completed
Push — master ( 92472c...fe56a0 )
by Vitaly
02:18
created

Controller   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 1
c 2
b 0
f 2
lcom 0
cbo 1
dl 0
loc 9
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A toClassMetadata() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: root
5
 * Date: 27.07.2016
6
 * Time: 1:55.
7
 */
8
namespace samsonframework\container\annotation;
9
10
use samsonframework\container\Container;
11
use samsonframework\container\metadata\ClassMetadata;
12
13
/**
14
 * Controller annotation class.
15
 *
16
 * This annotation adds class to Controller container scope.
17
 * @see samsonframework\container\Container::SCOPE_CONTROLLER
18
 *
19
 * @Annotation
20
 */
21
class Controller implements ClassInterface
22
{
23
    /** {@inheritdoc} */
24 1
    public function toClassMetadata(ClassMetadata $metadata)
25
    {
26
        // Add controller scope to metadata collection
27 1
        $metadata->scopes[] = Container::SCOPE_CONTROLLER;
28 1
    }
29
}
30