@@ -11,7 +11,7 @@ |
||
11 | 11 | protected $bitlyUrl = 'http://api.bit.ly/v3/shorten'; |
12 | 12 | protected $transport_class = 'Zend\Mail\Transport\File'; |
13 | 13 | protected $options_class = 'Zend\Mail\Transport\FileOptions'; |
14 | - protected $options = array('path' => 'data/mail/'); |
|
14 | + protected $options = array('path' => 'data/mail/'); |
|
15 | 15 | protected $twilio = array(); |
16 | 16 | protected $phpvideotoolkit = array(); |
17 | 17 | protected $quConfig = array(); |
@@ -70,7 +70,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -18,9 +18,9 @@ |
||
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 | /** |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | * setFormgenMapper |
394 | 394 | * @param FormgenMapper $formgenMapper |
395 | 395 | * |
396 | - * @return PlaygroundCore\Mapper\FormGen FormGen |
|
396 | + * @return Formgen FormGen |
|
397 | 397 | */ |
398 | 398 | public function setFormgenMapper($formgenMapper) |
399 | 399 | { |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | * setOptions |
407 | 407 | * @param ModuleOptions $options |
408 | 408 | * |
409 | - * @return PlaygroundCore\Service\Locale $this |
|
409 | + * @return Formgen $this |
|
410 | 410 | */ |
411 | 411 | public function setOptions(ModuleOptions $options) |
412 | 412 | { |
@@ -94,23 +94,22 @@ discard block |
||
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 |
||
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); |
@@ -26,7 +26,7 @@ |
||
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( |
@@ -34,10 +34,10 @@ |
||
34 | 34 | public function __construct($config) |
35 | 35 | { |
36 | 36 | if (isset($config['enable'])) { |
37 | - $this->enable = (bool)$config['enable']; |
|
37 | + $this->enable = (bool) $config['enable']; |
|
38 | 38 | } |
39 | 39 | if (isset($config['useDefault'])) { |
40 | - $this->useDefault = (bool)$config['useDefault']; |
|
40 | + $this->useDefault = (bool) $config['useDefault']; |
|
41 | 41 | } |
42 | 42 | if (isset($config['default'])) { |
43 | 43 | foreach ($config['default'] as $key => $value) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * General module configurations |
48 | 48 | */ |
49 | 49 | if (isset($this->Config['BasePath'])) { |
50 | - $CKEditor->basePath = $this->Config['BasePath'].'/'; |
|
50 | + $CKEditor->basePath = $this->Config['BasePath'].'/'; |
|
51 | 51 | } |
52 | 52 | if (isset($this->Config['Toolbar'])) { |
53 | 53 | $CKEditor->config['toolbar'] = $this->Config['Toolbar']; |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | $CKEditor->config['stylesSet'] = $this->Config['stylesSet']; |
69 | 69 | } |
70 | 70 | if (isset($this->Config['contentsCss'])) { |
71 | - $CKEditor->config['contentsCss']= $this->Config['contentsCss']; |
|
71 | + $CKEditor->config['contentsCss'] = $this->Config['contentsCss']; |
|
72 | 72 | } |
73 | 73 | if (isset($this->Config['templates_files'])) { |
74 | - $CKEditor->config['templates_files'] = $this->Config['templates_files']; |
|
74 | + $CKEditor->config['templates_files'] = $this->Config['templates_files']; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | // El Finder |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $CKEditor->config['contentsCss'] = $options['contentsCss']; |
117 | 117 | } |
118 | 118 | if (isset($options['templates_files'])) { |
119 | - $CKEditor->config['templates_files'] = $options['templates_files']; |
|
119 | + $CKEditor->config['templates_files'] = $options['templates_files']; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | // El Finder |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | return $locales; |
51 | 51 | } |
52 | 52 | |
53 | - /** |
|
54 | - * getLocaleService : Recuperer le service des locales |
|
55 | - * |
|
56 | - * @return Service/Locale $localeService |
|
57 | - */ |
|
53 | + /** |
|
54 | + * getLocaleService : Recuperer le service des locales |
|
55 | + * |
|
56 | + * @return Service/Locale $localeService |
|
57 | + */ |
|
58 | 58 | public function getLocaleService() |
59 | 59 | { |
60 | 60 | if ($this->localeService === null) { |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | - * setLocaleService : set le service locale |
|
68 | - */ |
|
67 | + * setLocaleService : set le service locale |
|
68 | + */ |
|
69 | 69 | public function setLocaleService($localeService) |
70 | 70 | { |
71 | 71 | $this->localeService = $localeService; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | $lang = $this->getEvent()->getRouteMatch()->getParam('lang'); |
34 | 34 | $context = $this->getEvent()->getRouteMatch()->getParam('area'); |
35 | - $redirect = (!empty($this->getEvent()->getRouteMatch()->getParam('redirect')))? urldecode($this->getEvent()->getRouteMatch()->getParam('redirect')) : '/'.$lang; |
|
35 | + $redirect = (!empty($this->getEvent()->getRouteMatch()->getParam('redirect'))) ? urldecode($this->getEvent()->getRouteMatch()->getParam('redirect')) : '/'.$lang; |
|
36 | 36 | |
37 | 37 | $cookie = new \Zend\Http\Header\SetCookie('pg_locale_'.$context, $lang, time() + 60*60*24*365, '/'); |
38 | 38 | $this->getResponse()->getHeaders()->addHeader($cookie); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * context : (back/front) |
13 | 13 | * referer : retour à la page |
14 | 14 | * |
15 | - * @return Redirect $redirect redirect to referer |
|
15 | + * @return \Zend\Http\Response $redirect redirect to referer |
|
16 | 16 | */ |
17 | 17 | public function switchAction() |
18 | 18 | { |
@@ -24,13 +24,13 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | - * switchAction : permet de switcher de langue en fonction d'un context (back/front) |
|
28 | - * locale : locale pour switch |
|
29 | - * context : (back/front) |
|
30 | - * referer : retour à la page |
|
31 | - * |
|
32 | - * @return Redirect $redirect redirect to referer |
|
33 | - */ |
|
27 | + * switchAction : permet de switcher de langue en fonction d'un context (back/front) |
|
28 | + * locale : locale pour switch |
|
29 | + * context : (back/front) |
|
30 | + * referer : retour à la page |
|
31 | + * |
|
32 | + * @return Redirect $redirect redirect to referer |
|
33 | + */ |
|
34 | 34 | public function switchAction() |
35 | 35 | { |
36 | 36 | $lang = $this->getEvent()->getRouteMatch()->getParam('lang'); |
@@ -309,13 +309,13 @@ discard block |
||
309 | 309 | 'Object' => 'Object', |
310 | 310 | 'Message' => 'Message', |
311 | 311 | |
312 | - // CONTACT FORM |
|
313 | - 'Contact us' => 'Contact us', |
|
314 | - 'A question to ask ?' => 'A question to ask ?', |
|
315 | - 'Your name' => 'Your name', |
|
316 | - 'Your first name' => 'Your first name', |
|
317 | - 'Your email' => 'Your email', |
|
318 | - 'I have a technical problem' => 'I have a technical problem', |
|
312 | + // CONTACT FORM |
|
313 | + 'Contact us' => 'Contact us', |
|
314 | + 'A question to ask ?' => 'A question to ask ?', |
|
315 | + 'Your name' => 'Your name', |
|
316 | + 'Your first name' => 'Your first name', |
|
317 | + 'Your email' => 'Your email', |
|
318 | + 'I have a technical problem' => 'I have a technical problem', |
|
319 | 319 | 'I have a question about games' => 'I have a question about games', |
320 | 320 | 'I have not received my lot or my invitation' => 'I have not received my lot or my invitation', |
321 | 321 | 'I have a comment or suggestion' => 'I have a comment or suggestion', |
@@ -344,9 +344,9 @@ discard block |
||
344 | 344 | 'Previous exceptions' => 'Previous exceptions', |
345 | 345 | 'No Exception available' => 'No Exception available', |
346 | 346 | 'Other games in' => 'Other games in', |
347 | - '' => '', |
|
348 | - '' => '', |
|
349 | - '' => '', |
|
350 | - '' => '', |
|
351 | - '' => '', |
|
347 | + '' => '', |
|
348 | + '' => '', |
|
349 | + '' => '', |
|
350 | + '' => '', |
|
351 | + '' => '', |
|
352 | 352 | ); |