Issues (181)

Response/Builder/UpdatedUsersResponseBuilder.php (15 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace SchulIT\IdpExchange\Response\Builder;
4
5
use SchulIT\IdpExchange\Response\UserUpdateInformation;
6
use SchulIT\IdpExchange\Response\UpdatedUsersResponse;
7
8
class UpdatedUsersResponseBuilder {
0 ignored issues
show
Missing doc comment for class UpdatedUsersResponseBuilder
Loading history...
Opening brace of a class must be on the line after the definition
Loading history...
9
10
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
11
     * @var UserUpdateInformation[]
12
     */
13
    private $users = [ ];
0 ignored issues
show
Private member variable "users" must be prefixed with an underscore
Loading history...
14
15
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
16
     * @param string $username
0 ignored issues
show
Missing parameter comment
Loading history...
Expected 4 spaces after parameter type; 1 found
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
17
     * @param \DateTime $updated
0 ignored issues
show
Missing parameter comment
Loading history...
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
18
     * @return UpdatedUsersResponseBuilder
0 ignored issues
show
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
19
     */
20 1
    public function addUser(string $username, \DateTime $updated): UpdatedUsersResponseBuilder {
0 ignored issues
show
Opening brace should be on a new line
Loading history...
21 1
        $user = new UserUpdateInformation();
22 1
        $user->username = $username;
23 1
        $user->updated = $updated;
24
25 1
        $this->users[] = $user;
26 1
        return $this;
27
    }
28
29
    /**
0 ignored issues
show
Missing short description in doc comment
Loading history...
30
     * @return UpdatedUsersResponse
31
     */
32 1
    public function build(): UpdatedUsersResponse {
0 ignored issues
show
Opening brace should be on a new line
Loading history...
33 1
        $response = new UpdatedUsersResponse();
34 1
        $response->users = $this->users;
35
36 1
        return $response;
37
    }
38
}