Code Duplication    Length = 15-15 lines in 2 locations

src/Palladium/Service/Identification.php 2 locations

@@ 114-128 (lines=15) @@
111
    {
112
        $identity = $this->retrieveIdenityByCookie($userId, $series, Entity\Identity::STATUS_ACTIVE);
113
114
        if ($identity->getId() === null) {
115
            $this->logger->error('denial of service', [
116
                'input' => [
117
                    'user' => $userId,
118
                    'series' => $series,
119
                    'key' => $key,
120
                ],
121
                'account' => [
122
                    'user' => $identity->getUserId(),
123
                    'identity' => $identity->getId(),
124
                ],
125
            ]);
126
127
            throw new DenialOfServiceAttempt;
128
        }
129
130
        $mapper = $this->mapperFactory->create(Mapper\CookieIdentity::class);
131
@@ 205-219 (lines=15) @@
202
    {
203
        $identity = $this->retrieveIdenityByCookie($userId, $series, Entity\Identity::STATUS_ACTIVE);
204
205
        if ($identity->getId() === null) {
206
            $this->logger->error('denial of service', [
207
                'input' => [
208
                    'user' => $userId,
209
                    'series' => $series,
210
                    'key' => $key,
211
                ],
212
                'account' => [
213
                    'user' => $identity->getUserId(),
214
                    'identity' => $identity->getId(),
215
                ],
216
            ]);
217
218
            throw new DenialOfServiceAttempt;
219
        }
220
221
        $mapper = $this->mapperFactory->create(Mapper\CookieIdentity::class);
222