Code Duplication    Length = 8-8 lines in 2 locations

src/Service/Game.php 1 location

@@ 920-927 (lines=8) @@
917
            );
918
919
            return $entries;
920
        } else {
921
            // If the game is supposed to be a reguler user game or an anonymous identified game,
922
            // it means that the registration/login is at the end of the game
923
            if((!$user &&  !$game->getAnonymousAllowed()) || ($game->getAnonymousAllowed() && $game->getAnonymousIdentifier())) {
924
                return 0;
925
            }
926
            return $this->getEntryMapper()->countLastEntriesByIp($game, $this->getIp(), $limitDate);
927
        }
928
    }
929
930
    /**

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