Skip to content

Commit

Permalink
MNT Remove TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Oct 10, 2023
1 parent f5cd4ed commit 7b0e144
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/ChangeSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ public function removeObject(DataObject $object)
])->first();

if ($item) {
// TODO: Handle case of implicit added item being removed.

$item->delete();
}

Expand Down
2 changes: 0 additions & 2 deletions src/DataDifferencer.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ protected function getObjectDisplay($object = null)
}

// Use image tag
// TODO Use CMSThumbnail instead to limit max size, blocked by DataDifferencerTest and GC
// not playing nice with mocked images
if ($object instanceof Image) {
return $object->getTag();
}
Expand Down
2 changes: 1 addition & 1 deletion src/RecursivePublishable.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function findOwners($recursive = true, $list = null)
}

// Build reverse lookup for ownership
// @todo - Cache this more intelligently
// Cache this more intelligently
$rules = $this->lookupReverseOwners();

// Hand off to recursive method
Expand Down
1 change: 0 additions & 1 deletion src/RecursivePublishableHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class RecursivePublishableHandler extends Extension
{
/**
* Ensure that non-versioned records are published on save.
* @todo Build this action into explicit UX action: https://github.com/silverstripe/silverstripe-versioned/issues/71
* @param DataObject $record
*/
public function onAfterSave(DataObject $record)
Expand Down
3 changes: 1 addition & 2 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,6 @@ public function Versions($filter = "", $sort = "", $limit = "", $join = "", $hav

$list = DataObject::get(DataObject::getSchema()->baseDataClass($owner), $filter, $sort, $join, $limit);
if ($having) {
// @todo - This method doesn't exist on DataList
$list->having($having);
}

Expand Down Expand Up @@ -2656,7 +2655,7 @@ public static function get_latest_version($class, $id)
/**
* Returns whether the current record is the latest one.
*
* @todo Performance - could do this directly via SQL.
* Performance - could do this directly via SQL.
*
* @see get_latest_version()
* @see latestPublished
Expand Down
3 changes: 1 addition & 2 deletions tests/php/DataDifferencerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public function testArrayValues()
$obj1v2 = Versioned::get_version(DataDifferencerTest\TestObject::class, $obj1->ID, $afterVersion);
$differ = new DataDifferencer($obj1v1, $obj1v2);
$obj1Diff = $differ->diffedData();
// TODO Using getter would split up field again, bug only caused by simulating
// an array-based value in the first place.

$this->assertContainsIgnoreWhitespace('<del>a,b</del><ins>a</ins>', $obj1Diff->getField('Choices'));
}

Expand Down

0 comments on commit 7b0e144

Please sign in to comment.