TradeController::GetAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace PhpDraft\Controllers;
4
5
use Silex\Application;
6
use Symfony\Component\HttpFoundation\Request;
7
use Symfony\Component\HttpFoundation\Response;
8
use PhpDraft\Domain\Models\PhpDraftResponse;
9
10
class TradeController {
11
  public function GetAll(Application $app, Request $request) {
12
    $draft_id = (int)$request->get('draft_id');
13
14
    return $app->json($app['phpdraft.TradeRepository']->GetTrades($draft_id), Response::HTTP_OK);
15
  }
16
}