Code Duplication    Length = 16-16 lines in 2 locations

src/Surfnet/StepupRa/RaBundle/Service/VettingService.php 2 locations

@@ 158-173 (lines=16) @@
155
     * @param string $procedureId
156
     * @throws UnknownVettingProcedureException
157
     */
158
    public function cancelProcedure($procedureId)
159
    {
160
        if (!is_string($procedureId)) {
161
            throw InvalidArgumentException::invalidType('string', 'procedureId', $procedureId);
162
        }
163
164
        $procedure = $this->vettingProcedureRepository->retrieve($procedureId);
165
166
        if (!$procedure) {
167
            throw new UnknownVettingProcedureException(
168
                sprintf("No vetting procedure with id '%s' is known.", $procedureId)
169
            );
170
        }
171
172
        $this->vettingProcedureRepository->remove($procedureId);
173
    }
174
175
    /**
176
     * @return int
@@ 411-426 (lines=16) @@
408
     * @return null|VettingProcedure
409
     * @throws UnknownVettingProcedureException
410
     */
411
    private function getProcedure($procedureId)
412
    {
413
        if (!is_string($procedureId)) {
414
            throw InvalidArgumentException::invalidType('string', 'procedureId', $procedureId);
415
        }
416
417
        $procedure = $this->vettingProcedureRepository->retrieve($procedureId);
418
419
        if (!$procedure) {
420
            throw new UnknownVettingProcedureException(
421
                sprintf("No vetting procedure with id '%s' is known.", $procedureId)
422
            );
423
        }
424
425
        return $procedure;
426
    }
427
428
    /**
429
     * @param string $procedureId