Code Duplication    Length = 16-17 lines in 3 locations

src/Service/Task/TaskService.php 3 locations

@@ 25-40 (lines=16) @@
22
    /**
23
     * @inheritDoc
24
     */
25
    public function createTask(\Marek\Toggable\API\Toggl\Values\Task\Task $task)
26
    {
27
        $request = new CreateTask(
28
            array(
29
                'data' => $this->extractDataFromObject($task),
30
            )
31
        );
32
33
        $response = $this->delegate($request);
34
35
        return new TaskResponse(
36
            array(
37
                'task' => $this->hydrateDataFromArrayToObject($response, new Task())
38
            )
39
        );
40
    }
41
42
    /**
43
     * @inheritDoc
@@ 45-60 (lines=16) @@
42
    /**
43
     * @inheritDoc
44
     */
45
    public function getTask($taskId)
46
    {
47
        $request = new GetTask(
48
            array(
49
                'taskId' => $this->validate($taskId),
50
            )
51
        );
52
53
        $response = $this->delegate($request);
54
55
        return new TaskResponse(
56
            array(
57
                'task' => $this->hydrateDataFromArrayToObject($response, new Task())
58
            )
59
        );
60
    }
61
62
    /**
63
     * @inheritDoc
@@ 65-81 (lines=17) @@
62
    /**
63
     * @inheritDoc
64
     */
65
    public function updateTask($taskId, \Marek\Toggable\API\Toggl\Values\Task\Task $task)
66
    {
67
        $request = new UpdateTask(
68
            array(
69
                'taskId' => $this->validate($taskId),
70
                'data' => $task,
71
            )
72
        );
73
74
        $response = $this->delegate($request);
75
76
        return new TaskResponse(
77
            array(
78
                'task' => $this->hydrateDataFromArrayToObject($response, new Task())
79
            )
80
        );
81
    }
82
83
    /**
84
     * @inheritDoc