[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 3e6eb114c4
commit 48252d6b8c
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -21,7 +21,7 @@
* Handle network public feed * Handle network public feed
* *
* @package GNUsocial * @package GNUsocial
* @category Controller * @category Form
* *
* @author Hugo Sales <hugo@fc.up.pt> * @author Hugo Sales <hugo@fc.up.pt>
* @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org
@ -36,10 +36,12 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
class ArrayTransformer implements DataTransformerInterface 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) 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) public function reverseTransform($s)
{ {