[UTIL][FORM] Add form transformer array <--> string

This commit is contained in:
Hugo Sales 2020-07-30 22:51:07 +00:00 committed by Hugo Sales
parent 9291bfbecb
commit 0ca169aad2
1 changed files with 7 additions and 5 deletions

View File

@ -21,7 +21,7 @@
* Handle network public feed
*
* @package GNUsocial
* @category Controller
* @category Form
*
* @author Hugo Sales <hugo@fc.up.pt>
* @copyright 2020 Free Software Foundation, Inc http://www.fsf.org
@ -36,10 +36,12 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
class ArrayTransformer implements DataTransformerInterface
{
// Can't use type annotations, to conform to interface
/**
* Array to string, but can't use type annotations
* @param array $a
*
* @param mixed $a
* @return string
*/
public function transform($a)
{
@ -50,9 +52,9 @@ class ArrayTransformer implements DataTransformerInterface
}
/**
* String to array, but can't use type annotations
* @param string $s
*
* @param mixed $s
* @return array
*/
public function reverseTransform($s)
{