Code Duplication    Length = 10-10 lines in 2 locations

src/Users/UserStatistics.php 2 locations

@@ 230-239 (lines=10) @@
227
    *
228
    * @return Array of Statistics.
229
    */
230
    public function getStatsByCategoryDesc($categoryDesc)
231
    {
232
        $stats = array();
233
        foreach ($this->data as $statistic) {
234
            if ($statistic->statistic_category->desc == $categoryDesc) {
235
                array_push($stats,$statistic);
236
            }
237
        }
238
        return $stats;
239
    }
240
241
    /**
242
    * Get Stats by Segment Type.
@@ 326-335 (lines=10) @@
323
    *
324
    * @return Array of Statistics.
325
    */
326
    public function searchStatsByCategoryDesc($categoryDesc)
327
    {
328
        $stats = array();
329
        foreach ($this->data as $statistic) {
330
            if (preg_match("/$categoryDesc/i", $statistic->statistic_category->desc)) {
331
                array_push($stats,$statistic);
332
            }
333
        }
334
        return $stats;
335
    }
336
337
}
338