Completed
Pull Request — master (#139)
by
unknown
16:38 queued 06:45
created

OrdersController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A cgetAction() 0 9 1
A getAction() 0 10 1
1
<?php
2
3
namespace AppBundle\Controller;
4
5
use FOS\RestBundle\Controller\Annotations\View as RestView;
6
use FOS\RestBundle\Controller\Annotations\RouteResource;
7
use FOS\RestBundle\Request\ParamFetcher;
8
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
9
10
/**
11
 * @RouteResource("Order")
12
 */
13
class OrdersController extends Controller
14
{
15
    /**
16
     * @RestView
17
     */
18
    public function cgetAction()
19
    {
20
        # TODO
21
        $response = [
22
            'message' => 'necessary to realize controller to return collection of orders',
23
        ];
24
25
        return $response;
26
    }
27
28
    /**
29
     * @RestView
30
     */
31
    public function getAction($orderId)
32
    {
33
        # TODO
34
        $response = [
35
            'message' => 'necessary to realize controller',
36
            'order_id' => $orderId
37
        ];
38
39
        return $response;
40
    }
41
}
42