aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-12-08 09:20:03 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2015-12-08 09:20:03 +0100
commit347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e (patch)
tree23c7c5cee6aefbbf8ec058ac99f4729c7be4ac3e /src/Wallabag/CoreBundle/Form
parentc5d0db8b71a8c1bb6b5c08763b44e14b4f876d06 (diff)
downloadwallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.tar.gz
wallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.tar.zst
wallabag-347fa6beb0bd3fafd5f722c8ce2e2b3915e4e82e.zip
php cs
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
-rw-r--r--src/Wallabag/CoreBundle/Form/DataTransformer/StringToListTransformer.php8
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php1
2 files changed, 3 insertions, 6 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))));
diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php
index 7fbba38a..428d94b3 100644
--- a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php
@@ -5,7 +5,6 @@ namespace Wallabag\CoreBundle\Form\Type;
5use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\FormBuilderInterface; 6use Symfony\Component\Form\FormBuilderInterface;
7use Symfony\Component\OptionsResolver\OptionsResolver; 7use Symfony\Component\OptionsResolver\OptionsResolver;
8
9use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer; 8use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
10 9
11class TaggingRuleType extends AbstractType 10class TaggingRuleType extends AbstractType