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

@@ 1039-1046 (lines=8) @@
1036
            );
1037
1038
            return $entries;
1039
        } else {
1040
            // If the game is supposed to be a reguler user game or an anonymous identified game,
1041
            // it means that the registration/login is at the end of the game
1042
            if((!$user &&  !$game->getAnonymousAllowed()) || ($game->getAnonymousAllowed() && $game->getAnonymousIdentifier())) {
1043
                return 0;
1044
            }
1045
            return $this->getEntryMapper()->countLastEntriesByIp($game, $this->getIp(), $limitDate);
1046
        }
1047
    }
1048
1049
    /**