Completed
Branch dbal-improvement (06db1a)
by Anton
03:59
created

BlockBehaviour   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A blockName() 0 4 1
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
namespace Spiral\Stempler\Behaviours;
9
10
use Spiral\Stempler\BehaviourInterface;
11
12
/**
13
 * Defines new block.
14
 */
15
class BlockBehaviour implements BehaviourInterface
16
{
17
    /**
18
     * @var string
19
     */
20
    private $name = '';
21
22
    /**
23
     * @param string $name
24
     */
25
    public function __construct($name)
26
    {
27
        $this->name = $name;
28
    }
29
30
    /**
31
     * Created block name.
32
     *
33
     * @return string
34
     */
35
    public function blockName()
36
    {
37
        return $this->name;
38
    }
39
}