fix doc block endings

This commit is contained in:
euromark 2013-01-11 15:06:54 +01:00
parent 92d9b11aee
commit 11a88042bd
36 changed files with 82 additions and 82 deletions

View file

@ -32,7 +32,7 @@ abstract class CacheEngine {
* prefixes to be prepeded to every key in this cache engine * prefixes to be prepeded to every key in this cache engine
* *
* @var string * @var string
**/ */
protected $_groupPrefix = null; protected $_groupPrefix = null;
/** /**

View file

@ -30,7 +30,7 @@ class ApcEngine extends CacheEngine {
* (prefixed witht the global configuration prefix) * (prefixed witht the global configuration prefix)
* *
* @var array * @var array
**/ */
protected $_compiledGroupNames = array(); protected $_compiledGroupNames = array();
/** /**
@ -144,7 +144,7 @@ class ApcEngine extends CacheEngine {
* the group accordingly. * the group accordingly.
* *
* @return array * @return array
**/ */
public function groups() { public function groups() {
if (empty($this->_compiledGroupNames)) { if (empty($this->_compiledGroupNames)) {
foreach ($this->settings['groups'] as $group) { foreach ($this->settings['groups'] as $group) {
@ -176,7 +176,7 @@ class ApcEngine extends CacheEngine {
* old values will remain in storage until they expire. * old values will remain in storage until they expire.
* *
* @return boolean success * @return boolean success
**/ */
public function clearGroup($group) { public function clearGroup($group) {
apc_inc($this->settings['prefix'] . $group, 1, $success); apc_inc($this->settings['prefix'] . $group, 1, $success);
return $success; return $success;

View file

@ -358,7 +358,7 @@ class FileEngine extends CacheEngine {
* Recursively deletes all files under any directory named as $group * Recursively deletes all files under any directory named as $group
* *
* @return boolean success * @return boolean success
**/ */
public function clearGroup($group) { public function clearGroup($group) {
$directoryIterator = new RecursiveDirectoryIterator($this->settings['path']); $directoryIterator = new RecursiveDirectoryIterator($this->settings['path']);
$contents = new RecursiveIteratorIterator($directoryIterator, RecursiveIteratorIterator::CHILD_FIRST); $contents = new RecursiveIteratorIterator($directoryIterator, RecursiveIteratorIterator::CHILD_FIRST);

View file

@ -32,7 +32,7 @@ class MemcacheEngine extends CacheEngine {
* (prefixed witht the global configuration prefix) * (prefixed witht the global configuration prefix)
* *
* @var array * @var array
**/ */
protected $_compiledGroupNames = array(); protected $_compiledGroupNames = array();
/** /**
@ -251,7 +251,7 @@ class MemcacheEngine extends CacheEngine {
* the group accordingly. * the group accordingly.
* *
* @return array * @return array
**/ */
public function groups() { public function groups() {
if (empty($this->_compiledGroupNames)) { if (empty($this->_compiledGroupNames)) {
foreach ($this->settings['groups'] as $group) { foreach ($this->settings['groups'] as $group) {
@ -284,7 +284,7 @@ class MemcacheEngine extends CacheEngine {
* old values will remain in storage until they expire. * old values will remain in storage until they expire.
* *
* @return boolean success * @return boolean success
**/ */
public function clearGroup($group) { public function clearGroup($group) {
return (bool)$this->_Memcache->increment($this->settings['prefix'] . $group); return (bool)$this->_Memcache->increment($this->settings['prefix'] . $group);
} }

View file

@ -186,7 +186,7 @@ class RedisEngine extends CacheEngine {
* the group accordingly. * the group accordingly.
* *
* @return array * @return array
**/ */
public function groups() { public function groups() {
$result = array(); $result = array();
foreach ($this->settings['groups'] as $group) { foreach ($this->settings['groups'] as $group) {
@ -205,7 +205,7 @@ class RedisEngine extends CacheEngine {
* old values will remain in storage until they expire. * old values will remain in storage until they expire.
* *
* @return boolean success * @return boolean success
**/ */
public function clearGroup($group) { public function clearGroup($group) {
return (bool)$this->_Redis->incr($this->settings['prefix'] . $group); return (bool)$this->_Redis->incr($this->settings['prefix'] . $group);
} }
@ -214,7 +214,7 @@ class RedisEngine extends CacheEngine {
* Disconnects from the redis server * Disconnects from the redis server
* *
* @return void * @return void
**/ */
public function __destruct() { public function __destruct() {
if (!$this->settings['persistent']) { if (!$this->settings['persistent']) {
$this->_Redis->close(); $this->_Redis->close();

View file

@ -31,7 +31,7 @@ class WincacheEngine extends CacheEngine {
* (prefixed witht the global configuration prefix) * (prefixed witht the global configuration prefix)
* *
* @var array * @var array
**/ */
protected $_compiledGroupNames = array(); protected $_compiledGroupNames = array();
/** /**
@ -149,7 +149,7 @@ class WincacheEngine extends CacheEngine {
* the group accordingly. * the group accordingly.
* *
* @return array * @return array
**/ */
public function groups() { public function groups() {
if (empty($this->_compiledGroupNames)) { if (empty($this->_compiledGroupNames)) {
foreach ($this->settings['groups'] as $group) { foreach ($this->settings['groups'] as $group) {
@ -181,7 +181,7 @@ class WincacheEngine extends CacheEngine {
* old values will remain in storage until they expire. * old values will remain in storage until they expire.
* *
* @return boolean success * @return boolean success
**/ */
public function clearGroup($group) { public function clearGroup($group) {
$success = null; $success = null;
wincache_ucache_inc($this->settings['prefix'] . $group, 1, $success); wincache_ucache_inc($this->settings['prefix'] . $group, 1, $success);

View file

@ -146,7 +146,7 @@ class XcacheEngine extends CacheEngine {
* the group accordingly. * the group accordingly.
* *
* @return array * @return array
**/ */
public function groups() { public function groups() {
$result = array(); $result = array();
foreach ($this->settings['groups'] as $group) { foreach ($this->settings['groups'] as $group) {
@ -165,7 +165,7 @@ class XcacheEngine extends CacheEngine {
* old values will remain in storage until they expire. * old values will remain in storage until they expire.
* *
* @return boolean success * @return boolean success
**/ */
public function clearGroup($group) { public function clearGroup($group) {
return (bool)xcache_inc($this->settings['prefix'] . $group, 1); return (bool)xcache_inc($this->settings['prefix'] . $group, 1);
} }

View file

@ -826,7 +826,7 @@ class Shell extends Object {
* *
* @param boolean $enable wheter to enable CakeLog output or not * @param boolean $enable wheter to enable CakeLog output or not
* @return void * @return void
**/ */
protected function _useLogger($enable = true) { protected function _useLogger($enable = true) {
if (!$enable) { if (!$enable) {
CakeLog::drop('stdout'); CakeLog::drop('stdout');

View file

@ -268,7 +268,7 @@ class RequestHandlerComponent extends Component {
* *
* @params Controller $controller * @params Controller $controller
* @return boolean false if the render process should be aborted * @return boolean false if the render process should be aborted
**/ */
public function beforeRender(Controller $controller) { public function beforeRender(Controller $controller) {
if ($this->settings['checkHttpCache'] && $this->response->checkNotModified($this->request)) { if ($this->settings['checkHttpCache'] && $this->response->checkNotModified($this->request)) {
return false; return false;

View file

@ -466,7 +466,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $field name of the field to check * @param string $field name of the field to check
* @return boolean * @return boolean
**/ */
public function offsetExists($field) { public function offsetExists($field) {
$this->_parseRules(); $this->_parseRules();
return isset($this->_fields[$field]); return isset($this->_fields[$field]);
@ -477,7 +477,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $field name of the field to check * @param string $field name of the field to check
* @return CakeValidationSet * @return CakeValidationSet
**/ */
public function offsetGet($field) { public function offsetGet($field) {
$this->_parseRules(); $this->_parseRules();
return $this->_fields[$field]; return $this->_fields[$field];
@ -489,7 +489,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* @param string $field name of the field to set * @param string $field name of the field to set
* @param array|CakeValidationSet $rules set of rules to apply to field * @param array|CakeValidationSet $rules set of rules to apply to field
* @return void * @return void
**/ */
public function offsetSet($field, $rules) { public function offsetSet($field, $rules) {
$this->_parseRules(); $this->_parseRules();
if (!$rules instanceof CakeValidationSet) { if (!$rules instanceof CakeValidationSet) {
@ -505,7 +505,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $field name of the field to unset * @param string $field name of the field to unset
* @return void * @return void
**/ */
public function offsetUnset($field) { public function offsetUnset($field) {
$this->_parseRules(); $this->_parseRules();
unset($this->_fields[$field]); unset($this->_fields[$field]);
@ -515,7 +515,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* Returns an iterator for each of the fields to be validated * Returns an iterator for each of the fields to be validated
* *
* @return ArrayIterator * @return ArrayIterator
**/ */
public function getIterator() { public function getIterator() {
$this->_parseRules(); $this->_parseRules();
return new ArrayIterator($this->_fields); return new ArrayIterator($this->_fields);
@ -525,7 +525,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* Returns the number of fields having validation rules * Returns the number of fields having validation rules
* *
* @return int * @return int
**/ */
public function count() { public function count() {
$this->_parseRules(); $this->_parseRules();
return count($this->_fields); return count($this->_fields);
@ -553,7 +553,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* @param string|array|CakeValidationSet $name name of the rule to be added or list of rules for the field * @param string|array|CakeValidationSet $name name of the rule to be added or list of rules for the field
* @param array|CakeValidationRule $rule or list of rules to be added to the field's rule set * @param array|CakeValidationRule $rule or list of rules to be added to the field's rule set
* @return ModelValidator this instance * @return ModelValidator this instance
**/ */
public function add($field, $name, $rule = null) { public function add($field, $name, $rule = null) {
$this->_parseRules(); $this->_parseRules();
if ($name instanceof CakeValidationSet) { if ($name instanceof CakeValidationSet) {
@ -592,7 +592,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* @param string $field The name of the field from wich the rule will be removed * @param string $field The name of the field from wich the rule will be removed
* @param string $rule the name of the rule to be removed * @param string $rule the name of the rule to be removed
* @return ModelValidator this instance * @return ModelValidator this instance
**/ */
public function remove($field, $rule = null) { public function remove($field, $rule = null) {
$this->_parseRules(); $this->_parseRules();
if ($rule === null) { if ($rule === null) {

View file

@ -41,14 +41,14 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* List of methods available for validation * List of methods available for validation
* *
* @var array * @var array
**/ */
protected $_methods = array(); protected $_methods = array();
/** /**
* I18n domain for validation messages. * I18n domain for validation messages.
* *
* @var string * @var string
**/ */
protected $_validationDomain = null; protected $_validationDomain = null;
/** /**
@ -96,7 +96,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param array $methods Methods list * @param array $methods Methods list
* @return void * @return void
**/ */
public function setMethods(&$methods) { public function setMethods(&$methods) {
$this->_methods =& $methods; $this->_methods =& $methods;
} }
@ -151,7 +151,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* Resets interal state for all validation rules in this set * Resets interal state for all validation rules in this set
* *
* @return void * @return void
**/ */
public function reset() { public function reset() {
foreach ($this->getRules() as $rule) { foreach ($this->getRules() as $rule) {
$rule->reset(); $rule->reset();
@ -310,7 +310,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $index name of the rule * @param string $index name of the rule
* @return boolean * @return boolean
**/ */
public function offsetExists($index) { public function offsetExists($index) {
return isset($this->_rules[$index]); return isset($this->_rules[$index]);
} }
@ -320,7 +320,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $index name of the rule * @param string $index name of the rule
* @return CakeValidationRule * @return CakeValidationRule
**/ */
public function offsetGet($index) { public function offsetGet($index) {
return $this->_rules[$index]; return $this->_rules[$index];
} }
@ -330,7 +330,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $index name of the rule * @param string $index name of the rule
* @param CakeValidationRule|array rule to add to $index * @param CakeValidationRule|array rule to add to $index
**/ */
public function offsetSet($index, $rule) { public function offsetSet($index, $rule) {
$this->setRule($index, $rule); $this->setRule($index, $rule);
} }
@ -340,7 +340,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* *
* @param string $index name of the rule * @param string $index name of the rule
* @return void * @return void
**/ */
public function offsetUnset($index) { public function offsetUnset($index) {
unset($this->_rules[$index]); unset($this->_rules[$index]);
} }
@ -349,7 +349,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* Returns an iterator for each of the rules to be applied * Returns an iterator for each of the rules to be applied
* *
* @return ArrayIterator * @return ArrayIterator
**/ */
public function getIterator() { public function getIterator() {
return new ArrayIterator($this->_rules); return new ArrayIterator($this->_rules);
} }
@ -358,7 +358,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* Returns the number of rules in this set * Returns the number of rules in this set
* *
* @return int * @return int
**/ */
public function count() { public function count() {
return count($this->_rules); return count($this->_rules);
} }

View file

@ -941,7 +941,7 @@ class CakeResponse {
* conflicting headers * conflicting headers
* *
* @return void * @return void
**/ */
public function notModified() { public function notModified() {
$this->statusCode(304); $this->statusCode(304);
$this->body(''); $this->body('');
@ -968,7 +968,7 @@ class CakeResponse {
* @param string|array $cacheVariances a single Vary string or a array * @param string|array $cacheVariances a single Vary string or a array
* containig the list for variances. * containig the list for variances.
* @return array * @return array
**/ */
public function vary($cacheVariances = null) { public function vary($cacheVariances = null) {
if ($cacheVariances !== null) { if ($cacheVariances !== null) {
$cacheVariances = (array)$cacheVariances; $cacheVariances = (array)$cacheVariances;
@ -1000,7 +1000,7 @@ class CakeResponse {
* @param boolean $weak whether the response is semantically the same as * @param boolean $weak whether the response is semantically the same as
* other with th same hash or not * other with th same hash or not
* @return string * @return string
**/ */
public function etag($tag = null, $weak = false) { public function etag($tag = null, $weak = false) {
if ($tag !== null) { if ($tag !== null) {
$this->_headers['Etag'] = sprintf('%s"%s"', ($weak) ? 'W/' : null, $tag); $this->_headers['Etag'] = sprintf('%s"%s"', ($weak) ? 'W/' : null, $tag);

View file

@ -31,7 +31,7 @@ abstract class DispatcherFilter implements CakeEventListener {
* Default priority for all methods in this filter * Default priority for all methods in this filter
* *
* @var int * @var int
**/ */
public $priority = 10; public $priority = 10;
/** /**
@ -42,7 +42,7 @@ abstract class DispatcherFilter implements CakeEventListener {
* Override this method at will to only listen to the events you are interested in. * Override this method at will to only listen to the events you are interested in.
* *
* @return array * @return array
**/ */
public function implementedEvents() { public function implementedEvents() {
return array( return array(
'Dispatcher.beforeDispatch' => array('callable' => 'beforeDispatch', 'priority' => $this->priority), 'Dispatcher.beforeDispatch' => array('callable' => 'beforeDispatch', 'priority' => $this->priority),
@ -65,7 +65,7 @@ abstract class DispatcherFilter implements CakeEventListener {
* @param CakeEvent $event container object having the `request`, `response` and `additionalParams` * @param CakeEvent $event container object having the `request`, `response` and `additionalParams`
* keys in the data property. * keys in the data property.
* @return CakeResponse|boolean * @return CakeResponse|boolean
**/ */
public function beforeDispatch(CakeEvent $event) { public function beforeDispatch(CakeEvent $event) {
} }
@ -80,7 +80,7 @@ abstract class DispatcherFilter implements CakeEventListener {
* @param CakeEvent $event container object having the `request` and `response` * @param CakeEvent $event container object having the `request` and `response`
* keys in the data property. * keys in the data property.
* @return mixed boolean to stop the event dispatching or null to continue * @return mixed boolean to stop the event dispatching or null to continue
**/ */
public function afterDispatch(CakeEvent $event) { public function afterDispatch(CakeEvent $event) {
} }
} }

View file

@ -31,7 +31,7 @@ class AssetDispatcher extends DispatcherFilter {
* This filter should run before the request gets parsed by router * This filter should run before the request gets parsed by router
* *
* @var int * @var int
**/ */
public $priority = 9; public $priority = 9;
/** /**

View file

@ -253,7 +253,7 @@ class ApcEngineTest extends CakeTestCase {
* Test clearing a cache group * Test clearing a cache group
* *
* @return void * @return void
**/ */
public function testGroupClear() { public function testGroupClear() {
Cache::config('apc_groups', array( Cache::config('apc_groups', array(
'engine' => 'Apc', 'engine' => 'Apc',

View file

@ -428,7 +428,7 @@ class FileEngineTest extends CakeTestCase {
* Test clearing a cache group * Test clearing a cache group
* *
* @return void * @return void
**/ */
public function testGroupClear() { public function testGroupClear() {
Cache::config('file_groups', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_a', 'group_b'))); Cache::config('file_groups', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_a', 'group_b')));
Cache::config('file_groups2', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_b'))); Cache::config('file_groups2', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_b')));

View file

@ -459,7 +459,7 @@ class MemcacheEngineTest extends CakeTestCase {
* Test clearing a cache group * Test clearing a cache group
* *
* @return void * @return void
**/ */
public function testGroupClear() { public function testGroupClear() {
Cache::config('memcache_groups', array( Cache::config('memcache_groups', array(
'engine' => 'Memcache', 'engine' => 'Memcache',

View file

@ -316,7 +316,7 @@ class RegisEngineTest extends CakeTestCase {
* Test clearing a cache group * Test clearing a cache group
* *
* @return void * @return void
**/ */
public function testGroupClear() { public function testGroupClear() {
Cache::config('redis_groups', array( Cache::config('redis_groups', array(
'engine' => 'Redis', 'engine' => 'Redis',

View file

@ -243,7 +243,7 @@ class WincacheEngineTest extends CakeTestCase {
* Test clearing a cache group * Test clearing a cache group
* *
* @return void * @return void
**/ */
public function testGroupClear() { public function testGroupClear() {
Cache::config('wincache_groups', array( Cache::config('wincache_groups', array(
'engine' => 'Wincache', 'engine' => 'Wincache',

View file

@ -252,7 +252,7 @@ class XcacheEngineTest extends CakeTestCase {
* Test clearing a cache group * Test clearing a cache group
* *
* @return void * @return void
**/ */
public function testGroupClear() { public function testGroupClear() {
Cache::config('xcache_groups', array( Cache::config('xcache_groups', array(
'engine' => 'Xcache', 'engine' => 'Xcache',

View file

@ -848,7 +848,7 @@ TEXT;
* Tests that _useLogger works properly * Tests that _useLogger works properly
* *
* @return void * @return void
**/ */
public function testProtectedUseLogger() { public function testProtectedUseLogger() {
CakeLog::drop('stdout'); CakeLog::drop('stdout');
CakeLog::drop('stderr'); CakeLog::drop('stderr');

View file

@ -863,7 +863,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagStar() { public function testCheckNotModifiedByEtagStar() {
$_SERVER['HTTP_IF_NONE_MATCH'] = '*'; $_SERVER['HTTP_IF_NONE_MATCH'] = '*';
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); $RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
@ -877,7 +877,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagExact() { public function testCheckNotModifiedByEtagExact() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); $RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
@ -891,7 +891,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagAndTime() { public function testCheckNotModifiedByEtagAndTime() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00'; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
@ -907,7 +907,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedNoInfo() { public function testCheckNotModifiedNoInfo() {
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); $RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
$RequestHandler->response = $this->getMock('CakeResponse', array('notModified')); $RequestHandler->response = $this->getMock('CakeResponse', array('notModified'));

View file

@ -164,7 +164,7 @@ class CakeLogTest extends CakeTestCase {
* explicit tests for drop() * explicit tests for drop()
* *
* @return void * @return void
**/ */
public function testDrop() { public function testDrop() {
CakeLog::config('file', array( CakeLog::config('file', array(
'engine' => 'FileLog', 'engine' => 'FileLog',

View file

@ -950,7 +950,7 @@ class DboSourceTest extends CakeTestCase {
* Tests that transaction commands are logged * Tests that transaction commands are logged
* *
* @return void * @return void
**/ */
public function testTransactionLogging() { public function testTransactionLogging() {
$conn = $this->getMock('MockPDO'); $conn = $this->getMock('MockPDO');
$db = new DboTestSource; $db = new DboTestSource;

View file

@ -2438,7 +2438,7 @@ class ModelIntegrationTest extends BaseModelTest {
* does not trigger any calls on any datasource * does not trigger any calls on any datasource
* *
* @return void * @return void
**/ */
public function testSchemaNoDB() { public function testSchemaNoDB() {
$model = $this->getMock('Article', array('getDataSource')); $model = $this->getMock('Article', array('getDataSource'));
$model->useTable = false; $model->useTable = false;

View file

@ -2177,7 +2177,7 @@ class ModelValidationTest extends BaseModelTest {
* after a presentation made to show off this new feature * after a presentation made to show off this new feature
* *
* @return void * @return void
**/ */
public function testDynamicValidationRuleBuilding() { public function testDynamicValidationRuleBuilding() {
$model = new Article; $model = new Article;
$validator = $model->validator(); $validator = $model->validator();

View file

@ -30,7 +30,7 @@ class CakeValidationRuleTest extends CakeTestCase {
* Auxiliary method to test custom validators * Auxiliary method to test custom validators
* *
* @return boolean * @return boolean
**/ */
public function myTestRule() { public function myTestRule() {
return false; return false;
} }
@ -39,7 +39,7 @@ class CakeValidationRuleTest extends CakeTestCase {
* Auxiliary method to test custom validators * Auxiliary method to test custom validators
* *
* @return boolean * @return boolean
**/ */
public function myTestRule2() { public function myTestRule2() {
return true; return true;
} }
@ -48,7 +48,7 @@ class CakeValidationRuleTest extends CakeTestCase {
* Auxiliary method to test custom validators * Auxiliary method to test custom validators
* *
* @return string * @return string
**/ */
public function myTestRule3() { public function myTestRule3() {
return 'string'; return 'string';
} }

View file

@ -4976,7 +4976,7 @@ class CustomArticle extends AppModel {
* Alters title data * Alters title data
* *
* @return void * @return void
**/ */
public function beforeValidate($options = array()) { public function beforeValidate($options = array()) {
$this->data[$this->alias]['title'] = 'foo'; $this->data[$this->alias]['title'] = 'foo';
if ($this->findMethods['unPublished'] === true) { if ($this->findMethods['unPublished'] === true) {

View file

@ -848,7 +848,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagStar() { public function testCheckNotModifiedByEtagStar() {
$_SERVER['HTTP_IF_NONE_MATCH'] = '*'; $_SERVER['HTTP_IF_NONE_MATCH'] = '*';
$response = $this->getMock('CakeResponse', array('notModified')); $response = $this->getMock('CakeResponse', array('notModified'));
@ -861,7 +861,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagExact() { public function testCheckNotModifiedByEtagExact() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
$response = $this->getMock('CakeResponse', array('notModified')); $response = $this->getMock('CakeResponse', array('notModified'));
@ -874,7 +874,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagAndTime() { public function testCheckNotModifiedByEtagAndTime() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00'; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
@ -889,7 +889,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagAndTimeMismatch() { public function testCheckNotModifiedByEtagAndTimeMismatch() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00'; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
@ -904,7 +904,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByEtagMismatch() { public function testCheckNotModifiedByEtagMismatch() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something-else", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something-else", "other"';
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00'; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
@ -919,7 +919,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedByTime() { public function testCheckNotModifiedByTime() {
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00'; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
$response = $this->getMock('CakeResponse', array('notModified')); $response = $this->getMock('CakeResponse', array('notModified'));
@ -932,7 +932,7 @@ class CakeResponseTest extends CakeTestCase {
* Test checkNotModified method * Test checkNotModified method
* *
* @return void * @return void
**/ */
public function testCheckNotModifiedNoHints() { public function testCheckNotModifiedNoHints() {
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"'; $_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00'; $_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';

View file

@ -24,7 +24,7 @@ App::uses('Router', 'Routing');
* Test case for CakeRoute * Test case for CakeRoute
* *
* @package Cake.Test.Case.Routing.Route * @package Cake.Test.Case.Routing.Route
**/ */
class CakeRouteTest extends CakeTestCase { class CakeRouteTest extends CakeTestCase {
/** /**
@ -41,7 +41,7 @@ class CakeRouteTest extends CakeTestCase {
* Test the construction of a CakeRoute * Test the construction of a CakeRoute
* *
* @return void * @return void
**/ */
public function testConstruction() { public function testConstruction() {
$route = new CakeRoute('/:controller/:action/:id', array(), array('id' => '[0-9]+')); $route = new CakeRoute('/:controller/:action/:id', array(), array('id' => '[0-9]+'));
@ -55,7 +55,7 @@ class CakeRouteTest extends CakeTestCase {
* test Route compiling. * test Route compiling.
* *
* @return void * @return void
**/ */
public function testBasicRouteCompiling() { public function testBasicRouteCompiling() {
$route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home')); $route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home'));
$result = $route->compile(); $result = $route->compile();
@ -107,7 +107,7 @@ class CakeRouteTest extends CakeTestCase {
* test compiling routes with keys that have patterns * test compiling routes with keys that have patterns
* *
* @return void * @return void
**/ */
public function testRouteCompilingWithParamPatterns() { public function testRouteCompilingWithParamPatterns() {
$route = new CakeRoute( $route = new CakeRoute(
'/:controller/:action/:id', '/:controller/:action/:id',
@ -235,7 +235,7 @@ class CakeRouteTest extends CakeTestCase {
* test that routes match their pattern. * test that routes match their pattern.
* *
* @return void * @return void
**/ */
public function testMatchBasic() { public function testMatchBasic() {
$route = new CakeRoute('/:controller/:action/:id', array('plugin' => null)); $route = new CakeRoute('/:controller/:action/:id', array('plugin' => null));
$result = $route->match(array('controller' => 'posts', 'action' => 'view', 'plugin' => null)); $result = $route->match(array('controller' => 'posts', 'action' => 'view', 'plugin' => null));

View file

@ -535,7 +535,7 @@ class RouterTest extends CakeTestCase {
* Test generation of routes with query string parameters. * Test generation of routes with query string parameters.
* *
* @return void * @return void
**/ */
public function testUrlGenerationWithQueryStrings() { public function testUrlGenerationWithQueryStrings() {
$result = Router::url(array('controller' => 'posts', 'action' => 'index', '0', '?' => 'var=test&var2=test2')); $result = Router::url(array('controller' => 'posts', 'action' => 'index', '0', '?' => 'var=test&var2=test2'));
$expected = '/posts/index/0?var=test&var2=test2'; $expected = '/posts/index/0?var=test&var2=test2';
@ -559,7 +559,7 @@ class RouterTest extends CakeTestCase {
* test that regex validation of keyed route params is working. * test that regex validation of keyed route params is working.
* *
* @return void * @return void
**/ */
public function testUrlGenerationWithRegexQualifiedParams() { public function testUrlGenerationWithRegexQualifiedParams() {
Router::connect( Router::connect(
':language/galleries', ':language/galleries',

View file

@ -1055,7 +1055,7 @@ class CakeTimeTest extends CakeTestCase {
* from one timezone to the other correctly * from one timezone to the other correctly
* *
* @return void * @return void
**/ */
public function testCorrectTimezoneConversion() { public function testCorrectTimezoneConversion() {
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');
$date = '2012-01-01 10:00:00'; $date = '2012-01-01 10:00:00';

View file

@ -2171,7 +2171,7 @@ class ValidationTest extends CakeTestCase {
* *
* @expectedException PHPUnit_Framework_Error * @expectedException PHPUnit_Framework_Error
* @return void * @return void
**/ */
public function testPassThroughClassFailure() { public function testPassThroughClassFailure() {
Validation::postal('text', null, 'AUTOFAIL'); Validation::postal('text', null, 'AUTOFAIL');
} }

View file

@ -517,7 +517,7 @@ class CacheHelperTest extends CakeTestCase {
* apps url would look something like http://localhost/cache/cacheTest/cache_name * apps url would look something like http://localhost/cache/cacheTest/cache_name
* *
* @return void * @return void
**/ */
public function testCacheBaseNameControllerName() { public function testCacheBaseNameControllerName() {
$this->Controller->cache_parsing(); $this->Controller->cache_parsing();
$this->Controller->cacheAction = array( $this->Controller->cacheAction = array(

View file

@ -3314,7 +3314,7 @@ class FormHelperTest extends CakeTestCase {
); );
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
/** Testing error messages list options **/ // Testing error messages list options
$Contact->validationErrors['field'] = array('notEmpty', 'email'); $Contact->validationErrors['field'] = array('notEmpty', 'email');
$result = $this->Form->error('Contact.field', null, array('listOptions' => 'ol')); $result = $this->Form->error('Contact.field', null, array('listOptions' => 'ol'));

View file

@ -161,7 +161,7 @@ class JsHelper extends AppHelper {
* @param boolean $quoteString If false, leaves string values unquoted * @param boolean $quoteString If false, leaves string values unquoted
* @return string a JavaScript-safe/JSON representation of $val * @return string a JavaScript-safe/JSON representation of $val
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::value * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::value
**/ */
public function value($val = array(), $quoteString = null, $key = 'value') { public function value($val = array(), $quoteString = null, $key = 'value') {
if ($quoteString === null) { if ($quoteString === null) {
$quoteString = true; $quoteString = true;