Completed
Push — master ( a5086d...460020 )
by Mauro
02:28
created

BaseTask   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTaskService() 0 6 1
1
<?php
2
3
namespace App\Controller\Task;
4
5
use App\Controller\BaseController;
6
use App\Service\TaskService;
7
8
/**
9
 * Base Task Controller.
10
 */
11
class BaseTask extends BaseController
12
{
13
    /**
14
     * @param \Slim\Container $container
15
     */
16
    public function __construct(\Slim\Container $container)
17
    {
18
        $this->logger = $container->get('logger');
19
        $this->database = $container->get('db');
20
    }
21
22
    /**
23
     * @return TaskService
24
     */
25
    protected function getTaskService()
26
    {
27
        $service = new TaskService($this->database);
28
29
        return $service;
30
    }
31
}
32