Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php declare(strict_types=1);
- namespace MyTest;
- /**
- * @ValueObject
- */
- class MyClass {
- /**
- * @var int
- * @Setter @Getter
- */
- private $age;
- /**
- * @var int[]
- */
- private $days = [];
- public function setAge(int $age) : void
- {
- $this->age = $age;
- }
- public function getAge() : int
- {
- return $this->age;
- }
- public function addDay(int $day) : void
- {
- //...
- }
- public function removeDay(int $day) : void
- {
- // ...
- }
- /**
- * @return int[]
- */
- public function getDays() : array
- {
- // ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement