Test Failed
Push — master ( 20d9e4...ed42d0 )
by Burak
05:25
created

UserService::find()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace App\Services;
4
5
use App\Interfaces\UserServiceInterface;
6
use App\Models\User;
7
8
class UserService implements UserServiceInterface
9
{
10
    /**
11
     * Find user.
12
     *
13
     * @param string $id
14
     * @return User
15
     */
16
    public function find(string $id): User
17
    {
18
        return User::find($id);
0 ignored issues
show
Bug Best Practice introduced by
The expression return App\Models\User::find($id) could return the type null which is incompatible with the type-hinted return App\Models\User. Consider adding an additional type-check to rule them out.
Loading history...
19
    }
20
}
21