Skip to content

Commit f64c774

Browse files
author
Matt Humphrey
committed
Remove id property from Note modal. Fixes #87
1 parent 3372a41 commit f64c774

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/Gitlab/Model/Note.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
/**
66
* Class Note
77
*
8-
* @property-read int $id
98
* @property-read User $author
109
* @property-read string $body
1110
* @property-read string $created_at
@@ -20,7 +19,6 @@ class Note extends AbstractModel
2019
* @var array
2120
*/
2221
protected static $properties = array(
23-
'id',
2422
'author',
2523
'body',
2624
'created_at',
@@ -38,7 +36,7 @@ class Note extends AbstractModel
3836
*/
3937
public static function fromArray(Client $client, Noteable $type, array $data)
4038
{
41-
$comment = new static($type, $data['id'], $client);
39+
$comment = new static($type, $client);
4240

4341
if (isset($data['author'])) {
4442
$data['author'] = User::fromArray($client, $data['author']);
@@ -49,14 +47,12 @@ public static function fromArray(Client $client, Noteable $type, array $data)
4947

5048
/**
5149
* @param Noteable $type
52-
* @param int $id
5350
* @param Client $client
5451
*/
55-
public function __construct(Noteable $type, $id = null, Client $client = null)
52+
public function __construct(Noteable $type, Client $client = null)
5653
{
5754
$this->setClient($client);
5855
$this->setData('parent_type', get_class($type));
5956
$this->setData('parent', $type);
60-
$this->setData('id', $id);
6157
}
6258
}

0 commit comments

Comments
 (0)