@@ -28,6 +28,10 @@ discard block |
||
28 | 28 | protected $_extracted_from_source = FALSE; |
29 | 29 | |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $server |
|
33 | + * @param string $path |
|
34 | + */ |
|
31 | 35 | public function __construct($server, $path, $filename = NULL) |
32 | 36 | { |
33 | 37 | $this->server($server); |
@@ -320,7 +324,6 @@ discard block |
||
320 | 324 | /** |
321 | 325 | * Get the current url (temp or server) |
322 | 326 | * @param string $thumbnail |
323 | - * @param mixed $protocol |
|
324 | 327 | * @return string |
325 | 328 | */ |
326 | 329 | public function url($thumbnail = NULL) |
@@ -346,6 +349,10 @@ discard block |
||
346 | 349 | return $this->temp()->directory().'/'.$this->filename(); |
347 | 350 | } |
348 | 351 | |
352 | + /** |
|
353 | + * @param string $method |
|
354 | + * @param string $thumbnail |
|
355 | + */ |
|
349 | 356 | protected function location($method, $thumbnail = NULL) |
350 | 357 | { |
351 | 358 | if ( ! $this->filename()) |
@@ -14,6 +14,9 @@ discard block |
||
14 | 14 | return new Upload_Temp; |
15 | 15 | } |
16 | 16 | |
17 | + /** |
|
18 | + * @param string $name |
|
19 | + */ |
|
17 | 20 | public static function config($name = NULL) |
18 | 21 | { |
19 | 22 | if ($name !== NULL) |
@@ -33,6 +36,9 @@ discard block |
||
33 | 36 | |
34 | 37 | protected $_directory; |
35 | 38 | |
39 | + /** |
|
40 | + * @param string $directory |
|
41 | + */ |
|
36 | 42 | public function directory($directory = NULL) |
37 | 43 | { |
38 | 44 | if ($directory !== NULL) |
@@ -11,6 +11,9 @@ discard block |
||
11 | 11 | */ |
12 | 12 | class Kohana_Upload_Util { |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $directory |
|
16 | + */ |
|
14 | 17 | public static function download($url, $directory, $filename = NULL) |
15 | 18 | { |
16 | 19 | $url = str_replace(' ', '%20', $url); |
@@ -63,8 +66,7 @@ discard block |
||
63 | 66 | * Move the contents of the stream to a specified directory with a given name |
64 | 67 | * |
65 | 68 | * @param string $stream |
66 | - * @param string $directory |
|
67 | - * @param string $filename |
|
69 | + * @param string $file |
|
68 | 70 | */ |
69 | 71 | public static function stream_copy_to_file($stream, $file) |
70 | 72 | { |
@@ -146,7 +148,7 @@ discard block |
||
146 | 148 | * Filenames can be in the query or the url of the file itself |
147 | 149 | * |
148 | 150 | * @param string $url |
149 | - * @return array |
|
151 | + * @return string[] |
|
150 | 152 | */ |
151 | 153 | public static function filenames_candidates_from_url($url) |
152 | 154 | { |
@@ -48,7 +48,6 @@ discard block |
||
48 | 48 | /** |
49 | 49 | * Initialize foreign_key, as, and polymorphic_key with default values |
50 | 50 | * |
51 | - * @param string $model |
|
52 | 51 | * @param string $name |
53 | 52 | */ |
54 | 53 | public function initialize(Jam_Meta $meta, $name) |
@@ -174,7 +173,7 @@ discard block |
||
174 | 173 | /** |
175 | 174 | * Generate a query to delete associated models in the database |
176 | 175 | * @param Jam_Model $model |
177 | - * @return Database_Query |
|
176 | + * @return null|Jam_Query_Builder_Delete |
|
178 | 177 | */ |
179 | 178 | public function erase_query(Jam_Model $model) |
180 | 179 | { |
@@ -197,7 +196,7 @@ discard block |
||
197 | 196 | /** |
198 | 197 | * Generate a query to remove models from this association (without deleting them) |
199 | 198 | * @param Jam_Model $model |
200 | - * @return Database_Query |
|
199 | + * @return null|Jam_Query_Builder_Update |
|
201 | 200 | */ |
202 | 201 | public function nullify_query(Jam_Model $model) |
203 | 202 | { |
@@ -280,6 +279,10 @@ discard block |
||
280 | 279 | } |
281 | 280 | |
282 | 281 | |
282 | + /** |
|
283 | + * @param string|null $polymorphic_key |
|
284 | + * @param Jam_Validated|null $inverse_of |
|
285 | + */ |
|
283 | 286 | protected function assign_item(Jam_Model $item, $foreign_key, $polymorphic_key, $inverse_of) |
284 | 287 | { |
285 | 288 | $item->{$this->foreign_key} = $foreign_key; |
@@ -260,6 +260,9 @@ discard block |
||
260 | 260 | return $this->_collection; |
261 | 261 | } |
262 | 262 | |
263 | + /** |
|
264 | + * @param string $field |
|
265 | + */ |
|
263 | 266 | public function validator($field, $options) |
264 | 267 | { |
265 | 268 | $fields = func_get_args(); |
@@ -402,7 +405,7 @@ discard block |
||
402 | 405 | * |
403 | 406 | * @param string $name name of the field |
404 | 407 | * @param mixed $field the field alias or object |
405 | - * @return Jam_Field|$this|null |
|
408 | + * @return string |
|
406 | 409 | */ |
407 | 410 | public function field($name, $field = NULL, $prepend = FALSE) |
408 | 411 | { |
@@ -628,7 +631,6 @@ discard block |
||
628 | 631 | * Get / Set individual behaviors. |
629 | 632 | * |
630 | 633 | * @param string $name name of the association |
631 | - * @param mixed $association the association alias or object |
|
632 | 634 | * @return Jam_Behavior|$this|null |
633 | 635 | */ |
634 | 636 | public function behavior($name, $behavior = NULL, $prepend = FALSE) |
@@ -676,7 +678,7 @@ discard block |
||
676 | 678 | * Gets or sets the model's primary key. |
677 | 679 | * |
678 | 680 | * @param string $value |
679 | - * @return mixed |
|
681 | + * @return string |
|
680 | 682 | */ |
681 | 683 | public function primary_key($value = NULL) |
682 | 684 | { |
@@ -692,7 +694,7 @@ discard block |
||
692 | 694 | * Gets or sets the model's name key |
693 | 695 | * |
694 | 696 | * @param string $value |
695 | - * @return string|$this |
|
697 | + * @return string |
|
696 | 698 | */ |
697 | 699 | public function name_key($value = NULL) |
698 | 700 | { |
@@ -39,7 +39,6 @@ discard block |
||
39 | 39 | * A key can be passed to automatically load a model by its |
40 | 40 | * unique key. |
41 | 41 | * |
42 | - * @param mixed|null $key |
|
43 | 42 | */ |
44 | 43 | public function __construct($meta_name = NULL) |
45 | 44 | { |
@@ -190,7 +189,6 @@ discard block |
||
190 | 189 | * Validates the current model's data |
191 | 190 | * |
192 | 191 | * @throws Jam_Exception_Validation |
193 | - * @param Validation|null $extra_validation |
|
194 | 192 | * @return bool |
195 | 193 | */ |
196 | 194 | public function check($force = FALSE) |
@@ -436,6 +434,9 @@ discard block |
||
436 | 434 | return $attribute; |
437 | 435 | } |
438 | 436 | |
437 | + /** |
|
438 | + * @param string $association_name |
|
439 | + */ |
|
439 | 440 | public function build($association_name, array $attributes = array()) |
440 | 441 | { |
441 | 442 | $association = $this->meta()->association($association_name); |
@@ -54,7 +54,6 @@ discard block |
||
54 | 54 | * A key can be passed to automatically load a model by its |
55 | 55 | * unique key. |
56 | 56 | * |
57 | - * @param mixed|null $key |
|
58 | 57 | */ |
59 | 58 | public function __construct($meta_name = NULL) |
60 | 59 | { |
@@ -204,7 +203,6 @@ discard block |
||
204 | 203 | * This method—combined with get(), which first searches for changed |
205 | 204 | * values—is useful for comparing changes that occurred on a model. |
206 | 205 | * |
207 | - * @param string $field The field's or alias name |
|
208 | 206 | * @return mixed |
209 | 207 | */ |
210 | 208 | public function original($field_name = NULL) |
@@ -321,7 +319,6 @@ discard block |
||
321 | 319 | * Validates the current model's data |
322 | 320 | * |
323 | 321 | * @throws Jam_Exception_Validation |
324 | - * @param Validation|null $extra_validation |
|
325 | 322 | * @return bool |
326 | 323 | */ |
327 | 324 | public function check($force = FALSE) |
@@ -437,7 +434,6 @@ discard block |
||
437 | 434 | * If $field is NULL, the method returns whether or not any |
438 | 435 | * data whatsoever was changed on the model. |
439 | 436 | * |
440 | - * @param string $field |
|
441 | 437 | * @return boolean |
442 | 438 | */ |
443 | 439 | public function changed($name = NULL) |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | /** |
381 | 381 | * Make an object of class Jam_Query_Builder_Insert |
382 | - * @param string|Jam_Model $model |
|
382 | + * @param Kohana_Jam_Model $model |
|
383 | 383 | * @return Jam_Query_Builder_Insert |
384 | 384 | */ |
385 | 385 | public static function insert($model, array $columns = array()) |
@@ -416,6 +416,10 @@ discard block |
||
416 | 416 | return new $class($model); |
417 | 417 | } |
418 | 418 | |
419 | + /** |
|
420 | + * @param string $method |
|
421 | + * @param string $model |
|
422 | + */ |
|
419 | 423 | protected static function find_or($method, $model, array $values) |
420 | 424 | { |
421 | 425 | $collection = Jam::all($model); |
@@ -517,6 +521,9 @@ discard block |
||
517 | 521 | return Jam_Validator_Attributes::factory($permit)->data($data)->clean(); |
518 | 522 | } |
519 | 523 | |
524 | + /** |
|
525 | + * @param string $class |
|
526 | + */ |
|
520 | 527 | public static function form($model, $class = NULL) |
521 | 528 | { |
522 | 529 | if ($class === NULL) |
@@ -45,7 +45,6 @@ |
||
45 | 45 | /** |
46 | 46 | * Automatically sets foreign to sensible defaults. |
47 | 47 | * |
48 | - * @param string $model |
|
49 | 48 | * @param string $name |
50 | 49 | * @return void |
51 | 50 | */ |