Skip to content

Instantly share code, notes, and snippets.

@mgsmus
Last active December 8, 2019 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgsmus/c2eb22f802075df8687ae32c91589b14 to your computer and use it in GitHub Desktop.
Save mgsmus/c2eb22f802075df8687ae32c91589b14 to your computer and use it in GitHub Desktop.
<?php
class User {
/** @var int $id */
private $id;
/** @var string $name */
private $name;
public function __construct(int $id, string $name) {
$this->id = $id;
$this->name = $name;
}
public function getId(): int {
return $this->id;
}
public function setId(int $id): void {
$this->id = $id;
}
public function getName(): string {
return $this->name;
}
public function setName(string $name): void {
$this->name = $name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment