Skip to content

Conversation

@manadinho
Copy link

No description provided.

'message'=>'Voting completed successfully'
'status' => $status,
'message' => $message
]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
]);
], $status);

return $this->response(200, 'Voting completed successfully');
}

public function response($status = 200, $message = '')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional parameters should be at the end. In this case 200 should be the default, so it would make more sense this way. And because the message should always be set you can remove the empty string as default :)

Suggested change
public function response($status = 200, $message = '')
public function response($message, $status = 200)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants