Code Duplication    Length = 10-10 lines in 2 locations

app/Device.php 2 locations

@@ 103-112 (lines=10) @@
100
     * @param  string $value
101
     * @return string
102
     */
103
    public function getOpenTimeAttribute($value)
104
    {
105
        $time = new Carbon($value, 'UTC');
106
        
107
        //If the user is logged in then use there preferred timezone
108
        if (Auth::check())
109
            $time = $time->setTimezone(Auth::user()->timezone);
110
111
        return $time->format('H:i');
112
    }
113
    
114
    /**
115
     * Accessor: Get the open time of the device converted to the users preferred time and
@@ 136-145 (lines=10) @@
133
     * @param  string $value
134
     * @return string
135
     */
136
    public function getCloseTimeAttribute($value)
137
    {
138
        $time = new Carbon($value, 'UTC');
139
    
140
        //If the user is logged in then use there preferred timezone
141
        if (Auth::check())
142
            $time = $time->setTimezone(Auth::user()->timezone);
143
        
144
        return $time->format('H:i');
145
    }
146
    
147
    /**
148
     * Accessor: Get the close time of the device converted to the users preferred time and