Code Duplication    Length = 8-9 lines in 3 locations

src/Surfnet/StepupRa/RaBundle/Repository/SessionVettingProcedureRepository.php 3 locations

@@ 37-45 (lines=9) @@
34
     */
35
    private $namespace;
36
37
    public function __construct(SessionInterface $session, $namespace)
38
    {
39
        if (!is_string($namespace)) {
40
            throw InvalidArgumentException::invalidType('string', 'namespace', $namespace);
41
        }
42
43
        $this->session = $session;
44
        $this->namespace = $namespace;
45
    }
46
47
    public function store(VettingProcedure $vettingProcedure)
48
    {
@@ 52-59 (lines=8) @@
49
        $this->session->set(sprintf('%s:%s', $this->namespace, $vettingProcedure->getId()), $vettingProcedure);
50
    }
51
52
    public function retrieve($id)
53
    {
54
        if (!is_string($id)) {
55
            throw InvalidArgumentException::invalidType('string', 'uuid', $id);
56
        }
57
58
        return $this->session->get(sprintf('%s:%s', $this->namespace, $id));
59
    }
60
61
    /**
62
     * @param string $id
@@ 65-72 (lines=8) @@
62
     * @param string $id
63
     * @return void
64
     */
65
    public function remove($id)
66
    {
67
        if (!is_string($id)) {
68
            throw InvalidArgumentException::invalidType('string', 'uuid', $id);
69
        }
70
71
        return $this->session->remove(sprintf('%s:%s', $this->namespace, $id));
72
    }
73
}
74