Skip to content

Commit

Permalink
ENH Use class name instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 5, 2024
1 parent d1bf460 commit e9de952
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Model/BrokenExternalPageTrackStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class BrokenExternalPageTrackStatus extends DataObject implements i18nEntityProv
*/
public static function get_latest()
{
return self::get()
return BrokenExternalPageTrackStatus::get()
->sort('ID', 'DESC')
->first();
}
Expand Down Expand Up @@ -118,13 +118,13 @@ public function getCompletedPages()
public static function get_or_create()
{
// Check the current status
$status = self::get_latest();
$status = BrokenExternalPageTrackStatus::get_latest();
if ($status && $status->Status == 'Running') {
$status->updateStatus();
return $status;
}

return self::create_status();
return BrokenExternalPageTrackStatus::create_status();
}

/**
Expand All @@ -135,7 +135,7 @@ public static function get_or_create()
public static function create_status()
{
// If the script is to be started create a new status
$status = self::create();
$status = BrokenExternalPageTrackStatus::create();
$status->updateJobInfo('Creating new tracking object');

// Setup all pages to test
Expand Down

0 comments on commit e9de952

Please sign in to comment.