Issues (85)

app/Services/UserService.php (1 issue)

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