Completed
Push — master ( 3b9aa0...812432 )
by Anton
03:38
created

InnerBlock::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
9
namespace Spiral\Stempler\Behaviours;
10
11
use Spiral\Stempler\BehaviourInterface;
12
13
/**
14
 * Defines new block.
15
 */
16
class InnerBlock implements BehaviourInterface
17
{
18
    /**
19
     * @var string
20
     */
21
    private $name = '';
22
23
    /**
24
     * @param string $name
25
     */
26
    public function __construct(string $name)
27
    {
28
        $this->name = $name;
29
    }
30
31
    /**
32
     * Created block name.
33
     *
34
     * @return string
35
     */
36
    public function blockName(): string
37
    {
38
        return $this->name;
39
    }
40
}