Skip to content

Commit

Permalink
Remove global
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienClairembault committed Nov 4, 2024
1 parent ed644ef commit 69eba29
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Glpi/Console/Database/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ class UpdateCommand extends AbstractCommand implements ConfigurationCommandInter
#[Override]
public function getSpecificMandatoryRequirements(): array
{
/** @var DBmysql|null $DB */
global $DB;

return $this->db instanceof DBmysql && $this->db->connected ? [new DatabaseTablesEngine($this->db)] : [];
$valid_db = $this->db instanceof DBmysql && $this->db->connected;
return $valid_db ? [new DatabaseTablesEngine($this->db)] : [];
}

protected function configure()
Expand Down

0 comments on commit 69eba29

Please sign in to comment.