Some fixes:

- $gsid's default value cannot sadly be 0, it now must be null to allow some
  code work
- added some more type-hints
- documented a bit more
This commit is contained in:
Roland Häder 2022-06-16 20:42:40 +02:00
parent 4e53666c70
commit 33768ea1c6
8 changed files with 21 additions and 15 deletions

View file

@ -165,7 +165,7 @@ class Strings
* @return string Formatted network name
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function formatNetworkName($network, $url = '')
public static function formatNetworkName(string $network, string $url = ''): string
{
if ($network != '') {
if ($url != '') {
@ -176,6 +176,8 @@ class Strings
return $network_name;
}
return '';
}
/**
@ -187,7 +189,7 @@ class Strings
*
* @return string Transformed string.
*/
public static function deindent($text, $chr = "[\t ]", $count = NULL)
public static function deindent(string $text, string $chr = "[\t ]", int $count = null)
{
$lines = explode("\n", $text);