Code Duplication    Length = 29-29 lines in 2 locations

src/Controller/Task/BaseTask.php 1 location

@@ 12-40 (lines=29) @@
9
/**
10
 * Base Task Controller.
11
 */
12
abstract class BaseTask extends BaseController
13
{
14
    /**
15
     * @param Container $container
16
     */
17
    public function __construct(Container $container)
18
    {
19
        $this->logger = $container->get('logger');
20
        $this->database = $container->get('db');
21
    }
22
23
    /**
24
     * @return TaskService
25
     */
26
    protected function getTaskService()
27
    {
28
        $service = new TaskService($this->database);
29
30
        return $service;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    protected function getInput()
37
    {
38
        return $this->request->getParsedBody();
39
    }
40
}
41

src/Controller/User/BaseUser.php 1 location

@@ 12-40 (lines=29) @@
9
/**
10
 * Base User Controller.
11
 */
12
abstract class BaseUser extends BaseController
13
{
14
    /**
15
     * @param Container $container
16
     */
17
    public function __construct(Container $container)
18
    {
19
        $this->logger = $container->get('logger');
20
        $this->database = $container->get('db');
21
    }
22
23
    /**
24
     * @return UserService
25
     */
26
    protected function getUserService()
27
    {
28
        $service = new UserService($this->database);
29
30
        return $service;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    protected function getInput()
37
    {
38
        return $this->request->getParsedBody();
39
    }
40
}
41