Code Duplication    Length = 4-4 lines in 2 locations

src/Kunstmaan/DashboardBundle/Command/Helper/Analytics/ChartDataCommandHelper.php 1 location

@@ 71-74 (lines=4) @@
68
            } elseif ($timespan <= 31) {
69
                $timestamp = mktime(0, 0, 0, substr($row[2], 4, 2), substr($row[2], 6, 2), substr($row[2], 0, 4));
70
                $timestamp = date('Y-m-d H:00', $timestamp);
71
            } else {
72
                $timestamp = strtotime(substr($row[0], 0, 4) . 'W' . substr($row[0], 4, 2));
73
                $timestamp = date('Y-m-d H:00', $timestamp);
74
            }
75
76
            // add to chart array
77
            $chartEntry = array(

src/Kunstmaan/DashboardBundle/Command/Helper/Analytics/GoalCommandHelper.php 1 location

@@ 182-185 (lines=4) @@
179
                                substr($row[2], 0, 4)
180
                            );
181
                            $timestamp = date('Y-m-d H:00', $timestamp);
182
                        } else {
183
                            $timestamp = strtotime(substr($row[0], 0, 4) . 'W' . substr($row[0], 4, 2));
184
                            $timestamp = date('Y-m-d H:00', $timestamp);
185
                        }
186
                    }
187
                }
188
                $goalEntry[$timestamp] = $row[$i + $start];