Passed
Push — stage ( 431749...1ed9d9 )
by Jon
06:09
created

BarRenderListener::handle()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 3
eloc 2
nc 2
nop 1
1
<?php
2
3
namespace App\Listeners;
4
5
use Recca0120\LaravelTracy\Events\BeforeBarRender;
6
7
class BarRenderListener
8
{
9
    /**
10
     * Create the event listener.
11
     *
12
     * @return void
13
     */
14
    public function __construct()
15
    {
16
        //
17
    }
18
19
    /**
20
     * Handle the event.
21
     *
22
     * @param  BeforeBarRender  $event
23
     * @return void
24
     */
25
    public function handle(BeforeBarRender $event)
26
    {
27
        if (isset($_SESSION['_tracy']) && ! is_array($_SESSION['_tracy'])) {
28
            $_SESSION['_tracy'] = [];
29
        }
30
    }
31
}
32