1 | <?php |
||
26 | class GetTranslations implements \badams\MicrosoftTranslator\ApiMethodInterface |
||
27 | { |
||
28 | /** |
||
29 | * @const Maximum allowable length of text |
||
30 | */ |
||
31 | const TEXT_MAX_LENGTH = 10000; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $text; |
||
37 | |||
38 | /** |
||
39 | * @var Language |
||
40 | */ |
||
41 | protected $to; |
||
42 | |||
43 | /** |
||
44 | * @var Language|null |
||
45 | */ |
||
46 | protected $from; |
||
47 | |||
48 | /** |
||
49 | * @var int |
||
50 | */ |
||
51 | protected $maxTranslations; |
||
52 | |||
53 | /** |
||
54 | * @var TranslateOptions |
||
55 | */ |
||
56 | protected $options; |
||
57 | |||
58 | /** |
||
59 | * Translate constructor. |
||
60 | * @param $text |
||
61 | * @param $to |
||
62 | * @param null $from |
||
63 | * @param string $contentType |
||
|
|||
64 | */ |
||
65 | 12 | public function __construct($text, $to, $from, $maxTranslations = 5, TranslateOptions $options = null) |
|
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | 6 | public function getRequestMethod() |
|
87 | |||
88 | /** |
||
89 | * @return array |
||
90 | */ |
||
91 | 6 | public function getRequestOptions() |
|
103 | |||
104 | /** |
||
105 | * @param \GuzzleHttp\Message\ResponseInterface $response |
||
106 | * @return GetTranslationsResponse |
||
107 | */ |
||
108 | 6 | public function processResponse(\GuzzleHttp\Message\ResponseInterface $response) |
|
114 | } |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.