-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added support for phone, address and questions #1
Conversation
* @param Mixed String|Array | ||
*/ | ||
public function addQuestion($path, $question, $answer) { | ||
$answers = !is_array($answer) ? [['id' => '', 'text' => $answer]] : $answer; |
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.
It's best not to use boolean inversions if not necessary (i.e. remove the '!')
comment blocks should start with a /** instead of a /* to take advantage of PHPdoc |
I will be taking over changes to this pull request |
Please don't merge until squashed - if you're happy with these changes, let me know to squash first before you merge |
/* These variables should only be attached to the request on the server side */ | ||
$clientId = 19; | ||
$projectId = 6; | ||
/** |
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.
Use '/*' for comment blocks that aren't phpdoc
b1fff5e
to
3261bff
Compare
Fixed /** to /* comments in signup.php and squashed. |
remove unused variables
postal code no longer set to state
* primary: true | ||
* } | ||
*/ | ||
private $addresses; |
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.
Not initialized as an array, might be an issue with line 151
initialized address to array
added notes to the available fields
$lassoUid = ''; | ||
$apiKey = ''; | ||
|
||
if (empty($clientId) || empty($projectId) || empty($apiKey)) { |
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.
I like this. Error messages should give hints how to fix said error.
Added support for phone, address and questions
@todo feedback on the register button
@todo error on missing required params (projectId, clientId, etc)
@todo make configuation more obvious