-
Notifications
You must be signed in to change notification settings - Fork 27
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
Minor update #3
base: master
Are you sure you want to change the base?
Minor update #3
Conversation
- Reformat code to PSR2 - Refactor code using 'return first' technique - Add tests
public function sendTextCard($text, $buttons) | ||
{ | ||
if (! is_array($buttons)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should return FALSE to be able to check later.
public function sendGallery($elements) | ||
{ | ||
if (! is_array($elements)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same to here.
public function createElement($title, $image, $subTitle, $buttons) | ||
{ | ||
if (! $this->isURL($image) || ! is_array($buttons)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same to here.
public function createButtonToURL($title, $url, $setAttributes = null) | ||
{ | ||
if (! $this->isURL($url)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same to here.
public function createPostBackButton($title, $url) | ||
{ | ||
if (! $this->isURL($url)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same to here.
public function createQuickReply($text, $quickReplies) | ||
{ | ||
if (! is_array($quickReplies)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same to here.
Reformat code to PSR2
Refactor code using 'return first' technique
Add tests