Completed
Push — master ( 42ea31...2719b0 )
by recca
02:01
created

LaravelPanel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setLaravel() 0 8 2
A hasLaravel() 0 4 1
1
<?php
2
3
namespace Recca0120\LaravelTracy\Panels;
4
5
use Illuminate\Contracts\Foundation\Application;
6
7
trait LaravelPanel
8
{
9
    /**
10
     * $laravel description.
11
     *
12
     * @var \Illuminate\Contracts\Foundation\Application
13
     */
14
    protected $laravel;
15
16
    /**
17
     * setLaravel.
18
     *
19
     * @param \Illuminate\Contracts\Foundation\Application $laravel
20
     * @return static
21
     */
22
    public function setLaravel(Application $laravel = null)
23
    {
24
        if (is_null($laravel) === false) {
25
            $this->laravel = $laravel;
26
        }
27
28
        return $this;
29
    }
30
31
    /**
32
     * has laravel.
33
     *
34
     * @return bool
35
     */
36
    protected function hasLaravel()
37
    {
38
        return is_a($this->laravel, Application::class);
39
    }
40
}
41