@@ -5,7 +5,6 @@ |
||
5 | 5 | use Gaufrette\Adapter; |
6 | 6 | use Gaufrette\File; |
7 | 7 | use Gaufrette\Filesystem; |
8 | -use Gaufrette\Exception; |
|
9 | 8 | |
10 | 9 | /** |
11 | 10 | * Ftp adapter |
@@ -328,6 +328,11 @@ discard block |
||
328 | 328 | } |
329 | 329 | } |
330 | 330 | |
331 | + /** |
|
332 | + * @param string $key |
|
333 | + * |
|
334 | + * @return string |
|
335 | + */ |
|
331 | 336 | protected function computePath($key) |
332 | 337 | { |
333 | 338 | if (empty($this->options['directory'])) { |
@@ -341,7 +346,7 @@ discard block |
||
341 | 346 | * @param string $path |
342 | 347 | * @param array $options |
343 | 348 | * |
344 | - * @return bool|\Google_Service_Storage_StorageObject |
|
349 | + * @return string |
|
345 | 350 | */ |
346 | 351 | private function getObjectData($path, $options = array()) |
347 | 352 | { |
@@ -145,6 +145,9 @@ |
||
145 | 145 | return isset($this->metadata[$key]) ? $this->metadata[$key] : array(); |
146 | 146 | } |
147 | 147 | |
148 | + /** |
|
149 | + * @param string $key |
|
150 | + */ |
|
148 | 151 | private function find($key, array $fields = array()) |
149 | 152 | { |
150 | 153 | return $this->gridFS->findOne($key, $fields); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | /** |
251 | 251 | * Makes request to MogileFS tracker |
252 | 252 | * |
253 | - * @param cmd Command |
|
253 | + * @param cmd string |
|
254 | 254 | * @param args Array of arguments |
255 | 255 | * @return mixed Array on success, false on failure |
256 | 256 | */ |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | /** |
302 | 302 | * Get file location at server from MogileFS tracker |
303 | 303 | * |
304 | - * @param key File key |
|
304 | + * @param key string key |
|
305 | 305 | * @return mixed Array on success, false on failure |
306 | 306 | */ |
307 | 307 | private function getPaths($key) |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | * Sends file to MogileFS tracker |
317 | 317 | * |
318 | 318 | * @param path Save path at server |
319 | - * @param data Data to save |
|
319 | + * @param data string to save |
|
320 | 320 | * @return boolean |
321 | 321 | */ |
322 | 322 | private function putFile($path, $data) |
@@ -185,6 +185,10 @@ discard block |
||
185 | 185 | $this->initialized = true; |
186 | 186 | } |
187 | 187 | |
188 | + /** |
|
189 | + * @param string|null $directory |
|
190 | + * @param boolean $create |
|
191 | + */ |
|
188 | 192 | protected function ensureDirectoryExists($directory, $create) |
189 | 193 | { |
190 | 194 | $pwd = $this->sftp->pwd(); |
@@ -199,6 +203,9 @@ discard block |
||
199 | 203 | } |
200 | 204 | } |
201 | 205 | |
206 | + /** |
|
207 | + * @param string $key |
|
208 | + */ |
|
202 | 209 | protected function computePath($key) |
203 | 210 | { |
204 | 211 | return $this->directory . '/' . ltrim($key, '/'); |
@@ -136,7 +136,7 @@ |
||
136 | 136 | * Returns the stat of a file in the zip archive |
137 | 137 | * (name, index, crc, mtime, compression size, compression method, filesize) |
138 | 138 | * |
139 | - * @param $key |
|
139 | + * @param string $key |
|
140 | 140 | * @return array|bool |
141 | 141 | */ |
142 | 142 | public function getStat($key) |
@@ -269,6 +269,7 @@ discard block |
||
269 | 269 | |
270 | 270 | /** |
271 | 271 | * {@inheritDoc} |
272 | + * @param string $key |
|
272 | 273 | */ |
273 | 274 | public function createStream($key) |
274 | 275 | { |
@@ -281,6 +282,7 @@ discard block |
||
281 | 282 | |
282 | 283 | /** |
283 | 284 | * {@inheritDoc} |
285 | + * @param string $key |
|
284 | 286 | */ |
285 | 287 | public function createFile($key) |
286 | 288 | { |
@@ -686,6 +686,11 @@ discard block |
||
686 | 686 | * --------------------------------------------------------------------------------------------- |
687 | 687 | */ |
688 | 688 | |
689 | + /** |
|
690 | + * @param double $v1 |
|
691 | + * @param double $v2 |
|
692 | + * @param integer $vh |
|
693 | + */ |
|
689 | 694 | private function hue_to_rgb($v1, $v2, $vh) |
690 | 695 | { |
691 | 696 | $vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh); |
@@ -700,6 +705,10 @@ discard block |
||
700 | 705 | return intval(floor(floatval($n) + 0.5), 10); |
701 | 706 | } |
702 | 707 | |
708 | + /** |
|
709 | + * @param integer $min |
|
710 | + * @param integer $max |
|
711 | + */ |
|
703 | 712 | private function clamp_number($n, $min, $max) |
704 | 713 | { |
705 | 714 | return min(max($n, $min), $max); |
@@ -728,7 +737,7 @@ discard block |
||
728 | 737 | * |
729 | 738 | * @param string $str |
730 | 739 | * @param int $start index |
731 | - * @param int|bool $end index (optional) |
|
740 | + * @param integer $end index (optional) |
|
732 | 741 | * @return string |
733 | 742 | */ |
734 | 743 | private function str_slice($str, $start = 0, $end = FALSE) |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | /** |
244 | 244 | * When the object gets serialized only include specific object members. |
245 | 245 | * |
246 | - * @return array |
|
246 | + * @return string[] |
|
247 | 247 | */ |
248 | 248 | public function __sleep() |
249 | 249 | { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * |
403 | 403 | * Will throw exceptions for each php error. |
404 | 404 | * |
405 | - * @return mixed Returns a string containing the previously defined error handler (if any) |
|
405 | + * @return null|callable Returns a string containing the previously defined error handler (if any) |
|
406 | 406 | */ |
407 | 407 | public function registerErrorHandler($throwErrorExceptions = false) |
408 | 408 | { |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | /** |
449 | 449 | * Register FirePHP as your exception handler |
450 | 450 | * |
451 | - * @return mixed Returns the name of the previously defined exception handler, |
|
451 | + * @return callable Returns the name of the previously defined exception handler, |
|
452 | 452 | * or NULL on error. |
453 | 453 | * If no previous handler was defined, NULL is also returned. |
454 | 454 | */ |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | * |
535 | 535 | * @param string $name |
536 | 536 | * @param array $options OPTIONAL Instructions on how to log the group |
537 | - * @return true |
|
537 | + * @return boolean |
|
538 | 538 | * @throws Exception |
539 | 539 | */ |
540 | 540 | public function group($name, $options = null) |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | /** |
560 | 560 | * Ends a group you have started before |
561 | 561 | * |
562 | - * @return true |
|
562 | + * @return boolean |
|
563 | 563 | * @throws Exception |
564 | 564 | */ |
565 | 565 | public function groupEnd() |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | * @see FirePHP::LOG |
574 | 574 | * @param mixes $object |
575 | 575 | * @param string $label |
576 | - * @return true |
|
576 | + * @return boolean |
|
577 | 577 | * @throws Exception |
578 | 578 | */ |
579 | 579 | public function log($object, $label = null, $options = array()) |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | * @see FirePHP::INFO |
588 | 588 | * @param mixes $object |
589 | 589 | * @param string $label |
590 | - * @return true |
|
590 | + * @return boolean |
|
591 | 591 | * @throws Exception |
592 | 592 | */ |
593 | 593 | public function info($object, $label = null, $options = array()) |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | * @see FirePHP::WARN |
602 | 602 | * @param mixes $object |
603 | 603 | * @param string $label |
604 | - * @return true |
|
604 | + * @return boolean |
|
605 | 605 | * @throws Exception |
606 | 606 | */ |
607 | 607 | public function warn($object, $label = null, $options = array()) |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | * @see FirePHP::ERROR |
616 | 616 | * @param mixes $object |
617 | 617 | * @param string $label |
618 | - * @return true |
|
618 | + * @return boolean |
|
619 | 619 | * @throws Exception |
620 | 620 | */ |
621 | 621 | public function error($object, $label = null, $options = array()) |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | * @see FirePHP::DUMP |
630 | 630 | * @param string $key |
631 | 631 | * @param mixed $variable |
632 | - * @return true |
|
632 | + * @return boolean |
|
633 | 633 | * @throws Exception |
634 | 634 | */ |
635 | 635 | public function dump($key, $variable, $options = array()) |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | * |
652 | 652 | * @see FirePHP::TRACE |
653 | 653 | * @param string $label |
654 | - * @return true |
|
654 | + * @return boolean |
|
655 | 655 | * @throws Exception |
656 | 656 | */ |
657 | 657 | public function trace($label) |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | * @see FirePHP::TABLE |
666 | 666 | * @param string $label |
667 | 667 | * @param string $table |
668 | - * @return true |
|
668 | + * @return boolean |
|
669 | 669 | * @throws Exception |
670 | 670 | */ |
671 | 671 | public function table($label, $table, $options = array()) |
@@ -1207,6 +1207,7 @@ discard block |
||
1207 | 1207 | /** |
1208 | 1208 | * Get a request header |
1209 | 1209 | * |
1210 | + * @param string $name |
|
1210 | 1211 | * @return string|false |
1211 | 1212 | */ |
1212 | 1213 | protected function getRequestHeader($name) |
@@ -1285,7 +1286,7 @@ discard block |
||
1285 | 1286 | * protected and private visibility |
1286 | 1287 | * |
1287 | 1288 | * @param object $object The object to be encoded |
1288 | - * @param integer $Depth The current traversal depth |
|
1289 | + * @param integer $maxDepth The current traversal depth |
|
1289 | 1290 | * @return array All members of the object |
1290 | 1291 | */ |
1291 | 1292 | protected function encodeObject($object, $objectDepth = 1, $arrayDepth = 1, $maxDepth = 1) |