Passed
Push — task/application-handle-step-s... ( 5a9035...2b5b8c )
by Yonathan
04:05
created

JobApplicationStep::job_applications()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Models\Lookup;
4
5
use App\Models\BaseModel;
6
7
/**
8
 * Class Step
9
 *
10
 * @property int $id
11
 * @property int $name
12
 * @property \Jenssegers\Date\Date $created_at
13
 * @property \Jenssegers\Date\Date $updated_at
14
 *
15
 * @property \Illuminate\Database\Eloquent\Collection $job_applications
16
 */
17
class JobApplicationStep extends BaseModel
18
{
19
    public function job_applications() //phpcs:ignore
20
    {
21
        return $this->belongsToMany(
22
            \App\Models\JobApplication::class,
23
            'touched_application_steps',
24
            'step_id',
25
            'job_application_id'
26
        )->withPivot('touched');
27
    }
28
}
29