Code Duplication    Length = 18-19 lines in 2 locations

src/Service/Workspace/WorkspaceService.php 2 locations

@@ 60-77 (lines=18) @@
57
    /**
58
     * {@inheritdoc}
59
     */
60
    public function getWorkspace($workspaceId)
61
    {
62
        $request = new WorkspaceRequest(
63
            array(
64
                'workspaceId' => $this->validate($workspaceId),
65
            )
66
        );
67
68
        $response = $this->delegate($request);
69
70
        $workspace = $this->hydrator->hydrate($response->body['data'], new Workspace());
71
72
        return new WorkspaceResponse(
73
            array(
74
                'workspace' => $workspace,
75
            )
76
        );
77
    }
78
79
    /**
80
     * {@inheritdoc}
@@ 211-229 (lines=19) @@
208
    /**
209
     * {@inheritdoc}
210
     */
211
    public function updateWorkspace($workspaceId, Workspace $workspace)
212
    {
213
        $request = new UpdateWorkspace(
214
            array(
215
                'workspaceId' => $this->validate($workspaceId),
216
                'data' => $this->extractDataFromObject($workspace),
217
            )
218
        );
219
220
        $response = $this->delegate($request);
221
222
        $workspace = $this->hydrator->hydrate($response->body['data'], new Workspace());
223
224
        return new WorkspaceResponse(
225
            array(
226
                'workspace' => $workspace,
227
            )
228
        );
229
    }
230
}
231