Completed
Push — master ( 9cc31f...19ab2e )
by Andrii
12:18
created

ScrutinizerController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A actionUploadCoverage() 0 6 1
A actionUploadPhpCoverage() 0 4 1
A actionUploadPythonCoverage() 0 4 1
1
<?php
2
3
/*
4
 * Scrutinizer plugin for HiDev
5
 *
6
 * @link      https://github.com/hiqdev/hidev-scrutinizer
7
 * @package   hidev-scrutinizer
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hidev\scrutinizer\controllers;
13
14
/**
15
 * Goal for Scrutinizer.
16
 */
17
class ScrutinizerController extends \hidev\controllers\CommonController
18
{
19
    public function actionUploadCoverage()
20
    {
21
        $lang = $this->takePackage()->getLanguage();
22
23
        return $this->runActions(["upload-$lang-coverage"]);
24
    }
25
26
    public function actionUploadPhpCoverage()
27
    {
28
        return $this->passthru('php-ocular', ['code-coverage:upload', '--format=php-clover', 'coverage.clover']);
29
    }
30
31
    public function actionUploadPythonCoverage()
32
    {
33
        return $this->passthru('python-ocular', ['--data-file', '.coverage']);
34
    }
35
}
36