Completed
Push — master ( 4d839d...7b168e )
by Andrii
02:18
created

PhpCsController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTemplate() 0 7 1
A getFixer() 0 4 1
1
<?php
2
3
/*
4
 * PHP-CS-Fixer plugin for HiDev
5
 *
6
 * @link      https://github.com/hiqdev/hidev-php-cs-fixer
7
 * @package   hidev-php-cs-fixer
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hidev\phpcsfixer\console;
13
14
/**
15
 * Goal for .php_cs (php-cs-fixer config) file.
16
 */
17
class PhpCsController extends \hidev\controllers\TemplateController
18
{
19
    public function getTemplate()
20
    {
21
        $version = $this->getFixer()->getVersion();
22
        $v = substr($version, 0, 1);
23
24
        return "php-cs-v$v.twig";
25
    }
26
27
    public function getFixer()
28
    {
29
        return $this->takeGoal('php-cs-fixer');
30
    }
31
}
32