浏览代码

coding standards

euromark 12 年之前
父节点
当前提交
b4c628cd48
共有 45 个文件被更改,包括 109 次插入109 次删除
  1. 1 1
      Console/Command/CopyShell.php
  2. 2 2
      Controller/Component/Auth/TinyAuthorize.php
  3. 1 1
      Controller/Component/AuthExtComponent.php
  4. 1 1
      Controller/Component/CalendarComponent.php
  5. 4 4
      Controller/Component/CommonComponent.php
  6. 4 4
      Controller/Component/MobileComponent.php
  7. 3 3
      Lib/Auth.php
  8. 1 1
      Lib/Bootstrap/DebugTab.php
  9. 1 1
      Lib/CurrencyLib.php
  10. 2 2
      Lib/DiffLib.php
  11. 4 4
      Lib/EmailLib.php
  12. 4 4
      Lib/GeocodeLib.php
  13. 2 2
      Lib/ImapLib.php
  14. 1 1
      Lib/Misc/ZodiacLib.php
  15. 1 1
      Lib/MyAsset.php
  16. 1 1
      Lib/SpellLib.php
  17. 3 3
      Lib/Utility/ChmodLib.php
  18. 1 1
      Lib/Utility/FileLib.php
  19. 1 1
      Lib/Utility/FolderLib.php
  20. 2 2
      Lib/Utility/NumberLib.php
  21. 1 1
      Lib/Utility/Str.php
  22. 2 2
      Lib/Utility/TextAnalysisLib.php
  23. 1 1
      Lib/Utility/TextLib.php
  24. 9 9
      Lib/Utility/TimeLib.php
  25. 4 4
      Lib/Utility/Utility.php
  26. 1 1
      Model/Behavior/BitmaskedBehavior.php
  27. 1 1
      Model/Behavior/CaptchaBehavior.php
  28. 1 1
      Model/Behavior/ConfirmableBehavior.php
  29. 3 3
      Model/Behavior/GeocoderBehavior.php
  30. 3 3
      Model/Behavior/KeyValueBehavior.php
  31. 1 1
      Model/Behavior/MasterPasswordBehavior.php
  32. 6 6
      Model/Behavior/PasswordableBehavior.php
  33. 1 1
      Model/Behavior/ResetBehavior.php
  34. 1 1
      Model/Behavior/TypographicBehavior.php
  35. 1 1
      Model/Datasource/ImapSource.php
  36. 18 18
      Model/MyModel.php
  37. 1 1
      Test/Case/Controller/Component/AutoLoginComponentTest.php
  38. 1 1
      Test/Case/Model/Behavior/SluggedBehaviorTest.php
  39. 1 1
      Test/Case/View/Helper/FormExtHelperTest.php
  40. 1 1
      View/Helper/CommonHelper.php
  41. 2 2
      View/Helper/DatetimeHelper.php
  42. 1 1
      View/Helper/FormExtHelper.php
  43. 4 4
      View/Helper/GoogleMapV3Helper.php
  44. 1 1
      View/Helper/IcalHelper.php
  45. 3 3
      View/Helper/QrCodeHelper.php

+ 1 - 1
Console/Command/CopyShell.php

