Skip to content

Commit

Permalink
throw exception in ServiceBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Dec 11, 2024
1 parent 2ec452c commit bf3ff8e
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions Core/src/ServiceBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Google\Cloud\Logging\LoggingClient;
use Google\Cloud\PubSub\PubSubClient;
use Google\Cloud\Spanner\SpannerClient;
use Google\Cloud\Speech\SpeechClient;
use Google\Cloud\Speech\V2\Client\SpeechClient;
use Google\Cloud\Storage\StorageClient;
use Google\Cloud\Trace\TraceClient;
use Google\Cloud\Translate\V2\TranslateClient;
Expand Down Expand Up @@ -268,32 +268,16 @@ public function spanner(array $config = [])
}

/**
* Google Cloud Speech enables easy integration of Google speech recognition
* technologies into developer applications. Send audio and receive a text
* transcription from the Cloud Speech API service. Find more information at
* the [Google Cloud Speech API docs](https://cloud.google.com/speech/docs/).
*
* Example:
* ```
* $speech = $cloud->speech([
* 'languageCode' => 'en-US'
* ]);
* ```
*
* @param array $config [optional] {
* Configuration options. See
* {@see \Google\Cloud\Core\ServiceBuilder::__construct()} for the other available options.
*
* @type string $languageCode The language of the content to
* be recognized. Only BCP-47 (e.g., `"en-US"`, `"es-ES"`)
* language codes are accepted. See
* [Language Support](https://cloud.google.com/speech/docs/languages)
* for a list of the currently supported language codes.
* @return SpeechClient
* @deprecated
* @see SpeechClient
* @throws \BadMethodCallException
*/
public function speech(array $config = [])
{
return $this->createClient(SpeechClient::class, 'speech', $config);
throw new \BadMethodCallException(sprintf(
'This method is no longer supported, create %s directly instead.'
SpeechClient::class

Check failure on line 279 in Core/src/ServiceBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan Static Analysis

Syntax error, unexpected T_STRING, expecting ')' on line 279
));

Check failure on line 280 in Core/src/ServiceBuilder.php

View workflow job for this annotation

GitHub Actions / PHPStan Static Analysis

Syntax error, unexpected ')' on line 280
}

/**
Expand Down

0 comments on commit bf3ff8e

Please sign in to comment.