Skip to content

Commit

Permalink
Define method Basicis\Model\Model::setId() to fix error acordding wit…
Browse files Browse the repository at this point in the history
…h issue #52
  • Loading branch information
messiasdias committed May 16, 2021
1 parent f1b797b commit a617819
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ public function getProtecteds() : array
return $this->protecteds;
}

/**
* Function setId
* Set entity ID (unique on system identification)
* @param int $id
* @return Model
*/
public function setId(int $id = null) : Model
{
if ($id > 0) {
$this->id = $id;
}
return $this;
}

/**
* Function getId
* Return entity ID (unique on system identification)
Expand Down

0 comments on commit a617819

Please sign in to comment.