LaravelSessionStore   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

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