AbstractGenerator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTemplate() 0 9 1
1
<?php
2
/**
3
 * This file is part of graze/unicontroller-client.
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/unicontroller-client/blob/master/LICENSE.md
11
 * @link https://github.com/graze/unicontroller-client
12
 */
13
namespace Graze\UnicontrollerClient\ClassGenerator\Generator;
14
15
abstract class AbstractGenerator
16
{
17
    const PATH_TEMPLATE = '%s/Template/%s.php.tpl';
18
19
    /**
20
     * @param string $name
21
     * @return string
22
     */
23
    protected function getTemplate($name)
24
    {
25
        $path = sprintf(
26
            self::PATH_TEMPLATE,
27
            __DIR__,
28
            $name
29
        );
30
31
        return file_get_contents($path);
32
    }
33
}
34