Skip to content
Browse files

Remove all todo from core, create tickets for them

  • Loading branch information...
1 parent 56225bc commit e02eab05d5e598bc2af3489a4e4cba61a2419d36 @ceeram committed Nov 14, 2012
View
1 lib/Cake/Console/Command/Task/TemplateTask.php
@@ -78,7 +78,6 @@ protected function _findThemes() {
$paths[] = $core;
- // TEMPORARY TODO remove when all paths are DS terminated
foreach ($paths as $i => $path) {
$paths[$i] = rtrim($path, DS) . DS;
}
View
2 lib/Cake/Controller/Controller.php
@@ -755,7 +755,7 @@ public function redirect($url, $status = null, $exit = true) {
extract($status, EXTR_OVERWRITE);
}
$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);
$this->getEventManager()->dispatch($event);
View
1 lib/Cake/I18n/Multibyte.php
@@ -987,7 +987,6 @@ public static function substr($string, $start, $length = null) {
* @param string $charset charset to use for encoding. defaults to UTF-8
* @param string $newline
* @return string
- * @TODO: add support for 'Q'('Quoted Printable') encoding
*/
public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
if (!Multibyte::checkMultibyte($string) && strlen($string) < 75) {
View
1 lib/Cake/Model/Behavior/TreeBehavior.php
@@ -588,7 +588,6 @@ public function moveUp(Model $Model, $id = null, $number = 1) {
* '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.
*
- * @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 string $mode parent or tree
* @param string|integer $missingParentAction 'return' to do nothing and return, 'delete' to
View
1 lib/Cake/Model/BehaviorCollection.php
@@ -55,7 +55,6 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
/**
* Attaches a model object and loads a list of behaviors
*
- * @todo Make this method a constructor instead..
* @param string $modelName
* @param array $behaviors
* @return void
View
1 lib/Cake/Model/Datasource/DataSource.php
@@ -322,7 +322,6 @@ protected function _cacheDescription($object, $data = null) {
* @param Model $linkModel Instance of model to replace $__cakeForeignKey__$
* @param array $stack
* @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) {
$keys = array('{$__cakeID__$}', '{$__cakeForeignKey__$}');
View
10 lib/Cake/Network/Http/HttpResponse.php
@@ -219,27 +219,20 @@ protected function _decodeChunkedBody($body) {
$chunkSize = 0;
$hexLength = 0;
- $chunkExtensionName = '';
$chunkExtensionValue = '';
if (isset($match[0])) {
$chunkSize = $match[0];
}
if (isset($match[1])) {
$hexLength = $match[1];
}
- if (isset($match[2])) {
- $chunkExtensionName = $match[2];
- }
if (isset($match[3])) {
$chunkExtensionValue = $match[3];
}
$body = substr($body, strlen($chunkSize));
$chunkLength = hexdec($hexLength);
$chunk = substr($body, 0, $chunkLength);
- if (!empty($chunkExtensionName)) {
- // @todo See if there are popular chunk extensions we should implement
- }
$decodedBody .= $chunk;
if ($chunkLength !== 0) {
$body = substr($body, $chunkLength + strlen("\r\n"));
@@ -291,7 +284,6 @@ protected function _parseHeader($header) {
*
* @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.
- * @todo Make this 100% RFC 2965 confirm
*/
public function parseCookies($header) {
$cookieHeader = $this->getHeader('Set-Cookie', $header);
@@ -334,7 +326,6 @@ public function parseCookies($header) {
* @param string $token Token to unescape
* @param array $chars
* @return string Unescaped token
- * @todo Test $chars parameter
*/
protected function _unescapeToken($token, $chars = null) {
$regex = '/"([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])"/';
@@ -348,7 +339,6 @@ protected function _unescapeToken($token, $chars = null) {
* @param boolean $hex true to get them as HEX values, false otherwise
* @param array $chars
* @return array Escape chars
- * @todo Test $chars parameter
*/
protected function _tokenEscapeChars($hex = true, $chars = null) {
if (!empty($chars)) {
View
3 lib/Cake/Network/Http/HttpSocket.php
@@ -901,7 +901,6 @@ protected function _buildHeader($header, $mode = 'standard') {
*
* @param array $cookies Array of cookies to send 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) {
$header = array();
@@ -917,7 +916,6 @@ public function buildCookies($cookies) {
* @param string $token Token to escape
* @param array $chars
* @return string Escaped token
- * @todo Test $chars parameter
*/
protected function _escapeToken($token, $chars = null) {
$regex = '/([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])/';
@@ -931,7 +929,6 @@ protected function _escapeToken($token, $chars = null) {
* @param boolean $hex true to get them as HEX values, false otherwise
* @param array $chars
* @return array Escape chars
- * @todo Test $chars parameter
*/
protected function _tokenEscapeChars($hex = true, $chars = null) {
if (!empty($chars)) {
View
1 lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -4054,7 +4054,6 @@ public function testSaveEmpty() {
/**
* testFindAllWithConditionInChildQuery
*
- * @todo external conditions like this are going to need to be revisited at some point
* @return void
*/
public function testFindAllWithConditionInChildQuery() {
View
1 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
@@ -1551,7 +1551,6 @@ public function testBuildHeader() {
* testBuildCookies method
*
* @return void
- * @todo Test more scenarios
*/
public function testBuildCookies() {
$cookies = array(
View
1 lib/Cake/Test/Case/Routing/RouterTest.php
@@ -1538,7 +1538,6 @@ public function testNamedArgsUrlParsing() {
* test url generation with legacy (1.2) style prefix routes.
*
* @return void
- * @todo Remove tests related to legacy style routes.
* @see testUrlGenerationWithAutoPrefixes
*/
public function testUrlGenerationWithLegacyPrefixes() {
View
6 lib/Cake/Test/Case/View/ScaffoldViewTest.php
@@ -279,7 +279,7 @@ public function testViewScaffold() {
$this->assertRegExp('/<h2>View Scaffold Mock<\/h2>/', $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('/<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);
@@ -370,7 +370,7 @@ public function testAdminIndexScaffold() {
$this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $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);
Configure::write('Routing.prefixes', $_backAdmin);
@@ -454,7 +454,7 @@ public function testMultiplePrefixScaffold() {
$this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $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);
Configure::write('Routing.prefixes', $_backAdmin);
View
2 lib/Cake/TestSuite/CakeTestCase.php
@@ -674,6 +674,6 @@ protected function skipUnless($condition, $message = '') {
}
return $condition;
}
- // @codingStandardsIgnoreStop
+ // @codingStandardsIgnoreEnd
}
View
2 lib/Cake/Utility/ObjectCollection.php
@@ -103,7 +103,7 @@ public function trigger($callback, $params = array(), $options = array()) {
if (empty($event->omitSubject)) {
$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) {
if (isset($event->{$opt})) {
$options[$opt] = $event->{$opt};
View
1 lib/Cake/Utility/Security.php
@@ -64,7 +64,6 @@ public static function generateAuthKey() {
*
* @param string $authKey Authorization hash
* @return boolean Success
- * @todo Complete implementation
*/
public static function validateAuthKey($authKey) {
return true;
View
3 lib/Cake/View/Helper.php
@@ -599,7 +599,6 @@ public function field() {
* @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
* 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') {
if (is_array($options) && array_key_exists($id, $options) && $options[$id] === null) {
@@ -632,7 +631,6 @@ public function domId($options = null, $id = 'id') {
* @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.
* 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') {
if ($options === null) {
@@ -676,7 +674,6 @@ protected function _name($options = array(), $field = null, $key = 'name') {
* @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.
* 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') {
if ($options === null) {
View
2 lib/Cake/View/View.php
@@ -885,7 +885,7 @@ protected function _render($viewFile, $data = array()) {
$this->getEventManager()->dispatch(new CakeEvent('View.beforeRenderFile', $this, array($viewFile)));
$content = $this->_evaluate($viewFile, $data);
$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;
$this->getEventManager()->dispatch($afterEvent);
$content = $afterEvent->data[1];

0 comments on commit e02eab0

Please sign in to comment.
Something went wrong with that request. Please try again.