PhpPage   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 6 1
1
<?php
2
/**
3
 * Yii2 Pages Module
4
 *
5
 * @link      https://github.com/hiqdev/yii2-module-pages
6
 * @package   yii2-module-pages
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\yii2\modules\pages\models;
12
13
use hiqdev\yii2\modules\pages\interfaces\PageInterface;
14
use Yii;
15
16
class PhpPage extends AbstractPage implements PageInterface
17
{
18
    /**
19
     * @param array $params
20
     * @return string
21
     */
22
    public function render(array $params = []): string
23
    {
24
        $path = $this->storage->getLocalPath($this->path);
25
26
        return Yii::$app->getView()->renderFile($path, $params);
27
    }
28
}
29