Skip to content

Commit 4f88191

Browse files
committed
Fixed some missing factories.
1 parent 7718f72 commit 4f88191

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Gitlab/Model/MergeRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public static function fromArray(Project $project, array $data)
2222
$mr = new MergeRequest($project, $data['id']);
2323

2424
if (isset($data['author'])) {
25-
$data['author'] = new User($data['author']);
25+
$data['author'] = User::fromArray($data['author']);
2626
}
2727

2828
if (isset($data['assignee'])) {
29-
$data['assignee'] = new User($data['assignee']);
29+
$data['assignee'] = User::fromArray($data['assignee']);
3030
}
3131

3232
return $mr->hydrate($data);

lib/Gitlab/Model/Note.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static function fromArray($type, array $data)
2020
$comment = new Note($type);
2121

2222
if (isset($data['author'])) {
23-
$data['author'] = new User($data['author']);
23+
$data['author'] = User::fromArray($data['author']);
2424
}
2525

2626
return $comment->hydrate($data);

0 commit comments

Comments
 (0)