AbstractSubscriablePanel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
subscribe() 0 1 ?
A setLaravel() 0 9 2
1
<?php
2
3
namespace Recca0120\LaravelTracy\Panels;
4
5
use Illuminate\Contracts\Foundation\Application;
6
7
abstract class AbstractSubscriablePanel extends AbstractPanel
8
{
9
    /**
10
     * setLaravel.
11
     *
12
     * @param \Illuminate\Contracts\Foundation\Application $laravel
13
     * @return $this
14
     */
15 7
    public function setLaravel(Application $laravel = null)
16
    {
17 7
        parent::setLaravel($laravel);
18 7
        if ($this->hasLaravel() === true) {
19 7
            $this->subscribe();
20
        }
21
22 7
        return $this;
23
    }
24
25
    /**
26
     * subscribe.
27
     */
28
    abstract protected function subscribe();
29
}
30