Completed
Pull Request — master (#168)
by
unknown
02:54
created
Twig/PersonalSettingWidgetExtension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * @param string $settingName
61 61
      * @param bool   $mustAuthorize
62 62
      *
63
-     * @return mixed
63
+     * @return boolean
64 64
      */
65 65
     public function getSettingEnabled($settingName, $mustAuthorize = true)
66 66
     {
Please login to merge, or discard this patch.
Tests/Functional/Settings/SettingsManagerTest.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
      *
162 162
      * @param string $name
163 163
      * @param string $type
164
-     * @param mixed  $value
164
+     * @param string  $value
165 165
      * @param string $profile
166 166
      *
167 167
      * @return Setting
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
17 17
 use ONGR\ElasticsearchBundle\Service\Manager;
18 18
 use ONGR\ElasticsearchDSL\Query\MatchAllQuery;
19
-use Symfony\Component\Translation\TranslatorInterface;
20 19
 use Symfony\Component\DependencyInjection\ContainerInterface;
21 20
 
22 21
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -181,9 +181,9 @@
 block discarded – undo
181 181
     private function getSetting($name, $type, $value, $profile = 'default')
182 182
     {
183 183
         $setting = new Setting();
184
-        $setting->setId($profile . '_' . $name);
184
+        $setting->setId($profile.'_'.$name);
185 185
         $setting->setName($name);
186
-        $setting->setDescription('ongr_settings.' . $name);
186
+        $setting->setDescription('ongr_settings.'.$name);
187 187
         $setting->setProfile($profile);
188 188
         $setting->setType($type);
189 189
         $setting->setData(['value' => $value]);
Please login to merge, or discard this patch.
Twig/EncryptionExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function getFilters()
27 27
     {
28 28
         return [
29
-            'base64Encode' => new \Twig_SimpleFilter('base64Encode', [$this,'base64EncodeFilter'])
29
+            'base64Encode' => new \Twig_SimpleFilter('base64Encode', [$this, 'base64EncodeFilter'])
30 30
         ];
31 31
     }
32 32
 
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/General/SettingAwareServiceFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,6 +82,6 @@
 block discarded – undo
82 82
      */
83 83
     protected function guessName($setting)
84 84
     {
85
-        return 'set' . Container::camelize($setting);
85
+        return 'set'.Container::camelize($setting);
86 86
     }
87 87
 }
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.