Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
Add return self type hint for setters
Browse files Browse the repository at this point in the history
  • Loading branch information
reznikartem committed Apr 29, 2020
1 parent 0b7c075 commit 07dd971
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
Expand Up @@ -35,7 +35,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}
*
* @return $this
*/
public function {{setter}}({{#vendorExtensions.x-parameter-type}}{{vendorExtensions.x-parameter-type}} {{/vendorExtensions.x-parameter-type}}${{name}}{{^required}} = null{{/required}})
public function {{setter}}({{#vendorExtensions.x-parameter-type}}{{vendorExtensions.x-parameter-type}} {{/vendorExtensions.x-parameter-type}}${{name}}{{^required}} = null{{/required}}): self
{
$this->{{name}} = ${{name}};

Expand Down
Expand Up @@ -95,7 +95,7 @@ public function getCode()
*
* @return $this
*/
public function setCode($code = null)
public function setCode($code = null): self
{
$this->code = $code;

Expand All @@ -119,7 +119,7 @@ public function getType()
*
* @return $this
*/
public function setType($type = null)
public function setType($type = null): self
{
$this->type = $type;

Expand All @@ -143,7 +143,7 @@ public function getMessage()
*
* @return $this
*/
public function setMessage($message = null)
public function setMessage($message = null): self
{
$this->message = $message;

Expand Down
Expand Up @@ -86,7 +86,7 @@ public function getId()
*
* @return $this
*/
public function setId($id = null)
public function setId($id = null): self
{
$this->id = $id;

Expand All @@ -110,7 +110,7 @@ public function getName()
*
* @return $this
*/
public function setName($name = null)
public function setName($name = null): self
{
$this->name = $name;

Expand Down
Expand Up @@ -125,7 +125,7 @@ public function getId()
*
* @return $this
*/
public function setId($id = null)
public function setId($id = null): self
{
$this->id = $id;

Expand All @@ -149,7 +149,7 @@ public function getPetId()
*
* @return $this
*/
public function setPetId($petId = null)
public function setPetId($petId = null): self
{
$this->petId = $petId;

Expand All @@ -173,7 +173,7 @@ public function getQuantity()
*
* @return $this
*/
public function setQuantity($quantity = null)
public function setQuantity($quantity = null): self
{
$this->quantity = $quantity;

Expand All @@ -197,7 +197,7 @@ public function getShipDate(): ?\DateTime
*
* @return $this
*/
public function setShipDate(\DateTime $shipDate = null)
public function setShipDate(\DateTime $shipDate = null): self
{
$this->shipDate = $shipDate;

Expand All @@ -221,7 +221,7 @@ public function getStatus()
*
* @return $this
*/
public function setStatus($status = null)
public function setStatus($status = null): self
{
$this->status = $status;

Expand All @@ -245,7 +245,7 @@ public function isComplete()
*
* @return $this
*/
public function setComplete($complete = null)
public function setComplete($complete = null): self
{
$this->complete = $complete;

Expand Down
Expand Up @@ -131,7 +131,7 @@ public function getId()
*
* @return $this
*/
public function setId($id = null)
public function setId($id = null): self
{
$this->id = $id;

Expand All @@ -155,7 +155,7 @@ public function getCategory(): ?Category
*
* @return $this
*/
public function setCategory(Category $category = null)
public function setCategory(Category $category = null): self
{
$this->category = $category;

Expand All @@ -179,7 +179,7 @@ public function getName()
*
* @return $this
*/
public function setName($name)
public function setName($name): self
{
$this->name = $name;

Expand All @@ -203,7 +203,7 @@ public function getPhotoUrls(): array
*
* @return $this
*/
public function setPhotoUrls(array $photoUrls)
public function setPhotoUrls(array $photoUrls): self
{
$this->photoUrls = $photoUrls;

Expand All @@ -227,7 +227,7 @@ public function getTags(): ?array
*
* @return $this
*/
public function setTags(array $tags = null)
public function setTags(array $tags = null): self
{
$this->tags = $tags;

Expand All @@ -251,7 +251,7 @@ public function getStatus()
*
* @return $this
*/
public function setStatus($status = null)
public function setStatus($status = null): self
{
$this->status = $status;

Expand Down
Expand Up @@ -86,7 +86,7 @@ public function getId()
*
* @return $this
*/
public function setId($id = null)
public function setId($id = null): self
{
$this->id = $id;

Expand All @@ -110,7 +110,7 @@ public function getName()
*
* @return $this
*/
public function setName($name = null)
public function setName($name = null): self
{
$this->name = $name;

Expand Down
Expand Up @@ -142,7 +142,7 @@ public function getId()
*
* @return $this
*/
public function setId($id = null)
public function setId($id = null): self
{
$this->id = $id;

Expand All @@ -166,7 +166,7 @@ public function getUsername()
*
* @return $this
*/
public function setUsername($username = null)
public function setUsername($username = null): self
{
$this->username = $username;

Expand All @@ -190,7 +190,7 @@ public function getFirstName()
*
* @return $this
*/
public function setFirstName($firstName = null)
public function setFirstName($firstName = null): self
{
$this->firstName = $firstName;

Expand All @@ -214,7 +214,7 @@ public function getLastName()
*
* @return $this
*/
public function setLastName($lastName = null)
public function setLastName($lastName = null): self
{
$this->lastName = $lastName;

Expand All @@ -238,7 +238,7 @@ public function getEmail()
*
* @return $this
*/
public function setEmail($email = null)
public function setEmail($email = null): self
{
$this->email = $email;

Expand All @@ -262,7 +262,7 @@ public function getPassword()
*
* @return $this
*/
public function setPassword($password = null)
public function setPassword($password = null): self
{
$this->password = $password;

Expand All @@ -286,7 +286,7 @@ public function getPhone()
*
* @return $this
*/
public function setPhone($phone = null)
public function setPhone($phone = null): self
{
$this->phone = $phone;

Expand All @@ -310,7 +310,7 @@ public function getUserStatus()
*
* @return $this
*/
public function setUserStatus($userStatus = null)
public function setUserStatus($userStatus = null): self
{
$this->userStatus = $userStatus;

Expand Down

0 comments on commit 07dd971

Please sign in to comment.