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

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