X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FFileTag.php;h=eded02a0a63f0ff3ebfc23107e6e3a4213c6665d;hb=2172d44c33893bb92207a494f2501f2c37afdfca;hp=a5824f5347ca67a2f3a0115f22206d55b3547567;hpb=96402e306a4ea448f64df0f36346c05dcf221ab8;p=friendica.git diff --git a/src/Model/FileTag.php b/src/Model/FileTag.php index a5824f5347..eded02a0a6 100644 --- a/src/Model/FileTag.php +++ b/src/Model/FileTag.php @@ -1,16 +1,28 @@ . + * */ namespace Friendica\Model; -use Friendica\Core\L10n; -use Friendica\Core\PConfig; -use Friendica\Database\DBA; - /** - * @brief This class handles FileTag related functions + * This class handles FileTag related functions * * post categories and "save to file" use the same item.file table for storage. * We will differentiate the different uses by wrapping categories in angle brackets @@ -20,75 +32,50 @@ use Friendica\Database\DBA; class FileTag { /** - * @brief URL encode <, >, left and right brackets + * URL encode <, >, left and right brackets * * @param string $s String to be URL encoded. - * * @return string The URL encoded string. */ - public static function encode($s) + private static function encode(string $s): string { return str_replace(['<', '>', '[', ']'], ['%3c', '%3e', '%5b', '%5d'], $s); } /** - * @brief URL decode <, >, left and right brackets + * URL decode <, >, left and right brackets * * @param string $s The URL encoded string to be decoded - * * @return string The decoded string. */ - public static function decode($s) + private static function decode(string $s): string { return str_replace(['%3c', '%3e', '%5b', '%5d'], ['<', '>', '[', ']'], $s); } /** - * @brief Query files for tag + * Get file tags from array * - * @param string $table The table to be queired. - * @param string $s The search term - * @param string $type Optional file type. + * ex. given [music,video] return