@@ -58,7 +58,7 @@ |
||
| 58 | 58 | $user = $token->getUser(); |
| 59 | 59 | |
| 60 | 60 | //An allowed user is not allowed to do anything... |
| 61 | - if($user instanceof User && $user->isDisabled()) { |
|
| 61 | + if ($user instanceof User && $user->isDisabled()) { |
|
| 62 | 62 | return false; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -66,10 +66,10 @@ |
||
| 66 | 66 | |
| 67 | 67 | //Normalize data before writing it to database |
| 68 | 68 | $builder->get('filetype_filter')->addViewTransformer(new CallbackTransformer( |
| 69 | - function ($value) { |
|
| 69 | + function($value) { |
|
| 70 | 70 | return $value; |
| 71 | 71 | }, |
| 72 | - function ($value) { |
|
| 72 | + function($value) { |
|
| 73 | 73 | return $this->filterTools->normalizeFilterString($value); |
| 74 | 74 | } |
| 75 | 75 | )); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $element = 'audio/*'; |
| 129 | 129 | } elseif (!preg_match('/^[-\w.]+\/[-\w.*]+/', $element) && strpos($element, '.') !== 0) { |
| 130 | 130 | //Convert jpg to .jpg |
| 131 | - $element = '.' . $element; |
|
| 131 | + $element = '.'.$element; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | { |
| 148 | 148 | $filter = trim($filter); |
| 149 | 149 | |
| 150 | - return $this->cache->get('filter_exts_' . md5($filter), function (ItemInterface $item) use ($filter) { |
|
| 150 | + return $this->cache->get('filter_exts_'.md5($filter), function(ItemInterface $item) use ($filter) { |
|
| 151 | 151 | $elements = explode(',', $filter); |
| 152 | 152 | $extensions = []; |
| 153 | 153 | |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | 'empty_data' => "", |
| 125 | 125 | 'attr' => [ |
| 126 | 126 | 'class' => 'tagsinput', |
| 127 | - 'data-autocomplete' => $this->urlGenerator->generate('typeahead_tags', ['query' => 'QUERY']),], |
|
| 127 | + 'data-autocomplete' => $this->urlGenerator->generate('typeahead_tags', ['query' => 'QUERY']), ], |
|
| 128 | 128 | 'disabled' => !$this->security->isGranted('tags.edit', $part) |
| 129 | 129 | ]); |
| 130 | 130 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $normalizers = [ |
| 52 | 52 | new ObjectNormalizer() |
| 53 | 53 | ]; |
| 54 | - $encoders = [ |
|
| 54 | + $encoders = [ |
|
| 55 | 55 | new JsonEncoder() |
| 56 | 56 | ]; |
| 57 | 57 | $serializer = new Serializer($normalizers, $encoders); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $normalizers = [ |
| 70 | 70 | new ObjectNormalizer() |
| 71 | 71 | ]; |
| 72 | - $encoders = [ |
|
| 72 | + $encoders = [ |
|
| 73 | 73 | new JsonEncoder() |
| 74 | 74 | ]; |
| 75 | 75 | $serializer = new Serializer($normalizers, $encoders); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function searchTags(string $keyword, array $options = []) |
| 59 | 59 | { |
| 60 | 60 | $results = []; |
| 61 | - $keyword_regex = '/^' . preg_quote($keyword, '/') . '/'; |
|
| 61 | + $keyword_regex = '/^'.preg_quote($keyword, '/').'/'; |
|
| 62 | 62 | |
| 63 | 63 | $resolver = new OptionsResolver(); |
| 64 | 64 | $this->configureOptions($resolver); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | ->where("p.tags LIKE ?1") |
| 79 | 79 | ->setMaxResults($options['query_limit']) |
| 80 | 80 | //->orderBy('RAND()') |
| 81 | - ->setParameter(1, '%' . $keyword . '%'); |
|
| 81 | + ->setParameter(1, '%'.$keyword.'%'); |
|
| 82 | 82 | |
| 83 | 83 | $possible_tags = $qb->getQuery()->getArrayResult(); |
| 84 | 84 | |
@@ -60,10 +60,10 @@ |
||
| 60 | 60 | //If the user is null, then treat it as anonymous user. |
| 61 | 61 | //When the anonymous user is passed as user then use this path too. |
| 62 | 62 | if ($user === null || $user->getID() === User::ID_ANONYMOUS) { |
| 63 | - return 'user$_' . User::ID_ANONYMOUS; |
|
| 63 | + return 'user$_'.User::ID_ANONYMOUS; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | //In the most cases we can just use the username (its unique) |
| 67 | - return "user_" . $user->getUsername() . '_' . $locale; |
|
| 67 | + return "user_".$user->getUsername().'_'.$locale; |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | \ No newline at end of file |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | } else { |
| 67 | 67 | // We have to sort the pricedetails manually |
| 68 | 68 | $array = $pricedetails->map( |
| 69 | - function (Pricedetail $pricedetail) { |
|
| 69 | + function(Pricedetail $pricedetail) { |
|
| 70 | 70 | return $pricedetail->getMinDiscountQuantity(); |
| 71 | 71 | } |
| 72 | 72 | )->toArray(); |