Completed
Push — master ( e8f4f9...613029 )
by Song
02:23
created

Loading   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A display() 0 10 2
1
<?php
2
3
namespace Encore\Admin\Grid\Displayers;
4
5
use Illuminate\Support\Arr;
6
7
class Loading extends AbstractDisplayer
8
{
9
    public function display($values = [], $others = [])
10
    {
11
        $values = (array) $values;
12
13
        if (in_array($this->value, $values)) {
14
            return "<i class=\"fa fa-refresh fa-spin text-primary\"></i>";
15
        }
16
17
        return Arr::get($others, $this->value, $this->value);
18
    }
19
}
20