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

BarRenderListener   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A handle() 0 4 3
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