| 1 | <?php |
||
| 10 | class Speak implements \badams\MicrosoftTranslator\ApiMethodInterface |
||
| 11 | { |
||
| 12 | const FORMAT_MP3 = 'audio/mp3'; |
||
| 13 | const FORMAT_WAV = 'audio/wav'; |
||
| 14 | |||
| 15 | const OPTION_MAX_QUALITY = 'MaxQuality'; |
||
| 16 | const OPTION_MIN_SIZE = 'MinSize'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $language; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $text; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $format; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | protected $options; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Translate constructor. |
||
| 40 | * @param $text |
||
| 41 | * @param $to |
||
| 42 | * @param null $from |
||
|
|
|||
| 43 | */ |
||
| 44 | 3 | public function __construct($text, $language, $format = Speak::FORMAT_MP3, $options = Speak::OPTION_MAX_QUALITY) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | 3 | public function getRequestMethod() |
|
| 59 | |||
| 60 | /** |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | 3 | public function getRequestOptions() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @param \GuzzleHttp\Message\ResponseInterface $response |
||
| 75 | * @return string |
||
| 76 | */ |
||
| 77 | 3 | public function processResponse(\GuzzleHttp\Message\ResponseInterface $response) |
|
| 81 | |||
| 82 | |||
| 83 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.