Completed
Pull Request — master (#107)
by Tim
18:20 queued 10:44
created

RecentOvertime::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace App\Widgets;
4
5
use Arrilot\Widgets\AbstractWidget;
6
7
class RecentOvertime extends AbstractWidget
8
{
9
    public function __construct()
10
    {
11
       $this->reloadTimeout = config('timecontrol.refreshInterval');
12
    }
13
14
    /**
15
     * The configuration array.
16
     *
17
     * @var array
18
     */
19
    protected $config = [];
20
21
    /**
22
     * The number of seconds before each reload.
23
     *
24
     * @var int|float
25
     */
26
    public $reloadTimeout;
27
28
    /**
29
     * The number of minutes before cache expires.
30
     * False means no caching at all.
31
     *
32
     * @var int|float|bool
33
     */
34
    public $cacheTime = false;
35
    /**
36
     * Treat this method as a controller action.
37
     * Return view() or other content to display.
38
     */
39
    public function run()
40
    {
41
        //
42
43
        return view("widgets.recent_overtime", [
44
            'config' => $this->config,
45
        ]);
46
    }
47
}