Completed
Push — develop ( 257d08...3d165a )
by greg
02:23
created
src/Filter/Transliteration.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
             'ů' => 'u',
175 175
             'ý' => 'y',
176 176
             'ž' => 'z',
177
-             'Á' => 'A',
177
+                'Á' => 'A',
178 178
             'Č' => 'C',
179 179
             'Ď' => 'D',
180 180
             'É' => 'E',
Please login to merge, or discard this patch.
src/Filter/Sanitize.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $filename = pathinfo($s, PATHINFO_FILENAME);
79 79
         $extension = pathinfo($s, PATHINFO_EXTENSION);
80
-        return $this->filterSubstring($filename).($extension  ? '.'.$this->filterSubstring($extension) : '');
80
+        return $this->filterSubstring($filename).($extension ? '.'.$this->filterSubstring($extension) : '');
81 81
     }
82 82
 
83 83
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 $this->removeNotReplacedChar($n);
150 150
             }
151 151
         } else {
152
-            if (! in_array($notReplaced, $this->getNotReplacedChars())) {
152
+            if (!in_array($notReplaced, $this->getNotReplacedChars())) {
153 153
                 throw new \Exception("Not replaced character '$notReplaced' is not in array.");
154 154
             }
155 155
             $newArray = array();
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                 $this->removeWordDelimiter($delim);
234 234
             }
235 235
         } else {
236
-            if (! in_array($delimiter, $this->getWordDelimiters())) {
236
+            if (!in_array($delimiter, $this->getWordDelimiters())) {
237 237
                 throw new \Exception("Word delimiter '$delimiter' is not in delimiters array.");
238 238
             }
239 239
             $newArray = array();
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         if (count($this->getNotReplacedChars()) == 0) {
317 317
             $reg = '~[^-a-z0-9_]+~';
318 318
         } else {
319
-            $reg = '~[^-a-z0-9_' . implode('', $this->getNotReplacedChars()) .']+~';
319
+            $reg = '~[^-a-z0-9_'.implode('', $this->getNotReplacedChars()).']+~';
320 320
         }
321 321
         return preg_replace($reg, '', $s);
322 322
     }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     private function replaceDoubleDelimiterReplacementWithSingle($s)
331 331
     {
332
-        $doubleDelimiterReplacement = $this->getDelimiterReplacement() . $this->getDelimiterReplacement();
332
+        $doubleDelimiterReplacement = $this->getDelimiterReplacement().$this->getDelimiterReplacement();
333 333
         while (strpos($s, $doubleDelimiterReplacement) !== false) {
334 334
             $s = str_replace($doubleDelimiterReplacement, $this->getDelimiterReplacement(), $s);
335 335
         }
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,6 @@
 block discarded – undo
85 85
      *
86 86
      * Returns $value filtered to valid url
87 87
      *
88
-     * @param  string $value
89 88
      * @return string
90 89
      */
91 90
     public function filterSubstring($s)
Please login to merge, or discard this patch.
src/Entity/Website.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
         return $this;
162 162
     }
163 163
 
164
-     /**
165
-     * @return string $default
166
-     */
164
+        /**
165
+         * @return string $default
166
+         */
167 167
     public function getDefault()
168 168
     {
169 169
         return $this->byDefault;
@@ -247,10 +247,10 @@  discard block
 block discarded – undo
247 247
     }
248 248
 
249 249
     /**
250
-    * getFlag : get path for flag associate to the country
251
-    *
252
-    * @param string $flag
253
-    */
250
+     * getFlag : get path for flag associate to the country
251
+     *
252
+     * @param string $flag
253
+     */
254 254
     public function getFlag()
255 255
     {
256 256
         return "/lib/images/flag/".strtolower($this->getCode());
@@ -281,19 +281,19 @@  discard block
 block discarded – undo
281 281
 
282 282
 
283 283
     /**
284
-    * setInputFilter
285
-    * @param InputFilterInterface $inputFilter
286
-    */
284
+     * setInputFilter
285
+     * @param InputFilterInterface $inputFilter
286
+     */
287 287
     public function setInputFilter(InputFilterInterface $inputFilter)
288 288
     {
289 289
         throw new \Exception("Not used");
290 290
     }
291 291
 
292 292
     /**
293
-    * getInputFilter
294
-    *
295
-    * @return  InputFilter $inputFilter
296
-    */
293
+     * getInputFilter
294
+     *
295
+     * @return  InputFilter $inputFilter
296
+     */
297 297
     public function getInputFilter()
298 298
     {
299 299
         if (!$this->inputFilter) {
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     }
144 144
 
145 145
     /**
146
-     * @return string $active
146
+     * @return integer $active
147 147
      */
148 148
     public function getActive()
149 149
     {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     }
163 163
 
164 164
      /**
165
-     * @return string $default
165
+     * @return integer $default
166 166
      */
167 167
     public function getDefault()
168 168
     {
@@ -249,7 +249,6 @@  discard block
 block discarded – undo
249 249
     /**
250 250
     * getFlag : get path for flag associate to the country
251 251
     *
252
-    * @param string $flag
253 252
     */
254 253
     public function getFlag()
255 254
     {
Please login to merge, or discard this patch.
src/Entity/Formgen.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected $formtemplate;
51 51
 
52
-     /**
53
-     * @ORM\ManyToOne(targetEntity="PlaygroundCore\Entity\Locale", inversedBy="locale")
54
-     */
52
+        /**
53
+         * @ORM\ManyToOne(targetEntity="PlaygroundCore\Entity\Locale", inversedBy="locale")
54
+         */
55 55
     protected $locale;
56 56
 
57
-     /**
58
-     * active
59
-     * @ORM\Column(type="boolean")
60
-     */
57
+        /**
58
+         * active
59
+         * @ORM\Column(type="boolean")
60
+         */
61 61
     protected $active = 0;
62 62
 
63 63
     /**
@@ -274,19 +274,19 @@  discard block
 block discarded – undo
274 274
 
275 275
 
276 276
     /**
277
-    * setInputFilter
278
-    * @param InputFilterInterface $inputFilter
279
-    */
277
+     * setInputFilter
278
+     * @param InputFilterInterface $inputFilter
279
+     */
280 280
     public function setInputFilter(InputFilterInterface $inputFilter)
281 281
     {
282 282
         throw new \Exception("Not used");
283 283
     }
284 284
 
285 285
     /**
286
-    * getInputFilter
287
-    *
288
-    * @return  InputFilter $inputFilter
289
-    */
286
+     * getInputFilter
287
+     *
288
+     * @return  InputFilter $inputFilter
289
+     */
290 290
     public function getInputFilter()
291 291
     {
292 292
         if (!$this->inputFilter) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
     }
180 180
 
181 181
     /**
182
-     * @return string $active
182
+     * @return integer $active
183 183
      */
184 184
     public function getActive()
185 185
     {
Please login to merge, or discard this patch.
src/Mail/Service/Message.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
         $content = $renderer->render($nameOrModel, $values);
58 58
         $resolver = $this->serviceLocator->get('Zend\View\Resolver\TemplatePathStack');
59 59
         // check if plain text email template exist
60
-        if ($resolver->resolve($nameOrModel . '-plain')) {
61
-            $contentText = $renderer->render($nameOrModel . '-plain', $values);
60
+        if ($resolver->resolve($nameOrModel.'-plain')) {
61
+            $contentText = $renderer->render($nameOrModel.'-plain', $values);
62 62
         } else {
63 63
             $contentText = '';
64 64
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $html->encoding    = Mime::ENCODING_QUOTEDPRINTABLE;
78 78
         $html->disposition = Mime::DISPOSITION_INLINE;
79 79
         $html->charset     = 'UTF-8';
80
-        $bodyMessage     = new MimeMessage();
80
+        $bodyMessage = new MimeMessage();
81 81
 
82 82
         $multiPartContentMessage = new MimeMessage();
83 83
         $multiPartContentMessage->addPart($text);
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -157,6 +157,8 @@
 block discarded – undo
157 157
 
158 158
     /**
159 159
      *
160
+     * @param string $encoding
161
+     * @param string $subject
160 162
      * @return Message
161 163
      */
162 164
     protected function getDefaultMessage($from, $encoding, $to, $subject, $body)
Please login to merge, or discard this patch.
src/Mail/Service/Factory/MessageFactory.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 class MessageFactory implements FactoryInterface
9 9
 {
10 10
     /**
11
-    * @param ServiceLocatorInterface $locator
12
-    * @return \PlaygroundCore\Service\Country
13
-    */
11
+     * @param ServiceLocatorInterface $locator
12
+     * @return \PlaygroundCore\Service\Country
13
+     */
14 14
     public function createService(ServiceLocatorInterface $locator)
15 15
     {
16 16
         $service = new Message($locator);
Please login to merge, or discard this patch.
src/Service/Formgen.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
      */
19 19
     protected $formgenMapper;
20 20
 
21
-     /**
22
-     * @var localeService
23
-     */
21
+        /**
22
+         * @var localeService
23
+         */
24 24
     protected $localeService;
25 25
 
26 26
     /**
Please login to merge, or discard this patch.
Spacing   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -94,23 +94,22 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $a = array();
96 96
 
97
-        $a['name']          = isset($attributes->name)? $attributes->name : '';
98
-        $a['placeholder']   = isset($attributes->data->placeholder)? $attributes->data->placeholder : '';
99
-        $a['label']         = isset($attributes->data->label)? $attributes->data->label : '';
100
-        $a['required']      = (isset($attributes->data->required) && $attributes->data->required == 'true')?
97
+        $a['name']          = isset($attributes->name) ? $attributes->name : '';
98
+        $a['placeholder']   = isset($attributes->data->placeholder) ? $attributes->data->placeholder : '';
99
+        $a['label']         = isset($attributes->data->label) ? $attributes->data->label : '';
100
+        $a['required']      = (isset($attributes->data->required) && $attributes->data->required == 'true') ?
101 101
             true:
102 102
             false;
103
-        $a['class']         = isset($attributes->data->class)? $attributes->data->class : '';
104
-        $a['id']            = isset($attributes->data->id)? $attributes->data->id : '';
105
-        $a['lengthMin']     = isset($attributes->data->length)? $attributes->data->length->min : '';
106
-        $a['lengthMax']     = isset($attributes->data->length)? $attributes->data->length->max : '';
107
-        $a['validator']     = isset($attributes->data->validator)? $attributes->data->validator : '';
108
-        $a['innerData']     = isset($attributes->data->innerData)? $attributes->data->innerData : array();
109
-        $a['dropdownValues']= isset($attributes->data->dropdownValues)?
110
-            $attributes->data->dropdownValues :
111
-            array();
112
-        $a['filesizeMin']   = isset($attributes->data->filesize)? $attributes->data->filesize->min : 0;
113
-        $a['filesizeMax']   = isset($attributes->data->filesize)? $attributes->data->filesize->max : 10*1024*1024;
103
+        $a['class']         = isset($attributes->data->class) ? $attributes->data->class : '';
104
+        $a['id']            = isset($attributes->data->id) ? $attributes->data->id : '';
105
+        $a['lengthMin']     = isset($attributes->data->length) ? $attributes->data->length->min : '';
106
+        $a['lengthMax']     = isset($attributes->data->length) ? $attributes->data->length->max : '';
107
+        $a['validator']     = isset($attributes->data->validator) ? $attributes->data->validator : '';
108
+        $a['innerData']     = isset($attributes->data->innerData) ? $attributes->data->innerData : array();
109
+        $a['dropdownValues'] = isset($attributes->data->dropdownValues) ?
110
+            $attributes->data->dropdownValues : array();
111
+        $a['filesizeMin']   = isset($attributes->data->filesize) ? $attributes->data->filesize->min : 0;
112
+        $a['filesizeMax']   = isset($attributes->data->filesize) ? $attributes->data->filesize->max : 10*1024*1024;
114 113
 
115 114
         return $a;
116 115
     }
@@ -193,7 +192,7 @@  discard block
 block discarded – undo
193 192
 
194 193
         foreach ($formPV as $element) {
195 194
             if (isset($element->line_text)) {
196
-                $attr  = $this->getAttributes($element->line_text[0]);
195
+                $attr = $this->getAttributes($element->line_text[0]);
197 196
                 $element = new Element\Text($attr['name']);
198 197
                 $element = $this->decorate($element, $attr, $inputFilter);
199 198
                 $form->add($element);
Please login to merge, or discard this patch.
src/Service/CKEditor.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * When %CKEditor is created with the editor() method, a HTML <textarea> element is created,
71 71
      * it will be displayed to anyone with JavaScript disabled or with incompatible browser.
72 72
      */
73
-    public $textareaAttributes = array( "rows" => 8, "cols" => 60 );
73
+    public $textareaAttributes = array("rows" => 8, "cols" => 60);
74 74
     /**
75 75
      * A string indicating the creation date of %CKEditor.
76 76
      * Do not change it unless you want to force browsers to not use previously cached version of %CKEditor.
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $attr = "";
132 132
         foreach ($this->textareaAttributes as $key => $val) {
133
-            $attr.= " " . $key . '="' . str_replace('"', '"', $val) . '"';
133
+            $attr .= " ".$key.'="'.str_replace('"', '"', $val).'"';
134 134
         }
135
-        $out = "<textarea name=\"" . $name . "\"" . $attr . ">" . htmlspecialchars($value) . "</textarea>\n";
135
+        $out = "<textarea name=\"".$name."\"".$attr.">".htmlspecialchars($value)."</textarea>\n";
136 136
         if (!$this->initialized) {
137 137
             $out .= $this->init();
138 138
         }
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
         } else {
231 231
             $js .= "CKEDITOR.replaceAll( function (textarea, config) {\n";
232 232
             if (!empty($className)) {
233
-                $js .= "	var classRegex = new RegExp('(?:^| )' + '". $className ."' + '(?:$| )');\n";
233
+                $js .= "	var classRegex = new RegExp('(?:^| )' + '".$className."' + '(?:$| )');\n";
234 234
                 $js .= "	if (!classRegex.test(textarea.className))\n";
235 235
                 $js .= "		return false;\n";
236 236
             }
237
-            $js .= "	CKEDITOR.tools.extend(config, ". $this->jsEncode($_config) .", true);";
237
+            $js .= "	CKEDITOR.tools.extend(config, ".$this->jsEncode($_config).", true);";
238 238
             $js .= "} );";
239 239
         }
240 240
 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                     }
411 411
                     // Return only new events
412 412
                     if (!in_array($code, $returnedEvents[$eventName])) {
413
-                        $out .= ($code ? "\n" : "") . "CKEDITOR.on('". $eventName ."', $code);";
413
+                        $out .= ($code ? "\n" : "")."CKEDITOR.on('".$eventName."', $code);";
414 414
                         $returnedEvents[$eventName][] = $code;
415 415
                     }
416 416
                 }
@@ -442,19 +442,19 @@  discard block
 block discarded – undo
442 442
         $ckeditorPath = $this->ckeditorPath();
443 443
 
444 444
         if (!empty($this->timestamp) && $this->timestamp != "%"."TIMESTAMP%") {
445
-            $args = '?t=' . $this->timestamp;
445
+            $args = '?t='.$this->timestamp;
446 446
         }
447 447
 
448 448
         // Skip relative paths...
449 449
         if (strpos($ckeditorPath, '..') !== 0) {
450
-            $out .= $this->script("window.CKEDITOR_BASEPATH='". $ckeditorPath ."';");
450
+            $out .= $this->script("window.CKEDITOR_BASEPATH='".$ckeditorPath."';");
451 451
         }
452 452
 
453
-        $out .= "<script type=\"text/javascript\" src=\"" . $ckeditorPath . 'ckeditor.js' . $args . "\"></script>\n";
453
+        $out .= "<script type=\"text/javascript\" src=\"".$ckeditorPath.'ckeditor.js'.$args."\"></script>\n";
454 454
 
455 455
         $extraCode = "";
456 456
         if ($this->timestamp != self::TIMESTAMP) {
457
-            $extraCode .= ($extraCode ? "\n" : "") . "CKEDITOR.timestamp = '". $this->timestamp ."';";
457
+            $extraCode .= ($extraCode ? "\n" : "")."CKEDITOR.timestamp = '".$this->timestamp."';";
458 458
         }
459 459
         if ($extraCode) {
460 460
             $out .= $this->script($extraCode);
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
             /**
486 486
              * realpath - Returns canonicalized absolute pathname
487 487
              */
488
-            $realPath = realpath('./') ;
488
+            $realPath = realpath('./');
489 489
         }
490 490
 
491 491
         /**
@@ -528,15 +528,15 @@  discard block
 block discarded – undo
528 528
             return str_replace(',', '.', $val);
529 529
         }
530 530
         if (is_array($val) || is_object($val)) {
531
-            if (is_array($val) && (array_keys($val) === range(0, count($val)-1))) {
532
-                return '[' . implode(',', array_map(array($this, 'jsEncode'), $val)) . ']';
531
+            if (is_array($val) && (array_keys($val) === range(0, count($val) - 1))) {
532
+                return '['.implode(',', array_map(array($this, 'jsEncode'), $val)).']';
533 533
             }
534 534
             $temp = array();
535 535
             foreach ($val as $k => $v) {
536
-                $temp[] = $this->jsEncode("{$k}") . ':' . $this->jsEncode($v);
536
+                $temp[] = $this->jsEncode("{$k}").':'.$this->jsEncode($v);
537 537
             }
538 538
 
539
-            return '{' . implode(',', $temp) . '}';
539
+            return '{'.implode(',', $temp).'}';
540 540
         }
541 541
         // String otherwise
542 542
         if (strpos($val, '@@') === 0) {
@@ -546,6 +546,6 @@  discard block
 block discarded – undo
546 546
             return $val;
547 547
         }
548 548
 
549
-        return '"' . str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val) . '"';
549
+        return '"'.str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val).'"';
550 550
     }
551 551
 }
Please login to merge, or discard this patch.
src/Service/Image.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 setImage($file)
27 27
     {
28 28
         if (!file_exists($file)) {
29
-            throw new \Exception('Not a file: "' . $file . '"', null, null);
29
+            throw new \Exception('Not a file: "'.$file.'"', null, null);
30 30
         }
31 31
         $this->file = $file;
32 32
         $this->image = imagecreatefromstring(
Please login to merge, or discard this patch.