Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Various documentation and code style fixes

  • Loading branch information...
commit 450d50691fc561706e5dace69235e8a38a01877e 1 parent 75bb017
@cebe cebe authored
View
2  build/commands/api/ApiModel.php
@@ -614,7 +614,7 @@ protected function checkSource($sourceFile)
/*
* Get lines with @param, and parameter name
*/
- if(preg_match('/^\s*\*\s*@param\s[A-Za-z0-9_\|]+\s(\$\w+)\s./',$line,$matches,PREG_OFFSET_CAPTURE))
+ if(preg_match('/^\s*\*\s*@param\s[A-Za-z0-9_\|\[\]]+\s(\$\w+)\s./',$line,$matches,PREG_OFFSET_CAPTURE))
{
$docParam[]=array(
'docLine'=>$no+1,
View
2  framework/db/schema/mssql/CMssqlSqlsrvPdoAdapter.php
@@ -24,7 +24,7 @@ class CMssqlSqlsrvPdoAdapter extends PDO
* string it returns empty string. But when parameter is not specified at all it's working as expected
* and returns actual last inserted ID (like other PDO drivers).
*
- * @param string|null the sequence name. Defaults to null.
+ * @param string|null $sequence the sequence name. Defaults to null.
* @return integer last inserted ID value.
*/
public function lastInsertId($sequence=null)
View
14 framework/i18n/CChoiceFormat.php
@@ -15,16 +15,16 @@
* <pre>
* 'expr1#message1|expr2#message2|expr3#message3'
* </pre>
- * where each expression should be a valid PHP expression with 'n' as the only variable.
- * For example, 'n==1' and 'n%10==2 && n>10' are both valid expressions.
- * The variable 'n' will take the given number value, and if an expression evaluates true,
+ * where each expression should be a valid PHP expression with <code>'n'</code> as the only variable.
+ * For example, <code>'n==1'</code> and <code>'n%10==2 && n>10'</code> are both valid expressions.
+ * The variable <code>'n'</code> will take the given number value, and if an expression evaluates true,
* the corresponding message will be returned.
*
- * For example, given the candidate messages 'n==1#one|n==2#two|n>2#others' and
- * the number value 2, the resulting message will be 'two'.
+ * For example, given the candidate messages <code>'n==1#one|n==2#two|n>2#others'</code> and
+ * the number value 2, the resulting message will be <code>'two'</code>.
*
- * For expressions like 'n==1', we can also use a shortcut '1'. So the above example
- * candidate messages can be simplified as '1#one|2#two|n>2#others'.
+ * For expressions like <code>'n==1'</code>, we can also use a shortcut <code>'1'</code>. So the above example
+ * candidate messages can be simplified as <code>'1#one|2#two|n>2#others'</code>.
*
* In case the given number doesn't select any message, the last candidate message
* will be returned.
View
5 framework/utils/CFileHelper.php
@@ -270,10 +270,9 @@ public static function getMimeTypeByExtension($file,$magicFile=null)
* Shared environment safe version of mkdir. Supports recursive creation.
* For avoidance of umask side-effects chmod is used.
*
- * @static
* @param string $dst path to be created
- * @param array $options newDirMode element used, must contain access bitmask.
- * @param boolean $recursive
+ * @param array $options newDirMode element used, must contain access bitmask
+ * @param boolean $recursive whether to create directory structure recursive if parent dirs do not exist
* @return boolean result of mkdir
* @see mkdir
*/
View
12 framework/utils/CPasswordHelper.php
@@ -87,8 +87,8 @@ protected static function checkBlowfish()
* compute the hash doubles for every increment by one of $cost. So, for example, if the
* hash takes 1 second to compute when $cost is 14 then then the compute time varies as
* 2^($cost - 14) seconds.
- * @throws CException on bad password parameter or if crypt() with Blowfish hash is not available.
* @return string The password hash string, ASCII and not longer than 64 characters.
+ * @throws CException on bad password parameter or if crypt() with Blowfish hash is not available.
*/
public static function hashPassword($password,$cost=13)
{
@@ -107,7 +107,6 @@ public static function hashPassword($password,$cost=13)
*
* @param string $password The password to verify.
* @param string $hash The hash to verify the password against.
- *
* @return bool True if the password matches the hash.
* @throws CException on bad password or hash parameters or if crypt() with Blowfish hash is not available.
*/
@@ -143,9 +142,8 @@ public static function verifyPassword($password, $hash)
* @see http://codereview.stackexchange.com/questions/13512
* @see https://github.com/ircmaxell/password_compat/blob/master/lib/password.php
*
- * @param $a string First subject string to compare.
- * @param $b string Second subject string to compare.
- *
+ * @param string $a First subject string to compare.
+ * @param string $b Second subject string to compare.
* @return bool true if the strings are the same, false if they are different or if
* either is not a string.
*/
@@ -176,9 +174,9 @@ public static function same($a,$b)
* "$",
* 22 characters from the alphabet "./0-9A-Za-z".
*
- * @param $cost
- * @throws CException
+ * @param int $cost Cost parameter used by the Blowfish hash algorithm.
* @return string the random salt value.
+ * @throws CException in case of invalid cost number
*/
protected static function generateSalt($cost = 13)
{
View
17 framework/web/filters/CHttpCacheFilter.php
@@ -19,9 +19,9 @@
class CHttpCacheFilter extends CFilter
{
/**
- * Timestamp for the last modification date. Must be either a string parsable by
- * {@link http://php.net/strtotime strtotime()} or an integer representing a unix timestamp.
- * @var string|integer
+ * @var string|integer Timestamp for the last modification date.
+ * Must be either a string parsable by {@link http://php.net/strtotime strtotime()}
+ * or an integer representing a unix timestamp.
*/
public $lastModified;
/**
@@ -35,8 +35,8 @@ class CHttpCacheFilter extends CFilter
*/
public $lastModifiedExpression;
/**
- * Seed for the ETag. Can be anything that passes through {@link http://php.net/serialize serialize()}.
- * @var mixed
+ * @var mixed Seed for the ETag.
+ * Can be anything that passes through {@link http://php.net/serialize serialize()}.
*/
public $etagSeed;
/**
@@ -50,11 +50,10 @@ class CHttpCacheFilter extends CFilter
*/
public $etagSeedExpression;
/**
- * Http cache control headers. Set this to an empty string in order to keep this
+ * @var string Http cache control headers. Set this to an empty string in order to keep this
* header from being sent entirely.
- * @var string
*/
- public $cacheControl = 'max-age=3600, public';
+ public $cacheControl='max-age=3600, public';
/**
* Performs the pre-action filtering.
@@ -205,6 +204,6 @@ protected function sendCacheControlHeader()
*/
protected function generateEtag($seed)
{
- return '"'.base64_encode(sha1(serialize($seed), true)).'"';
+ return '"'.base64_encode(sha1(serialize($seed),true)).'"';
}
}
View
2  framework/web/widgets/captcha/CCaptcha.php
@@ -154,7 +154,7 @@ public function registerClientScript()
/**
* Checks if specified graphic extension support is loaded.
- * @param string extension name to be checked. Possible values are 'gd', 'imagick' and null.
+ * @param string $extension name to be checked. Possible values are 'gd', 'imagick' and null.
* Default value is null meaning that both extensions will be checked. This parameter
* is available since 1.1.13.
* @return boolean true if ImageMagick extension with PNG support or GD with FreeType support is loaded,
Please sign in to comment.
Something went wrong with that request. Please try again.