Passed
Push — master ( f60a52...136a3c )
by Petr
03:16
created

OrganizerController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 23
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A listAction() 0 6 1
1
<?php
2
3
namespace AppBundle\Controller;
4
5
use AppBundle\Controller\Infrastructure\RestController;
6
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
7
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
8
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
9
use Symfony\Component\HttpFoundation\Response;
10
11
/**
12
 * @author Vehsamrak
13
 * @Route("organizer")
14
 */
15
class OrganizerController extends RestController
16
{
17
18
    /**
19
     * List all registered organizers
20
     * @Route("s/{limit}/{offset}", name="organizers_list")
21
     * @Method("GET")
22
     * @ApiDoc(
23
     *     section="Organizer",
24
     *     statusCodes={
25
     *         200="OK",
26
     *     }
27
     * )
28
     * @param int $limit Limit results. Default is 50
29
     * @param int $offset Starting serial number of result collection. Default is 0
30
     */
31 1
    public function listAction($limit = null, $offset = null): Response
32
    {
33 1
        return $this->respond(
34 1
            $this->createCompleteCollectionResponse($this->get('rockparade.organizer_repository'), $limit, $offset)
35
        );
36
    }
37
}
38