@@ -40,7 +40,7 @@ |
||
40 | 40 | // Set profiles. |
41 | 41 | $container->setParameter('ongr_settings.settings_container.profiles', $config['profiles']); |
42 | 42 | |
43 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
43 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
44 | 44 | $loader->load('services/twig_extension.yml'); |
45 | 45 | $loader->load('services/personal_settings.yml'); |
46 | 46 | $loader->load('services/general_settings.yml'); |
@@ -46,6 +46,6 @@ |
||
46 | 46 | */ |
47 | 47 | public function registerContainerConfiguration(LoaderInterface $loader) |
48 | 48 | { |
49 | - $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml'); |
|
49 | + $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); |
|
50 | 50 | } |
51 | 51 | } |
@@ -71,7 +71,6 @@ |
||
71 | 71 | /** |
72 | 72 | * Returns a json list of profiles |
73 | 73 | * |
74 | - * @param Request $request |
|
75 | 74 | * |
76 | 75 | * @return Response |
77 | 76 | */ |
@@ -12,13 +12,9 @@ |
||
12 | 12 | namespace ONGR\SettingsBundle\Controller; |
13 | 13 | |
14 | 14 | use ONGR\ElasticsearchBundle\Result\DocumentIterator; |
15 | -use ONGR\ElasticsearchBundle\Service\Repository; |
|
16 | 15 | use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation; |
17 | -use ONGR\ElasticsearchDSL\Aggregation\TopHitsAggregation; |
|
18 | 16 | use ONGR\ElasticsearchDSL\Search; |
19 | 17 | use ONGR\ElasticsearchBundle\Result\Aggregation\AggregationValue; |
20 | -use ONGR\SettingsBundle\Document\Setting; |
|
21 | -use ONGR\SettingsBundle\Service\SettingsManager; |
|
22 | 18 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
23 | 19 | use Symfony\Component\HttpFoundation\JsonResponse; |
24 | 20 | use Symfony\Component\HttpFoundation\Request; |
@@ -11,9 +11,7 @@ |
||
11 | 11 | |
12 | 12 | namespace ONGR\SettingsBundle\Controller; |
13 | 13 | |
14 | -use ONGR\ElasticsearchBundle\Result\Aggregation\AggregationValue; |
|
15 | 14 | use ONGR\ElasticsearchBundle\Service\Repository; |
16 | -use ONGR\ElasticsearchDSL\Aggregation\TermsAggregation; |
|
17 | 15 | use ONGR\SettingsBundle\Document\Setting; |
18 | 16 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
19 | 17 | use Symfony\Component\HttpFoundation\JsonResponse; |
@@ -145,7 +145,7 @@ |
||
145 | 145 | /** |
146 | 146 | * Get profile. |
147 | 147 | * |
148 | - * @return string|array |
|
148 | + * @return string |
|
149 | 149 | */ |
150 | 150 | public function getProfile() |
151 | 151 | { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | /** @var Setting $setting */ |
87 | 87 | $setting = $this->manager->get($name); |
88 | - $settingProfile = is_array($setting->getProfile())?$setting->getProfile():[$setting->getProfile()]; |
|
88 | + $settingProfile = is_array($setting->getProfile()) ? $setting->getProfile() : [$setting->getProfile()]; |
|
89 | 89 | if ($setting && array_intersect($settingProfile, $allProfiles)) { |
90 | 90 | $settingValue = $setting->getValue(); |
91 | 91 | } else { |