Last active
December 10, 2016 06:48
-
-
Save brzuchal/7e1e81e53ef29e1d8700ca249e2a4776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
namespace MyTest; | |
/** | |
* @ValueObject | |
*/ | |
class MyClass { | |
/** | |
* @var int | |
* @Setter @Getter | |
*/ | |
private $age; | |
/** | |
* @var int[] | |
*/ | |
private $days = []; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
namespace MyTest; | |
/** | |
* @ValueObject | |
* @method void setAge(int $age) Sets age | |
* @method int getAge() Retrieves age | |
* @method void addDay(int $day) Adds day | |
* @method void removeDay(int $day) Removes day | |
* @method int[] getDays() Retrieves days | |
*/ | |
class MyClass { | |
/** | |
* @var int | |
* @Setter @Getter | |
*/ | |
private $age; | |
/** | |
* @var int[] | |
* @Setter @Getter | |
*/ | |
private $days = []; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
{ | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment