Completed
Pull Request — master (#168)
by
unknown
02:58
created
Tests/Functional/Controller/PersonalSettingsControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 
100 100
         // Try to change value through change setting action.
101 101
         $data[0] = ['foo_setting_1', false];
102
-        $data[1] = ['foo_setting_non_existent', false ];
102
+        $data[1] = ['foo_setting_non_existent', false];
103 103
 
104 104
         foreach ($data as $case) {
105 105
             $client->request('get', '/admin/setting/change/' . base64_encode($case[0]));
Please login to merge, or discard this patch.
Tests/Unit/EventListener/ProfileRequestListenerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         // Case #0. No profiles selected.
29 29
         $cases[] = [[], []];
30 30
         // Case #1. One profile selected.
31
-        $cases[] = [ ['ongr_settings_profile_foo-2e-com' => true], ['foo.com'] ];
31
+        $cases[] = [['ongr_settings_profile_foo-2e-com' => true], ['foo.com']];
32 32
         // Case #2. One profile unselected.
33 33
         $cases[] = [
34 34
             ['ongr_settings_profile_foo-2e-com' => false, 'ongr_settings_profile_bar-2e-com' => true],
Please login to merge, or discard this patch.
Tests/Unit/DependencyInjection/Compiler/SettingsModifierPassTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             ->with(
67 67
                 'extractSettings',
68 68
                 $this->callback(
69
-                    function ($value) use ($expectedMethod) {
69
+                    function($value) use ($expectedMethod) {
70 70
                         return $value[1] == $expectedMethod;
71 71
                     }
72 72
                 )
Please login to merge, or discard this patch.
Settings/Personal/UnderscoreEscaper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
         $string = preg_replace_callback(
37 37
             '/[^a-zA-Z0-9_]/u',
38
-            function ($matches) {
38
+            function($matches) {
39 39
                 return '-' . bin2hex($matches[0]) . '-';
40 40
             },
41 41
             $string
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $string = preg_replace_callback(
61 61
             '/-([0-9a-f]+)-/u',
62
-            function ($matches) {
62
+            function($matches) {
63 63
                 return hex2bin($matches[1]);
64 64
             },
65 65
             $string
Please login to merge, or discard this patch.
DependencyInjection/Compiler/ProviderPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         // elements comes out reversed compared to original.
61 61
         uasort(
62 62
             $providers,
63
-            function ($a, $b) {
63
+            function($a, $b) {
64 64
                 if ($a['priority'] == $b['priority']) {
65 65
                     return 0;
66 66
                 }
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.
Service/FormValidator.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,28 +39,27 @@  discard block
 block discarded – undo
39 39
             $return['error'] = 'You must set a name to the setting. ';
40 40
         }
41 41
         if (count($return['profiles']) == 0) {
42
-            $return['error'] = $return['error'].'At least 1 profile has to be set. ';
42
+            $return['error'] = $return['error'] . 'At least 1 profile has to be set. ';
43 43
         }
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');
52 51
                 if ($return['value'] == '') {
53
-                    $return['error'] = $return['error'].'You must set a value to the setting. ';
52
+                    $return['error'] = $return['error'] . 'You must set a value to the setting. ';
54 53
                 }
55 54
                 break;
56 55
             case 'object':
57 56
                 try {
58 57
                     $return['value'] = json_encode($parser->parse($request->request->get('setting-object')));
59 58
                 } catch (\Exception $e) {
60
-                    $return['error'] = $return['error'].'Passed setting value does not contain valid yaml. ';
59
+                    $return['error'] = $return['error'] . 'Passed setting value does not contain valid yaml. ';
61 60
                 }
62 61
                 if ($return['value'] == '') {
63
-                    $return['error'] = $return['error'].'You must set a value to the setting. ';
62
+                    $return['error'] = $return['error'] . 'You must set a value to the setting. ';
64 63
                 }
65 64
                 break;
66 65
             case 'array':
@@ -71,7 +70,7 @@  discard block
 block discarded – undo
71 70
                     }
72 71
                 }
73 72
                 if (count($return['value']) == 0 || $return['value'][0] == '') {
74
-                    $return['error'] = $return['error'].'You must set a value to the setting. ';
73
+                    $return['error'] = $return['error'] . 'You must set a value to the setting. ';
75 74
                 }
76 75
                 break;
77 76
         }
@@ -100,7 +99,7 @@  discard block
 block discarded – undo
100 99
         }
101 100
         foreach ($profiles as $profile) {
102 101
             if ($return['name'] == $profile['name']) {
103
-                $return['error'] = 'The profile `'.$profile['name'].'` is already set.';
102
+                $return['error'] = 'The profile `' . $profile['name'] . '` is already set.';
104 103
                 return $return;
105 104
             }
106 105
         }
Please login to merge, or discard this patch.
Controller/ProfileController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         }
64 64
         try {
65 65
             $profileManager->createProfile($data['name'], $data['description']);
66
-        }catch (\Exception $e) {
66
+        } catch (\Exception $e) {
67 67
             $cache->save('settings_errors', $e->getMessage());
68 68
             return new RedirectResponse($this->generateUrl('ongr_settings_profile_add'));
69 69
         }
Please login to merge, or discard this patch.
Settings/Personal/SettingsStructure.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
     public function ensureSettingStash(array $setting)
94 94
     {
95 95
         if (!isset($setting['stash'])) {
96
-            $setting['stash'] = 'ongr_settings.settings.';//.$setting['id'];
96
+            $setting['stash'] = 'ongr_settings.settings.'; //.$setting['id'];
97 97
         }
98 98
 
99 99
         return $setting;
Please login to merge, or discard this patch.