Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php-symfony] Fix return type in model setters. #6085

Merged
merged 3 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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}}){{#vendorExtensions.x-parameter-type}}: {{^required}}?{{/required}}{{vendorExtensions.x-parameter-type}}{{/vendorExtensions.x-parameter-type}}
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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): ?\DateTime
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
Original file line number Diff line number Diff line change
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): ?Category
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): array
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): ?array
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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