@@ -15,7 +15,6 @@ |
||
15 | 15 | use ONGR\SettingsBundle\Tests\Fixtures\Security\LoginTestHelper; |
16 | 16 | use ONGR\ElasticsearchBundle\Test\ElasticsearchTestCase; |
17 | 17 | use Symfony\Bundle\FrameworkBundle\Client; |
18 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
19 | 18 | |
20 | 19 | /** |
21 | 20 | * Tests for testing settings TWIG extension functionality. |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use ONGR\SettingsBundle\Settings\General\SettingsManager; |
15 | 15 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
16 | -use Symfony\Component\HttpFoundation\JsonResponse; |
|
17 | 16 | use Symfony\Component\HttpFoundation\RedirectResponse; |
18 | 17 | use Symfony\Component\HttpFoundation\Request; |
19 | 18 | use Symfony\Component\HttpFoundation\Response; |
@@ -17,7 +17,6 @@ |
||
17 | 17 | use ONGR\SettingsBundle\DependencyInjection\Compiler\SettingAwareFactoryPass; |
18 | 18 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
19 | 19 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
20 | -use ONGR\SettingsBundle\DependencyInjection\Security\SessionlessAuthenticationFactory; |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * This class is used to register component into Symfony app kernel. |
@@ -12,7 +12,6 @@ |
||
12 | 12 | namespace ONGR\SettingsBundle\Tests\Functional\Controller; |
13 | 13 | |
14 | 14 | use ONGR\ElasticsearchBundle\Test\AbstractElasticsearchTestCase; |
15 | -use ONGR\SettingsBundle\Tests\Fixtures\Security\LoginTestHelper; |
|
16 | 15 | use Symfony\Bundle\FrameworkBundle\Client; |
17 | 16 | |
18 | 17 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | foreach ($profiles as $profile) { |
76 | 76 | $setting = new Setting(); |
77 | - $setting->setId($profile . '_' . $name); |
|
77 | + $setting->setId($profile.'_'.$name); |
|
78 | 78 | $setting->setName($name); |
79 | 79 | $setting->setDescription($description); |
80 | 80 | $setting->setData((object)['value' => $value]); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | foreach ($newProfiles as $profile) { |
131 | 131 | $newSetting = clone $setting; |
132 | 132 | |
133 | - $newSetting->setId($profile . '_' . $setting->getName()); |
|
133 | + $newSetting->setId($profile.'_'.$setting->getName()); |
|
134 | 134 | $newSetting->setProfile($profile); |
135 | 135 | $newSettings[] = $newSetting; |
136 | 136 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function get($name, $profile = 'default', $mustExist = true, $type = 'string') |
154 | 154 | { |
155 | - $setting = $this->repo->find($profile . '_' . $name); |
|
155 | + $setting = $this->repo->find($profile.'_'.$name); |
|
156 | 156 | if ($setting === null) { |
157 | 157 | if ($mustExist === true) { |
158 | 158 | throw new \UnexpectedValueException(); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | protected function createSetting($name, $profile, $type) |
176 | 176 | { |
177 | 177 | $setting = new Setting(); |
178 | - $setting->setId($profile . '_' . $name); |
|
178 | + $setting->setId($profile.'_'.$name); |
|
179 | 179 | $setting->setName($name); |
180 | 180 | $setting->setProfile($profile); |
181 | 181 | $setting->setType($type); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | $settings = []; |
59 | 59 | foreach ($profiles as $profile) { |
60 | - $profileId = 'ongr_settings_profile_' . UnderscoreEscaper::escape($profile['name']); |
|
60 | + $profileId = 'ongr_settings_profile_'.UnderscoreEscaper::escape($profile['name']); |
|
61 | 61 | $settings[$profileId] = [ |
62 | 62 | 'name' => $profile['name'], |
63 | 63 | 'category' => 'ongr_settings_profiles', |
@@ -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'); |
@@ -109,7 +109,7 @@ |
||
109 | 109 | } |
110 | 110 | $pos = strpos($settingName, '_'); |
111 | 111 | $profile = substr($settingName, 0, $pos); |
112 | - $name = substr($settingName, $pos+1); |
|
112 | + $name = substr($settingName, $pos + 1); |
|
113 | 113 | |
114 | 114 | return $environment->render( |
115 | 115 | $this->template, |
@@ -110,7 +110,7 @@ |
||
110 | 110 | foreach ($value as $value2) { |
111 | 111 | if (!is_array($value2)) { |
112 | 112 | $new[] = [ |
113 | - 'name' => $name . '[]', |
|
113 | + 'name' => $name.'[]', |
|
114 | 114 | 'value' => $value2, |
115 | 115 | ]; |
116 | 116 | } |