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

PHPCS cleanup. #156

Merged
merged 1 commit into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions includes/Classifai/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function get_watson_username() {

if ( ! empty( $creds['watson_username'] ) ) {
return $creds['watson_username'];
} else if ( defined( 'WATSON_USERNAME' ) ) {
} elseif ( defined( 'WATSON_USERNAME' ) ) {
return WATSON_USERNAME;
} else {
return '';
Expand All @@ -164,7 +164,7 @@ function get_watson_password() {

if ( ! empty( $creds['watson_password'] ) ) {
return $creds['watson_password'];
} else if ( defined( 'WATSON_PASSWORD' ) ) {
} elseif ( defined( 'WATSON_PASSWORD' ) ) {
return WATSON_PASSWORD;
} else {
return '';
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Providers/Azure/ComputerVision.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ public function setup_fields_sections() {
$this->get_option_name(),
$this->get_option_name(),
[
'label_for' => 'image_tag_taxonomy',
'options' => $options,
'label_for' => 'image_tag_taxonomy',
'options' => $options,
]
);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Taxonomy/TaxonomyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function build_all() {
public function build_if( $taxonomy, $supported_post_types = [] ) {
if ( ! $this->exists( $taxonomy ) ) {
$this->taxonomies[ $taxonomy ] = $this->build( $taxonomy );
$instance = $this->taxonomies[ $taxonomy ];
$instance = $this->taxonomies[ $taxonomy ];
$instance->register();

if ( ! empty( $supported_post_types ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Watson/Classifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function classify( $text, $options = [], $request_options = [] ) {
$body = $this->get_body( $text, $options );

$request_options['body'] = $body;
$request = $this->get_request();
$request = $this->get_request();

if ( empty( $request_options['timeout'] ) && ! empty( $options['timeout'] ) ) {
$request_options['timeout'] = $options['timeout'];
Expand Down