EncryptedCsrfTokenComposer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

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