@@ -11,7 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | namespace ONGR\TranslationsBundle\Controller; |
| 13 | 13 | |
| 14 | -use ONGR\ElasticsearchBundle\Result\Result; |
|
| 15 | 14 | use ONGR\ElasticsearchBundle\Service\Repository; |
| 16 | 15 | use ONGR\FilterManagerBundle\Filter\ViewData; |
| 17 | 16 | use ONGR\FilterManagerBundle\Search\SearchResponse; |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | public function getId() |
| 118 | 118 | { |
| 119 | 119 | if (!$this->id) { |
| 120 | - $this->setId(sha1($this->getDomain() . $this->getKey())); |
|
| 120 | + $this->setId(sha1($this->getDomain().$this->getKey())); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | return $this->id; |
@@ -115,14 +115,14 @@ |
||
| 115 | 115 | |
| 116 | 116 | if (array_key_exists('properties', $content)) { |
| 117 | 117 | foreach ($content['properties'] as $property) { |
| 118 | - $search->setSource($content['name'] . '.' . $property); |
|
| 118 | + $search->setSource($content['name'].'.'.$property); |
|
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | if (array_key_exists('findBy', $content)) { |
| 123 | 123 | foreach ($content['findBy'] as $field => $value) { |
| 124 | 124 | $search->addQuery( |
| 125 | - new TermsQuery($content['name'] . '.' . $field, is_array($value) ? $value : [$value]), |
|
| 125 | + new TermsQuery($content['name'].'.'.$field, is_array($value) ? $value : [$value]), |
|
| 126 | 126 | 'must' |
| 127 | 127 | ); |
| 128 | 128 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $configuration = new Configuration(); |
| 33 | 33 | $config = $this->processConfiguration($configuration, $configs); |
| 34 | 34 | |
| 35 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 35 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 36 | 36 | $loader->load('services.yml'); |
| 37 | 37 | $loader->load('filters_container.yml'); |
| 38 | 38 | |
@@ -58,8 +58,7 @@ discard block |
||
| 58 | 58 | $response['error'] = $e->getMessage(); |
| 59 | 59 | } |
| 60 | 60 | !isset($response['error']) ? |
| 61 | - $response['success'] = 'Tag successfully added' : |
|
| 62 | - $response['success'] = false; |
|
| 61 | + $response['success'] = 'Tag successfully added' : $response['success'] = false; |
|
| 63 | 62 | $cache->save('translations_edit', $response); |
| 64 | 63 | return new RedirectResponse( |
| 65 | 64 | $this->generateUrl( |
@@ -95,8 +94,7 @@ discard block |
||
| 95 | 94 | $response['error'] = $e->getMessage(); |
| 96 | 95 | } |
| 97 | 96 | !isset($response['error']) ? |
| 98 | - $response['success'] = 'Messages updated successfully' : |
|
| 99 | - $response['success'] = false; |
|
| 97 | + $response['success'] = 'Messages updated successfully' : $response['success'] = false; |
|
| 100 | 98 | $cache->save('translations_edit', $response); |
| 101 | 99 | return new RedirectResponse( |
| 102 | 100 | $this->generateUrl( |