IndexController::tradeAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Controller;
4
5
use Bone\Mvc\Controller;
6
use Del\Cdn;
7
8
9
class IndexController extends Controller
10
{
11
    public function init()
12
    {
13
        // HTML Head variables
14
        $this->view->css = Cdn::delCssLink();
15
        $this->view->bscss = Cdn::bootstrapCssLink();
16
        $this->view->uicss = Cdn::jQueryUiCssLink();
17
        $this->view->jquery = Cdn::jQueryJavascript();
18
        $this->view->jqueryui = Cdn::jQueryUIJavascript();
19
        $this->view->bootstrap = Cdn::bootstrapJavascript();
20
        $this->view->title = 'BTCTrader';
21
    }
22
23
    public function indexAction()
24
    {
25
26
    }
27
28
    public function tradeAction()
29
    {
30
        $this->view->exchange = $this->getParam('exchange');
31
    }
32
33
    public function getInfoAction()
34
    {
35
        // example of a Json page
36
        $this->disableLayout();
37
        $this->disableView();
38
        $array = array(
39
          'Rum',
40
          'Grog'
41
        );
42
        $this->getHeaders()->setJsonResponse();
43
        $this->setBody(json_encode($array));
44
    }
45
}