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

Loading::display()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
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