Completed
Push — master ( 022616...175363 )
by Alex
08:53
created

TestView   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 13
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A __construct() 0 5 1
1
<?php
2
namespace Mezon\Application\Tests;
3
4
/**
5
 * View class
6
 *
7
 * @author Dodonov A.A.
8
 */
9
class TestView extends \Mezon\Application\View
10
{
11
12
    public function __construct(string $content)
13
    {
14
        parent::__construct(null, 'default');
15
16
        $this->content = $content;
0 ignored issues
show
Bug Best Practice introduced by
The property content does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
17
    }
18
19
    public function render(string $viewName = ''): string
20
    {
21
        return $this->content;
22
    }
23
}
24