Permalink
Browse files

Fixed some API doc in core and utility folders.

  • Loading branch information...
1 parent 02f290a commit 9e75de2f28e19ce1153f0cacbc7a8fcc6e4c098b @jrbasso jrbasso committed Jul 29, 2011
View
2 lib/Cake/Console/Shell.php
@@ -430,7 +430,7 @@ public function __get($name) {
* @param string $prompt Prompt text.
* @param mixed $options Array or string of options.
* @param string $default Default input value.
- * @return Either the default value, or the user-provided input.
+ * @return mixed Either the default value, or the user-provided input.
*/
public function in($prompt, $options = null, $default = null) {
if (!$this->interactive) {
View
23 lib/Cake/Core/CakePlugin.php
@@ -1,5 +1,27 @@
<?php
+/**
+ * CakePlugin class
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @package Cake.Core
+ * @since CakePHP(tm) v 2.0.0
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+/**
+ * CakePlugin class
+ *
+ * @package Cake.Core
+ */
class CakePlugin {
/**
@@ -173,6 +195,7 @@ public static function routes($plugin = null) {
* Retruns true if the plugin $plugin is already loaded
* If plugin is null, it will return a list of all loaded plugins
*
+ * @param string $plugin
* @return mixed boolean true if $plugin is already loaded.
* If $plugin is null, returns a list of plugins that have been loaded
*/
View
2 lib/Cake/Core/Configure.php
@@ -59,6 +59,7 @@ class Configure {
* - Include app/Config/bootstrap.php.
* - Setup error/exception handlers.
*
+ * @param boolean $boot
* @return void
*/
public static function bootstrap($boot = true) {
@@ -246,6 +247,7 @@ public static function config($name, ConfigReaderInterface $reader) {
/**
* Gets the names of the configured reader objects.
*
+ * @param string $name
* @return array Array of the configured reader objects.
*/
public static function configured($name = null) {
View
1 lib/Cake/Utility/ClassRegistry.php
@@ -298,6 +298,7 @@ private function &__duplicate($alias, $class) {
*
* @param string $key Key to include in map
* @param string $name Key that is being mapped
+ * @return void
*/
public static function map($key, $name) {
$_this = ClassRegistry::getInstance();
View
16 lib/Cake/Utility/Debugger.php
@@ -166,9 +166,8 @@ public function __construct() {
/**
* Returns a reference to the Debugger singleton object instance.
*
+ * @param string $class
* @return object
- * @access public
- * @static
*/
public static function &getInstance($class = null) {
static $instance = array();
@@ -193,10 +192,9 @@ public static function &getInstance($class = null) {
/**
* Formats and outputs the contents of the supplied variable.
*
- * @param $var mixed the variable to dump
+ * @param mixed $var the variable to dump
* @return void
* @see Debugger::exportVar()
- * @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
*/
public static function dump($var) {
@@ -207,10 +205,9 @@ public static function dump($var) {
* Creates an entry in the log file. The log entry will contain a stack trace from where it was called.
* as well as export the variable using exportVar. By default the log is written to the debug log.
*
- * @param $var mixed Variable or content to log
- * @param $level int type of log to use. Defaults to LOG_DEBUG
+ * @param mixed $var Variable or content to log
+ * @param integer $level type of log to use. Defaults to LOG_DEBUG
* @return void
- * @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
*/
public static function log($var, $level = LOG_DEBUG) {
@@ -442,8 +439,8 @@ public static function excerpt($file, $line, $context = 2) {
* Converts a variable to a string for debug output.
*
* @param string $var Variable to convert
+ * @param integer $recursion
* @return string Variable as a formatted string
- * @static
* @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class
*/
public static function exportVar($var, $recursion = 0) {
@@ -537,6 +534,7 @@ protected static function _object($var) {
* @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for
* straight HTML output, or 'txt' for unformatted text.
* @param array $strings Template strings to be used for the output format.
+ * @return string
*/
public function output($format = null, $strings = array()) {
$_this = Debugger::getInstance();
@@ -650,7 +648,7 @@ public function outputError($data) {
/**
* Verifies that the application's salt and cipher seed value has been changed from the default value.
*
- * @static
+ * @return void
*/
public static function checkSecurityKeys() {
if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
View
1 lib/Cake/Utility/File.php
@@ -206,6 +206,7 @@ public function offset($offset = false, $seek = SEEK_SET) {
* all other platforms will use "\n"
*
* @param string $data Data to prepare for writing.
+ * @param boolean $forceWindows
* @return string The with converted line endings.
*/
public static function prepare($data, $forceWindows = false) {
View
5 lib/Cake/Utility/Folder.php
@@ -181,7 +181,7 @@ public function read($sort = true, $exceptions = false, $fullPath = false) {
/**
* Returns an array of all matching files in current directory.
*
- * @param string $pattern Preg_match pattern (Defaults to: .*)
+ * @param string $regexpPattern Preg_match pattern (Defaults to: .*)
* @param boolean $sort Whether results should be sorted.
* @return array Files that match given pattern
*/
@@ -426,7 +426,7 @@ public function tree($path, $exceptions = true, $type = null) {
*
* @param string $path The Path to read.
* @param mixed $exceptions Array of files to exclude from the read that will be performed.
- * @access private
+ * @return void
*/
public function __tree($path, $exceptions) {
$this->path = $path;
@@ -479,7 +479,6 @@ public function create($pathname, $mode = false) {
/**
* Returns the size in bytes of this Folder and its contents.
*
- * @param string $directory Path to directory
* @return int size in bytes of current folder
*/
public function dirsize() {
View
12 lib/Cake/Utility/Inflector.php
@@ -438,9 +438,8 @@ public static function singularize($word) {
/**
* Returns the given lower_case_and_underscored_word as a CamelCased word.
*
- * @param string $lower_case_and_underscored_word Word to camelize
+ * @param string $lowerCaseAndUnderscoredWord Word to camelize
* @return string Camelized word. LikeThis.
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function camelize($lowerCaseAndUnderscoredWord) {
@@ -456,7 +455,6 @@ public static function camelize($lowerCaseAndUnderscoredWord) {
*
* @param string $camelCasedWord Camel-cased word to be "underscorized"
* @return string Underscore-syntaxed version of the $camelCasedWord
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function underscore($camelCasedWord) {
@@ -471,9 +469,8 @@ public static function underscore($camelCasedWord) {
* Returns the given underscored_word_group as a Human Readable Word Group.
* (Underscores are replaced by spaces and capitalized following words.)
*
- * @param string $lower_case_and_underscored_word String to be made more readable
+ * @param string $lowerCaseAndUnderscoredWord String to be made more readable
* @return string Human-readable string
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function humanize($lowerCaseAndUnderscoredWord) {
@@ -489,7 +486,6 @@ public static function humanize($lowerCaseAndUnderscoredWord) {
*
* @param string $className Name of class to get database table name for
* @return string Name of the database table for given class
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function tableize($className) {
@@ -505,7 +501,6 @@ public static function tableize($className) {
*
* @param string $tableName Name of database table to get class name for
* @return string Class name
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function classify($tableName) {
@@ -521,7 +516,6 @@ public static function classify($tableName) {
*
* @param string $string
* @return string in variable form
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function variable($string) {
@@ -540,9 +534,7 @@ public static function variable($string) {
*
* @param string $string the string you want to slug
* @param string $replacement will replace keys in map
- * @param array $map extra elements to map to the replacement
* @return string
- * @access public
* @link http://book.cakephp.org/view/1479/Class-methods
*/
public static function slug($string, $replacement = '_') {
View
6 lib/Cake/Utility/Set.php
@@ -59,8 +59,7 @@ public static function merge($arr1, $arr2 = null) {
/**
* Filters empty elements out of a route array, excluding '0'.
*
- * @param mixed $var Either an array to filter, or value when in callback
- * @param boolean $isArray Force to tell $var is an array when $var is empty
+ * @param array $var Either an array to filter, or value when in callback
* @return mixed Either filtered array, or true/false when in callback
*/
public static function filter(array $var) {
@@ -159,7 +158,7 @@ private function __array($array) {
* returned object (recursively). If $key is numeric will maintain array
* structure
*
- * @param mixed $value Value to map
+ * @param array $array Array to map
* @param string $class Class name
* @param boolean $primary whether to assign first array key as the _name_
* @return mixed Mapped object
@@ -506,6 +505,7 @@ public static function extract($path, $data = null, $options = array()) {
* @param mixed $conditions An array of condition strings or an XPath expression
* @param array $data An array of data to execute the match on
* @param integer $i Optional: The 'nth'-number of the item being matched.
+ * @param integer $length
* @return boolean
*/
public static function matches($conditions, $data = array(), $i = null, $length = null) {
View
7 lib/Cake/Utility/Validation.php
@@ -462,7 +462,7 @@ public static function extension($check, $extensions = array('gif', 'jpeg', 'png
* Validation of an IP address.
*
* @param string $check The string to test.
- * @param string $ipVersion The IP Protocol version to validate against
+ * @param string $type The IP Protocol version to validate against
* @return boolean Success
*/
public static function ip($check, $type = 'both') {
@@ -697,7 +697,6 @@ public static function ssn($check, $regex = null, $country = null) {
*
* @param string $check Value to check
* @param boolean $strict Require URL to be prefixed by a valid scheme (one of http(s)/ftp(s)/file/news/gopher)
- * @param string $ipVersion The IP Protocol version to validate against
* @return boolean Success
*/
public static function url($check, $strict = false) {
@@ -814,8 +813,10 @@ protected static function _defaults($params) {
/**
* Luhn algorithm
*
- * @see http://en.wikipedia.org/wiki/Luhn_algorithm
+ * @param string|array $check
+ * @param boolean $deep
* @return boolean Success
+ * @see http://en.wikipedia.org/wiki/Luhn_algorithm
*/
public static function luhn($check, $deep = false) {
if (is_array($check)) {

0 comments on commit 9e75de2

Please sign in to comment.