Code Duplication    Length = 17-17 lines in 3 locations

src/Service/Client/ClientService.php 1 location

@@ 111-127 (lines=17) @@
108
    /**
109
     * {@inheritdoc}
110
     */
111
    public function updateClient($clientId, ClientValue $client)
112
    {
113
        $request = new UpdateClient(
114
            array(
115
                'clientId' => $this->validate($clientId),
116
                'data' => $this->extractDataFromObject($client),
117
            )
118
        );
119
120
        $response = $this->delegate($request);
121
122
        return new ClientResponse(
123
            array(
124
                'client' => $this->hydrateDataFromArrayToObject($response, new ClientValue()),
125
            )
126
        );
127
    }
128
129
    /**
130
     * {@inheritdoc}

src/Service/Tag/TagService.php 1 location

@@ 41-57 (lines=17) @@
38
    /**
39
     * @inheritDoc
40
     */
41
    public function updateTag($tagId, \Marek\Toggable\API\Toggl\Values\Tag\Tag $tag)
42
    {
43
        $request = new UpdateTag(
44
            array(
45
                'tagId' => $this->validate($tagId),
46
                'data' => $this->extractDataFromObject($tag),
47
            )
48
        );
49
50
        $response = $this->delegate($request);
51
52
        return new TagResponse(
53
            array(
54
                'tag' => $this->hydrateDataFromArrayToObject($response, new Tag()),
55
            )
56
        );
57
    }
58
59
    /**
60
     * @inheritDoc

src/Service/ProjectUsers/ProjectUsersService.php 1 location

@@ 45-61 (lines=17) @@
42
    /**
43
     * @inheritDoc
44
     */
45
    public function updateProjectUser($projectUserId, \Marek\Toggable\API\Toggl\Values\Project\User $user)
46
    {
47
        $request = new UpdateProjectUser(
48
            array(
49
                'projectUserId' => $this->validate($projectUserId),
50
                'data' => $this->extractDataFromObject($user),
51
            )
52
        );
53
54
        $response = $this->delegate($request);
55
56
        return new ProjectUser(
57
            array(
58
                'projectUser' => $this->hydrateDataFromArrayToObject($response, new User()),
59
            )
60
        );
61
    }
62
63
    /**
64
     * @inheritDoc