Skip to content

Commit

Permalink
Resolve PHPcs build issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
JayWood committed Jun 27, 2019
1 parent 9007082 commit 4962ed8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classifai.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function classifai_autorun() {
* Generate a notice if autoload fails.
*/
function classifai_autoload_notice() {
printf( '<div class="%1$s"><p>%2$s</p></div>', 'notice notice-error', get_error_install_message() );
printf( '<div class="%1$s"><p>%2$s</p></div>', 'notice notice-error', get_error_install_message() ); // @codingStandardsIgnoreLine Text is escaped in calling function already.
error_log( get_error_install_message() );
}

Expand Down
7 changes: 4 additions & 3 deletions includes/Classifai/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function get_plugin() {
*/
function get_plugin_settings( $service = '' ) {
$services = Plugin::$instance->services;
if ( empty( $services ) || empty( $services['service_manager'] ) || ! $services['service_manager'] instanceof ServicesManager ) {
if ( empty( $services ) || empty( $services['service_manager'] ) || ! $services['service_manager'] instanceof ServicesManager ) {
return [];
}

Expand Down Expand Up @@ -77,11 +77,12 @@ function reset_plugin_settings() {
$options = get_option( 'classifai_settings' );
if ( $options && isset( $options['registration'] ) ) {
// This is a legacy option set, so let's update it to the new format.
update_option( 'classifai_settings', [
$new_settings = [
'valid_license' => $options['valid_license'],
'email' => isset( $options['registration']['email'] ) ? $options['registration']['email'] : '',
'license_key' => isset( $options['registration']['license_key'] ) ? $options['registration']['license_key'] : '',
] );
];
update_option( 'classifai_settings', $new_settings );
}

$services = get_plugin()->services;
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function init_services() {
'classifai_services',
[
'language_processing' => 'Classifai\Services\LanguageProcessing',
'image_processing' => 'Classifai\Services\ImageProcessing'
'image_processing' => 'Classifai\Services\ImageProcessing',
]
);

Expand Down

0 comments on commit 4962ed8

Please sign in to comment.