OrderController::commands()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * API for Billing
4
 *
5
 * @link      https://github.com/hiqdev/billing-hiapi
6
 * @package   billing-hiapi
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\billing\hiapi\controllers;
12
13
use hiqdev\billing\hiapi\commands\order\CalculateValueCommand;
14
15
class OrderController extends \hiapi\controllers\BaseController
16
{
17
    public function commands()
18
    {
19
        return array_merge(parent::commands(), [
20
            'ping' => [
21
                'class'  => \hiapi\commands\PingCommand::class,
22
                'answer' => 'order BANG',
23
            ],
24
            'calculate' => [
25
                'class'  => CalculateValueCommand::class,
26
            ],
27
        ]);
28
    }
29
}
30