Code Duplication    Length = 12-12 lines in 2 locations

src/Tracks/Transformers/TrackTransformer.php 2 locations

@@ 61-72 (lines=12) @@
58
     * @param  $track        The track object
59
     * @return string
60
     */
61
    public function getTrackStatus($track)
62
    {
63
        $sequentialStatus = ['failed_at', 'succeed_at', 'process_at', 'queue_at'];
64
65
        foreach ($sequentialStatus as $status) {
66
            if (!is_null($track->{$status})) {
67
                return substr($status, 0, -3);
68
            }
69
        }
70
71
        throw new Exception("Can't find the right column to track the Qwatcher", 1);
72
    }
73
74
    /**
75
     * Get current Status prias text, tracking by sequential of status datetime
@@ 80-91 (lines=12) @@
77
     * @param  $track        The track object
78
     * @return string
79
     */
80
    public function getTrackStatusTime($track)
81
    {
82
        $sequentialStatus = ['failed_at', 'succeed_at', 'process_at', 'queue_at'];
83
84
        foreach ($sequentialStatus as $status) {
85
            if (!is_null($track->{$status})) {
86
                return $track->{$status};
87
            }
88
        }
89
90
        throw new Exception("Can't find the right column to track the Qwatcher", 1);
91
    }
92
}
93