Passed
Push — master ( 85c419...35703b )
by Arthur
07:22
created

MutatesRequest::injectUserId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
nc 1
nop 1
dl 0
loc 3
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arthur
5
 * Date: 29.10.18
6
 * Time: 16:29
7
 */
8
9
namespace Foundation\Traits;
10
11
12
trait MutatesRequest
13
{
14
    public function injectUserId($request): array
15
    {
16
        return array_merge($request->toArray(), ['user_id' => get_authenticated_user_id()]);
17
    }
18
}
19