-
Notifications
You must be signed in to change notification settings - Fork 83
Create Check_Result class #50
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
Conversation
felixarntz
left a comment
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.
@jjgrainger Left a few comments, mostly LGTM.
felixarntz
left a comment
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.
@jjgrainger Production code LGTM, left some feedback on the tests.
felixarntz
left a comment
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.
@jjgrainger Thanks, LGTM!
| /** | ||
| * Check_Result instance. | ||
| * | ||
| * @var Check_Result | ||
| */ | ||
| protected $check_result; |
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.
FYI no need to do any formal doc blocks in tests. It's good to add comments when a test method does things that may not be immediately clear on why it does so, but generally tests don't need docs.
Obviously not a blocker, it's okay to have this. But not needed :)
mukeshpanchal27
left a comment
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.
Thanks @jjgrainger The PR looks solid to me. I have only one suggestion regarding the count function.
Can we use the count function for errors and warnings? If yes, then it removes two variables from the class and the increment logic for those variables.
Ie.
public function get_error_count() {
return count( $this->errors );
}
cc. @felixarntz
|
Thanks @mukeshpanchal27 The structure of the errors and warnings arrays mean we cannot use the |
* Disallow functions: move_uploaded_file, passthru, proc_open * Adjust tests
Adds the Check_Result class
Closes #11