@@ -80,7 +80,7 @@ |
||
| 80 | 80 | ->andWhere('p.title LIKE :pattern') |
| 81 | 81 | ->setMaxResults(30) |
| 82 | 82 | ->getQuery() |
| 83 | - ->execute(array('pattern' => '%' . $pattern . '%')); |
|
| 83 | + ->execute(array('pattern' => '%'.$pattern.'%')); |
|
| 84 | 84 | |
| 85 | 85 | $suggestions = array(); |
| 86 | 86 | foreach ($pages as $page) { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $stmt->execute( |
| 56 | 56 | [ |
| 57 | 57 | ':url_pre_id' => sprintf('/%s/page/', $locale), |
| 58 | - ':url_like' => sprintf('/%s/page/', sprintf('/%s/page/', $locale) . '%'), |
|
| 58 | + ':url_like' => sprintf('/%s/page/', sprintf('/%s/page/', $locale).'%'), |
|
| 59 | 59 | ] |
| 60 | 60 | ); |
| 61 | 61 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $from = $object->isScheduledFrom(); |
| 33 | 33 | $till = $object->isScheduledTill(); |
| 34 | 34 | |
| 35 | - if (!$object->isPublic() || false === self::notEmpty($from, $till)) { |
|
| 35 | + if (!$object->isPublic() || false === self::notEmpty($from, $till)) { |
|
| 36 | 36 | return $vote; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -102,12 +102,12 @@ |
||
| 102 | 102 | { |
| 103 | 103 | if (array_key_exists($region, $this->matrix)) { |
| 104 | 104 | array_walk( |
| 105 | - $this->matrix[ $region ], |
|
| 106 | - function ($value, $idx, $matrix) use ($type, $region) { |
|
| 105 | + $this->matrix[$region], |
|
| 106 | + function($value, $idx, $matrix) use ($type, $region) { |
|
| 107 | 107 | $class = explode('\\', $value); |
| 108 | 108 | $className = array_pop($class); |
| 109 | 109 | if ($className === $type) { |
| 110 | - unset($matrix[ $region ][ $idx ]); |
|
| 110 | + unset($matrix[$region][$idx]); |
|
| 111 | 111 | } |
| 112 | 112 | }, |
| 113 | 113 | $this->matrix |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $shortType = Str::infix(lcfirst(Str::classname(Str::rstrip($this->getType(), 'ContentItem'))), $infix); |
| 25 | 25 | |
| 26 | 26 | if ($template = $this->getTemplateName()) { |
| 27 | - $shortType .= $infix . $template; |
|
| 27 | + $shortType .= $infix.$template; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | return $shortType; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | foreach ($reflectionFrom->getProperties() as $property) { |
| 46 | 46 | $property->setAccessible(true); |
| 47 | - $method = 'set' . ucfirst($property->getName()); |
|
| 47 | + $method = 'set'.ucfirst($property->getName()); |
|
| 48 | 48 | if ($reflectionTo->hasMethod($method)) { |
| 49 | 49 | $to->$method($property->getValue($from)); |
| 50 | 50 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | if ($options['container']) { |
| 60 | 60 | $page = $options['container']; |
| 61 | - $choiceFilter = function ($choices) use ($page) { |
|
| 61 | + $choiceFilter = function($choices) use ($page) { |
|
| 62 | 62 | $ret = array(); |
| 63 | 63 | if ($page instanceof ContentItemContainer && null !== $page->getContentItemMatrix()) { |
| 64 | 64 | $types = $page->getContentItemMatrix()->getTypes(); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | try { |
| 108 | 108 | if ($subject->getId() && $subject->getRegion() !== null && $typeAdmin = $this->sonata->getAdminByClass(get_class($subject))) { |
| 109 | 109 | $view->vars['type'] = Str::humanize($subject->getType()); |
| 110 | - $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode() . '|' . $typeAdmin->getCode()); |
|
| 110 | + $childAdmin = $this->sonata->getAdminByAdminCode($parentAdmin->getCode().'|'.$typeAdmin->getCode()); |
|
| 111 | 111 | $childAdmin->setRequest($genericAdmin->getRequest()); |
| 112 | 112 | |
| 113 | 113 | if ($subject && $subject->getId() && $subject->getPage() && $subject->getPage()->getId()) { |
@@ -43,10 +43,10 @@ |
||
| 43 | 43 | /** @var $em \Doctrine\ORM\EntityManager */ |
| 44 | 44 | $em = $this->doctrine->getManager(); |
| 45 | 45 | |
| 46 | - $choiceCallback = function (Options $options) use ($em) { |
|
| 46 | + $choiceCallback = function(Options $options) use ($em) { |
|
| 47 | 47 | $ret = array(); |
| 48 | 48 | foreach ($em->getClassMetadata($options['entity'])->discriminatorMap as $className) { |
| 49 | - $placeholder = 'content_item.type.' . strtolower(str_replace(' ', '_', Str::humanize($className))); |
|
| 49 | + $placeholder = 'content_item.type.'.strtolower(str_replace(' ', '_', Str::humanize($className))); |
|
| 50 | 50 | $ret[$className] = $placeholder; |
| 51 | 51 | } |
| 52 | 52 | if (is_callable($options['choice_filter'])) { |