Completed
Push — develop ( db8caa...fa5032 )
by
unknown
07:21
created
module/Core/src/Core/Factory/Form/View/Helper/FormEditorLightFactory.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
- * @author cbleek
8
- * @license   MIT
9
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
+     * @author cbleek
8
+     * @license   MIT
9
+     */
10 10
 
11 11
 namespace Core\Factory\Form\View\Helper;
12 12
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $helper = new FormEditorLight();
45 45
         if(isset($config['view_helper_config']['form_editor']['light']) && is_array($config['view_helper_config']['form_editor']['light'])){
46
-              $helper->setOptions($config['view_helper_config']['form_editor']['light']);
46
+                $helper->setOptions($config['view_helper_config']['form_editor']['light']);
47 47
         }
48 48
 
49 49
         $helper->setOption('theme' ,  'modern');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@
 block discarded – undo
42 42
         $lang = $event->getRouteMatch()->getParam('lang');
43 43
 
44 44
         $helper = new FormEditorLight();
45
-        if(isset($config['view_helper_config']['form_editor']['light']) && is_array($config['view_helper_config']['form_editor']['light'])){
45
+        if (isset($config['view_helper_config']['form_editor']['light']) && is_array($config['view_helper_config']['form_editor']['light'])) {
46 46
               $helper->setOptions($config['view_helper_config']['form_editor']['light']);
47 47
         }
48 48
 
49
-        $helper->setOption('theme' ,  'modern');
50
-        $helper->setOption('selector' ,  'div.tinymce_light');
49
+        $helper->setOption('theme', 'modern');
50
+        $helper->setOption('selector', 'div.tinymce_light');
51 51
 
52
-        if (in_array($lang,['de','fr','it','es','hi','ar','ru','zh','tr'])) {
52
+        if (in_array($lang, ['de', 'fr', 'it', 'es', 'hi', 'ar', 'ru', 'zh', 'tr'])) {
53 53
             $helper->setOption('language', $lang);
54
-            $helper->setOption('language_url', $basepath('/js/tinymce-lang/') . $lang .'.js');
54
+            $helper->setOption('language_url', $basepath('/js/tinymce-lang/') . $lang . '.js');
55 55
         }
56 56
         return $helper;
57 57
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormEditor.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- * @author    [email protected]
9
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     * @author    [email protected]
9
+     */
10 10
 
11 11
 namespace Core\Form\View\Helper;
12 12
 
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
         'block_formats' => 'Headings=h4;',
37 37
         'removed_menuitems' =>  'newdocument',
38 38
         'plugings' => [
39
-             'autolink lists advlist',
40
-             'visualblocks code fullscreen',
41
-             'contextmenu paste link',
39
+                'autolink lists advlist',
40
+                'visualblocks code fullscreen',
41
+                'contextmenu paste link',
42 42
         ],
43 43
     ];
44 44
 
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
             $elementOptions = $element->getOptions();
138 138
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
139 139
                 $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' .
140
-                               (empty($content)?'':'display:none;') .
141
-                               '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
140
+                                (empty($content)?'':'display:none;') .
141
+                                '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
142 142
             }
143 143
             return
144 144
                 $placeHolder
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @var string
49 49
      */
50
-    protected $language="de";
50
+    protected $language = "de";
51 51
 
52 52
     /**
53 53
      * @var
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function render(ElementInterface $element)
63 63
     {
64
-        $name   = $element->getName();
64
+        $name = $element->getName();
65 65
         if (empty($name) && $name !== 0) {
66 66
             throw new \DomainException(
67 67
                 sprintf(
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
         }
131 131
         if (is_string($content)) {
132 132
 
133
-            $class = array_key_exists('class', $attributes)?$attributes['class']:'';
134
-            $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme();
133
+            $class = array_key_exists('class', $attributes) ? $attributes['class'] : '';
134
+            $class .= (empty($class) ?: ' ') . ' tinymce_' . $this->getTheme();
135 135
             $attributes['class'] = $class;
136 136
             $placeHolder = '';
137 137
             $elementOptions = $element->getOptions();
138 138
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
139 139
                 $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' .
140
-                               (empty($content)?'':'display:none;') .
140
+                               (empty($content) ? '' : 'display:none;') .
141 141
                                '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
142 142
             }
143 143
             return
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 
166 166
     protected function additionalOptions()
167 167
     {
168
-        $str = json_encode($this->options, ~JSON_HEX_QUOT & ~JSON_FORCE_OBJECT  );
169
-        $str = preg_replace('/"([a-zA-Z_]+[a-zA-Z0-9_]*)":/','$1:',$str);
170
-        return  trim($str,'{}');
168
+        $str = json_encode($this->options, ~JSON_HEX_QUOT & ~JSON_FORCE_OBJECT);
169
+        $str = preg_replace('/"([a-zA-Z_]+[a-zA-Z0-9_]*)":/', '$1:', $str);
170
+        return  trim($str, '{}');
171 171
     }
172 172
 
173 173
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      * @param $language
177 177
      */
178 178
     public function setLanguage($language) {
179
-        $this->language=$language;
179
+        $this->language = $language;
180 180
     }
181 181
 
182 182
     /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      * @param $languagePath
186 186
      */
187 187
     public function setLanguagePath($languagePath) {
188
-        $this->languagePath=$languagePath;
188
+        $this->languagePath = $languagePath;
189 189
     }
190 190
 
191 191
     /**
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
      * @param $name
195 195
      * @param $value
196 196
      */
197
-    public function setOption($name,$value){
197
+    public function setOption($name, $value) {
198 198
         if (array_key_exists($name, $this->options)) {
199 199
             $this->options[$name] = $value;
200
-        }elseif ('language' == $name or 'language_url' == $name ) {
200
+        }elseif ('language' == $name or 'language_url' == $name) {
201 201
             $this->options[$name] = $value;
202 202
 
203
-        }else{
204
-            throw new \InvalidArgumentException('Unknown Option ' . $name . ' in ' .  __FILE__ . ' Line ' . __LINE__ );
203
+        } else {
204
+            throw new \InvalidArgumentException('Unknown Option ' . $name . ' in ' . __FILE__ . ' Line ' . __LINE__);
205 205
         }
206 206
     }
207 207
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function setOptions($options)
214 214
     {
215
-        foreach($options as $key => $val) {
215
+        foreach ($options as $key => $val) {
216 216
             $this->setOption($key, $val);
217 217
         }
218 218
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,10 +197,10 @@
 block discarded – undo
197 197
     public function setOption($name,$value){
198 198
         if (array_key_exists($name, $this->options)) {
199 199
             $this->options[$name] = $value;
200
-        }elseif ('language' == $name or 'language_url' == $name ) {
200
+        } elseif ('language' == $name or 'language_url' == $name ) {
201 201
             $this->options[$name] = $value;
202 202
 
203
-        }else{
203
+        } else{
204 204
             throw new \InvalidArgumentException('Unknown Option ' . $name . ' in ' .  __FILE__ . ' Line ' . __LINE__ );
205 205
         }
206 206
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormEditorLight.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
 {
20 20
     protected $theme = 'light';
21 21
 
22
-    protected $languagePath="/js/tinymce-lang/";
22
+    protected $languagePath = "/js/tinymce-lang/";
23 23
 }
Please login to merge, or discard this patch.