Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

hooks fixes for lithium/util

  • Loading branch information...
commit a15ea2ac56516a9bc3cffb024e95843fb2b418ec 1 parent e0cb56a
@alkemann alkemann authored
View
11 libraries/lithium/util/Set.php
@@ -46,8 +46,8 @@ public static function check($data, $path = null) {
* Counts the dimensions of an array. If `$all` is set to `false` (which is the default) it will
* only consider the dimension of the first element in the array.
*
- * @param array $array Array to count dimensions on.
- * @param boolean $all true counts the dimension considering all elements in array.
+ * @param array $data Array to count dimensions on.
+ * @param array $options
* @param integer $count Start the depth count at this number.
* @return integer The number of dimensions in `$array`.
*/
@@ -222,8 +222,9 @@ public static function isNumeric($array = null) {
* match certain conditions.
*
* @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 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) {
@@ -409,6 +410,7 @@ public static function pushDiff($array, $array2) {
/**
* Implements partial support for XPath 2.0.
*
+ * @param array $data An array of data to extract from.
* @param string $path An absolute XPath 2.0 path. Only absolute paths starting with a
* single slash are supported right now. Implemented selectors:
* - `'/User/id'`: Similar to the classic {n}.User.id.
@@ -424,8 +426,7 @@ public static function pushDiff($array, $array2) {
* - `'/Comment[text=/lithium/i]`': Selects the all comments that have
* a text matching the regex `/lithium/i`.
* - `'/Comment/@*'`: Selects all key names of all comments.
- * @param string $path An array of data to extract from.
- * @param string $options Currently only supports `'flatten'` which can be
+ * @param array $options Currently only supports `'flatten'` which can be
* disabled for higher XPath-ness.
* @return array An array of matched items.
*/
View
6 libraries/lithium/util/Validator.php
@@ -165,7 +165,7 @@ public static function __init() {
$precision = '+(?:[eE][-+]?[0-9]+)?';
$precision = $options['precision'] ? '{' . $options['precision'] . '}' : $precision;
- return (bool)preg_match("/^[-+]?[0-9]*\\.{1}[0-9]{$precision}$/", (string)$value);
+ return (boolean)preg_match("/^[-+]?[0-9]*\\.{1}[0-9]{$precision}$/", (string)$value);
},
'inList' => function($value, $format, $options) {
$options += array('list' => array());
@@ -439,7 +439,7 @@ public static function rule($rule, $value, $format = 'any', $options = array())
$all = true;
}
if (static::_checkFormats($ruleCheck, $formats, $value, $all, $options)) {
- return (bool)static::_filters('after', $rule, compact('value', 'format', 'options'));
+ return (boolean)static::_filters('after', $rule, compact('value', 'format', 'options'));
}
return false;
}
@@ -737,7 +737,7 @@ public static function hasMaxLength($value, $max) {
* Checks that a value is a monetary amount.
*
* @param string $value Value to check
- * @param string $symbolPosition Where symbol is located (left/right)
+ * @param string $format Where symbol is located (left/right)
* @return boolean Success
*/
public static function isMoney($value, $format = 'left') {
View
6 libraries/lithium/util/audit/Logger.php
@@ -25,9 +25,9 @@ class Logger extends \lithium\core\Adaptable {
* Writes $message to the log specified by the $name
* configuration.
*
- * @param string $name Configuration to be used for writing
- * @param string $message Message to be written
- * @return boolean True on successful write, false otherwise
+ * @param string $type Configuration to be used for writing
+ * @param string $message Message to be written
+ * @return boolean True on successful write, false otherwise
*/
public static function write($type, $message) {
$settings = static::config();
View
1  libraries/lithium/util/audit/logger/adapter/Cache.php
@@ -16,6 +16,7 @@ class Cache extends \lithium\core\Object {
/**
* Class constructor
*
+ * @param array $config
* @return void
*/
public function __construct($config = array()) {
View
1  libraries/lithium/util/audit/logger/adapter/File.php
@@ -16,6 +16,7 @@ class File extends \lithium\core\Object {
/**
* Class constructor
*
+ * @param array $config
* @return void
*/
public function __construct($config = array()) {
View
1  libraries/lithium/util/audit/logger/adapter/Syslog.php
@@ -24,6 +24,7 @@ class Syslog extends \lithium\core\Object {
/**
* Class constructor
*
+ * @param array $config
* @return void
*/
public function __construct($config = array()) {
View
1  libraries/lithium/util/audit/logger/adapters/Cache.php
@@ -16,6 +16,7 @@ class Cache extends \lithium\core\Object {
/**
* Class constructor
*
+ * @param array $config
* @return void
*/
public function __construct($config = array()) {
View
1  libraries/lithium/util/audit/logger/adapters/Syslog.php
@@ -24,6 +24,7 @@ class Syslog extends \lithium\core\Object {
/**
* Class constructor
*
+ * @param array $config
* @return void
*/
public function __construct($config = array()) {
View
3  libraries/lithium/util/socket/Context.php
@@ -49,7 +49,8 @@ public function encoding($encoding = null) {
/**
* Send request and return response data
*
- * @param string path
+ * @param string $message
+ * @param array $options
* @return string
*/
public function send($message, $options = array()) {
View
9 libraries/lithium/util/socket/Curl.php
@@ -111,6 +111,7 @@ public function read() {
* Reads data from the curl connection.
* The `read` method will utilize the curl options that have been set.
*
+ * @pararm array $data
* @return mixed Boolean false if the resource handle is unavailable, and the result
* of `curl_exec` otherwise.
* @see http://php.net/manual/en/function.curl-exec.php
@@ -144,6 +145,8 @@ public function timeout($time) {
/**
* encoding() is currently unimplemented for this socket adapter
*
+ * @todo implement Curl::encoding($charset)
+ * @param string $charset
*/
public function encoding($charset) {
}
@@ -164,12 +167,12 @@ public function set($flags, $value = null) {
}
$this->options += $flags;
}
-
+
/**
* Aggregates read and write methods into a coherent request response
*
- * @param mixed $request array or object like `\lithium\http\Request`
- * @params array $options
+ * @param mixed $message array or object like `\lithium\http\Request`
+ * @param array $options
* - path: path for the current request
* - classes: array of classes to use
* - response: a class to use for the response
View
6 libraries/lithium/util/socket/Stream.php
@@ -108,7 +108,7 @@ public function read($length = null, $offset = null) {
* @param string $data The string to be written.
* @return mixed False on error, number of bytes written otherwise.
*/
- public function write($data) {
+ public function write($data) {
if (!is_resource($this->_resource)) {
return false;
}
@@ -148,8 +148,8 @@ public function encoding($charset) {
/**
* Aggregates read and write methods into a coherent request response
*
- * @param mixed $request array or object like `\lithium\http\Request`
- * @params array $options
+ * @param mixed $message array or object like `\lithium\http\Request`
+ * @param array $options
* - path: path for the current request
* - classes: array of classes to use
* - response: a class to use for the response
Please sign in to comment.
Something went wrong with that request. Please try again.