@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false); |
204 | 204 | |
205 | 205 | $this->serviceLocator->get('playgroundcore_phpvideotoolkit') |
206 | - ->addCommand('-i', $videoSource) |
|
207 | - ->addCommand('-i', $audioSource, true) |
|
208 | - ->setOutputPath($target) |
|
209 | - ->execute(); |
|
206 | + ->addCommand('-i', $videoSource) |
|
207 | + ->addCommand('-i', $audioSource, true) |
|
208 | + ->setOutputPath($target) |
|
209 | + ->execute(); |
|
210 | 210 | return $target; |
211 | 211 | } |
212 | 212 | |
@@ -374,10 +374,10 @@ discard block |
||
374 | 374 | } |
375 | 375 | |
376 | 376 | /** |
377 | - * This method concatenate an array of sounds |
|
378 | - * ffmpeg -y -i in-1.wav -i in-2.wav -i in-3.wav |
|
379 | - * -filter_complex '[0:0][1:0][2:0]concat=n=3:v=0:a=1[out]' -map '[out]' out.wav |
|
380 | - */ |
|
377 | + * This method concatenate an array of sounds |
|
378 | + * ffmpeg -y -i in-1.wav -i in-2.wav -i in-3.wav |
|
379 | + * -filter_complex '[0:0][1:0][2:0]concat=n=3:v=0:a=1[out]' -map '[out]' out.wav |
|
380 | + */ |
|
381 | 381 | public function concatenateSounds($sounds, $target) |
382 | 382 | { |
383 | 383 | if (empty($sounds)) { |
@@ -407,10 +407,10 @@ discard block |
||
407 | 407 | } |
408 | 408 | |
409 | 409 | /** |
410 | - * This method merge an array of sounds |
|
411 | - * ffmpeg -i in-1.wav -i in-2.wav -i in-3.wav |
|
412 | - * -filter_complex "[0:a][1:a][2:a]amerge=inputs=3[aout]" -map "[aout]" -ac 2 out.wav |
|
413 | - */ |
|
410 | + * This method merge an array of sounds |
|
411 | + * ffmpeg -i in-1.wav -i in-2.wav -i in-3.wav |
|
412 | + * -filter_complex "[0:a][1:a][2:a]amerge=inputs=3[aout]" -map "[aout]" -ac 2 out.wav |
|
413 | + */ |
|
414 | 414 | public function mergeSounds($sounds, $target) |
415 | 415 | { |
416 | 416 | if (empty($sounds)) { |
@@ -464,9 +464,9 @@ discard block |
||
464 | 464 | } |
465 | 465 | |
466 | 466 | /** |
467 | - * this method extracts an image form a video at the $time second in the video. |
|
468 | - * ffmpeg -ss 00:00:04 -i video.mp4 -vframes 1 out.png |
|
469 | - */ |
|
467 | + * this method extracts an image form a video at the $time second in the video. |
|
468 | + * ffmpeg -ss 00:00:04 -i video.mp4 -vframes 1 out.png |
|
469 | + */ |
|
470 | 470 | public function extractImage($source, $target, $start = '00:00:01', $frames = 1) |
471 | 471 | { |
472 | 472 | $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false); |
@@ -487,10 +487,10 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | /** |
490 | - * this method splits a video into n chunks defined by the frames array. |
|
491 | - * $frames = array(array(0, 12), array(13, 110), array(111, 200)); |
|
492 | - * ffmpeg -i quickns.mov -an -vf "select=between(n\,110\,200),setpts=PTS-STARTPTS" grg.mov |
|
493 | - */ |
|
490 | + * this method splits a video into n chunks defined by the frames array. |
|
491 | + * $frames = array(array(0, 12), array(13, 110), array(111, 200)); |
|
492 | + * ffmpeg -i quickns.mov -an -vf "select=between(n\,110\,200),setpts=PTS-STARTPTS" grg.mov |
|
493 | + */ |
|
494 | 494 | public function splitVideo($source, $frames, $target) |
495 | 495 | { |
496 | 496 | if (empty($frames)) { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ->addPreInputCommand('-pattern_type', 'glob') |
77 | 77 | ->addCommand('-i', $path) |
78 | 78 | ->addCommand('-c:v', 'libx264') |
79 | - ->addCommand('-vf', 'fps='. $fps) |
|
79 | + ->addCommand('-vf', 'fps='.$fps) |
|
80 | 80 | ->addCommand('-pix_fmt', 'yuv420p') |
81 | 81 | ->setOutputPath($target) |
82 | 82 | ->execute(); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | ->addPreInputCommand('-pattern_type', 'glob') |
108 | 108 | ->addCommand('-i', $path) |
109 | 109 | ->addCommand('-vcodec', 'qtrle') |
110 | - ->addCommand('-vf', 'fps='. $fps) |
|
110 | + ->addCommand('-vf', 'fps='.$fps) |
|
111 | 111 | ->setOutputPath($target) |
112 | 112 | ->execute(); |
113 | 113 | } catch (FfmpegProcessOutputException $e) { |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false); |
181 | 181 | $this->serviceLocator->get('playgroundcore_phpvideotoolkit') |
182 | 182 | ->addPreInputCommand('-y') |
183 | - ->addCommand('-i', 'concat:' . implode('|', $videos)) |
|
183 | + ->addCommand('-i', 'concat:'.implode('|', $videos)) |
|
184 | 184 | ->addCommand('-c', 'copy') |
185 | 185 | ->addCommand('-bsf:a', 'aac_adtstoasc') |
186 | 186 | ->addCommand('-bufsize', '1835k') |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | foreach ($layer as $k => $l) { |
296 | 296 | $ffmpeg->addCommand('-i', $l, true); |
297 | 297 | $overlay .= 'overlay=format=rgb'; |
298 | - if ($k<count($layer)-1) { |
|
298 | + if ($k < count($layer) - 1) { |
|
299 | 299 | $overlay .= ','; |
300 | 300 | } |
301 | 301 | } |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | $ffmpeg->addCommand('-i', $s, true); |
397 | 397 | $concat .= '['.$k.':0]'; |
398 | 398 | } |
399 | - $concat .= 'concat=n='. count($sounds) .':v=0:a=1[out]'; |
|
399 | + $concat .= 'concat=n='.count($sounds).':v=0:a=1[out]'; |
|
400 | 400 | |
401 | 401 | $ffmpeg->addCommand('-filter_complex', $concat) |
402 | 402 | ->addCommand('-map', '[out]') |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | $ffmpeg->addCommand('-i', $s, true); |
430 | 430 | $merge .= '['.$k.':a]'; |
431 | 431 | } |
432 | - $merge .= 'amerge=inputs='. count($sounds) .'[aout]'; |
|
432 | + $merge .= 'amerge=inputs='.count($sounds).'[aout]'; |
|
433 | 433 | |
434 | 434 | $ffmpeg->addCommand('-filter_complex', $merge) |
435 | 435 | ->addCommand('-map', '[aout]') |
@@ -450,8 +450,8 @@ discard block |
||
450 | 450 | { |
451 | 451 | $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false); |
452 | 452 | |
453 | - $text = "fontfile=$font:text='". $message."':fontsize=". |
|
454 | - $fontSize .":fontcolor=" . $fontColor . ":x=".$x.":y=".$y; |
|
453 | + $text = "fontfile=$font:text='".$message."':fontsize=". |
|
454 | + $fontSize.":fontcolor=".$fontColor.":x=".$x.":y=".$y; |
|
455 | 455 | |
456 | 456 | $this->serviceLocator->get('playgroundcore_phpvideotoolkit') |
457 | 457 | ->addPreInputCommand('-y') |
@@ -498,14 +498,14 @@ discard block |
||
498 | 498 | } |
499 | 499 | $this->serviceLocator->setShared('playgroundcore_phpvideotoolkit', false); |
500 | 500 | |
501 | - $i=1; |
|
501 | + $i = 1; |
|
502 | 502 | foreach ($frames as $frame) { |
503 | 503 | $this->serviceLocator->get('playgroundcore_phpvideotoolkit') |
504 | 504 | ->addPreInputCommand('-y') |
505 | 505 | ->addCommand('-i', $source) |
506 | 506 | ->addCommand('-an') |
507 | - ->addCommand('-vf', 'select=between(n\,' . $frame[0] . '\,' . $frame[1] . '),setpts=PTS-STARTPTS') |
|
508 | - ->setOutputPath($target . sprintf('s%02d', $i) . '.mov') |
|
507 | + ->addCommand('-vf', 'select=between(n\,'.$frame[0].'\,'.$frame[1].'),setpts=PTS-STARTPTS') |
|
508 | + ->setOutputPath($target.sprintf('s%02d', $i).'.mov') |
|
509 | 509 | ->execute(); |
510 | 510 | $i++; |
511 | 511 | } |
@@ -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 | /** |
@@ -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); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $em = $this->getEm(); |
163 | 163 | $cronRegistry = $this->getCronjobs(); |
164 | 164 | $pending = $this->getPending(); |
165 | - $scheduleLifetime = $this->scheduleLifetime * 60; //convert min to sec |
|
165 | + $scheduleLifetime = $this->scheduleLifetime*60; //convert min to sec |
|
166 | 166 | |
167 | 167 | $now = new \DateTime; |
168 | 168 | foreach ($pending as $job) { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $exists[$identifier] = true; |
244 | 244 | } |
245 | 245 | |
246 | - $scheduleAhead = $this->getScheduleAhead() * 60; |
|
246 | + $scheduleAhead = $this->getScheduleAhead()*60; |
|
247 | 247 | |
248 | 248 | $cronRegistry = $this->getCronjobs(); |
249 | 249 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | ); |
261 | 261 | $scheduleTimestamp = $scheduleTime->getTimestamp(); |
262 | 262 | |
263 | - $identifier = $code . $scheduleTimestamp; |
|
263 | + $identifier = $code.$scheduleTimestamp; |
|
264 | 264 | if (isset($exists[$identifier])) { |
265 | 265 | //already scheduled |
266 | 266 | continue; |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $em = $this->getEm(); |
307 | 307 | $running = $em->getRepository('PlaygroundCore\Entity\Cronjob') |
308 | 308 | ->getRunning(); |
309 | - $expiryTime = time() - $this->getMaxRunningTime() * 60; |
|
309 | + $expiryTime = time() - $this->getMaxRunningTime()*60; |
|
310 | 310 | |
311 | 311 | foreach ($running as $job) { |
312 | 312 | if ($job->getExecuteTime() |
@@ -335,11 +335,11 @@ discard block |
||
335 | 335 | $em = $this->getEm(); |
336 | 336 | $lifetime = array( |
337 | 337 | Mapper\Cronjob::STATUS_SUCCESS => |
338 | - $this->getSuccessLogLifetime() * 60, |
|
338 | + $this->getSuccessLogLifetime()*60, |
|
339 | 339 | Mapper\Cronjob::STATUS_MISSED => |
340 | - $this->getFailureLogLifetime() * 60, |
|
340 | + $this->getFailureLogLifetime()*60, |
|
341 | 341 | Mapper\Cronjob::STATUS_ERROR => |
342 | - $this->getFailureLogLifetime() * 60, |
|
342 | + $this->getFailureLogLifetime()*60, |
|
343 | 343 | ); |
344 | 344 | |
345 | 345 | $history = $em->getRepository('PlaygroundCore\Entity\Cronjob') |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | )); |
546 | 546 | } |
547 | 547 | |
548 | - return ($num >= $from) && ($num <= $to) && ($num % $mod === 0); |
|
548 | + return ($num >= $from) && ($num <= $to) && ($num%$mod === 0); |
|
549 | 549 | } |
550 | 550 | |
551 | 551 | /** |
@@ -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 | } |
@@ -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( |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | const FORBIDDEN = 'FORBIDDEN'; |
11 | 11 | |
12 | 12 | protected $options = array( |
13 | - 'file' => null, // File containing the blacklist file |
|
13 | + 'file' => null, // File containing the blacklist file |
|
14 | 14 | ); |
15 | 15 | |
16 | 16 | protected $messageTemplates = array( |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | public function __construct($options = null) |
21 | 21 | { |
22 | 22 | if (is_string($options)) { |
23 | - $this->options = array('file' => str_replace('\\', '/', getcwd()) . '/' . ltrim($options, '/')); |
|
23 | + $this->options = array('file' => str_replace('\\', '/', getcwd()).'/'.ltrim($options, '/')); |
|
24 | 24 | } elseif (is_array($options)) { |
25 | - $this->options = array('file' => str_replace('\\', '/', getcwd()) . $options[0]); |
|
25 | + $this->options = array('file' => str_replace('\\', '/', getcwd()).$options[0]); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | parent::__construct($options); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | $this->assembledParams = array(); |
46 | 46 | |
47 | 47 | foreach ($mergedParams as $key => $value) { |
48 | - $spec = '%' . $key . '%'; |
|
48 | + $spec = '%'.$key.'%'; |
|
49 | 49 | |
50 | 50 | if (strpos($url, $spec) !== false) { |
51 | 51 | $url = str_replace($spec, rawurlencode($value), $url); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function getPath() |
48 | 48 | { |
49 | 49 | if (empty($this->path)) { |
50 | - $this->path = str_replace('\\', '/', getcwd()) . '/language/countries'; |
|
50 | + $this->path = str_replace('\\', '/', getcwd()).'/language/countries'; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | return $this->path; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function getCorePath() |
57 | 57 | { |
58 | 58 | if (empty($this->corePath)) { |
59 | - $this->corePath = __DIR__ . '/../../language/countries'; |
|
59 | + $this->corePath = __DIR__.'/../../language/countries'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this->corePath; |
@@ -69,10 +69,10 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | $fileName = $this->getPath().'/'.$translatedTo.'.php'; |
72 | - if (! file_exists($fileName)) { |
|
72 | + if (!file_exists($fileName)) { |
|
73 | 73 | $fileName = $this->getCorePath().'/'.$translatedTo.'.php'; |
74 | 74 | |
75 | - if (! file_exists($fileName)) { |
|
75 | + if (!file_exists($fileName)) { |
|
76 | 76 | throw new \InvalidArgumentException("Language $translatedTo not found."); |
77 | 77 | } |
78 | 78 | } |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | $translatedTo = $this->serviceLocator->get('MvcTranslator')->getLocale(); |
87 | 87 | } |
88 | 88 | $fileName = $this->getPath().'/'.$translatedTo.'.php'; |
89 | - if (! file_exists($fileName)) { |
|
89 | + if (!file_exists($fileName)) { |
|
90 | 90 | $fileName = $this->getCorePath().'/'.$translatedTo.'.php'; |
91 | - if (! file_exists($fileName)) { |
|
91 | + if (!file_exists($fileName)) { |
|
92 | 92 | throw new \InvalidArgumentException("Language $translatedTo not found."); |
93 | 93 | } |
94 | 94 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function recaptcha($response, $ipClient = null) |
37 | 37 | { |
38 | 38 | $platformSettings = $this->serviceLocator->get('playgrounddesign_settings_service')->getSettingsMapper()->findById(1); |
39 | - if ($this->getOptions()->getGRecaptchaKey() || ($platformSettings && $platformSettings->getGReCaptchaKey() !== null) ) { |
|
39 | + if ($this->getOptions()->getGRecaptchaKey() || ($platformSettings && $platformSettings->getGReCaptchaKey() !== null)) { |
|
40 | 40 | $rUrl = ($this->getOptions()->getGRecaptchaUrl() !== null) ? $this->getOptions()->getGRecaptchaUrl() : $platformSettings->getGReCaptchaUrl(); |
41 | 41 | $rKey = ($this->getOptions()->getGRecaptchaKey() !== null) ? $this->getOptions()->getGRecaptchaKey() : $platformSettings->getGReCaptchaKey(); |
42 | 42 |