@@ -2059,12 +2059,8 @@ public static function formatWallMessages($messages)
2059
2059
2060
2060
/**
2061
2061
* get html data with OpenGrap passing the URL.
2062
- *
2063
- * @param $link url
2064
- *
2065
- * @return string data html
2066
2062
*/
2067
- public static function readContentWithOpenGraph ($ link )
2063
+ public static function readContentWithOpenGraph (string $ link ): string
2068
2064
{
2069
2065
if (strpos ($ link , ":// " ) === false && substr ($ link , 0 , 1 ) != "/ " ) {
2070
2066
$ link = "http:// " .$ link ;
@@ -2094,12 +2090,8 @@ public static function readContentWithOpenGraph($link)
2094
2090
2095
2091
/**
2096
2092
* verify if Url Exist - Using Curl.
2097
- *
2098
- * @param $uri url
2099
- *
2100
- * @return bool
2101
2093
*/
2102
- public static function verifyUrl ($ uri )
2094
+ public static function verifyUrl (string $ uri ): bool
2103
2095
{
2104
2096
$ curl = curl_init ($ uri );
2105
2097
curl_setopt ($ curl , CURLOPT_FAILONERROR , true );
@@ -2368,7 +2360,7 @@ function ($a, $b) {
2368
2360
/**
2369
2361
* @return string Get the JS code necessary for social wall to load open graph from URLs.
2370
2362
*/
2371
- public static function getScriptToGetOpenGraph ()
2363
+ public static function getScriptToGetOpenGraph (): string
2372
2364
{
2373
2365
return '<script>
2374
2366
$(function() {
@@ -2836,7 +2828,7 @@ public static function getExtraFieldBlock($user_id, $isArray = false)
2836
2828
break ;
2837
2829
case ExtraField::FIELD_TYPE_SOCIAL_PROFILE :
2838
2830
$ icon_path = UserManager::get_favicon_from_url ($ data );
2839
- if (self ::verifyUrl ($ icon_path ) == false ) {
2831
+ if (! self ::verifyUrl ($ icon_path )) {
2840
2832
break ;
2841
2833
}
2842
2834
$ bottom = '0.2 ' ;
0 commit comments