Passed
Pull Request — 2.x (#1140)
by
unknown
08:55
created

HandleNesting::setNewOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace A17\Twill\Repositories\Behaviors;
4
5
use A17\Twill\Jobs\ReorderNestedModuleItems;
6
7
trait HandleNesting
8
{
9
    /**
10
     * The Laravel queue name to be used for the reordering operation.
11
     *
12
     * @var string
13
     */
14
    protected $reorderNestedModuleItemsJobQueue = 'default';
15
16
    public function setNewOrder($ids)
17
    {
18
        ReorderNestedModuleItems::dispatch($this->model, $ids)
19
            ->onQueue($this->reorderNestedModuleItemsJobQueue);
20
    }
21
}
22