Summary   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 6

4 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 4 1
A render() 0 3 1
A remove() 0 3 1
A mount() 0 6 3
1
<?php
2
3
namespace Adminetic\Website\Http\Livewire\Admin\Career;
4
5
use Adminetic\Website\Models\Admin\Career;
6
use Livewire\Component;
7
8
class Summary extends Component
9
{
10
    public $career_id;
11
    public $updateMode = false;
12
    public $removes = [];
13
    public $summary = [];
14
    public $i = 0;
15
16
    public function mount($career_id = null)
17
    {
18
        $this->career_id = $career_id;
19
        $career = Career::find($career_id);
20
        $this->i = isset($career->summary) ? count($career->summary) : 0;
21
        $this->summary = isset($career->summary) ? $career->summary : [];
22
    }
23
24
    public function add($i)
25
    {
26
        $i += 1;
27
        $this->i = $i;
28
    }
29
30
    public function remove($key)
31
    {
32
        array_push($this->removes, $key);
33
    }
34
35
    public function render()
36
    {
37
        return view('website::livewire.admin.career.summary');
38
    }
39
}
40