Skip to content

Commit

Permalink
Code style bug fixes 👌
Browse files Browse the repository at this point in the history
  • Loading branch information
Bukashk0zzz committed Mar 1, 2017
1 parent 635a0b1 commit 44ea8ea
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion EventListener/JmsPostSerializeListener.php
Expand Up @@ -54,7 +54,7 @@ public function onPostSerialize(ObjectEvent $event)

/** @var GenericSerializationVisitor $visitor */
$visitor = $event->getVisitor();
$visitor->addData($virtualField, $this->serializeValue($liipAnnotation, $object, $value));
$visitor->setData($virtualField, $this->serializeValue($liipAnnotation, $object, $value));
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion EventListener/JmsSerializeListenerAbstract.php
Expand Up @@ -162,7 +162,8 @@ protected function getHostUrl()
protected function normalizeUrl($url, $normalizer)
{
if (array_key_exists($normalizer, $this->config) && $this->config[$normalizer]) {
$normalizer = new $this->config[$normalizer]();
$normalizerClassName = $this->config[$normalizer];
$normalizer = new $normalizerClassName();
if ($normalizer instanceof UrlNormalizerInterface) {
$url = $normalizer->normalize($url);
}
Expand Down
3 changes: 2 additions & 1 deletion Tests/Normalizer/FilteredUrlNormalizer.php
Expand Up @@ -21,7 +21,8 @@ class FilteredUrlNormalizer implements UrlNormalizerInterface
/**
* {@inheritdoc}
*/
public function normalize($url){
public function normalize($url)
{
return str_replace('example.com', 'img.example.com', $url);
}
}
3 changes: 2 additions & 1 deletion Tests/Normalizer/OriginUrlNormalizer.php
Expand Up @@ -21,7 +21,8 @@ class OriginUrlNormalizer implements UrlNormalizerInterface
/**
* {@inheritdoc}
*/
public function normalize($url){
public function normalize($url)
{
return str_replace('photo', 'newPhoto', $url);
}
}
Empty file modified ruleset.xml 100755 → 100644
Empty file.

0 comments on commit 44ea8ea

Please sign in to comment.