@@ -10,7 +10,7 @@ |
||
10 | 10 | protected $Config; |
11 | 11 | |
12 | 12 | /** |
13 | - * @return array|\Zend\View\Model\ViewModel |
|
13 | + * @return ViewModel |
|
14 | 14 | */ |
15 | 15 | public function indexAction() |
16 | 16 | { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | $view = new ViewModel(); |
31 | 31 | $this->getConfig(); |
32 | - $view->BasePath = $this->Config['BasePath']; |
|
32 | + $view->BasePath = $this->Config['BasePath']; |
|
33 | 33 | $view->ConnectorPath = '/admin/elfinder/connector'; |
34 | 34 | $view->setTerminal(true); |
35 | 35 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | public function getConfig() |
84 | 84 | { |
85 | 85 | if (!$this->Config) { |
86 | - $config = $this->getServiceLocator()->get('config'); |
|
86 | + $config = $this->getServiceLocator()->get('config'); |
|
87 | 87 | if (isset($config['playgroundcore']) && isset($config['playgroundcore']['QuConfig']) && isset($config['playgroundcore']['QuConfig']['QuElFinder'])) { |
88 | 88 | $this->Config = $config['playgroundcore']['QuConfig']['QuElFinder']; |
89 | 89 | } else { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * context : (back/front) |
27 | 27 | * referer : retour à la page |
28 | 28 | * |
29 | - * @return Redirect $redirect redirect to referer |
|
29 | + * @return \Zend\Http\Response $redirect redirect to referer |
|
30 | 30 | */ |
31 | 31 | public function switchAction() |
32 | 32 | { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | /** |
60 | 60 | * getServiceLocator : Recuperer le service locator |
61 | - * @return ServiceLocator $serviceLocator |
|
61 | + * @return ServiceLocatorInterface $serviceLocator |
|
62 | 62 | */ |
63 | 63 | public function getServiceLocator() |
64 | 64 | { |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Zend Framework (http://framework.zend.com/) |
|
4 | - * |
|
5 | - * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository |
|
6 | - * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) |
|
7 | - * @license http://framework.zend.com/license/new-bsd New BSD License |
|
8 | - */ |
|
3 | + * Zend Framework (http://framework.zend.com/) |
|
4 | + * |
|
5 | + * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository |
|
6 | + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) |
|
7 | + * @license http://framework.zend.com/license/new-bsd New BSD License |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | namespace PlaygroundCore\Controller\Frontend; |
11 | 11 | |
@@ -16,18 +16,18 @@ discard block |
||
16 | 16 | class SwitchLocaleController extends AbstractActionController implements ServiceLocatorAwareInterface |
17 | 17 | { |
18 | 18 | /** |
19 | - * @var $localeService : Service des locales |
|
20 | - */ |
|
19 | + * @var $localeService : Service des locales |
|
20 | + */ |
|
21 | 21 | protected $localeService; |
22 | 22 | |
23 | 23 | /** |
24 | - * switchAction : permet de switcher de langue en fonction d'un context (back/front) |
|
25 | - * locale : locale pour switch |
|
26 | - * context : (back/front) |
|
27 | - * referer : retour à la page |
|
28 | - * |
|
29 | - * @return Redirect $redirect redirect to referer |
|
30 | - */ |
|
24 | + * switchAction : permet de switcher de langue en fonction d'un context (back/front) |
|
25 | + * locale : locale pour switch |
|
26 | + * context : (back/front) |
|
27 | + * referer : retour à la page |
|
28 | + * |
|
29 | + * @return Redirect $redirect redirect to referer |
|
30 | + */ |
|
31 | 31 | public function switchAction() |
32 | 32 | { |
33 | 33 | $locale = $this->getEvent()->getRouteMatch()->getParam('locale'); |
@@ -57,27 +57,27 @@ discard block |
||
57 | 57 | |
58 | 58 | |
59 | 59 | /** |
60 | - * getServiceLocator : Recuperer le service locator |
|
61 | - * @return ServiceLocator $serviceLocator |
|
62 | - */ |
|
60 | + * getServiceLocator : Recuperer le service locator |
|
61 | + * @return ServiceLocator $serviceLocator |
|
62 | + */ |
|
63 | 63 | public function getServiceLocator() |
64 | 64 | { |
65 | 65 | return $this->serviceLocator; |
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
69 | - * setServiceLocator : set le service locator |
|
70 | - */ |
|
69 | + * setServiceLocator : set le service locator |
|
70 | + */ |
|
71 | 71 | public function setServiceLocator(ServiceLocatorInterface $serviceLocator) |
72 | 72 | { |
73 | 73 | $this->serviceLocator = $serviceLocator; |
74 | 74 | } |
75 | 75 | |
76 | - /** |
|
77 | - * getLocaleService : Recuperer le service des locales |
|
78 | - * |
|
79 | - * @return Service/Locale $localeService |
|
80 | - */ |
|
76 | + /** |
|
77 | + * getLocaleService : Recuperer le service des locales |
|
78 | + * |
|
79 | + * @return Service/Locale $localeService |
|
80 | + */ |
|
81 | 81 | public function getLocaleService() |
82 | 82 | { |
83 | 83 | if ($this->localeService === null) { |
@@ -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); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * set service |
33 | 33 | * |
34 | 34 | * @param $service |
35 | - * @return String |
|
35 | + * @return ShortenUrl |
|
36 | 36 | */ |
37 | 37 | public function setService($service) |
38 | 38 | { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @param string $id |
75 | - * @return Locale |
|
75 | + * @return Formgen |
|
76 | 76 | */ |
77 | 77 | public function setId($id) |
78 | 78 | { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
182 | - * @return string $active |
|
182 | + * @return integer $active |
|
183 | 183 | */ |
184 | 184 | public function getActive() |
185 | 185 | { |
@@ -49,15 +49,15 @@ discard block |
||
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 |
||
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) { |
@@ -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 | } |
@@ -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 | /** |
@@ -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) |