Completed
Push — master ( 3f30e7...37b632 )
by Dmitry
08:21
created

Increment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 2
1
<?php
2
3
namespace Job;
4
5
use Basis\Job;
6
7
class Increment extends Job
8
{
9
    public $note;
10
11
    public function run()
12
    {
13
        $this->require('note');
14
15
        $note = $this->findOrFail('note', $this->note);
16
        $note->message = ($note->message ?: 0) + 1;
17
        $note->save();
18
19
        return compact('note');
20
    }
21
}
22