aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/DataTransformer
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-12-08 09:35:27 +0100
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-12-08 09:35:27 +0100
commitda2240f9d409a8301a1d469823a265780e6f1b7b (patch)
tree23c7c5cee6aefbbf8ec058ac99f4729c7be4ac3e /src/Wallabag/CoreBundle/Form/DataTransformer
parenta7f1921f7db312b5def3839393357f443dcbb52c (diff)
parent347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e (diff)
downloadwallabag-da2240f9d409a8301a1d469823a265780e6f1b7b.tar.gz
wallabag-da2240f9d409a8301a1d469823a265780e6f1b7b.tar.zst
wallabag-da2240f9d409a8301a1d469823a265780e6f1b7b.zip
Merge pull request #1529 from wallabag/v2-taggingrule-tablename
changed table name for tagging rule
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/DataTransformer')
-rw-r--r--src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php b/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php
index 23488d35..b712ad15 100644
--- a/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php
+++ b/src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php
@@ -2,13 +2,11 @@
2 2
3namespace Wallabag\CoreBundle\Form\DataTransformer; 3namespace Wallabag\CoreBundle\Form\DataTransformer;
4 4
5use Doctrine\Common\Persistence\ObjectManager;
6use Symfony\Component\Form\DataTransformerInterface; 5use Symfony\Component\Form\DataTransformerInterface;
7use Symfony\Component\Form\Exception\TransformationFailedException;
8 6
9/** 7/**
10 * Transforms a comma-separated list to a proper PHP array. 8 * Transforms a comma-separated list to a proper PHP array.
11 * Example: the string "foo, bar" will become the array ["foo", "bar"] 9 * Example: the string "foo, bar" will become the array ["foo", "bar"].
12 */ 10 */
13class StringToListTransformer implements DataTransformerInterface 11class StringToListTransformer implements DataTransformerInterface
14{ 12{
@@ -44,14 +42,14 @@ class StringToListTransformer implements DataTransformerInterface
44 /** 42 /**
45 * Transforms a string to a list. 43 * Transforms a string to a list.
46 * 44 *
47 * @param string $string 45 * @param string $string
48 * 46 *
49 * @return array|null 47 * @return array|null
50 */ 48 */
51 public function reverseTransform($string) 49 public function reverseTransform($string)
52 { 50 {
53 if ($string === null) { 51 if ($string === null) {
54 return null; 52 return;
55 } 53 }
56 54
57 return array_values(array_filter(array_map('trim', explode($this->separator, $string)))); 55 return array_values(array_filter(array_map('trim', explode($this->separator, $string))));