| Total Complexity | 6 |
| Total Lines | 80 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | abstract class CronHandler |
||
| 19 | { |
||
| 20 | /** @var \vtlib\Cron Cron task instance. */ |
||
| 21 | protected $cronTask; |
||
| 22 | |||
| 23 | /** @var string Cron task logs. */ |
||
| 24 | protected $logs = ''; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Main function to execute task. |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | abstract public function process(); |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Construct. |
||
| 35 | * |
||
| 36 | * @param \vtlib\Cron $cronTask |
||
| 37 | */ |
||
| 38 | public function __construct(\vtlib\Cron $cronTask) |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Check cron task timeout. |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public function checkTimeout(): bool |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Update cron task last action time. |
||
| 55 | * |
||
| 56 | * @return void |
||
| 57 | */ |
||
| 58 | public function updateLastActionTime(): void |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get cron task logs. |
||
| 65 | * |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public function getTaskLog(): string |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Add text to logs. |
||
| 75 | * |
||
| 76 | * @param string $log |
||
| 77 | * |
||
| 78 | * @return void |
||
| 79 | */ |
||
| 80 | public function addTaskLog(string $log): void |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * Add error message to log. |
||
| 87 | * |
||
| 88 | * @param string $message |
||
| 89 | * |
||
| 90 | * @return void |
||
| 91 | */ |
||
| 92 | public function addErrorLog(string $message): void |
||
| 100 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.