@@ -427,7 +427,7 @@ class CopyShell extends AppShell {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	protected function _exec($silent = true, $options = array()) {
 		# make sure, folder exists

+ 2 - 2
Controller/Component/Auth/TinyAuthorize.php

@@ -68,7 +68,7 @@ class TinyAuthorize extends BaseAuthorize {
 	 *
 	 * @param array $user The user to authorize
 	 * @param CakeRequest $request The request needing authorization.
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function authorize($user, CakeRequest $request) {
 		if (isset($user[$this->settings['aclModel']])) {
@@ -91,7 +91,7 @@ class TinyAuthorize extends BaseAuthorize {
 	 * validate the url to the role(s)
 	 * allows single or multi role based authorization
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function validate($roles, $plugin, $controller, $action) {
 		$action = Inflector::underscore($action);

+ 1 - 1
Controller/Component/AuthExtComponent.php

@@ -269,7 +269,7 @@ class AuthExtComponent extends AuthComponent {
 
 	/**
 	 * @deprecated
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function verifyUser($id, $pwd) {
 		trigger_error('deprecated - use Authenticate class');

+ 1 - 1
Controller/Component/CalendarComponent.php

@@ -39,7 +39,7 @@ class CalendarComponent extends Component {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function ensureCalendarConsistency($year, $month, $span = 10) {
 		if (!is_numeric($month)) {

+ 4 - 4
Controller/Component/CommonComponent.php

@@ -128,7 +128,7 @@ class CommonComponent extends Component {
 	 * Convenience method to check on POSTED data.
 	 * Doesn't matter if its post or put.
 	 *
-	 * @return bool $isPost
+	 * @return boolean $isPost
 	 * 2011-12-09 ms
 	 */
 	public function isPosted() {
@@ -343,7 +343,7 @@ class CommonComponent extends Component {
 	 *
 	 * Password can be passed as named param or query string param.
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function validAdminUrlAccess() {
 		$pwd = Configure::read('Config.pwd');
@@ -1023,7 +1023,7 @@ class CommonComponent extends Component {
 
 	/**
 	 * returns true only if all values are true
-	 * @return bool $result
+	 * @return boolean $result
 	 * maybe move to bootstrap?
 	 * 2011-11-02 ms
 	 */
@@ -1034,7 +1034,7 @@ class CommonComponent extends Component {
 
 	/**
 	 * returns true if at least one value is true
-	 * @return bool $result
+	 * @return boolean $result
 	 * maybe move to bootstrap?
 	 * 2011-11-02 ms
 	 */

+ 4 - 4
Controller/Component/MobileComponent.php

@@ -150,7 +150,7 @@ class MobileComponent extends Component {
 	/**
 	 * Determine if we need to so serve mobile views based on session preference and browser headers.
 	 *
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function isMobile() {
 		if ($this->isMobile !== null) {
@@ -182,7 +182,7 @@ class MobileComponent extends Component {
 	/**
 	 * Detect if the current request is from a mobile device
 	 *
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function detect() {
 		if ($this->settings['engine'] !== 'cake') {
@@ -196,7 +196,7 @@ class MobileComponent extends Component {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function detectByTools() {
 		$isMobile = $this->Session->read('Session.mobile');
@@ -209,7 +209,7 @@ class MobileComponent extends Component {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function detectByWurfl() {
 		App::import('Vendor', 'WURFL', array('file' => 'WURFLManagerProvider.php'));

+ 3 - 3
Lib/Auth.php

@@ -72,7 +72,7 @@ class Auth {
 	 *
 	 * @param mixed $role
 	 * @param mixed $providedRights
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public static function hasRight($ownRight, $providedRights = null) {
 		if ($providedRights !== null) {
@@ -92,7 +92,7 @@ class Auth {
 	 *
 	 * @param mixed $role
 	 * @param mixed $providedRoles
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public static function hasRole($ownRole, $providedRoles = null) {
 		if ($providedRoles !== null) {
@@ -118,7 +118,7 @@ class Auth {
 	 * @param mixed $roles
 	 * @param boolean $oneRoleIsEnough (if all $roles have to match instead of just one)
 	 * @param mixed $providedRoles
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public static function hasRoles($ownRoles, $oneRoleIsEnough = true, $providedRoles = null) {
 		if ($providedRoles !== null) {

+ 1 - 1
Lib/Bootstrap/DebugTab.php

@@ -12,7 +12,7 @@ class DebugTab {
 	public static $groups = array();
 
 	/**
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public static function debug($var = false, $display = false, $key = null) {
 		if (is_string($display)) {

+ 1 - 1
Lib/CurrencyLib.php

@@ -93,7 +93,7 @@ class CurrencyLib {
 	 * CurrencyComponent::isAvailable()
 	 *
 	 * @param mixed $currency
-	 * @return bool Success.
+	 * @return boolean Success.
 	 */
 	public function isAvailable($currency) {
 		$rates = $this->_retrieveCurrencies();

+ 2 - 2
Lib/DiffLib.php

@@ -45,7 +45,7 @@ class DiffLib {
 	 * Do you want to use the Character diff renderer additionally to the sidebyside renderer ?
 	 * sidebyside renderer is the only one supporting the additional renderer
 	 *
-	 * @var bool
+	 * @var boolean
 	 */
 	public $character_diff = true;
 
@@ -60,7 +60,7 @@ class DiffLib {
 	/**
 	 * How many context lines do you want to see around the changed line?
 	 *
-	 * @var int
+	 * @var integer
 	 */
 	public $context_lines = 4;
 

+ 4 - 4
Lib/EmailLib.php

@@ -54,7 +54,7 @@ class EmailLib extends CakeEmail {
 	 * @param string $subject
 	 * @param string $message
 	 * @param string $transportConfig
-	 * @return bool $success
+	 * @return boolean Success
 	 * 2011-10-31 ms
 	 */
 	public static function systemEmail($subject, $message = 'System Email', $transportConfig = null) {
@@ -475,7 +475,7 @@ class EmailLib extends CakeEmail {
 	 *
 	 * @overwrite
 	 * @param string/array: message
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function send($message = null) {
 		$this->_log = array(
@@ -544,7 +544,7 @@ class EmailLib extends CakeEmail {
 	 * Set/Get wrapLength
 	 *
 	 * @param integer $length Must not be more than CakeEmail::LINE_LENGTH_MUST
-	 * @return int|CakeEmail
+	 * @return integer|CakeEmail
 	 */
 	public function wrapLength($length = null) {
 		if ($length === null) {
@@ -558,7 +558,7 @@ class EmailLib extends CakeEmail {
 	 * Set/Get priority
 	 *
 	 * @param integer $priority 1 (highest) to 5 (lowest)
-	 * @return int|CakeEmail
+	 * @return integer|CakeEmail
 	 */
 	public function priority($priority = null) {
 		if ($priority === null) {

+ 4 - 4
Lib/GeocodeLib.php

@@ -203,7 +203,7 @@ class GeocodeLib {
 	}
 
 	/**
-	 * @return bool $isInconclusive (or null if no query has been run yet)
+	 * @return boolean $isInconclusive (or null if no query has been run yet)
 	 */
 	public function isInconclusive() {
 		if ($this->result === null) {
@@ -244,7 +244,7 @@ class GeocodeLib {
 	 * @param array $options
 	 * - allow_inconclusive
 	 * - min_accuracy
-	 * @return boolean $success
+	 * @return boolean Success
 	 * 2010-06-29 ms
 	 */
 	public function reverseGeocode($lat, $lng, $settings = array()) {
@@ -511,7 +511,7 @@ class GeocodeLib {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	protected function _isNotAccurateEnough($accuracy = null) {
 		if ($accuracy === null) {
@@ -700,7 +700,7 @@ class GeocodeLib {
 	 * @param array pointX
 	 * @param array pointY
 	 * @param float $unit (M=miles, K=kilometers, N=nautical miles, I=inches, F=feet)
-	 * @return int distance: in km
+	 * @return integer distance: in km
 	 * 2009-03-06 ms
 	 */
 	public function distance($pointX, $pointY, $unit = null) {

+ 2 - 2
Lib/ImapLib.php

@@ -123,7 +123,7 @@ class ImapLib {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 * 2011-10-25 ms
 	 */
 	public function connect($user, $pass, $server, $port = null) {
@@ -508,7 +508,7 @@ class ImapLib {
 	/**
 	 * makes sure imap_open is available etc
 	 * @throws InternalErrorException
-	 * @return bool $success
+	 * @return boolean Success
 	 * 2011-10-25 ms
 	 */
 	public function dependenciesMatch() {

+ 1 - 1
Lib/Misc/ZodiacLib.php

@@ -80,7 +80,7 @@ class ZodiacLib {
 	 * @param month
 	 * @param day
 	 * expects valid values
-	 * @return int $sign or false on failure
+	 * @return integer $sign or false on failure
 	 * 2011-03-11 ms
 	 */
 	public function getSign($month, $day) {

+ 1 - 1
Lib/MyAsset.php

@@ -141,7 +141,7 @@ class MyAsset {
 	}
 
 	/**
-	 * @return bool $result
+	 * @return boolean $result
 	 * @deprecated?
 	 * 2011-03-23 ms
 	 */

+ 1 - 1
Lib/SpellLib.php

@@ -71,7 +71,7 @@ class SpellLib {
 	}
 
 	/**
-	 * @return bool $success
+	 * @return boolean Success
 	 */
 	public function check($word) {
 		return enchant_dict_check($this->_Dict, $word);

+ 3 - 3
Lib/Utility/ChmodLib.php

@@ -37,7 +37,7 @@ class ChmodLib {
 	/**
 	 * from INT or STRING with or without leading 0 -> Octal 0xxx
 	 *
-	 * @return int
+	 * @return integer
 	 * 2009-07-26 ms
 	 */
 	public static function convertToOctal($mode) {
@@ -63,7 +63,7 @@ class ChmodLib {
 	 *
 	 * @param options
 	 * - string: string/int/symbolic
-	 * @return int Mode
+	 * @return integer Mode
 	 * 2010-06-21 ms
 	 */
 	public function getMode($options = array()) {
@@ -126,7 +126,7 @@ class ChmodLib {
 	 * @param integer $r
 	 * @param integer $w
 	 * @param integer $e
-	 * @return int
+	 * @return integer
 	 */
 	protected function setMode($r, $w, $e) {
 		$mode = 0;

+ 1 - 1
Lib/Utility/FileLib.php

@@ -124,7 +124,7 @@ class FileLib extends File {
 	 * @param array $data
 	 * @param string $delimiter (null defaults to ,)
 	 * @param string $enclosure (null defaults to " - do not pass empty string)
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2012-07-06 ms
 	 */
 	public function writeCsv($data, $delimiter = null, $enclosure = null) {

+ 1 - 1
Lib/Utility/FolderLib.php

@@ -13,7 +13,7 @@ class FolderLib extends Folder {
 	 * Instead of deleting the folder itself as delete() does,
 	 * this method only removes its content recursivly.
 	 *
-	 * @return boolean $success or null on invalid folder
+	 * @return boolean Success or null on invalid folder
 	 * 2010-12-07 ms
 	 */
 	public function clear($path = null) {

+ 2 - 2
Lib/Utility/NumberLib.php

@@ -233,7 +233,7 @@ class NumberLib extends CakeNumber {
 	 *
 	 * @param array $values: int or float values
 	 * @param integer $precision
-	 * @return int $average
+	 * @return integer $average
 	 * 2009-09-05 ms
 	 */
 	public static function average($values, $precision = 0) {
@@ -286,7 +286,7 @@ class NumberLib extends CakeNumber {
 	 * Get decimal places
 	 *
 	 * @param float $number
-	 * @return int $decimalPlaces
+	 * @return integer $decimalPlaces
 	 * 2011-04-15 lb
 	 */
 	public static function getDecimalPlaces($number) {

+ 1 - 1
Lib/Utility/Str.php

@@ -128,7 +128,7 @@ final class Str {
 	 * @param string $haystack
 	 * @param integer $offset
 	 * @param integer $length
-	 * @return int
+	 * @return integer
 	 */
 	final public static function count($needle, $haystack, $offset = 0, $length = null) {
 		if ($length === null) {

+ 2 - 2
Lib/Utility/TextAnalysisLib.php

@@ -18,7 +18,7 @@ class TextAnalysisLib extends TextLib {
 	/**
 	 * @param string $stringToCheck
 	 * @param tolerance (in %: 0 ... 1)
-	 * @return boolean $success
+	 * @return boolean Success
 	 * 2011-10-13 ms
 	 */
 	public function isScreamFont($str = null, $tolerance = 0.4) {
@@ -63,7 +63,7 @@ class TextAnalysisLib extends TextLib {
 	 * $ascii = UTF8::is_ascii($str);
 	 *
 	 * @param string string to check
-	 * @return bool
+	 * @return boolean
 	 */
 	public function isAscii($str = null) {
 		if ($str === null) {

+ 1 - 1
Lib/Utility/TextLib.php

@@ -54,7 +54,7 @@ class TextLib extends String {
 	 * //TODO use str_word_count() instead!!!
 	 *
 	 * @param string $text
-	 * @return int
+	 * @return integer
 	 * 2009-11-11 ms
 	 */
 	public static function numberOfWords($text) {

+ 9 - 9
Lib/Utility/TimeLib.php

@@ -33,7 +33,7 @@ class TimeLib extends CakeTime {
 	 * Calculate the current GMT offset from a timezone string (respecting DST)
 	 *
 	 * @param string|DateTimeZone $timezone User's timezone string or DateTimeZone object
-	 * @return int Offset in hours
+	 * @return integer Offset in hours
 	 * 2012-05-20 ms
 	 */
 	public function getGmtOffset($timezone = null) {
@@ -65,7 +65,7 @@ class TimeLib extends CakeTime {
 	 * should only be used for < month (due to the different month lenghts it gets fuzzy)
 	 * @param mixed $start (db format or timestamp)
 	 * @param mixex §end (db format or timestamp)
-	 * @return int: the distance in seconds
+	 * @return integer: the distance in seconds
 	 * 2011-03-03 ms
 	 */
 	public static function difference($startTime = null, $endTime = null, $options = array()) {
@@ -90,7 +90,7 @@ class TimeLib extends CakeTime {
 	 $now = mktime(0,0,0,date("m"),date("d"),date("Y"));
 	 $birth = mktime(0,0,0, $monat, $tag, $jahr);
 	 $age = intval(($now - $birth) / (3600 * 24 * 365));
-	 * @return int age (0 if both timestamps are equal or empty, -1 on invalid dates)
+	 * @return integer age (0 if both timestamps are equal or empty, -1 on invalid dates)
 	 * 2009-03-12 ms
 	 */
 	public static function age($start = null, $end = null, $accuracy = 0) {
@@ -289,7 +289,7 @@ class TimeLib extends CakeTime {
 	 * Get number of days since the start of the week.
 	 * 1 = monday, 7 = sunday ? should be 0=sunday to 7=saturday (default)
 	 * @param integer $num Number of day.
-	 * @return int Days since the start of the week.
+	 * @return integer Days since the start of the week.
 	 */
 	public static function cweekMod($num, $offset = 0) {
 		$base = 7;
@@ -340,7 +340,7 @@ class TimeLib extends CakeTime {
 	/**
 	 * calculate the amount of calender weeks in a year
 	 * @param year (format xxxx, defaults to current year)
-	 * @return int: 52 or 53
+	 * @return integer: 52 or 53
 	 * 2011-03-07 ms
 	 */
 	public static function cweeks($year = null) {
@@ -352,7 +352,7 @@ class TimeLib extends CakeTime {
 
 	/**
 	 * @param year (format xxxx, defaults to current year)
-	 * @return bool $success
+	 * @return boolean Success
 	 * 2012-02-17 ms
 	 */
 	public static function isLeapYear($year) {
@@ -1062,7 +1062,7 @@ class TimeLib extends CakeTime {
 	 * @param type
 	 * - start: first second of this interval
 	 * - end: last second of this interval
-	 * @return int timestamp
+	 * @return integer timestamp
 	 * 2011-11-19 ms
 	 */
 	public static function parseLocalizedDate($date, $format = null, $type = 'start') {
@@ -1217,7 +1217,7 @@ class TimeLib extends CakeTime {
 	 * parse 2,5 - 2.5 2:30 2:31:58 or even 2011-11-12 10:10:10
 	 * now supports negative values like -2,5 -2,5 -2:30 -:30 or -4
 	 * @param string
-	 * @return int: seconds
+	 * @return integer: seconds
 	 * 2011-03-06 ms
 	 */
 	public static function parseTime($duration, $allowed = array(':', '.', ',')) {
@@ -1257,7 +1257,7 @@ class TimeLib extends CakeTime {
 	/**
 	 * parse 2022-11-12 or 12.11.2022 or even 12.11.22
 	 * @param string $date
-	 * @return int: seconds
+	 * @return integer: seconds
 	 * 2011-03-09 ms
 	 */
 	public static function parseDate($date, $allowed = array('.', '-')) {

+ 4 - 4
Lib/Utility/Utility.php

@@ -21,7 +21,7 @@ class Utility {
 	 *
 	 * @param mixed $needle
 	 * @param array $haystack
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public static function inArray($needle, $haystack) {
 		$strict = !is_numeric($needle);
@@ -280,7 +280,7 @@ class Utility {
 	 * //TODO: maybe move to bootstrap?
 	 *
 	 * @param array $array
-	 * @return bool Result
+	 * @return boolean Result
 	 * 2011-11-02 ms
 	 */
 	public static function logicalAnd($array) {
@@ -300,7 +300,7 @@ class Utility {
 	 * //TODO: maybe move to bootstrap?
 	 *
 	 * @param array $array
-	 * @return bool Result
+	 * @return boolean Result
 	 *
 	 * 2011-11-02 ms
 	 */
@@ -318,7 +318,7 @@ class Utility {
 	 * So we need to call this method inside the modified saveAll() method to return the expected single bool there, too.
 	 *
 	 * @param array
-	 * @return bool
+	 * @return boolean
 	 * 2012-10-12 ms
 	 */
 	public static function isValidSaveAll($array) {

+ 1 - 1
Model/Behavior/BitmaskedBehavior.php

@@ -136,7 +136,7 @@ class BitmaskedBehavior extends ModelBehavior {
 
 	/**
 	 * @param array $bitmaskArray
-	 * @return int $bitmask
+	 * @return integer $bitmask
 	 * from APP to DB
 	 */
 	public function encodeBitmask(Model $Model, $value, $defaultValue = null) {

+ 1 - 1
Model/Behavior/CaptchaBehavior.php

@@ -129,7 +129,7 @@ class CaptchaBehavior extends ModelBehavior {
 	 * validates maximum time
 	 *
 	 * @param array $data
-	 * @return bool
+	 * @return boolean
 	 */
 	protected function _validateCaptchaMaxTime($data) {
 		if ($this->settings[$this->Model->alias]['maxTime'] <= 0) {

+ 1 - 1
Model/Behavior/ConfirmableBehavior.php

@@ -32,7 +32,7 @@ class ConfirmableBehavior extends ModelBehavior {
 	 * ConfirmableBehavior::beforeValidate()
 	 *
 	 * @param Model $Model
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function beforeValidate(Model $Model, $options = array()) {
 		$return = parent::beforeValidate($Model, $options);

+ 3 - 3
Model/Behavior/GeocoderBehavior.php

@@ -277,7 +277,7 @@ class GeocoderBehavior extends ModelBehavior {
 	/**
 	 * snippet for custom pagination
 	 *
-	 * @return int $count
+	 * @return integer $count
 	 */
 	public function paginateDistanceCount(Model $Model, $conditions = null, $recursive = -1, $extra = array()) {
 		if (!empty($extra['radius'])) {
@@ -296,7 +296,7 @@ class GeocoderBehavior extends ModelBehavior {
 	 *
 	 * @param Model
 	 * @param float $latitude
-	 * @return bool
+	 * @return boolean
 	 */
 	public function validateLatitude(Model $Model, $latitude) {
 		if (is_array($latitude)) {
@@ -311,7 +311,7 @@ class GeocoderBehavior extends ModelBehavior {
 	 *
 	 * @param Model
 	 * @param float $longitude
-	 * @return bool
+	 * @return boolean
 	 */
 	public function validateLongitude(Model $Model, $longitude) {
 		if (is_array($longitude)) {

+ 3 - 3
Model/Behavior/KeyValueBehavior.php

@@ -108,7 +108,7 @@ class KeyValueBehavior extends ModelBehavior {
 	 * @var string
 	 * @var array
 	 * @var string
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function saveSection(Model $Model, $foreignKey, $data, $section = null, $validate = true) {
 		if ($validate && !$this->validateSection($Model, $data)) {
@@ -152,7 +152,7 @@ class KeyValueBehavior extends ModelBehavior {
 	}
 
 	/**
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function validateSection(Model $Model, $data, $section = null) {
 		$validate = $this->settings[$Model->alias]['validate'];
@@ -209,7 +209,7 @@ class KeyValueBehavior extends ModelBehavior {
 	 * resets the custom data for the specific domains (model, foreign_id)
 	 * careful: passing both null values will result in a complete truncate command
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2012-08-08 ms
 	 */
 	public function resetSection(Model $Model, $foreignKey = null, $section = null, $key = null) {

+ 1 - 1
Model/Behavior/MasterPasswordBehavior.php

@@ -99,7 +99,7 @@ class MasterPasswordBehavior extends ModelBehavior {
 	 * Checks a string against the stored hash values of master passwords
 	 *
 	 * @param string $pwd: plain password string (not hashed etc)
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-12-22 ms
 	 */
 	public function isAuthorized(Model $Model, $field) {

+ 6 - 6
Model/Behavior/PasswordableBehavior.php

@@ -123,7 +123,7 @@ class PasswordableBehavior extends ModelBehavior {
 	 * @throws CakeException
 	 * @param Model $Model
 	 * @param array $data
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-07-22 ms
 	 */
 	public function validateCurrentPwd(Model $Model, $data) {
@@ -179,7 +179,7 @@ class PasswordableBehavior extends ModelBehavior {
 	 * @param Model $Model
 	 * @param array $data
 	 * @param string $compareWith String to compare field value with
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-07-22 ms
 	 */
 	public function validateIdentical(Model $Model, $data, $compareWith = null) {
@@ -195,7 +195,7 @@ class PasswordableBehavior extends ModelBehavior {
 	/**
 	 * if not implemented in AppModel
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-11-10 ms
 	 */
 	public function validateNotSame(Model $Model, $data, $field1, $field2) {
@@ -207,7 +207,7 @@ class PasswordableBehavior extends ModelBehavior {
 	/**
 	 * if not implemented in AppModel
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-11-10 ms
 	 */
 	public function validateNotSameHash(Model $Model, $data, $formField) {
@@ -299,7 +299,7 @@ class PasswordableBehavior extends ModelBehavior {
 	/**
 	 * Preparing the data
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-07-22 ms
 	 */
 	public function beforeValidate(Model $Model, $options = array()) {
@@ -355,7 +355,7 @@ class PasswordableBehavior extends ModelBehavior {
 	/**
 	 * Hashing the password and whitelisting
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-07-22 ms
 	 */
 	public function beforeSave(Model $Model, $options = array()) {

+ 1 - 1
Model/Behavior/ResetBehavior.php

@@ -64,7 +64,7 @@ class ResetBehavior extends ModelBehavior {
 	 * @param Model $Model
 	 * @param array $conditions
 	 * @param integer $recursive
-	 * @return bool true on success false otherwise
+	 * @return boolean true on success false otherwise
 	 */
 	public function resetRecords(Model $Model, $params = array()) {
 		$recursive = -1;

+ 1 - 1
Model/Behavior/TypographicBehavior.php

@@ -145,7 +145,7 @@ class TypographicBehavior extends ModelBehavior {
 	 * This is useful if you attach it after some records have already been saved without it.
 	 *
 	 * @param Model $Model The model about to be saved.
-	 * @return int $count Number of affected/changed records
+	 * @return integer $count Number of affected/changed records
 	 */
 	public function updateTypography(Model $Model, $dryRun = false) {
 		$options = array('recursive' => -1, 'limit' => 100, 'offset' => 0);

+ 1 - 1
Model/Datasource/ImapSource.php

@@ -1279,7 +1279,7 @@ class ImapSource extends DataSource {
 	 * Figure out how many emails there are in the thread for this mail.
 	 *
 	 * @param object $Mail the imap header of the mail
-	 * @return int the number of mails in the thred
+	 * @return integer the number of mails in the thred
 	 */
 	protected function _getThreadCount($Mail) {
 		if (isset($Mail->reference) || isset($Mail->in_reply_to)) {

+ 18 - 18
Model/MyModel.php

@@ -361,7 +361,7 @@ class MyModel extends Model {
 	 * return the next auto increment id from the current table
 	 * UUIDs will return false
 	 *
-	 * @return int next auto increment value or False on failure
+	 * @return integer next auto increment value or False on failure
 	 */
 	public function getNextAutoIncrement() {
 		$next_increment = 0;
@@ -396,7 +396,7 @@ class MyModel extends Model {
 	 *
 	 * @param mixed $data
 	 * @param array $options
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2012-11-10 ms
 	 */
 	public function saveAll($data = null, $options = array()) {
@@ -430,7 +430,7 @@ class MyModel extends Model {
 	/**
 	 * @param params
 	 * - key: functioName or other key used
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2010-12-02 ms
 	 */
 	public function deleteCache($key) {
@@ -842,7 +842,7 @@ class MyModel extends Model {
 	 * Does not do any callbacks
 	 *
 	 * @param mixed $conditions Conditions to match, true for all records
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function deleteAllRaw($conditions = true) {
 		return $this->getDataSource()->delete($this, $conditions);
@@ -876,7 +876,7 @@ class MyModel extends Model {
 	 * @param array $data
 	 * @param array $options
 	 * - allowEmpty
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-06-21 ms
 	 */
 	public function validateKey($data = array(), $options = array()) {
@@ -909,7 +909,7 @@ class MyModel extends Model {
 	/**
 	 * Checks if the passed enum value is valid
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2010-02-09 ms
 	 */
 	public function validateEnum(array $data, $enum = null, $additionalKeys = array()) {
@@ -939,7 +939,7 @@ class MyModel extends Model {
 	 * Checks if the content of 2 fields are equal
 	 * Does not check on empty fields! Return TRUE even if both are empty (secure against empty in another rule)!
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2009-01-22 ms
 	 */
 	public function validateIdentical($data = array(), $compareWith = null, $options = array()) {
@@ -968,7 +968,7 @@ class MyModel extends Model {
 	 * TODO: add possibity of deep nested validation (User -> Comment -> CommentCategory: UNIQUE comment_id, Comment.user_id)
 	 * @param array $options
 	 * - requireDependentFields Require all dependent fields for the validation rule to return true
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2010-01-30 ms
 	 */
 	public function validateUnique($data, $fields = array(), $options = array()) {
@@ -1031,7 +1031,7 @@ class MyModel extends Model {
 	 * example in model: 'rule' => array ('validateUniqueExt', array('scope'=>array('belongs_to_table_id','some_id','user_id'))),
 	 * http://groups.google.com/group/cake-php/browse_thread/thread/880ee963456739ec
 	 * //TODO: test!!!
-	 * @return bool Success
+	 * @return boolean Success
 	 * @deprecated in favor of validateUnique?
 	 * 2011-03-27 ms
 	 */
@@ -1074,7 +1074,7 @@ class MyModel extends Model {
 	 * - required TRUE/FALSE (TRUE: overrides allowEmpty)
 	 * - autoComplete (default: TRUE)
 	 * - deep (default: TRUE)
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2010-10-18 ms
 	 */
 	public function validateUrl($data, $options = array()) {
@@ -1137,7 +1137,7 @@ class MyModel extends Model {
 	 * checks if a url is valid
 	 *
 	 * @param string url
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2009-02-27 ms
 	 */
 	protected function _validUrl($url) {
@@ -1164,7 +1164,7 @@ class MyModel extends Model {
 	 * - allowEmpty
 	 * - after/before (fieldName to validate against)
 	 * - min/max (defaults to >= 1 - at least 1 minute apart)
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-03-02 ms
 	 */
 	public function validateDateTime($data, $options = array()) {
@@ -1214,7 +1214,7 @@ class MyModel extends Model {
 	 * - allowEmpty
 	 * - after/before (fieldName to validate against)
 	 * - min (defaults to 0 - equal is OK too)
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-03-02 ms
 	 */
 	public function validateDate($data, $options = array()) {
@@ -1257,7 +1257,7 @@ class MyModel extends Model {
 	 * - allowEmpty
 	 * - after/before (fieldName to validate against)
 	 * - min/max (defaults to >= 1 - at least 1 minute apart)
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2011-03-02 ms
 	 */
 	public function validateTime($data, $options = array()) {
@@ -1311,7 +1311,7 @@ class MyModel extends Model {
 	/**
 	 * model validation rule for email addresses
 	 *
-	 * @return bool Success
+	 * @return boolean Success
 	 * 2010-01-14 ms
 	 */
 	public function validateUndisposable($data, $proceed = false) {
@@ -1360,7 +1360,7 @@ class MyModel extends Model {
 	 * Is blocked email?
 	 * //TODO: move outside of MyModel?
 	 *
-	 * @return bool $ifNotBlacklisted
+	 * @return boolean $ifNotBlacklisted
 	 * 2009-12-22 ms
 	 */
 	public function validateNotBlocked($params) {
@@ -1606,7 +1606,7 @@ class MyModel extends Model {
 	 * Update a row with certain fields (dont use "Model" as super-key)
 	 * @param integer $id
 	 * @param array $data
-	 * @return bool|array Success
+	 * @return boolean|array Success
 	 * 2012-11-20 ms
 	 */
 	public function update($id, $data, $validate = false) {
@@ -1650,7 +1650,7 @@ class MyModel extends Model {
 	/**
 	 * truncate TABLE (already validated, that table exists)
 	 * @param string table [default:FALSE = current model table]
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function truncate($table = null) {
 		if (empty($table)) {

+ 1 - 1
Test/Case/Controller/Component/AutoLoginComponentTest.php

@@ -115,7 +115,7 @@ class AutoLoginTestController extends Controller {
 	/**
 	 * failed property
 	 *
-	 * @var bool false
+	 * @var boolean
 	 * @access public
 	 */
 	public $failed = false;

+ 1 - 1
Test/Case/Model/Behavior/SluggedBehaviorTest.php

@@ -33,7 +33,7 @@ class SluggedBehaviorTest extends CakeTestCase {
 	/**
 	 * skipSetupTests property
 	 *
-	 * @var bool
+	 * @var boolean
 	 */
 	public $skipSetupTests = true;
 

+ 1 - 1
Test/Case/View/Helper/FormExtHelperTest.php

@@ -200,7 +200,7 @@ class ContactExt extends CakeTestModel {
 /**
  * useTable property
  *
- * @var bool false
+ * @var boolean
  */
 	public $useTable = false;
 

+ 1 - 1
View/Helper/CommonHelper.php

@@ -458,7 +458,7 @@ class CommonHelper extends AppHelper {
 	 *
 	 * @param string $msg
 	 * @param string $class
-	 * @return bool $success
+	 * @return boolean Success
 	 * 2011-05-25 ms
 	 */
 	public function transientFlashMessage($msg, $class = null) {

+ 2 - 2
View/Helper/DatetimeHelper.php

@@ -34,7 +34,7 @@ class DatetimeHelper extends TimeHelper {
 	 * EXPERIMENTAL!!!
 	 * @param
 	 * @param
-	 * @return int offset
+	 * @return integer offset
 	 * 2009-03-19 ms
 	 */
 	public function tzOffset($gmtoffset, $is_dst) {
@@ -49,7 +49,7 @@ class DatetimeHelper extends TimeHelper {
 
 	/**
 	 * @param string date (from db)
-	 * @return int $age on success, mixed $default otherwise
+	 * @return integer $age on success, mixed $default otherwise
 	 * 2009-11-22 ms
 	 */
 	public function userAge($date = null, $default = '---') {

+ 1 - 1
View/Helper/FormExtHelper.php

@@ -900,7 +900,7 @@ jQuery(\''.$selector.'\').maxlength('.$this->Js->object($settings, array('quoteK
 	 * FormExtHelper::scripts()
 	 *
 	 * @param string $type
-	 * @return bool Success
+	 * @return boolean Success
 	 */
 	public function scripts($type) {
 		switch ($type) {

+ 4 - 4
View/Helper/GoogleMapV3Helper.php

@@ -481,7 +481,7 @@ class GoogleMapV3Helper extends AppHelper {
 	 * @param array $options
 	 * - lat and lng or address (to geocode on demand, not recommended, though)
 	 * - title, content, icon, directions, maxWidth (optional)
-	 * @return int $markerCount or false on failure
+	 * @return integer $markerCount or false on failure
 	 * @throws CakeException
 	 * 2010-12-18 ms
 	 */
@@ -648,7 +648,7 @@ function geocodeAddress(address) {
 	}
 
 	/**
-	 * @return int Current Marker counter
+	 * @return integer Current Marker counter
 	 */
 	public function addInfoContent($con) {
 		$this->infoContents[self::$MARKER_COUNT] = $this->escapeString($con);
@@ -806,7 +806,7 @@ var iconShape = {
 	/**
 	 * @param array $options
 	 * - lat, lng, content, maxWidth, pixelOffset, zIndex
-	 * @return int $windowCount
+	 * @return integer $windowCount
 	 * 2010-12-18 ms
 	 */
 	public function addInfoWindow($options=array()) {
@@ -1685,7 +1685,7 @@ function Fluster2ProjectionOverlay(map) {google.maps.OverlayView.call(this);this
 		'AS distance'
 	 * @param array pointX
 	 * @param array pointY
-	 *	@return int distance: in km
+	 *	@return integer distance: in km
 	 * DEPRECATED - use GeocodeLib::distance() instead!
 	 * 2009-03-06 ms
 	 */

+ 1 - 1
View/Helper/IcalHelper.php

@@ -35,7 +35,7 @@ class IcalHelper extends AppHelper {
 	/**
 	 * Add a new ical record.
 	 *
-	 * @return boolean $success
+	 * @return boolean Success
 	 */
 	public function add($data = array()) {
 		//TODO: validate!

+ 3 - 3
View/Helper/QrCodeHelper.php

@@ -244,7 +244,7 @@ class QrCodeHelper extends AppHelper {
 	/**
 	 * change size
 	 * result format: chs=<size>x<size>
-	 * @return boolean $success
+	 * @return boolean Success
 	 *
 	 * //TODO: automatic detection
 	 * //default is 2x size (plus margin) of typical QR version for the error correction level (L=V.2, M/Q=V.3, H=V.4)
@@ -266,7 +266,7 @@ class QrCodeHelper extends AppHelper {
 	/**
 	 * change level and margin - optional
 	 * result format: chld=<EC level>|<margin>
-	 * @return boolean $success
+	 * @return boolean Success
 	 * 2010-02-06 ms
 	 */
 	public function setLevel($level, $margin = null) {
@@ -309,7 +309,7 @@ class QrCodeHelper extends AppHelper {
 	 * ...
 	 * 4000 => 547x547 (L)
 	 * @param integer $length
-	 * @return int $size
+	 * @return integer $size
 	 * 2011-06-06 ms
 	 */
 	protected function _findSuitableSize() {