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

InnerBlock   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

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
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
}