Skip to content

Commit

Permalink
remove more dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Feb 2, 2024
1 parent e91626f commit 4a624e3
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 71 deletions.
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/Azure/ComputerVision.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ class ComputerVision extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'Microsoft Azure',
'AI Vision',
'computer_vision'
);

$this->feature_instance = $feature_instance;
}

Expand Down
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/Azure/Personalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ class Personalizer extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'Microsoft Azure',
'AI Personalizer',
'personalizer'
);

$this->feature_instance = $feature_instance;

add_action( 'rest_api_init', [ $this, 'register_endpoints' ] );
Expand Down
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/Azure/Speech.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ class Speech extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'Microsoft Azure',
self::FEATURE_NAME,
'azure_text_to_speech'
);

$this->feature_instance = $feature_instance;

do_action( 'classifai_' . static::ID . '_init', $this );
Expand Down
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/OpenAI/ChatGPT.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ class ChatGPT extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'OpenAI ChatGPT',
'ChatGPT',
'openai_chatgpt'
);

$this->feature_instance = $feature_instance;
}

Expand Down
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/OpenAI/DallE.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ class DallE extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'OpenAI',
'DALL·E',
'openai_dalle'
);

$this->feature_instance = $feature_instance;
}

Expand Down
7 changes: 0 additions & 7 deletions includes/Classifai/Providers/OpenAI/Embeddings.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ class Embeddings extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'OpenAI Embeddings',
'Embeddings',
'openai_embeddings',
$feature_instance
);

$this->feature_instance = $feature_instance;
}

Expand Down
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/OpenAI/Whisper.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ class Whisper extends Provider {
* @param \Classifai\Features\Feature $feature_instance The feature instance.
*/
public function __construct( $feature_instance = null ) {
parent::__construct(
'OpenAI Whisper',
'Whisper',
'openai_whisper'
);

$this->feature_instance = $feature_instance;
}

Expand Down
21 changes: 0 additions & 21 deletions includes/Classifai/Providers/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@ abstract class Provider {
*/
protected $features = array();

/**
* Provider constructor.
*
* @param string $provider_name The name of the Provider that will appear in the admin tab
* @param string $provider_service_name The name of the Service.
* @param string $option_name Name of the option where the provider settings are stored.
*/
public function __construct( string $provider_name, string $provider_service_name, string $option_name ) {
$this->provider_name = $provider_name;
$this->provider_service_name = $provider_service_name;
$this->option_name = $option_name;
}

/**
* Provides the provider name.
Expand All @@ -58,15 +46,6 @@ public function get_provider_name(): string {
return $this->provider_name;
}

/**
* Returns the name of the settings section for this provider.
*
* @return string
*/
public function get_settings_section(): string {
return $this->option_name;
}

/**
* Get provider features.
*
Expand Down
6 changes: 0 additions & 6 deletions includes/Classifai/Providers/Watson/NLU.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ class NLU extends Provider {
* @param \Classifai\Features\Feature $feature Feature instance (Optional, only required in admin).
*/
public function __construct( $feature = null ) {
parent::__construct(
'IBM Watson',
'Natural Language Understanding',
'watson_nlu'
);

$this->nlu_features = [
'category' => [
'feature' => __( 'Category', 'classifai' ),
Expand Down
1 change: 0 additions & 1 deletion includes/Classifai/Services/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public function get_display_name(): string {
* Render the start of a settings page. The rest is added by the providers
*/
public function render_settings_page() {
$active_tab = $this->provider_classes ? $this->provider_classes[0]->get_settings_section() : '';
$active_tab = isset( $_GET['provider'] ) ? sanitize_text_field( wp_unslash( $_GET['provider'] ) ) : $active_tab; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
$base_url = add_query_arg(
array(
Expand Down

0 comments on commit 4a624e3

Please sign in to comment.