@@ -51,8 +51,8 @@ |
||
| 51 | 51 | $builder->addModelTransformer(new TaggingTransformer($this->tagRepository, $options['delimiter'])); |
| 52 | 52 | |
| 53 | 53 | $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($options) { |
| 54 | - $tags = $event->getData(); |
|
| 55 | - $event->setData(is_array($tags) ? implode($options['delimiter'], $tags) : $tags); |
|
| 54 | + $tags = $event->getData(); |
|
| 55 | + $event->setData(is_array($tags) ? implode($options['delimiter'], $tags) : $tags); |
|
| 56 | 56 | }); |
| 57 | 57 | |
| 58 | 58 | $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | 'originId' => $alias->getId(), |
| 35 | 35 | )); |
| 36 | 36 | |
| 37 | - if (true === $createWhenNone && !$tagging ) { |
|
| 37 | + if (true === $createWhenNone && !$tagging) { |
|
| 38 | 38 | $tagging = $this->createNew(); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -40,8 +40,8 @@ |
||
| 40 | 40 | $newTags = array(); |
| 41 | 41 | if (count($tags) < count($string)) { |
| 42 | 42 | /** @var TagInterface $tag */ |
| 43 | - foreach($string as $str) { |
|
| 44 | - foreach($tags as $tag) { |
|
| 43 | + foreach ($string as $str) { |
|
| 44 | + foreach ($tags as $tag) { |
|
| 45 | 45 | if (strtolower($str) === strtolower($tag->getName())) { |
| 46 | 46 | continue 2; |
| 47 | 47 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | $taggings = new ArrayCollection($taggings); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - foreach($taggings as $tagging) { |
|
| 71 | + foreach ($taggings as $tagging) { |
|
| 72 | 72 | $tagging->setTag($this); |
| 73 | 73 | } |
| 74 | 74 | |