Fix CS errors.

This commit is contained in:
ADmad 2014-07-03 23:13:55 +05:30
parent 2bcd817367
commit e410501791
6 changed files with 18 additions and 14 deletions

View file

@ -564,7 +564,7 @@ class Mysql extends DboSource {
if (isset($col['after'])) {
$alter .= ' AFTER ' . $this->name($col['after']);
}
$colList[] = $alter;
$colList[] = $alter;
}
break;
}

View file

@ -1688,6 +1688,7 @@ class Model extends Object implements CakeEventListener {
*
* @param array $fieldList List of fields to allow to be saved
* @return mixed On success Model::$data if its not empty or true, false on failure
* @throws Exception
* @link http://book.cakephp.org/2.0/en/models/saving-your-data.html
*/
public function save($data = null, $validate = true, $fieldList = array()) {
@ -1702,7 +1703,7 @@ class Model extends Object implements CakeEventListener {
} else {
$options = $validate + $defaults;
}
if (!$options['atomic']) {
return $this->_doSave($data, $options);
}

View file

@ -826,7 +826,7 @@ class ModelWriteTest extends BaseModelTest {
$TestModel->create();
$result = $TestModel->save($data);
$this->assertTrue((bool)$result);
// force transaction to be rolled back in Post model
$event->stopPropagation();
return false;

View file

@ -275,8 +275,8 @@ class TestViewEventListener implements CakeEventListener {
/**
* beforeRender method
*
* @param CakeEvent $event the event being sent
*
* @param CakeEvent $event the event being sent
* @return void
*/
public function beforeRender($event) {
@ -286,7 +286,7 @@ class TestViewEventListener implements CakeEventListener {
/**
* afterRender method
*
* @param CakeEvent $event the event being sent
* @param CakeEvent $event the event being sent
* @return void
*/
public function afterRender($event) {
@ -863,7 +863,7 @@ class ViewTest extends CakeTestCase {
Cache::clear(true, 'test_view');
Cache::drop('test_view');
}
}
/**
* Test element events

View file

@ -50,12 +50,15 @@ class Hash {
$parts = explode('.', $path);
} else {
if (!is_array($path)) {
throw new InvalidArgumentException(__d('cake_dev', 'Invalid Parameter %s, should be dot separated path or array.', $path));
}
$parts = $path;
throw new InvalidArgumentException(__d('cake_dev',
'Invalid Parameter %s, should be dot separated path or array.',
$path
));
}
$parts = $path;
}
foreach ($parts as $key) {
if (is_array($data) && isset($data[$key])) {
$data =& $data[$key];

View file

@ -110,12 +110,12 @@ class Validation {
/**
* Alias of Validator::lengthBetween() for backwards compatibility.
*
* @see Validator::lengthBetween()
* @deprecated Deprecated since 2.6, use Validator::lengthBetween() instead.
* @param string $check Value to check for length
* @param integer $min Minimum value in range (inclusive)
* @param integer $max Maximum value in range (inclusive)
* @return boolean Success
* @see Validator::lengthBetween()
* @deprecated Deprecated since 2.6, use Validator::lengthBetween() instead.
*/
public static function between($check, $min, $max) {
return self::lengthBetween($check, $min, $max);