EncryptedCsrfTokenComposer::compose()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Http\ViewComposers\Shared;
4
5
use Illuminate\Contracts\View\View;
6
use Illuminate\Encryption\Encrypter;
7
8
class EncryptedCsrfTokenComposer
9
{
10
    public function compose(View $view)
11
    {
12
        $encryptedCsrfToken = app(Encrypter::class)->encrypt(csrf_token());
13
14
        $view->with(compact('encryptedCsrfToken'));
15
    }
16
}
17