ソースを参照

cleanup doc blocks

euromark 12 年 前
コミット
2a91254008

+ 1 - 1
Console/Command/CopyShell.php

@@ -453,7 +453,7 @@ class CopyShell extends AppShell {
 	/**
 	 * Displays help contents
 	 *
-	 * @access public
+	 * @return void
 	 * 2009-05-04 ms
 	 */
 	public function help() {

+ 0 - 11
Console/Command/IndexShell.php

@@ -29,7 +29,6 @@ class IndexShell extends AppShell {
 	 * Runtime settings
 	 *
 	 * @var array
-	 * @access public
 	 */
 	public $settings = array(
 		'ds' => 'default',
@@ -40,7 +39,6 @@ class IndexShell extends AppShell {
 	 * The Stack of sql queries to run as an array
 	 *
 	 * @var array
-	 * @access protected
 	 */
 	protected $_script = array();
 
@@ -49,7 +47,6 @@ class IndexShell extends AppShell {
 	 * startup method
 	 *
 	 * @return void
-	 * @access public
 	 */
 	public function startup() {
 		parent::startup();
@@ -63,7 +60,6 @@ class IndexShell extends AppShell {
 	 * If the flags -h, -help or --help are present bail here and show help
 	 *
 	 * @return void
-	 * @access public
 	 */
 	public function initialize() {
 		parent::initialize();
@@ -86,7 +82,6 @@ class IndexShell extends AppShell {
 	 * 	cake Tools.Index default,permissions,other
 	 *
 	 * @return void
-	 * @access public
 	 */
 	public function run() {
 		$this->_buildScript(explode(',', $this->settings['ds']));
@@ -100,7 +95,6 @@ class IndexShell extends AppShell {
 	 *
 	 * @param array $sources array()
 	 * @return void
-	 * @access protected
 	 */
 	protected function _buildScript($sources = array()) {
 		foreach ($sources as $ds) {
@@ -116,7 +110,6 @@ class IndexShell extends AppShell {
 	 *
 	 * @param mixed $ds
 	 * @return void
-	 * @access protected
 	 */
 	protected function _buildScriptForDataSource($ds = 'default') {
 		$tables = $this->_tables($ds);
@@ -212,7 +205,6 @@ class IndexShell extends AppShell {
 	 *
 	 * @param mixed $statement
 	 * @return void
-	 * @access public
 	 */
 	protected function _query($statement) {
 		if (!$statement) {
@@ -251,7 +243,6 @@ class IndexShell extends AppShell {
 	 * Loop over the script running each statement in turn
 	 *
 	 * @return void
-	 * @access protected
 	 */
 	protected function _runScript() {
 		foreach ($this->_script as $ds => $steps) {
@@ -265,8 +256,6 @@ class IndexShell extends AppShell {
 		}
 	}
 
-
-
 	public function getOptionParser() {
 		$subcommandParser = array(
 			'options' => array(

+ 0 - 11
Controller/Component/AutoLoginComponent.php

@@ -20,7 +20,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Current version.
 	 *
-	 * @access public
 	 * @var string
 	 */
 	public $version = '3.5';
@@ -28,7 +27,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Components.
 	 *
-	 * @access public
 	 * @var array
 	 */
 	public $components = array('Auth', 'Cookie');
@@ -36,7 +34,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Settings.
 	 *
-	 * @access public
 	 * @var array
 	 */
 	public $settings = array();
@@ -44,7 +41,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Default settings.
 	 *
-	 * @access protected
 	 * @var array
 	 */
 	protected $_defaults = array(
@@ -66,7 +62,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Determines whether to trigger startup() logic.
 	 *
-	 * @access protected
 	 * @var boolean
 	 */
 	protected $_isValidRequest = false;
@@ -91,7 +86,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Detect debug info.
 	 *
-	 * @access public
 	 * @param Controller $controller
 	 * @return void
 	 */
@@ -130,7 +124,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Automatically login existent Auth session; called after controllers beforeFilter() so that Auth is initialized.
 	 *
-	 * @access public
 	 * @param Controller $controller
 	 * @return void
 	 */
@@ -165,8 +158,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Automatically process logic when hitting login/logout actions.
 	 *
-	 * @access public
-	 * @uses Inflector
 	 * @param Controller $controller
 	 * @return void
 	 */
@@ -226,7 +217,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Delete the cookie.
 	 *
-	 * @access public
 	 * @return void
 	 */
 	public function delete() {
@@ -236,7 +226,6 @@ class AutoLoginComponent extends Component {
 	/**
 	 * Debug the current auth and cookies.
 	 *
-	 * @access public
 	 * @param string $key
 	 * @param array $cookie
 	 * @param array $user

+ 0 - 1
Controller/Component/CalendarComponent.php

@@ -32,7 +32,6 @@ class CalendarComponent extends Component {
 	 * Startup controller
 	 *
 	 * @param object $Controller Controller instance
-	 * @access public
 	 * @return void
 	 */
 	public function startup(Controller $Controller) {

+ 2 - 5
Controller/Component/CommonComponent.php

@@ -76,7 +76,6 @@ class CommonComponent extends Component {
 	 * Created: 2010-10-10
 	 * @param object $Controller Controller with components to beforeRender
 	 * @return void
-	 * @access public
 	 * @author deltachaos
 	 */
 	public function beforeRender(Controller $Controller) {
@@ -176,7 +175,6 @@ class CommonComponent extends Component {
 	 * @param STRING messagestring
 	 * @param STRING class ['error', 'warning', 'success', 'info']
 	 * @return void
-	 * @access static
 	 * 2010-05-01 ms
 	 */
 	public static function transientFlashMessage($messagestring, $class = null) {
@@ -1240,8 +1238,7 @@ class CommonComponent extends Component {
 	 * Returns searchArray (options['wildcard'] TRUE/FALSE)
 	 * TODO: move to SearchLib etc
 	 *
-	 * @return ARRAY cleaned array('keyword'=>'searchphrase') or array('keyword LIKE'=>'searchphrase')
-	 * @access public
+	 * @return array Cleaned array('keyword'=>'searchphrase') or array('keyword LIKE'=>'searchphrase')
 	 */
 	public function getSearchItem($keyword = null, $searchphrase = null, $options = array()) {
 
@@ -1264,7 +1261,6 @@ class CommonComponent extends Component {
 	 * @param string $type: user, ...
 	 * @param int $length (if no type is submitted)
 	 * @return pwd on success, empty string otherwise
-	 * @static
 	 * @deprecated - use RandomLib
 	 * 2009-12-26 ms
 	 */
@@ -1335,6 +1331,7 @@ class CommonComponent extends Component {
 
 	/**
 	 * Get the Corresponding Message to an HTTP Error Code
+	 *
 	 * @param int $code: 100...505
 	 * @return array $codes if code is NULL, otherwise string $code (empty string on failure)
 	 * 2009-07-21 ms

+ 3 - 1
Lib/GeocodeLib.php

@@ -672,7 +672,8 @@ class GeocodeLib {
 	 * fetches url with curl if available
 	 * fallbacks: cake and php
 	 * note: expects url with json encoded content
-	 * @access private
+	 *
+	 * @return mixed
 	 **/
 	protected function _fetch($url) {
 		$this->HttpSocket = new HttpSocketLib($this->use);
@@ -700,6 +701,7 @@ class GeocodeLib {
 						'SIN( PI()/2 - RADIANS(90 - Retailer.lat)) * ' .
 						'SIN( PI()/2 - RADIANS(90 - '. $data['Location']['lat'] . '))) ' .
 		'AS distance'
+	 *
 	 * @param array pointX
 	 * @param array pointY
 	 * @param float $unit (M=miles, K=kilometers, N=nautical miles, I=inches, F=feet)

+ 0 - 1
Lib/GooglLib.php

@@ -9,7 +9,6 @@ App::uses('CakeLog', 'Log');
  * @url http://hunikal.com/
  * @copyright Creative Commons Attribution-ShareAlike 3.0 Unported License.
  * @version 0.1
- * @access public
  *
  * TODO: implement OAuth
  *

+ 3 - 1
Lib/HazardLib.php

@@ -17,8 +17,8 @@ class HazardLib {
 
 	/**
 	 * get dangerous sql strings to test with
+	 *
 	 * @return array
-	 * @static
 	 * 2010-07-31 ms
 	 */
 	public static function sqlStrings($veryDangerousToo = false) {
@@ -45,6 +45,7 @@ class HazardLib {
 
 	/**
 	 * get dangerous php strings to test with
+	 *
 	 * @return array
 	 * 2010-07-31 ms
 	 */
@@ -58,6 +59,7 @@ class HazardLib {
 
 	/**
 	 * get dangerous html strings to test with
+	 *
 	 * @return array
 	 * 2010-07-31 ms
 	 */

+ 6 - 8
Lib/MimeLib.php

@@ -759,7 +759,8 @@ class MimeLib extends CakeResponse {
 	}
 
 	/**
-	* @desc Retrieve the corresponding MIME type, if one exists
+	* Retrieve the corresponding MIME type, if one exists
+	*
 	* @param String $file File Name (relative location such as "image_test.jpg" or full "http://site.com/path/to/image_test.jpg")
 	* @return String $MIMEType - The type of the file passed in the argument
 	*/
@@ -795,15 +796,11 @@ class MimeLib extends CakeResponse {
 	}
 
 	/**
-	 * Write your Description here.
+	 * Get encoding.
 	 *
-	 * Created: 22.10.10 23:37
-	 * Updated: 22.10.10 23:37
-	 * @return void
 	 * @param string $file
 	 * @param string $default
-	 * @access public
-	 * @author deltacahos
+	 * @return void
 	 */
 	public function getEncoding($file = NULL, $default = 'utf-8') {
 		if (!function_exists("finfo_open")) {
@@ -819,7 +816,8 @@ class MimeLib extends CakeResponse {
 	}
 
 	/**
-	* @desc Gets the file extention from a string
+	* Gets the file extention from a string
+	*
 	* @param String $file The full file name
 	* @return String $ext The file extension
 	*/

+ 8 - 11
Lib/RandomLib.php

@@ -13,7 +13,6 @@ class RandomLib {
 	 * @param int $min
 	 * @param int $max
 	 * @return random int value
-	 * @access static
 	 */
 	public static function int($min = 0, $max = 999) {
 		return mt_rand($min, $max);
@@ -23,7 +22,6 @@ class RandomLib {
 	 * @param float $min
 	 * @param float $max
 	 * @return random float value
-	 * @access static
 	 */
 	public static function float($min = 0.0, $max = 999.0) {
 		$rand = rand (1, 358);
@@ -34,7 +32,8 @@ class RandomLib {
 	/**
 	 * randomly return one of the values provided
 	 * careful: only works with numerical keys (0 based!)
-	 * @access static
+	 *
+	 * @return mixed
 	 */
 	public static function arrayValue($array, $minPosition = null, $maxPosition = null, $integerKeys = false) {
 		if (empty($array)) {
@@ -98,8 +97,7 @@ class RandomLib {
 
 	/**
 	 * Returns a date of birth within the specified age range
-	 * @method dob(int $min, $int $max)
-	 * @public
+	 *
 	 * @param (int) $min minimum age in years
 	 * @param (int) $max maximum age in years
 	 * @return (string) $dob a db (ISO) format datetime string
@@ -126,13 +124,12 @@ class RandomLib {
 		return $dob;
 	}
 
-
 	/**
 	 * Generates a password
 	 *
 	 * @param int $length Password length
-	 * @link https://github.com/CakeDC/users/blob/master/models/user.php#L498
 	 * @return string
+	 * @link https://github.com/CakeDC/users/blob/master/models/user.php#L498
 	 */
 	public static function pronounceablePwd($length = 10) {
 		srand((double)microtime() * 1000000);
@@ -155,10 +152,10 @@ class RandomLib {
 
 	/**
 	 * returns auto-generated password
+	 *
 	 * @param string $type: user, ...
 	 * @param int $length (if no type is submitted)
 	 * @return pwd on success, empty string otherwise
-	 * @static
 	 * 2009-12-26 ms
 	 */
 	public static function randomPwd($type = null, $length = null) {
@@ -173,10 +170,10 @@ class RandomLib {
 
 	/**
 	 * //TODO: move to password lib?
-	 * generate random passwords
+	 * Generate random passwords
+	 *
 	 * @param int $lenght (necessary!)
-	 * @return pwd
-	 * @static
+	 * @return string Password
 	 * 2009-12-26 ms
 	 */
 	public static function generatePassword($length, $chars = null) {

+ 16 - 2
Lib/Utility/ChmodLib.php

@@ -23,7 +23,8 @@ class ChmodLib {
 		/**
 	 * from Octal 0xxx back to STRING with leading zero added on leading zero = true
 	 * e.g. 0777 => 0777, '755' => 0755
-	 * @access static Chmod::convertFromOctal(mode, leadingZero)
+	 *
+	 * @return string
 	 * 2009-07-26 ms
 	 */
 	public static function convertFromOctal($mode, $leadingZero = false) {
@@ -36,7 +37,8 @@ class ChmodLib {
 
 	/**
 	 * from INT or STRING with or without leading 0 -> Octal 0xxx
-	 * @access static Chmod::converttoOctal(mode)
+	 *
+	 * @return int
 	 * 2009-07-26 ms
 	 */
 	public static function convertToOctal($mode) {
@@ -60,8 +62,10 @@ class ChmodLib {
 
 	/**
 	 * get mode as octal value or
+	 *
 	 * @param options
 	 * - string: string/int/symbolic
+	 * @return int Mode
 	 * 2010-06-21 ms
 	 */
 	public function getMode($options = array()) {
@@ -96,6 +100,8 @@ class ChmodLib {
 	 * get symbol for
 	 * read(4) = 'r', write(2) = 'w', execute(1) = 'x'
 	 * e.g: 4 for = r--
+	 *
+	 * @return string Symbol
 	 * 2010-06-21 ms
 	 */
 	protected function symbol($mode) {
@@ -118,6 +124,14 @@ class ChmodLib {
 		return $res;
 	}
 
+	/**
+	 * ChmodLib::setMode()
+	 *
+	 * @param int $r
+	 * @param int $w
+	 * @param int $e
+	 * @return int
+	 */
 	protected function setMode($r, $w, $e) {
 		$mode = 0;
 		if ($r) $mode+=4;

+ 0 - 1
Lib/Utility/FileLib.php

@@ -194,7 +194,6 @@ class FileLib extends File {
 	 * @param string $mode
 	 * @param boolean $force If true then the file will be re-opened even if its already opened, otherwise it won't
 	 * @return mixed string on success, false on failure
-	 * @access public
 	 * 2009-06-15 ms
 	 */
 	public function readWithTags($tags = null, $mode = 'rb', $force = false) {

+ 12 - 4
Lib/Utility/NumberLib.php

@@ -233,7 +233,8 @@ class NumberLib extends CakeNumber {
 	}
 
 	/**
-	 * @access public
+	 * Round value
+	 *
 	 * @param float $number
 	 * @param float $increment
 	 * @return float $result
@@ -249,7 +250,8 @@ class NumberLib extends CakeNumber {
 	}
 
 	/**
-	 * @access public
+	 * Round value up
+	 *
 	 * @param float $number
 	 * @param int $increment
 	 * @return float $result
@@ -260,7 +262,8 @@ class NumberLib extends CakeNumber {
 	}
 
 	/**
-	 * @access public
+	 * Round value down
+	 *
 	 * @param float $number
 	 * @param int $increment
 	 * @return float $result
@@ -271,7 +274,8 @@ class NumberLib extends CakeNumber {
 	}
 
 	/**
-	 * @access public
+	 * Get decimal places
+	 *
 	 * @param float $number
 	 * @return int $decimalPlaces
 	 * 2011-04-15 lb
@@ -317,7 +321,11 @@ class NumberLib extends CakeNumber {
 
 	/**
 	 * Can compare two float values
+	 *
 	 * @link http://php.net/manual/en/language.types.float.php
+	 * @param float $x
+	 * @param float $y
+	 * @param float $precision
 	 * @return boolean
 	 */
 	public static function isFloatEqual($x, $y, $precision = 0.0000001) {

+ 14 - 15
Lib/Utility/TextLib.php

@@ -167,8 +167,11 @@ class TextLib extends String {
 /* text object specific */
 
 	/**
+	 * Extract words
+	 *
 	 * @param options
 	 * - min_char, max_char, case_sensititive, ...
+	 * @return array
 	 * 2010-10-09 ms
 	 */
 	public function words($options = array()) {
@@ -244,9 +247,8 @@ class TextLib extends String {
 	 *
 	 * Converts High ascii text and MS Word special characters to character entities
 	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
+	 * @param string
+	 * @return string
 	 */
 	public function ascii_to_entities($str) {
 		$count = 1;
@@ -294,10 +296,9 @@ class TextLib extends String {
 	 *
 	 * Converts character entities back to ASCII
 	 *
-	 * @access	public
-	 * @param	string
-	 * @param	bool
-	 * @return	string
+	 * @param string
+	 * @param bool
+	 * @return string
 	 */
 	public function entities_to_ascii($str, $all = true) {
 		if (preg_match_all('/\&#(\d+)\;/', $str, $matches)) {
@@ -343,9 +344,8 @@ class TextLib extends String {
 	 *
 	 * http://www.some-site.com/index.php
 	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
+	 * @param string
+	 * @return string
 	 */
 	public function reduce_double_slashes($str) {
 		return preg_replace("#([^:])//+#", "\\1/", $str);
@@ -364,11 +364,10 @@ class TextLib extends String {
 	 *
 	 * Fred, Bill, Joe, Jimmy
 	 *
-	 * @access	public
-	 * @param	string
-	 * @param	string	the character you wish to reduce
-	 * @param	bool	TRUE/FALSE - whether to trim the character from the beginning/end
-	 * @return	string
+	 * @param string
+	 * @param string	the character you wish to reduce
+	 * @param bool	TRUE/FALSE - whether to trim the character from the beginning/end
+	 * @return string
 	 */
 	public function reduce_multiples($str, $character = ',', $trim = false) {
 		$str = preg_replace('#' . preg_quote($character, '#') . '{2,}#', $character, $str);

+ 3 - 4
Model/Behavior/ConfirmableBehavior.php

@@ -31,8 +31,8 @@ class ConfirmableBehavior extends ModelBehavior {
 	/**
 	 * ConfirmableBehavior::beforeValidate()
 	 *
-	 * @param mixed $Model
-	 * @return bool $success
+	 * @param Model $Model
+	 * @return bool Success
 	 */
 	public function beforeValidate(Model $Model) {
 		$return = parent::beforeValidate($Model);
@@ -49,7 +49,7 @@ class ConfirmableBehavior extends ModelBehavior {
 	/**
 	 * ConfirmableBehavior::beforeSave()
 	 *
-	 * @param mixed $Model
+	 * @param Model $Model
 	 * @return mixed
 	 */
 	public function beforeSave(Model $Model) {
@@ -67,7 +67,6 @@ class ConfirmableBehavior extends ModelBehavior {
 	 *
 	 * @param object $Model Model about to be saved.
 	 * @return boolean true if save should proceed, false otherwise
-	 * @access public
 	 */
 	public function confirm(Model $Model, $return = true) {
 		$field = $this->settings[$Model->alias]['field'];

+ 13 - 5
Model/Behavior/JsonableBehavior.php

@@ -34,7 +34,7 @@ class JsonableBehavior extends ModelBehavior {
 
 	/**
 	 * //TODO: json input/ouput directly, clean
-	 * @access protected
+	 * @var array
 	 */
 	public $_defaultSettings = array(
 		'fields' => array(), # empty => only works with array!!!
@@ -67,7 +67,6 @@ class JsonableBehavior extends ModelBehavior {
 	 * @param object $Model
 	 * @param array $results
 	 * @return array
-	 * @access public
 	 */
 	public function afterFind(Model $Model, $results, $primary) {
 		$results = $this->decodeItems($Model, $results);
@@ -79,7 +78,6 @@ class JsonableBehavior extends ModelBehavior {
 	 *
 	 * @param array $arr
 	 * @return array
-	 * @access public
 	 */
 	public function decodeItems(Model $Model, $arr) {
 		foreach ($arr as $akey => $val) {
@@ -111,7 +109,7 @@ class JsonableBehavior extends ModelBehavior {
 	 * Saves all fields that do not belong to the current Model into 'with' helper model.
 	 *
 	 * @param object $Model
-	 * @access public
+	 * @return boolean Success
 	 */
 	public function beforeSave(Model $Model) {
 		$data = $Model->data[$Model->alias];
@@ -146,6 +144,13 @@ class JsonableBehavior extends ModelBehavior {
 		return true;
 	}
 
+	/**
+	 * JsonableBehavior::_encode()
+	 *
+	 * @param Model $Model
+	 * @param mixed $val
+	 * @return string
+	 */
 	public function _encode(Model $Model, $val) {
 		if (!empty($this->settings[$Model->alias]['fields'])) {
 			if ($this->settings[$Model->alias]['input'] === 'param') {
@@ -168,6 +173,10 @@ class JsonableBehavior extends ModelBehavior {
 
 	/**
 	 * fields are absolutely necessary to function properly!
+	 *
+	 * @param Model $Model
+	 * @param mixed $val
+	 * @return mixed
 	 * 2011-06-18 ms
 	 */
 	public function _decode(Model $Model, $val) {
@@ -229,7 +238,6 @@ class JsonableBehavior extends ModelBehavior {
 	 * Checks if string is encoded array/object
 	 *
 	 * @param string string to check
-	 * @access public
 	 * @return boolean
 	 */
 	public function isEncoded(Model $Model, $str) {

+ 1 - 1
Model/Behavior/KeyValueBehavior.php

@@ -182,7 +182,7 @@ class KeyValueBehavior extends ModelBehavior {
 	/**
 	 * KeyValueBehavior::defaultValues()
 	 *
-	 * @param mixed $Model
+	 * @param Model $Model
 	 * @param mixed $section
 	 * @param mixed $key
 	 * @return array

+ 4 - 4
Model/Behavior/MasterPasswordBehavior.php

@@ -85,7 +85,6 @@ class MasterPasswordBehavior extends ModelBehavior {
 	 *
 	 * @param object $Model Model about to be saved.
 	 * @return boolean true if save should proceed, false otherwise
-	 * @access public
 	 */
 	public function confirm(Model $Model, $return = true) {
 		$field = $this->settings[$Model->alias]['field'];
@@ -100,9 +99,10 @@ class MasterPasswordBehavior extends ModelBehavior {
 	}
 
 	/**
-	 * checks a string against the stored hash values of master passwords
+	 * Checks a string against the stored hash values of master passwords
+	 *
 	 * @param string $pwd: plain password string (not hashed etc)
-	 * @return bool $success
+	 * @return bool Success
 	 * 2011-12-22 ms
 	 */
 	public function isAuthorized(Model $Model, $field) {
@@ -120,7 +120,7 @@ class MasterPasswordBehavior extends ModelBehavior {
 	}
 
 	/**
-	 * @retur string $hash or FALSE on failure
+	 * @return string $hash or FALSE on failure
 	 */
 	protected function _hash($string, $algorithm, $salt) {
 		if ($salt) {

+ 16 - 8
Model/Behavior/PasswordableBehavior.php

@@ -43,7 +43,7 @@ if (!defined('PWD_MAX_LENGTH')) {
 class PasswordableBehavior extends ModelBehavior {
 
 	/**
-	 * @access protected
+	 * @var array
 	 */
 	protected $_defaults = array(
 		'field' => 'password',
@@ -65,7 +65,7 @@ class PasswordableBehavior extends ModelBehavior {
 	);
 
 	/**
-	 * @access protected
+	 * @var array
 	 */
 	protected $_validationRules = array(
 		'formField' => array(
@@ -120,7 +120,9 @@ class PasswordableBehavior extends ModelBehavior {
  	 * )
 	 *
 	 * @throws CakeException
-	 * @return bool $success
+	 * @param Model $Model
+	 * @param array $data
+	 * @return bool Success
 	 * 2011-07-22 ms
 	 */
 	public function validateCurrentPwd(Model $Model, $data) {
@@ -172,7 +174,11 @@ class PasswordableBehavior extends ModelBehavior {
 
 	/**
 	 * if not implemented in AppModel
-	 * @return bool $success
+	 *
+	 * @param Model $Model
+	 * @param array $data
+	 * @param string $compareWith String to compare field value with
+	 * @return bool Success
 	 * 2011-07-22 ms
 	 */
 	public function validateIdentical(Model $Model, $data, $compareWith = null) {
@@ -187,7 +193,8 @@ class PasswordableBehavior extends ModelBehavior {
 
 	/**
 	 * if not implemented in AppModel
-	 * @return bool $success
+	 *
+	 * @return bool Success
 	 * 2011-11-10 ms
 	 */
 	public function validateNotSame(Model $Model, $data, $field1, $field2) {
@@ -198,7 +205,8 @@ class PasswordableBehavior extends ModelBehavior {
 
 	/**
 	 * if not implemented in AppModel
-	 * @return bool $success
+	 *
+	 * @return bool Success
 	 * 2011-11-10 ms
 	 */
 	public function validateNotSameHash(Model $Model, $data, $formField) {
@@ -278,7 +286,7 @@ class PasswordableBehavior extends ModelBehavior {
 	/**
 	 * Preparing the data
 	 *
-	 * @return bool $success
+	 * @return bool Success
 	 * 2011-07-22 ms
 	 */
 	public function beforeValidate(Model $Model) {
@@ -335,7 +343,7 @@ class PasswordableBehavior extends ModelBehavior {
 	/**
 	 * Hashing the password and whitelisting
 	 *
-	 * @return bool $success
+	 * @return bool Success
 	 * 2011-07-22 ms
 	 */
 	public function beforeSave(Model $Model) {

+ 9 - 24
Model/Behavior/SluggedBehavior.php

@@ -22,10 +22,9 @@
 /**
  * Ensure that mb_ functions exist
  */
-App::import('I18n', 'Multibyte');
+App::uses('I18n', 'I18n');
 App::uses('ModelBehavior', 'Model');
 
-
 /**
  * SluggedBehavior class
  *
@@ -61,7 +60,6 @@ class SluggedBehavior extends ModelBehavior {
  * 	camel - force CamelCase. E.g. "ThisIsTheSlug"
  *
  * @var array
- * @access protected
  */
 	protected $_defaultSettings = array(
 		'label' => null,
@@ -93,7 +91,6 @@ class SluggedBehavior extends ModelBehavior {
  * A (3 letter) language code indexed array of stop worlds
  *
  * @var array
- * @access public
  */
 	public $stopWords = array();
 
@@ -103,9 +100,8 @@ class SluggedBehavior extends ModelBehavior {
  * Use the model's label field as the default field on which to base the slug, the label can be made up of multiple
  * fields by specifying an array of fields
  *
- * @param mixed $Model
+ * @param Model $Model
  * @param array $config
- * @access public
  * @return void
  */
 	public function setup(Model $Model, $config = array()) {
@@ -143,9 +139,8 @@ class SluggedBehavior extends ModelBehavior {
 /**
  * beforeValidate method
  *
- * @param mixed $Model
+ * @param Model $Model
  * @return void
- * @access public
  */
 	public function beforeValidate(Model $Model) {
 		extract($this->settings[$Model->alias]);
@@ -163,9 +158,8 @@ class SluggedBehavior extends ModelBehavior {
 /**
  * beforeSave method
  *
- * @param mixed $Model
+ * @param Model $Model
  * @return void
- * @access public
  */
 	public function beforeSave(Model $Model) {
 		extract($this->settings[$Model->alias]);
@@ -190,8 +184,7 @@ class SluggedBehavior extends ModelBehavior {
  * If unique is set to true, check for a unique slug and if unavailable suffix the slug with -1, -2, -3 etc.
  * until a unique slug is found
  *
- * @param mixed $Model
- * @access public
+ * @param Model $Model
  * @return void
  */
 	public function generateSlug(Model $Model) {
@@ -280,11 +273,10 @@ class SluggedBehavior extends ModelBehavior {
  * 	both contain and this are stop words
  * Passing "contain this" will return array('contain this')
  *
- * @param mixed $Model
+ * @param Model $Model
  * @param mixed $string string or array of words
  * @param array $params
  * @return mixed
- * @access public
  */
 	public function removeStopWords(Model $Model, $string = '', $params = array()) {
 		if (!$string) {
@@ -385,11 +377,10 @@ class SluggedBehavior extends ModelBehavior {
  * and so slugs like "-----as---df-----" are possible, which by default would otherwise be returned as "as-df".
  * If the mode is "id" and the first charcter of the regex-ed slug is numeric, it will be prefixed with an x.
  *
- * @param mixed $Model
+ * @param Model $Model
  * @param mixed $string
  * @param bool $tidy
  * @return string a slug
- * @access public
  */
 	public function slug(Model $Model, $string, $tidy = true) {
 		extract($this->settings[$Model->alias]);
@@ -456,7 +447,6 @@ class SluggedBehavior extends ModelBehavior {
  *
  * @param mixed $id
  * @return mixed string (the display name) or false
- * @access public
  */
 	public function display(Model $Model, $id = null) {
 		if (!$id) {
@@ -481,7 +471,6 @@ class SluggedBehavior extends ModelBehavior {
  * @param array $conditions
  * @param int $recursive
  * @return bool true on success false otherwise
- * @access public
  */
 	public function resetSlugs(Model $Model, $params = array()) {
 		$recursive = -1;
@@ -522,9 +511,8 @@ class SluggedBehavior extends ModelBehavior {
  * Handle both slug and lable fields using the translate behavior, and being edited
  * in multiple locales at once
  *
- * @param mixed $Model
+ * @param Model $Model
  * @return void
- * @access protected
  */
 	protected function _multiSlug(Model $Model) {
 		extract($this->settings[$Model->alias]);
@@ -552,7 +540,6 @@ class SluggedBehavior extends ModelBehavior {
  * @param mixed $string
  * @param string $encoding 'UTF-8'
  * @return void
- * @access protected
  */
 	protected function _pregReplace($pattern, $replace, $string, $encoding = 'UTF-8') {
 		if ($encoding && $encoding !== 'UTF-8') {
@@ -568,12 +555,11 @@ class SluggedBehavior extends ModelBehavior {
 /**
  * setEncoding method
  *
- * @param mixed $Model
+ * @param Model $Model
  * @param mixed $encoding null
  * @param mixed $string
  * @param mixed $reset null
  * @return void
- * @access protected
  */
 	protected function _setEncoding(Model $Model, &$encoding = null, &$string, $reset = null) {
 		if (function_exists('mb_internal_encoding')) {
@@ -602,7 +588,6 @@ class SluggedBehavior extends ModelBehavior {
  *
  * @param string $mode
  * @return string a partial regex
- * @access private
  */
 	protected function _regex($mode) {
 		$return = '\x00-\x1f\x26\x3c\x7f-\x9f\x{d800}-\x{dfff}\x{fffe}-\x{ffff}';

+ 1 - 3
Model/Behavior/TypographicBehavior.php

@@ -74,7 +74,7 @@ class TypographicBehavior extends ModelBehavior {
 	 *
 	 * @param object $Model Model using the behaviour
 	 * @param array $settings Settings to override for model.
-	 * @access public
+	 * @return void
 	 * 2011-12-06 ms
 	 */
 	public function setup(Model $Model, $settings = array()) {
@@ -105,7 +105,6 @@ class TypographicBehavior extends ModelBehavior {
 		}
 	}
 
-
 	public function beforeValidate(Model $Model) {
 		parent::beforeValidate($Model);
 
@@ -167,7 +166,6 @@ class TypographicBehavior extends ModelBehavior {
 	 *
 	 * @param object $Model Model about to be saved.
 	 * @return boolean true if save should proceed, false otherwise
-	 * @access public
 	 */
 	public function process(Model $Model, $return = true) {
 		foreach ($this->settings[$Model->alias]['fields'] as $field) {

+ 0 - 1
Model/MyModel.php

@@ -461,7 +461,6 @@ class MyModel extends Model {
 	/**
 	 * Wrapper find() to cache sql queries.
 	 *
-	 * @access public
 	 * @param array $conditions
 	 * @param array $fields
 	 * @param string $order

+ 1 - 1
View/Helper/CommonHelper.php

@@ -38,7 +38,7 @@ class CommonHelper extends AppHelper {
 	}
 
 	/**
-	 * convinience function for clean meta name tags
+	 * Convenience function for clean meta name tags
 	 * @param STRING $name: author, date, generator, revisit-after, language
 	 * @param MIXED $content: if array, it will be seperated by commas
 	 * @return string $htmlMarkup

+ 0 - 1
View/Helper/FormExtHelper.php

@@ -160,7 +160,6 @@ class FormExtHelper extends FormHelper {
 	 * @param string $fieldName This should be "Modelname.fieldname"
 	 * @param array $options Each type of input takes different options.
 	 * @return string Completed form widget.
-	 * @access public
 	 * @link http://book.cakephp.org/view/1390/Automagic-Form-Elements
 	 */
 	public function inputExt($fieldName, $options = array()) {

+ 5 - 7
View/Helper/FormatHelper.php

@@ -15,7 +15,6 @@ class FormatHelper extends TextHelper {
 	 * Other helpers used by FormHelper
 	 *
 	 * @var array
-	 * @access public
 	 */
 	public $helpers = array('Html', 'Form', 'Tools.Common', 'Tools.Gravatar', 'Tools.PhpThumb');
 
@@ -468,13 +467,12 @@ class FormatHelper extends TextHelper {
 	 *
 	 * Called to modify the attributes of the next <item> to be processed
 	 * Note that the content of a 'node' is processed before generating its wrapping <item> tag
+	 * TODO: refactor!!
 	 *
 	 * @param string $id
 	 * @param string $key
 	 * @param mixed $value
-	 * @access public
 	 * @return void
-	 * TODO: refactor!!
 	 */
 	public function languageFlags() {
 		$langs = Configure::read('LanguagesAvailable');
@@ -1341,10 +1339,10 @@ class FormatHelper extends TextHelper {
 	 * Supply a string and an array of disallowed words and any
 	 * matched words will be converted to #### or to the replacement
 	 * word you've submitted.
-	 * @param	string	the text string
-	 * @param	string	the array of censoered words
-	 * @param	string	the optional replacement value
-	 * @return	string
+	 * @param string	the text string
+	 * @param string	the array of censoered words
+	 * @param string	the optional replacement value
+	 * @return string
 	 * 2009-11-11 ms
 	 */
 	public function wordCensor($str, $censored, $replacement = null) {

+ 0 - 1
View/Helper/GravatarHelper.php

@@ -116,7 +116,6 @@ class GravatarHelper extends AppHelper {
  *
  * @param array $options Array of options, keyed from default settings
  * @return array Default images array
- * @access public
  */
 	public function defaultImages($options = array()) {
 		$options = $this->_cleanOptions(array_merge($this->_default, $options));

+ 0 - 2
View/Helper/TextExtHelper.php

@@ -56,7 +56,6 @@ class TextExtHelper extends TextHelper {
 	 * @param string $text Text
 	 * @param array $options Array of HTML options.
 	 * @return string The text with links
-	 * @access public
 	 * @link http://book.cakephp.org/view/1469/Text#autoLink-1620
 	 */
 	public function autoLink($text, $options = array(), $htmlOptions = array()) {
@@ -108,7 +107,6 @@ class TextExtHelper extends TextHelper {
 	 * @param options:
 	 * - obfuscate: true/false (defaults to false)
 	 * @return string $html
-	 * @static
 	 * 2010-11-20 ms
 	 */
 	public static function prepareEmail($email, $options = array(), $customOptions = array()) {

+ 11 - 16
View/Helper/TypographyHelper.php

@@ -54,10 +54,9 @@ class TypographyHelper extends AppHelper {
 	 *	- Converts double dashes into em-dashes.
 	 * - Converts two spaces into entities
 	 *
-	 * @access	public
-	 * @param	string
-	 * @param	bool	whether to reduce more then two consecutive newlines to two
-	 * @return	string
+	 * @param string
+	 * @param bool	whether to reduce more then two consecutive newlines to two
+	 * @return string
 	 */
 	public function autoTypography($str, $reduce_linebreaks = false) {
 		if ($str === '') {
@@ -226,9 +225,8 @@ class TypographyHelper extends AppHelper {
 	 * to curly entities, but it also converts em-dashes,
 	 * double spaces, and ampersands
 	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
+	 * @param string
+	 * @return string
 	 */
 	public function formatCharacters($str, $locale = null) {
 		//static $table;
@@ -310,9 +308,8 @@ class TypographyHelper extends AppHelper {
 	 *
 	 * Converts newline characters into either <p> tags or <br />
 	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
+	 * @param string
+	 * @return string
 	 */
 	protected function _formatNewlines($str) {
 		if ($str === '') {
@@ -353,9 +350,8 @@ class TypographyHelper extends AppHelper {
 	 * and we don't want double dashes converted to emdash entities, so they are marked with {@DD}
 	 * likewise double spaces are converted to {@NBS} to prevent entity conversion
 	 *
-	 * @access	public
-	 * @param	array
-	 * @return	string
+	 * @param array
+	 * @return string
 	 */
 	protected function _protectCharacters($match) {
 		return str_replace(array("'", '"', '--', '  '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]);
@@ -365,9 +361,8 @@ class TypographyHelper extends AppHelper {
 	/**
 	 * Convert newlines to HTML line breaks except within PRE tags
 	 *
-	 * @access	public
-	 * @param	string
-	 * @return	string
+	 * @param string
+	 * @return string
 	 */
 	public function nl2brExceptPre($str) {
 		$ex = explode("pre>", $str);