@@ -16,6 +16,7 @@ |
||
| 16 | 16 | * Sets driver fields and marks reqired fields as TRUE. |
| 17 | 17 | * |
| 18 | 18 | * @param array array of key => value pairs to set |
| 19 | + * @return void |
|
| 19 | 20 | */ |
| 20 | 21 | public function set_fields($fields); |
| 21 | 22 | |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | /** |
| 92 | 92 | * Process a given transaction. |
| 93 | 93 | * |
| 94 | - * @return boolean |
|
| 94 | + * @return boolean|null |
|
| 95 | 95 | */ |
| 96 | 96 | public function process() |
| 97 | 97 | { |
@@ -378,7 +378,8 @@ |
||
| 378 | 378 | * |
| 379 | 379 | * @param string paypal API method to run |
| 380 | 380 | * @param string any additional name-value-pair query string data to send to paypal |
| 381 | - * @return mixed |
|
| 381 | + * @param string $nvp_str |
|
| 382 | + * @return string |
|
| 382 | 383 | */ |
| 383 | 384 | protected function make_paypal_api_request($nvp_str) |
| 384 | 385 | { |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | * Bulk setting of payment processing fields. |
| 102 | 102 | * |
| 103 | 103 | * @param array array of values to set |
| 104 | - * @return object this object |
|
| 104 | + * @return Payment_Core this object |
|
| 105 | 105 | */ |
| 106 | 106 | public function set_fields($fields) |
| 107 | 107 | { |
@@ -56,6 +56,9 @@ |
||
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | + /** |
|
| 60 | + * @param string $directory |
|
| 61 | + */ |
|
| 59 | 62 | public function checkDirectory($directory) |
| 60 | 63 | { |
| 61 | 64 | if ((! file_exists($directory) and ! @mkdir($directory, 0755)) or ! is_writable($directory) or !is_executable($directory)) { |
@@ -229,6 +229,10 @@ discard block |
||
| 229 | 229 | |
| 230 | 230 | abstract class Unit_Test_Case |
| 231 | 231 | { |
| 232 | + /** |
|
| 233 | + * @param boolean $value |
|
| 234 | + * @param integer $debug |
|
| 235 | + */ |
|
| 232 | 236 | public function assert_true($value, $debug = null) |
| 233 | 237 | { |
| 234 | 238 | if ($value != true) { |
@@ -247,6 +251,9 @@ discard block |
||
| 247 | 251 | return $this; |
| 248 | 252 | } |
| 249 | 253 | |
| 254 | + /** |
|
| 255 | + * @param boolean $value |
|
| 256 | + */ |
|
| 250 | 257 | public function assert_false($value, $debug = null) |
| 251 | 258 | { |
| 252 | 259 | if ($value != false) { |
@@ -265,6 +272,10 @@ discard block |
||
| 265 | 272 | return $this; |
| 266 | 273 | } |
| 267 | 274 | |
| 275 | + /** |
|
| 276 | + * @param string $expected |
|
| 277 | + * @param integer $actual |
|
| 278 | + */ |
|
| 268 | 279 | public function assert_equal($expected, $actual, $debug = null) |
| 269 | 280 | { |
| 270 | 281 | if ($expected != $actual) { |
@@ -274,6 +285,10 @@ discard block |
||
| 274 | 285 | return $this; |
| 275 | 286 | } |
| 276 | 287 | |
| 288 | + /** |
|
| 289 | + * @param string $expected |
|
| 290 | + * @param integer $actual |
|
| 291 | + */ |
|
| 277 | 292 | public function assert_not_equal($expected, $actual, $debug = null) |
| 278 | 293 | { |
| 279 | 294 | if ($expected == $actual) { |
@@ -283,6 +298,10 @@ discard block |
||
| 283 | 298 | return $this; |
| 284 | 299 | } |
| 285 | 300 | |
| 301 | + /** |
|
| 302 | + * @param string $expected |
|
| 303 | + * @param string $actual |
|
| 304 | + */ |
|
| 286 | 305 | public function assert_same($expected, $actual, $debug = null) |
| 287 | 306 | { |
| 288 | 307 | if ($expected !== $actual) { |
@@ -292,6 +311,10 @@ discard block |
||
| 292 | 311 | return $this; |
| 293 | 312 | } |
| 294 | 313 | |
| 314 | + /** |
|
| 315 | + * @param string $expected |
|
| 316 | + * @param integer $actual |
|
| 317 | + */ |
|
| 295 | 318 | public function assert_not_same($expected, $actual, $debug = null) |
| 296 | 319 | { |
| 297 | 320 | if ($expected === $actual) { |
@@ -301,6 +324,9 @@ discard block |
||
| 301 | 324 | return $this; |
| 302 | 325 | } |
| 303 | 326 | |
| 327 | + /** |
|
| 328 | + * @param boolean $value |
|
| 329 | + */ |
|
| 304 | 330 | public function assert_boolean($value, $debug = null) |
| 305 | 331 | { |
| 306 | 332 | if (! is_bool($value)) { |
@@ -310,6 +336,9 @@ discard block |
||
| 310 | 336 | return $this; |
| 311 | 337 | } |
| 312 | 338 | |
| 339 | + /** |
|
| 340 | + * @param string $value |
|
| 341 | + */ |
|
| 313 | 342 | public function assert_not_boolean($value, $debug = null) |
| 314 | 343 | { |
| 315 | 344 | if (is_bool($value)) { |
@@ -319,6 +348,9 @@ discard block |
||
| 319 | 348 | return $this; |
| 320 | 349 | } |
| 321 | 350 | |
| 351 | + /** |
|
| 352 | + * @param integer $value |
|
| 353 | + */ |
|
| 322 | 354 | public function assert_integer($value, $debug = null) |
| 323 | 355 | { |
| 324 | 356 | if (! is_int($value)) { |
@@ -328,6 +360,9 @@ discard block |
||
| 328 | 360 | return $this; |
| 329 | 361 | } |
| 330 | 362 | |
| 363 | + /** |
|
| 364 | + * @param string $value |
|
| 365 | + */ |
|
| 331 | 366 | public function assert_not_integer($value, $debug = null) |
| 332 | 367 | { |
| 333 | 368 | if (is_int($value)) { |
@@ -337,6 +372,9 @@ discard block |
||
| 337 | 372 | return $this; |
| 338 | 373 | } |
| 339 | 374 | |
| 375 | + /** |
|
| 376 | + * @param double $value |
|
| 377 | + */ |
|
| 340 | 378 | public function assert_float($value, $debug = null) |
| 341 | 379 | { |
| 342 | 380 | if (! is_float($value)) { |
@@ -346,6 +384,9 @@ discard block |
||
| 346 | 384 | return $this; |
| 347 | 385 | } |
| 348 | 386 | |
| 387 | + /** |
|
| 388 | + * @param integer $value |
|
| 389 | + */ |
|
| 349 | 390 | public function assert_not_float($value, $debug = null) |
| 350 | 391 | { |
| 351 | 392 | if (is_float($value)) { |
@@ -355,6 +396,9 @@ discard block |
||
| 355 | 396 | return $this; |
| 356 | 397 | } |
| 357 | 398 | |
| 399 | + /** |
|
| 400 | + * @param integer[] $value |
|
| 401 | + */ |
|
| 358 | 402 | public function assert_array($value, $debug = null) |
| 359 | 403 | { |
| 360 | 404 | if (! is_array($value)) { |
@@ -364,6 +408,9 @@ discard block |
||
| 364 | 408 | return $this; |
| 365 | 409 | } |
| 366 | 410 | |
| 411 | + /** |
|
| 412 | + * @param string $key |
|
| 413 | + */ |
|
| 367 | 414 | public function assert_array_key($key, $array, $debug = null) |
| 368 | 415 | { |
| 369 | 416 | if (! array_key_exists($key, $array)) { |
@@ -373,6 +420,10 @@ discard block |
||
| 373 | 420 | return $this; |
| 374 | 421 | } |
| 375 | 422 | |
| 423 | + /** |
|
| 424 | + * @param string $value |
|
| 425 | + * @param string[] $array |
|
| 426 | + */ |
|
| 376 | 427 | public function assert_in_array($value, $array, $debug = null) |
| 377 | 428 | { |
| 378 | 429 | if (! in_array($value, $array)) { |
@@ -382,6 +433,9 @@ discard block |
||
| 382 | 433 | return $this; |
| 383 | 434 | } |
| 384 | 435 | |
| 436 | + /** |
|
| 437 | + * @param string $value |
|
| 438 | + */ |
|
| 385 | 439 | public function assert_not_array($value, $debug = null) |
| 386 | 440 | { |
| 387 | 441 | if (is_array($value)) { |
@@ -391,6 +445,9 @@ discard block |
||
| 391 | 445 | return $this; |
| 392 | 446 | } |
| 393 | 447 | |
| 448 | + /** |
|
| 449 | + * @param stdClass $value |
|
| 450 | + */ |
|
| 394 | 451 | public function assert_object($value, $debug = null) |
| 395 | 452 | { |
| 396 | 453 | if (! is_object($value)) { |
@@ -400,6 +457,9 @@ discard block |
||
| 400 | 457 | return $this; |
| 401 | 458 | } |
| 402 | 459 | |
| 460 | + /** |
|
| 461 | + * @param string $value |
|
| 462 | + */ |
|
| 403 | 463 | public function assert_not_object($value, $debug = null) |
| 404 | 464 | { |
| 405 | 465 | if (is_object($value)) { |
@@ -418,6 +478,9 @@ discard block |
||
| 418 | 478 | return $this; |
| 419 | 479 | } |
| 420 | 480 | |
| 481 | + /** |
|
| 482 | + * @param integer $value |
|
| 483 | + */ |
|
| 421 | 484 | public function assert_not_null($value, $debug = null) |
| 422 | 485 | { |
| 423 | 486 | if ($value === null) { |
@@ -427,6 +490,9 @@ discard block |
||
| 427 | 490 | return $this; |
| 428 | 491 | } |
| 429 | 492 | |
| 493 | + /** |
|
| 494 | + * @param string $value |
|
| 495 | + */ |
|
| 430 | 496 | public function assert_empty($value, $debug = null) |
| 431 | 497 | { |
| 432 | 498 | if (! empty($value)) { |
@@ -436,6 +502,9 @@ discard block |
||
| 436 | 502 | return $this; |
| 437 | 503 | } |
| 438 | 504 | |
| 505 | + /** |
|
| 506 | + * @param string $value |
|
| 507 | + */ |
|
| 439 | 508 | public function assert_not_empty($value, $debug = null) |
| 440 | 509 | { |
| 441 | 510 | if (empty($value)) { |
@@ -445,6 +514,10 @@ discard block |
||
| 445 | 514 | return $this; |
| 446 | 515 | } |
| 447 | 516 | |
| 517 | + /** |
|
| 518 | + * @param string $value |
|
| 519 | + * @param string $regex |
|
| 520 | + */ |
|
| 448 | 521 | public function assert_pattern($value, $regex, $debug = null) |
| 449 | 522 | { |
| 450 | 523 | if (! is_string($value) or ! is_string($regex) or ! preg_match($regex, $value)) { |
@@ -454,6 +527,10 @@ discard block |
||
| 454 | 527 | return $this; |
| 455 | 528 | } |
| 456 | 529 | |
| 530 | + /** |
|
| 531 | + * @param string $value |
|
| 532 | + * @param string $regex |
|
| 533 | + */ |
|
| 457 | 534 | public function assert_not_pattern($value, $regex, $debug = null) |
| 458 | 535 | { |
| 459 | 536 | if (! is_string($value) or ! is_string($regex) or preg_match($regex, $value)) { |
@@ -474,6 +551,7 @@ discard block |
||
| 474 | 551 | * |
| 475 | 552 | * @param string message |
| 476 | 553 | * @param mixed debug info |
| 554 | + * @param string $message |
|
| 477 | 555 | * @return void |
| 478 | 556 | */ |
| 479 | 557 | public function __construct($message, $debug = null) |
@@ -19,6 +19,7 @@ discard block |
||
| 19 | 19 | * Set a benchmark start point. |
| 20 | 20 | * |
| 21 | 21 | * @param string benchmark name |
| 22 | + * @param string $name |
|
| 22 | 23 | * @return void |
| 23 | 24 | */ |
| 24 | 25 | public static function start($name) |
@@ -56,6 +57,7 @@ discard block |
||
| 56 | 57 | * |
| 57 | 58 | * @param string benchmark name, TRUE for all |
| 58 | 59 | * @param integer number of decimal places to count to |
| 60 | + * @param string|boolean $name |
|
| 59 | 61 | * @return array |
| 60 | 62 | */ |
| 61 | 63 | public static function get($name, $decimals = 4) |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @param string event name |
| 92 | 92 | * @param integer key to insert new event at |
| 93 | 93 | * @param array event callback |
| 94 | - * @return void |
|
| 94 | + * @return boolean |
|
| 95 | 95 | */ |
| 96 | 96 | private static function insert_event($name, $key, $callback) |
| 97 | 97 | { |
@@ -156,6 +156,7 @@ discard block |
||
| 156 | 156 | * |
| 157 | 157 | * @param string event name |
| 158 | 158 | * @param array specific callback to remove, FALSE for all callbacks |
| 159 | + * @param string $name |
|
| 159 | 160 | * @return void |
| 160 | 161 | */ |
| 161 | 162 | public static function clear($name, $callback = false) |
@@ -205,6 +206,7 @@ discard block |
||
| 205 | 206 | * Check if a given event has been run. |
| 206 | 207 | * |
| 207 | 208 | * @param string event name |
| 209 | + * @param string $name |
|
| 208 | 210 | * @return boolean |
| 209 | 211 | */ |
| 210 | 212 | public static function has_run($name) |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * @param string item name |
| 318 | 318 | * @param boolean force a forward slash (/) at the end of the item |
| 319 | 319 | * @param boolean is the item required? |
| 320 | - * @return mixed |
|
| 320 | + * @return string |
|
| 321 | 321 | */ |
| 322 | 322 | public static function config($key, $slash = false, $required = true) |
| 323 | 323 | { |
@@ -542,6 +542,8 @@ discard block |
||
| 542 | 542 | * |
| 543 | 543 | * @param string unique name of cache |
| 544 | 544 | * @param integer expiration in seconds |
| 545 | + * @param string $name |
|
| 546 | + * @param string $lifetime |
|
| 545 | 547 | * @return mixed |
| 546 | 548 | */ |
| 547 | 549 | public static function cache($name, $lifetime) |
@@ -898,6 +900,7 @@ discard block |
||
| 898 | 900 | * |
| 899 | 901 | * @throws Kohana_Exception |
| 900 | 902 | * @param string name of class |
| 903 | + * @param string $class |
|
| 901 | 904 | * @return bool |
| 902 | 905 | */ |
| 903 | 906 | public static function auto_load($class) |
@@ -977,9 +980,9 @@ discard block |
||
| 977 | 980 | * @param string filename to look for (without extension) |
| 978 | 981 | * @param boolean file required |
| 979 | 982 | * @param string file extension |
| 980 | - * @return array if the type is config, i18n or l10n |
|
| 983 | + * @return string if the type is config, i18n or l10n |
|
| 981 | 984 | * @return string if the file is found |
| 982 | - * @return FALSE if the file is not found |
|
| 985 | + * @return string if the file is not found |
|
| 983 | 986 | */ |
| 984 | 987 | public static function find_file($directory, $filename, $required = false, $ext = false) |
| 985 | 988 | { |
@@ -1490,6 +1493,7 @@ discard block |
||
| 1490 | 1493 | * |
| 1491 | 1494 | * @param string i18n language key for the message |
| 1492 | 1495 | * @param array addition line parameters |
| 1496 | + * @param string $error |
|
| 1493 | 1497 | */ |
| 1494 | 1498 | public function __construct($error) |
| 1495 | 1499 | { |
@@ -1551,6 +1555,8 @@ discard block |
||
| 1551 | 1555 | * @param string exception title string |
| 1552 | 1556 | * @param string exception message string |
| 1553 | 1557 | * @param string custom error template |
| 1558 | + * @param string $title |
|
| 1559 | + * @param null|string $message |
|
| 1554 | 1560 | */ |
| 1555 | 1561 | public function __construct($title, $message, $template = false) |
| 1556 | 1562 | { |