Code Duplication    Length = 8-8 lines in 2 locations

src/Service/TradingCard.php 1 location

@@ 210-217 (lines=8) @@
207
                ->orderBy('m.id', 'ASC')
208
                ->groupBy('c.model');
209
            $query = $qb->getQuery();
210
        } else {
211
            // If the game is supposed to be a regular user game or an anonymous identified game,
212
            // it means that the registration/login is at the end of the game
213
            if((!$user &&  !$game->getAnonymousAllowed()) || ($game->getAnonymousAllowed() && $game->getAnonymousIdentifier())) {
214
                return 0;
215
            }
216
            return $this->getEntryMapper()->findLastEntriesByIp($game, $this->getIp(), $limitDate);
217
        }
218
219
        
220
        // all the cards of the user

src/Service/Game.php 1 location

@@ 1168-1175 (lines=8) @@
1165
            );
1166
1167
            return $entries;
1168
        } else {
1169
            // If the game is supposed to be a reguler user game or an anonymous identified game,
1170
            // it means that the registration/login is at the end of the game
1171
            if((!$user &&  !$game->getAnonymousAllowed()) || ($game->getAnonymousAllowed() && $game->getAnonymousIdentifier())) {
1172
                return 0;
1173
            }
1174
            return $this->getEntryMapper()->countLastEntriesByIp($game, $this->getIp(), $limitDate);
1175
        }
1176
    }
1177
1178
    /**