Remove all todo from core, create tickets for them

This commit is contained in:
Ceeram 2012-11-14 13:16:08 +01:00
parent 56225bcca3
commit e02eab05d5
17 changed files with 7 additions and 32 deletions

View file

@ -78,7 +78,6 @@ class TemplateTask extends AppShell {
$paths[] = $core; $paths[] = $core;
// TEMPORARY TODO remove when all paths are DS terminated
foreach ($paths as $i => $path) { foreach ($paths as $i => $path) {
$paths[$i] = rtrim($path, DS) . DS; $paths[$i] = rtrim($path, DS) . DS;
} }

View file

@ -755,7 +755,7 @@ class Controller extends Object implements CakeEventListener {
extract($status, EXTR_OVERWRITE); extract($status, EXTR_OVERWRITE);
} }
$event = new CakeEvent('Controller.beforeRedirect', $this, array($url, $status, $exit)); $event = new CakeEvent('Controller.beforeRedirect', $this, array($url, $status, $exit));
//TODO: Remove the following line when the events are fully migrated to the CakeEventManager
list($event->break, $event->breakOn, $event->collectReturn) = array(true, false, true); list($event->break, $event->breakOn, $event->collectReturn) = array(true, false, true);
$this->getEventManager()->dispatch($event); $this->getEventManager()->dispatch($event);

View file

