Completed
Push — master ( a6e7a2...8a3554 )
by Ryan
06:51
created

SaveTableState   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 4 1
1
<?php namespace Anomaly\Streams\Platform\Ui\Table\Command;
2
3
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
4
use Illuminate\Contracts\Bus\SelfHandling;
5
use Illuminate\Http\Request;
6
use Illuminate\Session\Store;
7
8
/**
9
 * Class SaveTableState
10
 *
11
 * @link          http://pyrocms.com/
12
 * @author        PyroCMS, Inc. <[email protected]>
13
 * @author        Ryan Thompson <[email protected]>
14
 * @package       Anomaly\Streams\Platform\Ui\Table\Command
15
 */
16
class SaveTableState implements SelfHandling
17
{
18
19
    /**
20
     * The table builder.
21
     *
22
     * @var TableBuilder
23
     */
24
    protected $builder;
25
26
    /**
27
     * Create a new SetDefaultOptions instance.
28
     *
29
     * @param TableBuilder $builder
30
     */
31
    public function __construct(TableBuilder $builder)
32
    {
33
        $this->builder = $builder;
34
    }
35
36
    /**
37
     * @param Store   $session
38
     * @param Request $request
39
     */
40
    public function handle(Store $session, Request $request)
41
    {
42
        $session->set('table::' . $request->url(), $request->getQueryString());
43
    }
44
}
45