Code Duplication    Length = 8-10 lines in 2 locations

src/RemServer/RemServerController.php 2 locations

@@ 39-48 (lines=10) @@
36
     *
37
     * @return array
38
     */
39
    public function initActionGet() : array
40
    {
41
        $rem = $this->di->get("remserver"); 
42
        $rem->init();
43
        $json = [
44
            "message" => "The session is initiated with the default dataset(s).",
45
            "dataset" => $rem->getDefaultDataset(),
46
        ];
47
        return [$json];
48
    }
49
50
51
@@ 111-118 (lines=8) @@
108
     *
109
     * @return array
110
     */
111
    public function getItem(string $key, int $itemId) : array
112
    {
113
        $item = $this->di->get("remserver")->getItem($key, $itemId);
114
        if (!$item) {
115
            return [["message" => "The item is not found."]];
116
        }
117
        return [$item];
118
    }
119
120
121