Code Duplication    Length = 13-13 lines in 2 locations

src/project/Rest/Sample.php 2 locations

@@ 90-102 (lines=13) @@
87
     * @throws \ByJG\MicroOrm\Exception\InvalidArgumentException
88
     * @throws \ByJG\Serializer\Exception\InvalidArgumentException
89
     */
90
    public function getDummy($response, $request)
91
    {
92
        $dummyRepo = Psr11::container()->get(DummyRepository::class);
93
        $field = $request->param('field');
94
95
        $result = $dummyRepo->getByField($field);
96
        if (empty($result)) {
97
            throw new Error404Exception('Id not found');
98
        }
99
        $response->write(
100
            $result
101
        );
102
    }
103
104
    /**
105
     * Save data content in the table Dummy
@@ 189-201 (lines=13) @@
186
     * @throws \ByJG\Serializer\Exception\InvalidArgumentException
187
     * @throws ReflectionException
188
     */
189
    public function getDummyHex($response, $request)
190
    {
191
        $dummyRepo = Psr11::container()->get(DummyHexRepository::class);
192
        $id = $request->param('id');
193
194
        $result = $dummyRepo->get($id);
195
        if (empty($result)) {
196
            throw new Error404Exception('Id not found');
197
        }
198
        $response->write(
199
            $result
200
        );
201
    }
202
203
    /**
204
     * Save data content in the table Dummy Hex