Skip to content

Commit

Permalink
some doc block corrections as well a !! to (bool) convertion
Browse files Browse the repository at this point in the history
remove nonsense default value
  • Loading branch information
euromark committed Nov 22, 2012
1 parent 5870d71 commit 18fb132
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Folder.php
Expand Up @@ -634,7 +634,7 @@ public function delete($path = null) {
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#Folder::copy
*/
public function copy($options = array()) {
public function copy($options) {
if (!$this->pwd()) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Utility/Set.php
Expand Up @@ -203,7 +203,7 @@ public static function numeric($array = null) {
*
* $list defaults to 0 = no 1 = yes if param is not passed
*
* @param array $select Key in $list to return
* @param string $select Key in $list to return
* @param array|string $list can be an array or a comma-separated list.
* @return string the value of the array key or null if no match
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/set.html#Set::enum
Expand Down Expand Up @@ -467,7 +467,7 @@ public static function matches($conditions, $data = array(), $i = null, $length
return true;
}
if (is_string($conditions)) {
return !!Set::extract($conditions, $data);
return (bool)Set::extract($conditions, $data);
}
foreach ($conditions as $condition) {
if ($condition === ':last') {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Utility/Validation.php
Expand Up @@ -321,7 +321,7 @@ public static function date($check, $format = 'ymd', $regex = null) {
* Validates a datetime value
* All values matching the "date" core validation rule, and the "time" one will be valid
*
* @param array $check Value to check
* @param string $check Value to check
* @param string|array $dateFormat Format of the date part
* Use a string or an array of the keys below. Arrays should be passed as array('dmy', 'mdy', etc)
* ## Keys:
Expand Down Expand Up @@ -381,7 +381,7 @@ public static function boolean($check) {
* - true => Any number of decimal places greater than 0, or a float|double. The '.' is required.
* - 1..N => Exactly that many number of decimal places. The '.' is required.
*
* @param integer $check The value the test for decimal
* @param float $check The value the test for decimal
* @param integer $places
* @param string $regex If a custom regular expression is used, this is the only validation that will occur.
* @return boolean Success
Expand Down

0 comments on commit 18fb132

Please sign in to comment.