Passed
Push — master ( 696e93...57e181 )
by Mauro
02:25
created

GetAllTasks   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTasks() 0 7 1
1
<?php
2
3
namespace App\Controller\Task;
4
5
/**
6
 * Tasks Controller.
7
 */
8
class GetAllTasks extends BaseTaskController
9
{
10
    /**
11
     * Get all tasks.
12
     *
13
     * @param Request $request
14
     * @param Response $response
15
     * @param array $args
16
     * @return array
17
     */
18
    public function getTasks($request, $response, $args)
19
    {
20
        $this->setParams($request, $response, $args);
21
        $result = $this->getTaskService()->getTasks();
22
23
        return $this->jsonResponse('success', $result, 200);
24
    }
25
}
26