Skip to content

Commit a3a946b

Browse files
authored
Merge pull request #8 from thomascorthals/phpdoc-fixes
PHPdoc fixes
2 parents 0bcacd7 + 2de8717 commit a3a946b

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

lib/DetectLanguage/Client.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ protected static function getUrl($method)
149149
return self::getProtocol() . '://' . DetectLanguage::$host . '/' . DetectLanguage::$apiVersion . '/' . $method;
150150
}
151151

152+
/**
153+
* Get protocol for request.
154+
*
155+
* @return string 'https' or 'http'
156+
*/
152157
protected static function getProtocol()
153158
{
154159
return DetectLanguage::$secure ? 'https' : 'http';
@@ -157,7 +162,7 @@ protected static function getProtocol()
157162
/**
158163
* Build request headers.
159164
*
160-
* @return string
165+
* @return array
161166
*/
162167
protected static function getHeaders()
163168
{
@@ -169,6 +174,11 @@ protected static function getHeaders()
169174
);
170175
}
171176

177+
/**
178+
* Get User-Agent for the request.
179+
*
180+
* @return string
181+
*/
172182
protected static function getUserAgent()
173183
{
174184
return 'detectlanguage-php-' . DetectLanguage::VERSION;

lib/DetectLanguage/DetectLanguage.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class DetectLanguage
5050
* Set API key
5151
*
5252
* @static
53-
* @var string
53+
* @param string $apiKey
5454
*/
5555
public static function setApiKey($apiKey)
5656
{
@@ -61,7 +61,7 @@ public static function setApiKey($apiKey)
6161
* Set secure mode
6262
*
6363
* @static
64-
* @var boolean
64+
* @param boolean $secure
6565
*/
6666
public static function setSecure($secure)
6767
{
@@ -72,7 +72,7 @@ public static function setSecure($secure)
7272
* Detect text language.
7373
*
7474
* @static
75-
* @param string @text The text for language detection
75+
* @param string $text The text for language detection
7676
* @return array detected languages information
7777
*/
7878
public static function detect($text)
@@ -86,8 +86,8 @@ public static function detect($text)
8686
* Simple detection. If you need just the language code.
8787
*
8888
* @static
89-
* @param string @text The text for language detection
90-
* @return string detected language code
89+
* @param string $text The text for language detection
90+
* @return string|null detected language code
9191
*/
9292
public static function simpleDetect($text)
9393
{

0 commit comments

Comments
 (0)