Passed
Push — master ( ec5386...e56f88 )
by Andrey
53s queued 14s
created

UserService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createUser() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\GraphQL\Field;
6
7
use Andi\GraphQL\Attribute\Argument;
8
use Andi\GraphQL\Attribute\MutationField;
9
use App\GraphQL\Type\CreateUserRequest;
10
use App\GraphQL\Type\User;
11
12
final class UserService
13
{
14
    #[MutationField]
15
    public function createUser(#[Argument] CreateUserRequest $input): User
16
    {
17
        return new User($input->lastname, $input->firstname, $input->middlename);
18
    }
19
}
20