Completed
Push — master ( 6d96ab...0a473c )
by Ryan
03:12
created
src/Preference/Form/PreferenceFormRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,12 +74,12 @@
 block discarded – undo
74 74
     {
75 75
         $form = $builder->getForm();
76 76
 
77
-        $namespace = $form->getEntry() . '::';
77
+        $namespace = $form->getEntry().'::';
78 78
 
79 79
         /* @var FieldType $field */
80 80
         foreach ($form->getFields() as $field) {
81 81
 
82
-            $key   = $namespace . $field->getField();
82
+            $key   = $namespace.$field->getField();
83 83
             $value = $form->getValue($field->getInputName());
84 84
 
85 85
             $this->preferences->set($key, $value);
Please login to merge, or discard this patch.
src/Preference/Form/PreferenceFormFields.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,17 +39,17 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function handle(PreferenceFormBuilder $builder, PreferenceRepositoryInterface $preferences)
41 41
     {
42
-        $namespace = $builder->getEntry() . '::';
42
+        $namespace = $builder->getEntry().'::';
43 43
 
44 44
         /**
45 45
          * Get the fields from the config system. Sections are
46 46
          * optionally defined the same way.
47 47
          */
48
-        if (!$fields = $this->config->get($namespace . 'preferences/preferences')) {
49
-            $fields = $fields = $this->config->get($namespace . 'preferences', []);
48
+        if (!$fields = $this->config->get($namespace.'preferences/preferences')) {
49
+            $fields = $fields = $this->config->get($namespace.'preferences', []);
50 50
         }
51 51
 
52
-        if ($sections = $this->config->get($namespace . 'preferences/sections')) {
52
+        if ($sections = $this->config->get($namespace.'preferences/sections')) {
53 53
             $builder->setSections($sections);
54 54
         }
55 55
 
@@ -77,26 +77,26 @@  discard block
 block discarded – undo
77 77
             $field['label'] = array_get(
78 78
                 $field,
79 79
                 'label',
80
-                $namespace . 'preference.' . $slug . '.label'
80
+                $namespace.'preference.'.$slug.'.label'
81 81
             );
82 82
 
83 83
             // Default the placeholder.
84 84
             $field['config']['placeholder'] = array_get(
85 85
                 $field['config'],
86 86
                 'placeholder',
87
-                $namespace . 'preference.' . $slug . '.placeholder'
87
+                $namespace.'preference.'.$slug.'.placeholder'
88 88
             );
89 89
 
90 90
             // Default the instructions.
91 91
             $field['instructions'] = array_get(
92 92
                 $field,
93 93
                 'instructions',
94
-                $namespace . 'preference.' . $slug . '.instructions'
94
+                $namespace.'preference.'.$slug.'.instructions'
95 95
             );
96 96
 
97 97
             // Get the value defaulting to the default value.
98 98
 
99
-            if ($preference = $preferences->get($namespace . $slug)) {
99
+            if ($preference = $preferences->get($namespace.$slug)) {
100 100
                 $field['value'] = $preference->getValue();
101 101
             } else {
102 102
                 $field['value'] = array_get($field['config'], 'default_value');
Please login to merge, or discard this patch.
src/Preference/PreferenceRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,6 +138,6 @@
 block discarded – undo
138 138
      */
139 139
     public function findAllByNamespace($namespace)
140 140
     {
141
-        return $this->model->where('key', 'LIKE', $namespace . '%')->get();
141
+        return $this->model->where('key', 'LIKE', $namespace.'%')->get();
142 142
     }
143 143
 }
Please login to merge, or discard this patch.
src/Preference/Listener/ConfigureSystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
                 continue;
108 108
             }
109 109
 
110
-            if (!$this->preferences->has($key = 'streams::' . $key)) {
110
+            if (!$this->preferences->has($key = 'streams::'.$key)) {
111 111
                 continue;
112 112
             }
113 113
 
Please login to merge, or discard this patch.
src/PreferencesModulePlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
         return [
29 29
             new \Twig_SimpleFunction(
30 30
                 'preference_value',
31
-                function ($key) {
31
+                function($key) {
32 32
                     return $this->dispatch(new GetPreferenceValue($key));
33 33
                 }
34 34
             ),
35 35
             new \Twig_SimpleFunction(
36 36
                 'preference',
37
-                function ($key) {
37
+                function($key) {
38 38
 
39 39
                     /* @var PreferenceInterface $preference */
40 40
                     if (!$preference = $this->dispatch(new GetPreference($key))) {
Please login to merge, or discard this patch.
src/Preference/Command/GetPreference.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
      * Create a new GetPreference instance.
26 26
      *
27 27
      * @param      $key
28
-     * @param null $default
29 28
      */
30 29
     public function __construct($key)
31 30
     {
Please login to merge, or discard this patch.