public function __construct($rating, $userNodeId) { $this->rating = (double) $rating; $this->userNodeId = (int) $userNodeId; }