Code Duplication    Length = 11-11 lines in 2 locations

src/Palladium/Service/Locator.php 1 location

@@ 30-40 (lines=11) @@
27
    }
28
29
30
    protected function retrieveIdenityByToken(Entity\Identity $identity, $token, $action = Entity\Identity::ACTION_ANY)
31
    {
32
        $identity->setToken($token);
33
        $identity->setTokenAction($action);
34
        $identity->setTokenEndOfLife(time());
35
36
        $mapper = $this->mapperFactory->create(Mapper\Identity::class);
37
        $mapper->fetch($identity);
38
39
        return $identity;
40
    }
41
42
43
    protected function retrieveEmailIdenityByIdentifier($identifier)

src/Palladium/Service/Registration.php 1 location

@@ 133-143 (lines=11) @@
130
    }
131
132
133
    private function retrieveIdenityByToken(Entity\Identity $identity, $token, $action = Entity\Identity::ACTION_ANY)
134
    {
135
        $identity->setToken($token);
136
        $identity->setTokenAction($action);
137
        $identity->setTokenEndOfLife(time());
138
139
        $mapper = $this->mapperFactory->create(Mapper\Identity::class);
140
        $mapper->fetch($identity);
141
142
        return $identity;
143
    }
144
145
}
146