Completed
Pull Request — master (#168)
by
unknown
02:57
created
Tests/Functional/Twig/PersonalSettingWidgetExtensionTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Controller/SettingsManagerController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
ONGRSettingsBundle.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Tests/Functional/Controller/PersonalSettingsControllerTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
Settings/General/SettingsManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Settings/Personal/PersonalProfilesProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
DependencyInjection/ONGRSettingsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
Twig/HiddenExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
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
                     }
Please login to merge, or discard this patch.
Service/FormValidator.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
44 44
         switch ($return['type']) {
45 45
             case 'bool':
46 46
                 $request->request->get('setting-boolean') == 'true' ?
47
-                    $return['value'] = true :
48
-                    $return['value'] = false;
47
+                    $return['value'] = true : $return['value'] = false;
49 48
                 break;
50 49
             case 'string':
51 50
                 $return['value'] = $request->request->get('setting-default');
Please login to merge, or discard this patch.