LaravelSessionStore::flash()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GeekGhc\LaraFlash;
4
5
use Illuminate\Session\Store;
6
7
class LaravelSessionStore implements SessionStore
8
{
9
    /**
10
     * @var Store
11
     */
12
    private $session;
13
    /**
14
     * Create a new session store instance.
15
     *
16
     * @param Store $session
17
     */
18
    function __construct(Store $session)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
19
    {
20
        $this->session = $session;
21
    }
22
    /**
23
     * Flash a message to the session.
24
     *
25
     * @param string $name
26
     * @param array  $data
27
     */
28
    public function flash($name,$data)
29
    {
30
        $this->session->flash($name,$data);
31
    }
32
}