Passed
Pull Request — 2.x (#1140)
by
unknown
05:56
created

HandleNesting   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setNewOrder() 0 4 1
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