@ -987,7 +987,6 @@ class Multibyte {
* @param string $charset charset to use for encoding. defaults to UTF-8 * @param string $charset charset to use for encoding. defaults to UTF-8
* @param string $newline * @param string $newline
* @return string * @return string
* @TODO: add support for 'Q'('Quoted Printable') encoding
*/ */
public static function mimeEncode($string, $charset = null, $newline = "\r\n") { public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
if (!Multibyte::checkMultibyte($string) && strlen($string) < 75) { if (!Multibyte::checkMultibyte($string) && strlen($string) < 75) {

View file

@ -588,7 +588,6 @@ class TreeBehavior extends ModelBehavior {
* 'parent' the values of the parent_id field will be used to populate the left and right fields. The missingParentAction * 'parent' the values of the parent_id field will be used to populate the left and right fields. The missingParentAction
* parameter only applies to "parent" mode and determines what to do if the parent field contains an id that is not present. * parameter only applies to "parent" mode and determines what to do if the parent field contains an id that is not present.
* *
* @todo Could be written to be faster, *maybe*. Ideally using a subquery and putting all the logic burden on the DB.
* @param Model $Model Model instance * @param Model $Model Model instance
* @param string $mode parent or tree * @param string $mode parent or tree
* @param string|integer $missingParentAction 'return' to do nothing and return, 'delete' to * @param string|integer $missingParentAction 'return' to do nothing and return, 'delete' to

View file

@ -55,7 +55,6 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
/** /**
* Attaches a model object and loads a list of behaviors * Attaches a model object and loads a list of behaviors
* *
* @todo Make this method a constructor instead..
* @param string $modelName * @param string $modelName
* @param array $behaviors * @param array $behaviors
* @return void * @return void

View file

@ -322,7 +322,6 @@ class DataSource extends Object {
* @param Model $linkModel Instance of model to replace $__cakeForeignKey__$ * @param Model $linkModel Instance of model to replace $__cakeForeignKey__$
* @param array $stack * @param array $stack
* @return string String of query data with placeholders replaced. * @return string String of query data with placeholders replaced.
* @todo Remove and refactor $assocData, ensure uses of the method have the param removed too.
*/ */
public function insertQueryData($query, $data, $association, $assocData, Model $model, Model $linkModel, $stack) { public function insertQueryData($query, $data, $association, $assocData, Model $model, Model $linkModel, $stack) {
$keys = array('{$__cakeID__$}', '{$__cakeForeignKey__$}'); $keys = array('{$__cakeID__$}', '{$__cakeForeignKey__$}');

View file

@ -219,7 +219,6 @@ class HttpResponse implements ArrayAccess {
$chunkSize = 0; $chunkSize = 0;
$hexLength = 0; $hexLength = 0;
$chunkExtensionName = '';
$chunkExtensionValue = ''; $chunkExtensionValue = '';
if (isset($match[0])) { if (isset($match[0])) {
$chunkSize = $match[0]; $chunkSize = $match[0];
@ -227,9 +226,6 @@ class HttpResponse implements ArrayAccess {
if (isset($match[1])) { if (isset($match[1])) {
$hexLength = $match[1]; $hexLength = $match[1];
} }
if (isset($match[2])) {
$chunkExtensionName = $match[2];
}
if (isset($match[3])) { if (isset($match[3])) {
$chunkExtensionValue = $match[3]; $chunkExtensionValue = $match[3];
} }
@ -237,9 +233,6 @@ class HttpResponse implements ArrayAccess {
$body = substr($body, strlen($chunkSize)); $body = substr($body, strlen($chunkSize));
$chunkLength = hexdec($hexLength); $chunkLength = hexdec($hexLength);
$chunk = substr($body, 0, $chunkLength); $chunk = substr($body, 0, $chunkLength);
if (!empty($chunkExtensionName)) {
// @todo See if there are popular chunk extensions we should implement
}
$decodedBody .= $chunk; $decodedBody .= $chunk;
if ($chunkLength !== 0) { if ($chunkLength !== 0) {
$body = substr($body, $chunkLength + strlen("\r\n")); $body = substr($body, $chunkLength + strlen("\r\n"));
@ -291,7 +284,6 @@ class HttpResponse implements ArrayAccess {
* *
* @param array $header Header array containing one ore more 'Set-Cookie' headers. * @param array $header Header array containing one ore more 'Set-Cookie' headers.
* @return mixed Either false on no cookies, or an array of cookies received. * @return mixed Either false on no cookies, or an array of cookies received.
* @todo Make this 100% RFC 2965 confirm
*/ */
public function parseCookies($header) { public function parseCookies($header) {
$cookieHeader = $this->getHeader('Set-Cookie', $header); $cookieHeader = $this->getHeader('Set-Cookie', $header);
@ -334,7 +326,6 @@ class HttpResponse implements ArrayAccess {
* @param string $token Token to unescape * @param string $token Token to unescape
* @param array $chars * @param array $chars
* @return string Unescaped token * @return string Unescaped token
* @todo Test $chars parameter
*/ */
protected function _unescapeToken($token, $chars = null) { protected function _unescapeToken($token, $chars = null) {
$regex = '/"([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])"/'; $regex = '/"([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])"/';
@ -348,7 +339,6 @@ class HttpResponse implements ArrayAccess {
* @param boolean $hex true to get them as HEX values, false otherwise * @param boolean $hex true to get them as HEX values, false otherwise
* @param array $chars * @param array $chars
* @return array Escape chars * @return array Escape chars
* @todo Test $chars parameter
*/ */
protected function _tokenEscapeChars($hex = true, $chars = null) { protected function _tokenEscapeChars($hex = true, $chars = null) {
if (!empty($chars)) { if (!empty($chars)) {

View file

@ -901,7 +901,6 @@ class HttpSocket extends CakeSocket {
* *
* @param array $cookies Array of cookies to send with the request. * @param array $cookies Array of cookies to send with the request.
* @return string Cookie header string to be sent with the request. * @return string Cookie header string to be sent with the request.
* @todo Refactor token escape mechanism to be configurable
*/ */
public function buildCookies($cookies) { public function buildCookies($cookies) {
$header = array(); $header = array();
@ -917,7 +916,6 @@ class HttpSocket extends CakeSocket {
* @param string $token Token to escape * @param string $token Token to escape
* @param array $chars * @param array $chars
* @return string Escaped token * @return string Escaped token
* @todo Test $chars parameter
*/ */
protected function _escapeToken($token, $chars = null) { protected function _escapeToken($token, $chars = null) {
$regex = '/([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])/'; $regex = '/([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])/';
@ -931,7 +929,6 @@ class HttpSocket extends CakeSocket {
* @param boolean $hex true to get them as HEX values, false otherwise * @param boolean $hex true to get them as HEX values, false otherwise
* @param array $chars * @param array $chars
* @return array Escape chars * @return array Escape chars
* @todo Test $chars parameter
*/ */
protected function _tokenEscapeChars($hex = true, $chars = null) { protected function _tokenEscapeChars($hex = true, $chars = null) {
if (!empty($chars)) { if (!empty($chars)) {

View file

@ -4054,7 +4054,6 @@ class ModelReadTest extends BaseModelTest {
/** /**
* testFindAllWithConditionInChildQuery * testFindAllWithConditionInChildQuery
* *
* @todo external conditions like this are going to need to be revisited at some point
* @return void * @return void
*/ */
public function testFindAllWithConditionInChildQuery() { public function testFindAllWithConditionInChildQuery() {

View file

@ -1551,7 +1551,6 @@ class HttpSocketTest extends CakeTestCase {
* testBuildCookies method * testBuildCookies method
* *
* @return void * @return void
* @todo Test more scenarios
*/ */
public function testBuildCookies() { public function testBuildCookies() {
$cookies = array( $cookies = array(

View file

@ -1538,7 +1538,6 @@ class RouterTest extends CakeTestCase {
* test url generation with legacy (1.2) style prefix routes. * test url generation with legacy (1.2) style prefix routes.
* *
* @return void * @return void
* @todo Remove tests related to legacy style routes.
* @see testUrlGenerationWithAutoPrefixes * @see testUrlGenerationWithAutoPrefixes
*/ */
public function testUrlGenerationWithLegacyPrefixes() { public function testUrlGenerationWithLegacyPrefixes() {

View file

@ -279,7 +279,7 @@ class ScaffoldViewTest extends CakeTestCase {
$this->assertRegExp('/<h2>View Scaffold Mock<\/h2>/', $result); $this->assertRegExp('/<h2>View Scaffold Mock<\/h2>/', $result);
$this->assertRegExp('/<dl>/', $result); $this->assertRegExp('/<dl>/', $result);
//TODO: add specific tests for fields.
$this->assertRegExp('/<a href="\/scaffold_users\/view\/1">1<\/a>/', $result); //belongsTo links $this->assertRegExp('/<a href="\/scaffold_users\/view\/1">1<\/a>/', $result); //belongsTo links
$this->assertRegExp('/<li><a href="\/scaffold_mock\/edit\/1">Edit Scaffold Mock<\/a>\s<\/li>/', $result); $this->assertRegExp('/<li><a href="\/scaffold_mock\/edit\/1">Edit Scaffold Mock<\/a>\s<\/li>/', $result);
$this->assertRegExp('/<a href="\#" onclick="if[^>]*>Delete Scaffold Mock<\/a>\s<\/li>/', $result); $this->assertRegExp('/<a href="\#" onclick="if[^>]*>Delete Scaffold Mock<\/a>\s<\/li>/', $result);
@ -370,7 +370,7 @@ class ScaffoldViewTest extends CakeTestCase {
$this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $result); $this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $result);
$this->assertRegExp('/<table cellpadding="0" cellspacing="0">/', $result); $this->assertRegExp('/<table cellpadding="0" cellspacing="0">/', $result);
//TODO: add testing for table generation
$this->assertRegExp('/<li><a href="\/admin\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result); $this->assertRegExp('/<li><a href="\/admin\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result);
Configure::write('Routing.prefixes', $_backAdmin); Configure::write('Routing.prefixes', $_backAdmin);
@ -454,7 +454,7 @@ class ScaffoldViewTest extends CakeTestCase {
$this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $result); $this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $result);
$this->assertRegExp('/<table cellpadding="0" cellspacing="0">/', $result); $this->assertRegExp('/<table cellpadding="0" cellspacing="0">/', $result);
//TODO: add testing for table generation
$this->assertRegExp('/<li><a href="\/member\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result); $this->assertRegExp('/<li><a href="\/member\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result);
Configure::write('Routing.prefixes', $_backAdmin); Configure::write('Routing.prefixes', $_backAdmin);

View file

@ -674,6 +674,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
} }
return $condition; return $condition;
} }
// @codingStandardsIgnoreStop // @codingStandardsIgnoreEnd
} }

View file

@ -103,7 +103,7 @@ abstract class ObjectCollection {
if (empty($event->omitSubject)) { if (empty($event->omitSubject)) {
$subject = $event->subject(); $subject = $event->subject();
} }
//TODO: Temporary BC check, while we move all the triggers system into the CakeEventManager
foreach (array('break', 'breakOn', 'collectReturn', 'modParams') as $opt) { foreach (array('break', 'breakOn', 'collectReturn', 'modParams') as $opt) {
if (isset($event->{$opt})) { if (isset($event->{$opt})) {
$options[$opt] = $event->{$opt}; $options[$opt] = $event->{$opt};

View file

@ -64,7 +64,6 @@ class Security {
* *
* @param string $authKey Authorization hash * @param string $authKey Authorization hash
* @return boolean Success * @return boolean Success
* @todo Complete implementation
*/ */
public static function validateAuthKey($authKey) { public static function validateAuthKey($authKey) {
return true; return true;

View file

@ -599,7 +599,6 @@ class Helper extends Object {
* @param string $id The name of the 'id' attribute. * @param string $id The name of the 'id' attribute.
* @return mixed If $options was an array, an array will be returned with $id set. If a string * @return mixed If $options was an array, an array will be returned with $id set. If a string
* was supplied, a string will be returned. * was supplied, a string will be returned.
* @todo Refactor this method to not have as many input/output options.
*/ */
public function domId($options = null, $id = 'id') { public function domId($options = null, $id = 'id') {
if (is_array($options) && array_key_exists($id, $options) && $options[$id] === null) { if (is_array($options) && array_key_exists($id, $options) && $options[$id] === null) {
@ -632,7 +631,6 @@ class Helper extends Object {
* @param string $key The name of the attribute to be set, defaults to 'name' * @param string $key The name of the attribute to be set, defaults to 'name'
* @return mixed If an array was given for $options, an array with $key set will be returned. * @return mixed If an array was given for $options, an array with $key set will be returned.
* If a string was supplied a string will be returned. * If a string was supplied a string will be returned.
* @todo Refactor this method to not have as many input/output options.
*/ */
protected function _name($options = array(), $field = null, $key = 'name') { protected function _name($options = array(), $field = null, $key = 'name') {
if ($options === null) { if ($options === null) {
@ -676,7 +674,6 @@ class Helper extends Object {
* @param string $key The name of the attribute to be set, defaults to 'value' * @param string $key The name of the attribute to be set, defaults to 'value'
* @return mixed If an array was given for $options, an array with $key set will be returned. * @return mixed If an array was given for $options, an array with $key set will be returned.
* If a string was supplied a string will be returned. * If a string was supplied a string will be returned.
* @todo Refactor this method to not have as many input/output options.
*/ */
public function value($options = array(), $field = null, $key = 'value') { public function value($options = array(), $field = null, $key = 'value') {
if ($options === null) { if ($options === null) {

View file

@ -885,7 +885,7 @@ class View extends Object {
$this->getEventManager()->dispatch(new CakeEvent('View.beforeRenderFile', $this, array($viewFile))); $this->getEventManager()->dispatch(new CakeEvent('View.beforeRenderFile', $this, array($viewFile)));
$content = $this->_evaluate($viewFile, $data); $content = $this->_evaluate($viewFile, $data);
$afterEvent = new CakeEvent('View.afterRenderFile', $this, array($viewFile, $content)); $afterEvent = new CakeEvent('View.afterRenderFile', $this, array($viewFile, $content));
//TODO: For BC puporses, set extra info in the event object. Remove when appropriate
$afterEvent->modParams = 1; $afterEvent->modParams = 1;
$this->getEventManager()->dispatch($afterEvent); $this->getEventManager()->dispatch($afterEvent);
$content = $afterEvent->data[1]; $content = $afterEvent->data[1];