Code Duplication    Length = 22-23 lines in 2 locations

src/Controller/Endpoint/Leaderboards/LeaderboardOutfitEndpointController.php 1 location

@@ 86-107 (lines=22) @@
83
     * @param  string $input Field to look at
84
     * @return string
85
     */
86
    public function getField($input) {
87
        $field = null;
88
        switch ($input) {
89
            case 'kills':
90
                $field = 'outfitKills';
91
                break;
92
            case 'deaths':
93
                $field = 'outfitDeaths';
94
                break;
95
            case 'teamkills':
96
                $field = 'outfitTKs';
97
                break;
98
            case 'suicides':
99
                $field = 'outfitSuicides';
100
                break;
101
            case 'captures':
102
                $field = 'outfitCaptures';
103
                break;
104
        }
105
106
        return $field;
107
    }
108
}
109

src/Controller/Endpoint/Leaderboards/LeaderboardPlayerEndpointController.php 1 location

@@ 110-132 (lines=23) @@
107
     * @param  string $input Field to look at
108
     * @return string
109
     */
110
    public function getField($input) {
111
        $field = null;
112
113
        switch ($input) {
114
            case 'kills':
115
                $field = 'playerKills';
116
                break;
117
            case 'deaths':
118
                $field = 'playerDeaths';
119
                break;
120
            case 'teamkills':
121
                $field = 'playerTeamKills';
122
                break;
123
            case 'suicides':
124
                $field = 'playerSuicides';
125
                break;
126
            case 'headshots':
127
                $field = 'headshots';
128
                break;
129
        }
130
131
        return $field;
132
    }
133
}
134