Skip to content

Commit c8a5474

Browse files
authored
[5.2] Refactored JDatabaseDriver in some params (#44750)
1 parent 7647896 commit c8a5474

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

administrator/components/com_scheduler/src/Model/TaskModel.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use Joomla\Component\Scheduler\Administrator\Helper\SchedulerHelper;
2828
use Joomla\Component\Scheduler\Administrator\Table\TaskTable;
2929
use Joomla\Component\Scheduler\Administrator\Task\TaskOption;
30+
use Joomla\Database\DatabaseInterface;
3031
use Joomla\Database\ParameterType;
3132
use Symfony\Component\OptionsResolver\Exception\AccessException;
3233
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
@@ -413,7 +414,7 @@ public function getTask(array $options = []): ?\stdClass
413414
/**
414415
* Checks if there are any running tasks in the database.
415416
*
416-
* @param \JDatabaseDriver $db The database driver to use.
417+
* @param DatabaseInterface $db The database driver to use.
417418
* @return bool True if there are running tasks, false otherwise.
418419
* @since 4.4.9
419420
*/
@@ -481,7 +482,7 @@ static function (TaskOption $taskOption): string {
481482
/**
482483
* Retrieves the ID of the next task based on the given criteria.
483484
*
484-
* @param \JDatabaseDriver $db The database object.
485+
* @param DatabaseInterface $db The database object.
485486
* @param string $now The current time.
486487
* @param array $options The options for retrieving the next task.
487488
* - includeCliExclusive: Whether to include CLI exclusive tasks.
@@ -534,7 +535,7 @@ static function (TaskOption $taskOption): string {
534535
/**
535536
* Fetches a task from the database based on the current time.
536537
*
537-
* @param \JDatabaseDriver $db The database driver to use.
538+
* @param DatabaseInterface $db The database driver to use.
538539
* @param string $now The current time in the database's time format.
539540
* @return \stdClass|null The fetched task object, or null if no task was found.
540541
* @since 5.2.0

installation/src/Model/DatabaseModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function createDatabase(array $options)
131131
|| $type === 'pgsql' && strpos($e->getMessage(), 'database "' . $options->db_name . '" does not exist')
132132
) {
133133
/*
134-
* Now we're really getting insane here; we're going to try building a new JDatabaseDriver instance
134+
* Now we're really getting insane here; we're going to try building a new DatabaseDriver instance
135135
* in order to trick the connection into creating the database
136136
*/
137137
if ($type === 'mysql') {

0 commit comments

Comments
 (0)