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

BlockBehaviour::blockName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
}