@@ -130,7 +130,6 @@ |
||
130 | 130 | |
131 | 131 | |
132 | 132 | /** |
133 | - * @param int $id |
|
134 | 133 | * @return Locale |
135 | 134 | */ |
136 | 135 | public function setActiveFront($activeFront) |
@@ -37,15 +37,15 @@ discard block |
||
37 | 37 | */ |
38 | 38 | protected $locale; |
39 | 39 | |
40 | - /** |
|
41 | - * active_back |
|
42 | - * @ORM\Column(type="boolean", nullable=false) |
|
43 | - */ |
|
40 | + /** |
|
41 | + * active_back |
|
42 | + * @ORM\Column(type="boolean", nullable=false) |
|
43 | + */ |
|
44 | 44 | protected $active_back = 0; |
45 | - /** |
|
46 | - * active_front |
|
47 | - * @ORM\Column(type="boolean", nullable=false) |
|
48 | - */ |
|
45 | + /** |
|
46 | + * active_front |
|
47 | + * @ORM\Column(type="boolean", nullable=false) |
|
48 | + */ |
|
49 | 49 | protected $active_front = 0; |
50 | 50 | |
51 | 51 | /** |
@@ -232,19 +232,19 @@ discard block |
||
232 | 232 | |
233 | 233 | |
234 | 234 | /** |
235 | - * setInputFilter |
|
236 | - * @param InputFilterInterface $inputFilter |
|
237 | - */ |
|
235 | + * setInputFilter |
|
236 | + * @param InputFilterInterface $inputFilter |
|
237 | + */ |
|
238 | 238 | public function setInputFilter(InputFilterInterface $inputFilter) |
239 | 239 | { |
240 | 240 | throw new \Exception("Not used"); |
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * getInputFilter |
|
245 | - * |
|
246 | - * @return InputFilter $inputFilter |
|
247 | - */ |
|
244 | + * getInputFilter |
|
245 | + * |
|
246 | + * @return InputFilter $inputFilter |
|
247 | + */ |
|
248 | 248 | public function getInputFilter() |
249 | 249 | { |
250 | 250 | if (!$this->inputFilter) { |
@@ -143,7 +143,7 @@ discard block |
||
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 |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | - * @return string $default |
|
165 | + * @return integer $default |
|
166 | 166 | */ |
167 | 167 | public function getDefault() |
168 | 168 | { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
184 | - * @return PlaygroundCore\Entity\Locale $locales |
|
184 | + * @return \Doctrine\Common\Collections\Collection $locales |
|
185 | 185 | */ |
186 | 186 | public function getLocales() |
187 | 187 | { |
@@ -249,7 +249,6 @@ discard block |
||
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 | { |
@@ -161,9 +161,9 @@ discard block |
||
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 |
||
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 |
||
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) { |
@@ -85,7 +85,6 @@ discard block |
||
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) |
@@ -137,7 +136,7 @@ discard block |
||
137 | 136 | * Remove not replaced character |
138 | 137 | * |
139 | 138 | * @param string|array $notReplaced |
140 | - * @return Zend_Filter_Sanitize |
|
139 | + * @return Sanitize |
|
141 | 140 | */ |
142 | 141 | public function removeNotReplacedChar($notReplaced) |
143 | 142 | { |
@@ -177,7 +176,7 @@ discard block |
||
177 | 176 | * Sets the delimiterReplacement option |
178 | 177 | * |
179 | 178 | * @param string $delimiterReplacement |
180 | - * @return Zend_Filter_Sanitize Provides a fluent interface |
|
179 | + * @return Sanitize Provides a fluent interface |
|
181 | 180 | */ |
182 | 181 | public function setDelimiterReplacement($delimiterReplacement) |
183 | 182 | { |
@@ -199,7 +198,7 @@ discard block |
||
199 | 198 | * Add word delimiter |
200 | 199 | * |
201 | 200 | * @param string|array $delimiter |
202 | - * @return Zend_Filter_Sanitize |
|
201 | + * @return Sanitize |
|
203 | 202 | */ |
204 | 203 | public function addWordDelimiter($delimiter) |
205 | 204 | { |
@@ -221,7 +220,7 @@ discard block |
||
221 | 220 | * Remove word delimiter |
222 | 221 | * |
223 | 222 | * @param string|array $delimiter |
224 | - * @return Zend_Filter_Sanitize |
|
223 | + * @return Sanitize |
|
225 | 224 | */ |
226 | 225 | public function removeWordDelimiter($delimiter) |
227 | 226 | { |
@@ -77,7 +77,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * Either the template to use, or a ViewModel |
47 | 47 | * @param null|array $values |
48 | 48 | * Values to use when the template is rendered |
49 | - * @return Message |
|
49 | + * @return MailMessage |
|
50 | 50 | */ |
51 | 51 | public function createHtmlMessage($from, $to, $subject, $nameOrModel, $values = array()) |
52 | 52 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * Either the template to use, or a ViewModel |
107 | 107 | * @param null|array $values |
108 | 108 | * Values to use when the template is rendered |
109 | - * @return Message |
|
109 | + * @return MailMessage |
|
110 | 110 | */ |
111 | 111 | public function createTextMessage($from, $to, $subject, $nameOrModel, $values = array()) |
112 | 112 | { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | /** |
120 | 120 | * Send the message |
121 | 121 | * |
122 | - * @param Message $message |
|
122 | + * @param MailMessage $message |
|
123 | 123 | */ |
124 | 124 | public function send(MailMessage $message) |
125 | 125 | { |
@@ -157,7 +157,10 @@ discard block |
||
157 | 157 | |
158 | 158 | /** |
159 | 159 | * |
160 | - * @return Message |
|
160 | + * @param string $encoding |
|
161 | + * @param string $subject |
|
162 | + * @param string $body |
|
163 | + * @return MailMessage |
|
161 | 164 | */ |
162 | 165 | protected function getDefaultMessage($from, $encoding, $to, $subject, $body) |
163 | 166 | { |
@@ -57,8 +57,8 @@ discard block |
||
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 |
||
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); |
@@ -399,7 +399,7 @@ |
||
399 | 399 | /** |
400 | 400 | * determine whether a given time falls within the given cron expr |
401 | 401 | * |
402 | - * @param string|numeric $time |
|
402 | + * @param integer $time |
|
403 | 403 | * timestamp or strtotime()-compatible string |
404 | 404 | * @param string $expr |
405 | 405 | * any valid cron expression, in addition supporting: |
@@ -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 | /** |
@@ -24,7 +24,6 @@ |
||
24 | 24 | /** |
25 | 25 | * Generates the Item controller |
26 | 26 | * |
27 | - * @param ServiceLocatorInterface $serviceLocator |
|
28 | 27 | * @return \PHPVideoToolkit\FfmpegProcess |
29 | 28 | */ |
30 | 29 | public function createService(ServiceLocatorInterface $serviceManager) |
@@ -25,7 +25,6 @@ |
||
25 | 25 | /** |
26 | 26 | * Generates the Item controller |
27 | 27 | * |
28 | - * @param ServiceLocatorInterface $serviceLocator |
|
29 | 28 | * @return Services_Twilio |
30 | 29 | */ |
31 | 30 | public function createService(ServiceLocatorInterface $serviceManager) |
@@ -171,7 +171,7 @@ |
||
171 | 171 | * This method will merge videos in .mpg format with exactly the same codec and codec parameters : |
172 | 172 | * http://trac.ffmpeg.org/wiki/Concatenate |
173 | 173 | * @param array $videos |
174 | - * @return string |
|
174 | + * @return boolean |
|
175 | 175 | */ |
176 | 176 | public function mergeMpgVideos($videos = false, $target = false) |
177 | 177 | { |
@@ -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 | } |
@@ -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 | { |
@@ -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); |