Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | protected function convertCommitStatus($data) |
||
25 | { |
||
26 | return new GithubCommitStatusSource( |
||
27 | new GithubCommitStatusId($data['id']), |
||
28 | new GithubCommitId($this->githubRepo->getId(), new GithubCommitSha($data['sha'])), |
||
|
|||
29 | new ExternalServiceId($data['context']), |
||
30 | $data['description'], |
||
31 | $data['target_url'], |
||
32 | GithubCommitStatusStateFactory::create($data['state']), |
||
33 | new DateTime($data['created_at']), |
||
34 | new DateTime($data['updated_at']) |
||
35 | |||
36 | ); |
||
37 | } |
||
38 | } |
||
39 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: