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

BaseTask::getTaskService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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