IndexController::indexAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
crap 1
1
<?php
2
3
namespace BsbPhingService\Controller;
4
5
use Zend\Mvc\Controller\AbstractActionController;
6
use Zend\View\Model\ViewModel;
7
8
class IndexController extends AbstractActionController
9
{
10
11
    /**
12
     * Runs example phing file and returns
13
     *
14
     * @return ViewModel
15
     */
16 1
    public function indexAction()
17
    {
18 1
        $buildResult = $this
19 1
            ->getServiceLocator()
20 1
            ->get('BsbPhingService')
21 1
            ->build('show-defaults dist' /* target */, array(
22
                'buildFile' => __DIR__ . '/../../data/build-example.xml'
23 1
            ));
24
25 1
        $view = new ViewModel();
26 1
        $view->setVariable('process', $buildResult);
27
28 1
        return $view;
29
    }
30
}
31